]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtextsizepage.h
Use text/uri-list instead of x-moz-url in wxGTK wxURLDataObject.
[wxWidgets.git] / include / wx / richtext / richtextsizepage.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtextsizepage.h
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 #include "wx/valgen.h"
25 ////@end includes
26
27 /*!
28 * Forward declarations
29 */
30
31
32 /*!
33 * Control identifiers
34 */
35
36 ////@begin control identifiers
37 #define SYMBOL_WXRICHTEXTSIZEPAGE_STYLE wxTAB_TRAVERSAL
38 #define SYMBOL_WXRICHTEXTSIZEPAGE_TITLE wxEmptyString
39 #define SYMBOL_WXRICHTEXTSIZEPAGE_IDNAME ID_WXRICHTEXTSIZEPAGE
40 #define SYMBOL_WXRICHTEXTSIZEPAGE_SIZE wxSize(400, 300)
41 #define SYMBOL_WXRICHTEXTSIZEPAGE_POSITION wxDefaultPosition
42 ////@end control identifiers
43
44
45 /*!
46 * wxRichTextSizePage class declaration
47 */
48
49 class WXDLLIMPEXP_RICHTEXT wxRichTextSizePage: public wxRichTextDialogPage
50 {
51 DECLARE_DYNAMIC_CLASS( wxRichTextSizePage )
52 DECLARE_EVENT_TABLE()
53 DECLARE_HELP_PROVISION()
54
55 public:
56 /// Constructors
57 wxRichTextSizePage();
58 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 );
59
60 /// Creation
61 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 );
62
63 /// Destructor
64 ~wxRichTextSizePage();
65
66 /// Initialises member variables
67 void Init();
68
69 /// Creates the controls and sizers
70 void CreateControls();
71
72 /// Gets the attributes from the formatting dialog
73 wxRichTextAttr* GetAttributes();
74
75 /// Data transfer
76 virtual bool TransferDataToWindow();
77 virtual bool TransferDataFromWindow();
78
79 /// Show/hide position controls
80 void ShowPositionControls(bool show);
81
82 /// Show/hide floating controls
83 void ShowFloatingControls(bool show);
84
85 ////@begin wxRichTextSizePage event handler declarations
86
87 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX
88 void OnRichtextVerticalAlignmentComboboxUpdate( wxUpdateUIEvent& event );
89
90 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_WIDTH
91 void OnRichtextWidthUpdate( wxUpdateUIEvent& event );
92
93 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_HEIGHT
94 void OnRichtextHeightUpdate( wxUpdateUIEvent& event );
95
96 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MIN_WIDTH
97 void OnRichtextMinWidthUpdate( wxUpdateUIEvent& event );
98
99 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MIN_HEIGHT
100 void OnRichtextMinHeightUpdate( wxUpdateUIEvent& event );
101
102 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MAX_WIDTH
103 void OnRichtextMaxWidthUpdate( wxUpdateUIEvent& event );
104
105 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MAX_HEIGHT
106 void OnRichtextMaxHeightUpdate( wxUpdateUIEvent& event );
107
108 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT
109 void OnRichtextLeftUpdate( wxUpdateUIEvent& event );
110
111 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT_UNITS
112 void OnRichtextTopUpdate( wxUpdateUIEvent& event );
113
114 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_RIGHT
115 void OnRichtextRightUpdate( wxUpdateUIEvent& event );
116
117 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BOTTOM
118 void OnRichtextBottomUpdate( wxUpdateUIEvent& event );
119
120 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_UP
121 void OnRichtextParaUpClick( wxCommandEvent& event );
122
123 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_DOWN
124 void OnRichtextParaDownClick( wxCommandEvent& event );
125
126 ////@end wxRichTextSizePage event handler declarations
127
128 ////@begin wxRichTextSizePage member function declarations
129
130 int GetPositionMode() const { return m_positionMode ; }
131 void SetPositionMode(int value) { m_positionMode = value ; }
132
133 /// Retrieves bitmap resources
134 wxBitmap GetBitmapResource( const wxString& name );
135
136 /// Retrieves icon resources
137 wxIcon GetIconResource( const wxString& name );
138 ////@end wxRichTextSizePage member function declarations
139
140 /// Should we show tooltips?
141 static bool ShowToolTips();
142
143 ////@begin wxRichTextSizePage member variables
144 wxBoxSizer* m_parentSizer;
145 wxBoxSizer* m_floatingControls;
146 wxComboBox* m_float;
147 wxBoxSizer* m_alignmentControls;
148 wxCheckBox* m_verticalAlignmentCheckbox;
149 wxComboBox* m_verticalAlignmentComboBox;
150 wxCheckBox* m_widthCheckbox;
151 wxTextCtrl* m_width;
152 wxComboBox* m_unitsW;
153 wxCheckBox* m_heightCheckbox;
154 wxTextCtrl* m_height;
155 wxComboBox* m_unitsH;
156 wxCheckBox* m_minWidthCheckbox;
157 wxTextCtrl* m_minWidth;
158 wxComboBox* m_unitsMinW;
159 wxCheckBox* m_minHeightCheckbox;
160 wxTextCtrl* m_minHeight;
161 wxComboBox* m_unitsMinH;
162 wxCheckBox* m_maxWidthCheckbox;
163 wxTextCtrl* m_maxWidth;
164 wxComboBox* m_unitsMaxW;
165 wxCheckBox* m_maxHeightCheckbox;
166 wxTextCtrl* m_maxHeight;
167 wxComboBox* m_unitsMaxH;
168 wxBoxSizer* m_positionControls;
169 wxBoxSizer* m_moveObjectParentSizer;
170 wxComboBox* m_positionModeCtrl;
171 wxCheckBox* m_positionLeftCheckbox;
172 wxTextCtrl* m_left;
173 wxComboBox* m_unitsLeft;
174 wxCheckBox* m_positionTopCheckbox;
175 wxTextCtrl* m_top;
176 wxComboBox* m_unitsTop;
177 wxCheckBox* m_positionRightCheckbox;
178 wxTextCtrl* m_right;
179 wxComboBox* m_unitsRight;
180 wxCheckBox* m_positionBottomCheckbox;
181 wxTextCtrl* m_bottom;
182 wxComboBox* m_unitsBottom;
183 wxBoxSizer* m_moveObjectSizer;
184 int m_positionMode;
185 /// Control identifiers
186 enum {
187 ID_WXRICHTEXTSIZEPAGE = 10700,
188 ID_RICHTEXT_FLOATING_MODE = 10701,
189 ID_RICHTEXT_VERTICAL_ALIGNMENT_CHECKBOX = 10708,
190 ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX = 10709,
191 ID_RICHTEXT_WIDTH_CHECKBOX = 10702,
192 ID_RICHTEXT_WIDTH = 10703,
193 ID_RICHTEXT_UNITS_W = 10704,
194 ID_RICHTEXT_HEIGHT_CHECKBOX = 10705,
195 ID_RICHTEXT_HEIGHT = 10706,
196 ID_RICHTEXT_UNITS_H = 10707,
197 ID_RICHTEXT_MIN_WIDTH_CHECKBOX = 10715,
198 ID_RICHTEXT_MIN_WIDTH = 10716,
199 ID_RICHTEXT_UNITS_MIN_W = 10717,
200 ID_RICHTEXT_MIN_HEIGHT_CHECKBOX = 10718,
201 ID_RICHTEXT_MIN_HEIGHT = 10719,
202 ID_RICHTEXT_UNITS_MIN_H = 10720,
203 ID_RICHTEXT_MAX_WIDTH_CHECKBOX = 10721,
204 ID_RICHTEXT_MAX_WIDTH = 10722,
205 ID_RICHTEXT_UNITS_MAX_W = 10723,
206 ID_RICHTEXT_MAX_HEIGHT_CHECKBOX = 10724,
207 ID_RICHTEXT_MAX_HEIGHT = 10725,
208 ID_RICHTEXT_UNITS_MAX_H = 10726,
209 ID_RICHTEXT_POSITION_MODE = 10735,
210 ID_RICHTEXT_LEFT_CHECKBOX = 10710,
211 ID_RICHTEXT_LEFT = 10711,
212 ID_RICHTEXT_LEFT_UNITS = 10712,
213 ID_RICHTEXT_TOP_CHECKBOX = 10710,
214 ID_RICHTEXT_TOP = 10728,
215 ID_RICHTEXT_TOP_UNITS = 10729,
216 ID_RICHTEXT_RIGHT_CHECKBOX = 10727,
217 ID_RICHTEXT_RIGHT = 10730,
218 ID_RICHTEXT_RIGHT_UNITS = 10731,
219 ID_RICHTEXT_BOTTOM_CHECKBOX = 10732,
220 ID_RICHTEXT_BOTTOM = 10733,
221 ID_RICHTEXT_BOTTOM_UNITS = 10734,
222 ID_RICHTEXT_PARA_UP = 10713,
223 ID_RICHTEXT_PARA_DOWN = 10714
224 };
225 ////@end wxRichTextSizePage member variables
226 };
227
228 #endif
229 // _RICHTEXTSIZEPAGE_H_