The GDBaseView is a base NSView that contains helper methods for many view needs. More...
#import <GDBaseView.h>
Public Member Functions | |
| (void) | - setGDRefs |
| A hook you can use to set references to properties on a "gd" instance. | |
| (void) | - lazyInit |
| A hook you can override to do some lazy initialization. | |
| (void) | - lazyInitWithGD: |
| Lazy init this object with a GDDocument, or GDApplicationController. | |
| (void) | - showInView: |
| Show this view inside of another view. | |
| (void) | - showMaximizedInView: |
| Sets this views frame to match the other views frame, then shows this view in the other view. | |
| (void) | - showInView:withAdjustments: |
| A quick shortcut to show this view inside of another view, when you know that some minor adjustments need to be made. | |
Properties | |
| IBOutlet id | gd |
| A GDApplicationController or a GDDocument. | |
| IBOutlet id | externalNibController |
| A GDExternalNibController. | |
The GDBaseView is a base NSView that contains helper methods for many view needs.
| - (void) lazyInit |
A hook you can override to do some lazy initialization.
This is called last after any lazyInitWith(...) method is called.
| - (void) lazyInitWithGD: | (id) | _gd |
Lazy init this object with a GDDocument, or GDApplicationController.
This just sets the "gd" property.
| _gd | A GDDocument or GDApplicationController. |
| - (void) showInView: | (NSView *) | view |
Show this view inside of another view.
No frame adjustments are made.
| - (void) showInView: | (NSView *) | view | ||
| withAdjustments: | (NSRect) | _adjust | ||
A quick shortcut to show this view inside of another view, when you know that some minor adjustments need to be made.
This method looks like this:
- (void) showInView:(NSView *) view withAdjustments:(NSRect) _adjust { NSRect newFrame=[view frame]; newFrame.size.width+=_adjust.size.width; newFrame.size.width+=_adjust.size.height; newFrame.origin.x+=_adjust.origin.x; newFrame.origin.y+=_adjust.origin.y; [self setFrame:newFrame]; [view addSubview:self]; }
So you can use this to your advantage:
[myView showInView:otherView withAdjustments:NSMakeRect(10,-5,-10,10)];