/* 
 * 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_textbox.h"

namespace mforms {
namespace stub {


bool __stdcall TextBoxImpl::create(::mforms::TextBox *self, mforms::ScrollBars scroll_type)
{
  return true;
}

void __stdcall TextBoxImpl::set_text(::mforms::TextBox *self, const std::string &text)
{
}

void __stdcall TextBoxImpl::append_text(::mforms::TextBox *self, const std::string &text, bool scroll_to_end)
{
}

std::string __stdcall TextBoxImpl::get_text(::mforms::TextBox *self)
{
  return "";
}

void __stdcall TextBoxImpl::set_read_only(::mforms::TextBox *self, bool flag)
{
}

void __stdcall TextBoxImpl::set_padding(::mforms::TextBox *self, int pad)
{
}

void __stdcall TextBoxImpl::set_bordered(::mforms::TextBox *self, bool flag)
{
}

void __stdcall TextBoxImpl::clear(::mforms::TextBox *self)
{
}

void __stdcall TextBoxImpl::set_monospaced(::mforms::TextBox *self, bool flag)
{
}

void __stdcall TextBoxImpl::get_selected_range(TextBox *self, int &start, int &end)
{
}

TextBoxImpl::TextBoxImpl(::mforms::TextBox *self, mforms::ScrollBars scroll_type)
  : ViewImpl(self)
{
}

void TextBoxImpl::init()
{
  ::mforms::ControlFactory *f = ::mforms::ControlFactory::get_instance();

  f->_textbox_impl.create   = &TextBoxImpl::create;
  f->_textbox_impl.set_bordered= &TextBoxImpl::set_bordered;
  f->_textbox_impl.set_text = &TextBoxImpl::set_text;
  f->_textbox_impl.get_text = &TextBoxImpl::get_text;
  f->_textbox_impl.append_text = &TextBoxImpl::append_text;
  f->_textbox_impl.set_read_only= &TextBoxImpl::set_read_only;
  f->_textbox_impl.set_padding = &TextBoxImpl::set_padding;
  f->_textbox_impl.clear = &TextBoxImpl::clear;
  f->_textbox_impl.set_monospaced = &TextBoxImpl::set_monospaced;
  f->_textbox_impl.get_selected_range = &TextBoxImpl::get_selected_range;
}


  };
};
