Phoenix Logo

phoenix_title wx.lib.agw.labelbook.ImageNotebookEvent

This events will be sent when a EVT_IMAGENOTEBOOK_PAGE_CHANGED, EVT_IMAGENOTEBOOK_PAGE_CHANGING, EVT_IMAGENOTEBOOK_PAGE_CLOSING, EVT_IMAGENOTEBOOK_PAGE_CLOSED is mapped in the parent.


class_hierarchy Class Hierarchy

Inheritance diagram for class ImageNotebookEvent:

super_classes Known Superclasses

wx.PyCommandEvent


method_summary Methods Summary

__init__ Default class constructor.
Allow This is the opposite of Veto: it explicitly allows the event to be processed.
GetOldSelection Returns the old event selection.
GetSelection Returns the event selection.
IsAllowed Returns True if the change is allowed ( Veto hasn’t been called) or
SetOldSelection Sets the event old selection.
SetSelection Sets the event selection.
Veto Prevents the change announced by this event from happening.

api Class API



class ImageNotebookEvent(wx.PyCommandEvent)

This events will be sent when a EVT_IMAGENOTEBOOK_PAGE_CHANGED, EVT_IMAGENOTEBOOK_PAGE_CHANGING, EVT_IMAGENOTEBOOK_PAGE_CLOSING, EVT_IMAGENOTEBOOK_PAGE_CLOSED is mapped in the parent.


Methods



__init__(self, eventType, eventId=1, sel=-1, oldsel=-1)

Default class constructor.

Parameters:
  • eventType – the event type;
  • eventId – the event identifier;
  • sel – the current selection;
  • oldsel – the old selection.


Allow(self)

This is the opposite of Veto: it explicitly allows the event to be processed. For most events it is not necessary to call this method as the events are allowed anyhow but some are forbidden by default (this will be mentioned in the corresponding event description).



GetOldSelection(self)

Returns the old event selection.



GetSelection(self)

Returns the event selection.



IsAllowed(self)

Returns True if the change is allowed ( Veto hasn’t been called) or False otherwise (if it was).



SetOldSelection(self, s)

Sets the event old selection.

Parameters:s – an integer specifying the old selection.


SetSelection(self, s)

Sets the event selection.

Parameters:s – an integer specifying the new selection.


Veto(self)

Prevents the change announced by this event from happening.

Note

It is in general a good idea to notify the user about the reasons for vetoing the change because otherwise the applications behaviour (which just refuses to do what the user wants) might be quite surprising.