]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.cxx
creaButtonContainer & creaPanelButtonContainer: Updates in doxygen documentation...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / groupManager.cxx
1 /*!
2  * @file groupManager.cxx
3  * @brief Implements the GroupManager class.
4  * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * @date  2011-06-02
6  */
7
8 #include "groupManager.h"
9
10 namespace creaButtonContainer
11 {
12         namespace view
13         {
14                 // ----------------------------------------------------------------------------------
15                 GroupManager::GroupManager( wxWindow* parent, ButtonGroup* buttonGroup ) :
16                         wxFlexGridSizer( 1, 0, 0, 0 )
17                 {
18                         this->m_IDExpButton = wxNewId( );
19                         this->m_ExpansionButton = new ExpansionButton( parent,
20                             this->m_IDExpButton, _("-"), wxDefaultPosition, wxSize( 20, 20 ), 0,
21                             wxDefaultValidator, _T("EXPBUTTON") );
22                         this->Add( m_ExpansionButton, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
23                         this->m_ButtonManager = new ButtonManager( buttonGroup );
24                         this->Add( this->m_ButtonManager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP,
25                             5 );
26                 }
27                 // ----------------------------------------------------------------------------------
28                 GroupManager::~GroupManager( )
29                 {
30                 }
31                 // ----------------------------------------------------------------------------------
32                 long
33                 GroupManager::GetButtonID( )
34                 {
35                         return ( this->m_IDExpButton );
36                 }
37                 // ----------------------------------------------------------------------------------
38                 GroupManager::ExpansionButton*
39                 GroupManager::GetButton( )
40                 {
41                         return ( this->m_ExpansionButton );
42                 }
43                 // ----------------------------------------------------------------------------------
44                 ButtonManager*
45                 GroupManager::GetButtonManager( )
46                 {
47                         return ( this->m_ButtonManager );
48                 }
49                 // ----------------------------------------------------------------------------------
50                 void
51                 GroupManager::SetButtonID( long id )
52                 {
53                         this->m_IDExpButton = id;
54                 }
55                 // ----------------------------------------------------------------------------------
56                 void
57                 GroupManager::SetButton( ExpansionButton* button )
58                 {
59                         this->m_ExpansionButton = button;
60                 }
61                 // ----------------------------------------------------------------------------------
62                 void
63                 GroupManager::SetButtonManager( ButtonManager* container )
64                 {
65                         this->m_ButtonManager = container;
66                 }
67                 // ----------------------------------------------------------------------------------
68                 void
69                 GroupManager::HideSubPanel( bool hide )
70                 {
71                         if ( hide == true )
72                         {
73                                 this->m_ButtonManager->HideButtonManager( );
74                         }//fi
75                         else
76                         {
77                                 this->m_ButtonManager->ShowButtonManager( );
78                         }//esle
79                 }
80         // ----------------------------------------------------------------------------------
81         }//ecapseman
82 }//ecapseman