class MyRendererColorButton
this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint(dpblnt@gmail.com)
Attributes
pc[RW]
Public Class Methods
new(pc)
click to toggle source
Calls superclass method
# File lib/FormHolder/Form/InputHolder/ColorButton.rb, line 8 def initialize(pc) @pc=pc super() set_use_alpha(false) signal_connect('clicked'){|me| edebug("#{item['default']} clicked","gtk_button","debug") run_events(item['id'],'form_item-Action') } end
Public Instance Methods
inspect()
click to toggle source
# File lib/FormHolder/Form/InputHolder/ColorButton.rb, line 47 def inspect "ColorButton(#{item['description']})" end
item()
click to toggle source
# File lib/FormHolder/Form/InputHolder/ColorButton.rb, line 44 def item pc.item end
parentM()
click to toggle source
# File lib/FormHolder/Form/InputHolder/ColorButton.rb, line 37 def parentM pc.parentM end
target()
click to toggle source
# File lib/FormHolder/Form/InputHolder/ColorButton.rb, line 41 def target nil end
text()
click to toggle source
# File lib/FormHolder/Form/InputHolder/ColorButton.rb, line 31 def text t="" color.to_a.each{|i| t="#{t}#{sprintf("%02x",i/255)}"} t end
to_s()
click to toggle source
# File lib/FormHolder/Form/InputHolder/ColorButton.rb, line 50 def to_s inspect end
update(new_value=item['default'])
click to toggle source
# File lib/FormHolder/Form/InputHolder/ColorButton.rb, line 19 def update(new_value=item['default']) item['default']=new_value run_events(item['id'],'form_item-BeforeUpdate') begin set_color(Gdk::Color.parse("##{item['default']}")) rescue => err ewarn("#{item['default'].inspect} not a valid color") end edebug(item['default'].to_s+" updated","gtk_button","info") run_events(item['id'],'form_item-AfterUpdate') end