diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-02 22:35:58 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-02 22:35:58 -0400 |
| commit | d018953d7ef1b276cc3229e04ba6fc75018c888a (patch) | |
| tree | 3f980a017ca498bf499ff9c5e6a53210606b12f9 /redo/containerctrls_darwin.m | |
| parent | 1f6bcde3d9ddcab921f2f4347148f6784ca36a14 (diff) | |
Split all the Control implementations into their own files and renamed the containerctrls implementation files to say tab instead as they only hold Tab. This is the first part of what should hopefully be the final restructuring.
Diffstat (limited to 'redo/containerctrls_darwin.m')
| -rw-r--r-- | redo/containerctrls_darwin.m | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/redo/containerctrls_darwin.m b/redo/containerctrls_darwin.m deleted file mode 100644 index c99e275..0000000 --- a/redo/containerctrls_darwin.m +++ /dev/null @@ -1,46 +0,0 @@ -// 25 july 2014 - -#import "objc_darwin.h" -#import "_cgo_export.h" -#import <Cocoa/Cocoa.h> - -#define toNSTabView(x) ((NSTabView *) (x)) - -@interface goTabView : NSTabView { -@public - void *gotab; -} -@end - -@implementation goTabView - -- (void)setFrame:(NSRect)r -{ - NSRect content; - - [super setFrame:r]; - content = [self contentRect]; - tabResized(self->gotab, (intptr_t) content.size.width, (intptr_t) content.size.height); -} - -@end - -id newTab(void *gotab) -{ - goTabView *t; - - t = [[goTabView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100)]; - setStandardControlFont((id) t); // safe; same selector provided by NSTabView - t->gotab = gotab; - return (id) t; -} - -id tabAppend(id t, char *name) -{ - NSTabViewItem *i; - - i = [[NSTabViewItem alloc] initWithIdentifier:nil]; - [i setLabel:[NSString stringWithUTF8String:name]]; - [toNSTabView(t) addTabViewItem:i]; - return (id) [i view]; -} |
