Class: VER::Executor::ExLabel
- Inherits:
-
Entry
- Object
- Tk::Tile::Entry
- VER::Entry
- Entry
- VER::Executor::ExLabel
- Defined in:
- lib/ver/executor/label.rb
Constant Summary collapse
- COMPLETERS =
{ 'edit' => :ExPath, 'encoding' => :ExEncoding, 'fuzzy' => :ExFuzzyFileFinder, 'grep' => :ExGrep, 'grep_buffers' => :ExGrepBuffers, 'locate' => :ExLocate, 'method' => :ExMethod, 'open' => :ExPath, 'syntax' => :ExSyntax, 'theme' => :ExTheme, 'write' => :ExWrite, 'buffer' => :ExBuffer, }
Constants inherited from VER::Entry
VER::Entry::BACKWARD_WORD, VER::Entry::FORWARD_WORD
Instance Attribute Summary
Attributes inherited from Entry
#callback, #caller, #parent, #tabcount, #tree, #update_on_change, #ybar
Attributes included from Keymapped
Instance Method Summary collapse
Methods inherited from Entry
#accept_line, #after_update, #cancel, #completed=, #completion, #destroy, #initialize, #next_line, #on_delete, #on_insert, #prev_line, #speed_selection, #subset, #sync_value_with_tree_selection, #tree_selection_value, #update_items, #update_only
Methods included from Keymapped
Methods inherited from VER::Entry
#accept_line, #beginning_of_history, #cursor=, #delete, #delete_next_char, #delete_next_word, #delete_prev_char, #delete_prev_word, #deleting, #end_of_history, #end_of_line, #error, #event, #events, #insert, #insert_selection, #insert_string, #insert_tab, #kill, #kill_end_of_line, #killing, #message, #next_char, #next_history, #next_word, #paste, #prev_char, #prev_word, #previous_history, #sel_end_of_line, #sel_next_char, #sel_next_word, #sel_prev_char, #sel_prev_word, #sel_start_of_line, #start_of_line, #style, #transpose_chars, #value=, #virtual_movement
Constructor Details
This class inherits a constructor from VER::Executor::Entry
Instance Method Details
#action(name) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/ver/executor/label.rb', line 45 def action(name) completer_name = COMPLETERS.fetch(name) completer = Executor.const_get(completer_name) entry = callback.use_entry(completer) self.value = completer_name configure(state: :disabled, takefocus: false) entry.focus entry.update_only rescue KeyError end |
#choices(name) ⇒ Object
41 42 43 |
# File 'lib/ver/executor/label.rb', line 41 def choices(name) subset(name, COMPLETERS.keys) end |
#setup ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/ver/executor/label.rb', line 31 def setup tree.configure( show: [], columns: %w[ex], displaycolumns: %w[ex], ) tree.heading('ex', text: 'Execution Method') update_only end |