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

import dstep.appkit.NSActionCell;
import dstep.appkit.NSAnimation;
import dstep.appkit.NSColor;
import dstep.appkit.NSEvent;
import dstep.appkit.NSMenu;
import dstep.appkit.NSView;
import dstep.foundation.NSArray;
import dstep.appkit.NSImage;
import dstep.appkit.NSOpenPanel;
import dstep.appkit.NSPathComponentCell;
import dstep.appkit.NSPopUpButtonCell;
import dstep.foundation.NSAttributedString;
import dstep.foundation.NSGeometry;
import dstep.foundation.NSObjCRuntime;
import dstep.foundation.NSObject;
import dstep.foundation.NSString;
import dstep.foundation.NSURL;
import dstep.objc.bridge.Bridge;
import dstep.objc.objc;

typedef NSInteger NSPathStyle;

enum
{
	NSPathStyleStandard,
	NSPathStyleNavigationBar,
	NSPathStylePopUp
}

class NSPathCell : NSActionCell
{
	mixin (ObjcWrap);

	int pathStyle ()
	{
		return invokeObjcSelf!(int, "pathStyle");
	}

	void setPathStyle (int style)
	{
		return invokeObjcSelf!(void, "setPathStyle:", int)(style);
	}

	NSURL URL ()
	{
		return invokeObjcSelf!(NSURL, "URL");
	}

	void setURL (NSURL url)
	{
		return invokeObjcSelf!(void, "setURL:", NSURL)(url);
	}

	void setObjectValue (INSCopying obj)
	{
		return invokeObjcSelf!(void, "setObjectValue:", INSCopying)(obj);
	}

	NSArray allowedTypes ()
	{
		return invokeObjcSelf!(NSArray, "allowedTypes");
	}

	void setAllowedTypes (NSArray allowedTypes)
	{
		return invokeObjcSelf!(void, "setAllowedTypes:", NSArray)(allowedTypes);
	}

	Object delegate_ ()
	{
		return invokeObjcSelf!(Object, "delegate");
	}

	void setDelegate (Object value)
	{
		return invokeObjcSelf!(void, "setDelegate:", Object)(value);
	}

	static Class pathComponentCellClass ()
	{
		return invokeObjcSelfClass!(Class, "pathComponentCellClass");
	}

	NSArray pathComponentCells ()
	{
		return invokeObjcSelf!(NSArray, "pathComponentCells");
	}

	void setPathComponentCells (NSArray cells)
	{
		return invokeObjcSelf!(void, "setPathComponentCells:", NSArray)(cells);
	}

	NSRect rectOfPathComponentCell (NSPathComponentCell cell, NSRect frame, NSView view)
	{
		return invokeObjcSelf!(NSRect, "rectOfPathComponentCell:withFrame:inView:", NSPathComponentCell, NSRect, NSView)(cell, frame, view);
	}

	NSPathComponentCell pathComponentCellAtPoint (NSPoint point, NSRect frame, NSView view)
	{
		return invokeObjcSelf!(NSPathComponentCell, "pathComponentCellAtPoint:withFrame:inView:", NSPoint, NSRect, NSView)(point, frame, view);
	}

	NSPathComponentCell clickedPathComponentCell ()
	{
		return invokeObjcSelf!(NSPathComponentCell, "clickedPathComponentCell");
	}

	void mouseEntered (NSEvent event, NSRect frame, NSView view)
	{
		return invokeObjcSelf!(void, "mouseEntered:withFrame:inView:", NSEvent, NSRect, NSView)(event, frame, view);
	}

	void mouseExited (NSEvent event, NSRect frame, NSView view)
	{
		return invokeObjcSelf!(void, "mouseExited:withFrame:inView:", NSEvent, NSRect, NSView)(event, frame, view);
	}

	SEL doubleAction ()
	{
		return invokeObjcSelf!(SEL, "doubleAction");
	}

	void setDoubleAction (SEL action)
	{
		return invokeObjcSelf!(void, "setDoubleAction:", SEL)(action);
	}

	void setBackgroundColor (NSColor color)
	{
		return invokeObjcSelf!(void, "setBackgroundColor:", NSColor)(color);
	}

	NSColor backgroundColor ()
	{
		return invokeObjcSelf!(NSColor, "backgroundColor");
	}

	void setPlaceholderString (NSString string)
	{
		return invokeObjcSelf!(void, "setPlaceholderString:", NSString)(string);
	}

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

	void setPlaceholderAttributedString (NSAttributedString string)
	{
		return invokeObjcSelf!(void, "setPlaceholderAttributedString:", NSAttributedString)(string);
	}

	NSAttributedString placeholderAttributedString ()
	{
		return invokeObjcSelf!(NSAttributedString, "placeholderAttributedString");
	}

	void setControlSize (uint size)
	{
		return invokeObjcSelf!(void, "setControlSize:", uint)(size);
	}
}

interface INSPathCellDelegate : INSObject
{
	void pathCell (NSPathCell pathCell, NSOpenPanel openPanel);
	void pathCell (NSPathCell pathCell, NSMenu menu);
}