wxMaracasIRMViewProp3DMHD Class Reference

#include <wxMaracasIRMViewProp3DMHD.h>

Inheritance diagram for wxMaracasIRMViewProp3DMHD:

Inheritance graph
[legend]
Collaboration diagram for wxMaracasIRMViewProp3DMHD:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxMaracasIRMViewProp3DMHD (wxWindow *parent, int propid)
 ~wxMaracasIRMViewProp3DMHD ()
void onIsoValueRelease (wxScrollEvent &event)
void createControls (int maxisovalue)
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 ()

Private Attributes

wxSlider * isovalue
int _propid


Detailed Description

Definition at line 6 of file wxMaracasIRMViewProp3DMHD.h.


Constructor & Destructor Documentation

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

IRM viewProp3DMHD implementation

Definition at line 7 of file wxMaracasIRMViewProp3DMHD.cxx.

00008 : wxMaracasIRMViewProp3D(parent, propid)
00009 {
00010         
00011 }

wxMaracasIRMViewProp3DMHD::~wxMaracasIRMViewProp3DMHD (  ) 

Definition at line 12 of file wxMaracasIRMViewProp3DMHD.cxx.

00012                                                      {
00013         //this->Show(false);
00014         //wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
00015 }


Member Function Documentation

void wxMaracasIRMViewProp3DMHD::onIsoValueRelease ( wxScrollEvent &  event  ) 

Definition at line 31 of file wxMaracasIRMViewProp3DMHD.cxx.

References wxMaracasIRMView::changeIsoValue(), wxMaracasIRMView::getInstance(), and isovalue.

Referenced by createControls().

00031                                                                       {
00032 
00033         wxMaracasIRMView::getInstance()->changeIsoValue(this->getPropId(), isovalue->GetValue()/1.0);
00034         
00035 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxMaracasIRMViewProp3DMHD::createControls ( int  maxisovalue  ) 

Definition at line 16 of file wxMaracasIRMViewProp3DMHD.cxx.

References wxMaracasIRMViewPanel::addControl(), isovalue, and onIsoValueRelease().

00016                                                              {
00017         
00018         wxFlexGridSizer* sizer = new wxFlexGridSizer(1,1,1);
00019 
00020         wxStaticText* label = new wxStaticText(this, -1, wxString(_T("IsoValue")));
00021         sizer->Add(label, wxGROW);
00022         //this->addControl(label);
00023         isovalue = new wxSlider(this, -1,maxisovalue,0,maxisovalue,wxDefaultPosition,wxDefaultSize,wxSL_HORIZONTAL|wxSL_LABELS);
00024         sizer->Add(isovalue, wxGROW);
00025         //this->addControl(isovalue);
00026 
00027         this->addControl(sizer);        
00028         Connect(isovalue->GetId(), wxEVT_SCROLL_CHANGED, (wxObjectEventFunction)&wxMaracasIRMViewProp3DMHD::onIsoValueRelease); 
00029 }

Here is the call graph for this function:

void wxMaracasIRMViewProp3D::createControls (  )  [virtual, inherited]

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 wxMaracasIRMViewProp3D::_colorchoose, wxMaracasIRMViewPanel::addControl(), wxMaracasIRMViewProp3D::checkbox, wxMaracasIRMViewProp3D::onCheckBoxChange(), wxMaracasIRMViewProp3D::onColorChange(), wxMaracasIRMViewProp3D::onOpacityRelease(), and wxMaracasIRMViewProp3D::opacity.

Referenced by wxMaracasIRMViewProp3D::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  )  [inherited]

Definition at line 79 of file wxMaracasIRMViewProp3D.cxx.

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

Referenced by wxMaracasIRMViewProp3D::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  )  [inherited]

Definition at line 58 of file wxMaracasIRMViewProp3D.cxx.

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

Referenced by wxMaracasIRMViewProp3D::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  )  [inherited]

Definition at line 61 of file wxMaracasIRMViewProp3D.cxx.

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

Referenced by wxMaracasIRMViewProp3D::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 createControls(), and wxMaracasIRMViewProp3D::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

wxSlider* wxMaracasIRMViewProp3DMHD::isovalue [private]

Definition at line 15 of file wxMaracasIRMViewProp3DMHD.h.

Referenced by createControls(), and onIsoValueRelease().

int wxMaracasIRMViewProp3DMHD::_propid [private]

Reimplemented from wxMaracasIRMViewPanel.

Definition at line 16 of file wxMaracasIRMViewProp3DMHD.h.


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