]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/notebook.h
Add more checks for Intel compiler.
[wxWidgets.git] / include / wx / cocoa / notebook.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/notebook.h
3 // Purpose: wxNotebook class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2004/04/08
7 // Copyright: (c) 2004 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_COCOA_NOTEBOOK_H__
12 #define _WX_COCOA_NOTEBOOK_H__
13
14 #include "wx/cocoa/NSTabView.h"
15
16 // ========================================================================
17 // wxNotebook
18 // ========================================================================
19 class WXDLLIMPEXP_CORE wxNotebook: public wxNotebookBase, protected wxCocoaNSTabView
20 {
21 DECLARE_DYNAMIC_CLASS(wxNotebook)
22 DECLARE_EVENT_TABLE()
23 WX_DECLARE_COCOA_OWNER(NSTabView,NSView,NSView)
24 // ------------------------------------------------------------------------
25 // initialization
26 // ------------------------------------------------------------------------
27 public:
28 wxNotebook() { }
29 wxNotebook(wxWindow *parent, wxWindowID winid,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = 0,
33 const wxString& name = wxNotebookNameStr)
34 {
35 Create(parent, winid, pos, size, style, name);
36 }
37
38 bool Create(wxWindow *parent, wxWindowID winid,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = 0,
42 const wxString& name = wxNotebookNameStr);
43 virtual ~wxNotebook();
44
45 // ------------------------------------------------------------------------
46 // Cocoa callbacks
47 // ------------------------------------------------------------------------
48 protected:
49 // Notebooks cannot be enabled/disabled
50 virtual void CocoaSetEnabled(bool WXUNUSED(enable)) { }
51 virtual void CocoaDelegate_tabView_didSelectTabViewItem(WX_NSTabViewItem tabviewItem);
52 virtual bool CocoaDelegate_tabView_shouldSelectTabViewItem(WX_NSTabViewItem tabviewItem);
53 // ------------------------------------------------------------------------
54 // Implementation
55 // ------------------------------------------------------------------------
56 public:
57 // set the currently selected page, return the index of the previously
58 // selected one (or wxNOT_FOUND on error)
59 int SetSelection(size_t nPage);
60 // get the currently selected page
61 int GetSelection() const;
62
63 // changes selected page without sending events
64 int ChangeSelection(size_t nPage);
65
66 // set/get the title of a page
67 bool SetPageText(size_t nPage, const wxString& strText);
68 wxString GetPageText(size_t nPage) const;
69
70 // sets/returns item's image index in the current image list
71 int GetPageImage(size_t nPage) const;
72 bool SetPageImage(size_t nPage, int nImage);
73
74 // set the size (the same for all pages)
75 void SetPageSize(const wxSize& size);
76
77 // SetPadding and SetTabSize aren't possible to implement
78 void SetPadding(const wxSize& padding);
79 void SetTabSize(const wxSize& sz);
80
81 //-----------------------
82 // adding/removing pages
83
84 // remove one page from the notebook, without deleting
85 virtual wxNotebookPage *DoRemovePage(size_t nPage);
86
87 // remove one page from the notebook
88 bool DeletePage(size_t nPage);
89 // remove all pages
90 bool DeleteAllPages();
91
92 // adds a new page to the notebook (it will be deleted ny the notebook,
93 // don't delete it yourself). If bSelect, this page becomes active.
94 // the same as AddPage(), but adds it at the specified position
95 bool InsertPage( size_t position,
96 wxNotebookPage *win,
97 const wxString& strText,
98 bool bSelect = false,
99 int imageId = NO_IMAGE );
100
101 protected:
102 };
103
104 #endif //ndef _WX_COCOA_NOTEBOOK_H__