Package pycocoa :: Module menus :: Class MenuBar
[frames] | no frames]

Class MenuBar

  object --+            
           |            
bases._Type0 --+        
               |        
    bases._Type1 --+    
                   |    
        bases._Type2 --+
                       |
                      MenuBar

Python MenuBar Type, wrapping ObjC NSMenu.

Instance Methods
 
__init__(self, app=None)
New MenuBar.
 
__len__(self)
Return the number of menus in this menu bar.
 
append(self, *menus)
Add one or more sub-menus to this menu bar.
 
main(self, app=None)
Make this menu bar the app's main menu.
 
menus(self)
Yield each menu of this menu bar (Menu).

Inherited from bases._Type2: __str__

Inherited from bases._Type0: __repr__, type2strepr

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties
  height
Get this menu bar's height (float).

Inherited from bases._Type2: tag, title

Inherited from bases._Type1: NSdelegate, app

Inherited from bases._Type0: NS

Inherited from object: __class__

Method Details

__init__(self, app=None)
(Constructor)

 

New MenuBar.

Parameters:
  • app - The application (App or None).
Raises:
  • TypeError - If app not an App.
Overrides: object.__init__

See Also: Method MenuBar.main.

append(self, *menus)

 

Add one or more sub-menus to this menu bar.

Parameters:
  • menus - The menus to add (Menu).

main(self, app=None)

 

Make this menu bar the app's main menu.

Parameters:
  • app - The application (App or None).
Raises:
  • TypeError - If app not an App.
  • ValueError - If app missing.

Property Details

height

Get this menu bar's height (float).

Get Method:
height(self) - Get this menu bar's height (float).