X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4850cc8b2e1037cd394806db4ddcf73868588a4c..55410bb4f67febe1ca20654f078ea4fb9a6223ae:/src/osx/cocoa/gauge.mm?ds=inline diff --git a/src/osx/cocoa/gauge.mm b/src/osx/cocoa/gauge.mm index 77189ce3d5..895a70cae8 100644 --- a/src/osx/cocoa/gauge.mm +++ b/src/osx/cocoa/gauge.mm @@ -19,37 +19,20 @@ @interface wxNSProgressIndicator : NSProgressIndicator { - wxWidgetCocoaImpl* impl; } -- (void)setImplementation: (wxWidgetCocoaImpl *) theImplementation; -- (wxWidgetImpl*) implementation; -- (BOOL) isFlipped; - @end @implementation wxNSProgressIndicator -- (id)initWithFrame:(NSRect)frame -{ - [super initWithFrame:frame]; - impl = NULL; - return self; -} - -- (void)setImplementation: (wxWidgetCocoaImpl *) theImplementation -{ - impl = theImplementation; -} - -- (wxWidgetCocoaImpl*) implementation -{ - return impl; -} - -- (BOOL) isFlipped ++ (void)initialize { - return YES; + static BOOL initialized = NO; + if (!initialized) + { + initialized = YES; + wxOSXCocoaClassAddWXMethods( self ); + } } @end @@ -113,7 +96,6 @@ wxWidgetImplType* wxWidgetImpl::CreateGauge( wxWindowMac* wxpeer, [v setIndeterminate:FALSE]; [v setDoubleValue: (double) value]; wxWidgetCocoaImpl* c = new wxOSXGaugeCocoaImpl( wxpeer, v ); - [v setImplementation:c]; return c; }