dsrc isn't necessary for this repo
[client-tools.git] / src / external / 3rd / application / UiBuilder / DefaultObjectPropertiesManager.h
blob42ce971394f9ec2a247f3a1e8788e614e3f02e16
1 #ifndef __DEFAULTPROPERTYSETTINGS_H__
2 #define __DEFAULTPROPERTYSETTINGS_H__
4 #include "UIBaseObject.h"
6 #include <map>
7 #include <hash_map>
8 #include <list>
10 class DefaultObjectPropertiesManager
12 public:
14 typedef std::hash_map<UINarrowString, UIString> StringMap;
16 struct DefaultObjectProperties
18 UITypeID TypeID;
19 UINarrowString TypeName;
20 StringMap Properties;
23 typedef std::list<DefaultObjectProperties> DefaultObjectPropertiesList;
26 DefaultObjectPropertiesManager();
27 void ApplyDefaultPropertiesToObject( UIBaseObject * ) const;
28 void DisplayEditDialog( HWND hParent );
30 void SaveTo( FILE * );
31 void LoadFrom( FILE * );
33 private:
35 void LoadDataToDialog( HWND );
36 void LoadDefaultsToListbox( HWND );
38 void HandleOwnerDraw( HWND hwndDlg, WPARAM wParam, LPARAM lParam );
39 void AddNewProperty( HWND hwndDlg );
40 void RemoveSelectedProperty( HWND hwndDlg );
42 static BOOL CALLBACK DefaultObjectPropertiesManagerStaticWindowProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
43 BOOL DefaultObjectPropertiesManagerWindowProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam );
45 DefaultObjectPropertiesList mDefaultObjectProperties;
46 DefaultObjectPropertiesList mWorkingObjectProperties;
47 StringMap *mSelectedPropertyMap;
48 HWND mPropertyListbox;
51 #endif /* __DEFAULTPROPERTYSETTINGS_H__ */