Class: AGBWidgetComboBox
- Inherits:
-
AGTkBase
- Object
- AGTkBase
- AGBWidgetComboBox
- Defined in:
- ext/ae-rad/lib/tkext/al-bwidget.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(_ag_parent = nil, _object = nil) ⇒ AGBWidgetComboBox
constructor
A new instance of AGBWidgetComboBox.
- #initobj ⇒ Object
- #new_object ⇒ Object
- #passedobject(_obj) ⇒ Object
- #properties ⇒ Object
Constructor Details
#initialize(_ag_parent = nil, _object = nil) ⇒ AGBWidgetComboBox
Returns a new instance of AGBWidgetComboBox.
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'ext/ae-rad/lib/tkext/al-bwidget.rb', line 28 def initialize(_ag_parent = nil, _object = nil) super(_ag_parent, _object) ppress = proc{@l_manager.deactivate;@obj.callback_break} prelease = proc{@l_manager.activate;@obj.callback_break} @obj.e.bind("ButtonPress-1", proc{|e| @l_manager.place_manager.do_press_obj(e.x, e.y) @obj.callback_break } ) @obj.e.bind_append("ButtonPress-1", ppress) @obj.e.bind("ButtonRelease-1", prelease) @obj.e.bind("B1-Motion", proc{|x, y| @l_manager.place_manager.do_mov_obj(x,y); @obj.callback_break},"%x %y") end |
Class Method Details
.b ⇒ Object
56 57 58 |
# File 'ext/ae-rad/lib/tkext/al-bwidget.rb', line 56 def @obj.b TkWinfo.children(self)[1] end |
.class_wrapped ⇒ Object
42 43 44 |
# File 'ext/ae-rad/lib/tkext/al-bwidget.rb', line 42 def AGBWidgetComboBox.class_wrapped Tk::BWidget::ComboBox end |
.e ⇒ Object
52 53 54 |
# File 'ext/ae-rad/lib/tkext/al-bwidget.rb', line 52 def @obj.e TkWinfo.children(self)[0] end |
Instance Method Details
#initobj ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'ext/ae-rad/lib/tkext/al-bwidget.rb', line 51 def initobj def @obj.e TkWinfo.children(self)[0] end def @obj.b TkWinfo.children(self)[1] end end |
#new_object ⇒ Object
46 47 48 49 |
# File 'ext/ae-rad/lib/tkext/al-bwidget.rb', line 46 def new_object super initobj end |
#passedobject(_obj) ⇒ Object
62 63 64 65 |
# File 'ext/ae-rad/lib/tkext/al-bwidget.rb', line 62 def passedobject(_obj) super initobj end |
#properties ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'ext/ae-rad/lib/tkext/al-bwidget.rb', line 67 def properties super() publish_mod('place','name'=>'width', 'get'=> proc{if TkWinfo.mapped?(@obj) TkWinfo.width(@obj.e)+ TkWinfo.width(@obj.b) else TkWinfo.reqwidth(@obj.e)+ TkWinfo.reqwidth(@obj.b) end } ) publish_mod('place','name'=>'height', 'get'=> proc{ if TkWinfo.mapped?(@obj) TkWinfo.height(@obj) else TkWinfo.reqheight(@obj.b) end } ) publish('property','name'=>'entry-background', 'get'=> proc{@obj.e.cget('background')}, 'set'=> proc{|background| @obj.e.configure('background'=>background)}, 'def'=> proc{|x| "TkWinfo.children(self)[0].configure('background'=>#{x})"}, 'type'=> TkType::TkagColor ) publish('property','name'=>'button-background', 'get'=> proc{@obj.b.cget('background')}, 'set'=> proc{|background| @obj.b.configure('background'=>background)}, 'def'=> proc{|x| "TkWinfo.children(self)[1].configure('background'=>#{x})"}, 'type'=> TkType::TkagColor ) publish('property','name'=>'values', 'get'=> proc{@obj.cget('values')}, 'set'=> proc{|v| @obj.configure('values'=>v)}, 'def'=> "" ) end |