Class: Sirens::StackView

Inherits:
WidgetView show all
Defined in:
lib/views/stack_view.rb

Instance Method Summary collapse

Methods inherited from WidgetView

#apply_prop, #apply_props, #main_handle

Methods inherited from AbstractView

accepted_styles, #accepted_styles, #attribute_at, #background_color=, #foreground_color=, #height, #height=, #main_handle, #populate_popup_menu_block=, #remove_view, #set_attribute, #show, #show_popup_menu, #state_colors_from, view_accepted_styles, #width, #width=

Constructor Details

#initialize(orientation) ⇒ StackView

Initializing



6
7
8
9
10
# File 'lib/views/stack_view.rb', line 6

def initialize(orientation)
    @orientation = orientation

    super()
end

Instance Method Details

#add_view(view, expand: true, fill: true, padding: 0) ⇒ Object

Adds a child_view.



22
23
24
# File 'lib/views/stack_view.rb', line 22

def add_view(view, expand: true, fill: true, padding: 0)
    main_handle.pack_start(view.main_handle, expand: expand, fill: fill, padding: padding)
end

#initialize_handlesObject



12
13
14
# File 'lib/views/stack_view.rb', line 12

def initialize_handles()
    @main_handle = Gtk::Box.new(@orientation, 0)
end

#subscribe_to_ui_eventsObject



16
17
# File 'lib/views/stack_view.rb', line 16

def subscribe_to_ui_events()
end