]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/src/buttonGroup.cxx
Diego Caceres: creaButtonContainer and creaPanelButtonContainer has been added to...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / view / src / buttonGroup.cxx
1 /***************************************************************
2  * Name:      ButtonGroup.cxx
3  * Purpose:   Implements ButtonGroup.h
4  * Author:    Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
5  * Modified:  2011-05-09
6  * Copyright: Diego CACERES (http://www.creatis.insa-lyon.fr/~caceres/)
7  * License:
8  **************************************************************/
9
10 #include "buttonGroup.h"
11
12 namespace creaButtonContainer
13 {
14         namespace view
15         {
16                 /*typedef creaButtonContainer::view::Button Button;
17                 typedef std::map< long, Button* > ButtonContainer;
18                 typedef std::list< long > IdButtonContainer;*/
19                 //--------------------------------------------------
20                 ButtonGroup::ButtonGroup( wxStaticText* groupName,
21                     ButtonContainer cartoButtons )
22                 {
23                         this->m_GroupName = groupName;
24                         this->m_Buttons = cartoButtons;
25
26                 }
27                 //--------------------------------------------------
28                 ButtonGroup::~ButtonGroup( )
29                 {
30                 }
31                 //--------------------------------------------------
32                 ButtonContainer
33                 ButtonGroup::GetButtonContainer( )
34                 {
35                         return ( this->m_Buttons );
36                 }
37                 //--------------------------------------------------
38                 wxStaticText*
39                 ButtonGroup::GetGroupName( )
40                 {
41                         return ( this->m_GroupName );
42                 }
43                 //--------------------------------------------------
44                 IdButtonContainer
45                 ButtonGroup::GetButtonIdContainer( )
46                 {
47                         IdButtonContainer idContainer;
48                         for( ButtonContainer::iterator it = this->m_Buttons.begin( ); it
49                             != this->m_Buttons.end( ); ++it )
50                                 idContainer.push_back( (*it).first );
51                         return ( idContainer );
52                 }
53                 //--------------------------------------------------
54                 Button*
55                 ButtonGroup::GetButton( long id )
56                 {
57                         return( this->m_Buttons[id] );
58                 }
59
60         }//ecapseman
61 }//ecapseman