1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtexttabspage.h
4 // Author: Julian Smart
6 // Created: 10/4/2006 8:03:20 AM
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _RICHTEXTTABSPAGE_H_
12 #define _RICHTEXTTABSPAGE_H_
18 #include "wx/richtext/richtextdialogpage.h"
24 * Forward declarations
27 ////@begin forward declarations
28 ////@end forward declarations
34 ////@begin control identifiers
35 #define SYMBOL_WXRICHTEXTTABSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
36 #define SYMBOL_WXRICHTEXTTABSPAGE_TITLE wxEmptyString
37 #define SYMBOL_WXRICHTEXTTABSPAGE_IDNAME ID_RICHTEXTTABSPAGE
38 #define SYMBOL_WXRICHTEXTTABSPAGE_SIZE wxSize(400, 300)
39 #define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
40 ////@end control identifiers
43 * wxRichTextTabsPage class declaration
46 class WXDLLIMPEXP_RICHTEXT wxRichTextTabsPage
: public wxRichTextDialogPage
48 DECLARE_DYNAMIC_CLASS( wxRichTextTabsPage
)
50 DECLARE_HELP_PROVISION()
54 wxRichTextTabsPage( );
55 wxRichTextTabsPage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTTABSPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTTABSPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTTABSPAGE_STYLE
);
58 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
);
60 /// Creates the controls and sizers
61 void CreateControls();
63 /// Initialise members
66 /// Transfer data from/to window
67 virtual bool TransferDataFromWindow();
68 virtual bool TransferDataToWindow();
70 /// Sorts the tab array
71 virtual void SortTabs();
73 /// Gets the attributes associated with the main formatting dialog
74 wxRichTextAttr
* GetAttributes();
76 ////@begin wxRichTextTabsPage event handler declarations
78 /// wxEVT_LISTBOX event handler for ID_RICHTEXTTABSPAGE_TABLIST
79 void OnTablistSelected( wxCommandEvent
& event
);
81 /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
82 void OnNewTabClick( wxCommandEvent
& event
);
84 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
85 void OnNewTabUpdate( wxUpdateUIEvent
& event
);
87 /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
88 void OnDeleteTabClick( wxCommandEvent
& event
);
90 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
91 void OnDeleteTabUpdate( wxUpdateUIEvent
& event
);
93 /// wxEVT_BUTTON event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
94 void OnDeleteAllTabsClick( wxCommandEvent
& event
);
96 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
97 void OnDeleteAllTabsUpdate( wxUpdateUIEvent
& event
);
99 ////@end wxRichTextTabsPage event handler declarations
101 ////@begin wxRichTextTabsPage member function declarations
103 /// Retrieves bitmap resources
104 wxBitmap
GetBitmapResource( const wxString
& name
);
106 /// Retrieves icon resources
107 wxIcon
GetIconResource( const wxString
& name
);
108 ////@end wxRichTextTabsPage member function declarations
110 /// Should we show tooltips?
111 static bool ShowToolTips();
113 ////@begin wxRichTextTabsPage member variables
114 wxTextCtrl
* m_tabEditCtrl
;
115 wxListBox
* m_tabListCtrl
;
116 /// Control identifiers
118 ID_RICHTEXTTABSPAGE
= 10200,
119 ID_RICHTEXTTABSPAGE_TABEDIT
= 10213,
120 ID_RICHTEXTTABSPAGE_TABLIST
= 10214,
121 ID_RICHTEXTTABSPAGE_NEW_TAB
= 10201,
122 ID_RICHTEXTTABSPAGE_DELETE_TAB
= 10202,
123 ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
= 10203
125 ////@end wxRichTextTabsPage member variables
131 // _RICHTEXTTABSPAGE_H_