class MyRendererList::List

Attributes

pc[RW]

Public Class Methods

new(pc) click to toggle source
Calls superclass method
# File lib/FormHolder/Form/InputHolder/List.rb, line 31
def initialize(pc)
        @pc=pc
        super()
        set_enable_grid_lines(case get_conf(0,0,"form-grid")
                when "both" then Gtk::TreeView::GridLines::BOTH
                when "vertical" then Gtk::TreeView::GridLines::VERTICAL
                when "horizontal" then Gtk::TreeView::GridLines::HORIZONTAL
                        else Gtk::TreeView::GridLines::NONE
                end
        ) if Gtk.check_version?(2,10,9)
        set_enable_tree_lines(true)
        set_rules_hint(true)
        set_enable_search(false)
end

Public Instance Methods

item() click to toggle source
# File lib/FormHolder/Form/InputHolder/List.rb, line 53
def item
        pc.item
end
parentM() click to toggle source
# File lib/FormHolder/Form/InputHolder/List.rb, line 61
def parentM
        pc.parentM
end
parentselected() click to toggle source
# File lib/FormHolder/Form/InputHolder/List.rb, line 57
def parentselected
        pc.parentselected
end
set_selected(id_to_select) click to toggle source
# File lib/FormHolder/Form/InputHolder/List.rb, line 69
def set_selected(id_to_select)
        id_iter=nil
        model.each{|model,path,iter|
                if iter[0]==id_to_select.to_s
                        id_iter=iter
                        expand_to_path(id_iter.path)
                        selection.select_iter(id_iter)
                        scroll_to_cell(path,nil,false,0,0)
                        break
                end
        }
        !id_iter.nil?
end
text() click to toggle source
# File lib/FormHolder/Form/InputHolder/List.rb, line 65
def text
        pc.text
end
update(id_to_select) click to toggle source
# File lib/FormHolder/Form/InputHolder/List.rb, line 47
def update(id_to_select)
        model.update
        set_headers_visible(model.header_descriptions?)
        set_selected(id_to_select)
end