Class: TkMenuTitledFrame

Inherits:
TkTitledFrame show all
Defined in:
lib/a-tkcommons.rb

Direct Known Subclasses

TkTitledFrameAdapter

Instance Attribute Summary

Attributes inherited from TkTitledFrame

#frame, #parent, #top

Attributes inherited from TkBaseTitledFrame

#frame, #top

Instance Method Summary collapse

Methods inherited from TkTitledFrame

#__create_right_label, #create_right_label, #head_buttons, #initialize, #last_caption, #last_caption_image, #maximize, #maximized?, #resize, #restore_caption, #save_caption, #top_text, #top_text_bind_append, #top_text_bind_remove, #top_text_clear, #top_text_hide, #top_text_hint

Methods inherited from TkBaseTitledFrame

#add_fixed_button, #add_fixed_menu_button, #add_fixed_panel, #add_fixed_progress, #add_fixed_sep, #create_frame, #head_buttons, #initialize, #menu_button, #visible?

Constructor Details

This class inherits a constructor from TkTitledFrame

Instance Method Details

#__create_left_menu_button(_frame) ⇒ Object



1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
# File 'lib/a-tkcommons.rb', line 1358

def __create_left_menu_button(_frame)
  img=@img
  #@left_menu_button = TkMenuButton.new(_frame, Arcadia.style('titlebutton')){|mb|
  @left_menu_button = Arcadia.wf.titlemenubutton(_frame){|mb|
    menu Arcadia.wf.titlemenu(mb)
    #menu TkMenu.new(mb, Arcadia.style('titlemenu'))
    if img
      #indicatoron false
      image Arcadia.image_res(img)
    else
      #indicatoron true
    end
    #padx 0
    textvariable TkVariable.new('')
    pack('side'=> 'left','anchor'=> 'e')
  }

end

#create_left_titleObject



1349
1350
1351
1352
# File 'lib/a-tkcommons.rb', line 1349

def create_left_title
  @left_menu_button = __create_left_menu_button(@top)
  @left_menu_button.bind_append("Double-Button-1", proc{resize})
end

#shift_offObject



1382
1383
1384
1385
# File 'lib/a-tkcommons.rb', line 1382

def shift_off
  @left_menu_button.state='disable'
  #@left_menu_button.foreground(Arcadia.conf('titlelabel.disabledforeground'))
end

#shift_onObject



1377
1378
1379
1380
# File 'lib/a-tkcommons.rb', line 1377

def shift_on
  @left_menu_button.state='normal'
  #@left_menu_button.foreground(Arcadia.conf('titlelabel.foreground'))
end

#title(_text = nil) ⇒ Object



1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
# File 'lib/a-tkcommons.rb', line 1387

def title(_text=nil)
  if _text.nil?
    return @title
  else
    @title=_text
    if _text.strip.length == 0
      @left_menu_button.textvariable.value=''
    else
      @left_menu_button.textvariable.value=_text+'::'
    end
  end
end

#title_menuObject



1354
1355
1356
# File 'lib/a-tkcommons.rb', line 1354

def title_menu
  @left_menu_button.cget('menu') if @left_menu_button
end