Mercurial > projects > dwt-mac
diff dwt/internal/cocoa/NSDictionaryController.d @ 0:380af2bdd8e5
Upload of whole dwt tree
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sat, 09 Aug 2008 17:00:02 +0200 |
parents | |
children | 8b48be5454ce |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwt/internal/cocoa/NSDictionaryController.d Sat Aug 09 17:00:02 2008 +0200 @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2007 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * + * Port to the D Programming language: + * Jacob Carlborg <jacob.carlborg@gmail.com> + *******************************************************************************/ +module dwt.internal.cocoa.NSDictionaryController; + +import dwt.internal.cocoa.NSArray; +import dwt.internal.cocoa.NSArrayController; +import dwt.internal.cocoa.NSDictionary; +import dwt.internal.cocoa.NSString; +import dwt.internal.cocoa.OS; +import objc = dwt.internal.objc.runtime; + +public class NSDictionaryController : NSArrayController +{ + + public this () + { + super(); + } + + public this (objc.id id) + { + super(id); + } + + public NSArray excludedKeys () + { + objc.id result = OS.objc_msgSend(this.id, OS.sel_excludedKeys); + return result !is null ? new NSArray(result) : null; + } + + public NSArray includedKeys () + { + objc.id result = OS.objc_msgSend(this.id, OS.sel_includedKeys); + return result !is null ? new NSArray(result) : null; + } + + public NSString initialKey () + { + objc.id result = OS.objc_msgSend(this.id, OS.sel_initialKey); + return result !is null ? new NSString(result) : null; + } + + public id initialValue () + { + objc.id result = OS.objc_msgSend(this.id, OS.sel_initialValue); + return result !is null ? new id(result) : null; + } + + public NSDictionary localizedKeyDictionary () + { + objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedKeyDictionary); + return result !is null ? new NSDictionary(result) : null; + } + + public NSString localizedKeyTable () + { + objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedKeyTable); + return result !is null ? new NSString(result) : null; + } + + public id newObject () + { + objc.id result = OS.objc_msgSend(this.id, OS.sel_newObject); + return result !is null ? new id(result) : null; + } + + public void setExcludedKeys (NSArray keys) + { + OS.objc_msgSend(this.id, OS.sel_setExcludedKeys_1, keys !is null ? keys.id : null); + } + + public void setIncludedKeys (NSArray keys) + { + OS.objc_msgSend(this.id, OS.sel_setIncludedKeys_1, keys !is null ? keys.id : null); + } + + public void setInitialKey (NSString key) + { + OS.objc_msgSend(this.id, OS.sel_setInitialKey_1, key !is null ? key.id : null); + } + + public void setInitialValue (id value) + { + OS.objc_msgSend(this.id, OS.sel_setInitialValue_1, value !is null ? value.id : null); + } + + public void setLocalizedKeyDictionary (NSDictionary dictionary) + { + OS.objc_msgSend(this.id, OS.sel_setLocalizedKeyDictionary_1, dictionary !is null ? dictionary.id : null); + } + + public void setLocalizedKeyTable (NSString stringsFileName) + { + OS.objc_msgSend(this.id, OS.sel_setLocalizedKeyTable_1, stringsFileName !is null ? stringsFileName.id : null); + } + +}