Class: Sirens::InputTextView
- Inherits:
-
WidgetView
- Object
- AbstractView
- WidgetView
- Sirens::InputTextView
- Defined in:
- lib/views/input_text_view.rb
Instance Method Summary collapse
-
#initialize_handles ⇒ Object
Initializing.
- #set_text(text) ⇒ Object
- #subscribe_to_ui_events ⇒ Object
-
#text ⇒ Object
Accessing.
Methods inherited from WidgetView
#add_view, #apply_prop, #apply_props, #initialize, #main_handle
Methods inherited from AbstractView
accepted_styles, #accepted_styles, #add_view, #attribute_at, #background_color=, #foreground_color=, #height, #height=, #initialize, #main_handle, #populate_popup_menu_block=, #remove_view, #set_attribute, #show, #show_popup_menu, #state_colors_from, view_accepted_styles, #width, #width=
Constructor Details
This class inherits a constructor from Sirens::WidgetView
Instance Method Details
#initialize_handles ⇒ Object
Initializing
6 7 8 |
# File 'lib/views/input_text_view.rb', line 6 def initialize_handles() @main_handle = Gtk::Entry.new end |
#set_text(text) ⇒ Object
19 20 21 22 23 |
# File 'lib/views/input_text_view.rb', line 19 def set_text(text) text = '' if text.nil? main_handle.buffer.text = text end |
#subscribe_to_ui_events ⇒ Object
10 11 |
# File 'lib/views/input_text_view.rb', line 10 def subscribe_to_ui_events() end |
#text ⇒ Object
Accessing
15 16 17 |
# File 'lib/views/input_text_view.rb', line 15 def text() main_handle.buffer.text end |