]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/groupManager.cxx
116d48df7fe1da2dc40554dee272770abcc08ae9
[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 //EED 20/01/2012  flag 02                       
19                         this->m_IDExpButton = wxNewId( );
20                         this->m_ExpansionButton = new ExpansionButton( parent, this->m_IDExpButton, _("-"), wxDefaultPosition, wxSize( 20, 20 ), 0, wxDefaultValidator, _T("EXPBUTTON") );
21                         this->Add( m_ExpansionButton, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
22                         this->m_ButtonManager = new ButtonManager( buttonGroup );
23                         this->Add( this->m_ButtonManager, 1, wxALL | wxALIGN_LEFT | wxALIGN_TOP, 5 );
24                 }
25                 
26                 // ----------------------------------------------------------------------------------
27                 GroupManager::~GroupManager( )
28                 {
29                 }
30                 
31                 // ----------------------------------------------------------------------------------
32                 long
33                 GroupManager::GetButtonID( )
34                 {
35                         return ( this->m_IDExpButton );
36                 }
37                 
38                 // ----------------------------------------------------------------------------------
39                 GroupManager::ExpansionButton*
40                 GroupManager::GetButton( )
41                 {
42                         return ( this->m_ExpansionButton );
43                 }
44                 
45                 // ----------------------------------------------------------------------------------
46                 ButtonManager*
47                 GroupManager::GetButtonManager( )
48                 {
49                         return ( this->m_ButtonManager );
50                 }
51                 
52                 // ----------------------------------------------------------------------------------
53                 void
54                 GroupManager::SetButtonID( long id )
55                 {
56                         this->m_IDExpButton = id;
57                 }
58                 
59                 // ----------------------------------------------------------------------------------
60                 void
61                 GroupManager::SetButton( ExpansionButton* button )
62                 {
63                         this->m_ExpansionButton = button;
64                 }
65                 
66                 // ----------------------------------------------------------------------------------
67                 void
68                 GroupManager::SetButtonManager( ButtonManager* container )
69                 {
70                         this->m_ButtonManager = container;
71                 }
72                 
73                 // ----------------------------------------------------------------------------------
74                 void
75                 GroupManager::HideSubPanel( bool hide )
76                 {
77                         if ( hide == true )
78                         {
79                                 this->m_ButtonManager->HideButtonManager( );
80                         }//fi
81                         else
82                         {
83                                 this->m_ButtonManager->ShowButtonManager( );
84                         }//esle
85                 }
86         // ----------------------------------------------------------------------------------
87         }//ecapseman
88 }//ecapseman