]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/gauge.mm
implement support for per-state bitmaps in wxMSW wxButton
[wxWidgets.git] / src / osx / cocoa / gauge.mm
index 2620e530357f786a36836b41e82364687c11860a..ad4ace7a479df9daa71f17889fc60c31c8a29299 100644 (file)
 
 @interface wxNSProgressIndicator : NSProgressIndicator
 {
-    WXCOCOAIMPL_COMMON_MEMBERS
 }
 
-WXCOCOAIMPL_COMMON_INTERFACE
-
 @end
 
 @implementation wxNSProgressIndicator
 
-- (id)initWithFrame:(NSRect)frame
++ (void)initialize
 {
-    [super initWithFrame:frame];
-    impl = NULL;
-    return self;
+    static BOOL initialized = NO;
+    if (!initialized) 
+    {
+        initialized = YES;
+        wxOSXCocoaClassAddWXMethods( self );
+    }
 }
 
-WXCOCOAIMPL_COMMON_IMPLEMENTATION
-
 @end
 
 class wxOSXGaugeCocoaImpl : public wxWidgetCocoaImpl
@@ -80,15 +78,15 @@ protected:
 
 
 wxWidgetImplType* wxWidgetImpl::CreateGauge( wxWindowMac* wxpeer, 
-                                    wxWindowMac* parent
-                                    wxWindowID id
+                                    wxWindowMac* WXUNUSED(parent)
+                                    wxWindowID WXUNUSED(id)
                                     wxInt32 value,
                                     wxInt32 minimum,
                                     wxInt32 maximum,
                                     const wxPoint& pos, 
                                     const wxSize& size,
-                                    long style
-                                    long extraStyle)
+                                    long WXUNUSED(style)
+                                    long WXUNUSED(extraStyle))
 {
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSProgressIndicator* v = [[wxNSProgressIndicator alloc] initWithFrame:r];
@@ -98,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;
 }