]> git.saurik.com Git - wxWidgets.git/blob - utils/dialoged/src/winstyle.h
fixed bug with using wxCommandEvent::GetInt() instead of GetId()
[wxWidgets.git] / utils / dialoged / src / winstyle.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: winstyle.h
3 // Purpose: Window styles
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _DE_WINSTYLE_H_
13 #define _DE_WINSTYLE_H_
14
15 #ifdef __GNUG__
16 #pragma interface "winstyle.h"
17 #endif
18
19 #include "wx/wx.h"
20
21 /*
22 * A class for storing/generating window styles.
23 */
24
25 class wxWindowStyleClass;
26
27 class wxWindowStylePair
28 {
29 friend class wxWindowStyleClass;
30 public:
31 char* m_styleName;
32 long m_styleId;
33 };
34
35 class wxWindowStyleTable: public wxObject
36 {
37 public:
38 wxWindowStyleTable();
39 ~wxWindowStyleTable();
40
41 // Operations
42 void ClearTable();
43 void AddStyles(const wxString& className, int n, wxWindowStylePair *styles);
44 wxWindowStyleClass* FindClass(const wxString& className) ;
45 bool GenerateStyleStrings(const wxString& className, long windowStyle, char *buf);
46
47 // Initialise with all possible styles
48 void Init();
49
50 // Members
51 protected:
52 wxList m_classes; // A list of wxWindowStyleClass objects, indexed by class name
53
54 };
55
56 /*
57 * Classes for storing all the window style identifiers associated with a particular class
58 */
59
60 class wxWindowStyleClass: public wxObject
61 {
62 public:
63 wxWindowStyleClass(int n, wxWindowStylePair *styles);
64 ~wxWindowStyleClass();
65
66 // Operations
67 void GenerateStyleStrings(long windowStyle, char *buf);
68 bool GenerateStyle(char *buf, long windowStyle, long flag, const wxString& strStyle);
69
70 // Members
71 protected:
72 wxWindowStylePair* m_styles; // An array of wxWindowStylePair objects
73 int m_styleCount;
74 };
75
76 #endif
77 // _DE_WINSTYLE_H_