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 Attribute Summary collapse
-
#frame ⇒ Object
readonly
Returns the value of attribute frame.
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.
1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 |
# File 'lib/a-core.rb', line 1601 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 @last_item_for_context = Hash.new end |
Instance Attribute Details
#frame ⇒ Object (readonly)
Returns the value of attribute frame.
1529 1530 1531 |
# File 'lib/a-core.rb', line 1529 def frame @frame end |
Instance Method Details
#new_item(_sender, _args = nil) ⇒ Object
1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 |
# File 'lib/a-core.rb', line 1613 def new_item(_sender, _args= nil) _context = _args['context'] _context_path = _args['context_path'] if @last_context && _context != @last_context && _context_path.nil? new_separator end @last_context = _context _args['frame']=@frame if _context_path && @last_item_for_context[_context_path] _args['last_item_for_context']=@last_item_for_context[_context_path] end super(_sender, _args) if _context_path && items[_args['name']] @last_item_for_context[_context_path] = items[_args['name']] end if _context && items[_args['name']] @last_item_for_context[_context] = items[_args['name']] end end |