1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtextindentspage.h
4 // Author: Julian Smart
6 // Created: 10/3/2006 2:28:21 PM
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _RICHTEXTINDENTSPAGE_H_
12 #define _RICHTEXTINDENTSPAGE_H_
18 #include "wx/richtext/richtextdialogpage.h"
21 #include "wx/statline.h"
25 * Forward declarations
28 ////@begin forward declarations
30 ////@end forward declarations
36 ////@begin control identifiers
37 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
38 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_TITLE wxEmptyString
39 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME ID_RICHTEXTINDENTSSPACINGPAGE
40 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE wxSize(400, 300)
41 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
42 ////@end control identifiers
45 * wxRichTextIndentsSpacingPage class declaration
48 class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage
: public wxRichTextDialogPage
50 DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage
)
52 DECLARE_HELP_PROVISION()
56 wxRichTextIndentsSpacingPage( );
57 wxRichTextIndentsSpacingPage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE
);
60 bool Create( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE
);
62 /// Initialise members
65 /// Creates the controls and sizers
66 void CreateControls();
68 /// Transfer data from/to window
69 virtual bool TransferDataFromWindow();
70 virtual bool TransferDataToWindow();
72 /// Updates the paragraph preview
75 /// Gets the attributes associated with the main formatting dialog
76 wxRichTextAttr
* GetAttributes();
78 ////@begin wxRichTextIndentsSpacingPage event handler declarations
80 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
81 void OnAlignmentLeftSelected( wxCommandEvent
& event
);
83 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
84 void OnAlignmentRightSelected( wxCommandEvent
& event
);
86 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
87 void OnAlignmentJustifiedSelected( wxCommandEvent
& event
);
89 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
90 void OnAlignmentCentredSelected( wxCommandEvent
& event
);
92 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
93 void OnAlignmentIndeterminateSelected( wxCommandEvent
& event
);
95 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
96 void OnIndentLeftUpdated( wxCommandEvent
& event
);
98 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
99 void OnIndentLeftFirstUpdated( wxCommandEvent
& event
);
101 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
102 void OnIndentRightUpdated( wxCommandEvent
& event
);
104 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
105 void OnRichtextOutlinelevelSelected( wxCommandEvent
& event
);
107 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
108 void OnSpacingBeforeUpdated( wxCommandEvent
& event
);
110 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
111 void OnSpacingAfterUpdated( wxCommandEvent
& event
);
113 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
114 void OnSpacingLineSelected( wxCommandEvent
& event
);
116 ////@end wxRichTextIndentsSpacingPage event handler declarations
118 ////@begin wxRichTextIndentsSpacingPage member function declarations
120 /// Retrieves bitmap resources
121 wxBitmap
GetBitmapResource( const wxString
& name
);
123 /// Retrieves icon resources
124 wxIcon
GetIconResource( const wxString
& name
);
125 ////@end wxRichTextIndentsSpacingPage member function declarations
127 /// Should we show tooltips?
128 static bool ShowToolTips();
130 ////@begin wxRichTextIndentsSpacingPage member variables
131 wxRadioButton
* m_alignmentLeft
;
132 wxRadioButton
* m_alignmentRight
;
133 wxRadioButton
* m_alignmentJustified
;
134 wxRadioButton
* m_alignmentCentred
;
135 wxRadioButton
* m_alignmentIndeterminate
;
136 wxTextCtrl
* m_indentLeft
;
137 wxTextCtrl
* m_indentLeftFirst
;
138 wxTextCtrl
* m_indentRight
;
139 wxComboBox
* m_outlineLevelCtrl
;
140 wxTextCtrl
* m_spacingBefore
;
141 wxTextCtrl
* m_spacingAfter
;
142 wxComboBox
* m_spacingLine
;
143 wxCheckBox
* m_pageBreakCtrl
;
144 wxRichTextCtrl
* m_previewCtrl
;
145 /// Control identifiers
147 ID_RICHTEXTINDENTSSPACINGPAGE
= 10100,
148 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
= 10102,
149 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
= 10110,
150 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
= 10111,
151 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
= 10112,
152 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
= 10101,
153 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
= 10103,
154 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
= 10104,
155 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
= 10113,
156 ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
= 10105,
157 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
= 10114,
158 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
= 10116,
159 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
= 10115,
160 ID_RICHTEXTINDENTSSPACINGPAGE_PAGEBREAK
= 10106,
161 ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL
= 10109
163 ////@end wxRichTextIndentsSpacingPage member variables
169 // _RICHTEXTINDENTSPAGE_H_