Class: MyRendererList::List

Inherits:
Gtk::TreeView
  • Object
show all
Includes:
Conf, GtkAttributes, ManqodCommon
Defined in:
lib/FormHolder/Form/InputHolder/List.rb

Constant Summary

Constants included from ManqodCommon

ManqodCommon::CRITICAL, ManqodCommon::DEBUG, ManqodCommon::ERROR, ManqodCommon::INFO, ManqodCommon::NORMAL, ManqodCommon::WARNING

Constants included from Eprint

Eprint::DOMAIN, Eprint::LEVEL

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Conf

#get_conf, #load_conf, #save_conf, #set_conf

Methods included from GtkAttributes

#default_attribute, #gtk_attribute, #gtk_attribute_of_object, #gtkobjectid, #gtkobjecttype, #set_gtk_attribute

Methods included from ManqodCommon

#add_where, #admin, #admin_cache, #admin_qrow, #admin_rows, #backtrace_to_debug, #cache, #changed_ids_of_base, #client, #client_fields, #client_image_of_id, #client_qrow, #client_query, #client_rows, #eeval, #escape_string, #getBinding, #guess_base, #guess_table, #image_of_id, #lzero, #manqod_db, #measure, #myexec, #nick, #nick_id, #number_format, #qrow, #query, #reconnect_manqod_db, #rows, #run_events, #send_message, #sendmail, #set_manqod_db_uri, #set_nick

Methods included from Eprint

#ecode, #edebug, #eerror, #einfo, #enormal, #eprint, #ewarn, #gtk_set_edebug, #set_edebug, #tell_exception

Constructor Details

#initialize(pc) ⇒ List

Returns a new instance of List.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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

Instance Attribute Details

#pcObject

Returns the value of attribute pc.



45
46
47
# File 'lib/FormHolder/Form/InputHolder/List.rb', line 45

def pc
  @pc
end

Instance Method Details

#itemObject



53
54
55
# File 'lib/FormHolder/Form/InputHolder/List.rb', line 53

def item
	pc.item
end

#parentMObject



61
62
63
# File 'lib/FormHolder/Form/InputHolder/List.rb', line 61

def parentM
	pc.parentM
end

#parentselectedObject



57
58
59
# File 'lib/FormHolder/Form/InputHolder/List.rb', line 57

def parentselected
	pc.parentselected
end

#set_selected(id_to_select) ⇒ Object



69
70
71
72
73
74
75
76
77
78
79
80
81
# 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

#textObject



65
66
67
# File 'lib/FormHolder/Form/InputHolder/List.rb', line 65

def text
	pc.text
end

#update(id_to_select) ⇒ Object



47
48
49
50
51
# 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