/usr/include/wx-3.0/wx/wxPython/i_files/_accel.i is in python-wxgtk3.0-dev 3.0.2.0+dfsg-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | /////////////////////////////////////////////////////////////////////////////
// Name: _accel.i
// Purpose: SWIG interface for wxAcceleratorTable
//
// Author: Robin Dunn
//
// Created: 03-July-1997
// RCS-ID: $Id$
// Copyright: (c) 2003 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
// Not a %module
//---------------------------------------------------------------------------
%typemap(in) (int n, const wxAcceleratorEntry* entries) {
$2 = wxAcceleratorEntry_LIST_helper($input);
if ($2) $1 = PyList_Size($input);
else $1 = 0;
}
%typemap(freearg) wxAcceleratorEntry* entries {
delete [] $1;
}
//---------------------------------------------------------------------------
%newgroup;
enum wxAcceleratorEntryFlags {
wxACCEL_ALT,
wxACCEL_CTRL,
wxACCEL_SHIFT,
wxACCEL_NORMAL,
wxACCEL_RAW_CTRL,
wxACCEL_CMD,
};
DocStr(wxAcceleratorEntry,
"A class used to define items in an `wx.AcceleratorTable`. wxPython
programs can choose to use wx.AcceleratorEntry objects, but using a
list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
as well. See `__init__` for details of the tuple values.
:see: `wx.AcceleratorTable`", "");
class wxAcceleratorEntry {
public:
DocCtorStr(
wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmdID = 0/*, wxMenuItem *menuitem = NULL*/),
"Construct a wx.AcceleratorEntry.",
"
:param flags: A bitmask of wx.ACCEL_ALT, wx.ACCEL_SHIFT,
wx.ACCEL_CTRL, wx.ACCEL_CMD, or wx.ACCEL_NORMAL
used to specify which modifier keys are held down.
:param keyCode: The keycode to be detected
:param cmdID: The menu or control command ID to use for the
accellerator event.
");
~wxAcceleratorEntry();
DocDeclStr(
void , Set(int flags, int keyCode, int cmd/*, wxMenuItem *menuItem = NULL*/),
"(Re)set the attributes of a wx.AcceleratorEntry.
:see `__init__`", "");
// void SetMenuItem(wxMenuItem *item);
// wxMenuItem *GetMenuItem() const;
%newobject Create;
DocDeclStr(
static wxAcceleratorEntry *, Create(const wxString& str),
"Create accelerator corresponding to the specified string, or None if
it coulnd't be parsed.", "");
DocDeclStr(
int , GetFlags(),
"Get the AcceleratorEntry's flags.", "");
DocDeclStr(
int , GetKeyCode(),
"Get the AcceleratorEntry's keycode.", "");
DocDeclStr(
int , GetCommand(),
"Get the AcceleratorEntry's command ID.", "");
DocDeclStr(
bool , IsOk() const,
"", "");
DocDeclStr(
wxString , ToString() const,
"Returns a string representation for the this accelerator. The string
is formatted using the <flags>-<keycode> format where <flags> maybe a
hyphen-separed list of \"shift|alt|ctrl\"
", "");
DocDeclStr(
bool , FromString(const wxString &str),
"Returns true if the given string correctly initialized this object.", "");
%property(Command, GetCommand, doc="See `GetCommand`");
%property(Flags, GetFlags, doc="See `GetFlags`");
%property(KeyCode, GetKeyCode, doc="See `GetKeyCode`");
};
DocStr(wxAcceleratorTable,
"An 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 ``wx.NullAcceleratorTable`` is defined to be a table with
no data, and is the initial accelerator table for a window.
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 make a hotkey generate an event no matter
which window within a frame has the focus.
For example::
aTable = wx.AcceleratorTable([(wx.ACCEL_ALT, ord('X'), exitID),
(wx.ACCEL_CTRL, ord('H'), helpID),
(wx.ACCEL_CTRL, ord('F'), findID),
(wx.ACCEL_NORMAL, wx.WXK_F3, findnextID)
])
self.SetAcceleratorTable(aTable)
:see: `wx.AcceleratorEntry`, `wx.Window.SetAcceleratorTable`
");
class wxAcceleratorTable : public wxObject {
public:
DocAStr(wxAcceleratorTable,
"__init__(entries) -> AcceleratorTable",
"Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
items or or of 3-tuples (flags, keyCode, cmdID)
:see: `wx.AcceleratorEntry`", "");
wxAcceleratorTable(int n, const wxAcceleratorEntry* entries);
~wxAcceleratorTable();
bool IsOk() const;
%pythoncode { Ok = IsOk }
};
%immutable;
const wxAcceleratorTable wxNullAcceleratorTable;
%mutable;
%pythoncode {
def GetAccelFromString(label):
entry = AcceleratorEntry()
if '\t' in label:
entry.FromString(label)
return entry
}
//---------------------------------------------------------------------------
|