Class: Sirens::WindowView
- Inherits:
-
WidgetView
- Object
- AbstractView
- WidgetView
- Sirens::WindowView
- Defined in:
- lib/views/window_view.rb
Class Method Summary collapse
-
.view_accepted_styles ⇒ Object
Answer the styles accepted by this view.
Instance Method Summary collapse
- #height=(value) ⇒ Object
-
#initialize_handles ⇒ Object
Initializing.
- #subscribe_to_ui_events ⇒ Object
- #title ⇒ Object
- #title=(value) ⇒ Object
-
#width=(value) ⇒ Object
Styles.
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, #initialize, #main_handle, #populate_popup_menu_block=, #remove_view, #set_attribute, #show, #show_popup_menu, #state_colors_from, #width
Constructor Details
This class inherits a constructor from Sirens::WidgetView
Class Method Details
.view_accepted_styles ⇒ Object
Answer the styles accepted by this view.
10 11 12 |
# File 'lib/views/window_view.rb', line 10 def view_accepted_styles() super() + [:title].freeze end |
Instance Method Details
#height=(value) ⇒ Object
39 40 41 |
# File 'lib/views/window_view.rb', line 39 def height=(value) main_handle.default_height = value end |
#initialize_handles ⇒ Object
Initializing
17 18 19 20 21 |
# File 'lib/views/window_view.rb', line 17 def initialize_handles() @main_handle = Gtk::Window.new() Sirens.register_window end |
#subscribe_to_ui_events ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/views/window_view.rb', line 23 def subscribe_to_ui_events() main_handle.signal_connect("delete_event") { false } main_handle.signal_connect("destroy") { Sirens.unregister_window } end |
#title ⇒ Object
47 48 49 |
# File 'lib/views/window_view.rb', line 47 def title() main_handle.title end |
#title=(value) ⇒ Object
43 44 45 |
# File 'lib/views/window_view.rb', line 43 def title=(value) main_handle.title = value end |
#width=(value) ⇒ Object
Styles
35 36 37 |
# File 'lib/views/window_view.rb', line 35 def width=(value) main_handle.default_width = value end |