1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtextindentspage.h
4 // Author: Julian Smart
6 // Created: 10/3/2006 2:28:21 PM
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _RICHTEXTINDENTSPAGE_H_
13 #define _RICHTEXTINDENTSPAGE_H_
19 #include "wx/richtext/richtextdialogpage.h"
22 #include "wx/statline.h"
26 * Forward declarations
29 ////@begin forward declarations
31 ////@end forward declarations
37 ////@begin control identifiers
38 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
39 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_TITLE wxEmptyString
40 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME ID_RICHTEXTINDENTSSPACINGPAGE
41 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE wxSize(400, 300)
42 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
43 ////@end control identifiers
46 * wxRichTextIndentsSpacingPage class declaration
49 class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage
: public wxRichTextDialogPage
51 DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage
)
53 DECLARE_HELP_PROVISION()
57 wxRichTextIndentsSpacingPage( );
58 wxRichTextIndentsSpacingPage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE
);
61 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
);
63 /// Initialise members
66 /// Creates the controls and sizers
67 void CreateControls();
69 /// Transfer data from/to window
70 virtual bool TransferDataFromWindow();
71 virtual bool TransferDataToWindow();
73 /// Updates the paragraph preview
76 /// Gets the attributes associated with the main formatting dialog
77 wxRichTextAttr
* GetAttributes();
79 ////@begin wxRichTextIndentsSpacingPage event handler declarations
81 /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
82 void OnAlignmentLeftSelected( wxCommandEvent
& event
);
84 /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
85 void OnAlignmentRightSelected( wxCommandEvent
& event
);
87 /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
88 void OnAlignmentJustifiedSelected( wxCommandEvent
& event
);
90 /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
91 void OnAlignmentCentredSelected( wxCommandEvent
& event
);
93 /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
94 void OnAlignmentIndeterminateSelected( wxCommandEvent
& event
);
96 /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
97 void OnIndentLeftUpdated( wxCommandEvent
& event
);
99 /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
100 void OnIndentLeftFirstUpdated( wxCommandEvent
& event
);
102 /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
103 void OnIndentRightUpdated( wxCommandEvent
& event
);
105 /// wxEVT_COMBOBOX event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
106 void OnRichtextOutlinelevelSelected( wxCommandEvent
& event
);
108 /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
109 void OnSpacingBeforeUpdated( wxCommandEvent
& event
);
111 /// wxEVT_TEXT event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
112 void OnSpacingAfterUpdated( wxCommandEvent
& event
);
114 /// wxEVT_COMBOBOX event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
115 void OnSpacingLineSelected( wxCommandEvent
& event
);
117 ////@end wxRichTextIndentsSpacingPage event handler declarations
119 ////@begin wxRichTextIndentsSpacingPage member function declarations
121 /// Retrieves bitmap resources
122 wxBitmap
GetBitmapResource( const wxString
& name
);
124 /// Retrieves icon resources
125 wxIcon
GetIconResource( const wxString
& name
);
126 ////@end wxRichTextIndentsSpacingPage member function declarations
128 /// Should we show tooltips?
129 static bool ShowToolTips();
131 ////@begin wxRichTextIndentsSpacingPage member variables
132 wxRadioButton
* m_alignmentLeft
;
133 wxRadioButton
* m_alignmentRight
;
134 wxRadioButton
* m_alignmentJustified
;
135 wxRadioButton
* m_alignmentCentred
;
136 wxRadioButton
* m_alignmentIndeterminate
;
137 wxTextCtrl
* m_indentLeft
;
138 wxTextCtrl
* m_indentLeftFirst
;
139 wxTextCtrl
* m_indentRight
;
140 wxComboBox
* m_outlineLevelCtrl
;
141 wxTextCtrl
* m_spacingBefore
;
142 wxTextCtrl
* m_spacingAfter
;
143 wxComboBox
* m_spacingLine
;
144 wxCheckBox
* m_pageBreakCtrl
;
145 wxRichTextCtrl
* m_previewCtrl
;
146 /// Control identifiers
148 ID_RICHTEXTINDENTSSPACINGPAGE
= 10100,
149 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
= 10102,
150 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
= 10110,
151 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
= 10111,
152 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
= 10112,
153 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
= 10101,
154 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
= 10103,
155 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
= 10104,
156 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
= 10113,
157 ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
= 10105,
158 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
= 10114,
159 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
= 10116,
160 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
= 10115,
161 ID_RICHTEXTINDENTSSPACINGPAGE_PAGEBREAK
= 10106,
162 ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL
= 10109
164 ////@end wxRichTextIndentsSpacingPage member variables
170 // _RICHTEXTINDENTSPAGE_H_