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_
20 #include "wx/statline.h"
24 * Forward declarations
27 ////@begin forward declarations
29 ////@end forward declarations
35 ////@begin control identifiers
36 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
37 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME ID_RICHTEXTINDENTSSPACINGPAGE
38 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE wxSize(400, 300)
39 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
40 ////@end control identifiers
43 * wxRichTextIndentsSpacingPage class declaration
46 class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage
: public wxPanel
48 DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage
)
53 wxRichTextIndentsSpacingPage( );
54 wxRichTextIndentsSpacingPage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE
);
57 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
);
59 /// Initialise members
62 /// Creates the controls and sizers
63 void CreateControls();
65 /// Transfer data from/to window
66 virtual bool TransferDataFromWindow();
67 virtual bool TransferDataToWindow();
69 /// Updates the paragraph preview
72 /// Gets the attributes associated with the main formatting dialog
73 wxTextAttr
* GetAttributes();
75 ////@begin wxRichTextIndentsSpacingPage event handler declarations
77 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
78 void OnAlignmentLeftSelected( wxCommandEvent
& event
);
80 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
81 void OnAlignmentRightSelected( wxCommandEvent
& event
);
83 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
84 void OnAlignmentJustifiedSelected( wxCommandEvent
& event
);
86 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
87 void OnAlignmentCentredSelected( wxCommandEvent
& event
);
89 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
90 void OnAlignmentIndeterminateSelected( wxCommandEvent
& event
);
92 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
93 void OnIndentLeftUpdated( wxCommandEvent
& event
);
95 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
96 void OnIndentLeftFirstUpdated( wxCommandEvent
& event
);
98 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
99 void OnIndentRightUpdated( wxCommandEvent
& event
);
101 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
102 void OnRichtextOutlinelevelSelected( wxCommandEvent
& event
);
104 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
105 void OnSpacingBeforeUpdated( wxCommandEvent
& event
);
107 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
108 void OnSpacingAfterUpdated( wxCommandEvent
& event
);
110 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
111 void OnSpacingLineSelected( wxCommandEvent
& event
);
113 ////@end wxRichTextIndentsSpacingPage event handler declarations
115 ////@begin wxRichTextIndentsSpacingPage member function declarations
117 /// Retrieves bitmap resources
118 wxBitmap
GetBitmapResource( const wxString
& name
);
120 /// Retrieves icon resources
121 wxIcon
GetIconResource( const wxString
& name
);
122 ////@end wxRichTextIndentsSpacingPage member function declarations
124 /// Should we show tooltips?
125 static bool ShowToolTips();
127 ////@begin wxRichTextIndentsSpacingPage member variables
128 wxRadioButton
* m_alignmentLeft
;
129 wxRadioButton
* m_alignmentRight
;
130 wxRadioButton
* m_alignmentJustified
;
131 wxRadioButton
* m_alignmentCentred
;
132 wxRadioButton
* m_alignmentIndeterminate
;
133 wxTextCtrl
* m_indentLeft
;
134 wxTextCtrl
* m_indentLeftFirst
;
135 wxTextCtrl
* m_indentRight
;
136 wxComboBox
* m_outlineLevelCtrl
;
137 wxTextCtrl
* m_spacingBefore
;
138 wxTextCtrl
* m_spacingAfter
;
139 wxComboBox
* m_spacingLine
;
140 wxRichTextCtrl
* m_previewCtrl
;
141 /// Control identifiers
143 ID_RICHTEXTINDENTSSPACINGPAGE
= 10100,
144 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
= 10102,
145 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
= 10110,
146 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
= 10111,
147 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
= 10112,
148 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
= 10101,
149 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
= 10103,
150 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
= 10104,
151 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
= 10113,
152 ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
= 10105,
153 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
= 10114,
154 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
= 10116,
155 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
= 10115,
156 ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL
= 10109
158 ////@end wxRichTextIndentsSpacingPage member variables
164 // _RICHTEXTINDENTSPAGE_H_