public virtual void InsertObject(id anObject, uint index) { if (anObject == null) throw new ArgumentNullException(); _list.Insert((int)index, anObject); }
public virtual bool ReplaceObject(id oldObj, id newObj) { return false; }
public override id InitWithCoder(NSCoder aDecoder) { //base.InitWithCoder(aDecoder); if (aDecoder.AllowsKeyedCoding) { if (aDecoder.ContainsValueForKey(@"NSDestination")) { _dst = aDecoder.DecodeObjectForKey(@"NSDestination"); } if (aDecoder.ContainsValueForKey(@"NSSource")) { _src = aDecoder.DecodeObjectForKey(@"NSSource"); } if (aDecoder.ContainsValueForKey(@"NSLabel")) { _tag = (NSString)aDecoder.DecodeObjectForKey(@"NSLabel"); } } else { } return this; }
public override id InitWithCoder(NSCoder aDecoder) { base.InitWithCoder(aDecoder); if (aDecoder.AllowsKeyedCoding) { if (aDecoder.ContainsValueForKey("NSViewClass")) { _viewClass = (id)aDecoder.DecodeObjectForKey("NSViewClass"); } if (aDecoder.ContainsValueForKey("NSWindowClass")) { _windowClass = (NSString)aDecoder.DecodeObjectForKey("NSWindowClass"); } if (aDecoder.ContainsValueForKey("NSWindowStyleMask")) { _windowStyle = (uint)aDecoder.DecodeIntForKey("NSWindowStyleMask"); } if (aDecoder.ContainsValueForKey("NSWindowBacking")) { _backingStoreType = (NSBackingStoreType)aDecoder.DecodeIntForKey("NSWindowBacking"); } if (aDecoder.ContainsValueForKey("NSWindowView")) { _view = (id)aDecoder.DecodeObjectForKey("NSWindowView"); } if (aDecoder.ContainsValueForKey("NSWTFlags")) { uint flags = (uint)aDecoder.DecodeIntForKey("NSWTFlags"); _flags = PrimitiveConversion.FromLong<GSWindowTemplateFlags>(flags); } if (aDecoder.ContainsValueForKey("NSMinSize")) { _minSize = aDecoder.DecodeSizeForKey("NSMinSize"); } if (aDecoder.ContainsValueForKey("NSMaxSize")) { _maxSize = aDecoder.DecodeSizeForKey("NSMaxSize"); } else { _maxSize = new NSSize((float)10e+4, (float)10e+4); } if (aDecoder.ContainsValueForKey("NSWindowRect")) { _windowRect = aDecoder.DecodeRectForKey("NSWindowRect"); } if (aDecoder.ContainsValueForKey("NSFrameAutosaveName")) { _autosaveName = (NSString)aDecoder.DecodeObjectForKey("NSFrameAutosaveName"); } if (aDecoder.ContainsValueForKey("NSWindowTitle")) { _title = (NSString)aDecoder.DecodeObjectForKey("NSWindowTitle"); _windowStyle |= (uint)NSWindowStyleMasks.NSTitledWindowMask; } //_baseWindowClass = [NSWindow class]; } else { //[NSException raise: NSInvalidArgumentException // format: @"Can't decode %@ with %@.",NSStringFromClass([self class]), // NSStringFromClass([coder class])]; } //if (aDecoder.AllowsKeyedCoding) //{ // StyleMask = (NSWindowStyleMasks)aDecoder.DecodeIntForKey("NSWindowStyleMask"); // Backing = aDecoder.DecodeIntForKey("NSWindowBacking"); // WindowRect = aDecoder.DecodeRectForKey("NSWindowRect"); // NSWTFlags = (uint)aDecoder.DecodeIntForKey("NSWTFlags"); // if (aDecoder.ContainsValueForKey("NSWindowTitle")) // { // Title = (NSString)aDecoder.DecodeObjectForKey("NSWindowTitle"); // StyleMask |= NSWindowStyleMasks.NSTitledWindowMask; // } // WindowClass = (NSString)aDecoder.DecodeObjectForKey("NSWindowClass"); // Toolbar = (NSToolbar)aDecoder.DecodeObjectForKey("NSViewClass"); // WindowView = (NSView)aDecoder.DecodeObjectForKey("NSWindowView"); // ScreenRect = (NSRect)aDecoder.DecodeRectForKey("NSScreenRect"); // IsRestorable = aDecoder.DecodeBoolForKey("NSWindowIsRestorable"); // MinSize = aDecoder.DecodeSizeForKey("NSMinSize"); // if (aDecoder.ContainsValueForKey("NSMaxSize")) // { // MaxSize = aDecoder.DecodeSizeForKey("NSMaxSize"); // } // else // { // MaxSize = new NSSize((float)10e+4, (float)10e+4); // } //} return this; }
public override bool IsEqual(id other) { if (other == (id)this) return true; if (other.IsKindOfClass(GSRGBColor.Class) == false || ((GSRGBColor)other).RedComponent != _red_component || ((GSRGBColor)other).GreenComponent != _green_component || ((GSRGBColor)other).BlueComponent != _blue_component || ((GSRGBColor)other).AlphaComponent != _alpha_component) { return false; } return true; }
public id PerformSelector(SEL aSelector, id anObject) { return null; }
public override bool IsEqual(id other) { if (other == this) return true; if (other.IsKindOfClass(NSColorClass) == true) return false; else { //[self subclassResponsibility: _cmd); return true; } }
public virtual id ObjectForKey(id aKey) { id obj = null; return obj; }
public override id InitWithCoder(NSCoder aDecoder) { id self = this; if (base.InitWithCoder(aDecoder) == null) return null; if (aDecoder.AllowsKeyedCoding) { if (aDecoder.ContainsValueForKey("NSTag")) { this.Tag = aDecoder.DecodeIntForKey("NSTag"); } if (aDecoder.ContainsValueForKey("NSTarget")) { this.Target = aDecoder.DecodeObjectForKey("NSTarget"); } if (aDecoder.ContainsValueForKey("NSAction")) { NSString action = (NSString)aDecoder.DecodeObjectForKey("NSAction"); this.Action = SEL.SelectorFromString(action); } } return self; }
internal virtual void _SetNextText(id anObject) { this.NextKeyView = anObject; }
internal virtual void _SetPreviousText(id anObject) { this.PreviousKeyView = anObject; }
internal virtual void _SetDelegate(id anObject) { _delegate = anObject; }
public virtual void SelectText(id sender) { //FIXME }
public override id _DecodeArrayOfObjectsForElement(GSXibElement element) { NSArray values = element.Values; int max = values.Count; id[] list = new id[max]; int i; for (i = 0; i < max; i++) { list[i] = this.ObjectForXib((GSXibElement)values.ObjectAtIndex(i)); if (list[i] == null) System.Diagnostics.Trace.WriteLine(string.Format("No object for {0} at index {1}", values.ObjectAtIndex(i).ToString(), i)); } return NSArray.ArrayWithObjects(list); }
public override id InitWithCoder(NSCoder aDecoder) { id self = this; base.InitWithCoder(aDecoder); if (aDecoder.AllowsKeyedCoding) { if (aDecoder.ContainsValueForKey("label")) { _label = (NSString)aDecoder.DecodeObjectForKey("label"); } if (aDecoder.ContainsValueForKey("source")) { _source = (id)aDecoder.DecodeObjectForKey("source"); } if (aDecoder.ContainsValueForKey("destination")) { _destination = (id)aDecoder.DecodeObjectForKey("destination"); } } return self; }
public static NSData ArchivedDataWithRootObject(id rootObject) { return null; }
public virtual bool IsEqual(id otherObj) { return this.Equals(otherObj); }
public virtual void performClick(id sender) { //FIXME }
public static void InsertKnownAbsent(NSMapTable map, IntPtr key, id value) { // FIXME }
public override id InitWithCoder(NSCoder aDecoder) { id self = this; base.InitWithCoder(aDecoder); if (aDecoder.AllowsKeyedCoding) { if (aDecoder.ContainsValueForKey(@"NSBoxType")) { int boxType = aDecoder.DecodeIntForKey(@"NSBoxType"); this.BoxType = (NSBoxType)boxType; } if (aDecoder.ContainsValueForKey(@"NSBorderType")) { NSBorderType borderType = (NSBorderType)aDecoder.DecodeIntForKey(@"NSBorderType"); this.BorderType = borderType; } if (aDecoder.ContainsValueForKey(@"NSTitlePosition")) { NSTitlePosition titlePosition = (NSTitlePosition)aDecoder.DecodeIntForKey(@"NSTitlePosition"); this.TitlePosition = titlePosition; } if (aDecoder.ContainsValueForKey(@"NSTransparent")) { // On Apple this is always NO, we keep it for old GNUstep archives _transparent = aDecoder.DecodeBoolForKey(@"NSTransparent"); } if (aDecoder.ContainsValueForKey(@"NSFullyTransparent")) { _transparent = aDecoder.DecodeBoolForKey(@"NSFullyTransparent"); } if (aDecoder.ContainsValueForKey(@"NSOffsets")) { this.ContentViewMargins = aDecoder.DecodeSizeForKey(@"NSOffsets"); } if (aDecoder.ContainsValueForKey(@"NSTitleCell")) { NSCell titleCell = (NSCell)aDecoder.DecodeObjectForKey(@"NSTitleCell"); _cell = titleCell; } if (aDecoder.ContainsValueForKey(@"NSContentView")) { NSView contentView = (NSView)aDecoder.DecodeObjectForKey(@"NSContentView"); this.ContentView = contentView; } } return this; }
public override bool IsEqual(id other) { if (other == (id)this) return true; if (other.IsKindOfClass(GSNamedColor.Class) == false || ((GSNamedColor)other).CatalogNameComponent.IsEqualToString(_catalog_name) == false || ((GSNamedColor)other).ColorNameComponent.IsEqualToString(_color_name) == false) { return false; } return true; }
public override id InitWithFrame(NSRect frameRect) { id self = this; NSView cv; if (base.InitWithFrame(frameRect) == null) return null; _cell = (id)Objc.MsgSend(NSCell.Alloc(), "InitTextCell", @"Title"); ((NSCell)_cell).Alignment = NSTextAlignment.NSCenterTextAlignment; ((NSCell)_cell).Bordered = false; ((NSCell)_cell).Editable = false; this.TitleFont = NSFont.SystemFontOfSize(NSFont.SmallSystemFontSize); _offsets.Width = 5; _offsets.Height = 5; _border_rect = _bounds; _border_type = NSBorderType.NSGrooveBorder; _title_position = NSTitlePosition.NSAtTop; _title_rect = NSRect.Zero; // FIXME //this.AutoresizesSubviews = false; cv = (NSView)NSView.Alloc().Init(); this.ContentView = cv; return self; }
public virtual void RemoveObjectIdenticalTo(id anObject) { uint i; if (anObject == null) { //NSWarnMLog(@"attempt to remove nil object"); return; } i = (uint)this.Count; if (i > 0) { while (i-- > 0) { id o = this.ObjectAtIndex((int)i); if (o == anObject) { this.RemoveObjectAtIndex(i); } } } }
public virtual void SetContentView(NSView aView) { if (aView != null) { base.ReplaceSubviewWith((NSView)_content_view, (NSView)aView); _content_view = aView; ((NSView)_content_view).Frame = CalcSizesAllowingNegative(false); } }
public virtual void RemoveObject(id anObject) { uint foundIndex = IndexOfObject(anObject); if (foundIndex != NS.NotFound) { RemoveObjectAtIndex(foundIndex); } }
public override id InitWithCoder(NSCoder aDecoder) { id self = this; if (aDecoder.AllowsKeyedCoding) { _className = (NSString)aDecoder.DecodeObjectForKey(@"NSClassName"); _extension = (NSString)aDecoder.DecodeObjectForKey(@"NSExtension"); _object = aDecoder.DecodeObjectForKey(@"NSObject"); } else { } //base.InitWithCoder(decoder); //var xElement = decoder.XmlElement; //var xNSClassName = xElement.Descendants().Where(c => // ((string)c.Attribute("key")) == "NSClassName").FirstOrDefault(); //if (xNSClassName != null) //{ // _className = xNSClassName.Value; //} return self; }
public virtual void SetDelegate(id dlgate) { _delegate = dlgate; }
public virtual void SetRealObject(id obj) { _object = obj; }
public virtual void ReplaceObject(id anObject, id anotherObject) { }
// Init instance of symbolic link type public virtual id InitSymbolicLinkWithDestination(NSString path) { if (base.Init() != null) { _wrapperData = path; _wrapperType = GSFileWrapperType.GSFileWrapperSymbolicLinkType; } return this; }