X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxMaracasIRMView.h;h=0512c7ecb6590f2cabf5bcd6e69342588bfe37b8;hb=096822cf3513065cfa25e378679339a5ae4684cf;hp=441f78cbef0bc9a1d2ef44410f96556dcd688323;hpb=3948b92b07a8992a6d04081c9649ba63e3e7d613;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMView.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMView.h index 441f78c..0512c7e 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMView.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMView.h @@ -3,14 +3,14 @@ Program: wxMaracas Module: $RCSfile: wxMaracasIRMView.h,v $ Language: C++ - Date: $Date: 2009/05/04 07:35:42 $ - Version: $Revision: 1.3 $ + Date: $Date: 2009/06/16 13:25:58 $ + Version: $Revision: 1.6 $ Copyright: (c) 2002, 2003 License: - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ @@ -26,105 +26,17 @@ #include "vtkProp3D.h" #include "wxMaracasIRMViewManager.h" - -class wxMaracasIRMViewPanel : public wxPanel{ -public: - wxMaracasIRMViewPanel(wxWindow* parent, int propid) - : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize){ - createPanel(); - _propid = propid; - } - //virtual ~wxMaracasIRMViewPanel(); - virtual void createPanel(){ - show = false; - /*wxBoxSizer* sizerButtons = new wxBoxSizer(wxVERTICAL); - - wxButton* b = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, - wxDefaultValidator, wxString(_T("-"))); - Connect(b->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedHide); - wxButton* b1 = new wxButton(this, -1, wxString(_T("-")), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, - wxDefaultValidator, wxString(_T("x"))); - Connect(b1->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewPanel::onActionButtonPressedEliminate); - - sizerButtons->Add(b, wxFIXED_MINSIZE); - sizerButtons->Add(b1, wxFIXED_MINSIZE);*/ - - sizercontrols = new wxBoxSizer(wxVERTICAL); - - wxBoxSizer* sizerpanel = new wxBoxSizer(wxHORIZONTAL); - - //sizerpanel->Add(sizerButtons,wxGROW); - sizerpanel->Add(sizercontrols,wxGROW); - - this->SetSizer(sizerpanel, true); - this->SetAutoLayout( true ); - } - - /** - ** Adds a new control to the panel (sizer, radiob, etc) - **/ - virtual void addControl(wxWindow* win){ - if(sizercontrols!=NULL){ - sizercontrols->Add(win, wxGROW); - } - } - /** - ** Adds a new control to the panel (sizer, radiob, etc) - **/ - virtual void addControl(wxSizer* sizer){ - if(sizercontrols!=NULL){ - sizercontrols->Add(sizer, wxGROW); - } - } - - /** - ** Hides or show the controls in the panel - **/ - virtual void onActionButtonPressedHide( wxCommandEvent& event ){ - wxList list = sizercontrols->GetChildren(); - int i; - for(i=0; iShow(i,show); - } - show = !show; - sizercontrols->Layout(); - this->Layout(); - } - - /** - ** The user must implement this function to remove the panel from the - **/ - //virtual void onActionButtonPressedEliminate( wxCommandEvent& event )=0; - - /** - ** The user must implement this function to add the necessary controls to the panel - **/ - virtual void createControls( )=0; - /** - ** returns the id of the panel - **/ - int getPropId(){ - return _propid; - } - -private: - wxBoxSizer* sizercontrols; - bool show; -protected: - int _propid; - -}; - +#include "wxMaracasIRMViewPanel.h" class creaMaracasVisu_EXPORT wxMaracasIRMView : public wxPanel -{ +{ public: wxMaracasIRMView( wxWindow* parent, std::string path); ~wxMaracasIRMView( ); - + static wxMaracasIRMView* getInstance(wxWindow* parent,std::string path=""); static wxMaracasIRMView* getInstance(); @@ -165,64 +77,35 @@ private: std::string _path; -}; - - + wxToolBar* _toolb; -class wxMaracasIRMViewProp3D : public wxMaracasIRMViewPanel{ -public: - wxMaracasIRMViewProp3D(wxWindow* parent, int propid); - ~wxMaracasIRMViewProp3D(); - virtual void createControls(); - void onOpacityRelease(wxScrollEvent& event ); - void onCheckBoxChange(wxCommandEvent& event); - void onColorChange(wxCommandEvent& event); - - -private: - wxCheckBox* checkbox; - wxSlider* opacity; - wxBitmapButton* _colorchoose; - - }; +class ToolBarEventHandler : public wxEvtHandler{ + public: + ToolBarEventHandler(); + ~ToolBarEventHandler(); + void onLoadImageFile(wxCommandEvent& event); -class wxMaracasIRMViewProp3DMHD : public wxMaracasIRMViewProp3D{ -public: - wxMaracasIRMViewProp3DMHD(wxWindow* parent, int propid); - ~wxMaracasIRMViewProp3DMHD(); - void onIsoValueRelease(wxScrollEvent& event ); - void createControls(int maxisovalue); - - -private: - wxSlider* isovalue; - int _propid; - -}; - - + private: + DECLARE_EVENT_TABLE() + }; class ToolBar : public wxToolBar{ -public: +public: ToolBar(wxWindow * parent,std::string iconsdir); ~ToolBar(void); - - - void onLoadImageFile(wxCommandEvent& event); - + + private: - + ToolBarEventHandler* _evthand; - -DECLARE_EVENT_TABLE() }; #endif