Box style
From TargetWiki
A box style object is used by a widget style to draw portions of a widget on screen. A box style defines nine texture objects that will be used to draw each of the nine areas of a box:
- Top Left
- Top
- Top Right
- Left
- Middle
- Right
- Bottom Left
- Bottom
- Bottom Right
A box style also defines the width of each of the frames, in pixels. The size of the box, when actually drawn on screen, is determined by the widget style using the box.
Since a box style is a Lua object, calls should use the object:function() syntax. Also, all Lua object functions can also be called on a box style.
[edit]
Functions
- get( <area> )
- This returns the texture object used to draw the given area of the box. The area must be one of these values:
- gui.topleft
- gui.top
- gui.topright
- gui.left
- gui.middle
- gui.right
- gui.bottomleft
- gui.bottom
- gui.bottomright
- leftframe()
- This returns the width of the left frame of the box, in pixels.
- setleftframe( <width> )
- This sets the width of the left frame of the box, in pixels.
- rightframe()
- This returns the width of the right frame of the box, in pixels.
- setrightframe( <width> )
- This sets the width of the right frame of the box, in pixels.
- topframe()
- This returns the width of the top frame of the box, in pixels.
- settopframe( <width> )
- This sets the width of the top frame of the box, in pixels.
- bottomframe()
- This returns the width of the bottom frame of the box, in pixels.
- setbottomframe( <width> )
- This sets the width of the bottom frame of the box, in pixels.
Categories: Lua | GUI
