]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtextindentspage.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / richtext / richtextindentspage.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtextindentspage.h
3 // Purpose:
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 10/3/2006 2:28:21 PM
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _RICHTEXTINDENTSPAGE_H_
12 #define _RICHTEXTINDENTSPAGE_H_
13
14 /*!
15 * Includes
16 */
17
18 #include "wx/richtext/richtextdialogpage.h"
19
20 ////@begin includes
21 #include "wx/statline.h"
22 ////@end includes
23
24 /*!
25 * Forward declarations
26 */
27
28 ////@begin forward declarations
29 class wxRichTextCtrl;
30 ////@end forward declarations
31
32 /*!
33 * Control identifiers
34 */
35
36 ////@begin control identifiers
37 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
38 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_TITLE wxEmptyString
39 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_IDNAME ID_RICHTEXTINDENTSSPACINGPAGE
40 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_SIZE wxSize(400, 300)
41 #define SYMBOL_WXRICHTEXTINDENTSSPACINGPAGE_POSITION wxDefaultPosition
42 ////@end control identifiers
43
44 /*!
45 * wxRichTextIndentsSpacingPage class declaration
46 */
47
48 class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage: public wxRichTextDialogPage
49 {
50 DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage )
51 DECLARE_EVENT_TABLE()
52 DECLARE_HELP_PROVISION()
53
54 public:
55 /// Constructors
56 wxRichTextIndentsSpacingPage( );
57 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
59 /// Creation
60 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 );
61
62 /// Initialise members
63 void Init();
64
65 /// Creates the controls and sizers
66 void CreateControls();
67
68 /// Transfer data from/to window
69 virtual bool TransferDataFromWindow();
70 virtual bool TransferDataToWindow();
71
72 /// Updates the paragraph preview
73 void UpdatePreview();
74
75 /// Gets the attributes associated with the main formatting dialog
76 wxRichTextAttr* GetAttributes();
77
78 ////@begin wxRichTextIndentsSpacingPage event handler declarations
79
80 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
81 void OnAlignmentLeftSelected( wxCommandEvent& event );
82
83 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
84 void OnAlignmentRightSelected( wxCommandEvent& event );
85
86 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
87 void OnAlignmentJustifiedSelected( wxCommandEvent& event );
88
89 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
90 void OnAlignmentCentredSelected( wxCommandEvent& event );
91
92 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
93 void OnAlignmentIndeterminateSelected( wxCommandEvent& event );
94
95 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
96 void OnIndentLeftUpdated( wxCommandEvent& event );
97
98 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
99 void OnIndentLeftFirstUpdated( wxCommandEvent& event );
100
101 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
102 void OnIndentRightUpdated( wxCommandEvent& event );
103
104 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL
105 void OnRichtextOutlinelevelSelected( wxCommandEvent& event );
106
107 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
108 void OnSpacingBeforeUpdated( wxCommandEvent& event );
109
110 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
111 void OnSpacingAfterUpdated( wxCommandEvent& event );
112
113 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
114 void OnSpacingLineSelected( wxCommandEvent& event );
115
116 ////@end wxRichTextIndentsSpacingPage event handler declarations
117
118 ////@begin wxRichTextIndentsSpacingPage member function declarations
119
120 /// Retrieves bitmap resources
121 wxBitmap GetBitmapResource( const wxString& name );
122
123 /// Retrieves icon resources
124 wxIcon GetIconResource( const wxString& name );
125 ////@end wxRichTextIndentsSpacingPage member function declarations
126
127 /// Should we show tooltips?
128 static bool ShowToolTips();
129
130 ////@begin wxRichTextIndentsSpacingPage member variables
131 wxRadioButton* m_alignmentLeft;
132 wxRadioButton* m_alignmentRight;
133 wxRadioButton* m_alignmentJustified;
134 wxRadioButton* m_alignmentCentred;
135 wxRadioButton* m_alignmentIndeterminate;
136 wxTextCtrl* m_indentLeft;
137 wxTextCtrl* m_indentLeftFirst;
138 wxTextCtrl* m_indentRight;
139 wxComboBox* m_outlineLevelCtrl;
140 wxTextCtrl* m_spacingBefore;
141 wxTextCtrl* m_spacingAfter;
142 wxComboBox* m_spacingLine;
143 wxCheckBox* m_pageBreakCtrl;
144 wxRichTextCtrl* m_previewCtrl;
145 /// Control identifiers
146 enum {
147 ID_RICHTEXTINDENTSSPACINGPAGE = 10100,
148 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT = 10102,
149 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT = 10110,
150 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED = 10111,
151 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED = 10112,
152 ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE = 10101,
153 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT = 10103,
154 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST = 10104,
155 ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT = 10113,
156 ID_RICHTEXTINDENTSSPACINGPAGE_OUTLINELEVEL = 10105,
157 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE = 10114,
158 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER = 10116,
159 ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE = 10115,
160 ID_RICHTEXTINDENTSSPACINGPAGE_PAGEBREAK = 10106,
161 ID_RICHTEXTINDENTSSPACINGPAGE_PREVIEW_CTRL = 10109
162 };
163 ////@end wxRichTextIndentsSpacingPage member variables
164
165 bool m_dontUpdate;
166 };
167
168 #endif
169 // _RICHTEXTINDENTSPAGE_H_