1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtexttabspage.h
4 // Author: Julian Smart
6 // Created: 10/4/2006 8:03:20 AM
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _RICHTEXTTABSPAGE_H_
13 #define _RICHTEXTTABSPAGE_H_
19 #include "wx/richtext/richtextdialogpage.h"
25 * Forward declarations
28 ////@begin forward declarations
29 ////@end forward declarations
35 ////@begin control identifiers
36 #define SYMBOL_WXRICHTEXTTABSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
37 #define SYMBOL_WXRICHTEXTTABSPAGE_TITLE wxEmptyString
38 #define SYMBOL_WXRICHTEXTTABSPAGE_IDNAME ID_RICHTEXTTABSPAGE
39 #define SYMBOL_WXRICHTEXTTABSPAGE_SIZE wxSize(400, 300)
40 #define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
41 ////@end control identifiers
44 * wxRichTextTabsPage class declaration
47 class WXDLLIMPEXP_RICHTEXT wxRichTextTabsPage
: public wxRichTextDialogPage
49 DECLARE_DYNAMIC_CLASS( wxRichTextTabsPage
)
51 DECLARE_HELP_PROVISION()
55 wxRichTextTabsPage( );
56 wxRichTextTabsPage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTTABSPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTTABSPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTTABSPAGE_STYLE
);
59 bool Create( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTTABSPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTTABSPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTTABSPAGE_STYLE
);
61 /// Creates the controls and sizers
62 void CreateControls();
64 /// Initialise members
67 /// Transfer data from/to window
68 virtual bool TransferDataFromWindow();
69 virtual bool TransferDataToWindow();
71 /// Sorts the tab array
72 virtual void SortTabs();
74 /// Gets the attributes associated with the main formatting dialog
75 wxRichTextAttr
* GetAttributes();
77 ////@begin wxRichTextTabsPage event handler declarations
79 /// wxEVT_LISTBOX event handler for ID_RICHTEXTTABSPAGE_TABLIST
80 void OnTablistSelected( wxCommandEvent
& event
);
82 /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
83 void OnNewTabClick( wxCommandEvent
& event
);
85 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
86 void OnNewTabUpdate( wxUpdateUIEvent
& event
);
88 /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
89 void OnDeleteTabClick( wxCommandEvent
& event
);
91 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
92 void OnDeleteTabUpdate( wxUpdateUIEvent
& event
);
94 /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
95 void OnDeleteAllTabsClick( wxCommandEvent
& event
);
97 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
98 void OnDeleteAllTabsUpdate( wxUpdateUIEvent
& event
);
100 ////@end wxRichTextTabsPage event handler declarations
102 ////@begin wxRichTextTabsPage member function declarations
104 /// Retrieves bitmap resources
105 wxBitmap
GetBitmapResource( const wxString
& name
);
107 /// Retrieves icon resources
108 wxIcon
GetIconResource( const wxString
& name
);
109 ////@end wxRichTextTabsPage member function declarations
111 /// Should we show tooltips?
112 static bool ShowToolTips();
114 ////@begin wxRichTextTabsPage member variables
115 wxTextCtrl
* m_tabEditCtrl
;
116 wxListBox
* m_tabListCtrl
;
117 /// Control identifiers
119 ID_RICHTEXTTABSPAGE
= 10200,
120 ID_RICHTEXTTABSPAGE_TABEDIT
= 10213,
121 ID_RICHTEXTTABSPAGE_TABLIST
= 10214,
122 ID_RICHTEXTTABSPAGE_NEW_TAB
= 10201,
123 ID_RICHTEXTTABSPAGE_DELETE_TAB
= 10202,
124 ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
= 10203
126 ////@end wxRichTextTabsPage member variables
132 // _RICHTEXTTABSPAGE_H_