This reference page is linked to from the following overview topics: Major New Features, SDK Change Details, Caddy Controls.
The interface to the functionality for using the Grip Manager.
This class contains key functionality for using grips. It contains functionality for setting which grip is active in addition to various options for how grips are displayed and manipulated. You get this interface by calling GetIGripManager(). This class is created by the system.
#include <igrip.h>
Public Member Functions |
|
virtual void | RecalcLayout ()=0 |
Function to recalculate the layout and
position of all of the grip items. |
|
Enable/Disable
|
|
virtual void | SetGripActive (IBaseGrip *grip)=0 |
Make the grip active and show it. |
|
virtual void | SetGripsInactive ()=0 |
Inactivate the current active grip. |
|
virtual IBaseGrip * | GetActiveGrip ()=0 |
Get the current active grip. |
|
Grip Item
|
|
virtual bool | ActivateGripItem (int whichItem, bool active)=0 |
Set whether or not a particular grip item of
the active grip will be activated or not. |
|
virtual bool | IsGripItemActive (int whichItem)=0 |
Get whether or not a particular grip item of
the active grip is active or not. |
|
virtual bool | HideGripItem (int whichItem, bool hide)=0 |
Set whether or not a particular grip item of
the active grip will be visible or not. |
|
virtual bool | IsGripItemVisible (int whichItem)=0 |
Get whether or not a particular grip item of
the active grip is visible or not. |
|
ResetUI
|
|
virtual bool | ResetGripUI (int whichItem)=0 |
Tell that grip item it should reset its UI,
usually since some value has changed and needs to get refleced in
the UI. |
|
virtual void | ResetAllUI ()=0 |
Convienence function to reset all of a
grip's UI. |
|
Show
|
|
virtual void | SetShow (bool val)=0 |
Show grips. |
|
virtual bool | GetShow () const =0 |
Get if grips are shown. |
|
Grip Placement
|
|
virtual void | GetXYLocation (float &x, float &y)=0 |
Get the location of the grip in screen
space. |
|
virtual void | SetLocation (int x, int y)=0 |
Set the location of the grip in screen
space. |
|
virtual void | SetCenterOnSelected (bool val)=0 |
Set whether or not the grip stays centered
around the current selection gizmo. |
|
virtual bool | GetCenterOnSelected () const =0 |
Get whether or not the grip stays centered
around the current selection gizmo. |
|
virtual void | SetCenterXYPos (float x, float y)=0 |
Set the normalized x and y location of the
grip in the active viewport. |
|
virtual float | GetCenterYPos () const =0 |
Get the normalized y location of the grip in
the active viewport. |
|
virtual float | GetCenterXPos () const =0 |
Get the normalized x location of the grip in
the active viewport. |
|
virtual void | SetSelectedOffsetXY (int offsetPixelX, int offsetPixelY)=0 |
Set the x and y pixel offset from the
current selection gizmo where the grip will get placed. |
|
virtual int | GetSelectedOffsetX () const =0 |
Get the x pixel offset from the current
selection gizmo where the grip will get placed. |
|
virtual int | GetSelectedOffsetY () const =0 |
Get the y pixel offset from the current
selection gizmo where the grip will get placed. |
|
Transparency
|
|
virtual void | SetTransparency (float val)=0 |
Set the transparency of the grip items in
the viewport. |
|
virtual float | GetTransparency () const =0 |
Get the transparency of the grip items in
the viewport. |
|
virtual void | SetHoverTransparency (float val)=0 |
Set the hover transparency of the grip items
in the viewport. |
|
virtual float | GetHoverTransparency () const =0 |
Get the hover transparency of the grip items
in the viewport. |
|
Widget Spacing
|
|
virtual void | SetWidgetSpacing (float spacing)=0 |
Set the spacing in pixels between the main
grip UI elements. |
|
virtual float | GetWidgetSpacing () const =0 |
Get the spacing in pixels between the main
grip UI elements. |
|
GripChangedCallback
|
|
virtual void | RegisterGripChangedCallback (GripChangedCallback *cB)=0 |
Register a callback that will get called
when the active grip changes. |
|
virtual void | UnRegisterGripChangedCallback (GripChangedCallback *cB)=0 |
Unregister the grip changed ballback.
|
virtual void SetGripActive | ( | IBaseGrip * | grip | ) | [pure virtual] |
Make the grip active and show it.
[in] | grip | The grip that will turn active and have its UI displayed. If another grip was active, that grip becomes inactive. Only one grip may be active at a time. If the value is NULL this functions acts like SetGripsInactive. |
virtual void SetGripsInactive | ( | ) | [pure virtual] |
Inactivate the current active grip.
If no grip is active, nothing happens.
virtual IBaseGrip* GetActiveGrip | ( | ) | [pure virtual] |
Get the current active grip.
virtual bool ActivateGripItem | ( | int | whichItem, |
bool | active | ||
) | [pure virtual] |
Set whether or not a particular grip item of the active grip will be activated or not.
By default, all grip items are activated and interactive.
[in] | whichItem | The zero based index for the item for which we will be activate or not. If out of range of the number of grip items, on the active grip this function will do nothing. |
[in] | active | If true the item is active and can get manipulated, if false, the item is disabled and greyed out in the viewport. |
virtual bool IsGripItemActive | ( | int | whichItem | ) | [pure virtual] |
Get whether or not a particular grip item of the active grip is active or not.
[in] | whichItem | The zero based index for the item for which we are checking to see if it's active or not. |
virtual bool HideGripItem | ( | int | whichItem, |
bool | hide | ||
) | [pure virtual] |
Set whether or not a particular grip item of the active grip will be visible or not.
By default, all grip items are visible.
[in] | whichItem | The zero based index for the item for which we will display or hide. If out of range of the number of grip items, on the active grip this function will do nothing. |
[in] | hide | If true the item is hidden and is not displayed, if false, the item is displayed. Note that by default all grip items are visible. Note in order to see the change in the UI, you must call ResetAllGripUI(). |
virtual bool IsGripItemVisible | ( | int | whichItem | ) | [pure virtual] |
Get whether or not a particular grip item of the active grip is visible or not.
[in] | whichItem | The zero based index for the item for which we are checking to see if it's visible. |
virtual bool ResetGripUI | ( | int | whichItem | ) | [pure virtual] |
Tell that grip item it should reset its UI, usually since some value has changed and needs to get refleced in the UI.
When called that item will call the necessary IBaseGrip functions, such as GetValue, to reset and recreate the UI,
[in] | whichItem | The zero based index for the item for which needs to reset its UI. |
virtual void ResetAllUI | ( | ) | [pure virtual] |
Convienence function to reset all of a grip's UI.
Resetting the UI will cause the system to get the various values from each grip item.
virtual void SetShow | ( | bool | val | ) | [pure virtual] |
Show grips.
By default grips are shown when one is active.
[in] | val | If true grips will be shown, if false no grips will be shown even if active. |
virtual bool GetShow | ( | ) | const [pure virtual] |
Get if grips are shown.
virtual void GetXYLocation | ( | float & | x, |
float & | y | ||
) | [pure virtual] |
Get the location of the grip in screen space.
[out] | x | The x location of the grip in screen space. |
[out] | y | The y location of the grip in screen space. |
virtual void SetLocation | ( | int | x, |
int | y | ||
) | [pure virtual] |
Set the location of the grip in screen space.
[in] | x | The x location of the grip in screen space that you want the grip's upper right corner to be placed. |
[in] | y | The y location of the grip in screen space that you want the grip's upper right corner to be placed. |
virtual void SetCenterOnSelected | ( | bool | val | ) | [pure virtual] |
Set whether or not the grip stays centered around the current selection gizmo.
[in] | val | If true the grip stays centered around the current selection gizmo, if false the grip stays fixed at it's current viewport location. |
virtual bool GetCenterOnSelected | ( | ) | const [pure virtual] |
Get whether or not the grip stays centered around the current selection gizmo.
return If true the grip stays centered around the current selection gizmo, if false the grip stays fixed at it's current viewport location.
virtual void SetCenterXYPos | ( | float | x, |
float | y | ||
) | [pure virtual] |
Set the normalized x and y location of the grip in the active viewport.
These values are used if GetCenterOnSelection returns false.
[in] | x | The normalized [0-1] x location of the grip in the active viewport. So a value of 0.5 will place the grip in the center of viewport. |
[in] | y | The normalized [0-1] y location of the grip in the active viewport. So a value of 0.5 will place the grip in the center of viewport. |
virtual float GetCenterYPos | ( | ) | const [pure virtual] |
Get the normalized y location of the grip in the active viewport.
These values are used if GetCenterOnSelection returns false.
virtual float GetCenterXPos | ( | ) | const [pure virtual] |
Get the normalized x location of the grip in the active viewport.
These values are used if GetCenterOnSelection returns false.
virtual void SetSelectedOffsetXY | ( | int | offsetPixelX, |
int | offsetPixelY | ||
) | [pure virtual] |
Set the x and y pixel offset from the current selection gizmo where the grip will get placed.
These values are used if GetCenterOnSelection returns true.
[in] | offsetPixelX | The x pixel offset off of the current selection where the grip will get placed. |
[in] | offsetPIxelY | The y pixel offset off of the current selection where the grip will get placed. |
virtual int GetSelectedOffsetX | ( | ) | const [pure virtual] |
Get the x pixel offset from the current selection gizmo where the grip will get placed.
These values are used if GetCenterOnSelection returns true.
virtual int GetSelectedOffsetY | ( | ) | const [pure virtual] |
Get the y pixel offset from the current selection gizmo where the grip will get placed.
These values are used if GetCenterOnSelection returns true.
virtual void SetTransparency | ( | float | val | ) | [pure virtual] |
Set the transparency of the grip items in the viewport.
[in] | The | transparency of the grip items in the viewport. Range is from 0, opaque to 1, fully transparent. |
virtual float GetTransparency | ( | ) | const [pure virtual] |
Get the transparency of the grip items in the viewport.
virtual void SetHoverTransparency | ( | float | val | ) | [pure virtual] |
Set the hover transparency of the grip items in the viewport.
[in] | The | transparency of the grip items in the viewport when the grip item has the mouse cursor over it. Range is from 0, opaque to 1, fully transparent. |
virtual float GetHoverTransparency | ( | ) | const [pure virtual] |
Get the hover transparency of the grip items in the viewport.
virtual void SetWidgetSpacing | ( | float | spacing | ) | [pure virtual] |
Set the spacing in pixels between the main grip UI elements.
[in] | spacing | Set the pacing in pixels between the main grip UI elements. |
virtual float GetWidgetSpacing | ( | ) | const [pure virtual] |
Get the spacing in pixels between the main grip UI elements.
virtual void RegisterGripChangedCallback | ( | GripChangedCallback * | cB | ) | [pure virtual] |
Register a callback that will get called when the active grip changes.
[in] | cB | - The callback that you are registering. If NULL this function does nothing. |
virtual void UnRegisterGripChangedCallback | ( | GripChangedCallback * | cB | ) | [pure virtual] |
Unregister the grip changed ballback.
[in] | cB | - The callback that you are unregistering. If NULL or the callback is not registered this function does nothing.\ |
virtual void RecalcLayout | ( | ) | [pure virtual] |
Function to recalculate the layout and position of all of the grip items.
This usually just needs to get called by the system due to the fact that a window was moved or it's size changed or the selection changed.