Class: MyRendererList::ListButton

Inherits:
Gtk::Button
  • Object
show all
Defined in:
lib/FormHolder/Form/InputHolder/List.rb

Instance Method Summary collapse

Constructor Details

#initializeListButton

Returns a new instance of ListButton.



10
11
12
13
14
15
# File 'lib/FormHolder/Form/InputHolder/List.rb', line 10

def initialize
	super()
	set_label("")
	set_image(Gtk::Image.new(Gtk::Stock::INDEX,Gtk::IconSize::MENU))
	set_relief(Gtk::ReliefStyle::NONE)
end

Instance Method Details

#update(notifier) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/FormHolder/Form/InputHolder/List.rb', line 17

def update(notifier)
	set_image(Gtk::Image.new(
		case notifier.parentM.runmode
			when "info" then Gtk::Stock::INFO
			when "wysiwygf" then Gtk::Stock::PROPERTIES
			else if notifier.text=="-1" or notifier.text=="" then Gtk::Stock::ADD else Gtk::Stock::EDIT end
		end ,Gtk::IconSize::MENU))
end