X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b74f194490a1eee31b3698b01eebc6844aa5364..093d3ff1f77c9ff8c1b66ebf43464429c583b044:/wxPython/src/_event.i diff --git a/wxPython/src/_event.i b/wxPython/src/_event.i index 0ebaae3fac..0b893da8b5 100644 --- a/wxPython/src/_event.i +++ b/wxPython/src/_event.i @@ -378,7 +378,7 @@ public: // (treat as if the event table entry had not been found): this must be done // to allow the event processing by the base classes (calling event.Skip() // is the analog of calling the base class verstion of a virtual function) - void Skip(bool skip = True); + void Skip(bool skip = true); bool GetSkipped() const; // Determine if this event should be propagating to the parent window. @@ -564,6 +564,16 @@ public: 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; @@ -685,6 +695,18 @@ public: 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 @@ -696,14 +718,16 @@ public: %pythoncode { KeyCode = GetKeyCode } %extend { - int GetUniChar() { + int GetUnicodeKey() { %#if wxUSE_UNICODE - return self->m_uniChar; + return self->GetUnicodeKey(); %#else return 0; %#endif } } + %pythoncode { GetUniChar = GetUnicodeKey } + // get the raw key code (platform-dependent) wxUint32 GetRawKeyCode() const; @@ -853,7 +877,7 @@ public: class wxActivateEvent : public wxEvent { public: - wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = True, int Id = 0); + wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, int Id = 0); bool GetActive() const; }; @@ -898,7 +922,7 @@ public: void SetLoggingOff(bool logOff); bool GetLoggingOff() const; - void Veto(bool veto = True); + void Veto(bool veto = true); void SetCanVeto(bool canVeto); bool CanVeto() const; @@ -912,7 +936,7 @@ public: class wxShowEvent : public wxEvent { public: - wxShowEvent(int winid = 0, bool show = False); + wxShowEvent(int winid = 0, bool show = false); void SetShow(bool show); bool GetShow() const; @@ -926,7 +950,7 @@ public: class wxIconizeEvent: public wxEvent { public: - wxIconizeEvent(int id = 0, bool iconized = True); + wxIconizeEvent(int id = 0, bool iconized = true); bool Iconized(); }; @@ -1119,6 +1143,7 @@ public: void SetCurrentFocus(wxWindow *win); enum { + IsBackward, IsForward, WinChange }; @@ -1195,7 +1220,7 @@ class wxIdleEvent : public wxEvent public: wxIdleEvent(); - void RequestMore(bool needMore = True); + void RequestMore(bool needMore = true); bool MoreRequested() const; // Specify how wxWindows will send idle events: to