wxMaracasIRMViewProp3D Class Reference

#include <wxMaracasIRMViewProp3D.h>

Inheritance diagram for wxMaracasIRMViewProp3D:

Inheritance graph
[legend]
Collaboration diagram for wxMaracasIRMViewProp3D:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxMaracasIRMViewProp3D (wxWindow *parent, int propid)
 ~wxMaracasIRMViewProp3D ()
virtual void createControls ()
void onOpacityRelease (wxScrollEvent &event)
void onCheckBoxChange (wxCommandEvent &event)
void onColorChange (wxCommandEvent &event)
virtual void createPanel ()
virtual void addControl (wxWindow *win)
virtual void addControl (wxSizer *sizer)
virtual void onActionButtonPressedHide (wxCommandEvent &event)
int getPropId ()

Protected Attributes

int _propid

Private Attributes

wxCheckBox * checkbox
wxSlider * opacity
wxBitmapButton * _colorchoose


Detailed Description

Definition at line 6 of file wxMaracasIRMViewProp3D.h.


Constructor & Destructor Documentation

wxMaracasIRMViewProp3D::wxMaracasIRMViewProp3D ( wxWindow *  parent,
int  propid 
)

Implementation of viewProp3D

Definition at line 10 of file wxMaracasIRMViewProp3D.cxx.

References createControls().

00011 :wxMaracasIRMViewPanel(parent, propid){
00012         createControls();       
00013 }

Here is the call graph for this function:

wxMaracasIRMViewProp3D::~wxMaracasIRMViewProp3D (  ) 

Definition at line 15 of file wxMaracasIRMViewProp3D.cxx.

References wxMaracasIRMViewPanel::_propid, wxMaracasIRMView::deleteActor(), and wxMaracasIRMView::getInstance().

00015                                                {        
00016         //wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
00017         wxMaracasIRMView::getInstance()->deleteActor(_propid);
00018 }

Here is the call graph for this function:


Member Function Documentation

void wxMaracasIRMViewProp3D::createControls (  )  [virtual]

The user must implement this function to remove the panel from the The user must implement this function to add the necessary controls to the panel

Implements wxMaracasIRMViewPanel.

Definition at line 20 of file wxMaracasIRMViewProp3D.cxx.

References _colorchoose, wxMaracasIRMViewPanel::addControl(), checkbox, onCheckBoxChange(), onColorChange(), onOpacityRelease(), and opacity.

Referenced by wxMaracasIRMViewProp3D().

00020                                            {
00021 
00022         wxFlexGridSizer* sizerirmprop = new wxFlexGridSizer(1,1,1);
00023         
00024         wxString choices[2];
00025         choices[0] = wxString(_T("On"));
00026         choices[1] = wxString(_T("Off"));
00027         checkbox = new  wxCheckBox(this,-1,wxString(_T("Show Actor")));
00028         Connect(checkbox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onCheckBoxChange);   
00029         checkbox->SetValue(true);       
00030 
00031         sizerirmprop->Add(checkbox,wxFIXED_MINSIZE);
00032 
00033         //this->addControl(checkbox);   
00034         
00035         wxBitmap bitmap(Color_xpm);
00036         _colorchoose = new wxBitmapButton(this, -1, bitmap,wxDefaultPosition,wxSize(30,30));    
00037         Connect(_colorchoose->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onColorChange);                    
00038         sizerirmprop->Add(_colorchoose,wxFIXED_MINSIZE);        
00039 
00040         //sizercolor->Add(checkbox,wxFIXED_MINSIZE);
00041         //sizercolor->Add(_colorchoose,wxFIXED_MINSIZE);
00042         //this->addControl(sizercolor);
00043         
00044         
00045         wxStaticText* label = new wxStaticText(this, -1, wxString(_T("Opacity")));              
00046         opacity = new wxSlider(this, -1,100,0,100,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL|wxSL_LABELS); 
00047         Connect(opacity->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onOpacityRelease);      
00048         wxFlexGridSizer* sizeropacity = new wxFlexGridSizer(1,1,1);     
00049         sizeropacity->Add(label,wxFIXED_MINSIZE);
00050         sizeropacity->Add(opacity,wxFIXED_MINSIZE);
00051 
00052         sizerirmprop->Add(sizeropacity,wxFIXED_MINSIZE);
00053 
00054         //this->addControl(sizeropacity);
00055         this->addControl(sizerirmprop);
00056         
00057 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxMaracasIRMViewProp3D::onOpacityRelease ( wxScrollEvent &  event  ) 

Definition at line 79 of file wxMaracasIRMViewProp3D.cxx.

References wxMaracasIRMView::changeOpacity(), wxMaracasIRMView::getInstance(), and opacity.

Referenced by createControls().

00079                                                                   {
00080 
00081         wxMaracasIRMView::getInstance()->changeOpacity(this->getPropId(),opacity->GetValue());
00082 
00083 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxMaracasIRMViewProp3D::onCheckBoxChange ( wxCommandEvent &  event  ) 

Definition at line 58 of file wxMaracasIRMViewProp3D.cxx.

References wxMaracasIRMView::addRemoveActor(), checkbox, and wxMaracasIRMView::getInstance().

Referenced by createControls().

00058                                                                   {     
00059         wxMaracasIRMView::getInstance()->addRemoveActor(this->getPropId(), checkbox->GetValue());
00060 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxMaracasIRMViewProp3D::onColorChange ( wxCommandEvent &  event  ) 

Definition at line 61 of file wxMaracasIRMViewProp3D.cxx.

References _colorchoose, wxMaracasIRMView::changeColor(), and wxMaracasIRMView::getInstance().

Referenced by createControls().

00061                                                                {
00062         wxColourDialog* colourdiag = new wxColourDialog(this);
00063         if(colourdiag->ShowModal()==wxID_OK){
00064                 wxColour colour = colourdiag->GetColourData().GetColour();
00065                 _colorchoose->SetBackgroundColour(colour);
00066 
00067                 double r = (double)(colour.Red())/255.0;
00068                 double g = (double)(colour.Green())/255.0;
00069                 double b = (double)(colour.Blue())/255.0;
00070                 
00071                 wxMaracasIRMView::getInstance()->changeColor(this->getPropId(),r,g,b);
00072         }
00073         delete colourdiag;
00074 }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxMaracasIRMViewPanel::createPanel (  )  [inline, virtual, inherited]

Definition at line 14 of file wxMaracasIRMViewPanel.h.

References wxMaracasIRMViewPanel::show, and wxMaracasIRMViewPanel::sizercontrols.

Referenced by wxMaracasIRMViewPanel::wxMaracasIRMViewPanel().

00014                                   {
00015                 show = false;
00016         /*wxBoxSizer* sizerButtons = new wxBoxSizer(wxVERTICAL);
00017 
00018                 wxButton* b = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, 
00019                                                                 wxDefaultValidator, wxString(_T("-"))); 
00020                 Connect(b->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedHide);
00021                 wxButton* b1 = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, 
00022                                                                 wxDefaultValidator, wxString(_T("x"))); 
00023                 Connect(b1->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedEliminate);
00024 
00025                 sizerButtons->Add(b, wxFIXED_MINSIZE);
00026                 sizerButtons->Add(b1, wxFIXED_MINSIZE);*/
00027 
00028                 sizercontrols = new wxBoxSizer(wxVERTICAL);
00029 
00030                 wxBoxSizer* sizerpanel = new wxBoxSizer(wxHORIZONTAL);
00031 
00032                 //sizerpanel->Add(sizerButtons,wxGROW);
00033                 sizerpanel->Add(sizercontrols,wxGROW);
00034         
00035                 this->SetSizer(sizerpanel, true);               
00036                 this->SetAutoLayout( true );
00037         }

Here is the caller graph for this function:

virtual void wxMaracasIRMViewPanel::addControl ( wxWindow *  win  )  [inline, virtual, inherited]

Adds a new control to the panel (sizer, radiob, etc)

Definition at line 42 of file wxMaracasIRMViewPanel.h.

References wxMaracasIRMViewPanel::sizercontrols.

Referenced by wxMaracasIRMViewProp3DMHD::createControls(), and createControls().

00042                                               {
00043                 if(sizercontrols!=NULL){
00044                         sizercontrols->Add(win, wxGROW);
00045                 }
00046         }

Here is the caller graph for this function:

virtual void wxMaracasIRMViewPanel::addControl ( wxSizer *  sizer  )  [inline, virtual, inherited]

Adds a new control to the panel (sizer, radiob, etc)

Definition at line 50 of file wxMaracasIRMViewPanel.h.

References wxMaracasIRMViewPanel::sizercontrols.

00050                                                {
00051                 if(sizercontrols!=NULL){
00052                         sizercontrols->Add(sizer, wxGROW);
00053                 }
00054         }

virtual void wxMaracasIRMViewPanel::onActionButtonPressedHide ( wxCommandEvent &  event  )  [inline, virtual, inherited]

Hides or show the controls in the panel

Definition at line 59 of file wxMaracasIRMViewPanel.h.

References wxMaracasIRMViewPanel::show, and wxMaracasIRMViewPanel::sizercontrols.

00059                                                                        {
00060                 wxList list = sizercontrols->GetChildren();             
00061                 int i;
00062                 for(i=0; i<list.size();i++){
00063                         sizercontrols->Show(i,show);
00064                 }
00065                 show = !show;
00066                 sizercontrols->Layout();
00067                 this->Layout();
00068         }

int wxMaracasIRMViewPanel::getPropId (  )  [inline, inherited]

returns the id of the panel

Definition at line 82 of file wxMaracasIRMViewPanel.h.

References wxMaracasIRMViewPanel::_propid.

00082                        {
00083                 return _propid;
00084         }


Member Data Documentation

wxCheckBox* wxMaracasIRMViewProp3D::checkbox [private]

Definition at line 17 of file wxMaracasIRMViewProp3D.h.

Referenced by createControls(), and onCheckBoxChange().

wxSlider* wxMaracasIRMViewProp3D::opacity [private]

Definition at line 18 of file wxMaracasIRMViewProp3D.h.

Referenced by createControls(), and onOpacityRelease().

wxBitmapButton* wxMaracasIRMViewProp3D::_colorchoose [private]

Definition at line 19 of file wxMaracasIRMViewProp3D.h.

Referenced by createControls(), and onColorChange().

int wxMaracasIRMViewPanel::_propid [protected, inherited]

Reimplemented in wxMaracasIRMViewProp3DMHD.

Definition at line 90 of file wxMaracasIRMViewPanel.h.

Referenced by wxMaracasIRMViewPanel::getPropId(), wxMaracasIRMViewPanel::wxMaracasIRMViewPanel(), and ~wxMaracasIRMViewProp3D().


The documentation for this class was generated from the following files:
Generated on Wed Jul 29 16:36:20 2009 for creaMaracasVisu_lib by  doxygen 1.5.3