Back to index

texmacs  1.0.7.15
Public Member Functions | Static Public Member Functions | Public Attributes
TMMenuHelper Class Reference

List of all members.

Public Member Functions

(id) - init
(void) - setMenu:
(void) - dealloc [implementation]

Static Public Member Functions

(TMMenuHelper *) + sharedHelper

Public Attributes

NSMenuItem * mi
NSMenu * menu

Detailed Description

Definition at line 620 of file aqua_widget.mm.


Member Function Documentation

- (void) dealloc [implementation]

Definition at line 653 of file aqua_widget.mm.

{ [mi release]; [menu release]; [super dealloc]; }
- (id) init

Definition at line 634 of file aqua_widget.mm.

       { 
  [super init]; mi = nil; menu = nil; 
  
  mi = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"Menu" action:NULL keyEquivalent:@""];
  NSMenu *sm = [[[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:@"Menu"] autorelease];
  [mi  setSubmenu:sm];
  //[[NSApp mainMenu] removeItem: [[NSApp mainMenu] itemWithTitle:@"Help"]]; //FIXME: Help menu causes problems (crash)
  
  [[NSApp mainMenu] insertItem: mi atIndex:1];   
  //   [sm setDelegate: self];
  
  return self; 
}
- (void) setMenu: (NSMenu *)  _mi

Definition at line 647 of file aqua_widget.mm.

               :(NSMenu *)_m  
{ 
  if (menu) [menu release];  menu = _m; [menu retain];
  [mi  setSubmenu:menu];
  [menu setTitle:@"Menu"];  
};

Definition at line 654 of file aqua_widget.mm.

{ 
  if (!the_menu_helper) 
    {
      the_menu_helper = [[TMMenuHelper alloc] init];
    }
  return the_menu_helper; 
}

Member Data Documentation

- (NSMenu*) menu

Definition at line 624 of file aqua_widget.mm.

- (NSMenuItem*) mi

Definition at line 623 of file aqua_widget.mm.


The documentation for this class was generated from the following file: