LGUI2:window

From Lavish Software Wiki
Revision as of 13:08, 4 July 2018 by Lax (talk | contribs) (Created page with "A LavishGUI 2 window is a headered Content Container element, where the header can be placed on an edge of the Content, and the Content is coll...")
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to navigation Jump to search

A LavishGUI 2 window is a headered Content Container element, where the header can be placed on an edge of the Content, and the Content is collapsible. A Window can be dragged and resized with the mouse.

Defining a window element

A window element is a Content Container with additional properties.

Window element properties
title An Element definition specifying the content to be placed in the titleBar
titleBar An Element definition specifying the container to place the header in
expanded A boolean value specifying whether the content is expanded (otherwise, it is collapsed)

Examples

From the lgui2eventargs examples
{
  "type": "window",
  "name": "demo window",
  "title": "My Window",
  "content": {
    "type": "button",
    "name": "myButton",
    "horizontalAlignment": "stretch",
    "verticalAlignment": "stretch",
    "content": "This is my button!",
    "eventHandlers": {
      "onMouseButtonMove": [ "method", "TestUIController", "Test_OnMouseButtonMove" ],
      "onButtonMove": [ "method", "TestUIController", "Test_OnButtonMove" ],
      "onDpadMove": [ "method", "TestUIController", "Test_OnDpadMove" ],
      "onAxisMove": [ "method", "TestUIController", "Test_OnAxisMove" ],
      "onMouseMove": [ "method", "TestUIController", "Test_OnMouseMove" ],
      "onMouseWheel": [ "method", "TestUIController", "Test_OnMouseWheel" ]
    }
  }
}