]>
git.saurik.com Git - wxWidgets.git/blob - src/qt/notebook.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "notebook.h"
15 #include "wx/notebook.h"
18 #include "wx/imaglist.h"
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
25 class wxNotebookPage
: public wxObject
45 //-----------------------------------------------------------------------------
47 //-----------------------------------------------------------------------------
49 IMPLEMENT_DYNAMIC_CLASS(wxNotebook
,wxControl
)
51 void wxNotebook::Init()
54 m_pages
.DeleteContents( TRUE
);
57 wxNotebook::wxNotebook()
62 wxNotebook::wxNotebook( wxWindow
*parent
, wxWindowID id
,
63 const wxPoint
& pos
, const wxSize
& size
,
64 long style
, const wxString
& name
)
67 Create( parent
, id
, pos
, size
, style
, name
);
70 wxNotebook::~wxNotebook()
75 bool wxNotebook::Create(wxWindow
*parent
, wxWindowID id
,
76 const wxPoint
& pos
, const wxSize
& size
,
77 long style
, const wxString
& name
)
79 PreCreation( parent
, id
, pos
, size
, style
, name
);
88 int wxNotebook::GetSelection() const
92 int wxNotebook::GetPageCount() const
96 int wxNotebook::GetRowCount() const
100 wxString
wxNotebook::GetPageText( int page
) const
104 int wxNotebook::GetPageImage( int page
) const
108 wxNotebookPage
* wxNotebook::GetNotebookPage(int page
) const
113 int wxNotebook::SetSelection( int page
)
117 void wxNotebook::AdvanceSelection(bool bForward
)
121 void wxNotebook::SetImageList( wxImageList
* imageList
)
123 m_imageList
= imageList
;
126 bool wxNotebook::SetPageText( int page
, const wxString
&text
)
131 bool wxNotebook::SetPageImage( int page
, int image
)
136 void wxNotebook::SetPageSize( const wxSize
&WXUNUSED(size
) )
140 void wxNotebook::SetPadding( const wxSize
&WXUNUSED(padding
) )
144 bool wxNotebook::DeleteAllPages()
149 bool wxNotebook::DeletePage( int page
)
154 bool wxNotebook::AddPage(wxWindow
* win
, const wxString
& text
,
155 bool bSelect
, int imageId
)
160 wxWindow
*wxNotebook::GetPage( int page
) const
165 void wxNotebook::AddChild( wxWindow
*win
)
169 // override these 2 functions to do nothing: everything is done in OnSize
170 void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse
) )
172 // don't set the sizes of the pages - their correct size is not yet known
173 wxControl::SetConstraintSizes(FALSE
);
176 bool wxNotebook::DoPhase( int WXUNUSED(nPhase
) )
181 //-----------------------------------------------------------------------------
183 //-----------------------------------------------------------------------------
185 IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent
, wxCommandEvent
)