IGripManager Class Reference

#include <igrip.h>

Class Description

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.

See also
IGRIPMANAGER_INTERFACE
GetIGripManager()
+ Inheritance diagram for IGripManager:

Public Member Functions

virtual void RecalcLayout ()=0
 Function to recalculate the layout and position of all of the grip items. More...
 
Enable/Disable
virtual void SetGripActive (IBaseGrip *grip)=0
 Make the grip active and show it. More...
 
virtual void SetGripsInactive ()=0
 Inactivate the current active grip. More...
 
virtual IBaseGripGetActiveGrip ()=0
 Get the current active grip. More...
 
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. More...
 
virtual bool IsGripItemActive (int whichItem)=0
 Get whether or not a particular grip item of the active grip is active or not. More...
 
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. More...
 
virtual bool IsGripItemVisible (int whichItem)=0
 Get whether or not a particular grip item of the active grip is visible or not. More...
 
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. More...
 
virtual void ResetAllUI ()=0
 Convienence function to reset all of a grip's UI. More...
 
Show
virtual void SetShow (bool val)=0
 Show grips. More...
 
virtual bool GetShow () const =0
 Get if grips are shown. More...
 
Grip Placement
virtual void GetXYLocation (float &x, float &y)=0
 Get the location of the grip in screen space. More...
 
virtual void SetLocation (int x, int y)=0
 Set the location of the grip in screen space. More...
 
virtual void SetCenterOnSelected (bool val)=0
 Set whether or not the grip stays centered around the current selection gizmo. More...
 
virtual bool GetCenterOnSelected () const =0
 Get whether or not the grip stays centered around the current selection gizmo. More...
 
virtual void SetCenterXYPos (float x, float y)=0
 Set the normalized x and y location of the grip in the active viewport. More...
 
virtual float GetCenterYPos () const =0
 Get the normalized y location of the grip in the active viewport. More...
 
virtual float GetCenterXPos () const =0
 Get the normalized x location of the grip in the active viewport. More...
 
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. More...
 
virtual int GetSelectedOffsetX () const =0
 Get the x pixel offset from the current selection gizmo where the grip will get placed. More...
 
virtual int GetSelectedOffsetY () const =0
 Get the y pixel offset from the current selection gizmo where the grip will get placed. More...
 
Transparency
virtual void SetTransparency (float val)=0
 Set the transparency of the grip items in the viewport. More...
 
virtual float GetTransparency () const =0
 Get the transparency of the grip items in the viewport. More...
 
virtual void SetHoverTransparency (float val)=0
 Set the hover transparency of the grip items in the viewport. More...
 
virtual float GetHoverTransparency () const =0
 Get the hover transparency of the grip items in the viewport. More...
 
Widget Spacing
virtual void SetWidgetSpacing (float spacing)=0
 Set the spacing in pixels between the main grip UI elements. More...
 
virtual float GetWidgetSpacing () const =0
 Get the spacing in pixels between the main grip UI elements. More...
 
GripChangedCallback
virtual void RegisterGripChangedCallback (GripChangedCallback *cB)=0
 Register a callback that will get called when the active grip changes. More...
 
virtual void UnRegisterGripChangedCallback (GripChangedCallback *cB)=0
 Unregister the grip changed ballback. More...
 
- Public Member Functions inherited from FPInterfaceDesc
CoreExport FPInterfaceDesc ()
 
CoreExport FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport ~FPInterfaceDesc ()
 
virtual void Init ()
 
LifetimeType LifetimeControl ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport void AppendFunction (int id,...)
 Add a new function to this interface descriptor. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
CoreExport void SetClassDesc (ClassDesc *i_cd)
 
CoreExport va_list check_fn (va_list ap, int id)
 
CoreExport va_list scan_fn (va_list ap, int id, int index)
 
CoreExport va_list check_prop (va_list ap, int id)
 
CoreExport va_list scan_prop (va_list ap, int id, int index)
 
CoreExport va_list check_enum (va_list ap, EnumID id)
 
CoreExport va_list scan_enum (va_list ap, EnumID id, int index)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClass * pc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Member Function Documentation

virtual void SetGripActive ( IBaseGrip grip)
pure virtual

Make the grip active and show it.

Parameters
[in]gripThe 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.

Returns
Returns the current active grip. If no grip is active, returns NULL.
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.

Parameters
[in]whichItemThe 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]activeIf true the item is active and can get manipulated, if false, the item is disabled and greyed out in the viewport.
Returns
true if the operation succeeded, false otherwise.
virtual bool IsGripItemActive ( int  whichItem)
pure virtual

Get whether or not a particular grip item of the active grip is active or not.

Parameters
[in]whichItemThe zero based index for the item for which we are checking to see if it's active or not.
Returns
Returns true if the item is active, false if the item is not and it's been disabled. If the whichItem parameter is out of range or no grip is active then this function will return false.
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.

Parameters
[in]whichItemThe 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]hideIf 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().
Returns
true if the operation succeeded, false otherwise.
virtual bool IsGripItemVisible ( int  whichItem)
pure virtual

Get whether or not a particular grip item of the active grip is visible or not.

Parameters
[in]whichItemThe zero based index for the item for which we are checking to see if it's visible.
Returns
Returns true if the item is visible, false if the item is not. If the whichItem parameter is out of range or no grip is active then this function will return false.
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,

Parameters
[in]whichItemThe zero based index for the item for which needs to reset its UI.
Returns
Returns true if the item is active, false if the item is not. If the whichItem parameter is out of range or no grip is active then this function will do nothing and return false.
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.

Parameters
[in]valIf 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.

Returns
If true grips will be shown,if false no grips will be shown even if active.
virtual void GetXYLocation ( float &  x,
float &  y 
)
pure virtual

Get the location of the grip in screen space.

Parameters
[out]xThe x location of the grip in screen space.
[out]yThe 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.

Parameters
[in]xThe x location of the grip in screen space that you want the grip's upper right corner to be placed.
[in]yThe 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.

Parameters
[in]valIf 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.

Parameters
[in]xThe 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]yThe 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.

Returns
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 GetCenterXPos ( ) const
pure virtual

Get the normalized x location of the grip in the active viewport.

These values are used if GetCenterOnSelection returns false.

Returns
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.
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.

Parameters
[in]offsetPixelXThe x pixel offset off of the current selection where the grip will get placed.
[in]offsetPixelYThe 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.

Returns
The x pixel offset off of the current selection where the grip will get placed.
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.

Returns
The y pixel offset off of the current selection where the grip will get placed.
virtual void SetTransparency ( float  val)
pure virtual

Set the transparency of the grip items in the viewport.

Parameters
[in]valThe 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.

Returns
Returns the transparency of the grip items in the viewport. Range is from 0, opaque to 1, fully transparent.
virtual void SetHoverTransparency ( float  val)
pure virtual

Set the hover transparency of the grip items in the viewport.

Parameters
[in]valThe 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.

Returns
Returns the transparency of the grip items in the viewport. Range is from 0, opaque to 1, fully transparent.
virtual void SetWidgetSpacing ( float  spacing)
pure virtual

Set the spacing in pixels between the main grip UI elements.

Parameters
[in]spacingSet 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.

Returns
Returns the pacing 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.

Parameters
[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.

Parameters
[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.