Class: Nobbie::Wx::SelectOperations

Inherits:
Object
  • Object
show all
Defined in:
lib/nobbie/wx/impl/operation/select.rb

Instance Method Summary collapse

Constructor Details

#initialize(operations, path) ⇒ SelectOperations

Returns a new instance of SelectOperations.



5
6
7
8
# File 'lib/nobbie/wx/impl/operation/select.rb', line 5

def initialize(operations, path)
  @operations = operations
  @path = path    
end

Instance Method Details

#choose(value) ⇒ Object

Selects the given value for the component specified in the path.

Supported components: Notebook, Menu, ComboBox, ListBox, Choice


18
19
20
# File 'lib/nobbie/wx/impl/operation/select.rb', line 18

def choose(value)
  execute(@operations.command_factory.create_select_command(@path, value))
end

#optionsObject

Retrieves available options for the component specified in the path.

Supported components: Notebook, ComboBox, ListBox, Choice


24
25
26
# File 'lib/nobbie/wx/impl/operation/select.rb', line 24

def options
  execute(@operations.command_factory.create_get_options_command(@path))
end

#selected_valueObject

Retrieves the currently selected value for the component specified in the path.

Supported components: Notebook, ComboBox, ListBox, Choice


12
13
14
# File 'lib/nobbie/wx/impl/operation/select.rb', line 12

def selected_value
  execute(@operations.command_factory.create_get_selected_values_command(@path))
end