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