]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtextindentspage.h
Rename wxSTREAM_FILEEXTENSION to wxSTREAM_FILEEXT.
[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 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows 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 * wxRichTextIndentsSpacingPage class declaration
45 */
46
47 class WXDLLIMPEXP_RICHTEXT wxRichTextIndentsSpacingPage: public wxPanel
48 {
49 DECLARE_DYNAMIC_CLASS( wxRichTextIndentsSpacingPage )
50 DECLARE_EVENT_TABLE()
51
52 public:
53 /// Constructors
54 wxRichTextIndentsSpacingPage( );
55 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 );
56
57 /// Creation
58 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 );
59
60 /// Initialise members
61 void Init();
62
63 /// Creates the controls and sizers
64 void CreateControls();
65
66 /// Transfer data from/to window
67 virtual bool TransferDataFromWindow();
68 virtual bool TransferDataToWindow();
69
70 /// Updates the paragraph preview
71 void UpdatePreview();
72
73 /// Gets the attributes associated with the main formatting dialog
74 wxTextAttrEx* GetAttributes();
75
76 ////@begin wxRichTextIndentsSpacingPage event handler declarations
77
78 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_LEFT
79 void OnAlignmentLeftSelected( wxCommandEvent& event );
80
81 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_RIGHT
82 void OnAlignmentRightSelected( wxCommandEvent& event );
83
84 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_JUSTIFIED
85 void OnAlignmentJustifiedSelected( wxCommandEvent& event );
86
87 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_CENTRED
88 void OnAlignmentCentredSelected( wxCommandEvent& event );
89
90 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_ALIGNMENT_INDETERMINATE
91 void OnAlignmentIndeterminateSelected( wxCommandEvent& event );
92
93 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT
94 void OnIndentLeftUpdated( wxCommandEvent& event );
95
96 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_LEFT_FIRST
97 void OnIndentLeftFirstUpdated( wxCommandEvent& event );
98
99 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_INDENT_RIGHT
100 void OnIndentRightUpdated( wxCommandEvent& event );
101
102 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_BEFORE
103 void OnSpacingBeforeUpdated( wxCommandEvent& event );
104
105 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_AFTER
106 void OnSpacingAfterUpdated( wxCommandEvent& event );
107
108 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTINDENTSSPACINGPAGE_SPACING_LINE
109 void OnSpacingLineSelected( wxCommandEvent& event );
110
111 ////@end wxRichTextIndentsSpacingPage event handler declarations
112
113 ////@begin wxRichTextIndentsSpacingPage member function declarations
114
115 /// Retrieves bitmap resources
116 wxBitmap GetBitmapResource( const wxString& name );
117
118 /// Retrieves icon resources
119 wxIcon GetIconResource( const wxString& name );
120 ////@end wxRichTextIndentsSpacingPage member function declarations
121
122 /// Should we show tooltips?
123 static bool ShowToolTips();
124
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
139 enum {
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
153 };
154 ////@end wxRichTextIndentsSpacingPage member variables
155
156 bool m_dontUpdate;
157 };
158
159 #endif
160 // _RICHTEXTINDENTSPAGE_H_