Salome HOME
Issue #608: Usage of OCCT in interface -- Wrap classes by SWIG
[modules/shaper.git] / src / Config / Config_FeatureMessage.h
index 0cfe67defd21562858db600406824cc3b8e126d9..98201cf6f57d9c57f7349da91266acca706828d9 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D\r
+\r
 #ifndef CONFIG_MESSAGE_H\r
 #define CONFIG_MESSAGE_H\r
 \r
 \r
 #include <string>\r
 \r
-/// Event ID that feature is loaded (comes with Config_FeatureMessage)\r
-static const char * EVENT_FEATURE_LOADED = "FeatureLoaded";\r
-\r
-/*\r
- * Class to pass a feature entry extracted from xml file.\r
+/*!\r
+ * \class Config_FeatureMessage\r
+ * \ingroup Config\r
+ * \brief Class to pass a feature entry extracted from xml file.\r
  * Example of the feature entry:\r
+ * \code\r
  * <feature id="Part" text="New part" tooltip="Creates a new part" icon=":pictures/part_ico.png"/>\r
+ * \endcode\r
  */\r
 class Config_FeatureMessage : public Events_Message\r
 {\r
-  std::string myId;  //Feature unique id\r
-  std::string myText;  //Represents action's text\r
-  std::string myTooltip;  //Represents action's tooltip\r
-  std::string myIcon;  //Represents action's icon\r
-  std::string myKeysequence;  //Represents action's key sequence\r
+  std::string myId;  ///<Feature unique id\r
+  std::string myText;  ///<Represents action's text\r
+  std::string myTooltip;  ///<Represents action's tooltip\r
+  std::string myIcon;  ///<Represents action's icon\r
+  std::string myKeysequence;  ///<Represents action's key sequence\r
 \r
-  std::string myGroupId;  //Id of feature's group\r
-  std::string myWorkbenchId;  //Id of feature's workbench\r
-  std::string myPluginLibrary;  //Name of feature's library\r
+  std::string myGroupId;  ///<Id of feature's group\r
+  std::string myWorkbenchId;  ///<Id of feature's workbench\r
+  std::string myDocumentKind;  ///< kind of the document of the workbench (all documents if empty)\r
+  std::string myPluginLibrary;  ///<Name of feature's library\r
 \r
-  bool myUseInput;  //Action is being checked until user commit the operation\r
-  bool myInternal;  //Internal feature without GUI representation\r
-  std::string myNestedFeatures;\r
+  bool myUseInput;  ///<Action is being checked until user commit the operation\r
+  bool myInternal;  ///<Internal feature without GUI representation\r
+  std::string myNestedFeatures; ///<Space separated list of child features\r
+  std::string myActionsWhenNested; ///<Space separated list of actions\r
 \r
  public:\r
-  //const Events_ID theID, const void* theSender = 0\r
+  /// Event ID that feature is loaded in workbench (GUI)\r
+  inline static const char* GUI_EVENT()\r
+  {\r
+    static const char * MY_GUI_EVENT_ID("WorkshopFeatureLoaded");\r
+    return MY_GUI_EVENT_ID;\r
+  }\r
+  /// Event ID that feature is loaded in workbench (Model)\r
+  inline static const char* MODEL_EVENT()\r
+  {\r
+    static const char * MY_MODEL_EVENT_ID("ModelFeatureLoaded");\r
+    return MY_MODEL_EVENT_ID;\r
+  }\r
+\r
+  /// Constructs Config_FeatureMessage\r
   CONFIG_EXPORT Config_FeatureMessage(const Events_ID theId, const void* theParent = 0);\r
+  /// Deletes Config_FeatureMessage\r
   CONFIG_EXPORT virtual ~Config_FeatureMessage();\r
 \r
   //Auto-generated getters/setters\r
-  CONFIG_EXPORT const std::string& icon() const;\r
+  /// Feature's Id\r
   CONFIG_EXPORT const std::string& id() const;\r
+  /// Feature's Icon\r
+  CONFIG_EXPORT const std::string& icon() const;\r
+  /// Feature's shortcut\r
   CONFIG_EXPORT const std::string& keysequence() const;\r
+  /// Feature's text\r
   CONFIG_EXPORT const std::string& text() const;\r
+  /// Feature's tooltip\r
   CONFIG_EXPORT const std::string& tooltip() const;\r
+  /// Id of Feature's Group\r
   CONFIG_EXPORT const std::string& groupId() const;\r
+  /// Id of Feature's Workbench\r
   CONFIG_EXPORT const std::string& workbenchId() const;\r
+  /// Kind of a document which contains the feature\r
+  CONFIG_EXPORT const std::string& documentKind() const;\r
+  /// Name of a library which contains the feature\r
   CONFIG_EXPORT const std::string& pluginLibrary() const;\r
+  /// Space separated list of nested features\r
   CONFIG_EXPORT const std::string& nestedFeatures() const;\r
+  /// Space separated list of actions\r
+  CONFIG_EXPORT const std::string& actionsWhenNested() const;\r
+  /// If false - feature has no Property panel representation\r
   CONFIG_EXPORT bool isUseInput() const;\r
+  /// If true - feature will not be added into the workbench\r
   CONFIG_EXPORT bool isInternal() const;\r
 \r
-  CONFIG_EXPORT void setIcon(const std::string& icon);\r
+  ///Set feature's Id\r
   CONFIG_EXPORT void setId(const std::string& id);\r
+  ///Set feature's Icon\r
+  CONFIG_EXPORT void setIcon(const std::string& icon);\r
+  ///Set feature's shortcut\r
   CONFIG_EXPORT void setKeysequence(const std::string& keysequence);\r
+  ///Set feature's text\r
   CONFIG_EXPORT void setText(const std::string& text);\r
+  ///Set feature's tooltip\r
   CONFIG_EXPORT void setTooltip(const std::string& tooltip);\r
+  ///Set id of Feature's Group\r
   CONFIG_EXPORT void setGroupId(const std::string& groupId);\r
+  ///Set id of Feature's Workbench\r
   CONFIG_EXPORT void setWorkbenchId(const std::string& workbenchId);\r
+  ///Set kind of a document which contains the feature\r
+  CONFIG_EXPORT void setDocumentKind(const std::string& documentKind);\r
+  ///Set name of a library which contains the feature\r
   CONFIG_EXPORT void setPluginLibrary(const std::string& thePluginLibrary);\r
+  ///Set space separated list of nested features\r
   CONFIG_EXPORT void setNestedFeatures(const std::string& theNestedFeatures);\r
+  ///Set space separated list of nested features\r
+  CONFIG_EXPORT void setActionsWhenNested(const std::string& theActions);\r
+  ///Set use input state; If false - feature has no Property panel representation\r
   CONFIG_EXPORT void setUseInput(bool isUseInput);\r
+  ///Set internal state; If true - feature will not be added into the workbench\r
   CONFIG_EXPORT void setInternal(bool isInternal);\r
 };\r
 \r