EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
-EVT_SPIN_UP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
-EVT_SPIN_DOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
-EVT_SPIN = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
-
EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
// Get checkbox value
bool IsChecked() const;
-
+ %pythoncode { Checked = IsChecked }
+
// True if the listbox event was a selection.
bool IsSelection() const;
bool AltDown() const;
bool ShiftDown() const;
+ DocDeclStr(
+ bool , CmdDown() const,
+ "\"Cmd\" is a pseudo key which is the same as Control for PC and Unix
+platforms but the special \"Apple\" (a.k.a as \"Command\") key on
+Macs: it makes often sense to use it instead of, say, `ControlDown`
+because Cmd key is used for the same thing under Mac as Ctrl
+elsewhere. The Ctrl still exists, it's just not used for this
+purpose. So for non-Mac platforms this is the same as `ControlDown`
+and Macs this is the same as `MetaDown`.", "");
+
// Find which event was just generated
bool LeftDown() const;
bool MiddleDown() const;
DocStr(GetPosition, // sets the docstring for both
- "Returns the position of the mouse in window coordinates when the event happened.");
+ "Returns the position of the mouse in window coordinates when the event
+happened.", "");
wxPoint GetPosition();
DocDeclAName(
bool MetaDown() const;
bool AltDown() const;
bool ShiftDown() const;
+
+ DocDeclStr(
+ bool , CmdDown() const,
+ "\"Cmd\" is a pseudo key which is the same as Control for PC and Unix
+platforms but the special \"Apple\" (a.k.a as \"Command\") key on
+Macs: it makes often sense to use it instead of, say, `ControlDown`
+because Cmd key is used for the same thing under Mac as Ctrl
+elsewhere. The Ctrl still exists, it's just not used for this
+purpose. So for non-Mac platforms this is the same as `ControlDown`
+and Macs this is the same as `MetaDown`.", "");
+
+
// exclude MetaDown() from HasModifiers() because NumLock under X is often
// configured as mod2 modifier, yet the key events even when it is pressed
%pythoncode { KeyCode = GetKeyCode }
%extend {
- int GetUniChar() {
- #if wxUSE_UNICODE
- return self->m_uniChar;
- #else
+ int GetUnicodeKey() {
+ %#if wxUSE_UNICODE
+ return self->GetUnicodeKey();
+ %#else
return 0;
- #endif
+ %#endif
}
}
+ %pythoncode { GetUniChar = GetUnicodeKey }
+
// get the raw key code (platform-dependent)
wxUint32 GetRawKeyCode() const;
DocStr(GetPosition, // sets the docstring for both
- "Find the position of the event.");
+ "Find the position of the event.", "");
wxPoint GetPosition();
DocDeclAName(
wxUPDATE_UI_PROCESS_SPECIFIED
};
+
+
class wxUpdateUIEvent : public wxCommandEvent
{
public:
static wxUpdateUIMode GetMode();
};
-
//---------------------------------------------------------------------------
%newgroup;
// direction: forward (True) or backward (False)
bool GetDirection() const;
- void SetDirection(bool bForward);
+ void SetDirection(bool forward);
// it may be a window change event (MDI, notebook pages...) or a control
// change event
bool IsWindowChange() const;
- void SetWindowChange(bool bIs);
+ void SetWindowChange(bool ischange);
+ void SetFlags(long flags);
+
// the child which has the focus currently (may be NULL - use
// wxWindow::FindFocus then)
wxWindow* GetCurrentFocus() const;
void SetCurrentFocus(wxWindow *win);
+
+ enum {
+ IsBackward,
+ IsForward,
+ WinChange
+ };
};
wxIDLE_PROCESS_SPECIFIED
};
+
class wxIdleEvent : public wxEvent
{
public:
class wxPyEvent : public wxEvent {
public:
- %addtofunc wxPyEvent "self.SetSelf(self)"
+ %pythonAppend wxPyEvent "self.SetSelf(self)"
wxPyEvent(int winid=0, wxEventType commandType = wxEVT_NULL );
~wxPyEvent();
class wxPyCommandEvent : public wxCommandEvent {
public:
- %addtofunc wxPyCommandEvent "self.SetSelf(self)"
+ %pythonAppend wxPyCommandEvent "self.SetSelf(self)"
wxPyCommandEvent(wxEventType commandType = wxEVT_NULL, int id=0);
~wxPyCommandEvent();