}
void
- ButtonContainerSettings::AddButton( const BCSettingsStruct &info )
+ ButtonContainerSettings::AddButton( BCSettingsStruct* info )
{
//builds the button information
- info.panel->Show( false );
+ info->panel->Show( false );
ButtonPair* pair = new ButtonPair(
- new ButtonInfo( info.buttonName, info.iconpath ),
- new ActionButton( info.buttonDescription, info.panel ) );
+ new ButtonInfo( info->buttonName, info->iconpath ),
+ new ActionButton( info->buttonDescription, info->panel ) );
for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
!= this->m_GroupNameList.end( ); ++it )
{
- if ( ( *it ).compare( info.groupName ) == 0 )
+ if ( ( *it ).compare( info->groupName ) == 0 )
{
- this->m_ButtonGroupContainer[ info.groupName ].push_back( pair );
+ this->m_ButtonGroupContainer[ info->groupName ].push_back( pair );
return;
}//fi
}//rof
- this->m_GroupNameList.push_back( info.groupName );
- this->m_ButtonGroupContainer[ info.groupName ].push_back( pair );
+ this->m_GroupNameList.push_back( info->groupName );
+ this->m_ButtonGroupContainer[ info->groupName ].push_back( pair );
+ }
+
+ void
+ ButtonContainerSettings::AddButtons( BCSetListType infoList )
+ {
+ for( BCSetListType::iterator it = infoList.begin( ); it
+ != infoList.end( ); ++it )
+ {
+ BCSettingsStruct* info = *it;
+ this->AddButton( info );
+ }//rof
}
}//ecapseman
typedef std::list< std::string > KeyMapList;
typedef std::list< ButtonPair* > ButtonList;
typedef std::map< std::string, ButtonList > ButtonGroupMap;
+ typedef std::list< BCSettingsStruct* > BCSetListType;
class ButtonContainerSettings
{
public:
const std::string &iconpath, const std::string &buttonDescription,
PanelButton panel );
void
- AddButton( const BCSettingsStruct &info );
+ AddButton( BCSettingsStruct* info );
+
+ void
+ AddButtons( BCSetListType infoList );
private:
ButtonGroupMap m_ButtonGroupContainer;