fshake3d  0.0.1
FreeformDensity3DSurfaceEditor
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
ui_Bin.cpp
Go to the documentation of this file.
00001 #include "ui_Bin.hpp"
00002 
00003 Bin::Bin()
00004 : mChild(0)
00005 {
00006 }
00007 
00008 
00009 void Bin::reshape(int w, int h)
00010 {
00011   if (mChild)
00012   {
00013     mChild->reshape(w,h);
00014   }
00015 }
00016 void Bin::setChildView(View* p)
00017 {
00018   // remove odl child
00019   if (mChild)
00020   {
00021     mChild->setParent(0);
00022   }
00023   mChild = p;
00024   if (mChild)
00025   {
00026     mChild->setParent(this);
00027     mChild->reshape(width(),height());
00028   }
00029 }
00030 void Bin::mouse(int button, int state, int x, int y)
00031 {
00032   if (mChild)
00033   {
00034     mChild->mouse(button, state, x, y);
00035   }
00036 }
00037 void Bin::motion(int x, int y)
00038 {
00039   if (mChild)
00040   {
00041     mChild->motion(x, y);
00042   }
00043 }
00044 void Bin::onEvent(Event& e)
00045 {
00046   if (mChild)
00047   {
00048     mChild->onEvent(e);
00049   }
00050 }
00051 void Bin::display()
00052 {
00053   if (mChild)
00054     mChild->display();
00055 }