C++ GUI Library

class gui::window_base

Implementations of the window widget are derived from window_base, which acts as an interface to the publicly accessible functionality of a window.

set_parent(boost::shared_ptr< window_base > w)=0

Re-parent this window. Windows may form a parent-child hierarchy; it is recommended that child windows always display on top of their parents. Must not throw.

title(const char *title)=0

Set the window title. The title parameter is a UTF8-encoded null-terminated string. It is not specified how the window title should be displayed to the user.

contain(boost::shared_ptr< widget_base > child)=0

Set the child widget for this window. Each window must contain zero or one children. The child widget must be resized to fill the entire client region of the window, less any padding that has been specified. The implementation may raise a std::bad_cast exception if the child parameter refers to a window widget. When the child is set or changed, the window should query the child as to its minimum space requirements, and grow if necessary to accomodate them.

allow_resize(bool possible)=0

Specifies whether the window should be resizable by the user. Initially the window should be assumed to be resizable. When there is a transition from being allowed to resize to not being allowed to resize, the window should re-calculate its layout, and resize to optimum dimensions.

set_padding(int size)=0

Set the padding width between the border of the window and its child. This width is currently specified in pixels, but this will most likely be changed to a more suitable unit, such as ems.