Class: Sirens::TabsView

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

Instance Method Summary collapse

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_handlesObject

Initializing



6
7
8
# File 'lib/views/tabs_view.rb', line 6

def initialize_handles()
    @main_handle = Gtk::Notebook.new
end

#set_tab_label_at(index:, text:) ⇒ Object

Styles



15
16
17
18
19
# File 'lib/views/tabs_view.rb', line 15

def set_tab_label_at(index:, text:)
    page_handle = main_handle.children[index]

    main_handle.set_tab_label_text(page_handle, text)
end

#subscribe_to_ui_eventsObject



10
11
# File 'lib/views/tabs_view.rb', line 10

def subscribe_to_ui_events()
end

#tab_label_at(index:) ⇒ Object

Querying



23
24
25
# File 'lib/views/tabs_view.rb', line 23

def tab_label_at(index:)
    main_handle.get_tab_label_text(main_handle.children[index])
end