00001 #ifndef __FBDEVICELAYOUT_H__
00002 #define __FBDEVICELAYOUT_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
00052 #include <fbsdk/fbcore.h>
00053
00054
00055 #include <fbcontrols/fbcontrols.h>
00056
00057
00058 #ifdef FBSDKUseNamespace
00059 namespace FBSDKNamespace {
00060 #endif
00061
00062 FB_FORWARD( FBDeviceCameraInstrument );
00063 FB_FORWARD( FBDeviceCamera );
00064 FB_FORWARD( FBDeviceOptical );
00065
00071 #define FBRegisterDeviceLayout( ClassName,UniqueNameStr, IconFilename ) \
00072 HIObject RegisterDeviceLayout##ClassName( HIObject ,char * ,void *pData) \
00073 {\
00074 ClassName *Class = new ClassName( (HFBDevice)FBGetFBObject((HIObject)pData) ); \
00075 Class->mAllocated = true; \
00076 if (Class->FBCreate()) { \
00077 return Class->GetHIObject(); \
00078 } else { \
00079 delete Class; \
00080 return NULL; \
00081 } \
00082 } \
00083 FBLibraryModule( ClassName ) \
00084 { \
00085 FBRegisterObject( ClassName,"UI_Associated_ClassName",UniqueNameStr,UniqueNameStr" Device Layout",RegisterDeviceLayout##ClassName, true, IconFilename );\
00086 }
00087
00092 #define FBDeviceLayoutDeclare( ClassName,Parent ) \
00093 FBClassDeclare( ClassName,Parent ); \
00094 public: \
00095 ClassName(HFBDevice pDevice):Parent(pDevice) { FBClassInit; } \
00096 private:
00097
00101 #define FBDeviceLayoutImplementation( ThisComponent ) \
00102 FBClassImplementation( ThisComponent )
00103
00105
00107 __FB_FORWARD( FBDeviceLayout );
00108
00113 class FBSDK_DLL FBDeviceLayout : public FBLayout {
00114 __FBClassDeclare( FBDeviceLayout,FBLayout );
00115
00116 public:
00120 FBDeviceLayout( HFBDevice pDevice = NULL );
00121
00122 FBPropertyDevice Device;
00123 };
00124
00126
00128 __FB_FORWARD( FBDeviceOpticalLayout);
00129
00131 class FBSDK_DLL FBDeviceOpticalLayout : public FBDeviceLayout
00132 {
00133
00134 __FBClassDeclare( FBDeviceOpticalLayout , FBDeviceLayout);
00135
00136 public:
00138 enum FBDeviceOpticalGUIOptions {
00139 kGUIModelOpticalList = 1<<0,
00140 kGUIModelOpticalCreate = 1<<1,
00141 kGUIModelOpticalDampingTime = 1<<2,
00142 kGUIDeviceStatus = 1<<3,
00143 kGUIDeviceReset = 1<<4,
00144 kGUIViewer = 1<<5
00145 };
00146
00150 FBDeviceOpticalLayout( HFBDevice pDevice = NULL );
00151
00152
00153
00154 virtual bool FBCreate();
00155
00156 public:
00157 HFBDeviceOptical mDeviceOptical;
00158 FBPropertyInt GenericUIOptions;
00159 };
00160
00161
00162
00163 __FB_FORWARD( FBDeviceCameraLayout);
00165 #define FBTRACKER_NO_LENSFILE "-- no lens file --"
00166
00168 class FBSDK_DLL FBDeviceCameraLayout : public FBDeviceLayout
00169 {
00170
00171 __FBClassDeclare( FBDeviceCameraLayout, FBDeviceLayout );
00172 public:
00173 FBDeviceCameraLayout(HFBDevice pDevice);
00174
00175
00176 virtual bool FBCreate();
00177 virtual void FBDestroy();
00178
00179 public:
00180
00181 virtual void UICreate ();
00182 virtual void UICreateLayoutInstruments ();
00183 virtual void UICreateLayoutCommunication ();
00184 virtual void UICreateLayoutInfo ();
00185 virtual void UICreateLayoutCustom ();
00186 virtual void UIConfigure ();
00187 virtual void UIConfigureLayoutInstruments ();
00188 virtual void UIConfigureLayoutCommunication ();
00189 virtual void UIConfigureLayoutInfo ();
00190 virtual void UIConfigureLayoutCustom ();
00191 virtual void UIRefresh ();
00192 virtual void UIRefreshLayoutInstruments ();
00193 virtual void UIRefreshLayoutCommunications ();
00194 virtual void UIRefreshLayoutCustom ();
00195 virtual void UIUpdateEnabled ();
00196 virtual void UIReset ();
00197 virtual void UIResetLayoutInstruments ();
00198 virtual void UIResetLayoutCommunications ();
00199 virtual void UIResetLayoutCustom ();
00200
00205 virtual FBDeviceCameraInstrument* GetCurrentInstrument();
00206
00207 protected:
00208 FBTabPanel mTabPanel;
00209
00210 FBLayout mLayoutInstruments;
00211 FBList mListInstruments;
00212 FBButton mButtonActive;
00213
00214
00215 FBButton mButtonManualFov;
00216 FBLabel mLabelFovX;
00217 FBLabel mLabelFovY;
00218 FBSlider mSliderFovX;
00219 FBSlider mSliderFovY;
00220 FBEditNumber mEditNumberFovX;
00221 FBEditNumber mEditNumberFovY;
00222
00223
00224 FBButton mButtonManualCenter;
00225 FBLabel mLabelCenterX;
00226 FBLabel mLabelCenterY;
00227 FBSlider mSliderCenterX;
00228 FBSlider mSliderCenterY;
00229 FBEditNumber mEditNumberCenterX;
00230 FBEditNumber mEditNumberCenterY;
00231
00232
00233 FBLabel mLabelOffsetT;
00234 FBLabel mLabelOffsetR;
00235 FBEditVector mEditVectorOffsetT;
00236 FBEditVector mEditVectorOffsetR;
00237
00238
00239 FBButton mButtonLoadLensfile;
00240 FBButton mButtonResetLensfile;
00241 FBLabel mLabelLensfileName;
00242 FBLabel mLabelInversion;
00243 FBButton mButtonInvertZoom;
00244 FBButton mButtonInvertFocus;
00245 FBLabel mLabelFovUnits;
00246 FBButton mButtonFovUnitsDeg;
00247 FBButton mButtonFovUnitsRad;
00248 FBLabel mLabelNodalX;
00249 FBSlider mSliderNodalX;
00250 FBEditNumber mEditNumberNodalX;
00251 FBLabel mLabelZoomX;
00252 FBSlider mSliderZoomX;
00253 FBEditNumber mEditNumberZoomX;
00254
00255
00256 FBLabel mLabelAspectRatio;
00257 FBSlider mSliderAspectRatio;
00258 FBEditNumber mEditNumberAspectRatio;
00259 FBLabel mLabelAspectRatioPresets;
00260 FBList mListAspectRatioPresets;
00261
00262 FBLayout mLayoutCommunication;
00263
00264 FBLabel mLabelSyncDelay;
00265 FBSlider mSliderSyncDelay;
00266 FBEditNumber mEditNumberSyncDelay;
00267 FBButton mButtonSyncInfo;
00268
00269
00270 FBButton mButtonEnableSerial;
00271 FBLabel mLabelSerialPort;
00272 FBList mListSerialPort;
00273 FBLabel mLabelSerialBaudRate;
00274 FBList mListSerialBaudRate;
00275
00276
00277 FBButton mButtonEnableNetwork;
00278 FBLabel mLabelNetworkAddress;
00279 FBEdit mEditNetworkAddress;
00280 FBLabel mLabelNetworkPort;
00281 FBEdit mEditNetworkPort;
00282 FBLabel mLabelNetworkProtocol;
00283 FBList mListNetworkProtocol;
00284
00285
00286 FBButton mButtonEnableSharedMemory;
00287 FBLabel mLabelHandle;
00288 FBEdit mEditHandle;
00289 FBLabel mLabelAddress;
00290 FBEdit mEditAddress;
00291
00292
00293 FBButton mButtonEnableSimulator;
00294 FBLabel mLabelSimulatorFrequency;
00295 FBSlider mSliderSimulatorFrequency;
00296 FBEditNumber mEditNumberSimulatorFrequency;
00297 FBLabel mLabelSimulatorAmplitude;
00298 FBSlider mSliderSimulatorAmplitude;
00299 FBEditNumber mEditNumberSimulatorAmplitude;
00300 FBLabel mLabelSimulatorZoom;
00301 FBSlider mSliderSimulatorZoom;
00302 FBEditNumber mEditNumberSimulatorZoom;
00303 FBLabel mLabelSimulatorFocus;
00304 FBSlider mSliderSimulatorFocus;
00305 FBEditNumber mEditNumberSimulatorFocus;
00306
00307 FBLayout mLayoutInfo;
00308 FBSpread mSpreadInfo;
00309
00310 FBLayout mLayoutCustom;
00311
00312 public:
00313
00314 virtual void OnDeviceStatusChange ( HISender pSender, HKEvent pEvent );
00315 virtual void OnUIIdle ( HISender pSender, HKEvent pEvent );
00316
00317
00318 virtual void OnTabPanelChange ( HISender pSender, HKEvent pEvent );
00319 virtual void OnListInstrumentsChange ( HISender pSender, HKEvent pEvent );
00320
00321
00322
00323 virtual void OnButtonActiveClick ( HISender pSender, HKEvent pEvent );
00324 virtual void OnButtonManualChange ( HISender pSender, HKEvent pEvent );
00325 virtual void OnButtonManualFovClick ( HISender pSender, HKEvent pEvent );
00326 virtual void OnButtonManualCenterClick ( HISender pSender, HKEvent pEvent );
00327 virtual void OnFovChange ( HISender pSender, HKEvent pEvent );
00328 virtual void OnFovXSliderChange ( HISender pSender, HKEvent pEvent );
00329 virtual void OnFovYSliderChange ( HISender pSender, HKEvent pEvent );
00330 virtual void OnFovXEditNumberChange ( HISender pSender, HKEvent pEvent );
00331 virtual void OnFovYEditNumberChange ( HISender pSender, HKEvent pEvent );
00332 virtual void OnCenterChange ( HISender pSender, HKEvent pEvent );
00333 virtual void OnCenterXSliderChange ( HISender pSender, HKEvent pEvent );
00334 virtual void OnCenterYSliderChange ( HISender pSender, HKEvent pEvent );
00335 virtual void OnCenterXEditNumberChange ( HISender pSender, HKEvent pEvent );
00336 virtual void OnCenterYEditNumberChange ( HISender pSender, HKEvent pEvent );
00337 virtual void OnOffsetChange ( HISender pSender, HKEvent pEvent );
00338 virtual void OnOffsetTChange ( HISender pSender, HKEvent pEvent );
00339 virtual void OnOffsetRChange ( HISender pSender, HKEvent pEvent );
00340 virtual void OnLensfileChange ( HISender pSender, HKEvent pEvent );
00341 virtual void OnButtonLoadLensfileClick ( HISender pSender, HKEvent pEvent );
00342 virtual void OnButtonResetLensfileClick ( HISender pSender, HKEvent pEvent );
00343 virtual void OnInvertChange ( HISender pSender, HKEvent pEvent );
00344 virtual void OnInvertFocusClick ( HISender pSender, HKEvent pEvent );
00345 virtual void OnInvertZoomClick ( HISender pSender, HKEvent pEvent );
00346 virtual void OnFovUnitsChange ( HISender pSender, HKEvent pEvent );
00347 virtual void OnFovUnitsDegClick ( HISender pSender, HKEvent pEvent );
00348 virtual void OnFovUnitsRadClick ( HISender pSender, HKEvent pEvent );
00349 virtual void OnNodalXChange ( HISender pSender, HKEvent pEvent );
00350 virtual void OnNodalXSliderChange ( HISender pSender, HKEvent pEvent );
00351 virtual void OnNodalXEditNumberChange ( HISender pSender, HKEvent pEvent );
00352 virtual void OnZoomXChange ( HISender pSender, HKEvent pEvent );
00353 virtual void OnZoomXSliderChange ( HISender pSender, HKEvent pEvent );
00354 virtual void OnZoomXEditNumberChange ( HISender pSender, HKEvent pEvent );
00355 virtual void OnAspectRatioChange ( HISender pSender, HKEvent pEvent );
00356 virtual void OnAspectRatioSliderChange ( HISender pSender, HKEvent pEvent );
00357 virtual void OnAspectRatioEditNumberChange ( HISender pSender, HKEvent pEvent );
00358 virtual void OnAspectRatioPresetChange ( HISender pSender, HKEvent pEvent );
00359
00360
00361
00362 virtual void OnSyncDelayChange ( HISender pSender, HKEvent pEvent );
00363 virtual void OnSyncDelaySliderChange ( HISender pSender, HKEvent pEvent );
00364 virtual void OnSyncDelayEditNumberChange ( HISender pSender, HKEvent pEvent );
00365 virtual void OnButtonSyncInfoClick ( HISender pSender, HKEvent pEvent );
00366
00367 virtual void OnEnableChange ( HISender pSender, HKEvent pEvent );
00368 virtual void OnEnableSerialClick ( HISender pSender, HKEvent pEvent );
00369 virtual void OnEnableSimulatorClick ( HISender pSender, HKEvent pEvent );
00370 virtual void OnEnableNetworkClick ( HISender pSender, HKEvent pEvent );
00371 virtual void OnEnableSharedMemoryClick ( HISender pSender, HKEvent pEvent );
00372
00373 virtual void OnSerialChange ( HISender pSender, HKEvent pEvent );
00374 virtual void OnSerialPortChange ( HISender pSender, HKEvent pEvent );
00375 virtual void OnSerialBaudRateChange ( HISender pSender, HKEvent pEvent );
00376 virtual void OnNetworkChange ( HISender pSender, HKEvent pEvent );
00377 virtual void OnNetworkAddressChange ( HISender pSender, HKEvent pEvent );
00378 virtual void OnNetworkPortChange ( HISender pSender, HKEvent pEvent );
00379 virtual void OnNetworkProtocolChange ( HISender pSender, HKEvent pEvent );
00380 virtual void OnSimulatorChange ( HISender pSender, HKEvent pEvent );
00381 virtual void OnSimulatorAmplitudeEditNumberChange ( HISender pSender, HKEvent pEvent );
00382 virtual void OnSimulatorAmplitudeSliderChange ( HISender pSender, HKEvent pEvent );
00383 virtual void OnSimulatorFrequencyEditNumberChange ( HISender pSender, HKEvent pEvent );
00384 virtual void OnSimulatorFrequencySliderChange ( HISender pSender, HKEvent pEvent );
00385 virtual void OnSimulatorZoomEditNumberChange ( HISender pSender, HKEvent pEvent );
00386 virtual void OnSimulatorZoomSliderChange ( HISender pSender, HKEvent pEvent );
00387 virtual void OnSimulatorFocusEditNumberChange ( HISender pSender, HKEvent pEvent );
00388 virtual void OnSimulatorFocusSliderChange ( HISender pSender, HKEvent pEvent );
00389 virtual void OnSharedMemoryChange ( HISender pSender, HKEvent pEvent );
00390 virtual void OnSharedMemoryHandleChange ( HISender pSender, HKEvent pEvent );
00391 virtual void OnSharedMemoryAddressChange ( HISender pSender, HKEvent pEvent );
00392
00393 protected:
00394 HFBDeviceCamera mDeviceCamera;
00395 FBPropertyInt SupportedCommTypes;
00396 FBPropertyBool CustomLayout;
00397 };
00398
00399 #ifdef FBSDKUseNamespace
00400 }
00401 #endif
00402 #endif