================ Widget (hwx.gui) ================ Abstract base class for all widgets. ---------- Properties ---------- +------------------+------------------+------------------+ | active_ | advancedTooltip_ | children_ | +------------------+------------------+------------------+ | command_ | descendents_ | enabled_ | +------------------+------------------+------------------+ | font_ | height_ | layout_ | +------------------+------------------+------------------+ | maximumHeight_ | maximumWidth_ | minimumHeight_ | +------------------+------------------+------------------+ | minimumWidth_ | name_ | parent_ | +------------------+------------------+------------------+ | size_ | tooltip_ | value_ | +------------------+------------------+------------------+ | visible_ | width_ | | +------------------+------------------+------------------+ -------------- Public Methods -------------- +-------------------------------------+ | destroy_ (self) | +-------------------------------------+ | enableGlobalActions_ (self, enable) | +-------------------------------------+ | getMousePosition_ (self) | +-------------------------------------+ | getRelativeMousePosition_ (self) | +-------------------------------------+ | hide_ (self) | +-------------------------------------+ | saveAsPng_ (self, fname) | +-------------------------------------+ | setF1HelpTopic_ (self, helptopic) | +-------------------------------------+ | setProperties_ (self, kwds) | +-------------------------------------+ | show_ (self) | +-------------------------------------+ ---------------- Property Details ---------------- .. _active: .. method:: active Returns True if it is visible and enabled, False otherwise. (readonly property) .. _advancedTooltip: .. method:: advancedTooltip The advanced tooltip that appears while hovering mouse over widget. .. _children: .. method:: children All widgets immediately contained by this one. .. _command: .. method:: command Method called when the widget is activated or changed. .. _descendents: .. method:: descendents All the widgets ultimately contained by this one. .. _enabled: .. method:: enabled The availability of the widget. Disabled widgets are greyed out and don't respond to input events. .. _font: .. method:: font The font used in this widget (set with font or dict). .. _height: .. method:: height Fixed height of the widget. .. _layout: .. method:: layout The layout that contains this widget's children. .. _maximumHeight: .. method:: maximumHeight The maximum allowable height inside the Layout. .. _maximumWidth: .. method:: maximumWidth The maximum allowable width inside the Layout. .. _minimumHeight: .. method:: minimumHeight The smallest allowable height inside the Layout. .. _minimumWidth: .. method:: minimumWidth The smallest allowable width inside the Layout. .. _name: .. method:: name The unique identifier within a container. .. _parent: .. method:: parent The container that owns this widget. .. _size: .. method:: size The fixed size of the widget (width, height). .. _tooltip: .. method:: tooltip The tooltip that appears while hovering mouse over widget. .. _value: .. method:: value The value of the widget. .. _visible: .. method:: visible The visibility of the widget. .. _width: .. method:: width The fixed width of the widget. If a string or list of strings are specified, the width will be calculated from the longest string given the font. -------------- Method Details -------------- .. _destroy: .. method:: destroy(self) Deletes this and all its children. .. _enableGlobalActions: .. method:: enableGlobalActions(self, enable) Sets the state of Global Actions. Disable the global actions to get key events. :param enable: Determines whether to enable or disable global actions. :type enable: bool .. _getMousePosition: .. method:: getMousePosition(self) Returns the mouse position. .. _getRelativeMousePosition: .. method:: getRelativeMousePosition(self) Returns the mouse position relative to this widget. .. _hide: .. method:: hide(self) Hides the widget. .. _saveAsPng: .. method:: saveAsPng(self, fname) Saves the widget as a .png file. :param fname: The file name for the .png :type fname: str :returns: True if it was saved succesfully, False otherwise. :rtype: bool .. _setF1HelpTopic: .. method:: setF1HelpTopic(self, helptopic) Popup web-browser helps when the user hits F1 when over this. :param helptopic: Topic name user needs help in. :type helptopic: str .. _setProperties: .. method:: setProperties(self, kwds) Internal method called from constructors. .. _show: .. method:: show(self) Shows the widget.