mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:40:48 +00:00
Merge in fixes etc from trunk
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_stable_20070311@24943 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b5f57a42f9
commit
2a2ba5b79a
21 changed files with 801 additions and 280 deletions
89
ChangeLog
89
ChangeLog
|
@ -1,3 +1,92 @@
|
|||
2007-03-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSAttributedString.m: Wrap excessively long lines
|
||||
* Source/externs.m: Add new attributed string constants
|
||||
* Headers/AppKit/NSAttributedString.h: Add constants from current
|
||||
MacOS-X
|
||||
|
||||
2007-03-23 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSAffineTransform.m: Simplify code slightly.
|
||||
|
||||
2007-03-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSCell.m (-drawWithFrame:inView:): Extract helper methods
|
||||
for border and focus drawing.
|
||||
* Source/NSButtonCell.m: Override the border drawing method.
|
||||
* Source/NSMenuItemCell.m: Override the border drawing method and
|
||||
set default focus ring to none.
|
||||
* Source/NSPopupButtonCell.m: Set default focus ring to default.
|
||||
|
||||
2007-03-23 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSAlert.m: (-_initWithoutGModel): Set selected text
|
||||
background color to [NSColor controlLightHighlightColor].
|
||||
|
||||
2007-03-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSView.m: Replace calls to the now deprecated methods on
|
||||
NSAffineTransform with correct ones.
|
||||
|
||||
2007-03-22 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSButtonCell.m (-drawWithFrame:inView:),
|
||||
* Source/NSCell.m (-drawWithFrame:inView:): Respect focus ring
|
||||
style when drawing first responder state.
|
||||
* Source/NSBrowserCell.m (-drawInteriorWithFrame:inView:),
|
||||
* Source/NSPopupButtonCell.m (-drawInteriorWithFrame:inView:),
|
||||
* Source/NSImageCell.m (-drawInteriorWithFrame:inView:): Don't
|
||||
draw focus ring.
|
||||
|
||||
2007-03-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSAffineTransform.m: Avoid accessing internals of the base
|
||||
library class directly. Mark many methods as deprecated.
|
||||
* Headers/AppKit/NSAffineTransform.h: Mark gnustep extensions as
|
||||
deprecated. Perhaps we don't want to deprecate all of them though
|
||||
need feedback on that.
|
||||
|
||||
2007-03-21 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSView.m (-gState): Generate a gstate if one is needed
|
||||
and none has been set up to now.
|
||||
|
||||
2007-03-19 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSPrintOperation.m (NSView -_endSheet, NSView
|
||||
-_displayPageInRect:atPlacement:withInfo:): Get graphics context
|
||||
from the print operation.
|
||||
* Source/NSView.m (-_lockFocusInContext:inRect:): When not set,
|
||||
get graphics context either from window or from the print operation.
|
||||
* Source/NSView.m (-lockFocusInRect, -lockFocusIfCanDraw): Don't
|
||||
set the graphics context.
|
||||
* Source/NSView.m: For all print methods get the context from
|
||||
the print operation.
|
||||
|
||||
2007-03-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSView.m (-setBoundsRotation:): Adjust _bounds ivar to
|
||||
the rotation.
|
||||
* Source/NSView.m (-translateOriginToPoint:, -rotateByAngle:):
|
||||
Implemented via setBoundsOrigin: and rotateByAngle:.
|
||||
* Source/NSView.m (-_lockFocusInContext:inRect:): For rotated
|
||||
views compute the actual clip region instead of using _bounds.
|
||||
|
||||
2007-03-17 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* GNUmakefile.postamble (before-uninstall): Uninstall gui.make.
|
||||
* Panels/GNUmakefile.postamble (after-uninstall): Fixed uninstall
|
||||
target.
|
||||
* Source/CompatibilityHeaders.make (after-install): Use
|
||||
ECHO_NOTHING and END_ECHO.
|
||||
(after-uninstall): New target that uninstalls the compatibility
|
||||
headers.
|
||||
|
||||
2007-03-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSAffineTransform.m: Set _isIdentity for all methods
|
||||
changing the matrix of the affine transform.
|
||||
|
||||
2007-03-11 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSApplication.m (-abortModal): Call stopModalWithCode: to
|
||||
|
|
|
@ -57,7 +57,8 @@ before-install:: $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
|
|||
# after-install::
|
||||
|
||||
# Things to do before uninstalling
|
||||
# before-uninstall::
|
||||
before-uninstall::
|
||||
rm -f $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/gui.make
|
||||
|
||||
# Things to do after uninstalling
|
||||
# after-uninstall::
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
@end
|
||||
|
||||
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
#if GS_API_VERSION(GS_API_NONE, 011500)
|
||||
@interface NSAffineTransform (GNUstep)
|
||||
- (void) translateToPoint: (NSPoint)point;
|
||||
- (void) scaleTo: (float)sx : (float)sy;
|
||||
|
@ -74,5 +75,6 @@
|
|||
|
||||
@end
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _GNUstep_H_NSAffineTransform */
|
||||
|
|
129
Headers/AppKit/NSAnimation.h
Normal file
129
Headers/AppKit/NSAnimation.h
Normal file
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
* NSAnimation.h
|
||||
*
|
||||
* Created by Dr. H. Nikolaus Schaller on Sat Jan 07 2006.
|
||||
* Copyright (c) 2005 DSITRI.
|
||||
*
|
||||
* This file used to be part of the mySTEP Library.
|
||||
* This file now is part of the GNUstep GUI Library.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; see the file COPYING.LIB.
|
||||
* If not, write to the Free Software Foundation,
|
||||
* 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _NSAnimation_h_GNUstep_
|
||||
#define _NSAnimation_h_GNUstep_
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
typedef enum _NSAnimationCurve
|
||||
{
|
||||
NSAnimationEaseInOut = 0, // default
|
||||
NSAnimationEaseIn,
|
||||
NSAnimationEaseOut,
|
||||
NSAnimationLinear
|
||||
} NSAnimationCurve;
|
||||
|
||||
typedef enum _NSAnimationBlockingMode
|
||||
{
|
||||
NSAnimationBlocking,
|
||||
NSAnimationNonblocking,
|
||||
NSAnimationNonblockingThreaded
|
||||
} NSAnimationBlockingMode;
|
||||
|
||||
typedef float NSAnimationProgress;
|
||||
|
||||
extern NSString *NSAnimationProgressMarkNotification;
|
||||
|
||||
@interface NSAnimation : NSObject < NSCopying, NSCoding >
|
||||
{
|
||||
NSAnimationBlockingMode _animationBlockingMode;
|
||||
NSAnimationCurve _animationCurve;
|
||||
NSAnimationProgress _currentProgress;
|
||||
NSMutableArray *_progressMarks;
|
||||
id _delegate;
|
||||
NSTimeInterval _duration;
|
||||
float _currentValue;
|
||||
float _frameRate;
|
||||
BOOL _isAnimating; // ?or the NSThread *
|
||||
}
|
||||
|
||||
- (void) addProgressMark: (NSAnimationProgress) progress;
|
||||
- (NSAnimationBlockingMode) animationBlockingMode;
|
||||
- (NSAnimationCurve) animationCurve;
|
||||
- (void) clearStartAnimation;
|
||||
- (void) clearStopAnimation;
|
||||
- (NSAnimationProgress) currentProgress;
|
||||
- (float) currentValue;
|
||||
- (id) delegate;
|
||||
- (NSTimeInterval) duration;
|
||||
- (float) frameRate;
|
||||
- (id) initWithDuration: (NSTimeInterval) duration animationCurve:
|
||||
(NSAnimationCurve) curve;
|
||||
- (BOOL) isAnimating;
|
||||
- (NSArray *) progressMarks;
|
||||
- (void) removeProgressMark: (NSAnimationProgress) progress;
|
||||
- (NSArray *) runLoopModesForAnimating;
|
||||
- (void) setAnimationBlockingMode: (NSAnimationBlockingMode) mode;
|
||||
- (void) setAnimationCurve: (NSAnimationCurve) curve;
|
||||
- (void) setCurrentProgress: (NSAnimationProgress) progress;
|
||||
- (void) setDelegate: (id) delegate;
|
||||
- (void) setDuration: (NSTimeInterval) duration;
|
||||
- (void) setFrameRate: (float) fps;
|
||||
- (void) setProgressMarks: (NSArray *) progress;
|
||||
- (void) startAnimation;
|
||||
- (void) startWhenAnimation: (NSAnimation *) animation reachesProgress:
|
||||
(NSAnimationProgress) start;
|
||||
- (void) stopAnimation;
|
||||
- (void) stopWhenAnimation: (NSAnimation *) animation reachesProgress:
|
||||
(NSAnimationProgress) stop;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface NSObject (NSAnimation)
|
||||
|
||||
- (void) animation: (NSAnimation *) animation didReachProgressMark:
|
||||
(NSAnimationProgress) progress;
|
||||
- (float) animation: (NSAnimation *) animation valueForProgress:
|
||||
(NSAnimationProgress) progress;
|
||||
- (void) animationDidEnd: (NSAnimation *) animation;
|
||||
- (void) animationDidStop: (NSAnimation *) animation;
|
||||
- (BOOL) animationShouldStart: (NSAnimation *) animation;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
extern NSString *NSViewAnimationTargetKey;
|
||||
extern NSString *NSViewAnimationStartFrameKey;
|
||||
extern NSString *NSViewAnimationEndFrameKey;
|
||||
extern NSString *NSViewAnimationEffectKey;
|
||||
extern NSString *NSViewAnimationFadeInEffect;
|
||||
extern NSString *NSViewAnimationFadeOutEffect;
|
||||
|
||||
@interface NSViewAnimation : NSAnimation
|
||||
{
|
||||
NSArray *_viewAnimations;
|
||||
}
|
||||
|
||||
- (id) initWithViewAnimations: (NSArray *) animations;
|
||||
- (void) setWithViewAnimations: (NSArray *) animations;
|
||||
- (NSArray *) viewAnimations;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* _NSAnimation_h_GNUstep_ */
|
||||
|
|
@ -49,17 +49,26 @@
|
|||
/* Global NSString attribute names used in accessing the respective
|
||||
property in a text attributes dictionary. if the key is not in the
|
||||
dictionary the default value is assumed. */
|
||||
APPKIT_EXPORT NSString *NSFontAttributeName;
|
||||
APPKIT_EXPORT NSString *NSParagraphStyleAttributeName;
|
||||
APPKIT_EXPORT NSString *NSForegroundColorAttributeName;
|
||||
APPKIT_EXPORT NSString *NSUnderlineStyleAttributeName;
|
||||
APPKIT_EXPORT NSString *NSSuperscriptAttributeName;
|
||||
APPKIT_EXPORT NSString *NSBackgroundColorAttributeName;
|
||||
APPKIT_EXPORT NSString *NSAttachmentAttributeName;
|
||||
APPKIT_EXPORT NSString *NSLigatureAttributeName;
|
||||
APPKIT_EXPORT NSString *NSBackgroundColorAttributeName;
|
||||
APPKIT_EXPORT NSString *NSBaselineOffsetAttributeName;
|
||||
APPKIT_EXPORT NSString *NSCursorAttributeName;
|
||||
APPKIT_EXPORT NSString *NSExpansionAttributeName;
|
||||
APPKIT_EXPORT NSString *NSFontAttributeName;
|
||||
APPKIT_EXPORT NSString *NSForegroundColorAttributeName;
|
||||
APPKIT_EXPORT NSString *NSKernAttributeName;
|
||||
APPKIT_EXPORT NSString *NSLigatureAttributeName;
|
||||
APPKIT_EXPORT NSString *NSLinkAttributeName;
|
||||
APPKIT_EXPORT NSString *NSObliquenessAttributeName;
|
||||
APPKIT_EXPORT NSString *NSParagraphStyleAttributeName;
|
||||
APPKIT_EXPORT NSString *NSShadowAttributeName;
|
||||
APPKIT_EXPORT NSString *NSStrikethroughColorAttributeName;
|
||||
APPKIT_EXPORT NSString *NSStrokeColorAttributeName;
|
||||
APPKIT_EXPORT NSString *NSStrokeWidthAttributeName;
|
||||
APPKIT_EXPORT NSString *NSSuperscriptAttributeName;
|
||||
APPKIT_EXPORT NSString *NSToolTipAttributeName;
|
||||
APPKIT_EXPORT NSString *NSUnderlineColorAttributeName;
|
||||
APPKIT_EXPORT NSString *NSUnderlineStyleAttributeName;
|
||||
|
||||
/* Currently supported values for NSUnderlineStyleAttributeName. */
|
||||
enum
|
||||
|
|
|
@ -62,7 +62,7 @@ endif
|
|||
|
||||
# Things to do after uninstalling
|
||||
after-uninstall::
|
||||
ifneq ($(strip $(LOCALIZED_RESOURCE_FILES)),)
|
||||
ifneq ($(strip $(LOCALIZED_RESOURCE_FILES)$(LOCALIZED_RESOURCE_COMPONENTS)),)
|
||||
$(ECHO_NOTHING)for l in $(LANGUAGES); do \
|
||||
if [ -d $$l.lproj ]; then \
|
||||
rm -rf $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
|
||||
|
@ -70,3 +70,4 @@ ifneq ($(strip $(LOCALIZED_RESOURCE_FILES)),)
|
|||
done$(END_ECHO)
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
@ -30,20 +30,35 @@
|
|||
after-install::
|
||||
@echo Installing compatibility headers...
|
||||
|
||||
@OLD_DIR=AppKit; NEW_DIR=GNUstepGUI; \
|
||||
$(ECHO_NOTHING)OLD_DIR=AppKit; NEW_DIR=GNUstepGUI; \
|
||||
LIST="$(GUI_HEADERS)" ;\
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/$$OLD_DIR; \
|
||||
for I in $$LIST ; do \
|
||||
(echo "#warning $$I is now included using the path <$$NEW_DIR/$$I>";\
|
||||
echo "#include <$$NEW_DIR/$$I>" ) \
|
||||
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done
|
||||
done$(END_ECHO)
|
||||
|
||||
@OLD_DIR=gnustep/gui; NEW_DIR=GNUstepGUI; \
|
||||
$(ECHO_NOTHING)OLD_DIR=gnustep/gui; NEW_DIR=GNUstepGUI; \
|
||||
LIST="$(GUI_HEADERS)" ;\
|
||||
$(MKDIRS) $(GNUSTEP_HEADERS)/$$OLD_DIR; \
|
||||
for I in $$LIST ; do \
|
||||
(echo "#warning $$I is now included using the path <$$NEW_DIR/$$I>";\
|
||||
echo "#include <$$NEW_DIR/$$I>" ) \
|
||||
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done
|
||||
done$(END_ECHO)
|
||||
|
||||
after-uninstall::
|
||||
@echo Uninstalling compatibility headers...
|
||||
|
||||
$(ECHO_NOTHING)OLD_DIR=AppKit; \
|
||||
LIST="$(GUI_HEADERS)" ;\
|
||||
for I in $$LIST ; do \
|
||||
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done$(END_ECHO)
|
||||
|
||||
$(ECHO_NOTHING)OLD_DIR=gnustep/gui; \
|
||||
LIST="$(GUI_HEADERS)" ;\
|
||||
for I in $$LIST ; do \
|
||||
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done$(END_ECHO)
|
||||
|
|
|
@ -50,6 +50,7 @@ libgnustep-gui_OBJC_FILES = Functions.m \
|
|||
NSActionCell.m \
|
||||
NSAffineTransform.m \
|
||||
NSAlert.m \
|
||||
NSAnimation.m \
|
||||
NSApplication.m \
|
||||
NSArrayController.m \
|
||||
NSAttributedString.m \
|
||||
|
@ -234,6 +235,7 @@ AppKitExceptions.h \
|
|||
NSActionCell.h \
|
||||
NSAffineTransform.h \
|
||||
NSAlert.h \
|
||||
NSAnimation.h \
|
||||
NSApplication.h \
|
||||
NSArrayController.h \
|
||||
NSBezierPath.h \
|
||||
|
|
|
@ -40,13 +40,7 @@
|
|||
#include "AppKit/NSBezierPath.h"
|
||||
#include "AppKit/PSOperators.h"
|
||||
|
||||
typedef struct internal
|
||||
{
|
||||
@defs(NSAffineTransform)
|
||||
} *iptr;
|
||||
|
||||
/* Private definitions */
|
||||
#define matrix (((iptr)self)->_matrix)
|
||||
#define A matrix.m11
|
||||
#define B matrix.m12
|
||||
#define C matrix.m21
|
||||
|
@ -64,24 +58,6 @@ typedef struct internal
|
|||
|
||||
static const float pi = 3.1415926535897932384626434;
|
||||
|
||||
/* Quick function to multiply two coordinate matrices. C = AB */
|
||||
static inline NSAffineTransformStruct
|
||||
matrix_multiply (NSAffineTransformStruct MA, NSAffineTransformStruct MB)
|
||||
{
|
||||
NSAffineTransformStruct MC;
|
||||
MC.m11 = MA.m11 * MB.m11 + MA.m12 * MB.m21;
|
||||
MC.m12 = MA.m11 * MB.m12 + MA.m12 * MB.m22;
|
||||
MC.m21 = MA.m21 * MB.m11 + MA.m22 * MB.m21;
|
||||
MC.m22 = MA.m21 * MB.m12 + MA.m22 * MB.m22;
|
||||
MC.tX = MA.tX * MB.m11 + MA.tY * MB.m21 + MB.tX;
|
||||
MC.tY = MA.tX * MB.m12 + MA.tY * MB.m22 + MB.tY;
|
||||
return MC;
|
||||
}
|
||||
|
||||
static NSAffineTransformStruct identityTransform = {
|
||||
1.0, 0.0, 0.0, 1.0, 0.0, 0.0
|
||||
};
|
||||
|
||||
@implementation NSAffineTransform (GUIAdditions)
|
||||
|
||||
/**
|
||||
|
@ -90,14 +66,9 @@ static NSAffineTransformStruct identityTransform = {
|
|||
*/
|
||||
- (void) concat
|
||||
{
|
||||
float m[6];
|
||||
m[0] = matrix.m11;
|
||||
m[1] = matrix.m12;
|
||||
m[2] = matrix.m21;
|
||||
m[3] = matrix.m22;
|
||||
m[4] = matrix.tX;
|
||||
m[5] = matrix.tY;
|
||||
PSconcat(m);
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
|
||||
PSconcat((float*)&matrix);
|
||||
}
|
||||
|
||||
|
||||
|
@ -130,6 +101,8 @@ static NSAffineTransformStruct identityTransform = {
|
|||
|
||||
- (void) scaleTo: (float)sx : (float)sy
|
||||
{
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
|
||||
/* If it's rotated. */
|
||||
if (B != 0 || C != 0)
|
||||
{
|
||||
|
@ -145,26 +118,34 @@ static NSAffineTransformStruct identityTransform = {
|
|||
A = sx; B = 0;
|
||||
C = 0; D = sy;
|
||||
}
|
||||
[self setTransformStruct: matrix];
|
||||
}
|
||||
|
||||
- (void) translateToPoint: (NSPoint)point
|
||||
{
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
float newTX, newTY;
|
||||
|
||||
newTX = point.x * A + point.y * C + TX;
|
||||
newTY = point.x * B + point.y * D + TY;
|
||||
TX = newTX;
|
||||
TY = newTY;
|
||||
[self setTransformStruct: matrix];
|
||||
}
|
||||
|
||||
|
||||
- (void) makeIdentityMatrix
|
||||
{
|
||||
matrix = identityTransform;
|
||||
static NSAffineTransformStruct identityTransform = {
|
||||
1.0, 0.0, 0.0, 1.0, 0.0, 0.0
|
||||
};
|
||||
|
||||
[self setTransformStruct: identityTransform];
|
||||
}
|
||||
|
||||
- (void) setFrameOrigin: (NSPoint)point
|
||||
{
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
float dx = point.x - TX;
|
||||
float dy = point.y - TY;
|
||||
[self translateToPoint: NSMakePoint(dx, dy)];
|
||||
|
@ -177,7 +158,9 @@ static NSAffineTransformStruct identityTransform = {
|
|||
|
||||
- (float) rotationAngle
|
||||
{
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
float rotationAngle = atan2(-C, A);
|
||||
|
||||
rotationAngle *= 180.0 / pi;
|
||||
if (rotationAngle < 0.0)
|
||||
rotationAngle += 360.0;
|
||||
|
@ -187,28 +170,38 @@ static NSAffineTransformStruct identityTransform = {
|
|||
|
||||
- (void) concatenateWith: (NSAffineTransform*)anotherMatrix
|
||||
{
|
||||
GSOnceMLog(@"deprecated ... use -prependTransform:");
|
||||
[self prependTransform: anotherMatrix];
|
||||
}
|
||||
|
||||
- (void) concatenateWithMatrix: (const float[6])anotherMatrix
|
||||
{
|
||||
NSAffineTransformStruct amat;
|
||||
NSAffineTransform *other;
|
||||
|
||||
GSOnceMLog(@"deprecated ... use -prependTransform:");
|
||||
amat.m11 = anotherMatrix[0];
|
||||
amat.m12 = anotherMatrix[1];
|
||||
amat.m21 = anotherMatrix[2];
|
||||
amat.m22 = anotherMatrix[3];
|
||||
amat.tX = anotherMatrix[4];
|
||||
amat.tY = anotherMatrix[5];
|
||||
matrix = matrix_multiply(amat, matrix);
|
||||
other = [NSAffineTransform new];
|
||||
[other setTransformStruct: amat];
|
||||
[self prependTransform: other];
|
||||
RELEASE(other);
|
||||
}
|
||||
|
||||
- (void)inverse
|
||||
{
|
||||
GSOnceMLog(@"deprecated ... use -invert:");
|
||||
[self invert];
|
||||
}
|
||||
|
||||
- (BOOL) isRotated
|
||||
{
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
|
||||
if (B == 0 && C == 0)
|
||||
{
|
||||
return NO;
|
||||
|
@ -221,6 +214,7 @@ static NSAffineTransformStruct identityTransform = {
|
|||
|
||||
- (void) boundingRectFor: (NSRect)rect result: (NSRect*)newRect
|
||||
{
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
/* Shortcuts of the usual rect values */
|
||||
float x = rect.origin.x;
|
||||
float y = rect.origin.y;
|
||||
|
@ -267,16 +261,13 @@ static NSAffineTransformStruct identityTransform = {
|
|||
|
||||
- (NSPoint) pointInMatrixSpace: (NSPoint)point
|
||||
{
|
||||
NSPoint new;
|
||||
|
||||
new.x = A * point.x + C * point.y + TX;
|
||||
new.y = B * point.x + D * point.y + TY;
|
||||
|
||||
return new;
|
||||
GSOnceMLog(@"deprecated ... use -transformPoint:");
|
||||
return [self transformPoint: point];
|
||||
}
|
||||
|
||||
- (NSPoint) deltaPointInMatrixSpace: (NSPoint)point
|
||||
{
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
NSPoint new;
|
||||
|
||||
new.x = A * point.x + C * point.y;
|
||||
|
@ -287,20 +278,13 @@ static NSAffineTransformStruct identityTransform = {
|
|||
|
||||
- (NSSize) sizeInMatrixSpace: (NSSize)size
|
||||
{
|
||||
NSSize new;
|
||||
|
||||
new.width = A * size.width + C * size.height;
|
||||
if (new.width < 0)
|
||||
new.width = - new.width;
|
||||
new.height = B * size.width + D * size.height;
|
||||
if (new.height < 0)
|
||||
new.height = - new.height;
|
||||
|
||||
return new;
|
||||
GSOnceMLog(@"deprecated ... use -transformSize:");
|
||||
return [self transformSize: size];
|
||||
}
|
||||
|
||||
- (NSRect) rectInMatrixSpace: (NSRect)rect
|
||||
{
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
NSRect new;
|
||||
|
||||
new.origin.x = A * rect.origin.x + C * rect.origin.y + TX;
|
||||
|
@ -324,16 +308,23 @@ static NSAffineTransformStruct identityTransform = {
|
|||
|
||||
- (void) setMatrix: (const float[6])replace
|
||||
{
|
||||
NSAffineTransformStruct matrix;
|
||||
|
||||
GSOnceMLog(@"deprecated ... use -setTransformStruct:");
|
||||
matrix.m11 = replace[0];
|
||||
matrix.m12 = replace[1];
|
||||
matrix.m21 = replace[2];
|
||||
matrix.m22 = replace[3];
|
||||
matrix.tX = replace[4];
|
||||
matrix.tY = replace[5];
|
||||
[self setTransformStruct: matrix];
|
||||
}
|
||||
|
||||
- (void) getMatrix: (float[6])replace
|
||||
{
|
||||
NSAffineTransformStruct matrix = [self transformStruct];
|
||||
|
||||
GSOnceMLog(@"deprecated ... use -transformStruct");
|
||||
replace[0] = matrix.m11;
|
||||
replace[1] = matrix.m12;
|
||||
replace[2] = matrix.m21;
|
||||
|
@ -344,7 +335,11 @@ static NSAffineTransformStruct identityTransform = {
|
|||
|
||||
- (void) takeMatrixFromTransform: (NSAffineTransform *)aTransform
|
||||
{
|
||||
NSAffineTransformStruct matrix;
|
||||
|
||||
GSOnceMLog(@"deprecated ... use -transformStruct and setTransformStruct:");
|
||||
matrix = [aTransform transformStruct];
|
||||
[self setTransformStruct: matrix];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -407,7 +407,7 @@ setControl(NSView* content, id control, NSString *title)
|
|||
be selectable for a copy-and-paste. Hence, setSelectable: YES.
|
||||
*/
|
||||
selectedAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSColor whiteColor],
|
||||
[NSColor controlLightHighlightColor],
|
||||
NSBackgroundColorAttributeName,
|
||||
nil];
|
||||
[(NSTextView *)fieldEditor setSelectedTextAttributes: selectedAttrs];
|
||||
|
|
241
Source/NSAnimation.m
Normal file
241
Source/NSAnimation.m
Normal file
|
@ -0,0 +1,241 @@
|
|||
/*
|
||||
* NSAnimation.m
|
||||
*
|
||||
* Created by Dr. H. Nikolaus Schaller on Sat Mar 06 2006.
|
||||
* Copyright (c) 2005 DSITRI.
|
||||
*
|
||||
* This file used to be part of the mySTEP Library.
|
||||
* This file now is part of the GNUstep GUI Library.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; see the file COPYING.LIB.
|
||||
* If not, write to the Free Software Foundation,
|
||||
* 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <AppKit/NSAnimation.h>
|
||||
|
||||
NSString *NSAnimationProgressMarkNotification
|
||||
= @"NSAnimationProgressMarkNotification";
|
||||
|
||||
NSString *NSViewAnimationTargetKey = @"NSViewAnimationTargetKey";
|
||||
NSString *NSViewAnimationStartFrameKey = @"NSViewAnimationStartFrameKey";
|
||||
NSString *NSViewAnimationEndFrameKey = @"NSViewAnimationEndFrameKey";
|
||||
NSString *NSViewAnimationEffectKey = @"NSViewAnimationEffectKey";
|
||||
NSString *NSViewAnimationFadeInEffect = @"NSViewAnimationFadeInEffect";
|
||||
NSString *NSViewAnimationFadeOutEffect = @"NSViewAnimationFadeOutEffect";
|
||||
|
||||
@implementation NSAnimation
|
||||
|
||||
- (void) addProgressMark: (NSAnimationProgress) progress
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (NSAnimationBlockingMode) animationBlockingMode
|
||||
{
|
||||
return _animationBlockingMode;
|
||||
}
|
||||
|
||||
- (NSAnimationCurve) animationCurve
|
||||
{
|
||||
return _animationCurve;
|
||||
}
|
||||
|
||||
- (void) clearStartAnimation
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (void) clearStopAnimation
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (NSAnimationProgress) currentProgress
|
||||
{
|
||||
return _currentProgress;
|
||||
}
|
||||
|
||||
- (float) currentValue
|
||||
{
|
||||
return _currentValue;
|
||||
}
|
||||
|
||||
- (id) delegate
|
||||
{
|
||||
return _delegate;
|
||||
}
|
||||
|
||||
- (NSTimeInterval) duration
|
||||
{
|
||||
return _duration;
|
||||
}
|
||||
|
||||
- (float) frameRate
|
||||
{
|
||||
return _frameRate;
|
||||
}
|
||||
|
||||
- (id) initWithDuration: (NSTimeInterval) duration animationCurve:
|
||||
(NSAnimationCurve) curve
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
_duration = duration;
|
||||
_animationCurve = curve;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) copyWithZone: (NSZone *) zone
|
||||
{
|
||||
return [self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[_progressMarks release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (BOOL) isAnimating
|
||||
{
|
||||
return _isAnimating;
|
||||
}
|
||||
|
||||
- (NSArray *) progressMarks
|
||||
{
|
||||
return _progressMarks;
|
||||
}
|
||||
|
||||
- (void) removeProgressMark: (NSAnimationProgress) progress
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (NSArray *) runLoopModesForAnimating
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void) setAnimationBlockingMode: (NSAnimationBlockingMode) mode
|
||||
{
|
||||
_animationBlockingMode = mode;
|
||||
}
|
||||
|
||||
- (void) setAnimationCurve: (NSAnimationCurve) curve
|
||||
{
|
||||
_animationCurve = curve;
|
||||
}
|
||||
|
||||
- (void) setCurrentProgress: (NSAnimationProgress) progress
|
||||
{
|
||||
_currentProgress = progress;
|
||||
}
|
||||
|
||||
- (void) setDelegate: (id) delegate
|
||||
{
|
||||
_delegate = delegate;
|
||||
}
|
||||
|
||||
- (void) setDuration: (NSTimeInterval) duration
|
||||
{
|
||||
_duration = duration;
|
||||
}
|
||||
|
||||
- (void) setFrameRate: (float) fps
|
||||
{
|
||||
_frameRate = fps;
|
||||
}
|
||||
|
||||
- (void) setProgressMarks: (NSArray *) progress
|
||||
{
|
||||
ASSIGN(_progressMarks, progress) ;
|
||||
}
|
||||
|
||||
- (void) _animate
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
// call delegate
|
||||
// estimate delay to keep fps
|
||||
// create new timer
|
||||
}
|
||||
|
||||
- (void) startAnimation
|
||||
{
|
||||
_isAnimating = YES;
|
||||
[self _animate];
|
||||
}
|
||||
|
||||
- (void) startWhenAnimation: (NSAnimation *) animation reachesProgress:
|
||||
(NSAnimationProgress) start
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (void) stopAnimation
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
// remove any timer
|
||||
_isAnimating = NO;
|
||||
}
|
||||
|
||||
- (void) stopWhenAnimation: (NSAnimation *) animation reachesProgress:
|
||||
(NSAnimationProgress) stop
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder *) coder
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder *) coder
|
||||
{
|
||||
return [self notImplemented: _cmd];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSViewAnimation
|
||||
|
||||
- (id) initWithViewAnimations: (NSArray *) animations
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
_viewAnimations = [animations retain];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[_viewAnimations release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setWithViewAnimations: (NSArray *) animations
|
||||
{
|
||||
ASSIGN(_viewAnimations, animations) ;
|
||||
}
|
||||
|
||||
- (NSArray *) viewAnimations
|
||||
{
|
||||
return _viewAnimations;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -152,9 +152,15 @@ Class converter_bundles(NSString *format, BOOL producer)
|
|||
{
|
||||
NSString *converter_name;
|
||||
if (producer)
|
||||
converter_name = [format stringByAppendingString: @"Producer"];
|
||||
{
|
||||
converter_name
|
||||
= [format stringByAppendingString: @"Producer"];
|
||||
}
|
||||
else
|
||||
converter_name = [format stringByAppendingString: @"Consumer"];
|
||||
{
|
||||
converter_name
|
||||
= [format stringByAppendingString: @"Consumer"];
|
||||
}
|
||||
converter_class = [aBundle classNamed: converter_name];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -323,9 +323,6 @@ static NSFont *_leafFont;
|
|||
// Draw the body of the cell
|
||||
[self _drawAttributedText: [self attributedStringValue]
|
||||
inFrame: title_rect];
|
||||
|
||||
if (_cell.shows_first_responder == YES)
|
||||
NSDottedFrameRect(cellFrame);
|
||||
}
|
||||
|
||||
- (BOOL) isOpaque
|
||||
|
|
|
@ -920,38 +920,14 @@ typedef struct _GSButtonCellFlags
|
|||
inFrame: frame];
|
||||
}
|
||||
|
||||
|
||||
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
// Private helper method overridden in subclasses
|
||||
- (void) _drawBorderAndBackgroundWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
// Save last view drawn to
|
||||
if (_control_view != controlView)
|
||||
_control_view = controlView;
|
||||
|
||||
// transparent buttons never draw
|
||||
if (_buttoncell_is_transparent)
|
||||
return;
|
||||
|
||||
// do nothing if cell's frame rect is zero
|
||||
if (NSIsEmptyRect(cellFrame))
|
||||
return;
|
||||
|
||||
// draw the border if needed
|
||||
if ((_cell.is_bordered)
|
||||
&& (!_shows_border_only_while_mouse_inside || _mouse_inside))
|
||||
{
|
||||
[self drawBezelWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
||||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
|
||||
// Draw first responder
|
||||
if (_cell.shows_first_responder
|
||||
&& [[controlView window] firstResponder] == controlView)
|
||||
{
|
||||
// FIXME: Should depend on _cell.focus_ring_type
|
||||
[[GSTheme theme] drawFocusFrame: [self drawingRectForBounds: cellFrame]
|
||||
view: controlView];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) drawGradientWithFrame: (NSRect)cellFrame inView: (NSView *)controlView
|
||||
|
|
|
@ -1994,15 +1994,9 @@ static NSColor *shadowCol;
|
|||
// prettyfying
|
||||
}
|
||||
|
||||
/**<p>Draws the cell in <var>controlView</var></p>
|
||||
*/
|
||||
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
// Private helper method overridden in subclasses
|
||||
- (void) _drawBorderAndBackgroundWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
// do nothing if cell's frame rect is zero
|
||||
if (NSIsEmptyRect(cellFrame))
|
||||
return;
|
||||
|
||||
// draw the border if needed
|
||||
if (_cell.is_bordered)
|
||||
{
|
||||
[shadowCol set];
|
||||
|
@ -2012,17 +2006,46 @@ static NSColor *shadowCol;
|
|||
{
|
||||
[[GSTheme theme] drawWhiteBezel: cellFrame withClip: NSZeroRect];
|
||||
}
|
||||
}
|
||||
|
||||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
|
||||
// Draw first responder
|
||||
// Private helper method
|
||||
- (void) _drawFocusRingWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
if (_cell.shows_first_responder
|
||||
&& [[controlView window] firstResponder] == controlView)
|
||||
{
|
||||
// FIXME: Should depend on _cell.focus_ring_type
|
||||
[[GSTheme theme] drawFocusFrame: [self drawingRectForBounds: cellFrame]
|
||||
switch (_cell.focus_ring_type)
|
||||
{
|
||||
case NSFocusRingTypeDefault:
|
||||
[[GSTheme theme] drawFocusFrame: [self drawingRectForBounds:
|
||||
cellFrame]
|
||||
view: controlView];
|
||||
break;
|
||||
case NSFocusRingTypeExterior:
|
||||
[[GSTheme theme] drawFocusFrame: cellFrame
|
||||
view: controlView];
|
||||
break;
|
||||
case NSFocusRingTypeNone:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**<p>Draws the cell in <var>controlView</var></p>
|
||||
*/
|
||||
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
// do nothing if cell's frame rect is zero
|
||||
if (NSIsEmptyRect(cellFrame))
|
||||
return;
|
||||
|
||||
// draw the border if needed
|
||||
[self _drawBorderAndBackgroundWithFrame: cellFrame inView: controlView];
|
||||
// draw interior
|
||||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
// Draw first responder
|
||||
[self _drawFocusRingWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
||||
/**<p>Sets whether the NSCell is highlighted.</p>
|
||||
|
|
|
@ -301,9 +301,6 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
|
|||
realImageSize.height)
|
||||
operation: NSCompositeSourceOver
|
||||
fraction: 1.0];
|
||||
|
||||
if (_cell.shows_first_responder)
|
||||
NSDottedFrameRect(cellFrame);
|
||||
}
|
||||
|
||||
- (NSSize) cellSize
|
||||
|
|
|
@ -59,6 +59,11 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
|
|||
}
|
||||
}
|
||||
|
||||
+ (NSFocusRingType) defaultFocusRingType
|
||||
{
|
||||
return NSFocusRingTypeNone;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
[super init];
|
||||
|
@ -742,24 +747,9 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
|
|||
}
|
||||
}
|
||||
|
||||
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
- (void) _drawBorderAndBackgroundWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
// Save last view drawn to
|
||||
if (_control_view != controlView)
|
||||
_control_view = controlView;
|
||||
|
||||
// Transparent buttons never draw
|
||||
if (_buttoncell_is_transparent)
|
||||
return;
|
||||
|
||||
// Do nothing if cell's frame rect is zero
|
||||
if (NSIsEmptyRect(cellFrame))
|
||||
return;
|
||||
|
||||
// Draw the border if needed
|
||||
[self drawBorderAndBackgroundWithFrame: cellFrame inView: controlView];
|
||||
|
||||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
||||
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
|
|
|
@ -56,6 +56,11 @@ static NSImage *_pbc_image[2];
|
|||
return YES;
|
||||
}
|
||||
|
||||
+ (NSFocusRingType) defaultFocusRingType
|
||||
{
|
||||
return NSFocusRingTypeDefault;
|
||||
}
|
||||
|
||||
// Initialization
|
||||
/**
|
||||
* Initialize a blank cell.
|
||||
|
@ -888,12 +893,6 @@ static NSImage *_pbc_image[2];
|
|||
[self calcSize];
|
||||
[super drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
|
||||
if (_cell.shows_first_responder)
|
||||
{
|
||||
cellFrame = [self drawingRectForBounds: cellFrame];
|
||||
NSDottedFrameRect(cellFrame);
|
||||
}
|
||||
|
||||
/* Unset the item to restore balance if a new was created */
|
||||
if (new)
|
||||
{
|
||||
|
|
|
@ -1063,8 +1063,8 @@ scaleRect(NSRect rect, double scale)
|
|||
int currentPage;
|
||||
float xoffset, yoffset, scale;
|
||||
NSString *label;
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
currentPage = [printOp currentPage];
|
||||
|
||||
|
@ -1141,12 +1141,13 @@ scaleRect(NSRect rect, double scale)
|
|||
|
||||
- (void) _endSheet
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
if ([printOp isEPSOperation] == NO)
|
||||
DPSPrintf(ctxt, "showpage\n");
|
||||
DPSPrintf(ctxt, "%%%%PageTrailer\n");
|
||||
DPSPrintf(ctxt, "\n");
|
||||
}
|
||||
@end
|
||||
|
||||
@end
|
||||
|
|
293
Source/NSView.m
293
Source/NSView.m
|
@ -53,6 +53,7 @@
|
|||
|
||||
#include "AppKit/NSAffineTransform.h"
|
||||
#include "AppKit/NSApplication.h"
|
||||
#include "AppKit/NSBezierPath.h"
|
||||
#include "AppKit/NSCursor.h"
|
||||
#include "AppKit/NSDocumentController.h"
|
||||
#include "AppKit/NSDocument.h"
|
||||
|
@ -971,22 +972,6 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
- (void) willRemoveSubview: (NSView *)subview
|
||||
{}
|
||||
|
||||
- (void) rotateByAngle: (float)angle
|
||||
{
|
||||
if (_coordinates_valid)
|
||||
{
|
||||
(*invalidateImp)(self, invalidateSel);
|
||||
}
|
||||
[_boundsMatrix rotateByDegrees: angle];
|
||||
_is_rotated_from_base = _is_rotated_or_scaled_from_base = YES;
|
||||
|
||||
if (_post_bounds_changes)
|
||||
{
|
||||
[nc postNotificationName: NSViewBoundsDidChangeNotification
|
||||
object: self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) _updateBoundsMatrix
|
||||
{
|
||||
float sx;
|
||||
|
@ -1243,12 +1228,11 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
|
||||
- (void) setBoundsOrigin: (NSPoint)newOrigin
|
||||
{
|
||||
_bounds.origin = newOrigin;
|
||||
|
||||
if (_coordinates_valid)
|
||||
{
|
||||
(*invalidateImp)(self, invalidateSel);
|
||||
}
|
||||
_bounds.origin = newOrigin;
|
||||
[_boundsMatrix setFrameOrigin: NSMakePoint(-newOrigin.x, -newOrigin.y)];
|
||||
|
||||
if (_post_bounds_changes)
|
||||
|
@ -1287,12 +1271,19 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
|
||||
- (void) setBoundsRotation: (float)angle
|
||||
{
|
||||
NSAffineTransform *matrix;
|
||||
|
||||
if (_coordinates_valid)
|
||||
{
|
||||
(*invalidateImp)(self, invalidateSel);
|
||||
}
|
||||
[_boundsMatrix setFrameRotation: angle];
|
||||
[_boundsMatrix rotateByDegrees: angle - [_boundsMatrix rotationAngle]];
|
||||
_is_rotated_from_base = _is_rotated_or_scaled_from_base = YES;
|
||||
// Adjust bounds
|
||||
matrix = [_boundsMatrix copy];
|
||||
[matrix invert];
|
||||
[matrix boundingRectFor: _frame result: &_bounds];
|
||||
RELEASE(matrix);
|
||||
|
||||
if (_post_bounds_changes)
|
||||
{
|
||||
|
@ -1303,17 +1294,13 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
|
||||
- (void) translateOriginToPoint: (NSPoint)point
|
||||
{
|
||||
if (_coordinates_valid)
|
||||
{
|
||||
(*invalidateImp)(self, invalidateSel);
|
||||
}
|
||||
[_boundsMatrix translateToPoint: point];
|
||||
[self setBoundsOrigin: NSMakePoint(NSMinX(_bounds) - point.x,
|
||||
NSMinY(_bounds) - point.y)];
|
||||
}
|
||||
|
||||
if (_post_bounds_changes)
|
||||
{
|
||||
[nc postNotificationName: NSViewBoundsDidChangeNotification
|
||||
object: self];
|
||||
}
|
||||
- (void) rotateByAngle: (float)angle
|
||||
{
|
||||
[self setBoundsRotation: [self boundsRotation] + angle];
|
||||
}
|
||||
|
||||
- (NSRect) centerScanRect: (NSRect)aRect
|
||||
|
@ -1326,8 +1313,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
* Plus - this is all pretty meaningless is we are not in a window!
|
||||
*/
|
||||
matrix = [self _matrixToWindow];
|
||||
aRect.origin = [matrix pointInMatrixSpace: aRect.origin];
|
||||
aRect.size = [matrix sizeInMatrixSpace: aRect.size];
|
||||
aRect.origin = [matrix transformPoint: aRect.origin];
|
||||
aRect.size = [matrix transformSize: aRect.size];
|
||||
|
||||
aRect.origin.x = floor(aRect.origin.x);
|
||||
aRect.origin.y = floor(aRect.origin.y);
|
||||
|
@ -1335,8 +1322,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
aRect.size.height = floor(aRect.size.height);
|
||||
|
||||
matrix = [self _matrixFromWindow];
|
||||
aRect.origin = [matrix pointInMatrixSpace: aRect.origin];
|
||||
aRect.size = [matrix sizeInMatrixSpace: aRect.size];
|
||||
aRect.origin = [matrix transformPoint: aRect.origin];
|
||||
aRect.size = [matrix transformSize: aRect.size];
|
||||
|
||||
return aRect;
|
||||
}
|
||||
|
@ -1353,7 +1340,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
NSAssert(_window == [aView window], NSInvalidArgumentException);
|
||||
|
||||
matrix = [aView _matrixToWindow];
|
||||
new = [matrix pointInMatrixSpace: aPoint];
|
||||
new = [matrix transformPoint: aPoint];
|
||||
|
||||
if (_coordinates_valid)
|
||||
{
|
||||
|
@ -1363,7 +1350,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
{
|
||||
matrix = [self _matrixFromWindow];
|
||||
}
|
||||
new = [matrix pointInMatrixSpace: new];
|
||||
new = [matrix transformPoint: new];
|
||||
|
||||
return new;
|
||||
}
|
||||
|
@ -1391,9 +1378,9 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
{
|
||||
matrix = [self _matrixToWindow];
|
||||
}
|
||||
new = [matrix pointInMatrixSpace: aPoint];
|
||||
new = [matrix transformPoint: aPoint];
|
||||
matrix = [aView _matrixFromWindow];
|
||||
new = [matrix pointInMatrixSpace: new];
|
||||
new = [matrix transformPoint: new];
|
||||
|
||||
return new;
|
||||
}
|
||||
|
@ -1415,12 +1402,12 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
p[3].y += aRect.size.height;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
p[i] = [matrix1 pointInMatrixSpace: p[i]];
|
||||
p[i] = [matrix1 transformPoint: p[i]];
|
||||
|
||||
min = max = p[0] = [matrix2 pointInMatrixSpace: p[0]];
|
||||
min = max = p[0] = [matrix2 transformPoint: p[0]];
|
||||
for (i = 1; i < 4; i++)
|
||||
{
|
||||
p[i] = [matrix2 pointInMatrixSpace: p[i]];
|
||||
p[i] = [matrix2 transformPoint: p[i]];
|
||||
min.x = MIN(min.x, p[i].x);
|
||||
min.y = MIN(min.y, p[i].y);
|
||||
max.x = MAX(max.x, p[i].x);
|
||||
|
@ -1521,7 +1508,7 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
}
|
||||
NSAssert(_window == [aView window], NSInvalidArgumentException);
|
||||
matrix = [aView _matrixToWindow];
|
||||
new = [matrix sizeInMatrixSpace: aSize];
|
||||
new = [matrix transformSize: aSize];
|
||||
|
||||
if (_coordinates_valid)
|
||||
{
|
||||
|
@ -1531,7 +1518,7 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
{
|
||||
matrix = [self _matrixFromWindow];
|
||||
}
|
||||
new = [matrix sizeInMatrixSpace: new];
|
||||
new = [matrix transformSize: new];
|
||||
|
||||
return new;
|
||||
}
|
||||
|
@ -1558,10 +1545,10 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
{
|
||||
matrix = [self _matrixToWindow];
|
||||
}
|
||||
new = [matrix sizeInMatrixSpace: aSize];
|
||||
new = [matrix transformSize: aSize];
|
||||
|
||||
matrix = [aView _matrixFromWindow];
|
||||
new = [matrix sizeInMatrixSpace: new];
|
||||
new = [matrix transformSize: new];
|
||||
|
||||
return new;
|
||||
}
|
||||
|
@ -1694,68 +1681,7 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
[self setFrame: newFrame];
|
||||
}
|
||||
|
||||
/**
|
||||
<p> Tell the view to maintain a private gstate object which
|
||||
encapsulates all the information about drawing, such as coordinate
|
||||
transforms, line widths, etc. If you do not invoke this method, a
|
||||
gstate object is constructed each time the view is lockFocused.
|
||||
Allocating a private gstate may improve the performance of views
|
||||
that are focused a lot and have a lot of customized drawing
|
||||
parameters. </p>
|
||||
|
||||
<p> View subclasses should override the
|
||||
setUpGstate method to set these custom parameters.
|
||||
</p>
|
||||
*/
|
||||
- (void) allocateGState
|
||||
{
|
||||
// FIXME: This should create an actual gState
|
||||
_allocate_gstate = 1;
|
||||
_renew_gstate = 1;
|
||||
}
|
||||
|
||||
/**
|
||||
Frees the gstate object, if there is one.
|
||||
*/
|
||||
- (void) releaseGState
|
||||
{
|
||||
if (_allocate_gstate && _gstate)
|
||||
GSUndefineGState(GSCurrentContext(), _gstate);
|
||||
_gstate = 0;
|
||||
_allocate_gstate = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns an identifier that represents the view's gstate object,
|
||||
which is used to encapsulate drawing information about the view.
|
||||
Most of the time a gstate object is created from scratch when the
|
||||
view is focused, so if the view is not currently focused or
|
||||
allocateGState has not been called, then this method will return 0.
|
||||
FIXME: The above is what the OpenStep and Cocoa specification say, but
|
||||
gState is 0 unless allocateGState has been called.
|
||||
*/
|
||||
- (int) gState
|
||||
{
|
||||
return _gstate;
|
||||
}
|
||||
|
||||
/**
|
||||
Invalidates the view's gstate object so it will be set up again
|
||||
using setUpGState the next time the view is focused. */
|
||||
- (void) renewGState
|
||||
{
|
||||
_renew_gstate = 1;
|
||||
/* Note that the next time we lock focus, we'll realloc a gstate (if
|
||||
_allocate_gstate). This seems to make sense, and also allows us
|
||||
to call this method each time we invalidate the coordinates */
|
||||
}
|
||||
|
||||
/* Overridden by subclasses to setup custom gstate */
|
||||
- (void) setUpGState
|
||||
{
|
||||
}
|
||||
|
||||
- (void) _lockFocusInContext: ctxt inRect: (NSRect)rect
|
||||
- (void) _lockFocusInContext: (NSGraphicsContext *)ctxt inRect: (NSRect)rect
|
||||
{
|
||||
NSRect wrect;
|
||||
int window_gstate = 0;
|
||||
|
@ -1770,7 +1696,21 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
}
|
||||
}
|
||||
|
||||
// FIXME: Set current context?
|
||||
if (ctxt == nil)
|
||||
{
|
||||
if (viewIsPrinting != nil)
|
||||
{
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
|
||||
ctxt = [printOp context];
|
||||
}
|
||||
else
|
||||
{
|
||||
ctxt = [_window graphicsContext];
|
||||
}
|
||||
}
|
||||
// FIXME: Set current context
|
||||
|
||||
|
||||
[ctxt lockFocusView: self inRect: rect];
|
||||
wrect = [self convertRect: rect toView: nil];
|
||||
|
@ -1817,20 +1757,19 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
if (_renew_gstate)
|
||||
{
|
||||
[self setUpGState];
|
||||
_renew_gstate = NO;
|
||||
}
|
||||
_renew_gstate = 0;
|
||||
DPSgsave(ctxt);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
DPSsetgstate(ctxt, window_gstate);
|
||||
DPSgsave(ctxt);
|
||||
[matrix concat];
|
||||
|
||||
/* Allow subclases to make other modifications */
|
||||
[self setUpGState];
|
||||
_renew_gstate = 0;
|
||||
_renew_gstate = NO;
|
||||
if (_allocate_gstate)
|
||||
{
|
||||
_gstate = GSDefineGState(ctxt);
|
||||
|
@ -1845,13 +1784,29 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
|
||||
if ([self wantsDefaultClipping])
|
||||
{
|
||||
/* Clip to the visible rectangle - which will never be greater
|
||||
/*
|
||||
* Clip to the visible rectangle - which will never be greater
|
||||
* than the bounds of the view. This prevents drawing outside
|
||||
* our bounds
|
||||
* our bounds.
|
||||
*/
|
||||
if (_is_rotated_from_base)
|
||||
{
|
||||
// When the view is rotated, more complex clipping is needed.
|
||||
NSAffineTransform *matrix;
|
||||
NSBezierPath *bp = [NSBezierPath bezierPathWithRect: _frame];
|
||||
|
||||
matrix = [_boundsMatrix copy];
|
||||
[matrix invert];
|
||||
[bp transformUsingAffineTransform: matrix];
|
||||
[bp addClip];
|
||||
RELEASE(matrix);
|
||||
}
|
||||
else
|
||||
{
|
||||
DPSrectclip(ctxt, NSMinX(rect), NSMinY(rect),
|
||||
NSWidth(rect), NSHeight(rect));
|
||||
}
|
||||
}
|
||||
|
||||
/* Tell backends that images are drawn upside down.
|
||||
This is needed when a backend is able to handle full image transformation. */
|
||||
|
@ -1898,9 +1853,76 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
[ctxt unlockFocusView: self needsFlush: YES ];
|
||||
}
|
||||
|
||||
/**
|
||||
<p> Tell the view to maintain a private gstate object which
|
||||
encapsulates all the information about drawing, such as coordinate
|
||||
transforms, line widths, etc. If you do not invoke this method, a
|
||||
gstate object is constructed each time the view is lockFocused.
|
||||
Allocating a private gstate may improve the performance of views
|
||||
that are focused a lot and have a lot of customized drawing
|
||||
parameters. </p>
|
||||
|
||||
<p> View subclasses should override the
|
||||
setUpGstate method to set these custom parameters.
|
||||
</p>
|
||||
*/
|
||||
- (void) allocateGState
|
||||
{
|
||||
_allocate_gstate = YES;
|
||||
_renew_gstate = YES;
|
||||
}
|
||||
|
||||
/**
|
||||
Frees the gstate object, if there is one.
|
||||
*/
|
||||
- (void) releaseGState
|
||||
{
|
||||
if (_allocate_gstate && _gstate)
|
||||
GSUndefineGState(GSCurrentContext(), _gstate);
|
||||
_gstate = 0;
|
||||
_allocate_gstate = NO;
|
||||
}
|
||||
|
||||
/**
|
||||
Returns an identifier that represents the view's gstate object,
|
||||
which is used to encapsulate drawing information about the view.
|
||||
Most of the time a gstate object is created from scratch when the
|
||||
view is focused, so if the view is not currently focused or
|
||||
allocateGState has not been called, then this method will return 0.
|
||||
FIXME: The above is what the OpenStep and Cocoa specification say, but
|
||||
gState is 0 unless allocateGState has been called.
|
||||
*/
|
||||
- (int) gState
|
||||
{
|
||||
if (_allocate_gstate && (!_gstate || _renew_gstate))
|
||||
{
|
||||
// Set the gstate by locking and unlocking focus.
|
||||
[self lockFocus];
|
||||
[self unlockFocusNeedsFlush: NO];
|
||||
}
|
||||
|
||||
return _gstate;
|
||||
}
|
||||
|
||||
/**
|
||||
Invalidates the view's gstate object so it will be set up again
|
||||
using setUpGState the next time the view is focused. */
|
||||
- (void) renewGState
|
||||
{
|
||||
_renew_gstate = YES;
|
||||
/* Note that the next time we lock focus, we'll realloc a gstate (if
|
||||
_allocate_gstate). This seems to make sense, and also allows us
|
||||
to call this method each time we invalidate the coordinates */
|
||||
}
|
||||
|
||||
/* Overridden by subclasses to setup custom gstate */
|
||||
- (void) setUpGState
|
||||
{
|
||||
}
|
||||
|
||||
- (void) lockFocusInRect: (NSRect)rect
|
||||
{
|
||||
[self _lockFocusInContext: [_window graphicsContext] inRect: rect];
|
||||
[self _lockFocusInContext: nil inRect: rect];
|
||||
}
|
||||
|
||||
- (void) lockFocus
|
||||
|
@ -1915,7 +1937,7 @@ static NSRect convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matri
|
|||
|
||||
- (BOOL) lockFocusIfCanDraw
|
||||
{
|
||||
return [self lockFocusIfCanDrawInContext: [_window graphicsContext]];
|
||||
return [self lockFocusIfCanDrawInContext: nil];
|
||||
}
|
||||
|
||||
- (BOOL) lockFocusIfCanDrawInContext: (NSGraphicsContext *)context;
|
||||
|
@ -3740,7 +3762,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
bBox: (NSRect)pageRect
|
||||
fonts: (NSString*)fontNames
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
if (aString == nil)
|
||||
aString = [[NSNumber numberWithInt: ordinalNum] description];
|
||||
|
@ -3767,8 +3790,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
pages: (int)numPages
|
||||
title: (NSString*)aTitle
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
NSPrintingOrientation orient;
|
||||
BOOL epsOp;
|
||||
|
||||
|
@ -3826,13 +3849,17 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
|
||||
- (void) beginSetup
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
DPSPrintf(ctxt, "%%%%BeginSetup\n");
|
||||
}
|
||||
|
||||
- (void) beginTrailer
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
DPSPrintf(ctxt, "%%%%Trailer\n");
|
||||
}
|
||||
|
||||
|
@ -3846,33 +3873,41 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
|
||||
- (void) endHeaderComments
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
DPSPrintf(ctxt, "%%%%EndComments\n\n");
|
||||
}
|
||||
|
||||
- (void) endPrologue
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
DPSPrintf(ctxt, "%%%%EndProlog\n\n");
|
||||
}
|
||||
|
||||
- (void) endSetup
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
DPSPrintf(ctxt, "%%%%EndSetup\n\n");
|
||||
}
|
||||
|
||||
- (void) endPageSetup
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
DPSPrintf(ctxt, "%%%%EndPageSetup\n");
|
||||
}
|
||||
|
||||
- (void) endPage
|
||||
{
|
||||
int nup;
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
NSDictionary *dict = [[printOp printInfo] dictionary];
|
||||
|
||||
nup = [[dict objectForKey: NSPrintPagesPerSheet] intValue];
|
||||
|
@ -3886,7 +3921,9 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
|
||||
- (void) endTrailer
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
|
||||
DPSPrintf(ctxt, "%%%%EOF\n");
|
||||
}
|
||||
|
||||
|
@ -3943,10 +3980,10 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
{
|
||||
int first, last, pages, nup;
|
||||
NSRect bbox;
|
||||
NSDictionary *dict;
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
dict = [[printOp printInfo] dictionary];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
NSDictionary *dict = [[printOp printInfo] dictionary];
|
||||
|
||||
if (printOp == nil)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
|
@ -4048,8 +4085,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
{
|
||||
int first, last, current, pages;
|
||||
NSSet *fontNames;
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSPrintOperation *printOp = [NSPrintOperation currentOperation];
|
||||
NSGraphicsContext *ctxt = [printOp context];
|
||||
NSDictionary *dict = [[printOp printInfo] dictionary];
|
||||
|
||||
first = [[dict objectForKey: NSPrintFirstPage] intValue];
|
||||
|
|
|
@ -429,19 +429,30 @@ NSString *NSWorkspaceWillUnmountNotification =
|
|||
@"NSWorkspaceWillUnmountNotification";
|
||||
|
||||
/*
|
||||
* NSStringDrawing NSString additions
|
||||
* NSStringDrawing NSAttributedString additions
|
||||
*/
|
||||
NSString *NSFontAttributeName = @"NSFontAttributeName";
|
||||
NSString *NSParagraphStyleAttributeName = @"NSParagraphStyleAttributeName";
|
||||
NSString *NSForegroundColorAttributeName = @"NSForegroundColorAttributeName";
|
||||
NSString *NSUnderlineStyleAttributeName = @"NSUnderlineStyleAttributeName";
|
||||
NSString *NSSuperscriptAttributeName = @"NSSuperscriptAttributeName";
|
||||
NSString *NSBackgroundColorAttributeName = @"NSBackgroundColorAttributeName";
|
||||
NSString *NSAttachmentAttributeName = @"NSAttachmentAttributeName";
|
||||
NSString *NSLigatureAttributeName = @"NSLigatureAttributeName";
|
||||
NSString *NSBackgroundColorAttributeName = @"NSBackgroundColorAttributeName";
|
||||
NSString *NSBaselineOffsetAttributeName = @"NSBaselineOffsetAttributeName";
|
||||
NSString *NSCursorAttributeName = @"NSCursorAttributeName";
|
||||
NSString *NSExpansionAttributeName = @"NSExpansionAttributeName";
|
||||
NSString *NSFontAttributeName = @"NSFontAttributeName";
|
||||
NSString *NSForegroundColorAttributeName = @"NSForegroundColorAttributeName";
|
||||
NSString *NSKernAttributeName = @"NSKernAttributeName";
|
||||
NSString *NSLigatureAttributeName = @"NSLigatureAttributeName";
|
||||
NSString *NSLinkAttributeName = @"NSLinkAttributeName";
|
||||
NSString *NSObliquenessAttributeName = @"NSObliquenessAttributeName";
|
||||
NSString *NSParagraphStyleAttributeName = @"NSParagraphStyleAttributeName";
|
||||
NSString *NSShadowAttributeName = @"NSShadowAttributeName";
|
||||
NSString *NSStrikethroughColorAttributeName
|
||||
= @"NSStrikethroughColorAttributeName";
|
||||
NSString *NSStrokeColorAttributeName = @"NSStrokeColorAttributeName";
|
||||
NSString *NSStrokeWidthAttributeName = @"NSStrokeWidthAttributeName";
|
||||
NSString *NSSuperscriptAttributeName = @"NSSuperscriptAttributeName";
|
||||
NSString *NSToolTipAttributeName = @"NSToolTipAttributeName";
|
||||
NSString *NSUnderlineColorAttributeName = @"NSUnderlineColorAttributeName";
|
||||
NSString *NSUnderlineStyleAttributeName = @"NSUnderlineStyleAttributeName";
|
||||
|
||||
|
||||
// NSToolbar notifications
|
||||
NSString *NSToolbarDidRemoveItemNotification = @"NSToolbarDidRemoveItemNotification";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue