class MyRendererSpin
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/Spin.rb, line 7 def initialize(pc) @pc=pc super(-65000,65000,1) set_has_frame(false) set_numeric(true) set_increments(1,10) set_digits(2) signal_connect('value_changed'){|me| edebug("#{self} changed to #{me.value}","form","debug") pc.changed pc.notify_observers(self) edebug("#{self} emiting 'changed' to observers","form","debug") run_events(item['id'],'form_item-Action') } end
Public Instance Methods
inspect()
click to toggle source
# File lib/FormHolder/Form/InputHolder/Spin.rb, line 44 def inspect "SpinButton(#{item["description"]})" end
item()
click to toggle source
# File lib/FormHolder/Form/InputHolder/Spin.rb, line 24 def item @pc.item end
parentM()
click to toggle source
# File lib/FormHolder/Form/InputHolder/Spin.rb, line 41 def parentM @pc.parentM end
parentselected()
click to toggle source
# File lib/FormHolder/Form/InputHolder/Spin.rb, line 37 def parentselected @pc.parentselected end
to_s()
click to toggle source
# File lib/FormHolder/Form/InputHolder/Spin.rb, line 47 def to_s;inspect;end
update(new_value=item['default'])
click to toggle source
# File lib/FormHolder/Form/InputHolder/Spin.rb, line 28 def update(new_value=item['default']) item['default']=new_value run_events(item['id'],'form_item-BeforeUpdate') pc.run_query set_value(item['default'].to_f) if item['default'] # set_sensitive(item['editable']=="true") run_events(item['id'],'form_item-AfterUpdate') end