Sha256: c5ceed4020a53e90ec032206449d546d91768336613afae1afd87c44aea51640
Contents?: true
Size: 1.05 KB
Versions: 5
Compression:
Stored size: 1.05 KB
Contents
require 'glimmer/swt/widget_proxy' module Glimmer module SWT class TabFolderProxy < WidgetProxy attr_reader :tabs def initialize(parent, args) super(parent, args) @tabs = [] end def add_child(child) unless @children.include?(child) @children << child tabs_dom_element.append(child.tab_dom) child.render end if @children.size == 1 child.show end end def hide_all_tab_content @children.each(&:hide) end def tabs_path path + " > ##{tabs_id}" end def tabs_id id + '-tabs' end def tabs_dom_element Document.find(tabs_path) end def dom tab_folder_id = id tab_folder_id_style = css @dom ||= html { div(id: tab_folder_id, style: tab_folder_id_style, class: 'tab-folder') { div(id: tabs_id, class: 'tabs') } }.to_s end end end end
Version data entries
5 entries across 5 versions & 1 rubygems