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_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
103 void OnSpacingBeforeUpdated( wxCommandEvent
& event
);
105 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
106 void OnSpacingAfterUpdated( wxCommandEvent
& event
);
108 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
109 void OnSpacingLineSelected( wxCommandEvent
& event
);
111 ////@end wxRichTextIndentsSpacingPage event handler declarations
113 ////@begin wxRichTextIndentsSpacingPage member function declarations
115 /// Retrieves bitmap resources
116 wxBitmap
GetBitmapResource( const wxString
& name
);
118 /// Retrieves icon resources
119 wxIcon
GetIconResource( const wxString
& name
);
120 ////@end wxRichTextIndentsSpacingPage member function declarations
122 /// Should we show tooltips?
123 static bool ShowToolTips();
125 ////@begin wxRichTextIndentsSpacingPage member variables
126 wxRadioButton
* m_alignmentLeft
;
127 wxRadioButton
* m_alignmentRight
;
128 wxRadioButton
* m_alignmentJustified
;
129 wxRadioButton
* m_alignmentCentred
;
130 wxRadioButton
* m_alignmentIndeterminate
;
131 wxTextCtrl
* m_indentLeft
;
132 wxTextCtrl
* m_indentLeftFirst
;
133 wxTextCtrl
* m_indentRight
;
134 wxTextCtrl
* m_spacingBefore
;
135 wxTextCtrl
* m_spacingAfter
;
136 wxComboBox
* m_spacingLine
;
137 wxRichTextCtrl
* m_previewCtrl
;
138 /// Control identifiers
140 ID_RICHTEXTINDENTSSPACINGPAGE
= 10100,
141 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
= 10102,
142 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
= 10110,
143 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
= 10111,
144 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
= 10112,
145 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
= 10101,
146 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
= 10103,
147 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
= 10104,
148 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
= 10113,
149 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
= 10114,
150 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
= 10116,
151 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
= 10115,
152 ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL
= 10109
154 ////@end wxRichTextIndentsSpacingPage member variables
160 // _RICHTEXTINDENTSPAGE_H_