Class: MyFRenderer
- Inherits:
-
Gtk::EventBox
- Object
- Gtk::EventBox
- MyFRenderer
- Includes:
- Conf
- Defined in:
- lib/ListHolder/ListPanel/ListFilter/FRenderer.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 Attribute Summary collapse
-
#defval ⇒ Object
Returns the value of attribute defval.
-
#header ⇒ Object
Returns the value of attribute header.
-
#list ⇒ Object
Returns the value of attribute list.
-
#renderer ⇒ Object
Returns the value of attribute renderer.
Instance Method Summary collapse
- #get_list_id ⇒ Object
-
#initialize(list, column) ⇒ MyFRenderer
constructor
A new instance of MyFRenderer.
- #set_height_request(h) ⇒ Object
- #set_width_request(new_width) ⇒ Object
- #update(newtext = "") ⇒ Object
- #width_request ⇒ Object
Methods included from Conf
#get_conf, #load_conf, #save_conf, #set_conf
Constructor Details
#initialize(list, column) ⇒ MyFRenderer
Returns a new instance of MyFRenderer.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 8 def initialize(list,column) @column=column @header=column.header @list=list @defval=defval super() case @header['type'] when 'gtk_text' then @renderer=MyFRendererText.new(self,@header) when 'gtk_toggle' then @renderer=MyFRendererToggle.new(self,@header) when 'gtk_const_combo' then @header['admin']=true @header['querySQL']="select * from scv where combo='"+@header['data']+"' order by cdisplay" @header['wantnew']=true @renderer=MyFRendererCombo.new(self,@header) when 'gtk_combo' then @header['wantnew']=true @renderer=MyFRendererCombo.new(self,@header) else @renderer=MyFRendererText.new(self,@header) end add(renderer) @last_width=width_request end |
Instance Attribute Details
#defval ⇒ Object
Returns the value of attribute defval.
34 35 36 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 34 def defval @defval end |
#header ⇒ Object
Returns the value of attribute header.
32 33 34 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 32 def header @header end |
#list ⇒ Object
Returns the value of attribute list.
33 34 35 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 33 def list @list end |
#renderer ⇒ Object
Returns the value of attribute renderer.
35 36 37 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 35 def renderer @renderer end |
Instance Method Details
#get_list_id ⇒ Object
51 52 53 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 51 def get_list_id list.get_id end |
#set_height_request(h) ⇒ Object
54 55 56 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 54 def set_height_request(h) renderer.set_height_request(h) end |
#set_width_request(new_width) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 41 def set_width_request(new_width) if width_request != new_width and @last_width != new_width @last_width=width_request renderer.set_width_request(new_width) end self end |
#update(newtext = "") ⇒ Object
38 39 40 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 38 def update(newtext="") renderer.update(newtext) if renderer end |
#width_request ⇒ Object
48 49 50 |
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer.rb', line 48 def width_request renderer.width_request end |