listbook.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: listbook.h
  3. // Purpose: interface of wxListbook
  4. // Author: wxWidgets team
  5. // Licence: wxWindows licence
  6. /////////////////////////////////////////////////////////////////////////////
  7. // wxListbook flags
  8. #define wxLB_DEFAULT wxBK_DEFAULT
  9. #define wxLB_TOP wxBK_TOP
  10. #define wxLB_BOTTOM wxBK_BOTTOM
  11. #define wxLB_LEFT wxBK_LEFT
  12. #define wxLB_RIGHT wxBK_RIGHT
  13. #define wxLB_ALIGN_MASK wxBK_ALIGN_MASK
  14. wxEventType wxEVT_LISTBOOK_PAGE_CHANGED;
  15. wxEventType wxEVT_LISTBOOK_PAGE_CHANGING;
  16. /**
  17. @class wxListbook
  18. wxListbook is a class similar to wxNotebook but which uses a wxListCtrl
  19. to show the labels instead of the tabs.
  20. The underlying wxListCtrl displays page labels in a one-column report view
  21. by default. Calling wxBookCtrl::SetImageList will implicitly switch the
  22. control to use an icon view.
  23. For usage documentation of this class, please refer to the base abstract class
  24. wxBookCtrl. You can also use the @ref page_samples_notebook to see wxListbook in
  25. action.
  26. @beginStyleTable
  27. @style{wxLB_DEFAULT}
  28. Choose the default location for the labels depending on the current
  29. platform (left everywhere except Mac where it is top).
  30. @style{wxLB_TOP}
  31. Place labels above the page area.
  32. @style{wxLB_LEFT}
  33. Place labels on the left side.
  34. @style{wxLB_RIGHT}
  35. Place labels on the right side.
  36. @style{wxLB_BOTTOM}
  37. Place labels below the page area.
  38. @endStyleTable
  39. @beginEventEmissionTable{wxBookCtrlEvent}
  40. @event{EVT_LISTBOOK_PAGE_CHANGED(id, func)}
  41. The page selection was changed.
  42. Processes a @c wxEVT_LISTBOOK_PAGE_CHANGED event.
  43. @event{EVT_LISTBOOK_PAGE_CHANGING(id, func)}
  44. The page selection is about to be changed.
  45. Processes a @c wxEVT_LISTBOOK_PAGE_CHANGING event.
  46. This event can be vetoed.
  47. @endEventTable
  48. @library{wxcore}
  49. @category{bookctrl}
  50. @appearance{listbook}
  51. @see wxBookCtrl, wxNotebook, @ref page_samples_notebook
  52. */
  53. class wxListbook : public wxBookCtrlBase
  54. {
  55. public:
  56. /**
  57. Default ctor.
  58. */
  59. wxListbook();
  60. /**
  61. Constructs a listbook control.
  62. */
  63. wxListbook(wxWindow* parent, wxWindowID id,
  64. const wxPoint& pos = wxDefaultPosition,
  65. const wxSize& size = wxDefaultSize,
  66. long style = 0,
  67. const wxString& name = wxEmptyString);
  68. /**
  69. Create the list book control that has already been constructed with
  70. the default constructor.
  71. */
  72. bool Create(wxWindow *parent,
  73. wxWindowID id,
  74. const wxPoint& pos = wxDefaultPosition,
  75. const wxSize& size = wxDefaultSize,
  76. long style = 0,
  77. const wxString& name = wxEmptyString);
  78. /**
  79. Returns the wxListView associated with the control.
  80. */
  81. wxListView* GetListView() const;
  82. };