==================
Splitter (hwx.gui)
==================

A Splitter Widget.

A Splitter controls the relative size of the children widgets by
modifying the boundary between them.
Splitter widget allows to create and control a dynamic layout of resizeable and
collapsible panes. This can be useful when the areas that the splitter divides
have variable dimensions.

For example, the Demo dialog box shows a splitter
between the text edit area and the run edit. When the mouse pointer is located
in proximity of the splitter, it will change appearance.

Inherits:
  - :ref:`Widget (hwx.gui)`

----------
Properties
----------

  +---------------+---------------+---------------+
  | collapsible_  | opaqueResize_ | orientation_  |
  +---------------+---------------+---------------+
  | sizes_        |                               |
  +---------------+-------------------------------+

--------------
Public Methods
--------------

  +-------------------------------------+
  | addChildren_ (self, children)       |
  +-------------------------------------+
  | destroy_ (self)                     |
  +-------------------------------------+
  | enableGlobalActions_ (self, enable) |
  +-------------------------------------+
  | getMousePosition_ (self)            |
  +-------------------------------------+
  | getRelativeMousePosition_ (self)    |
  +-------------------------------------+
  | hide_ (self)                        |
  +-------------------------------------+
  | saveAsPng_ (self, fname)            |
  +-------------------------------------+
  | setF1HelpTopic_ (self, helptopic)   |
  +-------------------------------------+
  | setProperties_ (self, kwds)         |
  +-------------------------------------+
  | show_ (self)                        |
  +-------------------------------------+

----------------
Property Details
----------------

.. _collapsible:
.. property:: collapsible

Returns and sets if the children can be resized down to size 0.

.. _opaqueResize:
.. property:: opaqueResize

Updates the widgets when the side is being dragged.
    

.. _orientation:
.. property:: orientation

Specifies the orientation of the widget.
    

.. _sizes:
.. property:: sizes

A list of widths (horizontal) or heights(vertical) in pixels.

--------------
Method Details
--------------

.. _addChildren:
.. method:: addChildren(self, children)

Add child widgets/layouts into this widget.

Widget children get layed out using a VBoxLayout.

Typically, you'll pass the parent/children into the constructor instead of
calling this function directly.

:param children:
:type children: list[Widget] | Layout


.. _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.