1 // =========================================================================== 2 // Purpose: Various wxAdv library classes 3 // Author: J Winwood, John Labenski 4 // Created: 14/11/2001 5 // Copyright: (c) 2001-2002 Lomtick Software. All rights reserved. 6 // Licence: wxWidgets licence 7 // wxWidgets: Updated to 2.8.4 8 // =========================================================================== 9 10 // --------------------------------------------------------------------------- 11 // wxAboutDialog 12 13 #if %wxchkver_2_8 && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog 14 15 #include "wx/aboutdlg.h" 16 17 class %delete wxAboutDialogInfo 18 { 19 wxAboutDialogInfo(); 20 21 void SetName(const wxString& name); 22 wxString GetName() const; 23 24 void SetVersion(const wxString& version); 25 bool HasVersion() const; 26 wxString GetVersion() const; 27 28 void SetDescription(const wxString& desc); 29 bool HasDescription() const; 30 wxString GetDescription() const; 31 32 void SetCopyright(const wxString& copyright); 33 bool HasCopyright() const; 34 wxString GetCopyright() const; 35 36 void SetLicence(const wxString& licence); 37 void SetLicense(const wxString& licence); 38 bool HasLicence() const; 39 wxString GetLicence() const; 40 41 void SetIcon(const wxIcon& icon); 42 bool HasIcon() const; 43 wxIcon GetIcon() const; 44 45 void SetWebSite(const wxString& url, const wxString& desc = ""); 46 bool HasWebSite() const; 47 48 wxString GetWebSiteURL() const; 49 wxString GetWebSiteDescription() const; 50 51 void SetDevelopers(const wxArrayString& developers); 52 void AddDeveloper(const wxString& developer); 53 bool HasDevelopers() const; 54 const wxArrayString& GetDevelopers() const; 55 56 void SetDocWriters(const wxArrayString& docwriters); 57 void AddDocWriter(const wxString& docwriter); 58 bool HasDocWriters() const; 59 wxArrayString GetDocWriters() const; 60 61 void SetArtists(const wxArrayString& artists); 62 void AddArtist(const wxString& artist); 63 bool HasArtists() const; 64 wxArrayString GetArtists() const; 65 66 void SetTranslators(const wxArrayString& translators); 67 void AddTranslator(const wxString& translator); 68 bool HasTranslators() const; 69 wxArrayString GetTranslators() const; 70 71 // implementation only 72 // ------------------- 73 bool IsSimple() const; 74 wxString GetDescriptionAndCredits() const; 75 }; 76 77 void wxAboutBox(const wxAboutDialogInfo& info); 78 79 #endif //%wxchkver_2_8 && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog 80 81 82 // --------------------------------------------------------------------------- 83 // wxAnimation 84 85 #if %wxchkver_2_8 && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL 86 87 #include "wx/animate.h" 88 89 enum wxAnimationType 90 { 91 wxANIMATION_TYPE_INVALID, 92 wxANIMATION_TYPE_GIF, 93 wxANIMATION_TYPE_ANI, 94 95 wxANIMATION_TYPE_ANY 96 }; 97 98 class %delete wxAnimation : public wxGDIObject // ignore platform independent wxAnimationBase 99 { 100 wxAnimation(); 101 wxAnimation(const wxAnimation& anim); 102 //wxAnimation(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY); // doesn't exist in 2.8.4 103 104 virtual bool IsOk() const; 105 virtual int GetDelay(unsigned int frame) const; // can be -1 106 virtual unsigned int GetFrameCount() const; 107 virtual wxImage GetFrame(unsigned int frame) const; 108 virtual wxSize GetSize() const; 109 110 virtual bool LoadFile(const wxString& name, wxAnimationType type = wxANIMATION_TYPE_ANY); 111 virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY); 112 }; 113 114 // --------------------------------------------------------------------------- 115 // wxAnimationCtrl 116 117 #define wxAC_NO_AUTORESIZE 118 #define wxAC_DEFAULT_STYLE // = wxNO_BORDER 119 120 class wxAnimationCtrl : public wxControl 121 { 122 wxAnimationCtrl(); 123 wxAnimationCtrl(wxWindow *parent, wxWindowID id, const wxAnimation& anim, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, const wxString& name = "wxAnimationCtrl"); 124 bool Create(wxWindow *parent, wxWindowID id, const wxAnimation& anim, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAC_DEFAULT_STYLE, const wxString& name = "wxAnimationCtrl"); 125 126 virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY); 127 128 wxAnimation GetAnimation() const; 129 // always return the original bitmap set in this control 130 wxBitmap GetInactiveBitmap() const; 131 virtual bool IsPlaying() const; 132 bool LoadFile(const wxString& file, wxAnimationType animType = wxANIMATION_TYPE_ANY); 133 virtual bool Play(); 134 virtual void SetAnimation(const wxAnimation &anim); 135 virtual void SetInactiveBitmap(const wxBitmap &bmp); 136 virtual void Stop(); 137 }; 138 139 #endif // %wxchkver_2_8 && wxLUA_USE_wxAnimation && wxUSE_ANIMATIONCTRL 140 141 142 // --------------------------------------------------------------------------- 143 // wxBitmapComboBox 144 145 #if wxLUA_USE_wxBitmapComboBox && wxUSE_BITMAPCOMBOBOX 146 147 #include "wx/bmpcbox.h" 148 149 class wxBitmapComboBox : public wxControl 150 { 151 wxBitmapComboBox(); 152 //wxBitmapComboBox(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n = 0, const wxString choices[] = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "comboBox"); 153 wxBitmapComboBox(wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxBitmapComboBox"); 154 //bool Create(wxWindow* parent, wxWindowID id, const wxString& value = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int n, const wxString choices[], long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxBitmapComboBox"); 155 bool Create(wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxArrayString& choices = wxLuaNullSmartwxArrayString, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxBitmapComboBox"); 156 157 int Append(const wxString& item, const wxBitmap& bitmap = wxNullBitmap); 158 int Append(const wxString& item, const wxBitmap& bitmap, voidptr_long data); // C++ is (void *clientData) You can put a number here 159 int Append(const wxString& item, const wxBitmap& bitmap, wxClientData *clientData); 160 161 wxSize GetBitmapSize() const; 162 wxBitmap GetItemBitmap(unsigned int n) const; 163 164 int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos); 165 #if !%wxchkver_2_9_0 || %wxchkver_2_9_5 // This function body was missing so you'd get linker errors 166 int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos, voidptr_long data); // C++ is (void *clientData) You can put a number here 167 #endif 168 int Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos, wxClientData *clientData); 169 170 void SetItemBitmap(unsigned int n, const wxBitmap& bitmap); 171 172 void Clear(); 173 void Delete(unsigned int n); 174 unsigned int GetCount() const; 175 wxString GetString(unsigned int n) const; 176 void SetString(unsigned int n, const wxString& s); 177 int FindString(const wxString& s, bool bCase = false) const; 178 void Select(int n); 179 int GetSelection() const; 180 //void GetSelection(long* from, long* to) const; 181 void SetSelection(int n); 182 //void SetSelection(long from, long to); 183 //int GetWidestItemWidth(); 184 //int GetWidestItem(); 185 186 void SetValue(const wxString& value); 187 void SetString(unsigned int n, const wxString& s); 188 bool SetStringSelection(const wxString& s); 189 }; 190 191 #endif //wxLUA_USE_wxBitmapComboBox && wxUSE_BITMAPCOMBOBOX 192 193 194 // --------------------------------------------------------------------------- 195 // wxCalendarCtrl 196 197 #if wxLUA_USE_wxCalendarCtrl && wxUSE_CALENDARCTRL 198 199 #include "wx/calctrl.h" 200 201 enum 202 { 203 wxCAL_SUNDAY_FIRST, 204 wxCAL_MONDAY_FIRST, 205 wxCAL_SHOW_HOLIDAYS, 206 wxCAL_NO_YEAR_CHANGE, 207 wxCAL_NO_MONTH_CHANGE, 208 wxCAL_SHOW_SURROUNDING_WEEKS, 209 wxCAL_SEQUENTIAL_MONTH_SELECTION 210 }; 211 212 enum wxCalendarHitTestResult 213 { 214 wxCAL_HITTEST_NOWHERE, 215 wxCAL_HITTEST_HEADER, 216 wxCAL_HITTEST_DAY, 217 wxCAL_HITTEST_INCMONTH, 218 wxCAL_HITTEST_DECMONTH, 219 wxCAL_HITTEST_SURROUNDING_WEEK 220 }; 221 222 enum wxCalendarDateBorder 223 { 224 wxCAL_BORDER_NONE, 225 wxCAL_BORDER_SQUARE, 226 wxCAL_BORDER_ROUND 227 }; 228 229 class wxCalendarCtrl : public wxControl 230 { 231 wxCalendarCtrl(wxWindow* parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, const wxString& name = "wxCalendarCtrl"); 232 //bool Create(wxWindow* parent, wxWindowID id, const wxDateTime& date = wxDefaultDateTime, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAL_SHOW_HOLIDAYS, const wxString& name = "wxCalendarCtrl"); 233 234 void SetDate(const wxDateTime& date); 235 wxDateTime GetDate() const; 236 237 #if !%wxchkver_2_9_2 238 void EnableYearChange(bool enable = true); 239 #endif 240 241 void EnableMonthChange(bool enable = true); 242 void EnableHolidayDisplay(bool display = true); 243 void SetHeaderColours(const wxColour& colFg, const wxColour& colBg); 244 wxColour GetHeaderColourFg() const; 245 wxColour GetHeaderColourBg() const; 246 void SetHighlightColours(const wxColour& colFg, const wxColour& colBg); 247 wxColour GetHighlightColourFg() const; 248 wxColour GetHighlightColourBg() const; 249 void SetHolidayColours(const wxColour& colFg, const wxColour& colBg); 250 wxColour GetHolidayColourFg() const; 251 wxColour GetHolidayColourBg() const; 252 wxCalendarDateAttr* GetAttr(size_t day) const; 253 void SetAttr(size_t day, %ungc wxCalendarDateAttr* attr); // will delete previously set attr as well 254 void SetHoliday(size_t day); 255 void ResetAttr(size_t day); 256 257 // %override [wxCalendarHitTestResult, wxDateTime date, wxDateTime::WeekDay wd] wxCalendarCtrl::HitTest(const wxPoint& pos); 258 // C++ Func: wxCalendarHitTestResult HitTest(const wxPoint& pos, wxDateTime* date = NULL, wxDateTime::WeekDay* wd = NULL); 259 wxCalendarHitTestResult HitTest(const wxPoint& pos); 260 }; 261 262 // --------------------------------------------------------------------------- 263 // wxCalendarDateAttr 264 265 class %delete wxCalendarDateAttr 266 { 267 wxCalendarDateAttr(); 268 wxCalendarDateAttr(const wxColour& colText, const wxColour& colBack = wxNullColour, const wxColour& colBorder = wxNullColour, const wxFont& font = wxNullFont, wxCalendarDateBorder border = wxCAL_BORDER_NONE); 269 wxCalendarDateAttr(wxCalendarDateBorder border, const wxColour& colBorder = wxNullColour); 270 271 void SetTextColour(const wxColour& colText); 272 void SetBackgroundColour(const wxColour& colBack); 273 void SetBorderColour(const wxColour& col); 274 void SetFont(const wxFont& font); 275 void SetBorder(wxCalendarDateBorder border); 276 void SetHoliday(bool holiday); 277 bool HasTextColour() const; 278 bool HasBackgroundColour() const; 279 bool HasBorderColour() const; 280 bool HasFont() const; 281 bool HasBorder() const; 282 bool IsHoliday() const; 283 wxColour GetTextColour() const; 284 wxColour GetBackgroundColour(); 285 wxColour GetBorderColour() const; 286 wxFont GetFont() const; 287 wxCalendarDateBorder GetBorder(); 288 }; 289 290 // --------------------------------------------------------------------------- 291 // wxDateEvent 292 293 #include "wx/dateevt.h" 294 295 class %delete wxDateEvent : public wxCommandEvent 296 { 297 %wxEventType wxEVT_DATE_CHANGED // EVT_DATE_CHANGED(id, fn); 298 %wxEventType wxEVT_TIME_CHANGED // EVT_TIME_CHANGED(id, fn); 299 300 wxDateEvent(wxWindow *win, const wxDateTime& dt, wxEventType type); 301 302 wxDateTime GetDate() const; 303 void SetDate(const wxDateTime &date); 304 }; 305 306 // --------------------------------------------------------------------------- 307 // wxCalendarEvent 308 309 #include "wx/event.h" 310 311 class %delete wxCalendarEvent : public wxDateEvent 312 { 313 %wxEventType wxEVT_CALENDAR_SEL_CHANGED // EVT_CALENDAR_SEL_CHANGED(id, fn); 314 %wxEventType wxEVT_CALENDAR_DAY_CHANGED // EVT_CALENDAR_DAY(id, fn); 315 %wxEventType wxEVT_CALENDAR_MONTH_CHANGED // EVT_CALENDAR_MONTH(id, fn); 316 %wxEventType wxEVT_CALENDAR_YEAR_CHANGED // EVT_CALENDAR_YEAR(id, fn); 317 %wxEventType wxEVT_CALENDAR_DOUBLECLICKED // EVT_CALENDAR(id, fn); 318 %wxEventType wxEVT_CALENDAR_WEEKDAY_CLICKED // EVT_CALENDAR_WEEKDAY_CLICKED(id, fn); 319 320 %wxchkver_2_9_2 wxCalendarEvent(const wxCalendarEvent& event); 321 !%wxchkver_2_9_2 wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type); 322 %wxchkver_2_9_2 wxCalendarEvent(wxWindow *win, const wxDateTime& dt, wxEventType type); 323 324 wxDateTime::WeekDay GetWeekDay() const; 325 void SetWeekDay(const wxDateTime::WeekDay wd); 326 }; 327 328 #endif //wxLUA_USE_wxCalendarCtrl && wxUSE_CALENDARCTRL 329 330 331 // --------------------------------------------------------------------------- 332 // wxHyperlinkCtrl 333 334 #if %wxchkver_2_8 && wxUSE_HYPERLINKCTRL && wxLUA_USE_wxHyperlinkCtrl 335 336 #include "wx/hyperlink.h" 337 338 #define wxHL_CONTEXTMENU 339 #define wxHL_ALIGN_LEFT 340 #define wxHL_ALIGN_RIGHT 341 #define wxHL_ALIGN_CENTRE 342 #define wxHL_DEFAULT_STYLE // (wxHL_CONTEXTMENU|wxNO_BORDER|wxHL_ALIGN_CENTRE); 343 344 class wxHyperlinkCtrl : public wxControl 345 { 346 wxHyperlinkCtrl(); 347 wxHyperlinkCtrl(wxWindow *parent, wxWindowID id, const wxString& label, const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, const wxString& name = "wxHyperlinkCtrl"); 348 bool Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxHL_DEFAULT_STYLE, const wxString& name = "wxHyperlinkCtrl"); 349 350 wxColour GetHoverColour() const; 351 wxColour GetNormalColour() const; 352 wxColour GetVisitedColour() const; 353 bool GetVisited() const; 354 wxString GetURL() const; 355 356 void SetHoverColour(const wxColour &colour); 357 void SetNormalColour(const wxColour &colour); 358 void SetVisitedColour(const wxColour &colour); 359 void SetVisited(bool visited = true); 360 void SetURL (const wxString &url); 361 }; 362 363 // --------------------------------------------------------------------------- 364 // wxHyperlinkEvent 365 366 class %delete wxHyperlinkEvent : public wxCommandEvent 367 { 368 %wxEventType wxEVT_COMMAND_HYPERLINK // EVT_HYPERLINK(id, fn); 369 %wxchkver_3_0_0 %wxEventType wxEVT_HYPERLINK // wx3.0 alias for wxEVT_COMMAND_HYPERLINK 370 371 //wxHyperlinkEvent(); 372 wxHyperlinkEvent(wxObject *generator, wxWindowID id, const wxString& url); 373 374 wxString GetURL() const; 375 void SetURL(const wxString &url); 376 }; 377 378 #endif // %wxchkver_2_8 && wxUSE_HYPERLINKCTRL && wxLUA_USE_wxHyperlinkCtrl 379 380 381 // --------------------------------------------------------------------------- 382 // wxSashWindow 383 384 #if wxLUA_USE_wxSashWindow && wxUSE_SASH 385 386 #include "wx/sashwin.h" 387 388 #define wxSW_3D 389 #define wxSW_3DSASH 390 #define wxSW_3DBORDER 391 #define wxSW_BORDER 392 393 enum wxSashEdgePosition 394 { 395 wxSASH_TOP, 396 wxSASH_RIGHT, 397 wxSASH_BOTTOM, 398 wxSASH_LEFT, 399 wxSASH_NONE 400 }; 401 402 enum wxSashDragStatus 403 { 404 wxSASH_STATUS_OK, 405 wxSASH_STATUS_OUT_OF_RANGE 406 }; 407 408 class wxSashWindow : public wxWindow 409 { 410 wxSashWindow(); 411 wxSashWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "wxSashWindow"); 412 413 bool GetSashVisible(wxSashEdgePosition edge) const; 414 int GetMaximumSizeX() const; 415 int GetMaximumSizeY() const; 416 int GetMinimumSizeX() const; 417 int GetMinimumSizeY() const; 418 419 void SetMaximumSizeX(int min); 420 void SetMaximumSizeY(int min); 421 void SetMinimumSizeX(int min); 422 void SetMinimumSizeY(int min); 423 void SetSashVisible(wxSashEdgePosition edge, bool visible); 424 425 %wxcompat_2_6 bool HasBorder(wxSashEdgePosition edge) const; 426 %wxcompat_2_6 void SetSashBorder(wxSashEdgePosition edge, bool hasBorder); 427 }; 428 429 // --------------------------------------------------------------------------- 430 // wxSashLayoutWindow 431 432 #include "wx/laywin.h" 433 434 enum wxLayoutAlignment 435 { 436 wxLAYOUT_NONE, 437 wxLAYOUT_TOP, 438 wxLAYOUT_LEFT, 439 wxLAYOUT_RIGHT, 440 wxLAYOUT_BOTTOM 441 }; 442 443 enum wxLayoutOrientation 444 { 445 wxLAYOUT_HORIZONTAL, 446 wxLAYOUT_VERTICAL 447 }; 448 449 class wxSashLayoutWindow : public wxSashWindow 450 { 451 wxSashLayoutWindow(); 452 wxSashLayoutWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "wxSashLayoutWindow"); 453 bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "wxSashLayoutWindow"); 454 455 wxLayoutAlignment GetAlignment() const; 456 wxLayoutOrientation GetOrientation() const; 457 //void OnCalculateLayout(wxCalculateLayoutEvent& event); 458 //void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event); 459 void SetAlignment(wxLayoutAlignment alignment); 460 void SetDefaultSize(const wxSize& size); 461 void SetOrientation(wxLayoutOrientation orientation); 462 }; 463 464 // --------------------------------------------------------------------------- 465 // wxLayoutAlgorithm - for wxSashLayoutWindow 466 467 #include "wx/laywin.h" 468 469 class %delete wxLayoutAlgorithm : public wxObject 470 { 471 wxLayoutAlgorithm(); 472 473 bool LayoutFrame(wxFrame* frame, wxWindow* mainWindow = NULL) const; 474 bool LayoutMDIFrame(wxMDIParentFrame* frame, wxRect* rect = NULL); 475 bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = NULL); 476 }; 477 478 // --------------------------------------------------------------------------- 479 // wxQueryLayoutInfoEvent - for wxSashLayoutWindow 480 481 #include "wx/laywin.h" 482 483 class %delete wxQueryLayoutInfoEvent : public wxEvent 484 { 485 %wxEventType wxEVT_QUERY_LAYOUT_INFO // EVT_QUERY_LAYOUT_INFO(func); 486 487 wxQueryLayoutInfoEvent(wxWindowID id = 0); 488 489 wxLayoutAlignment GetAlignment() const; 490 int GetFlags() const; 491 wxLayoutOrientation GetOrientation() const; 492 int GetRequestedLength() const; 493 wxSize GetSize() const; 494 void SetAlignment(wxLayoutAlignment alignment); 495 void SetFlags(int flags); 496 void SetOrientation(wxLayoutOrientation orientation); 497 void SetRequestedLength(int length); 498 void SetSize(const wxSize& size); 499 }; 500 501 // --------------------------------------------------------------------------- 502 // wxCalculateLayoutEvent - for wxSashLayoutWindow 503 504 #include "wx/laywin.h" 505 506 class %delete wxCalculateLayoutEvent : public wxEvent 507 { 508 %wxEventType wxEVT_CALCULATE_LAYOUT // EVT_CALCULATE_LAYOUT(func); 509 510 wxCalculateLayoutEvent(wxWindowID id = 0); 511 512 int GetFlags() const; 513 wxRect GetRect() const; 514 void SetFlags(int flags); 515 void SetRect(const wxRect& rect); 516 }; 517 518 // --------------------------------------------------------------------------- 519 // wxSashEvent 520 521 class %delete wxSashEvent : public wxCommandEvent 522 { 523 %wxEventType wxEVT_SASH_DRAGGED // EVT_SASH_DRAGGED(id, fn) EVT_SASH_DRAGGED_RANGE(id1, id2, fn); 524 525 wxSashEvent(int id = 0, wxSashEdgePosition edge = wxSASH_NONE); 526 527 void SetEdge(wxSashEdgePosition edge); 528 int GetEdge(); 529 void SetDragRect(const wxRect& rect); 530 wxRect GetDragRect(); 531 void SetDragStatus(wxSashDragStatus status); 532 int GetDragStatus(); 533 }; 534 535 #endif //wxLUA_USE_wxSashWindow && wxUSE_SASH 536 537 538 // --------------------------------------------------------------------------- 539 // wxSplashScreen 540 541 #if wxLUA_USE_wxSplashScreen 542 543 #include "wx/splash.h" 544 545 #define wxSPLASH_CENTRE_ON_PARENT 546 #define wxSPLASH_CENTRE_ON_SCREEN 547 #define wxSPLASH_NO_CENTRE 548 #define wxSPLASH_TIMEOUT 549 #define wxSPLASH_NO_TIMEOUT 550 551 class wxSplashScreen : public wxFrame 552 { 553 wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int milliseconds, wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSIMPLE_BORDER|wxFRAME_NO_TASKBAR|wxSTAY_ON_TOP); 554 555 long GetSplashStyle() const; 556 wxSplashScreenWindow* GetSplashWindow() const; 557 int GetTimeout() const; 558 }; 559 560 class wxSplashScreenWindow : public wxWindow 561 { 562 // don't need to create this, just get it from wxSplashScreen 563 564 void SetBitmap(const wxBitmap& bitmap); 565 wxBitmap& GetBitmap(); 566 }; 567 568 #endif //wxLUA_USE_wxSplashScreen 569 570 571 // --------------------------------------------------------------------------- 572 // wxWizard 573 574 #if wxUSE_WIZARDDLG && wxLUA_USE_wxWizard 575 576 #include "wx/wizard.h" 577 578 #define wxWIZARD_EX_HELPBUTTON 579 580 class wxWizard : public wxDialog 581 { 582 wxWizard(); 583 wxWizard(wxWindow* parent, int id = -1, const wxString& title = "", const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE); 584 bool Create(wxWindow* parent, int id = -1, const wxString& title = "", const wxBitmap& bitmap = wxNullBitmap, const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE); 585 586 wxWizardPage* GetCurrentPage() const; 587 virtual wxSizer* GetPageAreaSizer() const; 588 wxSize GetPageSize() const; 589 virtual bool HasNextPage(wxWizardPage *page); 590 virtual bool HasPrevPage(wxWizardPage *page); 591 bool RunWizard(wxWizardPage* firstPage); 592 void SetPageSize(const wxSize& sizePage); 593 void SetBorder(int border); 594 }; 595 596 // --------------------------------------------------------------------------- 597 // wxWizardPage - this has virtual functions so it can't be used? 598 599 class wxWizardPage : public wxPanel 600 { 601 //wxWizardPage(wxWizard* parent, const wxBitmap& bitmap = wxNullBitmap, const wxChar *resource = NULL); 602 603 //virtual wxWizardPage* GetPrev() const; // FIXME not virtual for wxLua 604 //virtual wxWizardPage* GetNext() const; 605 wxBitmap GetBitmap() const; 606 }; 607 608 // --------------------------------------------------------------------------- 609 // wxWizardPageSimple - use this 610 611 class wxWizardPageSimple : public wxWizardPage 612 { 613 wxWizardPageSimple(wxWizard* parent = NULL, wxWizardPage* prev = NULL, wxWizardPage* next = NULL, const wxBitmap& bitmap = wxNullBitmap); 614 615 virtual wxWizardPage* GetPrev() const; 616 virtual wxWizardPage* GetNext() const; 617 618 void SetPrev(wxWizardPage* prev); 619 void SetNext(wxWizardPage* next); 620 static void Chain(wxWizardPageSimple* first, wxWizardPageSimple* second); 621 }; 622 623 // --------------------------------------------------------------------------- 624 // wxWizardEvent 625 626 class %delete wxWizardEvent : public wxNotifyEvent 627 { 628 %wxEventType wxEVT_WIZARD_CANCEL // EVT_WIZARD_CANCEL(id, fn); 629 %wxEventType wxEVT_WIZARD_PAGE_CHANGED // EVT_WIZARD_PAGE_CHANGED(id, fn); 630 %wxEventType wxEVT_WIZARD_PAGE_CHANGING // EVT_WIZARD_PAGE_CHANGING(id, fn); 631 %wxEventType wxEVT_WIZARD_HELP // EVT_WIZARD_HELP(id, fn); 632 %wxEventType wxEVT_WIZARD_FINISHED // EVT_WIZARD_FINISHED(id, fn); 633 634 wxWizardEvent(wxEventType type = wxEVT_NULL, int id = -1, bool direction = true); 635 636 bool GetDirection() const; 637 wxWizardPage* GetPage() const; 638 }; 639 640 #endif //wxUSE_WIZARDDLG && wxLUA_USE_wxWizard 641 642 643 // --------------------------------------------------------------------------- 644 // wxTaskBarIcon 645 646 #if wxLUA_USE_wxTaskBarIcon && defined(wxHAS_TASK_BAR_ICON); 647 648 #include "wx/taskbar.h" 649 650 class %delete wxTaskBarIcon : public wxEvtHandler 651 { 652 wxTaskBarIcon(); 653 654 // virtual wxMenu* CreatePopupMenu(); 655 bool IsIconInstalled(); 656 %wxchkver_2_4 bool IsOk(); 657 virtual bool PopupMenu(wxMenu* menu); 658 659 // call RemoveIcon() or delete this if you want your program to exit, must have called SetIcon(); 660 bool RemoveIcon(); 661 // call SetIcon() to have the taskbar icon displayed 662 bool SetIcon(const wxIcon& icon, const wxString& tooltip); 663 }; 664 665 // --------------------------------------------------------------------------- 666 // wxTaskBarIconEvent 667 668 class %delete wxTaskBarIconEvent : public wxEvent 669 { 670 %wxEventType wxEVT_TASKBAR_MOVE // EVT_TASKBAR_MOVE(func); 671 %wxEventType wxEVT_TASKBAR_LEFT_DOWN // EVT_TASKBAR_LEFT_DOWN(func); 672 %wxEventType wxEVT_TASKBAR_LEFT_UP // EVT_TASKBAR_LEFT_UP(func); 673 %wxEventType wxEVT_TASKBAR_RIGHT_DOWN // EVT_TASKBAR_RIGHT_DOWN(func); 674 %wxEventType wxEVT_TASKBAR_RIGHT_UP // EVT_TASKBAR_RIGHT_UP(func); 675 %wxEventType wxEVT_TASKBAR_LEFT_DCLICK // EVT_TASKBAR_LEFT_DCLICK(func); 676 %wxEventType wxEVT_TASKBAR_RIGHT_DCLICK // EVT_TASKBAR_RIGHT_DCLICK(func); 677 678 wxTaskBarIconEvent(wxEventType evtType, wxTaskBarIcon *tbIcon); 679 }; 680 681 #endif //wxLUA_USE_wxTaskBarIcon && defined(wxHAS_TASK_BAR_ICON); 682 683 684 // --------------------------------------------------------------------------- 685 // wxJoystick 686 687 #if wxLUA_USE_wxJoystick && wxUSE_JOYSTICK 688 689 #include "wx/joystick.h" 690 691 enum 692 { 693 wxJOYSTICK1, 694 wxJOYSTICK2 695 }; 696 697 enum 698 { 699 wxJOY_BUTTON_ANY, 700 wxJOY_BUTTON1, 701 wxJOY_BUTTON2, 702 wxJOY_BUTTON3, 703 wxJOY_BUTTON4 704 }; 705 706 class %delete wxJoystick : public wxObject 707 { 708 wxJoystick(int joystick = wxJOYSTICK1); 709 710 int GetButtonState() const; 711 int GetManufacturerId() const; 712 int GetMovementThreshold() const; 713 int GetNumberAxes() const; 714 int GetNumberButtons() const; 715 %wxchkver_2_8 static int GetNumberJoysticks() const; 716 !%wxchkver_2_8 int GetNumberJoysticks() const; 717 int GetPollingMax() const; 718 int GetPollingMin() const; 719 int GetProductId() const; 720 wxString GetProductName() const; 721 wxPoint GetPosition() const; 722 int GetPOVPosition() const; 723 int GetPOVCTSPosition() const; 724 int GetRudderMax() const; 725 int GetRudderMin() const; 726 int GetRudderPosition() const; 727 int GetUMax() const; 728 int GetUMin() const; 729 int GetUPosition() const; 730 int GetVMax() const; 731 int GetVMin() const; 732 int GetVPosition() const; 733 int GetXMax() const; 734 int GetXMin() const; 735 int GetYMax() const; 736 int GetYMin() const; 737 int GetZMax() const; 738 int GetZMin() const; 739 int GetZPosition() const; 740 bool HasPOV() const; 741 bool HasPOV4Dir() const; 742 bool HasPOVCTS() const; 743 bool HasRudder() const; 744 bool HasU() const; 745 bool HasV() const; 746 bool HasZ() const; 747 bool IsOk() const; 748 bool ReleaseCapture(); 749 bool SetCapture(wxWindow* win, int pollingFreq = 0); 750 void SetMovementThreshold(int threshold); 751 }; 752 753 // --------------------------------------------------------------------------- 754 // wxJoystickEvent 755 756 #include "wx/event.h" 757 758 class %delete wxJoystickEvent : public wxEvent 759 { 760 %wxEventType wxEVT_JOY_BUTTON_DOWN // EVT_JOY_BUTTON_DOWN(func); 761 %wxEventType wxEVT_JOY_BUTTON_UP // EVT_JOY_BUTTON_UP(func); 762 %wxEventType wxEVT_JOY_MOVE // EVT_JOY_MOVE(func); 763 %wxEventType wxEVT_JOY_ZMOVE // EVT_JOY_ZMOVE(func); 764 765 wxJoystickEvent(wxEventType eventType = wxEVT_NULL, int state = 0, int joystick = wxJOYSTICK1, int change = 0); 766 767 bool ButtonDown(int button = wxJOY_BUTTON_ANY) const; 768 bool ButtonIsDown(int button = wxJOY_BUTTON_ANY) const; 769 bool ButtonUp(int button = wxJOY_BUTTON_ANY) const; 770 int GetButtonChange() const; 771 int GetButtonState() const; 772 int GetJoystick() const; 773 wxPoint GetPosition() const; 774 int GetZPosition() const; 775 bool IsButton() const; 776 bool IsMove() const; 777 bool IsZMove() const; 778 }; 779 780 #endif //wxLUA_USE_wxJoystick && wxUSE_JOYSTICK 781 782 783 // --------------------------------------------------------------------------- 784 // wxSound 785 786 #if wxLUA_USE_wxWave 787 788 wxUSE_SOUND|(%msw&wxUSE_WAVE) #define wxSOUND_SYNC 789 wxUSE_SOUND|(%msw&wxUSE_WAVE) #define wxSOUND_ASYNC 790 wxUSE_SOUND|(%msw&wxUSE_WAVE) #define wxSOUND_LOOP 791 792 #if %wxchkver_2_6 && wxUSE_SOUND 793 794 #include "wx/sound.h" 795 796 class %delete wxSound : public wxObject 797 { 798 wxSound(); 799 wxSound(const wxString& fileName, bool isResource = false); 800 //wxSound(int size, const wxByte* data); 801 bool Create(const wxString& fileName, bool isResource = false); 802 //bool Create(int size, const wxByte* data); 803 804 bool IsOk() const; 805 !%win static bool IsPlaying() const; 806 bool Play(unsigned int flags = wxSOUND_ASYNC) const; 807 static bool Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC); 808 static void Stop(); 809 }; 810 811 #endif // %wxchkver_2_6 && wxUSE_SOUND 812 813 // --------------------------------------------------------------------------- 814 // wxWave 815 816 #if %msw && !%wxchkver_2_6 && wxUSE_WAVE 817 818 #include "wx/wave.h" 819 820 class %delete wxWave : public wxObject 821 { 822 wxWave(); 823 wxWave(const wxString& fileName, bool isResource = false); 824 bool Create(const wxString& fileName, bool isResource = false); 825 826 bool IsOk() const; 827 !%wxchkver_2_6 bool Play(bool async = true, bool looped = false) const; 828 %wxchkver_2_6 bool Play(unsigned int flags = wxSOUND_ASYNC) const; 829 }; 830 831 #endif // %msw && !%wxchkver_2_6 && wxUSE_WAVE 832 833 #endif //wxLUA_USE_wxWave 834 835