]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/buttonContainerController.h
Feature #1606 Add a new entry to ColorLayerImageView to select the fitting mode betwe...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / creaButtonContainer / controller / buttonContainerController.h
index cfda8efecb4c381679b17f3e429f52bf31776104..b240cb827c0cdacc1954aa11491f81d193f6cf96 100644 (file)
-/***************************************************************
- * Name:      @file buttonContainerController.h
- * Purpose:   @brief This fhile contains the ButtonContainerController Class
- * Author:    @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
- * Modified:  2011-05-09
- * Copyright: Diego CACERES (http://www.creatis.insa-lyon.fr/~caceres/)
- * License:
- **************************************************************/
+/*!
+ * @file buttonContainerController.h
+ * @brief Contains the ButtonContainerController class
+ * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
+ * @date  2011-06-02
+ */
 
 #ifndef BUTTONCONTAINERCONTROLLER_H_
 #define BUTTONCONTAINERCONTROLLER_H_
 
 #include <wx/event.h>
+#include <iostream>
+#include <exception>
 #include "buttonContainerPanel.h"
 
-///@namespace<creaButtonContainer>
+/*!    @namespace <creaButtonContainer>
+ *     @brief Contains the creaButtonContainer library included in creaMaracasVisu.
+ */
 namespace creaButtonContainer
 {
-       ///@namespace<view>
+       /*! @namespace <creaButtonContainer::view>
+        *      @brief Contains the implementation of the view in creaButtonContainer library.
+        *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
+        */
        namespace view
        {
                //Predefinition of ButtonContainerPanel FriendClass!!
-               ///@class ButtonContainerPanel buttonContainerPanel.h "buttonContainerPanel.h"
+               /*! @class ButtonContainerPanel 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 <a href="http://docs.wxwidgets.org/stable/wx_wxscrolledwindow.html">wxScrolledWindow</a>
+                */
                class ButtonContainerPanel;
        }
-       ///@namespace<controller>
+       /*!     @namespace<creaButtonContainer::controller>
+        *      @brief Contains the implementation of the controller in creaButtonContainer library.
+        *      @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
+        */
        namespace controller
        {
-               /*!@class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
-               *       @brief This class contains the ButtonContainerPanel controller
-               * This class describes the panel and button events.
-               */
+               /*! @class ButtonContainerController buttonContainerController.h "buttonContainerController.h"
+                *      @brief This class contains the ButtonContainerPanel controller.
+                *  @details This class describes the button events, it derives from wxEvtHandler.
+                *  @see <a href="http://docs.wxwidgets.org/stable/wx_wxevthandler.html">wxEvtHandler</a>
+                */
                class ButtonContainerController : public wxEvtHandler
                {
                        public:
-                               ///@typedef creaButtonContainer::view::ButtonGroup ButtonGroup
-                               ///@typedef typedef creaButtonContainer::view::GroupManager GroupManager;
-                               ///@typedef std::list< ButtonGroup* > ButtonGroupList;
-                               ///@typedef std::map< long, GroupManager* > GroupManagerList;
-                               ///@typedef wxFlexGridSizer Sizer;
-                               ///@typedef std::list< long > KeyList;
-                               ///@typedef creaButtonContainer::model::ContainerSettings ButtonGroupSettings;
-                               ///@typedef creaButtonContainer::view::ButtonContainerPanel BCPanel;
-                               //typedef definition
+                               //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:
-                               ///!The Parameterized Constructor
+                               // ----------------------------------------------------------------------------------
+                               /*!     @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 method connect every buttonEvents to the view.
+                                *      @exception std::bad_alloc
+                                */
                                void
                                AddEvents( );
+                               // ----------------------------------------------------------------------------------
+                               /*! @fn void ButtonExpEvent( wxCommandEvent& event );
+                                *      @brief This method 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 method calls the events of the buttonContainer buttons
+                                *      @exception std::bad_alloc
+                                *      @param event Button action event.
+                                */
                                void
                                ButtonEvent( wxCommandEvent& event );
+                               // ----------------------------------------------------------------------------------
                        private:
-                               BCPanel* m_BCPanel;
+                               BCPanel* m_BCPanel; //! <ButtonContainerPanel View pointer.
                };
        }//ecapsename
 }//ecapsename