1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/richtext/richtextsizepage.cpp
4 // Author: Julian Smart
6 // Created: 20/10/2010 10:23:24
8 // Copyright: (c) Julian Smart
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/richtext/richtextsizepage.h"
19 * wxRichTextSizePage type definition
22 IMPLEMENT_DYNAMIC_CLASS( wxRichTextSizePage
, wxRichTextDialogPage
)
26 * wxRichTextSizePage event table definition
29 BEGIN_EVENT_TABLE( wxRichTextSizePage
, wxRichTextDialogPage
)
31 ////@begin wxRichTextSizePage event table entries
32 EVT_UPDATE_UI( ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX
, wxRichTextSizePage::OnRichtextVerticalAlignmentComboboxUpdate
)
33 EVT_UPDATE_UI( ID_RICHTEXT_WIDTH
, wxRichTextSizePage::OnRichtextWidthUpdate
)
34 EVT_UPDATE_UI( ID_RICHTEXT_UNITS_W
, wxRichTextSizePage::OnRichtextWidthUnitsUpdate
)
35 EVT_UPDATE_UI( ID_RICHTEXT_HEIGHT
, wxRichTextSizePage::OnRichtextHeightUpdate
)
36 EVT_UPDATE_UI( ID_RICHTEXT_UNITS_H
, wxRichTextSizePage::OnRichtextHeightUnitsUpdate
)
37 EVT_UPDATE_UI( ID_RICHTEXT_MIN_WIDTH
, wxRichTextSizePage::OnRichtextMinWidthUpdate
)
38 EVT_UPDATE_UI( ID_RICHTEXT_UNITS_MIN_W
, wxRichTextSizePage::OnRichtextMinWidthUpdate
)
39 EVT_UPDATE_UI( ID_RICHTEXT_MIN_HEIGHT
, wxRichTextSizePage::OnRichtextMinHeightUpdate
)
40 EVT_UPDATE_UI( ID_RICHTEXT_UNITS_MIN_H
, wxRichTextSizePage::OnRichtextMinHeightUpdate
)
41 EVT_UPDATE_UI( ID_RICHTEXT_MAX_WIDTH
, wxRichTextSizePage::OnRichtextMaxWidthUpdate
)
42 EVT_UPDATE_UI( ID_RICHTEXT_UNITS_MAX_W
, wxRichTextSizePage::OnRichtextMaxWidthUpdate
)
43 EVT_UPDATE_UI( ID_RICHTEXT_MAX_HEIGHT
, wxRichTextSizePage::OnRichtextMaxHeightUpdate
)
44 EVT_UPDATE_UI( ID_RICHTEXT_UNITS_MAX_H
, wxRichTextSizePage::OnRichtextMaxHeightUpdate
)
45 EVT_UPDATE_UI( ID_RICHTEXT_LEFT
, wxRichTextSizePage::OnRichtextLeftUpdate
)
46 EVT_UPDATE_UI( ID_RICHTEXT_LEFT_UNITS
, wxRichTextSizePage::OnRichtextLeftUnitsUpdate
)
47 EVT_UPDATE_UI( ID_RICHTEXT_TOP
, wxRichTextSizePage::OnRichtextTopUpdate
)
48 EVT_UPDATE_UI( ID_RICHTEXT_TOP_UNITS
, wxRichTextSizePage::OnRichtextTopUnitsUpdate
)
49 EVT_UPDATE_UI( ID_RICHTEXT_RIGHT
, wxRichTextSizePage::OnRichtextRightUpdate
)
50 EVT_UPDATE_UI( ID_RICHTEXT_RIGHT_UNITS
, wxRichTextSizePage::OnRichtextRightUnitsUpdate
)
51 EVT_UPDATE_UI( ID_RICHTEXT_BOTTOM
, wxRichTextSizePage::OnRichtextBottomUpdate
)
52 EVT_UPDATE_UI( ID_RICHTEXT_BOTTOM_UNITS
, wxRichTextSizePage::OnRichtextBottomUnitsUpdate
)
53 EVT_BUTTON( ID_RICHTEXT_PARA_UP
, wxRichTextSizePage::OnRichtextParaUpClick
)
54 EVT_BUTTON( ID_RICHTEXT_PARA_DOWN
, wxRichTextSizePage::OnRichtextParaDownClick
)
55 ////@end wxRichTextSizePage event table entries
59 IMPLEMENT_HELP_PROVISION(wxRichTextSizePage
)
61 bool wxRichTextSizePage::sm_showFloatingControls
= true;
62 bool wxRichTextSizePage::sm_showMinMaxSizeControls
= true;
63 bool wxRichTextSizePage::sm_showPositionControls
= true;
64 bool wxRichTextSizePage::sm_showPositionModeControls
= true;
65 bool wxRichTextSizePage::sm_showRightBottomPositionControls
= true;
66 bool wxRichTextSizePage::sm_showAlignmentControls
= true;
67 bool wxRichTextSizePage::sm_showFloatingAndAlignmentControls
= true;
68 bool wxRichTextSizePage::sm_enablePositionAndSizeUnits
= true;
69 bool wxRichTextSizePage::sm_enablePositionAndSizeCheckboxes
= true;
72 * wxRichTextSizePage constructors
75 wxRichTextSizePage::wxRichTextSizePage()
80 wxRichTextSizePage::wxRichTextSizePage( wxWindow
* parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
, long style
)
83 Create(parent
, id
, pos
, size
, style
);
88 * wxRichTextSizePage creator
91 bool wxRichTextSizePage::Create( wxWindow
* parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
, long style
)
93 ////@begin wxRichTextSizePage creation
94 wxRichTextDialogPage::Create( parent
, id
, pos
, size
, style
);
99 GetSizer()->SetSizeHints(this);
102 ////@end wxRichTextSizePage creation
108 * wxRichTextSizePage destructor
111 wxRichTextSizePage::~wxRichTextSizePage()
113 sm_showFloatingControls
= true;
114 sm_showPositionControls
= true;
115 sm_showPositionModeControls
= true;
116 sm_showRightBottomPositionControls
= true;
117 sm_showAlignmentControls
= true;
118 sm_showFloatingAndAlignmentControls
= true;
119 sm_showMinMaxSizeControls
= true;
120 sm_showMinMaxSizeControls
= true;
121 sm_enablePositionAndSizeCheckboxes
= true;
123 ////@begin wxRichTextSizePage destruction
124 ////@end wxRichTextSizePage destruction
129 * Member initialisation
132 void wxRichTextSizePage::Init()
134 ////@begin wxRichTextSizePage member initialisation
136 m_parentSizer
= NULL
;
137 m_floatingAlignmentSizer
= NULL
;
138 m_floatingSizer
= NULL
;
140 m_alignmentSizer
= NULL
;
141 m_verticalAlignmentCheckbox
= NULL
;
142 m_verticalAlignmentComboBox
= NULL
;
145 m_widthCheckbox
= NULL
;
149 m_heightSizer
= NULL
;
150 m_heightCheckbox
= NULL
;
151 m_heightLabel
= NULL
;
154 m_minWidthCheckbox
= NULL
;
155 m_minWidthSizer
= NULL
;
158 m_minHeightCheckbox
= NULL
;
159 m_minHeightSizer
= NULL
;
162 m_maxWidthCheckbox
= NULL
;
163 m_maxWidthSizer
= NULL
;
166 m_maxHeightCheckbox
= NULL
;
167 m_maxHeightSizer
= NULL
;
170 m_positionControls
= NULL
;
171 m_moveObjectParentSizer
= NULL
;
172 m_positionModeSizer
= NULL
;
173 m_positionModeCtrl
= NULL
;
174 m_positionGridSizer
= NULL
;
176 m_positionLeftCheckbox
= NULL
;
181 m_positionTopCheckbox
= NULL
;
186 m_positionRightCheckbox
= NULL
;
188 m_rightPositionSizer
= NULL
;
191 m_bottomSizer
= NULL
;
192 m_positionBottomCheckbox
= NULL
;
193 m_bottomLabel
= NULL
;
194 m_bottomPositionSizer
= NULL
;
196 m_unitsBottom
= NULL
;
197 m_moveObjectSizer
= NULL
;
198 ////@end wxRichTextSizePage member initialisation
203 * Control creation for wxRichTextSizePage
206 void wxRichTextSizePage::CreateControls()
208 ////@begin wxRichTextSizePage content construction
209 wxRichTextSizePage
* itemRichTextDialogPage1
= this;
211 wxBoxSizer
* itemBoxSizer2
= new wxBoxSizer(wxVERTICAL
);
212 itemRichTextDialogPage1
->SetSizer(itemBoxSizer2
);
214 m_parentSizer
= new wxBoxSizer(wxVERTICAL
);
215 itemBoxSizer2
->Add(m_parentSizer
, 0, wxGROW
|wxALL
, 5);
217 m_floatingAlignmentSizer
= new wxBoxSizer(wxHORIZONTAL
);
218 m_parentSizer
->Add(m_floatingAlignmentSizer
, 0, wxGROW
, 5);
220 m_floatingSizer
= new wxBoxSizer(wxHORIZONTAL
);
221 m_floatingAlignmentSizer
->Add(m_floatingSizer
, 1, wxALIGN_CENTER_VERTICAL
, 5);
223 wxBoxSizer
* itemBoxSizer6
= new wxBoxSizer(wxVERTICAL
);
224 m_floatingSizer
->Add(itemBoxSizer6
, 0, wxALIGN_CENTER_VERTICAL
, 5);
226 wxBoxSizer
* itemBoxSizer7
= new wxBoxSizer(wxHORIZONTAL
);
227 itemBoxSizer6
->Add(itemBoxSizer7
, 0, wxGROW
, 5);
229 wxStaticText
* itemStaticText8
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("Floating"), wxDefaultPosition
, wxDefaultSize
, 0 );
230 itemStaticText8
->SetFont(wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetPointSize(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetFamily(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetStyle(), wxBOLD
, false, wxT("")));
231 itemBoxSizer7
->Add(itemStaticText8
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
233 wxStaticLine
* itemStaticLine9
= new wxStaticLine( itemRichTextDialogPage1
, wxID_STATIC
, wxDefaultPosition
, wxDefaultSize
, wxLI_HORIZONTAL
);
234 itemBoxSizer7
->Add(itemStaticLine9
, 1, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
236 wxBoxSizer
* itemBoxSizer10
= new wxBoxSizer(wxHORIZONTAL
);
237 itemBoxSizer6
->Add(itemBoxSizer10
, 0, wxGROW
, 5);
239 itemBoxSizer10
->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
241 wxFlexGridSizer
* itemFlexGridSizer12
= new wxFlexGridSizer(0, 2, 0, 0);
242 itemBoxSizer10
->Add(itemFlexGridSizer12
, 0, wxALIGN_CENTER_VERTICAL
|wxRIGHT
, 5);
244 wxStaticText
* itemStaticText13
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("&Floating mode:"), wxDefaultPosition
, wxDefaultSize
, 0 );
245 itemFlexGridSizer12
->Add(itemStaticText13
, 0, wxALIGN_RIGHT
|wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
247 wxArrayString m_floatStrings
;
248 m_floatStrings
.Add(_("None"));
249 m_floatStrings
.Add(_("Left"));
250 m_floatStrings
.Add(_("Right"));
251 m_float
= new wxChoice( itemRichTextDialogPage1
, ID_RICHTEXT_FLOATING_MODE
, wxDefaultPosition
, wxSize(80, -1), m_floatStrings
, 0 );
252 m_float
->SetStringSelection(_("None"));
253 m_float
->SetHelpText(_("How the object will float relative to the text."));
254 if (wxRichTextSizePage::ShowToolTips())
255 m_float
->SetToolTip(_("How the object will float relative to the text."));
256 itemFlexGridSizer12
->Add(m_float
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
258 m_floatingSizer
->Add(0, 0, 1, wxALIGN_CENTER_VERTICAL
, 5);
260 m_alignmentSizer
= new wxBoxSizer(wxVERTICAL
);
261 m_floatingAlignmentSizer
->Add(m_alignmentSizer
, 0, wxALIGN_CENTER_VERTICAL
, 5);
263 wxBoxSizer
* itemBoxSizer17
= new wxBoxSizer(wxHORIZONTAL
);
264 m_alignmentSizer
->Add(itemBoxSizer17
, 0, wxGROW
, 5);
266 wxStaticText
* itemStaticText18
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("Alignment"), wxDefaultPosition
, wxDefaultSize
, 0 );
267 itemStaticText18
->SetFont(wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetPointSize(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetFamily(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetStyle(), wxBOLD
, false, wxT("")));
268 itemBoxSizer17
->Add(itemStaticText18
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
270 wxStaticLine
* itemStaticLine19
= new wxStaticLine( itemRichTextDialogPage1
, wxID_STATIC
, wxDefaultPosition
, wxDefaultSize
, wxLI_HORIZONTAL
);
271 itemBoxSizer17
->Add(itemStaticLine19
, 1, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
273 wxBoxSizer
* itemBoxSizer20
= new wxBoxSizer(wxHORIZONTAL
);
274 m_alignmentSizer
->Add(itemBoxSizer20
, 0, wxGROW
, 5);
276 itemBoxSizer20
->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
278 m_verticalAlignmentCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_VERTICAL_ALIGNMENT_CHECKBOX
, _("&Vertical alignment:"), wxDefaultPosition
, wxDefaultSize
, 0 );
279 m_verticalAlignmentCheckbox
->SetValue(false);
280 m_verticalAlignmentCheckbox
->SetHelpText(_("Enable vertical alignment."));
281 if (wxRichTextSizePage::ShowToolTips())
282 m_verticalAlignmentCheckbox
->SetToolTip(_("Enable vertical alignment."));
283 itemBoxSizer20
->Add(m_verticalAlignmentCheckbox
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
285 wxArrayString m_verticalAlignmentComboBoxStrings
;
286 m_verticalAlignmentComboBoxStrings
.Add(_("Top"));
287 m_verticalAlignmentComboBoxStrings
.Add(_("Centred"));
288 m_verticalAlignmentComboBoxStrings
.Add(_("Bottom"));
289 m_verticalAlignmentComboBox
= new wxChoice( itemRichTextDialogPage1
, ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX
, wxDefaultPosition
, wxDefaultSize
, m_verticalAlignmentComboBoxStrings
, 0 );
290 m_verticalAlignmentComboBox
->SetStringSelection(_("Top"));
291 m_verticalAlignmentComboBox
->SetHelpText(_("Vertical alignment."));
292 if (wxRichTextSizePage::ShowToolTips())
293 m_verticalAlignmentComboBox
->SetToolTip(_("Vertical alignment."));
294 itemBoxSizer20
->Add(m_verticalAlignmentComboBox
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
296 wxBoxSizer
* itemBoxSizer24
= new wxBoxSizer(wxHORIZONTAL
);
297 m_parentSizer
->Add(itemBoxSizer24
, 0, wxGROW
, 5);
299 wxStaticText
* itemStaticText25
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("Size"), wxDefaultPosition
, wxDefaultSize
, 0 );
300 itemStaticText25
->SetFont(wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetPointSize(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetFamily(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetStyle(), wxBOLD
, false, wxT("")));
301 itemBoxSizer24
->Add(itemStaticText25
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
303 wxStaticLine
* itemStaticLine26
= new wxStaticLine( itemRichTextDialogPage1
, wxID_STATIC
, wxDefaultPosition
, wxDefaultSize
, wxLI_HORIZONTAL
);
304 itemBoxSizer24
->Add(itemStaticLine26
, 1, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
306 wxBoxSizer
* itemBoxSizer27
= new wxBoxSizer(wxHORIZONTAL
);
307 m_parentSizer
->Add(itemBoxSizer27
, 0, wxGROW
, 5);
309 itemBoxSizer27
->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
311 m_sizeSizer
= new wxFlexGridSizer(0, 4, 0, 0);
312 itemBoxSizer27
->Add(m_sizeSizer
, 0, wxALIGN_CENTER_VERTICAL
, 5);
314 m_widthSizer
= new wxBoxSizer(wxHORIZONTAL
);
315 m_sizeSizer
->Add(m_widthSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
317 m_widthCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_WIDTH_CHECKBOX
, _("&Width:"), wxDefaultPosition
, wxDefaultSize
, 0 );
318 m_widthCheckbox
->SetValue(false);
319 m_widthCheckbox
->SetHelpText(_("Enable the width value."));
320 if (wxRichTextSizePage::ShowToolTips())
321 m_widthCheckbox
->SetToolTip(_("Enable the width value."));
322 m_widthSizer
->Add(m_widthCheckbox
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
324 m_widthLabel
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("&Width:"), wxDefaultPosition
, wxDefaultSize
, 0 );
325 m_widthLabel
->Show(false);
326 m_widthSizer
->Add(m_widthLabel
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
328 wxBoxSizer
* itemBoxSizer33
= new wxBoxSizer(wxHORIZONTAL
);
329 m_sizeSizer
->Add(itemBoxSizer33
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
331 m_width
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_WIDTH
, wxEmptyString
, wxDefaultPosition
, wxSize(60, -1), 0 );
332 m_width
->SetHelpText(_("The object width."));
333 if (wxRichTextSizePage::ShowToolTips())
334 m_width
->SetToolTip(_("The object width."));
335 itemBoxSizer33
->Add(m_width
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
337 wxArrayString m_unitsWStrings
;
338 m_unitsWStrings
.Add(_("px"));
339 m_unitsWStrings
.Add(_("cm"));
340 m_unitsWStrings
.Add(_("percent"));
341 m_unitsW
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_UNITS_W
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsWStrings
, wxCB_READONLY
);
342 m_unitsW
->SetStringSelection(_("px"));
343 m_unitsW
->SetHelpText(_("Units for the object width."));
344 if (wxRichTextSizePage::ShowToolTips())
345 m_unitsW
->SetToolTip(_("Units for the object width."));
346 itemBoxSizer33
->Add(m_unitsW
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
348 m_heightSizer
= new wxBoxSizer(wxHORIZONTAL
);
349 m_sizeSizer
->Add(m_heightSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
351 m_heightCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_HEIGHT_CHECKBOX
, _("&Height:"), wxDefaultPosition
, wxDefaultSize
, 0 );
352 m_heightCheckbox
->SetValue(false);
353 m_heightCheckbox
->SetHelpText(_("Enable the height value."));
354 if (wxRichTextSizePage::ShowToolTips())
355 m_heightCheckbox
->SetToolTip(_("Enable the height value."));
356 m_heightSizer
->Add(m_heightCheckbox
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
358 m_heightLabel
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("&Height:"), wxDefaultPosition
, wxDefaultSize
, 0 );
359 m_heightLabel
->Show(false);
360 m_heightSizer
->Add(m_heightLabel
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
362 wxBoxSizer
* itemBoxSizer39
= new wxBoxSizer(wxHORIZONTAL
);
363 m_sizeSizer
->Add(itemBoxSizer39
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
365 m_height
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_HEIGHT
, wxEmptyString
, wxDefaultPosition
, wxSize(60, -1), 0 );
366 m_height
->SetHelpText(_("The object height."));
367 if (wxRichTextSizePage::ShowToolTips())
368 m_height
->SetToolTip(_("The object height."));
369 itemBoxSizer39
->Add(m_height
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
371 wxArrayString m_unitsHStrings
;
372 m_unitsHStrings
.Add(_("px"));
373 m_unitsHStrings
.Add(_("cm"));
374 m_unitsHStrings
.Add(_("percent"));
375 m_unitsH
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_UNITS_H
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsHStrings
, wxCB_READONLY
);
376 m_unitsH
->SetStringSelection(_("px"));
377 m_unitsH
->SetHelpText(_("Units for the object height."));
378 if (wxRichTextSizePage::ShowToolTips())
379 m_unitsH
->SetToolTip(_("Units for the object height."));
380 itemBoxSizer39
->Add(m_unitsH
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
382 m_minWidthCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_MIN_WIDTH_CHECKBOX
, _("Min width:"), wxDefaultPosition
, wxDefaultSize
, 0 );
383 m_minWidthCheckbox
->SetValue(false);
384 m_minWidthCheckbox
->SetHelpText(_("Enable the minimum width value."));
385 if (wxRichTextSizePage::ShowToolTips())
386 m_minWidthCheckbox
->SetToolTip(_("Enable the minimum width value."));
387 m_sizeSizer
->Add(m_minWidthCheckbox
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
389 m_minWidthSizer
= new wxBoxSizer(wxHORIZONTAL
);
390 m_sizeSizer
->Add(m_minWidthSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
392 m_minWidth
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_MIN_WIDTH
, wxEmptyString
, wxDefaultPosition
, wxSize(60, -1), 0 );
393 m_minWidth
->SetHelpText(_("The object minimum width."));
394 if (wxRichTextSizePage::ShowToolTips())
395 m_minWidth
->SetToolTip(_("The object minimum width."));
396 m_minWidthSizer
->Add(m_minWidth
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
398 wxArrayString m_unitsMinWStrings
;
399 m_unitsMinWStrings
.Add(_("px"));
400 m_unitsMinWStrings
.Add(_("cm"));
401 m_unitsMinWStrings
.Add(_("percent"));
402 m_unitsMinW
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_UNITS_MIN_W
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsMinWStrings
, wxCB_READONLY
);
403 m_unitsMinW
->SetStringSelection(_("px"));
404 m_unitsMinW
->SetHelpText(_("Units for the minimum object width."));
405 if (wxRichTextSizePage::ShowToolTips())
406 m_unitsMinW
->SetToolTip(_("Units for the minimum object width."));
407 m_minWidthSizer
->Add(m_unitsMinW
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
409 m_minHeightCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_MIN_HEIGHT_CHECKBOX
, _("Min height:"), wxDefaultPosition
, wxDefaultSize
, 0 );
410 m_minHeightCheckbox
->SetValue(false);
411 m_minHeightCheckbox
->SetHelpText(_("Enable the minimum height value."));
412 if (wxRichTextSizePage::ShowToolTips())
413 m_minHeightCheckbox
->SetToolTip(_("Enable the minimum height value."));
414 m_sizeSizer
->Add(m_minHeightCheckbox
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
416 m_minHeightSizer
= new wxBoxSizer(wxHORIZONTAL
);
417 m_sizeSizer
->Add(m_minHeightSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
419 m_minHeight
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_MIN_HEIGHT
, wxEmptyString
, wxDefaultPosition
, wxSize(60, -1), 0 );
420 m_minHeight
->SetHelpText(_("The object minimum height."));
421 if (wxRichTextSizePage::ShowToolTips())
422 m_minHeight
->SetToolTip(_("The object minimum height."));
423 m_minHeightSizer
->Add(m_minHeight
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
425 wxArrayString m_unitsMinHStrings
;
426 m_unitsMinHStrings
.Add(_("px"));
427 m_unitsMinHStrings
.Add(_("cm"));
428 m_unitsMinHStrings
.Add(_("percent"));
429 m_unitsMinH
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_UNITS_MIN_H
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsMinHStrings
, wxCB_READONLY
);
430 m_unitsMinH
->SetStringSelection(_("px"));
431 m_unitsMinH
->SetHelpText(_("Units for the minimum object height."));
432 if (wxRichTextSizePage::ShowToolTips())
433 m_unitsMinH
->SetToolTip(_("Units for the minimum object height."));
434 m_minHeightSizer
->Add(m_unitsMinH
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
436 m_maxWidthCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_MAX_WIDTH_CHECKBOX
, _("Max width:"), wxDefaultPosition
, wxDefaultSize
, 0 );
437 m_maxWidthCheckbox
->SetValue(false);
438 m_maxWidthCheckbox
->SetHelpText(_("Enable the maximum width value."));
439 if (wxRichTextSizePage::ShowToolTips())
440 m_maxWidthCheckbox
->SetToolTip(_("Enable the maximum width value."));
441 m_sizeSizer
->Add(m_maxWidthCheckbox
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
443 m_maxWidthSizer
= new wxBoxSizer(wxHORIZONTAL
);
444 m_sizeSizer
->Add(m_maxWidthSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
446 m_maxWidth
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_MAX_WIDTH
, wxEmptyString
, wxDefaultPosition
, wxSize(60, -1), 0 );
447 m_maxWidth
->SetHelpText(_("The object maximum width."));
448 if (wxRichTextSizePage::ShowToolTips())
449 m_maxWidth
->SetToolTip(_("The object maximum width."));
450 m_maxWidthSizer
->Add(m_maxWidth
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
452 wxArrayString m_unitsMaxWStrings
;
453 m_unitsMaxWStrings
.Add(_("px"));
454 m_unitsMaxWStrings
.Add(_("cm"));
455 m_unitsMaxWStrings
.Add(_("percent"));
456 m_unitsMaxW
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_UNITS_MAX_W
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsMaxWStrings
, wxCB_READONLY
);
457 m_unitsMaxW
->SetStringSelection(_("px"));
458 m_unitsMaxW
->SetHelpText(_("Units for the maximum object width."));
459 if (wxRichTextSizePage::ShowToolTips())
460 m_unitsMaxW
->SetToolTip(_("Units for the maximum object width."));
461 m_maxWidthSizer
->Add(m_unitsMaxW
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
463 m_maxHeightCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_MAX_HEIGHT_CHECKBOX
, _("Max height:"), wxDefaultPosition
, wxDefaultSize
, 0 );
464 m_maxHeightCheckbox
->SetValue(false);
465 m_maxHeightCheckbox
->SetHelpText(_("Enable the height value."));
466 if (wxRichTextSizePage::ShowToolTips())
467 m_maxHeightCheckbox
->SetToolTip(_("Enable the height value."));
468 m_sizeSizer
->Add(m_maxHeightCheckbox
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
470 m_maxHeightSizer
= new wxBoxSizer(wxHORIZONTAL
);
471 m_sizeSizer
->Add(m_maxHeightSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
473 m_maxHeight
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_MAX_HEIGHT
, wxEmptyString
, wxDefaultPosition
, wxSize(60, -1), 0 );
474 m_maxHeight
->SetHelpText(_("The object maximum height."));
475 if (wxRichTextSizePage::ShowToolTips())
476 m_maxHeight
->SetToolTip(_("The object maximum height."));
477 m_maxHeightSizer
->Add(m_maxHeight
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
479 wxArrayString m_unitsMaxHStrings
;
480 m_unitsMaxHStrings
.Add(_("px"));
481 m_unitsMaxHStrings
.Add(_("cm"));
482 m_unitsMaxHStrings
.Add(_("percent"));
483 m_unitsMaxH
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_UNITS_MAX_H
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsMaxHStrings
, wxCB_READONLY
);
484 m_unitsMaxH
->SetStringSelection(_("px"));
485 m_unitsMaxH
->SetHelpText(_("Units for the maximum object height."));
486 if (wxRichTextSizePage::ShowToolTips())
487 m_unitsMaxH
->SetToolTip(_("Units for the maximum object height."));
488 m_maxHeightSizer
->Add(m_unitsMaxH
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
490 m_positionControls
= new wxBoxSizer(wxVERTICAL
);
491 m_parentSizer
->Add(m_positionControls
, 0, wxGROW
, 5);
493 wxBoxSizer
* itemBoxSizer59
= new wxBoxSizer(wxHORIZONTAL
);
494 m_positionControls
->Add(itemBoxSizer59
, 0, wxGROW
, 5);
496 wxStaticText
* itemStaticText60
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("Position"), wxDefaultPosition
, wxDefaultSize
, 0 );
497 itemStaticText60
->SetFont(wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetPointSize(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetFamily(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
).GetStyle(), wxBOLD
, false, wxT("")));
498 itemBoxSizer59
->Add(itemStaticText60
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
500 wxStaticLine
* itemStaticLine61
= new wxStaticLine( itemRichTextDialogPage1
, wxID_STATIC
, wxDefaultPosition
, wxDefaultSize
, wxLI_HORIZONTAL
);
501 itemBoxSizer59
->Add(itemStaticLine61
, 1, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
503 wxBoxSizer
* itemBoxSizer62
= new wxBoxSizer(wxHORIZONTAL
);
504 m_positionControls
->Add(itemBoxSizer62
, 0, wxGROW
, 5);
506 itemBoxSizer62
->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
508 m_moveObjectParentSizer
= new wxBoxSizer(wxVERTICAL
);
509 itemBoxSizer62
->Add(m_moveObjectParentSizer
, 0, wxALIGN_TOP
, 5);
511 m_positionModeSizer
= new wxBoxSizer(wxHORIZONTAL
);
512 m_moveObjectParentSizer
->Add(m_positionModeSizer
, 0, wxALIGN_LEFT
, 5);
514 wxStaticText
* itemStaticText66
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("&Position mode:"), wxDefaultPosition
, wxDefaultSize
, 0 );
515 m_positionModeSizer
->Add(itemStaticText66
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
517 wxArrayString m_positionModeCtrlStrings
;
518 m_positionModeCtrlStrings
.Add(_("Static"));
519 m_positionModeCtrlStrings
.Add(_("Relative"));
520 m_positionModeCtrlStrings
.Add(_("Absolute"));
521 m_positionModeCtrlStrings
.Add(_("Fixed"));
522 m_positionModeCtrl
= new wxChoice( itemRichTextDialogPage1
, ID_RICHTEXT_POSITION_MODE
, wxDefaultPosition
, wxDefaultSize
, m_positionModeCtrlStrings
, 0 );
523 m_positionModeCtrl
->SetStringSelection(_("Static"));
524 m_positionModeSizer
->Add(m_positionModeCtrl
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
526 m_positionGridSizer
= new wxFlexGridSizer(0, 4, 0, 0);
527 m_moveObjectParentSizer
->Add(m_positionGridSizer
, 0, wxGROW
, 5);
529 m_leftSizer
= new wxBoxSizer(wxHORIZONTAL
);
530 m_positionGridSizer
->Add(m_leftSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
532 m_positionLeftCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_LEFT_CHECKBOX
, _("&Left:"), wxDefaultPosition
, wxDefaultSize
, 0 );
533 m_positionLeftCheckbox
->SetValue(false);
534 m_positionLeftCheckbox
->SetHelpText(_("The left position."));
535 if (wxRichTextSizePage::ShowToolTips())
536 m_positionLeftCheckbox
->SetToolTip(_("The left position."));
537 m_leftSizer
->Add(m_positionLeftCheckbox
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
539 m_leftLabel
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("&Left:"), wxDefaultPosition
, wxDefaultSize
, 0 );
540 m_leftLabel
->Show(false);
541 m_leftSizer
->Add(m_leftLabel
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
543 wxBoxSizer
* itemBoxSizer72
= new wxBoxSizer(wxHORIZONTAL
);
544 m_positionGridSizer
->Add(itemBoxSizer72
, 0, wxGROW
|wxALIGN_CENTER_VERTICAL
, 5);
546 m_left
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_LEFT
, wxEmptyString
, wxDefaultPosition
, wxSize(65, -1), 0 );
547 m_left
->SetMaxLength(10);
548 m_left
->SetHelpText(_("The left position."));
549 if (wxRichTextSizePage::ShowToolTips())
550 m_left
->SetToolTip(_("The left position."));
551 itemBoxSizer72
->Add(m_left
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
553 wxArrayString m_unitsLeftStrings
;
554 m_unitsLeftStrings
.Add(_("px"));
555 m_unitsLeftStrings
.Add(_("cm"));
556 m_unitsLeftStrings
.Add(_("percent"));
557 m_unitsLeft
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_LEFT_UNITS
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsLeftStrings
, wxCB_READONLY
);
558 m_unitsLeft
->SetStringSelection(_("px"));
559 m_unitsLeft
->SetHelpText(_("Units for the left position."));
560 if (wxRichTextSizePage::ShowToolTips())
561 m_unitsLeft
->SetToolTip(_("Units for the left position."));
562 itemBoxSizer72
->Add(m_unitsLeft
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
564 m_topSizer
= new wxBoxSizer(wxHORIZONTAL
);
565 m_positionGridSizer
->Add(m_topSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
567 m_positionTopCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_TOP_CHECKBOX
, _("&Top:"), wxDefaultPosition
, wxDefaultSize
, 0 );
568 m_positionTopCheckbox
->SetValue(false);
569 m_positionTopCheckbox
->SetHelpText(_("The top position."));
570 if (wxRichTextSizePage::ShowToolTips())
571 m_positionTopCheckbox
->SetToolTip(_("The top position."));
572 m_topSizer
->Add(m_positionTopCheckbox
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
574 m_topLabel
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("&Top:"), wxDefaultPosition
, wxDefaultSize
, 0 );
575 m_topLabel
->Show(false);
576 m_topSizer
->Add(m_topLabel
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
578 wxBoxSizer
* itemBoxSizer78
= new wxBoxSizer(wxHORIZONTAL
);
579 m_positionGridSizer
->Add(itemBoxSizer78
, 0, wxGROW
|wxALIGN_CENTER_VERTICAL
, 5);
581 m_top
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_TOP
, wxEmptyString
, wxDefaultPosition
, wxSize(65, -1), 0 );
582 m_top
->SetMaxLength(10);
583 m_top
->SetHelpText(_("The top position."));
584 if (wxRichTextSizePage::ShowToolTips())
585 m_top
->SetToolTip(_("The top position."));
586 itemBoxSizer78
->Add(m_top
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
588 wxArrayString m_unitsTopStrings
;
589 m_unitsTopStrings
.Add(_("px"));
590 m_unitsTopStrings
.Add(_("cm"));
591 m_unitsTopStrings
.Add(_("percent"));
592 m_unitsTop
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_TOP_UNITS
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsTopStrings
, wxCB_READONLY
);
593 m_unitsTop
->SetStringSelection(_("px"));
594 m_unitsTop
->SetHelpText(_("Units for the top position."));
595 if (wxRichTextSizePage::ShowToolTips())
596 m_unitsTop
->SetToolTip(_("Units for the top position."));
597 itemBoxSizer78
->Add(m_unitsTop
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
599 m_rightSizer
= new wxBoxSizer(wxHORIZONTAL
);
600 m_positionGridSizer
->Add(m_rightSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
602 m_positionRightCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_RIGHT_CHECKBOX
, _("&Right:"), wxDefaultPosition
, wxDefaultSize
, 0 );
603 m_positionRightCheckbox
->SetValue(false);
604 m_positionRightCheckbox
->SetHelpText(_("The right position."));
605 if (wxRichTextSizePage::ShowToolTips())
606 m_positionRightCheckbox
->SetToolTip(_("The right position."));
607 m_rightSizer
->Add(m_positionRightCheckbox
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
609 m_rightLabel
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("&Right:"), wxDefaultPosition
, wxDefaultSize
, 0 );
610 m_rightLabel
->Show(false);
611 m_rightSizer
->Add(m_rightLabel
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
613 m_rightPositionSizer
= new wxBoxSizer(wxHORIZONTAL
);
614 m_positionGridSizer
->Add(m_rightPositionSizer
, 0, wxGROW
|wxALIGN_CENTER_VERTICAL
, 5);
616 m_right
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_RIGHT
, wxEmptyString
, wxDefaultPosition
, wxSize(65, -1), 0 );
617 m_right
->SetMaxLength(10);
618 m_right
->SetHelpText(_("The right position."));
619 if (wxRichTextSizePage::ShowToolTips())
620 m_right
->SetToolTip(_("The right position."));
621 m_rightPositionSizer
->Add(m_right
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
623 wxArrayString m_unitsRightStrings
;
624 m_unitsRightStrings
.Add(_("px"));
625 m_unitsRightStrings
.Add(_("cm"));
626 m_unitsRightStrings
.Add(_("percent"));
627 m_unitsRight
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_RIGHT_UNITS
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsRightStrings
, wxCB_READONLY
);
628 m_unitsRight
->SetStringSelection(_("px"));
629 m_unitsRight
->SetHelpText(_("Units for the right position."));
630 if (wxRichTextSizePage::ShowToolTips())
631 m_unitsRight
->SetToolTip(_("Units for the right position."));
632 m_rightPositionSizer
->Add(m_unitsRight
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
634 m_bottomSizer
= new wxBoxSizer(wxHORIZONTAL
);
635 m_positionGridSizer
->Add(m_bottomSizer
, 0, wxALIGN_LEFT
|wxALIGN_CENTER_VERTICAL
, 5);
637 m_positionBottomCheckbox
= new wxCheckBox( itemRichTextDialogPage1
, ID_RICHTEXT_BOTTOM_CHECKBOX
, _("&Bottom:"), wxDefaultPosition
, wxDefaultSize
, 0 );
638 m_positionBottomCheckbox
->SetValue(false);
639 m_positionBottomCheckbox
->SetHelpText(_("The bottom position."));
640 if (wxRichTextSizePage::ShowToolTips())
641 m_positionBottomCheckbox
->SetToolTip(_("The bottom position."));
642 m_bottomSizer
->Add(m_positionBottomCheckbox
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
644 m_bottomLabel
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("&Bottom:"), wxDefaultPosition
, wxDefaultSize
, 0 );
645 m_bottomLabel
->Show(false);
646 m_bottomSizer
->Add(m_bottomLabel
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
648 m_bottomPositionSizer
= new wxBoxSizer(wxHORIZONTAL
);
649 m_positionGridSizer
->Add(m_bottomPositionSizer
, 0, wxGROW
|wxALIGN_CENTER_VERTICAL
, 5);
651 m_bottom
= new wxTextCtrl( itemRichTextDialogPage1
, ID_RICHTEXT_BOTTOM
, wxEmptyString
, wxDefaultPosition
, wxSize(65, -1), 0 );
652 m_bottom
->SetMaxLength(10);
653 m_bottom
->SetHelpText(_("The bottom position."));
654 if (wxRichTextSizePage::ShowToolTips())
655 m_bottom
->SetToolTip(_("The bottom position."));
656 m_bottomPositionSizer
->Add(m_bottom
, 0, wxALIGN_CENTER_VERTICAL
|wxLEFT
|wxTOP
|wxBOTTOM
, 5);
658 wxArrayString m_unitsBottomStrings
;
659 m_unitsBottomStrings
.Add(_("px"));
660 m_unitsBottomStrings
.Add(_("cm"));
661 m_unitsBottomStrings
.Add(_("percent"));
662 m_unitsBottom
= new wxComboBox( itemRichTextDialogPage1
, ID_RICHTEXT_BOTTOM_UNITS
, _("px"), wxDefaultPosition
, wxSize(60, -1), m_unitsBottomStrings
, wxCB_READONLY
);
663 m_unitsBottom
->SetStringSelection(_("px"));
664 m_unitsBottom
->SetHelpText(_("Units for the bottom position."));
665 if (wxRichTextSizePage::ShowToolTips())
666 m_unitsBottom
->SetToolTip(_("Units for the bottom position."));
667 m_bottomPositionSizer
->Add(m_unitsBottom
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
669 m_moveObjectSizer
= new wxBoxSizer(wxHORIZONTAL
);
670 m_moveObjectParentSizer
->Add(m_moveObjectSizer
, 0, wxGROW
, 5);
672 wxStaticText
* itemStaticText94
= new wxStaticText( itemRichTextDialogPage1
, wxID_STATIC
, _("&Move the object to:"), wxDefaultPosition
, wxDefaultSize
, 0 );
673 m_moveObjectSizer
->Add(itemStaticText94
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
675 wxButton
* itemButton95
= new wxButton( itemRichTextDialogPage1
, ID_RICHTEXT_PARA_UP
, _("&Previous Paragraph"), wxDefaultPosition
, wxDefaultSize
, 0 );
676 itemButton95
->SetHelpText(_("Moves the object to the previous paragraph."));
677 if (wxRichTextSizePage::ShowToolTips())
678 itemButton95
->SetToolTip(_("Moves the object to the previous paragraph."));
679 m_moveObjectSizer
->Add(itemButton95
, 0, wxALIGN_CENTER_VERTICAL
|wxALL
, 5);
681 wxButton
* itemButton96
= new wxButton( itemRichTextDialogPage1
, ID_RICHTEXT_PARA_DOWN
, _("&Next Paragraph"), wxDefaultPosition
, wxDefaultSize
, 0 );
682 itemButton96
->SetHelpText(_("Moves the object to the next paragraph."));
683 if (wxRichTextSizePage::ShowToolTips())
684 itemButton96
->SetToolTip(_("Moves the object to the next paragraph."));
685 m_moveObjectSizer
->Add(itemButton96
, 0, wxALIGN_CENTER_VERTICAL
|wxRIGHT
|wxTOP
|wxBOTTOM
, 5);
688 m_positionModeCtrl
->SetValidator( wxGenericValidator(& m_positionMode
) );
689 ////@end wxRichTextSizePage content construction
691 if (!sm_enablePositionAndSizeCheckboxes
)
693 m_widthSizer
->Show(m_widthCheckbox
, false);
694 m_widthSizer
->Show(m_widthLabel
, true);
695 m_heightSizer
->Show(m_heightCheckbox
, false);
696 m_heightSizer
->Show(m_heightLabel
, true);
698 m_leftSizer
->Show(m_positionLeftCheckbox
, false);
699 m_leftSizer
->Show(m_leftLabel
, true);
700 m_topSizer
->Show(m_positionTopCheckbox
, false);
701 m_topSizer
->Show(m_topLabel
, true);
703 if (sm_showRightBottomPositionControls
)
705 m_rightSizer
->Show(m_positionRightCheckbox
, false);
706 m_rightSizer
->Show(m_rightLabel
, true);
707 m_bottomSizer
->Show(m_positionBottomCheckbox
, false);
708 m_bottomSizer
->Show(m_bottomLabel
, true);
712 if (!sm_showFloatingAndAlignmentControls
)
713 m_parentSizer
->Show(m_floatingAlignmentSizer
, false);
715 if (!sm_showFloatingControls
)
716 m_floatingAlignmentSizer
->Show(m_floatingSizer
, false);
718 if (!sm_showAlignmentControls
)
719 m_floatingAlignmentSizer
->Show(m_alignmentSizer
, false);
721 if (!sm_showPositionControls
)
722 m_parentSizer
->Show(m_positionControls
, false);
724 if (!sm_showMinMaxSizeControls
)
726 m_sizeSizer
->Show(m_minWidthCheckbox
, false);
727 m_sizeSizer
->Show(m_minWidthSizer
, false);
728 m_sizeSizer
->Show(m_minHeightCheckbox
, false);
729 m_sizeSizer
->Show(m_minHeightSizer
, false);
730 m_sizeSizer
->Show(m_maxWidthCheckbox
, false);
731 m_sizeSizer
->Show(m_maxWidthSizer
, false);
732 m_sizeSizer
->Show(m_maxHeightCheckbox
, false);
733 m_sizeSizer
->Show(m_maxHeightSizer
, false);
736 if (!sm_showRightBottomPositionControls
)
738 m_positionGridSizer
->Show(m_rightSizer
, false);
739 m_positionGridSizer
->Show(m_rightPositionSizer
, false);
740 m_positionGridSizer
->Show(m_bottomSizer
, false);
741 m_positionGridSizer
->Show(m_bottomPositionSizer
, false);
744 if (!sm_showPositionModeControls
)
745 m_moveObjectParentSizer
->Show(m_positionModeSizer
, false);
748 wxRichTextAttr
* wxRichTextSizePage::GetAttributes()
750 return wxRichTextFormattingDialog::GetDialogAttributes(this);
754 * Should we show tooltips?
757 bool wxRichTextSizePage::ShowToolTips()
762 bool wxRichTextSizePage::TransferDataToWindow()
764 m_float
->SetSelection(GetAttributes()->GetTextBoxAttr().GetFloatMode());
765 m_verticalAlignmentCheckbox
->SetValue(GetAttributes()->GetTextBoxAttr().HasVerticalAlignment());
766 if (GetAttributes()->GetTextBoxAttr().HasVerticalAlignment())
768 if ((int) GetAttributes()->GetTextBoxAttr().GetVerticalAlignment() > 0 &&
769 (int) GetAttributes()->GetTextBoxAttr().GetVerticalAlignment() < 4)
771 m_verticalAlignmentComboBox
->SetSelection(((int) GetAttributes()->GetTextBoxAttr().GetVerticalAlignment() - 1));
774 m_verticalAlignmentComboBox
->SetSelection(0);
777 wxRichTextFormattingDialog
* dialog
= wxRichTextFormattingDialog::GetDialog(this);
781 // Only show the Move Object controls if there's an object.
782 if (!dialog
->GetObject())
784 m_moveObjectParentSizer
->Show(m_moveObjectSizer
, false);
785 GetSizer()->Layout();
789 wxRichTextImage
* imageObj
= NULL
;
791 imageObj
= wxDynamicCast(dialog
->GetObject(), wxRichTextImage
);
793 // For an image, show the original width and height if the size is not explicitly specified.
794 if (imageObj
&& !GetAttributes()->GetTextBoxAttr().GetWidth().IsValid() && !GetAttributes()->GetTextBoxAttr().GetHeight().IsValid() &&
795 imageObj
->GetOriginalImageSize() != wxSize(-1, -1))
797 m_widthCheckbox
->SetValue(false);
798 m_heightCheckbox
->SetValue(false);
799 m_unitsW
->SetSelection(0);
800 m_unitsH
->SetSelection(0);
801 m_width
->SetValue(wxString::Format(wxT("%d"), (int) imageObj
->GetOriginalImageSize().GetWidth()));
802 m_height
->SetValue(wxString::Format(wxT("%d"), (int) imageObj
->GetOriginalImageSize().GetHeight()));
806 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetWidth(), m_width
, m_unitsW
, m_widthCheckbox
);
807 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetHeight(), m_height
, m_unitsH
, m_heightCheckbox
);
810 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetMinSize().GetWidth(), m_minWidth
, m_unitsMinW
, m_minWidthCheckbox
);
811 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetMinSize().GetHeight(), m_minHeight
, m_unitsMinH
, m_minHeightCheckbox
);
812 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetMaxSize().GetWidth(), m_maxWidth
, m_unitsMaxW
, m_maxWidthCheckbox
);
813 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetMaxSize().GetHeight(), m_maxHeight
, m_unitsMaxH
, m_maxHeightCheckbox
);
815 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetLeft(), m_left
, m_unitsLeft
, m_positionLeftCheckbox
);
816 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetTop(), m_top
, m_unitsTop
, m_positionTopCheckbox
);
817 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetRight(), m_right
, m_unitsRight
, m_positionRightCheckbox
);
818 wxRichTextFormattingDialog::SetDimensionValue(GetAttributes()->GetTextBoxAttr().GetBottom(), m_bottom
, m_unitsBottom
, m_positionBottomCheckbox
);
820 if ((GetAttributes()->GetTextBoxAttr().GetLeft().GetPosition() & wxTEXT_BOX_ATTR_POSITION_FIXED
) ||
821 (GetAttributes()->GetTextBoxAttr().GetRight().GetPosition() & wxTEXT_BOX_ATTR_POSITION_FIXED
) ||
822 (GetAttributes()->GetTextBoxAttr().GetTop().GetPosition() & wxTEXT_BOX_ATTR_POSITION_FIXED
) ||
823 (GetAttributes()->GetTextBoxAttr().GetBottom().GetPosition() & wxTEXT_BOX_ATTR_POSITION_FIXED
))
828 if ((GetAttributes()->GetTextBoxAttr().GetLeft().GetPosition() & wxTEXT_BOX_ATTR_POSITION_ABSOLUTE
) ||
829 (GetAttributes()->GetTextBoxAttr().GetRight().GetPosition() & wxTEXT_BOX_ATTR_POSITION_ABSOLUTE
) ||
830 (GetAttributes()->GetTextBoxAttr().GetTop().GetPosition() & wxTEXT_BOX_ATTR_POSITION_ABSOLUTE
) ||
831 (GetAttributes()->GetTextBoxAttr().GetBottom().GetPosition() & wxTEXT_BOX_ATTR_POSITION_ABSOLUTE
))
836 if ((GetAttributes()->GetTextBoxAttr().GetLeft().GetPosition() & wxTEXT_BOX_ATTR_POSITION_RELATIVE
) ||
837 (GetAttributes()->GetTextBoxAttr().GetRight().GetPosition() & wxTEXT_BOX_ATTR_POSITION_RELATIVE
) ||
838 (GetAttributes()->GetTextBoxAttr().GetTop().GetPosition() & wxTEXT_BOX_ATTR_POSITION_RELATIVE
) ||
839 (GetAttributes()->GetTextBoxAttr().GetBottom().GetPosition() & wxTEXT_BOX_ATTR_POSITION_RELATIVE
))
846 return wxPanel::TransferDataToWindow();
849 bool wxRichTextSizePage::TransferDataFromWindow()
851 wxPanel::TransferDataFromWindow();
853 GetAttributes()->GetTextBoxAttr().SetFloatMode((wxTextBoxAttrFloatStyle
) m_float
->GetSelection());
854 if (m_float
->GetSelection() == 0)
855 GetAttributes()->GetTextBoxAttr().RemoveFlag(wxTEXT_BOX_ATTR_FLOAT
);
857 if (m_verticalAlignmentCheckbox
->GetValue())
858 GetAttributes()->GetTextBoxAttr().SetVerticalAlignment((wxTextBoxAttrVerticalAlignment
) (m_verticalAlignmentComboBox
->GetSelection() + 1));
861 GetAttributes()->GetTextBoxAttr().SetVerticalAlignment(wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT_NONE
);
862 GetAttributes()->GetTextBoxAttr().RemoveFlag(wxTEXT_BOX_ATTR_VERTICAL_ALIGNMENT
);
865 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetWidth(), m_width
, m_unitsW
, m_widthCheckbox
);
866 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetHeight(), m_height
, m_unitsH
, m_heightCheckbox
);
867 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetMinSize().GetWidth(), m_minWidth
, m_unitsMinW
, m_minWidthCheckbox
);
868 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetMinSize().GetHeight(), m_minHeight
, m_unitsMinH
, m_minHeightCheckbox
);
869 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetMaxSize().GetWidth(), m_maxWidth
, m_unitsMaxW
, m_maxWidthCheckbox
);
870 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetMaxSize().GetHeight(), m_maxHeight
, m_unitsMaxH
, m_maxHeightCheckbox
);
872 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetLeft(), m_left
, m_unitsLeft
, m_positionLeftCheckbox
);
873 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetTop(), m_top
, m_unitsTop
, m_positionTopCheckbox
);
874 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetRight(), m_right
, m_unitsRight
, m_positionRightCheckbox
);
875 wxRichTextFormattingDialog::GetDimensionValue(GetAttributes()->GetTextBoxAttr().GetBottom(), m_bottom
, m_unitsBottom
, m_positionBottomCheckbox
);
877 wxTextBoxAttrPosition flags
;
878 if (m_positionMode
== 3)
879 flags
= wxTEXT_BOX_ATTR_POSITION_FIXED
;
880 else if (m_positionMode
== 2)
881 flags
= wxTEXT_BOX_ATTR_POSITION_ABSOLUTE
;
882 else if (m_positionMode
== 1)
883 flags
= wxTEXT_BOX_ATTR_POSITION_RELATIVE
;
885 flags
= wxTEXT_BOX_ATTR_POSITION_STATIC
;
887 if (GetAttributes()->GetTextBoxAttr().GetLeft().IsValid())
888 GetAttributes()->GetTextBoxAttr().GetLeft().SetPosition(flags
);
889 if (GetAttributes()->GetTextBoxAttr().GetTop().IsValid())
890 GetAttributes()->GetTextBoxAttr().GetTop().SetPosition(flags
);
891 if (GetAttributes()->GetTextBoxAttr().GetRight().IsValid())
892 GetAttributes()->GetTextBoxAttr().GetRight().SetPosition(flags
);
893 if (GetAttributes()->GetTextBoxAttr().GetBottom().IsValid())
894 GetAttributes()->GetTextBoxAttr().GetBottom().SetPosition(flags
);
900 * Get bitmap resources
903 wxBitmap
wxRichTextSizePage::GetBitmapResource( const wxString
& name
)
906 ////@begin wxRichTextSizePage bitmap retrieval
909 ////@end wxRichTextSizePage bitmap retrieval
916 wxIcon
wxRichTextSizePage::GetIconResource( const wxString
& name
)
919 ////@begin wxRichTextSizePage icon retrieval
922 ////@end wxRichTextSizePage icon retrieval
927 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_WIDTH
930 void wxRichTextSizePage::OnRichtextWidthUpdate( wxUpdateUIEvent
& event
)
932 event
.Enable(m_widthCheckbox
->GetValue());
936 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_HEIGHT
939 void wxRichTextSizePage::OnRichtextHeightUpdate( wxUpdateUIEvent
& event
)
941 event
.Enable(m_heightCheckbox
->GetValue());
945 * wxEVT_BUTTON event handler for ID_RICHTEXT_PARA_UP
948 void wxRichTextSizePage::OnRichtextParaUpClick( wxCommandEvent
& WXUNUSED(event
) )
950 wxRichTextFormattingDialog
* dialog
= wxRichTextFormattingDialog::GetDialog(this);
951 if (!dialog
|| !dialog
->GetObject())
954 // Make sure object attributes are up-to-date
955 dialog
->TransferDataFromWindow();
957 wxRichTextBuffer
* buffer
= dialog
->GetObject()->GetBuffer();
958 wxRichTextParagraphLayoutBox
* container
= dialog
->GetObject()->GetParentContainer();
959 wxRichTextObject
* parent
= dialog
->GetObject()->GetParent();
960 if (!container
|| !parent
|| !buffer
)
963 wxRichTextRange range
= dialog
->GetObject()->GetRange();
964 wxRichTextObjectList::compatibility_iterator iter
= container
->GetChildren().GetFirst();
970 if (iter
->GetData() == parent
)
972 iter
= iter
->GetNext();
976 iter
= iter
->GetPrevious();
980 wxRichTextObject
*obj
= iter
->GetData();
981 wxRichTextRange rg
= obj
->GetRange();
982 // tempObj will be deleted along with the undo object, and a clone of it will be
983 // returned by InsertObjectWithUndo
984 wxRichTextObject
* tempObj
= dialog
->GetObject()->Clone();
986 container
->DeleteRangeWithUndo(range
, buffer
->GetRichTextCtrl(), buffer
);
988 wxRichTextObject
* obj2
= container
->InsertObjectWithUndo(buffer
, rg
.GetStart(), tempObj
, buffer
->GetRichTextCtrl(), 0);
989 dialog
->SetObject(obj2
);
993 * wxEVT_BUTTON event handler for ID_RICHTEXT_DOWN
996 void wxRichTextSizePage::OnRichtextParaDownClick( wxCommandEvent
& WXUNUSED(event
) )
998 wxRichTextFormattingDialog
* dialog
= wxRichTextFormattingDialog::GetDialog(this);
999 if (!dialog
|| !dialog
->GetObject())
1002 // Make sure object attributes are up-to-date
1003 dialog
->TransferDataFromWindow();
1005 wxRichTextBuffer
* buffer
= dialog
->GetObject()->GetBuffer();
1006 wxRichTextParagraphLayoutBox
* container
= dialog
->GetObject()->GetParentContainer();
1007 wxRichTextObject
* parent
= dialog
->GetObject()->GetParent();
1008 if (!container
|| !parent
|| !buffer
)
1011 wxRichTextRange range
= dialog
->GetObject()->GetRange();
1013 wxRichTextObjectList::compatibility_iterator iter
= buffer
->GetChildren().GetFirst();
1019 if (iter
->GetData() == parent
)
1021 iter
= iter
->GetNext();
1024 iter
= iter
->GetNext();
1028 wxRichTextObject
*obj
= iter
->GetData();
1029 wxRichTextRange rg
= obj
->GetRange();
1030 // tempObj will be deleted along with the undo object, and a clone of it will be
1031 // returned by InsertObjectWithUndo
1032 wxRichTextObject
* tempObj
= dialog
->GetObject()->Clone();
1034 container
->DeleteRangeWithUndo(range
, buffer
->GetRichTextCtrl(), buffer
);
1036 // Minus one because we deleted an object
1037 wxRichTextObject
* obj2
= container
->InsertObjectWithUndo(buffer
, rg
.GetStart()-1, tempObj
, buffer
->GetRichTextCtrl(), 0);
1038 dialog
->SetObject(obj2
);
1042 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX
1045 void wxRichTextSizePage::OnRichtextVerticalAlignmentComboboxUpdate( wxUpdateUIEvent
& event
)
1047 event
.Enable(m_verticalAlignmentCheckbox
->GetValue());
1051 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MIN_WIDTH
1054 void wxRichTextSizePage::OnRichtextMinWidthUpdate( wxUpdateUIEvent
& event
)
1056 event
.Enable(m_minWidthCheckbox
->GetValue());
1060 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MIN_HEIGHT
1063 void wxRichTextSizePage::OnRichtextMinHeightUpdate( wxUpdateUIEvent
& event
)
1065 event
.Enable(m_minHeightCheckbox
->GetValue());
1069 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MAX_WIDTH
1072 void wxRichTextSizePage::OnRichtextMaxWidthUpdate( wxUpdateUIEvent
& event
)
1074 event
.Enable(m_maxWidthCheckbox
->GetValue());
1078 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_MAX_HEIGHT
1081 void wxRichTextSizePage::OnRichtextMaxHeightUpdate( wxUpdateUIEvent
& event
)
1083 event
.Enable(m_maxHeightCheckbox
->GetValue());
1087 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT
1090 void wxRichTextSizePage::OnRichtextLeftUpdate( wxUpdateUIEvent
& event
)
1092 event
.Enable(m_positionLeftCheckbox
->GetValue());
1096 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_RIGHT
1099 void wxRichTextSizePage::OnRichtextRightUpdate( wxUpdateUIEvent
& event
)
1101 event
.Enable(m_positionRightCheckbox
->GetValue());
1105 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_TOP
1108 void wxRichTextSizePage::OnRichtextTopUpdate( wxUpdateUIEvent
& event
)
1110 event
.Enable(m_positionTopCheckbox
->GetValue());
1114 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BOTTOM
1117 void wxRichTextSizePage::OnRichtextBottomUpdate( wxUpdateUIEvent
& event
)
1119 event
.Enable(m_positionBottomCheckbox
->GetValue());
1123 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_WIDTH_UNITS
1126 void wxRichTextSizePage::OnRichtextWidthUnitsUpdate( wxUpdateUIEvent
& event
)
1128 event
.Enable(m_widthCheckbox
->GetValue() && sm_enablePositionAndSizeUnits
);
1132 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_HEIGHT_UNITS
1135 void wxRichTextSizePage::OnRichtextHeightUnitsUpdate( wxUpdateUIEvent
& event
)
1137 event
.Enable(m_heightCheckbox
->GetValue() && sm_enablePositionAndSizeUnits
);
1141 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_LEFT_UNITS
1144 void wxRichTextSizePage::OnRichtextLeftUnitsUpdate( wxUpdateUIEvent
& event
)
1146 event
.Enable(m_positionLeftCheckbox
->GetValue() && sm_enablePositionAndSizeUnits
);
1150 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_RIGHT_UNITS
1153 void wxRichTextSizePage::OnRichtextRightUnitsUpdate( wxUpdateUIEvent
& event
)
1155 event
.Enable(m_positionRightCheckbox
->GetValue() && sm_enablePositionAndSizeUnits
);
1159 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_TOP_UNITS
1162 void wxRichTextSizePage::OnRichtextTopUnitsUpdate( wxUpdateUIEvent
& event
)
1164 event
.Enable(m_positionTopCheckbox
->GetValue() && sm_enablePositionAndSizeUnits
);
1168 * wxEVT_UPDATE_UI event handler for ID_RICHTEXT_BOTTOM_UNITS
1171 void wxRichTextSizePage::OnRichtextBottomUnitsUpdate( wxUpdateUIEvent
& event
)
1173 event
.Enable(m_positionBottomCheckbox
->GetValue() && sm_enablePositionAndSizeUnits
);