Class: Wx::AcceleratorEntry
- Inherits:
-
Object
- Object
- Wx::AcceleratorEntry
- Defined in:
- lib/wx/doc/gen/accelerator.rb
Overview
This class is untracked and should not be derived from nor instances extended!
An object used by an application wishing to create an accelerator table (see AcceleratorTable).
Category: Data Structures
Instance Method Summary collapse
- #==(entry) ⇒ Boolean
-
#from_string(str) ⇒ Boolean
Parses the given string and sets the accelerator accordingly.
-
#get_command ⇒ Integer
(also: #command)
Returns the command identifier for the accelerator table entry.
-
#get_flags ⇒ Integer
(also: #flags)
Returns the flags for the accelerator table entry.
-
#get_key_code ⇒ Integer
(also: #key_code)
Returns the keycode for the accelerator table entry.
-
#get_menu_item ⇒ Wx::MenuItem
(also: #menu_item)
Returns the menu item associated with this accelerator entry.
-
#initialize(*args) ⇒ AcceleratorEntry
constructor
A new instance of AcceleratorEntry.
-
#is_ok ⇒ Boolean
(also: #ok?)
Returns true if this object is correctly initialized.
-
#matches_event(event) ⇒ Boolean
Returns true if the given key event corresponds to this accelerator.
-
#set(flags, keyCode, cmd, item = nil) ⇒ void
Sets the accelerator entry parameters.
-
#to_raw_string ⇒ String
Returns a textual representation of this accelerator which is appropriate for saving in configuration files.
-
#to_string ⇒ String
Returns a textual representation of this accelerator.
Constructor Details
#initialize(flags = 0, keyCode = 0, cmd = 0, item = nil) ⇒ Wx::AcceleratorEntry #initialize(entry) ⇒ Wx::AcceleratorEntry
Returns a new instance of AcceleratorEntry.
69 |
# File 'lib/wx/doc/gen/accelerator.rb', line 69 def initialize(*args) end |
Instance Method Details
#==(entry) ⇒ Boolean
134 |
# File 'lib/wx/doc/gen/accelerator.rb', line 134 def ==(entry) end |
#from_string(str) ⇒ Boolean
Parses the given string and sets the accelerator accordingly.
true if the given string correctly initialized this object (i.e. if #is_ok returns true after this call)
130 |
# File 'lib/wx/doc/gen/accelerator.rb', line 130 def from_string(str) end |
#get_command ⇒ Integer Also known as: command
Returns the command identifier for the accelerator table entry.
73 |
# File 'lib/wx/doc/gen/accelerator.rb', line 73 def get_command; end |
#get_flags ⇒ Integer Also known as: flags
Returns the flags for the accelerator table entry.
78 |
# File 'lib/wx/doc/gen/accelerator.rb', line 78 def get_flags; end |
#get_key_code ⇒ Integer Also known as: key_code
Returns the keycode for the accelerator table entry.
83 |
# File 'lib/wx/doc/gen/accelerator.rb', line 83 def get_key_code; end |
#get_menu_item ⇒ Wx::MenuItem Also known as:
Returns the menu item associated with this accelerator entry.
88 |
# File 'lib/wx/doc/gen/accelerator.rb', line 88 def ; end |
#is_ok ⇒ Boolean Also known as: ok?
Returns true if this object is correctly initialized.
101 |
# File 'lib/wx/doc/gen/accelerator.rb', line 101 def is_ok; end |
#matches_event(event) ⇒ Boolean
Returns true if the given key event corresponds to this accelerator.
All the modifiers must match exactly and the key codes are compared case-insensitively for the letters, i.e. an accelerator created from the string "Ctrl-a" matches the event for Ctrl-A.
Note that this function should be used with the key press events, i.e. EVT_KEY_DOWN, EVT_CHAR_HOOK or EVT_ACCELERATOR_KEY, but not with EVT_CHAR whose key codes are different.
110 |
# File 'lib/wx/doc/gen/accelerator.rb', line 110 def matches_event(event) end |
#set(flags, keyCode, cmd, item = nil) ⇒ void
This method returns an undefined value.
Sets the accelerator entry parameters.
97 |
# File 'lib/wx/doc/gen/accelerator.rb', line 97 def set(flags, keyCode, cmd, item=nil) end |
#to_raw_string ⇒ String
Returns a textual representation of this accelerator which is appropriate for saving in configuration files.
Unlike the string returned by #to_string, this one is never translated so, while it's not suitable for showing to the user, it can be used to uniquely identify the accelerator independently of the user language. The returned string can still be parsed by #from_string.
123 |
# File 'lib/wx/doc/gen/accelerator.rb', line 123 def to_raw_string; end |
#to_string ⇒ String
Returns a textual representation of this accelerator.
The returned string is of the form [Alt+][Ctrl+][RawCtrl+][Shift+]Key where the modifier keys are present only if the corresponding flag is set.
116 |
# File 'lib/wx/doc/gen/accelerator.rb', line 116 def to_string; end |