X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConfig%2FConfig_WidgetAPI.h;h=a44ce55a42cae5ab7ee18d7469b7d7e6fdcb258e;hb=f2b824352efd1d87659563e3a9bfbaa53f0ec3a2;hp=ed58bb4f50b6ff05a0d8df052359280d4e979634;hpb=38afbd899a8645c83e17f2c24a17a2b7414911b4;p=modules%2Fshaper.git diff --git a/src/Config/Config_WidgetAPI.h b/src/Config/Config_WidgetAPI.h index ed58bb4f5..a44ce55a4 100644 --- a/src/Config/Config_WidgetAPI.h +++ b/src/Config/Config_WidgetAPI.h @@ -27,42 +27,57 @@ typedef xmlDoc *xmlDocPtr; struct _xmlDoc; //<< +/*! + * \class Config_WidgetAPI + * \ingroup Config + * \brief Provides low-level API for WidgetFactory for reading xml definitions of widgets + */ class CONFIG_EXPORT Config_WidgetAPI { public: virtual ~Config_WidgetAPI(); + //! Returns name of widget's node (attribute) std::string widgetType() const; + //! Returns true if widget has container type, which means it able to contain other widgets bool isContainerWidget() const; + //! Returns true if widget has page type; + //! Page is container widget with combo box control to switch between pages bool isPagedWidget() const; + //! Returns id of current widget std::string widgetId() const; + //! Returns icon of current widget std::string widgetIcon() const; + //! Returns text for label of current widget std::string widgetLabel() const; + //! Returns text for tooltip of current widget std::string widgetTooltip() const; - + //! Returns a custom property of current widget std::string getProperty(const char* thePropName) const; - /// Checks if the XML representation of widget has given attribute, - /// if yes - returns it's bool value, if no, or if the value can not - /// be converted to bool - returns theDefault. - /// \param theAttributeName attribute to check - /// \param theDefault default value on bad data - /// \return the boolean result + /*! Checks if the XML representation of widget has given attribute, + * if yes - returns it's bool value, if no, or if the value can not + * be converted to bool - returns theDefault. + * \param theAttributeName attribute to check + * \param theDefault default value on bad data + * \return the boolean result + */ bool getBooleanAttribute(const char* theAttributeName, bool theDefault) const; - bool isComputedDefault() const; - protected: /// These fields are accessible for ModuleBase_WidgetFactory only Config_WidgetAPI(std::string theRawXml); + //! Pass to the next (sibling) node of widget's xml definition. If impossible, returns false bool toNextWidget(); + //! Pass into the child node of widget's xml definition. If impossible, returns false bool toChildWidget(); + //! Pass into the parent node of widget's xml definition. If impossible, returns false bool toParentWidget(); private: - xmlDocPtr myDoc; - xmlNodePtr myCurrentNode; + xmlDocPtr myDoc; //!< Pointer to the root of widget's xml definition + xmlNodePtr myCurrentNode; //!< Pointer to the current node in the widget's xml definition friend class ModuleBase_WidgetFactory; };