Class: TkBaseTitledFrame
- Inherits:
-
TkFrame
- Object
- TkFrame
- TkBaseTitledFrame
- Defined in:
- lib/a-tkcommons.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#frame ⇒ Object
readonly
Returns the value of attribute frame.
-
#top ⇒ Object
readonly
Returns the value of attribute top.
Instance Method Summary collapse
- #add_fixed_button(_label, _proc = nil, _image = nil, _side = 'right') ⇒ Object
- #add_fixed_menu_button(_name = 'default', _image = nil, _side = 'right', _args = nil) ⇒ Object
- #add_fixed_panel(_name = 'default', _side = 'right', _args = nil) ⇒ Object
- #add_fixed_progress(_max = 100, _canc_proc = nil, _hint = nil) ⇒ Object
- #add_fixed_sep(_width = 0) ⇒ Object
- #create_frame ⇒ Object
- #head_buttons ⇒ Object
-
#initialize(parent = nil, *args) ⇒ TkBaseTitledFrame
constructor
A new instance of TkBaseTitledFrame.
- #menu_button(_name = 'default') ⇒ Object
- #visible? ⇒ Boolean
Constructor Details
#initialize(parent = nil, *args) ⇒ TkBaseTitledFrame
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 |
# File 'lib/a-tkcommons.rb', line 1105 def initialize(parent=nil, *args) super(parent, Arcadia.style('panel')) @parent = parent @title_height = 18 @top = TkFrame.new(self){ background Arcadia.conf('titlelabel.background') }.place('x'=>0, 'y'=>0,'height'=>@title_height, 'relwidth'=>1) #.pack('fill'=> 'x','ipady'=> @title_height, 'side'=>'top') @frame = create_frame @state_frame=TkFrame.new(@top){ #background '#303b50' background Arcadia.conf('titlelabel.background') }.pack('side'=> 'left','anchor'=> 'e') =TkFrame.new(@top){ #background '#303b50' background Arcadia.conf('titlelabel.background') }.pack('side'=> 'right','anchor'=> 'w', 'fill'=>'both', 'expand'=>'true') = Hash.new = Hash.new @panels = Hash.new @last_for_frame = Hash.new @last_for_state_frame = Hash.new self. end |
Instance Attribute Details
#frame ⇒ Object (readonly)
Returns the value of attribute frame.
1102 1103 1104 |
# File 'lib/a-tkcommons.rb', line 1102 def frame @frame end |
#top ⇒ Object (readonly)
Returns the value of attribute top.
1103 1104 1105 |
# File 'lib/a-tkcommons.rb', line 1103 def top @top end |
Instance Method Details
#add_fixed_button(_label, _proc = nil, _image = nil, _side = 'right') ⇒ Object
1138 1139 1140 |
# File 'lib/a-tkcommons.rb', line 1138 def (_label,_proc=nil,_image=nil, _side= 'right') (_label,_proc,_image, _side,) end |
#add_fixed_menu_button(_name = 'default', _image = nil, _side = 'right', _args = nil) ⇒ Object
1142 1143 1144 |
# File 'lib/a-tkcommons.rb', line 1142 def (_name='default',_image=nil, _side= 'right', _args=nil) (_name, _image, _side, _args, ) end |
#add_fixed_panel(_name = 'default', _side = 'right', _args = nil) ⇒ Object
1146 1147 1148 |
# File 'lib/a-tkcommons.rb', line 1146 def add_fixed_panel(_name='default',_side= 'right', _args=nil) __add_panel(_name, _side, _args, ) end |
#add_fixed_progress(_max = 100, _canc_proc = nil, _hint = nil) ⇒ Object
1154 1155 1156 |
# File 'lib/a-tkcommons.rb', line 1154 def add_fixed_progress(_max=100, _canc_proc=nil, _hint=nil) __add_progress(_max, _canc_proc, , _hint) end |
#add_fixed_sep(_width = 0) ⇒ Object
1150 1151 1152 |
# File 'lib/a-tkcommons.rb', line 1150 def add_fixed_sep(_width=0) __add_sep(_width, ) end |
#create_frame ⇒ Object
1133 1134 1135 1136 |
# File 'lib/a-tkcommons.rb', line 1133 def create_frame # return Tk::ScrollFrame.new(self).place('x'=>0, 'y'=>@title_height,'height'=>-@title_height,'relheight'=>1, 'relwidth'=>1) return TkFrame.new(self,Arcadia.style('panel')).place('x'=>0, 'y'=>@title_height,'height'=>-@title_height,'relheight'=>1, 'relwidth'=>1) end |
#head_buttons ⇒ Object
1358 1359 1360 |
# File 'lib/a-tkcommons.rb', line 1358 def @bmaxmin = ('[ ]',proc{resize}, W_MAX_GIF) end |
#menu_button(_name = 'default') ⇒ Object
1354 1355 1356 |
# File 'lib/a-tkcommons.rb', line 1354 def (_name='default') [_name] end |
#visible? ⇒ Boolean
1362 1363 1364 1365 1366 1367 1368 |
# File 'lib/a-tkcommons.rb', line 1362 def visible? ret = false begin ret = TkWinfo.mapped?(self) rescue Exception => e end end |