Mercurial > projects > dstep
diff dstep/appkit/NSProgressIndicator.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | |
children | b9de51448c6b |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dstep/appkit/NSProgressIndicator.d Sun Jan 03 22:06:11 2010 +0100 @@ -0,0 +1,175 @@ +/** + * Copyright: Copyright (c) 2009 Jacob Carlborg. + * Authors: Jacob Carlborg + * Version: Initial created: Sep 24, 2009 + * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) + */ +module dstep.appkit.NSProgressIndicator; + +import dstep.appkit.NSCell; +import dstep.appkit.NSView; +import dstep.foundation.NSDate; +import dstep.foundation.NSObjCRuntime; +import dstep.objc.bridge.Bridge; +import dstep.objc.objc; + +struct __NSProgressIndicatorThreadInfo; + +alias __NSProgressIndicatorThreadInfo _NSProgressIndicatorThreadInfo; +typedef NSUInteger NSProgressIndicatorThickness; +typedef NSUInteger NSProgressIndicatorStyle; + +enum +{ + NSProgressIndicatorPreferredThickness = 14, + NSProgressIndicatorPreferredSmallThickness = 10, + NSProgressIndicatorPreferredLargeThickness = 18, + NSProgressIndicatorPreferredAquaThickness = 12 +} + +enum +{ + NSProgressIndicatorBarStyle = 0, + NSProgressIndicatorSpinningStyle = 1 +} + +class NSProgressIndicator : NSView +{ + mixin (ObjcWrap); + + bool isIndeterminate () + { + return invokeObjcSelf!(bool, "isIndeterminate"); + } + + void setIndeterminate (bool flag) + { + return invokeObjcSelf!(void, "setIndeterminate:", bool)(flag); + } + + bool isBezeled () + { + return invokeObjcSelf!(bool, "isBezeled"); + } + + void setBezeled (bool flag) + { + return invokeObjcSelf!(void, "setBezeled:", bool)(flag); + } + + uint controlTint () + { + return invokeObjcSelf!(uint, "controlTint"); + } + + void setControlTint (uint tint) + { + return invokeObjcSelf!(void, "setControlTint:", uint)(tint); + } + + uint controlSize () + { + return invokeObjcSelf!(uint, "controlSize"); + } + + void setControlSize (uint size) + { + return invokeObjcSelf!(void, "setControlSize:", uint)(size); + } + + double doubleValue () + { + return invokeObjcSelf!(double, "doubleValue"); + } + + void setDoubleValue (double doubleValue) + { + return invokeObjcSelf!(void, "setDoubleValue:", double)(doubleValue); + } + + void incrementBy (double delta) + { + return invokeObjcSelf!(void, "incrementBy:", double)(delta); + } + + double minValue () + { + return invokeObjcSelf!(double, "minValue"); + } + + double maxValue () + { + return invokeObjcSelf!(double, "maxValue"); + } + + void setMinValue (double newMinimum) + { + return invokeObjcSelf!(void, "setMinValue:", double)(newMinimum); + } + + void setMaxValue (double newMaximum) + { + return invokeObjcSelf!(void, "setMaxValue:", double)(newMaximum); + } + + double animationDelay () + { + return invokeObjcSelf!(double, "animationDelay"); + } + + void setAnimationDelay (double delay) + { + return invokeObjcSelf!(void, "setAnimationDelay:", double)(delay); + } + + bool usesThreadedAnimation () + { + return invokeObjcSelf!(bool, "usesThreadedAnimation"); + } + + void setUsesThreadedAnimation (bool threadedAnimation) + { + return invokeObjcSelf!(void, "setUsesThreadedAnimation:", bool)(threadedAnimation); + } + + void startAnimation (Object sender) + { + return invokeObjcSelf!(void, "startAnimation:", Object)(sender); + } + + void stopAnimation (Object sender) + { + return invokeObjcSelf!(void, "stopAnimation:", Object)(sender); + } + + void animate (Object sender) + { + return invokeObjcSelf!(void, "animate:", Object)(sender); + } + + void setStyle (uint style) + { + return invokeObjcSelf!(void, "setStyle:", uint)(style); + } + + uint style () + { + return invokeObjcSelf!(uint, "style"); + } + + void sizeToFit () + { + return invokeObjcSelf!(void, "sizeToFit"); + } + + bool isDisplayedWhenStopped () + { + return invokeObjcSelf!(bool, "isDisplayedWhenStopped"); + } + + void setDisplayedWhenStopped (bool isDisplayed) + { + return invokeObjcSelf!(void, "setDisplayedWhenStopped:", bool)(isDisplayed); + } +} +