1 /////////////////////////////////////////////////////////////////////////////
2 // Name: richtextindentspage.h
4 // Author: Julian Smart
6 // Created: 10/3/2006 2:28:21 PM
8 // Copyright: (c) Julian Smart
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
48 #define wxCLOSE_BOX 0x1000
52 * wxRichTextIndentsSpacingPage class declaration
55 class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage
: public wxPanel
57 DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage
)
62 wxRichTextIndentsSpacingPage( );
63 wxRichTextIndentsSpacingPage( wxWindow
* parent
, wxWindowID id
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE
);
66 bool Create( wxWindow
* parent
, wxWindowID id
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE
);
68 /// Initialise members
71 /// Creates the controls and sizers
72 void CreateControls();
74 /// Transfer data from/to window
75 virtual bool TransferDataFromWindow();
76 virtual bool TransferDataToWindow();
78 /// Updates the paragraph preview
81 /// Gets the attributes associated with the main formatting dialog
82 wxTextAttrEx
* GetAttributes();
84 ////@begin wxRichTextIndentsSpacingPage event handler declarations
86 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
87 void OnAlignmentLeftSelected( wxCommandEvent
& event
);
89 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
90 void OnAlignmentRightSelected( wxCommandEvent
& event
);
92 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
93 void OnAlignmentJustifiedSelected( wxCommandEvent
& event
);
95 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
96 void OnAlignmentCentredSelected( wxCommandEvent
& event
);
98 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
99 void OnAlignmentIndeterminateSelected( wxCommandEvent
& event
);
101 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
102 void OnIndentLeftUpdated( wxCommandEvent
& event
);
104 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
105 void OnIndentLeftFirstUpdated( wxCommandEvent
& event
);
107 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
108 void OnIndentRightUpdated( wxCommandEvent
& event
);
110 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
111 void OnSpacingBeforeUpdated( wxCommandEvent
& event
);
113 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
114 void OnSpacingAfterUpdated( wxCommandEvent
& event
);
116 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
117 void OnSpacingLineSelected( wxCommandEvent
& event
);
119 ////@end wxRichTextIndentsSpacingPage event handler declarations
121 ////@begin wxRichTextIndentsSpacingPage member function declarations
123 /// Retrieves bitmap resources
124 wxBitmap
GetBitmapResource( const wxString
& name
);
126 /// Retrieves icon resources
127 wxIcon
GetIconResource( const wxString
& name
);
128 ////@end wxRichTextIndentsSpacingPage member function declarations
130 /// Should we show tooltips?
131 static bool ShowToolTips();
133 ////@begin wxRichTextIndentsSpacingPage member variables
134 wxRadioButton
* m_alignmentLeft
;
135 wxRadioButton
* m_alignmentRight
;
136 wxRadioButton
* m_alignmentJustified
;
137 wxRadioButton
* m_alignmentCentred
;
138 wxRadioButton
* m_alignmentIndeterminate
;
139 wxTextCtrl
* m_indentLeft
;
140 wxTextCtrl
* m_indentLeftFirst
;
141 wxTextCtrl
* m_indentRight
;
142 wxTextCtrl
* m_spacingBefore
;
143 wxTextCtrl
* m_spacingAfter
;
144 wxComboBox
* m_spacingLine
;
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_SPACING_BEFORE
= 10114,
158 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
= 10116,
159 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
= 10115,
160 ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL
= 10109
162 ////@end wxRichTextIndentsSpacingPage member variables
168 // _RICHTEXTINDENTSPAGE_H_