mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-20 15:25:01 +00:00
Added nib2cib options _allowsUndo and _usesFontPanel for CPTextView
This commit is contained in:
1 parent
42a1bca64d
commit
ad4904a0ec
3 files changed
+17
-4
No files matched your search
@@ -1773,7 +1773,9 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
@end
|
||||
|
||||
|
||||
var CPTextViewContainerKey = @"CPTextViewContainerKey",
|
||||
var CPTextViewAllowsUndoKey = @"CPTextViewAllowsUndoKey",
|
||||
CPTextViewUsesFontPanelKey = @"CPTextViewUsesFontPanelKey",
|
||||
CPTextViewContainerKey = @"CPTextViewContainerKey",
|
||||
CPTextViewLayoutManagerKey = @"CPTextViewLayoutManagerKey",
|
||||
CPTextViewTextStorageKey = @"CPTextViewTextStorageKey",
|
||||
CPTextViewInsertionPointColorKey = @"CPTextViewInsertionPointColorKey",
|
||||
@@ -1801,6 +1803,9 @@ var CPTextViewContainerKey = @"CPTextViewContainerKey",
|
||||
|
||||
while (key = [enumerator nextObject])
|
||||
[_selectedTextAttributes setObject:[selectedTextAttributes valueForKey:key] forKey:key];
|
||||
|
||||
[self setAllowsUndo:[aCoder decodeBoolForKey:CPTextViewAllowsUndoKey]];
|
||||
[self setUsesFontPanel:[aCoder decodeBoolForKey:CPTextViewUsesFontPanelKey]];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -1812,6 +1817,8 @@ var CPTextViewContainerKey = @"CPTextViewContainerKey",
|
||||
[aCoder encodeObject:_textContainer forKey:CPTextViewContainerKey];
|
||||
[aCoder encodeObject:_insertionPointColor forKey:CPTextViewInsertionPointColorKey];
|
||||
[aCoder encodeObject:_selectedTextAttributes forKey:CPTextViewSelectedTextAttributesKey];
|
||||
[aCoder encodeBool:_allowsUndo forKey:CPTextViewAllowsUndoKey];
|
||||
[aCoder encodeBool:_usesFontPanel forKey:CPTextViewUsesFontPanelKey];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
[self setEditable:[aTextViewSharedData isEditable]];
|
||||
[self setSelectable:[aTextViewSharedData isSelectable]];
|
||||
[self setRichText:[aTextViewSharedData isRichText]];
|
||||
[self setAllowsUndo:[aTextViewSharedData allowsUndo]];
|
||||
[self setUsesFontPanel:[aTextViewSharedData usesFontPanel]];
|
||||
|
||||
[self setBackgroundColor:[aTextViewSharedData backgroundColor]];
|
||||
[self setInsertionPointColor:[aTextViewSharedData insertionColor]];
|
||||
|
||||
@@ -27,9 +27,11 @@
|
||||
|
||||
@implementation CPTextViewSharedData : CPObject
|
||||
{
|
||||
BOOL _allowsUndo @accessors(getter=allowsUndo);
|
||||
BOOL _editable @accessors(getter=isEditable);
|
||||
BOOL _richText @accessors(getter=isRichText);
|
||||
BOOL _selectable @accessors(getter=isSelectable);
|
||||
BOOL _usesFontPanel @accessors(getter=usesFontPanel);
|
||||
CPColor _backgroundColor @accessors(getter=backgroundColor);
|
||||
CPColor _insertionColor @accessors(getter=insertionColor);
|
||||
CPDictionary _selectedTextAttributes @accessors(getter=selectedTextAttributes);
|
||||
@@ -56,9 +58,11 @@
|
||||
{
|
||||
var flags = [aCoder decodeIntForKey:@"NSFlags"];
|
||||
|
||||
_selectable = flags & 0x00000001 ? YES : NO;
|
||||
_editable = flags & 0x00000002 ? YES : NO;
|
||||
_richText = flags & 0x00000004 ? YES : NO;
|
||||
_allowsUndo = (flags & 0x0000400) ? YES : NO;
|
||||
_editable = (flags & 0x00000002) ? YES : NO;
|
||||
_richText = (flags & 0x00000004) ? YES : NO;
|
||||
_selectable = (flags & 0x00000001) ? YES : NO;
|
||||
_usesFontPanel = (flags & 0x00000020) ? YES : NO;
|
||||
|
||||
_backgroundColor = [aCoder decodeObjectForKey:@"NSBackgroundColor"];
|
||||
_insertionColor = [aCoder decodeObjectForKey:@"NSInsertionColor"];
|
||||
|
||||
Reference in new issue
Block a user