view dstep/appkit/NSForm.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.NSForm;

import dstep.appkit.NSFont;
import dstep.appkit.NSFormCell;
import dstep.appkit.NSMatrix;
import dstep.applicationservices.coregraphics.CGBase;
import dstep.foundation.NSGeometry;
import dstep.foundation.NSObjCRuntime;
import dstep.foundation.NSString;
import dstep.objc.bridge.Bridge;
import dstep.objc.objc;

class NSForm : NSMatrix
{
	mixin (ObjcWrap);

	NSInteger indexOfSelectedItem ()
	{
		return invokeObjcSelf!(NSInteger, "indexOfSelectedItem");
	}

	void setEntryWidth (CGFloat width)
	{
		return invokeObjcSelf!(void, "setEntryWidth:", CGFloat)(width);
	}

	void setInterlineSpacing (CGFloat spacing)
	{
		return invokeObjcSelf!(void, "setInterlineSpacing:", CGFloat)(spacing);
	}

	void setBordered (bool flag)
	{
		return invokeObjcSelf!(void, "setBordered:", bool)(flag);
	}

	void setBezeled (bool flag)
	{
		return invokeObjcSelf!(void, "setBezeled:", bool)(flag);
	}

	void setTitleAlignment (uint mode)
	{
		return invokeObjcSelf!(void, "setTitleAlignment:", uint)(mode);
	}

	void setTextAlignment (uint mode)
	{
		return invokeObjcSelf!(void, "setTextAlignment:", uint)(mode);
	}

	void setTitleFont (NSFont fontObj)
	{
		return invokeObjcSelf!(void, "setTitleFont:", NSFont)(fontObj);
	}

	void setTextFont (NSFont fontObj)
	{
		return invokeObjcSelf!(void, "setTextFont:", NSFont)(fontObj);
	}

	Object cellAtIndex (NSInteger index)
	{
		return invokeObjcSelf!(Object, "cellAtIndex:", NSInteger)(index);
	}

	void drawCellAtIndex (NSInteger index)
	{
		return invokeObjcSelf!(void, "drawCellAtIndex:", NSInteger)(index);
	}

	NSFormCell addEntry (NSString title)
	{
		return invokeObjcSelf!(NSFormCell, "addEntry:", NSString)(title);
	}

	NSFormCell insertEntry (NSString title, NSInteger index)
	{
		return invokeObjcSelf!(NSFormCell, "insertEntry:atIndex:", NSString, NSInteger)(title, index);
	}

	void removeEntryAtIndex (NSInteger index)
	{
		return invokeObjcSelf!(void, "removeEntryAtIndex:", NSInteger)(index);
	}

	NSInteger indexOfCellWithTag (NSInteger aTag)
	{
		return invokeObjcSelf!(NSInteger, "indexOfCellWithTag:", NSInteger)(aTag);
	}

	void selectTextAtIndex (NSInteger index)
	{
		return invokeObjcSelf!(void, "selectTextAtIndex:", NSInteger)(index);
	}

	void setFrameSize (NSSize newSize)
	{
		return invokeObjcSelf!(void, "setFrameSize:", NSSize)(newSize);
	}

	void setTitleBaseWritingDirection (int writingDirection)
	{
		return invokeObjcSelf!(void, "setTitleBaseWritingDirection:", int)(writingDirection);
	}

	void setTextBaseWritingDirection (int writingDirection)
	{
		return invokeObjcSelf!(void, "setTextBaseWritingDirection:", int)(writingDirection);
	}
}