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_TITLE _("wxRichTextFontPage")
38 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME ID_RICHTEXTINDENTSSPACINGPAGE
39 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE wxSize(400, 300)
40 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
41 ////@end control identifiers
44 * wxRichTextIndentsSpacingPage class declaration
47 class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage
: public wxPanel
49 DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage
)
54 wxRichTextIndentsSpacingPage( );
55 wxRichTextIndentsSpacingPage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE
);
58 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
);
60 /// Initialise members
63 /// Creates the controls and sizers
64 void CreateControls();
66 /// Transfer data from/to window
67 virtual bool TransferDataFromWindow();
68 virtual bool TransferDataToWindow();
70 /// Updates the paragraph preview
73 /// Gets the attributes associated with the main formatting dialog
74 wxTextAttrEx
* GetAttributes();
76 ////@begin wxRichTextIndentsSpacingPage event handler declarations
78 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
79 void OnAlignmentLeftSelected( wxCommandEvent
& event
);
81 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
82 void OnAlignmentRightSelected( wxCommandEvent
& event
);
84 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
85 void OnAlignmentJustifiedSelected( wxCommandEvent
& event
);
87 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
88 void OnAlignmentCentredSelected( wxCommandEvent
& event
);
90 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
91 void OnAlignmentIndeterminateSelected( wxCommandEvent
& event
);
93 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
94 void OnIndentLeftUpdated( wxCommandEvent
& event
);
96 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
97 void OnIndentLeftFirstUpdated( wxCommandEvent
& event
);
99 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
100 void OnIndentRightUpdated( wxCommandEvent
& event
);
102 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
103 void OnRichtextOutlinelevelSelected( wxCommandEvent
& event
);
105 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
106 void OnSpacingBeforeUpdated( wxCommandEvent
& event
);
108 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
109 void OnSpacingAfterUpdated( wxCommandEvent
& event
);
111 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
112 void OnSpacingLineSelected( wxCommandEvent
& event
);
114 ////@end wxRichTextIndentsSpacingPage event handler declarations
116 ////@begin wxRichTextIndentsSpacingPage member function declarations
118 /// Retrieves bitmap resources
119 wxBitmap
GetBitmapResource( const wxString
& name
);
121 /// Retrieves icon resources
122 wxIcon
GetIconResource( const wxString
& name
);
123 ////@end wxRichTextIndentsSpacingPage member function declarations
125 /// Should we show tooltips?
126 static bool ShowToolTips();
128 ////@begin wxRichTextIndentsSpacingPage member variables
129 wxRadioButton
* m_alignmentLeft
;
130 wxRadioButton
* m_alignmentRight
;
131 wxRadioButton
* m_alignmentJustified
;
132 wxRadioButton
* m_alignmentCentred
;
133 wxRadioButton
* m_alignmentIndeterminate
;
134 wxTextCtrl
* m_indentLeft
;
135 wxTextCtrl
* m_indentLeftFirst
;
136 wxTextCtrl
* m_indentRight
;
137 wxComboBox
* m_outlineLevelCtrl
;
138 wxTextCtrl
* m_spacingBefore
;
139 wxTextCtrl
* m_spacingAfter
;
140 wxComboBox
* m_spacingLine
;
141 wxRichTextCtrl
* m_previewCtrl
;
142 /// Control identifiers
144 ID_RICHTEXTINDENTSSPACINGPAGE
= 10100,
145 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
= 10102,
146 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
= 10110,
147 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
= 10111,
148 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
= 10112,
149 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
= 10101,
150 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
= 10103,
151 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
= 10104,
152 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
= 10113,
153 ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
= 10105,
154 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
= 10114,
155 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
= 10116,
156 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
= 10115,
157 ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL
= 10109
159 ////@end wxRichTextIndentsSpacingPage member variables
165 // _RICHTEXTINDENTSPAGE_H_