1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtextsizepage.h
4 // Author: Julian Smart
6 // Created: 20/10/2010 10:23:24
8 // Copyright: (c) Julian Smart
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _RICHTEXTSIZEPAGE_H_
13 #define _RICHTEXTSIZEPAGE_H_
19 #include "wx/richtext/richtextdialogpage.h"
23 #include "wx/statline.h"
27 * Forward declarations
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
45 * wxRichTextSizePage class declaration
48 class WXDLLIMPEXP_RICHTEXT wxRichTextSizePage
: public wxRichTextDialogPage
50 DECLARE_DYNAMIC_CLASS( wxRichTextSizePage
)
52 DECLARE_HELP_PROVISION()
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
);
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
);
63 ~wxRichTextSizePage();
65 /// Initialises member variables
68 /// Creates the controls and sizers
69 void CreateControls();
71 /// Gets the attributes from the formatting dialog
72 wxRichTextAttr
* GetAttributes();
75 virtual bool TransferDataToWindow();
76 virtual bool TransferDataFromWindow();
78 /// Show/hide position controls
79 void ShowPositionControls(bool show
);
81 /// Show/hide floating controls
82 void ShowFloatingControls(bool show
);
84 ////@begin wxRichTextSizePage event handler declarations
86 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_WIDTH
87 void OnRichtextWidthUpdate( wxUpdateUIEvent
& event
);
89 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_HEIGHT
90 void OnRichtextHeightUpdate( wxUpdateUIEvent
& event
);
92 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX
93 void OnRichtextVerticalAlignmentComboboxUpdate( wxUpdateUIEvent
& event
);
95 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXT_OFFSET
96 void OnRichtextOffsetUpdate( wxUpdateUIEvent
& event
);
98 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_UP
99 void OnRichtextParaUpClick( wxCommandEvent
& event
);
101 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXT_PARA_DOWN
102 void OnRichtextParaDownClick( wxCommandEvent
& event
);
104 ////@end wxRichTextSizePage event handler declarations
106 ////@begin wxRichTextSizePage member function declarations
108 /// Retrieves bitmap resources
109 wxBitmap
GetBitmapResource( const wxString
& name
);
111 /// Retrieves icon resources
112 wxIcon
GetIconResource( const wxString
& name
);
113 ////@end wxRichTextSizePage member function declarations
115 /// Should we show tooltips?
116 static bool ShowToolTips();
118 ////@begin wxRichTextSizePage member variables
119 wxBoxSizer
* m_parentSizer
;
120 wxBoxSizer
* m_floatingControls
;
122 wxCheckBox
* m_widthCheckbox
;
124 wxComboBox
* m_unitsW
;
125 wxCheckBox
* m_heightCheckbox
;
126 wxTextCtrl
* m_height
;
127 wxComboBox
* m_unitsH
;
128 wxBoxSizer
* m_alignmentControls
;
129 wxCheckBox
* m_verticalAlignmentCheckbox
;
130 wxComboBox
* m_verticalAlignmentComboBox
;
131 wxBoxSizer
* m_positionControls
;
132 wxBoxSizer
* m_moveObjectParentSizer
;
133 wxCheckBox
* m_offsetYCheckbox
;
134 wxTextCtrl
* m_offset
;
135 wxComboBox
* m_unitsOffset
;
136 wxBoxSizer
* m_moveObjectSizer
;
137 /// Control identifiers
139 ID_WXRICHTEXTSIZEPAGE
= 10700,
140 ID_RICHTEXT_FLOATING_MODE
= 10701,
141 ID_RICHTEXT_WIDTH_CHECKBOX
= 10702,
142 ID_RICHTEXT_WIDTH
= 10703,
143 ID_RICHTEXT_UNITS_W
= 10704,
144 ID_RICHTEXT_HEIGHT_CHECKBOX
= 10705,
145 ID_RICHTEXT_HEIGHT
= 10706,
146 ID_RICHTEXT_UNITS_H
= 10707,
147 ID_RICHTEXT_VERTICAL_ALIGNMENT_CHECKBOX
= 10708,
148 ID_RICHTEXT_VERTICAL_ALIGNMENT_COMBOBOX
= 10709,
149 ID_RICHTEXT_OFFSET_CHECKBOX
= 10710,
150 ID_RICHTEXT_OFFSET
= 10711,
151 ID_RICHTEXT_OFFSET_UNITS
= 10712,
152 ID_RICHTEXT_PARA_UP
= 10713,
153 ID_RICHTEXT_PARA_DOWN
= 10714
155 ////@end wxRichTextSizePage member variables
159 // _RICHTEXTSIZEPAGE_H_