]>
Commit | Line | Data |
---|---|---|
603f702b | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/richtext/richtextsizepage.h |
603f702b JS |
3 | // Purpose: |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 20/10/2010 10:23:24 | |
7 | // RCS-ID: | |
8 | // Copyright: (c) Julian Smart | |
9 | // Licence: | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _RICHTEXTSIZEPAGE_H_ | |
13 | #define _RICHTEXTSIZEPAGE_H_ | |
14 | ||
15 | /*! | |
16 | * Includes | |
17 | */ | |
18 | ||
19 | #include "wx/richtext/richtextdialogpage.h" | |
20 | #include "wx/sizer.h" | |
21 | ||
22 | ////@begin includes | |
23 | #include "wx/statline.h" | |
24 | ////@end includes | |
25 | ||
26 | /*! | |
27 | * Forward declarations | |
28 | */ | |
29 | ||
30 | ||
31 | /*! | |
32 | * Control identifiers | |
33 | */ | |
34 | ||
35 | ////@begin control identifiers | |
36 | #define SYMBOL_WXRICHTEXTSIZEPAGE_STYLE wxTAB_TRAVERSAL | |
37 | #define SYMBOL_WXRICHTEXTSIZEPAGE_TITLE wxEmptyString | |
38 | #define SYMBOL_WXRICHTEXTSIZEPAGE_IDNAME ID_WXRICHTEXTSIZEPAGE | |
39 | #define SYMBOL_WXRICHTEXTSIZEPAGE_SIZE wxSize(400, 300) | |
40 | #define SYMBOL_WXRICHTEXTSIZEPAGE_POSITION wxDefaultPosition | |
41 | ////@end control identifiers | |
42 | ||
43 | ||
44 | /*! | |
45 | * wxRichTextSizePage class declaration | |
46 | */ | |
47 | ||
48 | class WXDLLIMPEXP_RICHTEXT wxRichTextSizePage: public wxRichTextDialogPage | |
49 | { | |
50 | DECLARE_DYNAMIC_CLASS( wxRichTextSizePage ) | |
51 | DECLARE_EVENT_TABLE() | |
52 | DECLARE_HELP_PROVISION() | |
53 | ||
54 | public: | |
55 | /// Constructors | |
56 | wxRichTextSizePage(); | |
57 | wxRichTextSizePage( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTSIZEPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTSIZEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSIZEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSIZEPAGE_STYLE ); | |
58 | ||
59 | /// Creation | |
60 | bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTSIZEPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTSIZEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTSIZEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTSIZEPAGE_STYLE ); | |
61 | ||
62 | /// Destructor | |
63 | ~wxRichTextSizePage(); | |
64 | ||
65 | /// Initialises member variables | |
66 | void Init(); | |
67 | ||
68 | /// Creates the controls and sizers | |
69 | void CreateControls(); | |
70 | ||
71 | /// Gets the attributes from the formatting dialog | |
72 | wxRichTextAttr* GetAttributes(); | |
73 | ||
74 | /// Data transfer | |
75 | virtual bool TransferDataToWindow(); | |
76 | virtual bool TransferDataFromWindow(); | |
77 | ||
78 | /// Show/hide position controls | |
79 | void ShowPositionControls(bool show); | |
80 | ||
81 | /// Show/hide floating controls | |
82 | void ShowFloatingControls(bool show); | |
83 | ||
84 | ////@begin wxRichTextSizePage event handler declarations | |
85 | ||
86 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_WIDTH | |
87 | void OnRichtextWidthUpdate( wxUpdateUIEvent& event ); | |
88 | ||
89 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_HEIGHT | |
90 | void OnRichtextHeightUpdate( wxUpdateUIEvent& event ); | |
91 | ||
303f0be7 JS |
92 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MIN_WIDTH |
93 | void OnRichtextMinWidthUpdate( wxUpdateUIEvent& event ); | |
94 | ||
95 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MIN_HEIGHT | |
96 | void OnRichtextMinHeightUpdate( wxUpdateUIEvent& event ); | |
97 | ||
98 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MAX_WIDTH | |
99 | void OnRichtextMaxWidthUpdate( wxUpdateUIEvent& event ); | |
100 | ||
101 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MAX_HEIGHT | |
102 | void OnRichtextMaxHeightUpdate( wxUpdateUIEvent& event ); | |
103 | ||
603f702b JS |
104 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX |
105 | void OnRichtextVerticalAlignmentComboboxUpdate( wxUpdateUIEvent& event ); | |
106 | ||
107 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_OFFSET | |
108 | void OnRichtextOffsetUpdate( wxUpdateUIEvent& event ); | |
109 | ||
110 | /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_UP | |
111 | void OnRichtextParaUpClick( wxCommandEvent& event ); | |
112 | ||
113 | /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_DOWN | |
114 | void OnRichtextParaDownClick( wxCommandEvent& event ); | |
115 | ||
116 | ////@end wxRichTextSizePage event handler declarations | |
117 | ||
118 | ////@begin wxRichTextSizePage member function declarations | |
119 | ||
120 | /// Retrieves bitmap resources | |
121 | wxBitmap GetBitmapResource( const wxString& name ); | |
122 | ||
123 | /// Retrieves icon resources | |
124 | wxIcon GetIconResource( const wxString& name ); | |
125 | ////@end wxRichTextSizePage member function declarations | |
126 | ||
127 | /// Should we show tooltips? | |
128 | static bool ShowToolTips(); | |
129 | ||
130 | ////@begin wxRichTextSizePage member variables | |
131 | wxBoxSizer* m_parentSizer; | |
132 | wxBoxSizer* m_floatingControls; | |
133 | wxComboBox* m_float; | |
134 | wxCheckBox* m_widthCheckbox; | |
135 | wxTextCtrl* m_width; | |
136 | wxComboBox* m_unitsW; | |
137 | wxCheckBox* m_heightCheckbox; | |
138 | wxTextCtrl* m_height; | |
139 | wxComboBox* m_unitsH; | |
303f0be7 JS |
140 | wxCheckBox* m_minWidthCheckbox; |
141 | wxTextCtrl* m_minWidth; | |
142 | wxComboBox* m_unitsMinW; | |
143 | wxCheckBox* m_minHeightCheckbox; | |
144 | wxTextCtrl* m_minHeight; | |
145 | wxComboBox* m_unitsMinH; | |
146 | wxCheckBox* m_maxWidthCheckbox; | |
147 | wxTextCtrl* m_maxWidth; | |
148 | wxComboBox* m_unitsMaxW; | |
149 | wxCheckBox* m_maxHeightCheckbox; | |
150 | wxTextCtrl* m_maxHeight; | |
151 | wxComboBox* m_unitsMaxH; | |
603f702b JS |
152 | wxBoxSizer* m_alignmentControls; |
153 | wxCheckBox* m_verticalAlignmentCheckbox; | |
154 | wxComboBox* m_verticalAlignmentComboBox; | |
155 | wxBoxSizer* m_positionControls; | |
156 | wxBoxSizer* m_moveObjectParentSizer; | |
157 | wxCheckBox* m_offsetYCheckbox; | |
158 | wxTextCtrl* m_offset; | |
159 | wxComboBox* m_unitsOffset; | |
160 | wxBoxSizer* m_moveObjectSizer; | |
161 | /// Control identifiers | |
162 | enum { | |
163 | ID_WXRICHTEXTSIZEPAGE = 10700, | |
164 | ID_RICHTEXT_FLOATING_MODE = 10701, | |
165 | ID_RICHTEXT_WIDTH_CHECKBOX = 10702, | |
166 | ID_RICHTEXT_WIDTH = 10703, | |
167 | ID_RICHTEXT_UNITS_W = 10704, | |
168 | ID_RICHTEXT_HEIGHT_CHECKBOX = 10705, | |
169 | ID_RICHTEXT_HEIGHT = 10706, | |
170 | ID_RICHTEXT_UNITS_H = 10707, | |
303f0be7 JS |
171 | ID_RICHTEXT_MIN_WIDTH_CHECKBOX = 10715, |
172 | ID_RICHTEXT_MIN_WIDTH = 10716, | |
173 | ID_RICHTEXT_UNITS_MIN_W = 10717, | |
174 | ID_RICHTEXT_MIN_HEIGHT_CHECKBOX = 10718, | |
175 | ID_RICHTEXT_MIN_HEIGHT = 10719, | |
176 | ID_RICHTEXT_UNITS_MIN_H = 10720, | |
177 | ID_RICHTEXT_MAX_WIDTH_CHECKBOX = 10721, | |
178 | ID_RICHTEXT_MAX_WIDTH = 10722, | |
179 | ID_RICHTEXT_UNITS_MAX_W = 10723, | |
180 | ID_RICHTEXT_MAX_HEIGHT_CHECKBOX = 10724, | |
181 | ID_RICHTEXT_MAX_HEIGHT = 10725, | |
182 | ID_RICHTEXT_UNITS_MAX_H = 10726, | |
603f702b JS |
183 | ID_RICHTEXT_VERTICAL_ALIGNMENT_CHECKBOX = 10708, |
184 | ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX = 10709, | |
185 | ID_RICHTEXT_OFFSET_CHECKBOX = 10710, | |
186 | ID_RICHTEXT_OFFSET = 10711, | |
187 | ID_RICHTEXT_OFFSET_UNITS = 10712, | |
188 | ID_RICHTEXT_PARA_UP = 10713, | |
189 | ID_RICHTEXT_PARA_DOWN = 10714 | |
190 | }; | |
191 | ////@end wxRichTextSizePage member variables | |
192 | }; | |
193 | ||
194 | #endif | |
195 | // _RICHTEXTSIZEPAGE_H_ |