Module: AMS::Menu
- Defined in:
- menu.rb
Class Method Summary (collapse)
-
+ (Boolean) end
Deactivate active context menu.
-
+ (Hash{String => Fixnum}) get_commands(handle, cur_path = '')
Get menu commands.
-
+ (Fixnum) get_item_count(handle)
Get menu item count.
-
+ (Fixnum) get_item_id(handle, index)
Get menu item id by item position.
-
+ (String?) get_menu_item_string_by_id(handle, id)
Get menu item string by item identifier.
-
+ (String?) get_menu_item_string_by_pos(handle, index)
Get menu item string by item position.
-
+ (Fixnum?) get_sub_menu(handle, index)
Get menu sub-menu handle by sub-menu position.
-
+ (Boolean) is_valid?(handle)
Determine whether handle is a reference to a valid menu.
-
+ (Boolean) set_menu_item_string_by_id(handle, id, string)
Set menu item string by item identifier.
-
+ (Boolean) set_menu_item_string_by_pos(handle, index, string)
Set menu item string by item position.
-
+ (void) validate(handle)
Verify that handle is a reference to a valid menu.
Class Method Details
+ (Boolean) end
Deactivate active context menu.
28 29 30 |
# File 'menu.rb', line 28 def end AMC::C.() end |
+ (Hash{String => Fixnum}) get_commands(handle, cur_path = '')
Get menu commands.
119 120 121 122 |
# File 'menu.rb', line 119 def get_commands(handle, cur_path = '') validate(handle) AMS::C.(handle, cur_path.to_s) end |
+ (Fixnum) get_item_count(handle)
Get menu item count.
37 38 39 40 |
# File 'menu.rb', line 37 def get_item_count(handle) validate(handle) AMS::C.(handle) end |
+ (Fixnum) get_item_id(handle, index)
Get menu item id by item position.
48 49 50 51 |
# File 'menu.rb', line 48 def get_item_id(handle, index) validate(handle) AMS::C.(handle, index.to_i) end |
+ (String?) get_menu_item_string_by_id(handle, id)
Get menu item string by item identifier.
83 84 85 86 87 88 |
# File 'menu.rb', line 83 def (handle, id) validate(handle) str = AMS::C.(handle, id.to_i) str = str.unpack('C*').pack('U*') if str str end |
+ (String?) get_menu_item_string_by_pos(handle, index)
Get menu item string by item position.
70 71 72 73 74 75 |
# File 'menu.rb', line 70 def (handle, index) validate(handle) str = AMS::C.(handle, index.to_i) str = str.unpack('C*').pack('U*') if str str end |
+ (Fixnum?) get_sub_menu(handle, index)
Get menu sub-menu handle by sub-menu position.
59 60 61 62 |
# File 'menu.rb', line 59 def (handle, index) validate(handle) AMS::C.(handle, index.to_i) end |
+ (Boolean) is_valid?(handle)
Determine whether handle is a reference to a valid menu.
20 21 22 |
# File 'menu.rb', line 20 def is_valid?(handle) AMS::C.(handle) end |
+ (Boolean) set_menu_item_string_by_id(handle, id, string)
Set menu item string by item identifier.
109 110 111 112 |
# File 'menu.rb', line 109 def (handle, id, string) validate(handle) AMS::C.(handle, id.to_i, string.to_s.unpack('U*').pack('C*')) end |
+ (Boolean) set_menu_item_string_by_pos(handle, index, string)
Set menu item string by item position.
97 98 99 100 |
# File 'menu.rb', line 97 def (handle, index, string) validate(handle) AMS::C.(handle, index.to_i, string.to_s.unpack('U*').pack('C*')) end |
+ (void) validate(handle)
This method returns an undefined value.
Verify that handle is a reference to a valid menu.
9 10 11 12 13 |
# File 'menu.rb', line 9 def validate(handle) AMS.validate_type(handle, Fixnum) return if AMS::C.(handle) raise TypeError, "Handle is not a reference to a valid menu!", caller end |