Widget


Object Hierarchy:

Object hierarchy for Widget

Description:

public abstract class Widget : Object

The base class for all UI components.

Widgets are modeled after GTK (and other modern UI toolkits). Some of the layout properties should also be familiar to those that use CSS.

Each Widget is essentially three concentric rectangles.

+---------------------------------+
| margin |
| +---------border----------+ |
| | padding | |
| | +-----------------+ | |
| | | content | | |
| | +-----------------+ | |
| | | |
| +-------------------------+ |
| |
+---------------------------------+

The margin is used to control spacing between widgets. Nothing should be drawn in the margin. The border is optional and can also have rounded corners. The padding area should be filled with a background color unless the widget is "transparent". The actual graphical representation of the widget is drawn in the content area.

Widgets also have a preferred width and height that is used to help Containers layout child widgets. Widgets that can reflow their contents, such as widgets displaying text, can also provide a preferred width and height for a specified height or width respectively. A Container will try to make each widget at least the requested size. It may stretch the widget if needed but should not make it smaller that the requested size. If a Container does not have enough room for each widget to be at least the requested size, unexpected results my occur. In this case, you should consider using a Scroll Container.


Namespace: EV3devKit.UI
Package: ev3devkit

Content:

Properties:

Creation methods:

Methods:

Signals:

Fields:

Inherited Members:

All known members inherited from class GLib.Object