Widget window

Window widget.

Set properties of the window with this widget's attributes. This widget should only be used as the root widget of a layout.

Usage:

    -- create a new window
    local window = Layout {
        type = 'window',
        icon = 'logo.png',
        text = 'Window Example',
        width = 800,
        height = 600,
        { icon = 'logo.png', text = 'Window Example', align = 'middle center' },
        { type = 'panel', flow = 'x', height = 'auto',
            {}, -- spacer
            { type = 'button', id = 'quitButton', text = 'Quit' }
        }
    }
    
    -- handle quit button
    window.quitButton:onPress(function ()
        os.exit()
    end)
    
    -- show the window
    window:show()

Special Attributes

maximized Maximized.
minimized Minimized.
borderless Borderless.
fullscreen Fullscreen.
grab Mouse grab.
icon Window icon.
maxwidth Maximum width of the window's client area.
maxheight Maximum height of the window's client area.
minwidth Minimum width of the window's client area.
minheight Minimum height of the window's client area.
top Position of the window's top edge.
left Position of the window's left edge.
width Width of the window's content area.
height Height of the window's content area.
title Title of the window.

Special Attributes

maximized
Maximized. Set to true to make the window as large as possible. Set to false to restore the size and position.
minimized
Minimized. Set to true to minimize the window to an iconic representation. Set to false to restore the size and position.
borderless
Borderless. Set to true or false to change the border state of the window. You can't change the border state of a fullscreen window.
fullscreen
Fullscreen. Set to true or false to change the fullscreen state of the window.
grab
Mouse grab. Set to true or false to change the window's input grab mode. When input is grabbed the mouse is confined to the window.

If the caller enables a grab while another window is currently grabbed, the other window loses its grab in favor of the caller's window.

icon
Window icon. Should be a string containing a path to an image.
maxwidth
Maximum width of the window's client area.
maxheight
Maximum height of the window's client area.
minwidth
Minimum width of the window's client area.
minheight
Minimum height of the window's client area.
top
Position of the window's top edge.
left
Position of the window's left edge.
width
Width of the window's content area.
height
Height of the window's content area.
title
Title of the window.
generated by LDoc 1.4.3 Last updated 2015-12-17 04:20:17