Open Reality Reference Guide
 
Loading...
Searching...
No Matches
fbtool.h
Go to the documentation of this file.
1#ifndef __FBTOOL_H__
2#define __FBTOOL_H__
3/**************************************************************************
4Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5All Rights Reserved.
6
7The coded instructions, statements, computer programs, and/or related
8material (collectively the "Data") in these files contain unpublished
9information proprietary to Autodesk, Inc. and/or its licensors, which is
10protected by Canada and United States of America federal copyright law
11and by international treaties.
12
13The Data may not be disclosed or distributed to third parties, in whole
14or in part, without the prior written consent of Autodesk, Inc.
15("Autodesk").
16
17THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24FREE.
25
26IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36
37**************************************************************************/
38
43#include <kaydaradef.h>
44#ifndef FBSDK_DLL
48#define FBSDK_DLL K_DLLIMPORT
49#endif
50
52
53#ifdef FBSDKUseNamespace
54namespace FBSDKNamespace {;
55#endif
56
58// FBTool
60
66#define FBRegisterTool( ClassName, Label, Description, IconFilename ) \
67 static HIObject RegisterTool##ClassName( HIObject pOwner,const char* pName,void * pData) \
68{\
69 ClassName *Class = new ClassName( Label ); \
70 Class->mAllocated = true; \
71 if( Class->FBCreate() ) {\
72 return Class->GetHIObject(); \
73 } else { \
74 delete Class; \
75 return NULL; \
76 } \
77} \
78 FBLibraryModule( ClassName ) \
79{ \
80 FBRegisterObject( ClassName,"UI/Tools",Label,Description,RegisterTool##ClassName, false, IconFilename );\
81}
82
89#define FBRegisterWindowTool( ClassName, Label, Description, IconFilename ) \
90 static HIObject RegisterTool##ClassName( HIObject pOwner,const char* pName,void * pData) \
91{\
92 ClassName *Class = new ClassName( Label ); \
93 Class->mAllocated = true; \
94 if( Class->FBCreate() ) {\
95 return Class->GetHIObject(); \
96 } else { \
97 delete Class; \
98 return NULL; \
99 } \
100} \
101 FBLibraryModule( ClassName ) \
102{ \
103 FBRegisterObject( ClassName,"UI/WindowTools",Label,Description,RegisterTool##ClassName, false, IconFilename );\
104}
105
110#define FBToolDeclare( ClassName,Parent ) \
111 FBClassDeclare( ClassName,Parent ); \
112public: \
113 ClassName(const char *pName=NULL):Parent(pName) { FBClassInit; } \
114private:
115
119#define FBToolImplementation( ThisComponent ) \
120 FBClassImplementation( ThisComponent )
121
124
125enum FBToolPossibleDockPosition
126{
127 kFBToolPossibleDockPosNone = 0,
128 kFBToolPossibleDockPosTop = (1 << 0),
129 kFBToolPossibleDockPosLeft = (1 << 1),
130 kFBToolPossibleDockPosRight = (1 << 2),
131 kFBToolPossibleDockPosBottom = (1 << 3),
132};
133
135class FBSDK_DLL FBTool : public FBLayout {
137public:
141 FBTool(const char* pName = NULL);
142
147 FBTool(const char* pName, bool pRegisterTool);
148
152 virtual void Destroy(int pIsLocal) override;
154
158 virtual bool FbxStore ( FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat );
159 virtual bool FbxRetrieve ( FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat );
161
165 FBToolPossibleDockPosition GetPossibleDockPosition();
166
170 void SetPossibleDockPosition(FBToolPossibleDockPosition pFlags);
171
172 IQuery_Declare(override); // Interface to IObject.
173
174 FBPropertyInt StartSize [2];
175 FBPropertyInt MaxSize [2];
176 FBPropertyInt MinSize [2];
177 FBPropertyInt StartPos [2];
180private:
181
182 void InitTool();
183};
184
190FBSDK_DLL bool FBPopNormalTool( const char* pToolName, bool pSetFocus = true );
191
197FBSDK_DLL FBTool* FBShowToolByName( const char* pToolName, bool pResizeWnd = true );
198
204FBSDK_DLL FBTool* FBShowTool( FBTool* pTool, bool pResizeWnd = true );
205
210FBSDK_DLL bool FBCloseToolByName( const char* pToolName );
211
217
221FBSDK_DLL void FBDestroyToolByName( const char* pToolName );
222
227
233FBSDK_DLL void FBSetToolSizeByName( const char* pToolName, int pWidth, int pHeight );
234
240FBSDK_DLL void FBSetToolSize( FBTool* pTool, int pWidth, int pHeight );
241
247FBSDK_DLL void FBGetToolSizeByName( const char* pToolName, int &pWidth, int &pHeight );
248
254FBSDK_DLL void FBGetToolSize( FBTool* pTool, int &pWidth, int &pHeight );
255
261FBSDK_DLL void FBSetToolPositionByName( const char* pToolName, int pPosX, int pPosY );
262
268FBSDK_DLL void FBSetToolPosition( FBTool* pTool, int pPosX, int pPosY );
269
275FBSDK_DLL void FBGetToolPositionByName( const char* pToolName, int &pPosX, int &pPosY );
276
282FBSDK_DLL void FBGetToolPosition( FBTool* pTool, int &pPosX, int &pPosY );
283
284#ifdef FBSDKUseNamespace
285}
286#endif
287#endif /* __FBTOOL_H */
FBX file interface.
Definition fbfbx.h:80
Used to build the user interface.
Definition fbcontrols.h:781
Property class: const char * (String).
Tool class.
Definition fbtool.h:135
virtual void Destroy(int pIsLocal) override
Redefine Custom Destroy function.
FBTool(const char *pName, bool pRegisterTool)
Constructor used when creating tools not in the Tools menu of MotionBuilder.
FBTool(const char *pName=NULL)
Constructor.
FBPropertyString DisplayName
Read Write Property: Tool Display Name (Caption on the tool's title bar)
Definition fbtool.h:179
FBPropertyString Name
Read-Only Property: Tool Name
Definition fbtool.h:178
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)
Storage/Retrieval of information into the FBX file format.
FBToolPossibleDockPosition GetPossibleDockPosition()
Get the possible docking position for the tool (concatenated).
void SetPossibleDockPosition(FBToolPossibleDockPosition pFlags)
Set the possible docking position for the tool.
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Contains the user interface components for the SDK.
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
K_DLLIMPORT void FBGetToolPositionByName(const char *pToolName, int &pPosX, int &pPosY)
This function will get the position of a specific tool.
K_DLLIMPORT void FBGetToolSize(FBTool *pTool, int &pWidth, int &pHeight)
This function will get the size of a specific tool in the GUI.
K_DLLIMPORT void FBSetToolSize(FBTool *pTool, int pWidth, int pHeight)
This function will set the size of a specific tool in the GUI.
K_DLLIMPORT void FBGetToolPosition(FBTool *pTool, int &pPosX, int &pPosY)
This function will get the position of a specific tool.
K_DLLIMPORT bool FBCloseToolByName(const char *pToolName)
This function will close a specific tool in the GUI.
K_DLLIMPORT bool FBCloseTool(FBTool *pTool)
This function will close a specific tool in the GUI.
K_DLLIMPORT FBTool * FBShowTool(FBTool *pTool, bool pResizeWnd=true)
This function will show a specific tool in the GUI.
K_DLLIMPORT void FBDestroyToolByName(const char *pToolName)
This function will destroy a specific tool in the GUI.
K_DLLIMPORT void FBSetToolPosition(FBTool *pTool, int pPosX, int pPosY)
This function will set the position of a specific tool.
K_DLLIMPORT void FBSetToolPositionByName(const char *pToolName, int pPosX, int pPosY)
This function will set the position of a specific tool.
K_DLLIMPORT void FBSetToolSizeByName(const char *pToolName, int pWidth, int pHeight)
This function will set the size of a specific tool in the GUI.
K_DLLIMPORT void FBGetToolSizeByName(const char *pToolName, int &pWidth, int &pHeight)
This function will get the size of a specific tool in the GUI.
K_DLLIMPORT void FBDestroyTool(FBTool *pTool)
This function will destroy a specific tool in the GUI.
K_DLLIMPORT FBTool * FBShowToolByName(const char *pToolName, bool pResizeWnd=true)
This function will show a specific tool in the GUI.
K_DLLIMPORT bool FBPopNormalTool(const char *pToolName, bool pSetFocus=true)
This function is used to bring up a specific tool in the GUI.
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
Definition fbtypes.h:74
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition fbtypes.h:62
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition fbtypes.h:68