view dstep/appkit/NSNibConnector.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 source

/**
 * 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.NSNibConnector;

import dstep.foundation.NSCoder;
import dstep.foundation.NSObject;
import dstep.foundation.NSString;
import dstep.objc.bridge.Bridge;
import dstep.objc.objc;

class NSNibConnector : NSObject, INSCoding
{
	mixin (ObjcWrap);
	
	this (NSCoder aDecoder)
	{
		super(typeof(this).alloc.initWithCoder(aDecoder).objcObject);
	}
	
	void encodeWithCoder (NSCoder aCoder)
	{
		return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder);
	}
	
	typeof(this) initWithCoder (NSCoder aDecoder)
	{
		return invokeObjcSelf!(typeof(this), "initWithCoder:", NSCoder)(aDecoder);
	}
	
	Object source ()
	{
		return invokeObjcSelf!(Object, "source");
	}

	void setSource (Object source)
	{
		return invokeObjcSelf!(void, "setSource:", Object)(source);
	}

	Object destination ()
	{
		return invokeObjcSelf!(Object, "destination");
	}

	void setDestination (Object destination)
	{
		return invokeObjcSelf!(void, "setDestination:", Object)(destination);
	}

	NSString label ()
	{
		return invokeObjcSelf!(NSString, "label");
	}

	void setLabel (NSString label)
	{
		return invokeObjcSelf!(void, "setLabel:", NSString)(label);
	}

	void replaceObject (Object oldObject, Object newObject)
	{
		return invokeObjcSelf!(void, "replaceObject:withObject:", Object, Object)(oldObject, newObject);
	}

	void establishConnection ()
	{
		return invokeObjcSelf!(void, "establishConnection");
	}

}