Back to index

texmacs  1.0.7.15
Public Member Functions
TMMenuItem Class Reference

List of all members.

Public Member Functions

(void) - setCommand: [implementation]
(void) - setWidget: [implementation]
(void) - dealloc [implementation]
(void) - doit [implementation]
(NSImage *) - image [implementation]

Detailed Description

Definition at line 108 of file aqua_menu.mm.


Member Function Documentation

- (void) dealloc [implementation]

Definition at line 125 of file aqua_menu.mm.

{ [self setCommand:NULL];  [self setWidget:NULL];  [super dealloc]; }

Here is the call graph for this function:

- (void) doit [implementation]

Definition at line 126 of file aqua_menu.mm.

{      if (cmd) cmd->apply(); }

Here is the caller graph for this function:

- (NSImage *) image [implementation]

Definition at line 129 of file aqua_menu.mm.

{
  NSImage *img = [super image];
  if ((!img)&&(wid))
  {
    SI width, height;
    wid->handle_get_size_hint (width,height);
    NSSize s = NSMakeSize(width/PIXEL,height/PIXEL);
    
    img = [[[NSImage alloc] initWithSize:s] autorelease];
    [img lockFocus];
    
    basic_renderer r = the_aqua_renderer();
    int x1 = 0;
    int y1 = s.height;
    int x2 = s.width;
    int y2 = 0;
    
    r -> begin([NSGraphicsContext currentContext]);
    
    r -> encode (x1,y1);
    r -> encode (x2,y2);
    r -> set_clipping (x1,y1,x2,y2);
    wid -> handle_repaint (x1,y1,x2,y2);
    r->end();
    [img unlockFocus];
    //[img setFlipped:YES];
    [super setImage:img];                 
    [self setWidget:NULL];
  }
  return img;
}

Here is the call graph for this function:

- (void) setCommand: (command_rep *)  _c [implementation]

Definition at line 109 of file aqua_menu.mm.

                  :(command_rep *)_c 
{  
       if (cmd) { DEC_COUNT_NULL(cmd); } cmd = _c; 
       if (cmd) {
              INC_COUNT_NULL(cmd);
         [self setAction:@selector(doit)];
         [self setTarget:self];
       }
}

Here is the caller graph for this function:

- (void) setWidget: (simple_widget_rep *)  _w [implementation]

Definition at line 118 of file aqua_menu.mm.

                 :(simple_widget_rep *)_w
{  
       if (wid) { DEC_COUNT_NULL(wid); } wid = _w; 
       if (wid) {
              INC_COUNT_NULL(wid);
       }
}

Here is the caller graph for this function:


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