Go to the
documentation of this file.
00001 #ifndef __FBHUD_H__
00002 #define __FBHUD_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
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
00063 enum FBHUDElementHAlignment {
00064 kFBHUDLeft,
00065 kFBHUDRight,
00066 kFBHUDCenter,
00067 };
00068
00069 FB_DEFINE_ENUM( FBSDK_DLL, HUDElementHAlignment );
00070
00072
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
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
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
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
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
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
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
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
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