// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#include "wx/setup.h"
+#include "wx/wxprec.h"
#if wxUSE_GAUGE
-#include "wx/app.h"
-#include "wx/gauge.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/gauge.h"
+#endif //WX_PRECOMP
#import <AppKit/NSProgressIndicator.h>
return false;
SetNSView([[NSProgressIndicator alloc] initWithFrame: MakeDefaultNSRect(size)]);
[m_cocoaNSView release];
+
+ [(NSProgressIndicator*)m_cocoaNSView setMaxValue:range];
+ [(NSProgressIndicator*)m_cocoaNSView setIndeterminate:NO];
+
if(m_parent)
m_parent->CocoaAddChild(this);
SetInitialFrameRect(pos,size);
{
}
+int wxGauge::GetValue() const
+{
+ return (int)[(NSProgressIndicator*)m_cocoaNSView doubleValue];
+}
+
+void wxGauge::SetValue(int value)
+{
+ [(NSProgressIndicator*)m_cocoaNSView setDoubleValue:value];
+}
+
+int wxGauge::GetRange() const
+{
+ return (int)[(NSProgressIndicator*)m_cocoaNSView maxValue];
+}
+
+void wxGauge::SetRange(int maxValue)
+{
+ [(NSProgressIndicator*)m_cocoaNSView setMinValue:0.0];
+ [(NSProgressIndicator*)m_cocoaNSView setMaxValue:maxValue];
+}
+
#endif // wxUSE_GAUGE