Class: ListPanel

Inherits:
Gtk::Viewport
  • Object
show all
Includes:
ManqodCommon
Defined in:
lib/ListHolder/ListPanel.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 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(list_holder) ⇒ ListPanel

Returns a new instance of ListPanel.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ListHolder/ListPanel.rb', line 9

def initialize(list_holder)
@list_holder=list_holder
super(list_holder.list_scroller.hadjustment,Gtk::Adjustment.new(0,0,0,0,0,0))
set_resize_mode(Gtk::RESIZE_PARENT)
set_width_request(1)
set_no_show_all(true)

add(@vbox=Gtk::VBox.new(false))
vbox.pack_start(@list_sum=ListSum.new(list_holder),false,false,0)
vbox.pack_end(@list_filter=MyListFilter.new(list_holder),false,false,0)
	
signal_connect('destroy'){|me|
	@list_sum.destroy if @list_sum
	@list_filter.destroy if @list_filter
}
end

Instance Attribute Details

#list_filterObject

Returns the value of attribute list_filter.



26
27
28
# File 'lib/ListHolder/ListPanel.rb', line 26

def list_filter
  @list_filter
end

#list_holderObject

Returns the value of attribute list_holder.



25
26
27
# File 'lib/ListHolder/ListPanel.rb', line 25

def list_holder
  @list_holder
end

#list_sumObject

Returns the value of attribute list_sum.



27
28
29
# File 'lib/ListHolder/ListPanel.rb', line 27

def list_sum
  @list_sum
end

#vboxObject

Returns the value of attribute vbox.



28
29
30
# File 'lib/ListHolder/ListPanel.rb', line 28

def vbox
  @vbox
end

#visibilityObject

Returns the value of attribute visibility.



29
30
31
# File 'lib/ListHolder/ListPanel.rb', line 29

def visibility
  @visibility
end

Instance Method Details

#inspectObject



53
54
55
# File 'lib/ListHolder/ListPanel.rb', line 53

def inspect
	"ListPanel of #{@list_holder}"
end

#set_visibilityObject



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/ListHolder/ListPanel.rb', line 39

def set_visibility
	if visibility!=(list_holder.sum_button.active? || list_holder.advanced_filter.active?)
		@visibility=list_holder.sum_button.active? || list_holder.advanced_filter.active?
		set_visible(visibility)
		vbox.set_visible(visibility)
		list_holder.placeholder_button.set_visible(visibility)
#			set_visible(list_holder.advanced_filter.active?)
#			vbox.set_visible(list_holder.advanced_filter.active?)
		edebug("#{self} visibility set to #{visibility}","list","info")
	end
	list_filter.set_visible(list_holder.advanced_filter.active?)
	list_sum.set_visible(list_holder.sum_button.active?)
end

#to_sObject



56
57
58
# File 'lib/ListHolder/ListPanel.rb', line 56

def to_s
	inspect
end

#update(notifier) ⇒ Object



32
33
34
35
36
37
# File 'lib/ListHolder/ListPanel.rb', line 32

def update(notifier)
list_filter.update(notifier)
list_sum.update(notifier)
set_visibility
self
end