/*! * @file buttonContainerController.h * @brief This contains the ButtonContainerController class * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) * @date 2011-05-19 */ #ifndef BUTTONCONTAINERCONTROLLER_H_ #define BUTTONCONTAINERCONTROLLER_H_ #include #include #include #include "buttonContainerPanel.h" /*! @namespace * @brief Contains the creaButtonContainer library included in creaMaracasVisu. */ namespace creaButtonContainer { /*! @namespace * @brief Contains the implementation of the view in creaButtonContainer library. * @see MVC Software Architecture */ namespace view { //Predefinition of ButtonContainerPanel FriendClass!! /*! @class ButtonContainerPanel : public wxScrolledWindow buttonContainerPanel.h "buttonContainerPanel.h" * @brief This class is the container of the creaButtonContainer. * @details This class derives from wxScrolledWindow and manages the view of the buttonContainer. * @see wxScrolledWindow */ class ButtonContainerPanel; } /*! @namespace * @brief Contains the implementation of the controller in creaButtonContainer library. * @see MVC Software Architecture */ namespace controller { /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h" * @brief This class contains the ButtonContainerPanel controller. * @details This class describes the button events, it derives from wxEvtHandler and it is the * controller in the MVC. * @see wxEvtHandler */ class ButtonContainerController : public wxEvtHandler { public: //typedef definitions /*! @typedef creaButtonContainer::view::ButtonGroup ButtonGroup * @brief Defines the ButtonGroup type */ typedef creaButtonContainer::view::ButtonGroup ButtonGroup; // ---------------------------------------------------------------------------------- /*! @typedef typedef creaButtonContainer::view::GroupManager GroupManager * @brief Defines the GroupManager type */ typedef creaButtonContainer::view::GroupManager GroupManager; // ---------------------------------------------------------------------------------- /*! @typedef std::list< ButtonGroup* > ButtonGroupList * @brief Defines the ButtonGroupList type */ typedef std::list< ButtonGroup* > ButtonGroupList; // ---------------------------------------------------------------------------------- /*! @typedef std::map< long, GroupManager* > GroupManagerList * @brief Defines the GroupManagerList type */ typedef std::map< long, GroupManager* > GroupManagerList; // ---------------------------------------------------------------------------------- /*! @typedef wxFlexGridSizer Sizer * @brief Defines the Sizer type */ typedef wxFlexGridSizer Sizer; // ---------------------------------------------------------------------------------- /*! @typedef std::list< long > KeyList * @brief Defines the KeyList type */ typedef std::list< long > KeyList; // ---------------------------------------------------------------------------------- /*! @typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings * @brief Defines the ButtonGroupSettings type */ typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings; // ---------------------------------------------------------------------------------- /*! @typedef creaButtonContainer::view::ButtonContainerPanel BCPanel * @brief Defines the BCPanel type */ typedef creaButtonContainer::view::ButtonContainerPanel BCPanel; //end of typedef definition public: // ---------------------------------------------------------------------------------- /*! @fn ButtonContainerController( BCPanel* ); * @brief This is the Parameterized constructor. * @param BCPanel* The connection with the view (wxPanel link). */ ButtonContainerController( BCPanel* ); // ---------------------------------------------------------------------------------- /*! @fn ~ButtonContainerController( ); * @brief This is the destructor. */ virtual ~ButtonContainerController( ); // ---------------------------------------------------------------------------------- /*! @fn void AddEvents( ); * @brief This function connect every buttonEvent to the view. * @exception std::bad_alloc */ void AddEvents( ); // ---------------------------------------------------------------------------------- /*! @fn void ButtonExpEvent( wxCommandEvent& event ); * @brief This function is the button group "+" "-" event. * @exception std::bad_alloc * @param event Button action event. */ void ButtonExpEvent( wxCommandEvent& event ); // ---------------------------------------------------------------------------------- /*! @fn void ButtonEvent( wxCommandEvent& event ); * @brief This function calls the events of the buttonContainer buttons * @exception std::bad_alloc * @param event Button action event. */ void ButtonEvent( wxCommandEvent& event ); // ---------------------------------------------------------------------------------- private: BCPanel* m_BCPanel; //!