dsrc isn't necessary for this repo
[client-tools.git] / src / external / 3rd / application / UiBuilder / SelectRegion.h
blob251da0445c4a1a820e88be11395f40f5fc382956
1 #ifndef __SELECTREGION_H__
2 #define __SELECTREGION_H__
4 #include "UITypes.h"
5 #include "UIString.h"
6 #include "UISmartPointer.h"
7 #include "selectionrect.h"
9 class UIImage;
10 class UIImageStyle;
11 class UIDirect3DPrimaryCanvas;
13 class SelectRegionDialogBox
15 public:
17 SelectRegionDialogBox( void );
19 bool EditProperty( HWND hwndParent, UIImageStyle *theStyle, UIString &Value );
20 bool EditProperty( HWND hwndParent, UIImage *theImage, UIString &Value );
22 private:
24 void UpdateTextbox( void );
25 void UpdateSelectionRect( void );
26 void ReadRectFromTextbox( void );
27 void EnableControls( void );
28 void UpdateScrollbars( HWND hwnd, const UIPoint * center = 0 );
29 void UpdateCanvasScrollPosition( HWND hwnd, UINT uMsg, WPARAM wParam );
30 void SizeToContent( void );
31 void ShowZoomLevel( void );
32 LPARAM InverseTranslateLParam( LPARAM );
34 BOOL CALLBACK DialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
35 BOOL CALLBACK CanvasProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
37 static BOOL CALLBACK StaticDialogProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
38 static BOOL CALLBACK StaticCanvasProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
40 HWND mHwnd;
42 UIRect mRegion;
43 UISmartPointer<UIImageStyle> mStyle;
44 UISmartPointer<UIImage> mImage;
45 UIDirect3DPrimaryCanvas *mDisplay;
47 float mZoomLevel;
49 UISize mImageSize;
50 UISize mOldSize;
51 UISize mInitialSize;
52 UIPoint mScrollOffset;
54 SelectionRect mSelectionRect;
55 bool mDrawHighlight;
57 static SelectRegionDialogBox *sThis;
60 #endif // __SELECTREGION_H__