fbhud.h

Go to the documentation of this file.
00001 #ifndef __FBHUD_H__
00002 #define __FBHUD_H__
00003 /**************************************************************************
00004  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
00005  All Rights Reserved.
00006  
00007  The coded instructions, statements, computer programs, and/or related 
00008  material (collectively the "Data") in these files contain unpublished 
00009  information proprietary to Autodesk, Inc. and/or its licensors, which is 
00010  protected by Canada and United States of America federal copyright law 
00011  and by international treaties.
00012  
00013  The Data may not be disclosed or distributed to third parties, in whole 
00014  or in part, without the prior written consent of Autodesk, Inc. 
00015  ("Autodesk").
00016  
00017  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00018  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 
00019  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR 
00020  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES 
00021  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
00022  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT 
00023  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR 
00024  FREE.
00025  
00026  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 
00027  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR 
00028  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE 
00029  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS 
00030  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR 
00031  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF 
00032  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT 
00033  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE 
00034  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS 
00035  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
00036  
00037 **************************************************************************/
00038 
00043 #include <kaydaradef.h>
00044 #ifndef FBSDK_DLL 
00045 
00048     #define FBSDK_DLL K_DLLIMPORT
00049 #endif
00050 
00051 #include <fbsdk/fbcomponent.h>
00052 #include <fbsdk/fbproperties.h>
00053 #include <fbsdk/fbtexture.h>
00054 
00055 #ifndef K_NO_HUD
00056 
00057 #ifdef FBSDKUseNamespace
00058 namespace FBSDKNamespace {
00059 #endif
00060 
00062 /* HUD horizontal alignment.*/
00063 enum FBHUDElementHAlignment {
00064     kFBHUDLeft,         
00065     kFBHUDRight,        
00066     kFBHUDCenter,       
00067 };
00068 
00069 FB_DEFINE_ENUM( FBSDK_DLL, HUDElementHAlignment );
00070 
00072 /* HUD vertical alignment.*/
00073 enum FBHUDElementVAlignment {
00074     kFBHUDBottom,                   
00075     kFBHUDTop,                      
00076     kFBHUDVCenter = kFBHUDCenter,   
00077 };
00078 
00079 FB_DEFINE_ENUM( FBSDK_DLL, HUDElementVAlignment );
00080 
00081 __FB_FORWARD( FBHUDElement ); 
00082 FB_DEFINE_COMPONENT( FBSDK_DLL, HUDElement );
00083 
00087 class FBSDK_DLL FBHUDElement : public FBComponent 
00088 {
00089     //--- Open Reality declaration.
00090     __FBClassDeclare( FBHUDElement, FBComponent );
00091 
00092 protected:
00093 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00094 
00099     FBHUDElement( const char* pName, HIObject pObject=NULL );
00100 
00103     FBHUDElement( const FBHUDElement& );
00104     
00107     FBHUDElement& operator=( const FBHUDElement& );
00108 #endif
00109 
00110 public:
00111 
00112     FBPropertyBool Visibility;                      
00113     FBPropertyHUDElementHAlignment Justification;   
00114     FBPropertyHUDElementHAlignment HorizontalDock;  
00115     FBPropertyHUDElementVAlignment VerticalDock;    
00116     FBPropertyDouble X;                             
00117     FBPropertyDouble Y;                             
00118     FBPropertyBool PositionByPercent;               
00119     FBPropertyBool ScaleByPercent;                  
00120     FBPropertyDouble Width;                          
00121     FBPropertyDouble Height;                         
00122     FBPropertyBool ScaleUniformly;                  
00123 };
00124 
00125 
00127 // FBPropertyListHUDElement
00129 FB_DEFINE_LIST( FBSDK_DLL, HUDElement );
00130 FB_FORWARD( FBPropertyListHUDElement );
00131 
00133 class FBSDK_DLL FBPropertyListHUDElement : public FBPropertyListComponent
00134 {
00135 public:
00136     FBPropertyListHUDElement();
00141     FBHUDElement* operator[](int pIndex);
00142 };
00143 
00144 __FB_FORWARD( FBHUDTextElement ); 
00145 FB_DEFINE_COMPONENT( FBSDK_DLL, HUDTextElement );
00146 
00147 
00151 class FBSDK_DLL FBHUDTextElement : public FBHUDElement 
00152 {
00153     //--- Open Reality declaration.
00154     __FBClassDeclare( FBHUDTextElement , FBHUDElement );
00155 
00156 public:
00162     FBHUDTextElement( const char* pName, HIObject pObject=NULL );
00163 
00166     FBHUDTextElement ( const FBHUDTextElement & );
00167 
00170     FBHUDTextElement & operator=( const FBHUDTextElement & );
00171 
00174     FBStringList* GetFontList();
00175 
00176 public:
00177     FBPropertyString                Content;                
00178     FBPropertyString                Font;                   
00179     FBPropertyColorAndAlpha         Color;                  
00180     FBPropertyColorAndAlpha         BackgroundColor;        
00181     FBPropertyBool                  ForceTimeCodeDisplay;   
00182     FBPropertyBool                  AdjustWidthToFitText;   
00183 };
00184 
00185 
00186 __FB_FORWARD( FBHUDRectElement ); 
00187 FB_DEFINE_COMPONENT( FBSDK_DLL, HUDRectElement );
00188 
00192 class FBSDK_DLL FBHUDRectElement : public FBHUDElement 
00193 {
00194     //--- Open Reality declaration.
00195     __FBClassDeclareGroup( FBHUDRectElement , FBHUDElement );
00196 
00197 public:
00202     FBHUDRectElement( const char* pName, HIObject pObject=NULL );
00203 
00206     FBHUDRectElement ( const FBHUDRectElement & );
00207 
00210     FBHUDRectElement & operator=( const FBHUDRectElement & );
00211 
00212 public:
00213     FBPropertyColorAndAlpha         Color;              
00214 };
00215 
00216 
00217 __FB_FORWARD( FBHUDTextureElement ); 
00218 FB_DEFINE_COMPONENT( FBSDK_DLL, HUDTextureElement );
00219 
00223 class FBSDK_DLL FBHUDTextureElement : public FBHUDElement 
00224 {
00225     //--- Open Reality declaration.
00226     __FBClassDeclare( FBHUDTextureElement , FBHUDElement );
00227 public:
00233     FBHUDTextureElement( const char* pName, HIObject pObject=NULL );
00234 
00237     FBHUDTextureElement ( const FBHUDTextureElement & );
00238 
00241     FBHUDTextureElement & operator=( const FBHUDTextureElement & );
00242 
00243 public:
00244 
00245     FBPropertyListTexture Texture;       
00246 };
00247 
00248 
00249 __FB_FORWARD( FBHUDFlashElement ); 
00250 FB_DEFINE_COMPONENT( FBSDK_DLL, HUDFlashElement );
00251 
00255 class FBSDK_DLL FBHUDFlashElement : public FBHUDElement 
00256 {
00257     //--- Open Reality declaration.
00258     __FBClassDeclare( FBHUDFlashElement , FBHUDElement );
00259 public:
00265     FBHUDFlashElement( const char* pName, HIObject pObject=NULL );
00266 
00269     FBHUDFlashElement ( const FBHUDFlashElement & );
00270 
00273     FBHUDFlashElement & operator=( const FBHUDFlashElement & );
00274 
00275 public:
00276 
00277     FBPropertyString FilePath;       
00278 };
00279 
00280 
00281 __FB_FORWARD( FBHUD ); 
00282 FB_DEFINE_COMPONENT( FBSDK_DLL, HUD );
00283 
00290 class FBSDK_DLL FBHUD : public FBComponent 
00291 {
00292     //--- Open Reality declaration.
00293     __FBClassDeclare( FBHUD, FBComponent );
00294 public:
00300     FBHUD( const char* pName, HIObject pObject=NULL );
00301 
00306     FBHUD( const FBHUD& );
00307 
00312     FBHUD& operator=( const FBHUD& );
00313 
00314     enum EStockElement {
00315         eRecordLight,        
00316         eFlashElement,
00317         eTextElement,
00318         eRectElement
00319     };
00320 
00321     FBHUDElement *CreateElement(EStockElement pType, const char *pName);
00322 
00323 public:
00324     FBPropertyBool Visibility;  
00325     FBPropertyEvent OnDisplay;  
00326     FBPropertyListHUDElement    Elements; 
00327 };
00328 
00330 // FBPropertyListHUD
00332 FB_DEFINE_LIST( FBSDK_DLL, HUD );
00333 FB_FORWARD( FBPropertyListHUD );
00334 
00336 class FBSDK_DLL FBPropertyListHUD : public FBPropertyListComponent
00337 {
00338 public:
00339     FBPropertyListHUD();
00344     FBHUD* operator[](int pIndex);
00345 };
00346 
00347 #ifdef FBSDKUseNamespace
00348 }
00349 #endif
00350 
00351 #endif //K_NO_HUD
00352 
00353 #endif /* this must be the last line of this file */