Module: Tk::Menu::TkInternalFunction
- Defined in:
- lib/tk/menu.rb
Class Method Summary collapse
- .next_entry(menu, delta) ⇒ Object
-
.next_menu(menu, dir = 'next') ⇒ Object
These methods calls internal functions of Tcl/Tk.
Class Method Details
.next_entry(menu, delta) ⇒ Object
410 411 412 413 414 |
# File 'lib/tk/menu.rb', line 410 def next_entry(, delta) # delta is increment value of entry index. # For example, +1 denotes 'next entry' and -1 denotes 'previous entry'. Tk.tk_call('::tk::MenuNextEntry', , delta) end |
.next_menu(menu, dir = 'next') ⇒ Object
These methods calls internal functions of Tcl/Tk. So, They may not work on your Tcl/Tk.
398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/tk/menu.rb', line 398 def (, dir='next') dir = dir.to_s case dir when 'next', 'forward', 'down' dir = 'right' when 'previous', 'backward', 'up' dir = 'left' end Tk.tk_call('::tk::MenuNextMenu', , dir) end |