/* 
 * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; version 2 of the
 * License.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301  USA
 */
#include "tut_stdafx.h"

#include "../stub_selector.h"

namespace mforms
{
namespace stub
{

//------------------------------------------------------------------------------
SelectorImpl::SelectorImpl(::mforms::Selector *self, ::mforms::SelectorStyle style)
  : ViewImpl(self)
{
}

//------------------------------------------------------------------------------
SelectorImpl::~SelectorImpl()
{
}

//------------------------------------------------------------------------------
bool __stdcall SelectorImpl::create(::mforms::Selector *self, ::mforms::SelectorStyle style)
{
  return true;
}

//------------------------------------------------------------------------------
void __stdcall SelectorImpl::clear(::mforms::Selector *self)
{
}

//------------------------------------------------------------------------------
int __stdcall SelectorImpl::add_item(::mforms::Selector *self, const std::string &item)
{
  return 0;
}

//------------------------------------------------------------------------------
void __stdcall SelectorImpl::add_items(::mforms::Selector *self, const std::list<std::string> &items)
{
}

//------------------------------------------------------------------------------
std::string __stdcall SelectorImpl::get_item(::mforms::Selector *self, int index)
{
  return "";
}

//------------------------------------------------------------------------------
std::string __stdcall SelectorImpl::get_text(::mforms::Selector *self)
{
  return "";
}

//------------------------------------------------------------------------------
void __stdcall SelectorImpl::set_index(::mforms::Selector *self, int index)
{
}

//------------------------------------------------------------------------------
int __stdcall SelectorImpl::get_index(::mforms::Selector *self)
{
  return -1;
}

//------------------------------------------------------------------------------
int __stdcall SelectorImpl::get_item_count(::mforms::Selector *self)
{
  return -1;
}

//------------------------------------------------------------------------------
void __stdcall SelectorImpl::set_value(::mforms::Selector *self, const std::string&)
{
}

//------------------------------------------------------------------------------
void SelectorImpl::init()
{
  ::mforms::ControlFactory *f = ::mforms::ControlFactory::get_instance();

  f->_selector_impl.create    = &SelectorImpl::create;
  f->_selector_impl.clear     = &SelectorImpl::clear;
  f->_selector_impl.add_item  = &SelectorImpl::add_item;
  f->_selector_impl.add_items = &SelectorImpl::add_items;
  f->_selector_impl.get_item = &SelectorImpl::get_item;
  f->_selector_impl.set_index = &SelectorImpl::set_index;
  f->_selector_impl.get_index = &SelectorImpl::get_index;
  f->_selector_impl.get_text  = &SelectorImpl::get_text;
  f->_selector_impl.get_item_count = &SelectorImpl::get_item_count;
  f->_selector_impl.set_value = &SelectorImpl::set_value;
}

}
}
