use a single wxBookCtrlEvent class for all wxBookCtrlBase-derived controls (#9667)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,71 +1,11 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: treebook.h
|
||||
// Purpose: interface of wxTreebookEvent
|
||||
// Purpose: interface of wxTreebook
|
||||
// Author: wxWidgets team
|
||||
// RCS-ID: $Id$
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
@class wxTreebookEvent
|
||||
|
||||
This class represents the events generated by a treebook control: currently,
|
||||
there are four of them. The EVT_TREEBOOK_PAGE_CHANGING() and
|
||||
EVT_TREEBOOK_PAGE_CHANGED() - have exactly the same behaviour as
|
||||
wxNotebookEvent.
|
||||
|
||||
The other two EVT_TREEBOOK_NODE_COLLAPSED() and EVT_TREEBOOK_NODE_EXPANDED()
|
||||
are triggered when page node in the tree control is collapsed/expanded. The
|
||||
page index could be retreived by calling GetSelection().
|
||||
|
||||
@beginEventTable{wxTreebookEvent}
|
||||
@event{EVT_TREEBOOK_PAGE_CHANGED(id, func)}
|
||||
The page selection was changed. Processes a @c
|
||||
wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED event.
|
||||
@event{EVT_TREEBOOK_PAGE_CHANGING(id, func)}
|
||||
The page selection is about to be changed. Processes a @c
|
||||
wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING event. This event can be @ref
|
||||
wxNotifyEvent::Veto() "vetoed".
|
||||
@event{EVT_TREEBOOK_NODE_COLLAPSED(id, func)}
|
||||
The page node is going to be collapsed. Processes a @c
|
||||
wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED event.
|
||||
@event{EVT_TREEBOOK_NODE_EXPANDED(id, func)}
|
||||
The page node is going to be expanded. Processes a @c
|
||||
wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED event.
|
||||
@endEventTable
|
||||
|
||||
@library{wxcore}
|
||||
@category{events}
|
||||
|
||||
@see wxTreebook, wxNotebookEvent
|
||||
*/
|
||||
class wxTreebookEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@see wxNotebookEvent
|
||||
*/
|
||||
wxTreebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
|
||||
int nSel = wxNOT_FOUND,
|
||||
int nOldSel = wxNOT_FOUND);
|
||||
|
||||
/**
|
||||
Returns the page that was selected before the change, @c wxNOT_FOUND if
|
||||
none was selected.
|
||||
*/
|
||||
int GetOldSelection() const;
|
||||
|
||||
/**
|
||||
Returns the currently selected page, or @c wxNOT_FOUND if none was
|
||||
selected.
|
||||
|
||||
@see wxNotebookEvent::GetSelection()
|
||||
*/
|
||||
int GetSelection() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@class wxTreebook
|
||||
|
||||
@@ -81,7 +21,7 @@ public:
|
||||
AddPage() and AddSubPage() to sequentially populate your tree by adding at
|
||||
every step a page or a subpage to the end of the tree.
|
||||
|
||||
@beginEventTable{wxTreebookEvent}
|
||||
@beginEventTable{wxBookCtrlEvent}
|
||||
@event{EVT_TREEBOOK_PAGE_CHANGED(id, func)}
|
||||
The page selection was changed. Processes a @c
|
||||
wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED event.
|
||||
@@ -100,7 +40,7 @@ public:
|
||||
@library{wxcore}
|
||||
@category{miscwnd}
|
||||
|
||||
@see wxTreebookEvent, wxNotebook, wxTreeCtrl, wxImageList,
|
||||
@see wxBookCtrl, wxBookCtrlEvent, wxNotebook, wxTreeCtrl, wxImageList,
|
||||
@ref overview_bookctrl, @ref page_samples_notebook
|
||||
*/
|
||||
class wxTreebook : public wxBookCtrlBase
|
||||
@@ -230,7 +170,7 @@ public:
|
||||
|
||||
@note This method may return either the previously or newly selected
|
||||
page when called from the EVT_TREEBOOK_PAGE_CHANGED() handler
|
||||
depending on the platform and so wxTreebookEvent::GetSelection()
|
||||
depending on the platform and so wxBookCtrlEvent::GetSelection()
|
||||
should be used instead in this case.
|
||||
*/
|
||||
int GetSelection() const;
|
||||
|
Reference in New Issue
Block a user