toolbook.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: toolbook.h
  3. // Purpose: interface of wxToolbook
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. #define wxTBK_BUTTONBAR 0x0100
  8. #define wxTBK_HORZ_LAYOUT 0x8000
  9. wxEventType wxEVT_TOOLBOOK_PAGE_CHANGED;
  10. wxEventType wxEVT_TOOLBOOK_PAGE_CHANGING;
  11. /**
  12. @class wxToolbook
  13. wxToolbook is a class similar to wxNotebook but which uses a wxToolBar to
  14. show the labels instead of the tabs.
  15. There is no documentation for this class yet but its usage is identical to
  16. wxNotebook (except for the features clearly related to tabs only), so please
  17. refer to that class documentation for now. You can also use the
  18. @ref page_samples_notebook to see wxToolbook in action.
  19. @beginStyleTable
  20. @style{wxTBK_BUTTONBAR}
  21. Use wxButtonToolBar-based implementation under Mac OS (ignored under
  22. other platforms).
  23. @style{wxTBK_HORZ_LAYOUT}
  24. Shows the text and the icons alongside, not vertically stacked (only
  25. implement under Windows and GTK 2 platforms as it relies on
  26. @c wxTB_HORZ_LAYOUT flag support).
  27. @endStyleTable
  28. The common wxBookCtrl styles described in the @ref overview_bookctrl are
  29. also supported.
  30. @beginEventEmissionTable{wxBookCtrlEvent}
  31. @event{EVT_TOOLBOOK_PAGE_CHANGED(id, func)}
  32. The page selection was changed.
  33. Processes a @c wxEVT_TOOLBOOK_PAGE_CHANGED event.
  34. @event{EVT_TOOLBOOK_PAGE_CHANGING(id, func)}
  35. The page selection is about to be changed.
  36. Processes a @c wxEVT_TOOLBOOK_PAGE_CHANGING event.
  37. This event can be vetoed (using wxNotifyEvent::Veto()).
  38. @endEventTable
  39. @library{wxcore}
  40. @category{bookctrl}
  41. @see @ref overview_bookctrl, wxBookCtrlBase, wxNotebook,
  42. @ref page_samples_notebook
  43. */
  44. class wxToolbook : public wxBookCtrlBase
  45. {
  46. public:
  47. //@{
  48. /**
  49. Constructs a choicebook control.
  50. */
  51. wxToolbook();
  52. wxToolbook(wxWindow* parent, wxWindowID id,
  53. const wxPoint& pos = wxDefaultPosition,
  54. const wxSize& size = wxDefaultSize,
  55. long style = 0,
  56. const wxString& name = wxEmptyString);
  57. //@}
  58. /**
  59. Create the tool book control that has already been constructed with
  60. the default constructor.
  61. */
  62. bool Create(wxWindow *parent,
  63. wxWindowID id,
  64. const wxPoint& pos = wxDefaultPosition,
  65. const wxSize& size = wxDefaultSize,
  66. long style = 0,
  67. const wxString& name = wxEmptyString);
  68. /**
  69. Returns the wxToolBarBase associated with the control.
  70. */
  71. wxToolBarBase* GetToolBar() const;
  72. };