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_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
791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 |
# File 'lib/a-tkcommons.rb', line 791 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.
788 789 790 |
# File 'lib/a-tkcommons.rb', line 788 def frame @frame end |
#top ⇒ Object (readonly)
Returns the value of attribute top.
789 790 791 |
# File 'lib/a-tkcommons.rb', line 789 def top @top end |
Instance Method Details
#add_fixed_button(_label, _proc = nil, _image = nil, _side = 'right') ⇒ Object
823 824 825 |
# File 'lib/a-tkcommons.rb', line 823 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
827 828 829 |
# File 'lib/a-tkcommons.rb', line 827 def (_name='default',_image=nil, _side= 'right', _args=nil) (_name, _image, _side, _args, ) end |
#add_fixed_panel(_name = 'default', _side = 'right', _args = nil) ⇒ Object
831 832 833 |
# File 'lib/a-tkcommons.rb', line 831 def add_fixed_panel(_name='default',_side= 'right', _args=nil) __add_panel(_name, _side, _args, ) end |
#add_fixed_sep(_width = 0) ⇒ Object
835 836 837 |
# File 'lib/a-tkcommons.rb', line 835 def add_fixed_sep(_width=0) __add_sep(_width, ) end |
#create_frame ⇒ Object
819 820 821 |
# File 'lib/a-tkcommons.rb', line 819 def create_frame return TkFrame.new(self,Arcadia.style('panel')).place('x'=>0, 'y'=>@title_height,'height'=>-@title_height,'relheight'=>1, 'relwidth'=>1) end |
#head_buttons ⇒ Object
954 955 956 |
# File 'lib/a-tkcommons.rb', line 954 def @bmaxmin = ('[ ]',proc{resize}, W_MAX_GIF) end |
#menu_button(_name = 'default') ⇒ Object
950 951 952 |
# File 'lib/a-tkcommons.rb', line 950 def (_name='default') [_name] end |
#visible? ⇒ Boolean
958 959 960 961 962 963 964 |
# File 'lib/a-tkcommons.rb', line 958 def visible? ret = false begin ret = TkWinfo.mapped?(self) rescue Exception => e end end |