]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMPackageManagerPanel.h
Feature #1711 CreaDevManager application implementation
[crea.git] / lib / creaDevManagerLib / wxCDMPackageManagerPanel.h
index 349e0d80665b1901cdc10f3624c99ebdbb95a040..245ebf9640a774a2dd1a3e5c323d38935f505467 100644 (file)
 #define WXCDMPACKAGEMANAGERPANEL_H_
 
 #include <creaWx.h>
-#include <wx/panel.h>
 #include <wx/hyperlink.h>
 #include <wx/event.h>
 
 #include "modelCDMProject.h"
 
-class wxCDMPackageManagerPanel : public wxPanel
+/**
+ * Package manager description panel. Shows the available packages in the project and the actions corresponding to package management.
+ */
+class wxCDMPackageManagerPanel : public wxScrolledWindow
 {
   DECLARE_EVENT_TABLE()
 public:
 
+  /**
+   * Package manager description panel Constructor.
+   * @param parent Parent window reference.
+   * @param project Project class reference.
+   * @param id Panel ID. By default -1.
+   * @param caption Panel label. By default "Description Frame".
+   * @param pos Panel position. By default wxDefaultPosition.
+   * @param size Panel size. By default wxDefaultSize.
+   * @param style Panel style. By default wxDEFAULT_FRAME_STYLE.
+   */
   wxCDMPackageManagerPanel(
       wxWindow* parent,
       modelCDMProject* project,
@@ -57,8 +69,21 @@ public:
       long style = wxDEFAULT_FRAME_STYLE
   );
 
+  /**
+   * Destructor.
+   */
   ~wxCDMPackageManagerPanel();
 
+  /**
+   * Package manager description panel Creator.
+   * @param parent Parent window reference.
+   * @param project Project class reference.
+   * @param id Panel ID. By default -1.
+   * @param caption Panel label. By default "Description Frame".
+   * @param pos Panel position. By default wxDefaultPosition.
+   * @param size Panel size. By default wxDefaultSize.
+   * @param style Panel style. By default wxDEFAULT_FRAME_STYLE.
+   */
   bool Create(
       wxWindow* parent,
       modelCDMProject* project,
@@ -69,20 +94,67 @@ public:
       long style = wxDEFAULT_FRAME_STYLE
   );
 
+  /**
+   * Creates all the controls in the panel (property and action controls).
+   */
   void CreateControls();
 
+  /**
+   * Retrieves the described project class reference.
+   * @return Project reference.
+   */
+  modelCDMProject* GetProject() const;
+
 private:
+  /**
+   * Project described.
+   */
   modelCDMProject* project;
 
   //handlers
 protected:
-  void OnBtnReturn(wxCommandEvent& event);
+  /**
+   * Handles when a return link is pressed.
+   * @param event Has the link reference to know where to return
+   */
+  void OnBtnReturn(wxHyperlinkEvent& event);
+  /**
+   * Handles when a package checkbox is (un)checked.
+   * @param event Has the link reference to know which package was selected.
+   */
+  void OnChBPackageChange(wxCommandEvent& event);
+  /**
+   * Handles when a packages link is pressed.
+   * @param event Has the link reference to know which package was selected.
+   */
   void OnLnkPackageSelect(wxHyperlinkEvent& event);
+  /**
+   * Handles when the create package button is pressed.
+   */
   void OnBtnCreatePackage(wxCommandEvent& event);
+  /**
+   * Handles when the open package cmakelists file button is pressed.
+   */
   void OnBtnEditCMakeLists(wxCommandEvent& event);
 
+  /**
+   * Handles when a package link is hovered.
+   * @param event Has the link reference to know which package was selected.
+   */
   void OnMouseEnter(wxMouseEvent& event);
+  /**
+   * Handles when a package link button finishes hover.
+   * @param event Has the link reference to know which package was selected.
+   */
   void OnMouseExit(wxMouseEvent& event);
+  /**
+   * Handles when the open cmakelists file button is hovered.
+   */
+  void OnCMakeMouseEnter(wxMouseEvent& event);
+  /**
+   * Handles when the open cmakelists file button finishes hover.
+   */
+  void OnCMakeMouseExit(wxMouseEvent& event);
 };
 
 #endif /* WXCDMPACKAGEMANAGERPANEL_H_ */