]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtexttabspage.h
b3fa7c4608cbce34bfdd219edc77cf6b769a2b8e
[wxWidgets.git] / include / wx / richtext / richtexttabspage.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: richtexttabspage.h
3 // Purpose:
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 10/4/2006 8:03:20 AM
7 // RCS-ID:
8 // Copyright: (c) Julian Smart
9 // Licence:
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _RICHTEXTTABSPAGE_H_
13 #define _RICHTEXTTABSPAGE_H_
14
15 /*!
16 * Includes
17 */
18
19 ////@begin includes
20 ////@end includes
21
22 /*!
23 * Forward declarations
24 */
25
26 ////@begin forward declarations
27 ////@end forward declarations
28
29 /*!
30 * Control identifiers
31 */
32
33 ////@begin control identifiers
34 #define SYMBOL_WXRICHTEXTTABSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
35 #define SYMBOL_WXRICHTEXTTABSPAGE_TITLE _("wxRichTextFontPage")
36 #define SYMBOL_WXRICHTEXTTABSPAGE_IDNAME ID_RICHTEXTTABSPAGE
37 #define SYMBOL_WXRICHTEXTTABSPAGE_SIZE wxSize(400, 300)
38 #define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
39 ////@end control identifiers
40
41 /*!
42 * Compatibility
43 */
44
45 #ifndef wxCLOSE_BOX
46 #define wxCLOSE_BOX 0x1000
47 #endif
48
49 /*!
50 * wxRichTextTabsPage class declaration
51 */
52
53 class WXDLLIMPEXP_RICHTEXT wxRichTextTabsPage: public wxPanel
54 {
55 DECLARE_DYNAMIC_CLASS( wxRichTextTabsPage )
56 DECLARE_EVENT_TABLE()
57
58 public:
59 /// Constructors
60 wxRichTextTabsPage( );
61 wxRichTextTabsPage( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTTABSPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTTABSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTTABSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTTABSPAGE_STYLE );
62
63 /// Creation
64 bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXRICHTEXTTABSPAGE_IDNAME, const wxPoint& pos = SYMBOL_WXRICHTEXTTABSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTTABSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTTABSPAGE_STYLE );
65
66 /// Creates the controls and sizers
67 void CreateControls();
68
69 /// Initialise members
70 void Init();
71
72 /// Transfer data from/to window
73 virtual bool TransferDataFromWindow();
74 virtual bool TransferDataToWindow();
75
76 /// Sorts the tab array
77 virtual void SortTabs();
78
79 /// Gets the attributes associated with the main formatting dialog
80 wxTextAttrEx* GetAttributes();
81
82 ////@begin wxRichTextTabsPage event handler declarations
83
84 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTTABSPAGE_TABLIST
85 void OnTablistSelected( wxCommandEvent& event );
86
87 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
88 void OnNewTabClick( wxCommandEvent& event );
89
90 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
91 void OnNewTabUpdate( wxUpdateUIEvent& event );
92
93 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
94 void OnDeleteTabClick( wxCommandEvent& event );
95
96 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
97 void OnDeleteTabUpdate( wxUpdateUIEvent& event );
98
99 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
100 void OnDeleteAllTabsClick( wxCommandEvent& event );
101
102 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
103 void OnDeleteAllTabsUpdate( wxUpdateUIEvent& event );
104
105 ////@end wxRichTextTabsPage event handler declarations
106
107 ////@begin wxRichTextTabsPage member function declarations
108
109 /// Retrieves bitmap resources
110 wxBitmap GetBitmapResource( const wxString& name );
111
112 /// Retrieves icon resources
113 wxIcon GetIconResource( const wxString& name );
114 ////@end wxRichTextTabsPage member function declarations
115
116 /// Should we show tooltips?
117 static bool ShowToolTips();
118
119 ////@begin wxRichTextTabsPage member variables
120 wxTextCtrl* m_tabEditCtrl;
121 wxListBox* m_tabListCtrl;
122 /// Control identifiers
123 enum {
124 ID_RICHTEXTTABSPAGE = 10200,
125 ID_RICHTEXTTABSPAGE_TABEDIT = 10213,
126 ID_RICHTEXTTABSPAGE_TABLIST = 10214,
127 ID_RICHTEXTTABSPAGE_NEW_TAB = 10201,
128 ID_RICHTEXTTABSPAGE_DELETE_TAB = 10202,
129 ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS = 10203
130 };
131 ////@end wxRichTextTabsPage member variables
132
133 bool m_tabsPresent;
134 };
135
136 #endif
137 // _RICHTEXTTABSPAGE_H_