Class: MyRendererHScale
- Inherits:
-
Gtk::HScale
- Object
- Gtk::HScale
- MyRendererHScale
- Includes:
- ManqodCommon
- Defined in:
- lib/FormHolder/Form/InputHolder/HScale.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])
Constant Summary
Constants included from ManqodCommon
ManqodCommon::CRITICAL, ManqodCommon::DEBUG, ManqodCommon::ERROR, ManqodCommon::INFO, ManqodCommon::NORMAL, ManqodCommon::WARNING
Constants included from Eprint
Instance Attribute Summary collapse
-
#pc ⇒ Object
Returns the value of attribute pc.
Instance Method Summary collapse
-
#initialize(pc) ⇒ MyRendererHScale
constructor
A new instance of MyRendererHScale.
- #item ⇒ Object
- #parentM ⇒ Object
- #parentselected ⇒ Object
- #text ⇒ Object
- #update(new_value = item['default']) ⇒ Object
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(pc) ⇒ MyRendererHScale
Returns a new instance of MyRendererHScale.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/FormHolder/Form/InputHolder/HScale.rb', line 7 def initialize(pc) @pc=pc super(0,100,1) signal_connect('value_changed'){|me| edebug(inspect+" '#{item['data']}' changed to item #{me.value}","form","debug") pc.changed pc.notify_observers(self) edebug("'#{item['data']}' emiting 'changed' to observers","form","debug") run_events(item['id'],'form_item-Action') } end |
Instance Attribute Details
#pc ⇒ Object
Returns the value of attribute pc.
18 19 20 |
# File 'lib/FormHolder/Form/InputHolder/HScale.rb', line 18 def pc @pc end |
Instance Method Details
#item ⇒ Object
28 29 30 |
# File 'lib/FormHolder/Form/InputHolder/HScale.rb', line 28 def item pc.item end |
#parentM ⇒ Object
40 41 42 |
# File 'lib/FormHolder/Form/InputHolder/HScale.rb', line 40 def parentM pc.parentM end |
#parentselected ⇒ Object
36 37 38 |
# File 'lib/FormHolder/Form/InputHolder/HScale.rb', line 36 def parentselected pc.parentselected end |
#text ⇒ Object
32 33 34 |
# File 'lib/FormHolder/Form/InputHolder/HScale.rb', line 32 def text value.to_s end |
#update(new_value = item['default']) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/FormHolder/Form/InputHolder/HScale.rb', line 20 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'] run_events(item['id'],'form_item-AfterUpdate') end |