]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtextindentspage.h
eb61c598d0241b48713a90cd2b69cd36d9758e8b
[wxWidgets.git] / include / wx / richtext / richtextindentspage.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: richtextindentspage.h
3 // Purpose:
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 10/3/2006 2:28:21 PM
7 // RCS-ID:
8 // Copyright: (c) Julian Smart
9 // Licence:
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _RICHTEXTINDENTSPAGE_H_
13 #define _RICHTEXTINDENTSPAGE_H_
14
15 /*!
16 * Includes
17 */
18
19 ////@begin includes
20 #include "wx/statline.h"
21 ////@end includes
22
23 /*!
24 * Forward declarations
25 */
26
27 ////@begin forward declarations
28 class wxRichTextCtrl;
29 ////@end forward declarations
30
31 /*!
32 * Control identifiers
33 */
34
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
42
43 /*!
44 * Compatibility
45 */
46
47 #ifndef wxCLOSE_BOX
48 #define wxCLOSE_BOX 0x1000
49 #endif
50
51 /*!
52 * wxRichTextIndentsSpacingPage class declaration
53 */
54
55 class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage: public wxPanel
56 {
57 DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage )
58 DECLARE_EVENT_TABLE()
59
60 public:
61 /// Constructors
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 );
64
65 /// Creation
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 );
67
68 /// Initialise members
69 void Init();
70
71 /// Creates the controls and sizers
72 void CreateControls();
73
74 /// Transfer data from/to window
75 virtual bool TransferDataFromWindow();
76 virtual bool TransferDataToWindow();
77
78 /// Updates the paragraph preview
79 void UpdatePreview();
80
81 /// Gets the attributes associated with the main formatting dialog
82 wxTextAttrEx* GetAttributes();
83
84 ////@begin wxRichTextIndentsSpacingPage event handler declarations
85
86 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
87 void OnAlignmentLeftSelected( wxCommandEvent& event );
88
89 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
90 void OnAlignmentRightSelected( wxCommandEvent& event );
91
92 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
93 void OnAlignmentJustifiedSelected( wxCommandEvent& event );
94
95 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
96 void OnAlignmentCentredSelected( wxCommandEvent& event );
97
98 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
99 void OnAlignmentIndeterminateSelected( wxCommandEvent& event );
100
101 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
102 void OnIndentLeftUpdated( wxCommandEvent& event );
103
104 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
105 void OnIndentLeftFirstUpdated( wxCommandEvent& event );
106
107 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
108 void OnIndentRightUpdated( wxCommandEvent& event );
109
110 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
111 void OnSpacingBeforeUpdated( wxCommandEvent& event );
112
113 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
114 void OnSpacingAfterUpdated( wxCommandEvent& event );
115
116 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
117 void OnSpacingLineSelected( wxCommandEvent& event );
118
119 ////@end wxRichTextIndentsSpacingPage event handler declarations
120
121 ////@begin wxRichTextIndentsSpacingPage member function declarations
122
123 /// Retrieves bitmap resources
124 wxBitmap GetBitmapResource( const wxString& name );
125
126 /// Retrieves icon resources
127 wxIcon GetIconResource( const wxString& name );
128 ////@end wxRichTextIndentsSpacingPage member function declarations
129
130 /// Should we show tooltips?
131 static bool ShowToolTips();
132
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
147 enum {
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
161 };
162 ////@end wxRichTextIndentsSpacingPage member variables
163
164 bool m_dontUpdate;
165 };
166
167 #endif
168 // _RICHTEXTINDENTSPAGE_H_