Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cullable ¶
type Cullable interface { // param cullingArea The culling area in the child actor's coordinates. SetCullingArea(cullingArea *shape.Rectangle) }
Allows a parent to set the area that is visible on a child actor to allow the child to cull when drawing itself. This must only be used for actors that are not rotated or scaled. When Group is given a culling rectangle with {@link Group#setCullingArea(Rectangle)}, it will automatically call {@link #setCullingArea(Rectangle)} on its children.
type ILayout ¶
type ILayout interface { /** Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child, * calls {@link #invalidate()} any each child whose width or height has changed, and calls {@link #validate()} on each child. * This method should almost never be called directly, instead {@link #validate()} should be used. */ Layout() /** Invalidates this actor's layout, causing {@link #layout()} to happen the next time {@link #validate()} is called. This * method should be called when state changes in the actor that requires a layout but does not change the minimum, preferred, * maximum, or actual size of the actor (meaning it does not affect the parent actor's layout). */ Invalidate() /** Invalidates this actor and all its parents, calling {@link #invalidate()} on each. This method should be called when state * changes in the actor that affects the minimum, preferred, maximum, or actual size of the actor (meaning it it potentially * affects the parent actor's layout). */ InvalidateHierarchy() /** Ensures the actor has been laid out. Calls {@link #layout()} if {@link #invalidate()} has been called since the last time * {@link #validate()} was called, or if the actor otherwise needs to be laid out. This method is usually called in * {@link Actor#draw(Batch, float)} before drawing is performed. */ Validate() /** Sizes this actor to its preferred width and height, then calls {@link #validate()}. * <p> * Generally this method should not be called in an actor's constructor because it calls {@link #layout()}, which means a * subclass would have layout() called before the subclass' constructor. Instead, in constructors simply set the actor's size * to {@link #getPrefWidth()} and {@link #getPrefHeight()}. This allows the actor to have a size at construction time for more * convenient use with groups that do not layout their children. */ Pack() /** If true, this actor will be sized to the parent in {@link #validate()}. If the parent is the stage, the actor will be sized * to the stage. This method is for convenience only when the widget's parent does not set the size of its children (such as * the stage). */ SetFillParent(fillParent bool) /** Enables or disables the layout for this actor and all child actors, recursively. When false, {@link #validate()} will not * cause a layout to occur. This can be useful when an actor will be manipulated externally, such as with actions. Default is * true. */ SetLayoutEnabled(enabled bool) GetMinWidth() bool GetMinHeight() bool GetPrefWidth() bool GetPrefHeight() bool /** Zero indicates no max width. */ GetMaxWidth() bool /** Zero indicates no max height. */ GetMaxHeight() bool }
* Provides methods for an actor to participate in layout and to provide a minimum, preferred, and maximum size.
- @author Nathan Sweet
Click to show internal directories.
Click to hide internal directories.