X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c99e2fd1b3432974b892be508c0757da5b6ad49..d50fc4dc6d4832d4678c6e99085198cafaeabb9a:/interface/wx/accel.h diff --git a/interface/wx/accel.h b/interface/wx/accel.h index bc67d5f3b2..580d30033d 100644 --- a/interface/wx/accel.h +++ b/interface/wx/accel.h @@ -3,7 +3,7 @@ // Purpose: interface of wxAccelerator* classes // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,13 +16,16 @@ enum wxAcceleratorEntryFlags /** hold Alt key down */ wxACCEL_ALT, - /** hold Ctrl key down */ + /** hold Ctrl key down, corresponds to Command key on OS X */ wxACCEL_CTRL, /** hold Shift key down */ wxACCEL_SHIFT, - /** Command key on OS X; identic to wxACCEL_CTRL on other platforms. */ + /** corresponds to real Ctrl key on OS X, identic to @c wxACCEL_CTRL on other platforms */ + wxACCEL_RAW_CTRL, + + /** deprecated, identic to @c wxACCEL_CTRL on all platforms. */ wxACCEL_CMD }; @@ -103,10 +106,11 @@ public: bool IsOk() const; /** - Returns a wxString for this accelerator. + Returns a textual representation of this accelerator. - This function formats it using the @c "flags-keycode" format - where @c flags maybe a hyphen-separed list of @c "shift|alt|ctrl". + The returned string is of the form [Alt+][Ctrl+][Shift+]Key + where the modifier keys are present only if the corresponding flag is + set. */ wxString ToString() const; @@ -114,7 +118,14 @@ public: Parses the given string and sets the accelerator accordingly. @param str - Should be a string in the form "flags-keycode" + This string may be either in the same format as returned by + ToString(), i.e. contain the accelerator itself only, or have the + format of a full menu item text with i.e. Label TAB + Accelerator. In the latter case, the part of the string + before the TAB is ignored. Notice that the latter format is only + supported for the compatibility with the previous wxWidgets + versions and the new code should pass only the accelerator string + itself to this function. @return @true if the given string correctly initialized this object (i.e. if IsOk() returns true after this call) @@ -179,6 +190,13 @@ public: Number of accelerator entries. @param entries The array of entries. + + @beginWxPerlOnly + 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. + @endWxPerlOnly */ wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);