Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
PUXI.ICheckBoxOptions |
|
Extends
Members
-
Alpha of this widget & its contents.
-
This container holds the content of this widget. Subclasses should add renderable display-objects to this container.
-
Layout height of this widget's content, which is the height minus vertical padding.
-
Layout width of this widget's content, which is the width minus horizontal padding.
-
Layout height of this widget.
-
This container owns the background + content of this widget.
-
Whether this widget is interactive in the PixiJS scene graph.
-
Whether this widget is in focus.
-
layoutMeasure PUXI.Insets readonly inherited overrides
-
Layout insets of this widget. In normal state, the widget should be in this rectangle inside the parent reference frame.
-
The measured height that is used by the parent's layout manager to place this widget.
-
The measured width that is used by the parent's layout manager to place this widget.
-
Padding on bottom side.
-
Sum of left & right padding.
-
Padding on left side.
-
Padding on right side.
-
Padding on top side.
-
Sum of top & bottom padding.
-
stage PUXI.Stage readonly inherited overrides
-
Stage whose scene graph holds this widget. Once set, this cannot be changed.
-
tabGroup PUXI.TabGroup readonly inherited overrides
-
The name of the tab group in which this widget's focus will move on pressing tab.
-
-
widgetChildren Array.<PUXI.Widget> readonly inherited overrides
-
Children of this widget. Use
WidgetGroup
to position children. -
Layout width of this widget.
Methods
-
Adds the widgets as children of this one.
Name Type Description widgets
Array.<PUXI.Widget> repeatable Returns:
Type Description Widget - this widget
-
Brings this widget out of focus.
-
Makes this widget not
draggable
. -
Makes this widget not
droppable
. -
Brings this widget into focus.
-
Returns:
Type Description PIXI.Container - the background display-object
-
Returns:
Type Description number the alpha on the background display-object. -
Returns:
Type Description number the elevation set on this widget -
Alias for
Widget.measuredHeight
.Returns:
Type Description number the measured height -
Alias for
Widget.measuredWidth
.Returns:
Type Description number the measured width -
Widget initialization related to the stage. This method should always call
super.initialize()
.This method expects
stage
to be set before calling it. This is handled by theStage
itself.This will set
initialized
to true. If it was already set to true, it should do nothing. -
Makes this widget
draggable
. -
Makes this widget
droppable
. -
This method calls
Widget.onMeasure
and should not be overriden. It does internal bookkeeping.Name Type Description width
number height
number widthMode
PUXI.MeasureMode heightMode
PUXI.MeasureMode -
This method should set the frame in which rendering will occur and lay out child widgets in that frame.
Name Type Default Description l
t
r
b
dirty
true -
Override this method to measure the dimensions for your widget. By default, it will use the natural width/height of this widget's content (
contentContainer
) plus any padding.Name Type Description width
number width of region provided by parent
height
number height of region provided by parent
widthMode
PUXI.MeasureMode mode in which provided width is to be used
heightMode
PUXI.MeasureMode mode in which provided height is to be used
-
Orphans the widgets that are children of this one.
Name Type Description widgets
Array.<PUXI.Widget> repeatable Returns:
Type Description Widget - this widget
-
Will trigger a full layout pass next animation frame.
-
The background of a widget is a
PIXI.DisplayObject
that is rendered before all of its children.Name Type Description bg
PIXI.Container | number | string the background display-object or a color that will be used to generate a
PIXI.Graphics
as the background. -
This can be used to set the alpha on the background of this widget. This does not affect the widget's contents nor individual components of the background display-object.
Name Type Description val
number background alpha
-
This can be used add a drop-shadow that will appear to raise this widget by the given elevation against its parent.
Name Type Description val
number elevation to use. 2px is good for most widgets.
-
Use this to specify how you want to layout this widget w.r.t its parent. The specific layout options class depends on which layout you are using in the parent widget.
Name Type Description lopt
PUXI.LayoutOptions Returns:
Type Description Widget this -
Sets the padding values.
To set all paddings to one value:
widget.setPadding(8);
To set horizontal & vertical padding separately:
widget.setPadding(4, 12);
Name Type Default Description l
number 0 optional left padding
t
number l optional top padding (default is equal to left padding)
r
number l optional right padding (default is equal to right padding)
b
number t optional bottom padding (default is equal to top padding)