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_
23 * Forward declarations
26 ////@begin forward declarations
27 ////@end forward declarations
33 ////@begin control identifiers
34 #define SYMBOL_WXRICHTEXTTABSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
35 #define SYMBOL_WXRICHTEXTTABSPAGE_IDNAME ID_RICHTEXTTABSPAGE
36 #define SYMBOL_WXRICHTEXTTABSPAGE_SIZE wxSize(400, 300)
37 #define SYMBOL_WXRICHTEXTTABSPAGE_POSITION wxDefaultPosition
38 ////@end control identifiers
41 * wxRichTextTabsPage class declaration
44 class WXDLLIMPEXP_RICHTEXT wxRichTextTabsPage
: public wxPanel
46 DECLARE_DYNAMIC_CLASS( wxRichTextTabsPage
)
51 wxRichTextTabsPage( );
52 wxRichTextTabsPage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTTABSPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTTABSPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTTABSPAGE_STYLE
);
55 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
);
57 /// Creates the controls and sizers
58 void CreateControls();
60 /// Initialise members
63 /// Transfer data from/to window
64 virtual bool TransferDataFromWindow();
65 virtual bool TransferDataToWindow();
67 /// Sorts the tab array
68 virtual void SortTabs();
70 /// Gets the attributes associated with the main formatting dialog
71 wxTextAttr
* GetAttributes();
73 ////@begin wxRichTextTabsPage event handler declarations
75 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTTABSPAGE_TABLIST
76 void OnTablistSelected( wxCommandEvent
& event
);
78 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
79 void OnNewTabClick( wxCommandEvent
& event
);
81 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
82 void OnNewTabUpdate( wxUpdateUIEvent
& event
);
84 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
85 void OnDeleteTabClick( wxCommandEvent
& event
);
87 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
88 void OnDeleteTabUpdate( wxUpdateUIEvent
& event
);
90 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
91 void OnDeleteAllTabsClick( wxCommandEvent
& event
);
93 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
94 void OnDeleteAllTabsUpdate( wxUpdateUIEvent
& event
);
96 ////@end wxRichTextTabsPage event handler declarations
98 ////@begin wxRichTextTabsPage member function declarations
100 /// Retrieves bitmap resources
101 wxBitmap
GetBitmapResource( const wxString
& name
);
103 /// Retrieves icon resources
104 wxIcon
GetIconResource( const wxString
& name
);
105 ////@end wxRichTextTabsPage member function declarations
107 /// Should we show tooltips?
108 static bool ShowToolTips();
110 ////@begin wxRichTextTabsPage member variables
111 wxTextCtrl
* m_tabEditCtrl
;
112 wxListBox
* m_tabListCtrl
;
113 /// Control identifiers
115 ID_RICHTEXTTABSPAGE
= 10200,
116 ID_RICHTEXTTABSPAGE_TABEDIT
= 10213,
117 ID_RICHTEXTTABSPAGE_TABLIST
= 10214,
118 ID_RICHTEXTTABSPAGE_NEW_TAB
= 10201,
119 ID_RICHTEXTTABSPAGE_DELETE_TAB
= 10202,
120 ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
= 10203
122 ////@end wxRichTextTabsPage member variables
128 // _RICHTEXTTABSPAGE_H_