From Lavish Software Wiki
Jump to: navigation, search

LavishGUI 2 (LGUI2) interfaces are primarily composed of Text and Brushes which may involve images.

LGUI2's job is to arrange those pieces into a usable interface, in familiar ways. This is achieved with a variety of Elements that provide desirable arrangements, such as the stackpanel -- which places elements in a stack from left-to-right or top-to-bottom, or dockpanel which similarly can stack elements inward from its edges. Explicit positioning is also possible using X and Y properties, and with other elements such as the panel which does not automatically arrange elements.

An Element's size and position can also be specified as a factor to the parent's size, by specifying properties such as "xFactor" and "yFactor". The factor will be multiplied by the parent's size to come up with the new size or location. If both an X and an xFactor are specified, the two values are added together, making X an "offset" from xFactor.

Properties involved in LGUI2 layout are similar to those of the CSS Box Model, with some notable differences in their use. All LGUI2 elements have Margins and Padding, and most but not all LGUI2 elements have a Border. Margins are outside of an element's bounds, while Padding is inside of an element's bounds -- if an element has Width equal to 10, and Padding of 2 pixels on Left and Right, the element will use 6 pixels to display any inner content. This differs from the CSS model, where Padding and Borders are outside of the element's bounds along with the Margins.

Horizontal and vertical alignment properties further inform where an element will be arranged.

LGUI2 will automatically size elements where possible. Generally this means an element will adhere to exactly the size of its contents. Horizontal and vertical alignment properties may also stretch the element to fill its container, and minimum and maximum size values can be specified. Explicit sizing is possible using Width and Height properties.

LavishGUI 2 Topics

LavishGUI 2 Element Types