1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _core.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13const int wxBK_DEFAULT; 14const int wxBK_TOP; 15const int wxBK_BOTTOM; 16const int wxBK_LEFT; 17const int wxBK_RIGHT; 18const int wxBK_ALIGN_MASK; 19enum 20{ 21 wxBK_HITTEST_NOWHERE, 22 wxBK_HITTEST_ONICON, 23 wxBK_HITTEST_ONLABEL, 24 wxBK_HITTEST_ONITEM, 25 wxBK_HITTEST_ONPAGE 26}; 27 28class wxBookCtrlBase : wxControl, wxWithImages /Abstract/ 29{ 30 %Docstring 31 BookCtrlBase() 32 BookCtrlBase(parent, winid, pos=DefaultPosition, size=DefaultSize, style=0, name=EmptyString) 33 34 A book control is a convenient way of displaying multiple pages of 35 information, displayed one page at a time. 36 %End 37 %TypeHeaderCode 38 #include <wx/bookctrl.h> 39 %End 40 41public: 42 enum 43 { 44 NO_IMAGE 45 }; 46 47 wxBookCtrlBase(); 48 49 wxBookCtrlBase( 50 wxWindow * parent, 51 wxWindowID winid, 52 const wxPoint & pos = wxDefaultPosition, 53 const wxSize & size = wxDefaultSize, 54 long style = 0, 55 const wxString & name = wxEmptyString 56 ); 57 58 virtual 59 int GetPageImage( 60 size_t nPage 61 ) const = 0; 62 %Docstring 63 GetPageImage(nPage) -> int 64 65 Returns the image index for the given page. 66 %End 67 68 virtual 69 bool SetPageImage( 70 size_t page, 71 int image 72 ) = 0; 73 %Docstring 74 SetPageImage(page, image) -> bool 75 76 Sets the image index for the given page. 77 %End 78 79 virtual 80 wxString GetPageText( 81 size_t nPage 82 ) const = 0; 83 %Docstring 84 GetPageText(nPage) -> String 85 86 Returns the string for the given page. 87 %End 88 89 virtual 90 bool SetPageText( 91 size_t page, 92 const wxString & text 93 ) = 0; 94 %Docstring 95 SetPageText(page, text) -> bool 96 97 Sets the text for the given page. 98 %End 99 100 virtual 101 int GetSelection() const = 0; 102 %Docstring 103 GetSelection() -> int 104 105 Returns the currently selected page, or wxNOT_FOUND if none was 106 selected. 107 %End 108 109 wxWindow * GetCurrentPage() const; 110 %Docstring 111 GetCurrentPage() -> Window 112 113 Returns the currently selected page or NULL. 114 %End 115 116 virtual 117 int SetSelection( 118 size_t page 119 ) = 0; 120 %Docstring 121 SetSelection(page) -> int 122 123 Sets the selection to the given page, returning the previous 124 selection. 125 %End 126 127 void AdvanceSelection( 128 bool forward = true 129 ); 130 %Docstring 131 AdvanceSelection(forward=True) 132 133 Cycles through the tabs. 134 %End 135 136 virtual 137 int ChangeSelection( 138 size_t page 139 ) = 0; 140 %Docstring 141 ChangeSelection(page) -> int 142 143 Changes the selection to the given page, returning the previous 144 selection. 145 %End 146 147 int FindPage( 148 const wxWindow * page 149 ) const; 150 %Docstring 151 FindPage(page) -> int 152 153 Returns the index of the specified tab window or wxNOT_FOUND if not 154 found. 155 %End 156 157 virtual 158 bool AddPage( 159 wxWindow * page, 160 const wxString & text, 161 bool select = false, 162 int imageId = NO_IMAGE 163 ); 164 %Docstring 165 AddPage(page, text, select=False, imageId=NO_IMAGE) -> bool 166 167 Adds a new page. 168 %End 169 170 virtual 171 bool DeleteAllPages(); 172 %Docstring 173 DeleteAllPages() -> bool 174 175 Deletes all pages. 176 %End 177 178 virtual 179 bool DeletePage( 180 size_t page 181 ); 182 %Docstring 183 DeletePage(page) -> bool 184 185 Deletes the specified page, and the associated window. 186 %End 187 188 virtual 189 bool InsertPage( 190 size_t index, 191 wxWindow * page, 192 const wxString & text, 193 bool select = false, 194 int imageId = NO_IMAGE 195 ) = 0; 196 %Docstring 197 InsertPage(index, page, text, select=False, imageId=NO_IMAGE) -> bool 198 199 Inserts a new page at the specified position. 200 %End 201 202 virtual 203 bool RemovePage( 204 size_t page 205 ); 206 %Docstring 207 RemovePage(page) -> bool 208 209 Deletes the specified page, without deleting the associated window. 210 %End 211 212 virtual 213 size_t GetPageCount() const; 214 %Docstring 215 GetPageCount() -> size_t 216 217 Returns the number of pages in the control. 218 %End 219 220 wxWindow * GetPage( 221 size_t page 222 ) const; 223 %Docstring 224 GetPage(page) -> Window 225 226 Returns the window at the given page position. 227 %End 228 229 bool Create( 230 wxWindow * parent, 231 wxWindowID winid, 232 const wxPoint & pos = wxDefaultPosition, 233 const wxSize & size = wxDefaultSize, 234 long style = 0, 235 const wxString & name = wxEmptyString 236 ); 237 %Docstring 238 Create(parent, winid, pos=DefaultPosition, size=DefaultSize, style=0, name=EmptyString) -> bool 239 240 Constructs the book control with the given parameters. 241 %End 242 243 virtual 244 void SetPageSize( 245 const wxSize & size 246 ); 247 %Docstring 248 SetPageSize(size) 249 250 Sets the width and height of the pages. 251 %End 252 253 virtual 254 int HitTest( 255 const wxPoint & pt, 256 long * flags /Out/ = NULL 257 ) const; 258 %Docstring 259 HitTest(pt) -> (int, flags) 260 261 Returns the index of the tab at the specified position or wxNOT_FOUND 262 if none. 263 %End 264 265 public: 266 267 268 %Property(name=CurrentPage, get=GetCurrentPage) 269 %Property(name=PageCount, get=GetPageCount) 270 %Property(name=Selection, get=GetSelection, set=SetSelection) 271}; // end of class wxBookCtrlBase 272 273 274class wxBookCtrlEvent : wxNotifyEvent 275{ 276 %Docstring 277 BookCtrlEvent(eventType=wxEVT_NULL, id=0, sel=NOT_FOUND, oldSel=NOT_FOUND) 278 279 This class represents the events generated by book controls 280 (wxNotebook, wxListbook, wxChoicebook, wxTreebook, wxAuiNotebook). 281 %End 282 %TypeHeaderCode 283 #include <wx/bookctrl.h> 284 %End 285 286public: 287 wxBookCtrlEvent( 288 wxEventType eventType = wxEVT_NULL, 289 int id = 0, 290 int sel = wxNOT_FOUND, 291 int oldSel = wxNOT_FOUND 292 ); 293 294 int GetOldSelection() const; 295 %Docstring 296 GetOldSelection() -> int 297 298 Returns the page that was selected before the change, wxNOT_FOUND if 299 none was selected. 300 %End 301 302 int GetSelection() const; 303 %Docstring 304 GetSelection() -> int 305 306 Returns the currently selected page, or wxNOT_FOUND if none was 307 selected. 308 %End 309 310 void SetOldSelection( 311 int page 312 ); 313 %Docstring 314 SetOldSelection(page) 315 316 Sets the id of the page selected before the change. 317 %End 318 319 void SetSelection( 320 int page 321 ); 322 %Docstring 323 SetSelection(page) 324 325 Sets the selection member variable. 326 %End 327 328 public: 329 330 331 %Property(name=OldSelection, get=GetOldSelection, set=SetOldSelection) 332 %Property(name=Selection, get=GetSelection, set=SetSelection) 333}; // end of class wxBookCtrlEvent 334 335 336 337//--------------------------------------------------------------------------- 338 339