wxacceleratortablean accelerator table allows the application to specify a table of keyboard shortcuts for menus or other commands. on windows, menu or button commands are supported; on gtk, only menu commands are supported. the object wxnullacceleratortable is defined to be a table with no data, and is the initial accelerator table for a window. derived from include files <wx/accel.h> predefined objects objects: wxnullacceleratortable example
an accelerator takes precedence over normal processing and can be a convenient way to program some event handling. for example, you can use an accelerator table to enable a dialog with a multi-line text control to accept ctrl-enter as meaning 'ok' (but not in gtk+ at present). see also wxacceleratorentry, wxwindow::setacceleratortable members
wxacceleratortable::wxacceleratortable
wxacceleratortable::wxacceleratortablewxacceleratortable() default constructor. wxacceleratortable(const wxacceleratortable& bitmap) copy constructor, uses reference counting. wxacceleratortable(int n, wxacceleratorentry entries[]) creates from an array of wxacceleratorentry objects. wxacceleratortable(const wxstring& resource) loads the accelerator table from a windows resource (windows only). parameters n
entries
resource
wxpython note: the wxpython constructor accepts a list of wxacceleratorentry objects, or 3-tuples consisting of flags, keycode, and cmd values like you would construct wxacceleratorentry objects with. wxperl note: the wxperl constructor accepts a list of either wx::acceleratorentry objects or references to 3-element arrays ( flags, keycode, cmd ), like the parameters of wx::acceleratorentry::new.
wxacceleratortable::~wxacceleratortable~wxacceleratortable() destroys the wxacceleratortable object. see reference-counted object destruction for more info.
wxacceleratortable::isokbool isok() const returns true if the accelerator table is valid.
wxacceleratortable::operator =wxacceleratortable& operator =(const wxacceleratortable& accel) assignment operator, using reference counting. parameters accel
return value returns a reference to this object.
|