#include <OpenGUI_Control.h>
Inheritance diagram for OpenGUI::Control:

Public Types | |
| enum | ControlSides { None = 0, Left = 1, Right = 1 << 1, Top = 1 << 2, Bottom = 1 << 3, All = Left | Right | Top | Bottom, Fill = All } |
| Values used by get/setDocking and get/setAnchor. More... | |
Public Member Functions | |
| Control () | |
| public constructor | |
| virtual | ~Control () |
| public destructor | |
| void | setLeft (float left) |
| Sets the position of the left side of the Control. | |
| float | getLeft () |
| Returns the position of the left side of the Control. | |
| void | setTop (float top) |
| Sets the position of the top side of the Control. | |
| float | getTop () |
| Returns the position of the top side of the Control. | |
| void | setWidth (float width) |
| Sets the width of the Control. | |
| float | getWidth () |
| Returns the width of the Control. | |
| void | setHeight (float height) |
| Sets the height of the Control. | |
| float | getHeight () |
| Returns the height of the Control. | |
| const FVector2 & | getPosition () |
| Returns the position of the upper left corner of the Control. | |
| FVector2 | getSize () |
| Returns the size of the Control. | |
| const FRect & | getRect () |
| Returns the FRect describing this Control's size and position. | |
| const FVector2 & | getMinimumSize () |
| Returns the minimum size this Control will allow itself to be resized to. | |
| void | setMinimumSize (const FVector2 &size) |
| Sets the minimum size this Control will allow itself to be resized to. | |
| const FVector2 & | getMaximumSize () |
| Returns the maximum size this Control will allow itself to be resized to. | |
| void | setMaximumSize (const FVector2 &size) |
| Sets the maximum size this Control will allow itself to be resized to. | |
| void | setVisible (bool visible) |
| Sets the visibility of this Control. | |
| bool | getVisible () |
| Returns the visibility of this Control. | |
| void | setAlpha (float alpha) |
| Sets the alpha transparency of this Control. | |
| float | getAlpha () |
| Returns the alpha transparency of this Control. | |
| virtual ObjectAccessorList * | getAccessors () |
| returns this object's ObjectAccessorList head | |
| virtual unsigned int | getObjectType () const |
| Returns an integer identifying the type of object. | |
| void | setDocking (int dockStyle) |
| Sets the docking preference for this Control. | |
| int | getDocking () |
| Gets the current docking preference for this Control. | |
| void | setAnchor (int anchoredSides) |
| Sets the anchored sides for this Control. | |
| int | getAnchor () |
| Gets the current anchored sides for this control. | |
| void | setMargin (float margin) |
| sets the margin of this Control | |
| float | getMargin () |
| gets the margin of this Control | |
| virtual bool | isInside (const FVector2 &position) |
| Returns true if the given point is inside this Widget. | |
Protected Member Functions | |
| void | setCursor (CursorPtr cursorPtr) |
| Sets the cursor displayed when the Screen cursor is over this Control. | |
| CursorPtr | getCursor () const |
| Gets the current cursor displayed when the Screen cursor is over this Control. | |
Event Injectors | |
| void | eventMoved (const FVector2 &oldPosition, const FVector2 &newPosition) |
| Control has been moved. | |
| void | eventResized (const FVector2 &oldSize, const FVector2 &newSize) |
| Control has been resized. | |
| void | eventTargeted () |
| Called when this Control is targeted, either by cursor or by menu navigation. | |
| void | eventUnTargeted () |
| Called when this Control is no longer targeted, either by cursor or by menu navigation. | |
Event Handlers | |
| virtual void | onMoved (Object *sender, Moved_EventArgs &evtArgs) |
| "Moved" event | |
| virtual void | onResized (Object *sender, Resized_EventArgs &evtArgs) |
| "Resized" event | |
| virtual void | onCursorMove (Object *sender, Cursor_EventArgs &evtArgs) |
| "CursorMove" event, consumes the event | |
| virtual void | onCursorPress (Object *sender, Cursor_EventArgs &evtArgs) |
| "CursorPress" event, consumes the event | |
| virtual void | onCursorRelease (Object *sender, Cursor_EventArgs &evtArgs) |
| "CursorRelease" event, consumes the event | |
| virtual void | onCursorEnter (Object *sender, EventArgs &evtArgs) |
| "CursorEnter" event | |
| virtual void | onCursorLeave (Object *sender, EventArgs &evtArgs) |
| "CursorLeave" event | |
| virtual void | onTargeted (Object *sender, EventArgs &evtArgs) |
| "Targeted" event | |
| virtual void | onUnTargeted (Object *sender, EventArgs &evtArgs) |
| "UnTargeted" event | |
|
|
Values used by get/setDocking and get/setAnchor.
|
|
|
public constructor
|
|
|
public destructor
|
|
||||||||||||
|
Control has been moved.
|
|
||||||||||||
|
Control has been resized.
|
|
|
Called when this Control is targeted, either by cursor or by menu navigation.
|
|
|
Called when this Control is no longer targeted, either by cursor or by menu navigation.
|
|
|
returns this object's ObjectAccessorList head
Reimplemented from OpenGUI::Widget. Reimplemented in OpenGUI::ContainerControl, and OpenGUI::Window. |
|
|
Returns the alpha transparency of this Control.
|
|
|
Gets the current anchored sides for this control. Return value will be a bit mask comprised of values within ControlSides. |
|
|
Gets the current cursor displayed when the Screen cursor is over this Control.
|
|
|
Gets the current docking preference for this Control. Return value will be a single value within ControlSides. |
|
|
Returns the height of the Control.
|
|
|
Returns the position of the left side of the Control.
|
|
|
gets the margin of this Control
|
|
|
Returns the maximum size this Control will allow itself to be resized to.
|
|
|
Returns the minimum size this Control will allow itself to be resized to.
|
|
|
Returns an integer identifying the type of object.
Reimplemented from OpenGUI::Widget. Reimplemented in OpenGUI::ContainerControl, and OpenGUI::Window. |
|
|
Returns the position of the upper left corner of the Control.
|
|
|
Returns the FRect describing this Control's size and position.
|
|
|
Returns the size of the Control.
|
|
|
Returns the position of the top side of the Control.
|
|
|
Returns the visibility of this Control.
|
|
|
Returns the width of the Control.
|
|
|
Returns true if the given point is inside this Widget. Control implementation returns true if the point is within its rect, otherwise false.
Reimplemented from OpenGUI::Widget. |
|
||||||||||||
|
"CursorEnter" event
Reimplemented from OpenGUI::Widget. |
|
||||||||||||
|
"CursorLeave" event
Reimplemented from OpenGUI::Widget. |
|
||||||||||||
|
"CursorMove" event, consumes the event
Reimplemented from OpenGUI::Widget. Reimplemented in OpenGUI::ContainerControl, and OpenGUI::Window. |
|
||||||||||||
|
"CursorPress" event, consumes the event
Reimplemented from OpenGUI::Widget. Reimplemented in OpenGUI::ContainerControl. |
|
||||||||||||
|
"CursorRelease" event, consumes the event
Reimplemented from OpenGUI::Widget. Reimplemented in OpenGUI::ContainerControl. |
|
||||||||||||
|
"Moved" event Default is to do nothing |
|
||||||||||||
|
"Resized" event Default is to do nothing Reimplemented in OpenGUI::ContainerControl. |
|
||||||||||||
|
"Targeted" event Default is to do nothing |
|
||||||||||||
|
"UnTargeted" event Default is to do nothing |
|
|
Sets the alpha transparency of this Control. Alpha is clamped to 0.0f through 1.0f. Passing values outside of this range will result in alpha being set to either 0.0f or 1.0f, whichever is closer. The local Alpha setting is a value that is not automatically enforced before onDraw(), meaning that if a Control is going to obey its Alpha setting, it should push that setting to the Brush before performing its draw routines.
In the case of Controls that contain other Controls, Alpha of the parent is automatically applied to the children in a multiplicative fashion. In other words, if both the parent and child Controls are set to 50% alpha, at final output the parent will draw at 50% alpha, and the child will draw at 25% alpha. |
|
|
Sets the anchored sides for this Control.
Anchoring is a service provided by the container. During resizes the container will check all of its children for Anchor preference. The children can specify anchoring preference to any sides they wish, but at least one top/bottom and one left/right side must be specified at all times.
|
|
|
Sets the cursor displayed when the Screen cursor is over this Control.
|
|
|
Sets the docking preference for this Control. Docking is a service provided by the container. It
|
|
|
Sets the height of the Control. Controls cannot have a height less than 0.0f, so negative values are clamped to 0.0f. This function obeys the MinimumSize and MaximumSize properties, and the given size will be adjusted to fit within the constraints if applicable. |
|
|
Sets the position of the left side of the Control.
|
|
|
sets the margin of this Control The "margin" is the distance to stay away from sibling Controls' margins during automatic layouts. It is up to the control performing the layout operations to honor this value.
|
|
|
Sets the maximum size this Control will allow itself to be resized to. During this call the current size is tested against the new maximum size and calls to setWidth and setHeight may be invoked to bring the Controls size back into the allowed constraints. If the the maximum size is set smaller than the minimum size, the minimum size is adjusted to match the maximum size for any offending axis. If any axis == 0, that axis will be ignored in size tests. Negative values for an axis are illegal and are automatically assigned to 0. |
|
|
Sets the minimum size this Control will allow itself to be resized to. During this call the current size is tested against the new minimum size and calls to setWidth and setHeight may be invoked to bring the Controls size back into the allowed constraints. If the the minimum size is set larger than the maximum size, the maximum size is adjusted to match the minimum size for any offending axis. If any axis == 0, that axis will be ignored in size tests. Negative values for an axis are illegal and are automatically assigned to 0. |
|
|
Sets the position of the top side of the Control.
|
|
|
Sets the visibility of this Control.
|
|
|
Sets the width of the Control. Controls cannot have a width less than 0.0f, so negative values are clamped to 0.0f. This function obeys the MinimumSize and MaximumSize properties, and the given size will be adjusted to fit within the constraints if applicable. |