Class: MyListFilter

Inherits:
Gtk::HBox
  • Object
show all
Defined in:
lib/ListHolder/ListPanel/ListFilter.rb

Overview

this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint([email protected])

Instance Method Summary collapse

Constructor Details

#initialize(list_holder) ⇒ MyListFilter

Returns a new instance of MyListFilter.



6
7
8
9
10
11
12
13
# File 'lib/ListHolder/ListPanel/ListFilter.rb', line 6

def initialize(list_holder)
	@list_holder=list_holder
	@columns=Hash.new
	super()
	set_no_show_all(true)
	set_border_width(0)
	set_resize_mode(Gtk::ResizeMode::PARENT)
end

Instance Method Details

#columnsObject



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

def columns
	@columns
end

#list_holderObject



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

def list_holder
	@list_holder
end

#set_visible(visible) ⇒ Object



31
32
33
34
35
36
37
38
39
40
# File 'lib/ListHolder/ListPanel/ListFilter.rb', line 31

def set_visible(visible)
	each{|child|
		if visible
			child.show_all
			else
			child.hide_all
		end
	}
	super
end

#update(notifier) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/ListHolder/ListPanel/ListFilter.rb', line 15

def update(notifier)
	self.each{|frenderer| frenderer.destroy}
	notifier.columns.each {|column| 
		@columns[column.data]=MyFRenderer.new(notifier,column)
		pack_start(Gtk::Alignment.new(0,0,1,1).set_padding(0,0,0,0).add(@columns[column.data]))
	}
	self
end