Class wibox.container.constraint

Info:

  • Copyright: 2012 Lukáš Hrázký
  • Author: Lukáš Hrázký

Functions

constraint:get_children () Get the number of children element
constraint:set_children (children) Replace the layout children This layout only accept one children, all others will be ignored
constraint:reset () Reset this layout.
wibox.container.constraint ([widget[, strategy[, width[, height]]]]) Returns a new constraint container.

Object properties

wibox.container.constraint.widget The widget to be constrained.
wibox.container.constraint.strategy Set the strategy to use for the constraining.
wibox.container.constraint.height Set the maximum width to val.
wibox.container.constraint.width Set the maximum height to val.


Functions

constraint:get_children ()
Get the number of children element

Returns:

    table The children
constraint:set_children (children)
Replace the layout children This layout only accept one children, all others will be ignored
  • children table A table composed of valid widgets
constraint:reset ()
Reset this layout. The widget will be unreferenced, strategy set to "max" and the constraints set to nil.
wibox.container.constraint ([widget[, strategy[, width[, height]]]])
Returns a new constraint container. This container will constraint the size of a widget according to the strategy. Note that this will only work for layouts that respect the widget's size, eg. fixed layout. In layouts that don't (fully) respect widget's requested size, the inner widget still might get drawn with a size that does not fit the constraint, eg. in flex layout.
  • widget A widget to use.
  • strategy How to constraint the size. 'max' (default), 'min' or 'exact'.
  • width The maximum width of the widget. nil for no limit.
  • height The maximum height of the widget. nil for no limit.

Returns:

    table A new constraint container

Object properties

wibox.container.constraint.widget
The widget to be constrained.

Type:

wibox.container.constraint.strategy
Set the strategy to use for the constraining. Valid values are 'max', 'min' or 'exact'. Throws an error on invalid values.
wibox.container.constraint.height
Set the maximum width to val. nil for no width limit.

Type:

  • number
wibox.container.constraint.width
Set the maximum height to val. nil for no height limit.

Type:

  • number
generated by LDoc 1.4.2