+ // ----------------------------------------------------------------------------------
+ void ButtonContainerSettings::AddButton(const StringType & groupName,
+ const StringType &buttonName, const wxBitmap &icon,
+ const StringType &buttonDescription, PanelButton panel)
+ {
+ try
+ {
+ //builds the button information
+ //I don't know the try catch doesn't work!!
+ if (panel == NULL)
+ {
+ std::cerr << "ButtonContainerSettings::AddButton"
+ << "exception: NULL Pointer in panel " << std::endl;
+ exit(1);
+ }
+
+ panel->Show(false);
+
+ ButtonPair* pair = new ButtonPair(new ButtonInfo(buttonName, icon),
+ new ActionButton(buttonDescription, panel));
+
+ for (KeyMapList::iterator it = this->m_GroupNameList.begin();
+ it != this->m_GroupNameList.end(); ++it)
+ {
+ if ((*it).compare(groupName) == 0)
+ {
+ this->m_ButtonGroupContainer[groupName].push_back(pair);
+ return;
+ } //fi
+ } //rof
+ this->m_GroupNameList.push_back(groupName);
+ this->m_ButtonGroupContainer[groupName].push_back(pair);
+ } //yrt
+ catch (const std::exception& e)
+ {
+ std::cerr
+ << "ButtonContainerSettings::AddButton( const StringType & groupName,"
+ << "const StringType &buttonName, const StringType &iconpath,"
+ << "const StringType &buttonDescription, PanelButton panel ) "
+ << "exception: " << e.what() << std::endl;
+ } //hctac
+ }
+
+ // ----------------------------------------------------------------------------------
+ void ButtonContainerSettings::AddButton(BCPSettingsStruct* info)
+ {
+ try
+ {
+ //builds the button information
+ //I don't know the try catch doesn't work!!
+ if (info->panel == NULL)
+ {
+ std::cerr << "ButtonContainerSettings::AddButton"
+ << "exception: NULL Pointer in panel " << std::endl;
+ exit(1);
+ }
+ info->panel->Show(false);
+ ButtonPair* pair = new ButtonPair(
+ new ButtonInfo(info->buttonName, info->icon),
+ 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)
+ {
+ 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);
+ } //yrt
+ catch (const std::exception& e)
+ {
+ std::cerr
+ << "ButtonContainerSettings::AddButton( BCPSettingsStruct* info )"
+ << "exception: " << e.what() << std::endl;
+ exit(1);
+ } //hctac
+ }
+
+ // ----------------------------------------------------------------------------------
+ void ButtonContainerSettings::InitModel(BCStructVectorType infoList, int type)