Class: TkFloatTitledFrame
- Inherits:
-
TkBaseTitledFrame
- Object
- TkFrame
- TkBaseTitledFrame
- TkFloatTitledFrame
- Includes:
- TkMovable, TkResizable
- Defined in:
- lib/a-tkcommons.rb
Direct Known Subclasses
FindFrame, Findview, GoToLine, KeyTest, RunnerManager, TkProgressframe
Constant Summary
Constants included from TkResizable
TkResizable::MIN_HEIGHT, TkResizable::MIN_WIDTH
Instance Attribute Summary
Attributes inherited from TkBaseTitledFrame
Instance Method Summary collapse
-
#head_buttons ⇒ Object
def show_modal # not implemented end.
- #hide ⇒ Object
-
#initialize(parent = nil, *args) ⇒ TkFloatTitledFrame
constructor
A new instance of TkFloatTitledFrame.
- #on_close=(_proc) ⇒ Object
- #show ⇒ Object
- #show_grabbed ⇒ Object
- #title(_text) ⇒ Object
Methods included from TkResizable
#resizing_do_move_obj, #resizing_do_press, #start_resizing, #stop_resizing
Methods included from TkMovable
#moving_do_move_obj, #moving_do_press, #start_moving, #stop_moving
Methods inherited from TkBaseTitledFrame
#add_fixed_button, #add_fixed_menu_button, #add_fixed_sep, #create_frame, #menu_button, #visible?
Constructor Details
#initialize(parent = nil, *args) ⇒ TkFloatTitledFrame
Returns a new instance of TkFloatTitledFrame.
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 |
# File 'lib/a-tkcommons.rb', line 1201 def initialize(parent=nil, *args) super(parent) frame.place('height'=>-32) borderwidth 2 relief 'groove' @right_label = TkLabel.new(@top, Arcadia.style('titlelabel')){ anchor 'w' }.pack('fill'=>'x', 'side'=>'top') #.place('x'=>0, 'y'=>0,'relheight'=>1, 'relwidth'=>1 ,'width'=>-20) @resizing_label=TkLabel.new(self, Arcadia.style('label')){ text '-' image TkPhotoImage.new('dat'=>EXPAND_LIGHT_GIF) }.pack('side'=> 'right','anchor'=> 's') start_moving(@right_label, self) start_moving(frame, self) start_resizing(@resizing_label, self) @grabbed = false # frame.bind_append('KeyPress'){|e| # p e.keysym # case e.keysym # when 'Escape' # p "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" # hide # end # } end |
Instance Method Details
#head_buttons ⇒ Object
def show_modal
# not implemented
end
1272 1273 |
# File 'lib/a-tkcommons.rb', line 1272 def end |
#hide ⇒ Object
1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 |
# File 'lib/a-tkcommons.rb', line 1238 def hide @manager = TkWinfo.manager(self) if @manager == 'place' @x_place = TkPlace.info(self)['x'] @y_place = TkPlace.info(self)['y'] @width_place = TkPlace.info(self)['width'] @height_place = TkPlace.info(self)['height'] self.unplace end if @grabbed self.grab("release") @grabbed = false end self end |
#on_close=(_proc) ⇒ Object
1234 1235 1236 |
# File 'lib/a-tkcommons.rb', line 1234 def on_close=(_proc) ('X', _proc, TAB_CLOSE_GIF) end |
#show ⇒ Object
1255 1256 1257 1258 1259 1260 |
# File 'lib/a-tkcommons.rb', line 1255 def show if @manager == 'place' self.place('x'=>@x_place, 'y'=>@y_place, 'width'=>@width_place, 'height'=>@height_place) end self.raise end |
#show_grabbed ⇒ Object
1262 1263 1264 1265 1266 |
# File 'lib/a-tkcommons.rb', line 1262 def show_grabbed show @grabbed = true self.grab("set") end |
#title(_text) ⇒ Object
1230 1231 1232 |
# File 'lib/a-tkcommons.rb', line 1230 def title(_text) @right_label.text(_text) end |