Open Reality Reference Guide
fbtool.h File Reference

Declaration for the FBTool class. More...

#include <kaydaradef.h>
#include <fbcontrols/fbcontrols.h>

Go to the source code of this file.

Classes

class  FBTool
 Tool class. More...
 

Macros

#define FBSDK_DLL   K_DLLIMPORT
 Be sure that FBSDK_DLL is defined only once... More...
 
#define FBRegisterTool(ClassName, Label, Description, IconFilename)
 Register a tool. More...
 
#define FBToolDeclare(ClassName, Parent)
 Tool class declaration. More...
 
#define FBToolImplementation(ThisComponent)    FBClassImplementation( ThisComponent )
 Tool class implementation. More...
 

Enumerations

enum  FBToolPossibleDockPosition {
  kFBToolPossibleDockPosNone = 0,
  kFBToolPossibleDockPosTop = (1 << 0),
  kFBToolPossibleDockPosLeft = (1 << 1),
  kFBToolPossibleDockPosRight = (1 << 2),
  kFBToolPossibleDockPosBottom = (1 << 3)
}
 

Functions

 FB_FORWARD (FBFbxObject)
 
 __FB_FORWARD (FBTool)
 
K_DLLIMPORT bool FBPopNormalTool (const char *pToolName, bool pSetFocus=true)
 This function is used to bring up a specific tool in the GUI. More...
 
K_DLLIMPORT FBToolFBShowToolByName (const char *pToolName, bool pResizeWnd=true)
 This function will show a specific tool in the GUI. More...
 
K_DLLIMPORT FBToolFBShowTool (FBTool *pTool, bool pResizeWnd=true)
 This function will show a specific tool in the GUI. More...
 
K_DLLIMPORT bool FBCloseToolByName (const char *pToolName)
 This function will close a specific tool in the GUI. More...
 
K_DLLIMPORT bool FBCloseTool (FBTool *pTool)
 This function will close a specific tool in the GUI. More...
 
K_DLLIMPORT void FBDestroyToolByName (const char *pToolName)
 This function will destroy a specific tool in the GUI. More...
 
K_DLLIMPORT void FBDestroyTool (FBTool *pTool)
 This function will destroy a specific tool in the GUI. More...
 
K_DLLIMPORT void FBSetToolSizeByName (const char *pToolName, int pWidth, int pHeight)
 This function will set the size of a specific tool in the GUI. More...
 
K_DLLIMPORT void FBSetToolSize (FBTool *pTool, int pWidth, int pHeight)
 This function will set the size of a specific tool in the GUI. More...
 
K_DLLIMPORT void FBGetToolSizeByName (const char *pToolName, int &pWidth, int &pHeight)
 This function will get the size of a specific tool in the GUI. More...
 
K_DLLIMPORT void FBGetToolSize (FBTool *pTool, int &pWidth, int &pHeight)
 This function will get the size of a specific tool in the GUI. More...
 
K_DLLIMPORT void FBSetToolPositionByName (const char *pToolName, int pPosX, int pPosY)
 This function will set the position of a specific tool. More...
 
K_DLLIMPORT void FBSetToolPosition (FBTool *pTool, int pPosX, int pPosY)
 This function will set the position of a specific tool. More...
 
K_DLLIMPORT void FBGetToolPositionByName (const char *pToolName, int &pPosX, int &pPosY)
 This function will get the position of a specific tool. More...
 
K_DLLIMPORT void FBGetToolPosition (FBTool *pTool, int &pPosX, int &pPosY)
 This function will get the position of a specific tool. More...
 

Detailed Description

Declaration for the FBTool class.

Definition in file fbtool.h.

Macro Definition Documentation

◆ FBRegisterTool

#define FBRegisterTool (   ClassName,
  Label,
  Description,
  IconFilename 
)
Value:
static HIObject RegisterTool##ClassName( HIObject pOwner,const char* pName,void * pData) \
{\
ClassName *Class = new ClassName( Label ); \
Class->mAllocated = true; \
if( Class->FBCreate() ) {\
return Class->GetHIObject(); \
} else { \
delete Class; \
return NULL; \
} \
} \
FBLibraryModule( ClassName ) \
{ \
FBRegisterObject( ClassName,"UI/Tools",Label,Description,RegisterTool##ClassName, false, IconFilename );\
}

Register a tool.

Parameters
ClassNameName of tool class to register.
LabelShort description of tool.
DescriptionLong description of tool.
IconFilenameFilename of associated icon.

Definition at line 66 of file fbtool.h.

◆ FBSDK_DLL

#define FBSDK_DLL   K_DLLIMPORT

Be sure that FBSDK_DLL is defined only once...

Definition at line 48 of file fbtool.h.

◆ FBToolDeclare

#define FBToolDeclare (   ClassName,
  Parent 
)
Value:
FBClassDeclare( ClassName,Parent ); \
public: \
ClassName(const char *pName=NULL):Parent(pName) { FBClassInit; } \
private:

Tool class declaration.

Parameters
ClassNameName of tool class to declare.
ParentName of tool class parent class.

Definition at line 87 of file fbtool.h.

◆ FBToolImplementation

#define FBToolImplementation (   ThisComponent)     FBClassImplementation( ThisComponent )

Tool class implementation.

Parameters
ThisComponentTool class to implement.

Definition at line 96 of file fbtool.h.

Function Documentation

◆ FBCloseTool()

K_DLLIMPORT bool FBCloseTool ( FBTool pTool)

This function will close a specific tool in the GUI.

Parameters
pToolA pointer to the tool to close.
Returns
True if the tool was closed successfully, false otherwise.

◆ FBCloseToolByName()

K_DLLIMPORT bool FBCloseToolByName ( const char *  pToolName)

This function will close a specific tool in the GUI.

Parameters
pToolNameThe name of the tool as shown in the Open Reality menu.
Returns
True if the tool was closed successfully, false otherwise.

◆ FBDestroyTool()

K_DLLIMPORT void FBDestroyTool ( FBTool pTool)

This function will destroy a specific tool in the GUI.

Parameters
pToolA pointer to the tool to destroy.

◆ FBDestroyToolByName()

K_DLLIMPORT void FBDestroyToolByName ( const char *  pToolName)

This function will destroy a specific tool in the GUI.

Parameters
pToolNameThe name of the tool as shown in the Open Reality menu.

◆ FBGetToolPosition()

K_DLLIMPORT void FBGetToolPosition ( FBTool pTool,
int &  pPosX,
int &  pPosY 
)

This function will get the position of a specific tool.

Parameters
pToolA pointer to the tool.
pPosXCurrent position in X of the tool.
pPosYCurrent position in Y of the tool.

◆ FBGetToolPositionByName()

K_DLLIMPORT void FBGetToolPositionByName ( const char *  pToolName,
int &  pPosX,
int &  pPosY 
)

This function will get the position of a specific tool.

Parameters
pToolNameThe name of the tool as shown in the Open Reality menu.
pPosXCurrent position in X of the tool.
pPosYCurrent position in Y of the tool.

◆ FBGetToolSize()

K_DLLIMPORT void FBGetToolSize ( FBTool pTool,
int &  pWidth,
int &  pHeight 
)

This function will get the size of a specific tool in the GUI.

Parameters
pToolA pointer to the tool.
pWidthCurrent width of the tool.
pHeightCurrent height of the tool.

◆ FBGetToolSizeByName()

K_DLLIMPORT void FBGetToolSizeByName ( const char *  pToolName,
int &  pWidth,
int &  pHeight 
)

This function will get the size of a specific tool in the GUI.

Parameters
pToolNameThe name of the tool as shown in the Open Reality menu.
pWidthCurrent width of the tool.
pHeightCurrent height of the tool.

◆ FBPopNormalTool()

K_DLLIMPORT bool FBPopNormalTool ( const char *  pToolName,
bool  pSetFocus = true 
)

This function is used to bring up a specific tool in the GUI.

Parameters
pToolNameThe name of the tool as shown in the Open Reality menu.
pSetFocusIndicate if the tool will have the focus.
Returns
If the tool was brought up successfully.

◆ FBSetToolPosition()

K_DLLIMPORT void FBSetToolPosition ( FBTool pTool,
int  pPosX,
int  pPosY 
)

This function will set the position of a specific tool.

Parameters
pToolA pointer to the tool.
pPosXNew position in X for the tool.
pPosYNew position in Y for the tool.

◆ FBSetToolPositionByName()

K_DLLIMPORT void FBSetToolPositionByName ( const char *  pToolName,
int  pPosX,
int  pPosY 
)

This function will set the position of a specific tool.

Parameters
pToolNameThe name of the tool as shown in the Open Reality menu.
pPosXNew position in X for the tool.
pPosYNew position in Y for the tool.

◆ FBSetToolSize()

K_DLLIMPORT void FBSetToolSize ( FBTool pTool,
int  pWidth,
int  pHeight 
)

This function will set the size of a specific tool in the GUI.

Parameters
pToolA pointer to the tool.
pWidthNew width of the tool.
pHeightNew height of the tool.

◆ FBSetToolSizeByName()

K_DLLIMPORT void FBSetToolSizeByName ( const char *  pToolName,
int  pWidth,
int  pHeight 
)

This function will set the size of a specific tool in the GUI.

Parameters
pToolNameThe name of the tool as shown in the Open Reality menu.
pWidthNew width of the tool.
pHeightNew height of the tool.

◆ FBShowTool()

K_DLLIMPORT FBTool* FBShowTool ( FBTool pTool,
bool  pResizeWnd = true 
)

This function will show a specific tool in the GUI.

Parameters
pToolA pointer to the tool to show.
pResizeWndAdjust the size of the tool window if needed (if started too close to the end of the screen for example).
Returns
A pointer to the FBTool object, NULL otherwise.

◆ FBShowToolByName()

K_DLLIMPORT FBTool* FBShowToolByName ( const char *  pToolName,
bool  pResizeWnd = true 
)

This function will show a specific tool in the GUI.

Parameters
pToolNameThe name of the tool as shown in the Open Reality menu.
pResizeWndAdjust the size of the tool window if needed (if started too close to the end of the screen for example).
Returns
A pointer to the FBTool object, NULL otherwise.
FBClassDeclare
#define FBClassDeclare(Name, Parent)
Class declaration.
Definition: fbdefines.h:85
FBClassInit
#define FBClassInit
Class initialization.
Definition: fbdefines.h:64