]> Creatis software - bbtkGEditor.git/commitdiff
A little change to toogle one button in the toolbar
authorcorredor <>
Wed, 12 May 2010 16:35:26 +0000 (16:35 +0000)
committercorredor <>
Wed, 12 May 2010 16:35:26 +0000 (16:35 +0000)
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h
lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h

index 0431d7eedd70edace32af53d580a924fa8838325..7b539777420bbc7e70f2178227826a5988db5801 100644 (file)
@@ -138,6 +138,7 @@ namespace bbtk
        const int ID_RUN = 1003;
        const int ID_DELETEALL = 1004;
        const int ID_CENTERVIEW = 1005;
+       const int ID_BTNCOMPLEXBOX = 1006;
 
        const int wxID_NOTEBOOK = 1010;
 }
index 9fd1e7cdda6f1239a074209b360f666b7acd476b..2b081d8f4b49c45b1c4f9acb7b3d4c1d44a56859 100644 (file)
@@ -72,7 +72,7 @@ namespace bbtk
        wxVtkSceneManager::~wxVtkSceneManager()
        {
        }
-
        //=========================================================================
 
        void wxVtkSceneManager::configureBaseView()
index 35c4e77cf7c07ad4bb18da7296232982a9863815..5a7d8311bb0f1f956b185f8d5e5c7c772ad9c385 100644 (file)
@@ -92,20 +92,22 @@ namespace bbtk
                wxBitmap bmp_delete(delete_xpm);
                wxBitmap bmp_centerview(centerview_xpm);
 
-               wxToolBar  *_toolbar = new wxToolBar(this, wxID_ANY);
+               wxToolBar  *toolbar = new wxToolBar(this, wxID_ANY);
 
                //Adds a tool btn to the toolbar
-               _toolbar->AddTool(ID_NEW,_T("New"),bmp_new, wxNullBitmap, wxITEM_NORMAL,_T("New tab"), _T("Create a new panel tab"));
-               _toolbar->AddTool(ID_OPEN,_T("Open diagram"),bmp_open, wxNullBitmap, wxITEM_NORMAL,_T("Open a diagram"), _T("Open a diagram"));
-               _toolbar->AddTool(ID_SAVE,_T("Save diagram"),bmp_save, wxNullBitmap, wxITEM_NORMAL,_T("Saves actual diagram"), _T("Saves actual diagram"));
-               _toolbar->AddTool(ID_RUN,_T("Run"),bmp_run, wxNullBitmap, wxITEM_NORMAL,_T("Execute actual diagram"), _T("Execute actual diagram"));
-               _toolbar->AddTool(ID_DELETEALL,_T("Delete all"),bmp_delete, wxNullBitmap, wxITEM_NORMAL,_T("Delete all boxes"), _T("Delete all boxes"));
-               _toolbar->AddTool(ID_CENTERVIEW,_T("Center view"),bmp_centerview, wxNullBitmap, wxITEM_NORMAL,_T("Center view"), _T("Center view"));
+               toolbar->AddTool(ID_NEW,_T("New"),bmp_new, wxNullBitmap, wxITEM_NORMAL,_T("New tab"), _T("Create a new panel tab"));
+               toolbar->AddTool(ID_OPEN,_T("Open diagram"),bmp_open, wxNullBitmap, wxITEM_NORMAL,_T("Open a diagram"), _T("Open a diagram"));
+               toolbar->AddTool(ID_SAVE,_T("Save diagram"),bmp_save, wxNullBitmap, wxITEM_NORMAL,_T("Saves actual diagram"), _T("Saves actual diagram"));
+               toolbar->AddTool(ID_RUN,_T("Run"),bmp_run, wxNullBitmap, wxITEM_NORMAL,_T("Execute actual diagram"), _T("Execute actual diagram"));
+               toolbar->AddTool(ID_DELETEALL,_T("Delete all"),bmp_delete, wxNullBitmap, wxITEM_NORMAL,_T("Delete all boxes"), _T("Delete all boxes"));
+               toolbar->AddTool(ID_CENTERVIEW,_T("Center view"),bmp_centerview, wxNullBitmap, wxITEM_NORMAL,_T("Center view"), _T("Center view"));
+               toolbar->AddSeparator();
+               toolbar->AddTool(ID_BTNCOMPLEXBOX,_T("Complex box"),bmp_centerview, wxNullBitmap, wxITEM_NORMAL,_T("Complex box"), _T("Complex box"));
+               toolbar->SetToggle(ID_BTNCOMPLEXBOX,true);
                
-
-               _toolbar->SetMargins( 2, 2 );
-               _toolbar->Realize();
-               SetToolBar(_toolbar);
+               toolbar->SetMargins( 2, 2 );
+               toolbar->Realize();
+               SetToolBar(toolbar);
 
                // connect command event handlers
                Connect(ID_NEW,wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnCreateNewTab));
@@ -114,6 +116,7 @@ namespace bbtk
                Connect(ID_RUN,wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnExecuteActualDiagram));
                Connect(ID_DELETEALL,wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnDeleteAllBoxesActualDiagram));
                Connect(ID_CENTERVIEW,wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnCenterViewActualDiagram));
+               Connect(ID_BTNCOMPLEXBOX,wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnActivateComplexBox));
 
        }
        //=========================================================================
@@ -437,6 +440,13 @@ namespace bbtk
                }
        }
 
+       //=========================================================================
+
+       void wxGUIEditorGraphicBBS::OnActivateComplexBox(wxCommandEvent& event)
+       {               
+       }
+       
+
        //=========================================================================
 
        void wxGUIEditorGraphicBBS::OnExit(wxCommandEvent& event)
index 0945a49611e9e32a5d45009ebcb2201e6b2b2699..aa8ad2a54109681ae3a6d5b9745bf0459f4f9f94 100644 (file)
@@ -118,6 +118,7 @@ namespace bbtk
                void OnExecuteActualDiagram(wxCommandEvent& event);
                void OnDeleteAllBoxesActualDiagram(wxCommandEvent& event);
                void OnCenterViewActualDiagram(wxCommandEvent& event);
+               void OnActivateComplexBox(wxCommandEvent& event);
                void OnExit(wxCommandEvent& event);