]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/gauge.mm
Fix install_name_tool calls in OS X "make install".
[wxWidgets.git] / src / osx / cocoa / gauge.mm
index d74822370256ad986e97654a5f4ecc7155c5c740..cf82bd434b3ca22c4ba83daeb21cd01245f49340 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     1998-01-01
-// RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 @end
 
+@interface NSView(PossibleSizeMethods)
+- (NSControlSize)controlSize;
+@end
+
+namespace
+{
+
 class wxOSXGaugeCocoaImpl : public wxWidgetCocoaImpl
 {
 public :
@@ -64,6 +70,27 @@ public :
             [(wxNSProgressIndicator*)m_osxView startAnimation:nil];
         }
     }
+
+    void GetLayoutInset(int &left , int &top , int &right, int &bottom) const
+    {
+        left = top = right = bottom = 0;
+        NSControlSize size = [(wxNSProgressIndicator*)m_osxView controlSize];
+
+        switch( size )
+        {
+            case NSRegularControlSize:
+                left = right = 2;
+                top = 0;
+                bottom = 4;
+                break;
+            case NSMiniControlSize:
+            case NSSmallControlSize:
+                left = right = 1;
+                top = 0;
+                bottom = 2;
+                break;
+        }
+    }
 protected:
     void SetDeterminateMode()
     {
@@ -75,7 +102,8 @@ protected:
         }
     }
 };
-
+    
+} // anonymous namespace
 
 wxWidgetImplType* wxWidgetImpl::CreateGauge( wxWindowMac* wxpeer,
                                     wxWindowMac* WXUNUSED(parent),