/* 
 * Copyright (c) 2008, 2013, 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_view.h"

namespace mforms { namespace stub {


ViewImpl::ViewImpl(mforms::View *view)
  : ObjectImpl(view)
{}

void ViewImpl::show(mforms::View *self, bool show)
{
}

bool ViewImpl::is_shown(mforms::View *self)
{
  return false;
}


void ViewImpl::set_tooltip(mforms::View *self, const std::string &text)
{
}


int ViewImpl::get_width(mforms::View *self)
{
  return 0;
}

int ViewImpl::get_height(mforms::View *self)
{
  return 0;
}

int ViewImpl::get_preferred_width(mforms::View *self)
{
  return 0;
}

int ViewImpl::get_preferred_width()
{
  return 0;
}

int ViewImpl::get_preferred_height(mforms::View *self)
{
  return 0;
}

int ViewImpl::get_preferred_height()
{
  return 0;
}

int ViewImpl::get_x(mforms::View *self)
{
  return 0;
}

int ViewImpl::get_y(mforms::View *self)
{
  return 0;
}

void ViewImpl::set_size(mforms::View *self, int w, int h)
{
}

void ViewImpl::set_size(int width, int height)
{
}

void ViewImpl::set_position(mforms::View *self, int x, int y)
{
}

void ViewImpl::set_enabled(mforms::View *self, bool flag)
{
}


bool ViewImpl::is_enabled(mforms::View *self)
{
  return true;
}

void ViewImpl::set_name(mforms::View *view, const std::string &name)
{
}


void ViewImpl::set_font(mforms::View *view, const std::string &font)
{

}

void ViewImpl::relayout(mforms::View *view)
{
}

void ViewImpl::set_needs_repaint(mforms::View *view)
{
}


void ViewImpl::size_changed()
{
}


void ViewImpl::suspend_layout(mforms::View *self, bool)
{

}

void ViewImpl::set_front_color(mforms::View *self, const std::string &color)
{
}

std::string ViewImpl::get_front_color(mforms::View *self)
{
  return "#000000";
}

void ViewImpl::set_back_color(mforms::View *self, const std::string &color)
{
}

std::string ViewImpl::get_back_color(mforms::View *self)
{
  return "#FFFFFF";
}

void ViewImpl::set_back_image(mforms::View *self, const std::string &path, mforms::Alignment layout)
{
}
  
void ViewImpl::flush_events(mforms::View *self)
{

}

void ViewImpl::focus(mforms::View *self)
{

}

void ViewImpl::destroy(mforms::View *self)
{
}

void ViewImpl::set_padding(mforms::View *self, int left, int top, int right, int bottom)
{
}

void ViewImpl::client_to_screen(mforms::View *self,int& x, int& y)
{
}

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

  f->_view_impl.destroy              = &ViewImpl::destroy;

  f->_view_impl.get_width            = &ViewImpl::get_width;
  f->_view_impl.get_height           = &ViewImpl::get_height;
  f->_view_impl.get_preferred_width  = &ViewImpl::get_preferred_width;
  f->_view_impl.get_preferred_height = &ViewImpl::get_preferred_height;
  f->_view_impl.set_size             = &ViewImpl::set_size;
  f->_view_impl.set_padding          = &ViewImpl::set_padding;

  f->_view_impl.get_x                = &ViewImpl::get_x;
  f->_view_impl.get_y                = &ViewImpl::get_y;
  f->_view_impl.set_position         = &ViewImpl::set_position;
  f->_view_impl.client_to_screen     = &ViewImpl::client_to_screen;

  f->_view_impl.show                 = &ViewImpl::show;
  f->_view_impl.is_shown             = &ViewImpl::is_shown;

  f->_view_impl.set_tooltip          = &ViewImpl::set_tooltip;
  f->_view_impl.set_name             = &ViewImpl::set_name;
  f->_view_impl.set_font             = &ViewImpl::set_font;

  f->_view_impl.set_enabled          = &ViewImpl::set_enabled;
  f->_view_impl.is_enabled           = &ViewImpl::is_enabled;
  f->_view_impl.relayout             = &ViewImpl::relayout;
  f->_view_impl.set_needs_repaint    = &ViewImpl::set_needs_repaint;

  f->_view_impl.suspend_layout       = &ViewImpl::suspend_layout;
  f->_view_impl.set_front_color      = &ViewImpl::set_front_color;
  f->_view_impl.get_front_color      = &ViewImpl::get_front_color;
  f->_view_impl.set_back_color       = &ViewImpl::set_back_color;
  f->_view_impl.get_back_color       = &ViewImpl::get_back_color;
  f->_view_impl.set_back_image       = &ViewImpl::set_back_image;

  f->_view_impl.flush_events         = &ViewImpl::flush_events;

  f->_view_impl.focus                = &ViewImpl::focus;
};

};
};
