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



1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
# File 'lib/a-tkcommons.rb', line 1634

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



1625
1626
1627
1628
# File 'lib/a-tkcommons.rb', line 1625

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



1658
1659
1660
1661
# File 'lib/a-tkcommons.rb', line 1658

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

#shift_onObject



1653
1654
1655
1656
# File 'lib/a-tkcommons.rb', line 1653

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

#title(_text = nil) ⇒ Object



1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
# File 'lib/a-tkcommons.rb', line 1663

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



1630
1631
1632
# File 'lib/a-tkcommons.rb', line 1630

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