Back to index

Public Member Functions | Protected Attributes
TMTileView Class Reference

List of all members.

Public Member Functions

(id) - initWithObjects:cols:
(void) - click:
(void) - dealloc [implementation]

Protected Attributes

int cols

Detailed Description

Definition at line 244 of file

Member Function Documentation

- (void) click: (TMTileView*)  tile

Definition at line 290 of file

       // on mouse up, we want to dismiss the menu being tracked
       NSMenuItem* mi = [self enclosingMenuItem];
       //[[mi menu] performSelector:@selector(cancelTracking) withObject:nil afterDelay:0.0];
       [[mi menu] cancelTracking];
  TMMenuItem* item =  [(NSCell*)[self selectedCell]  representedObject];
//     [item performSelector:@selector(doit) withObject:nil afterDelay:0.0];
       [item doit];

Here is the call graph for this function:

- (void) dealloc [implementation]

Definition at line 254 of file

       [super dealloc];
- (id) initWithObjects: (NSArray*)  objs
cols: (int)  _cols 

Definition at line 258 of file

                      :(NSArray*)objs cols:(int)_cols
       self = [super init];
       if (self != nil) {
              int current_col;
              int current_row;
              cols = _cols;
              current_col = cols;
              current_row = -1;
              [self setCellSize:NSMakeSize(20,20)];
              [self renewRows:0 columns:cols];
    NSEnumerator *en = [objs objectEnumerator];
              NSMenuItem *mi;
              while ((mi = [en nextObject])) {
                     if (current_col == cols) {
                            current_col=0; current_row++;
                            [self addRow];
                     NSImageCell *cell = [[[NSImageCell alloc] initImageCell:[mi image]] autorelease];
       //            [cell setImage:[mi image]];
                     [cell setRepresentedObject:mi];
                     [self putCell:cell atRow:current_row column:current_col];
              [self setTarget:self];
              [self setAction:@selector(click:)];
              [self sizeToCells];
       return self;

Member Data Documentation

- (int) cols [protected]

Definition at line 246 of file

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