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_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
42 * wxRichTextTabsPage class declaration
45 class WXDLLIMPEXP_RICHTEXT wxRichTextTabsPage
: public wxPanel
47 DECLARE_DYNAMIC_CLASS( wxRichTextTabsPage
)
52 wxRichTextTabsPage( );
53 wxRichTextTabsPage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTTABSPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTTABSPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTTABSPAGE_STYLE
);
56 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
);
58 /// Creates the controls and sizers
59 void CreateControls();
61 /// Initialise members
64 /// Transfer data from/to window
65 virtual bool TransferDataFromWindow();
66 virtual bool TransferDataToWindow();
68 /// Sorts the tab array
69 virtual void SortTabs();
71 /// Gets the attributes associated with the main formatting dialog
72 wxTextAttr
* GetAttributes();
74 ////@begin wxRichTextTabsPage event handler declarations
76 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTTABSPAGE_TABLIST
77 void OnTablistSelected( wxCommandEvent
& event
);
79 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
80 void OnNewTabClick( wxCommandEvent
& event
);
82 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_NEW_TAB
83 void OnNewTabUpdate( wxUpdateUIEvent
& event
);
85 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
86 void OnDeleteTabClick( wxCommandEvent
& event
);
88 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_TAB
89 void OnDeleteTabUpdate( wxUpdateUIEvent
& event
);
91 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
92 void OnDeleteAllTabsClick( wxCommandEvent
& event
);
94 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
95 void OnDeleteAllTabsUpdate( wxUpdateUIEvent
& event
);
97 ////@end wxRichTextTabsPage event handler declarations
99 ////@begin wxRichTextTabsPage member function declarations
101 /// Retrieves bitmap resources
102 wxBitmap
GetBitmapResource( const wxString
& name
);
104 /// Retrieves icon resources
105 wxIcon
GetIconResource( const wxString
& name
);
106 ////@end wxRichTextTabsPage member function declarations
108 /// Should we show tooltips?
109 static bool ShowToolTips();
111 ////@begin wxRichTextTabsPage member variables
112 wxTextCtrl
* m_tabEditCtrl
;
113 wxListBox
* m_tabListCtrl
;
114 /// Control identifiers
116 ID_RICHTEXTTABSPAGE
= 10200,
117 ID_RICHTEXTTABSPAGE_TABEDIT
= 10213,
118 ID_RICHTEXTTABSPAGE_TABLIST
= 10214,
119 ID_RICHTEXTTABSPAGE_NEW_TAB
= 10201,
120 ID_RICHTEXTTABSPAGE_DELETE_TAB
= 10202,
121 ID_RICHTEXTTABSPAGE_DELETE_ALL_TABS
= 10203
123 ////@end wxRichTextTabsPage member variables
129 // _RICHTEXTTABSPAGE_H_