Class: ArcadiaMainToolbar
- Inherits:
-
ArcadiaUserControl
- Object
- ArcadiaUserControl
- ArcadiaMainToolbar
- Defined in:
- lib/a-core.rb
Defined Under Namespace
Classes: UserItem
Constant Summary collapse
- SUF =
'user_toolbar'
Instance Method Summary collapse
-
#initialize(_arcadia, _frame) ⇒ ArcadiaMainToolbar
constructor
A new instance of ArcadiaMainToolbar.
- #new_item(_sender, _args = nil) ⇒ Object
- #new_separator ⇒ Object
Methods inherited from ArcadiaUserControl
Constructor Details
#initialize(_arcadia, _frame) ⇒ ArcadiaMainToolbar
Returns a new instance of ArcadiaMainToolbar.
570 571 572 573 574 575 576 577 578 579 |
# File 'lib/a-core.rb', line 570 def initialize(_arcadia, _frame) @arcadia = _arcadia @frame = _frame @frame.borderwidth(Arcadia.conf('panel.borderwidth')) #@frame.highlightbackground(Arcadia.conf('panel.highlightbackground')) @frame.relief(Arcadia.conf('panel.relief')) @context_frames = Hash.new @last_context = nil end |
Instance Method Details
#new_item(_sender, _args = nil) ⇒ Object
581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/a-core.rb', line 581 def new_item(_sender, _args= nil) _context = _args['context'] # if _context # if @context_frames[_context] # else # @context_frames[_context] = TkLabelFrame.new(@frame){ # text "" # relief 'groove' # pack('side' =>'left', :padx=>0, :pady=>0) # } # end # _args['frame']=@context_frames[_context] # else # _args['frame']=@frame # end if @last_context && _context != @last_context new_separator end @last_context = _context _args['frame']=@frame super(_sender, _args) end |