mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:00:37 +00:00
Add new MacOSX methods. Code mostly by Nikolaus Schaller.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25270 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
86d97a419f
commit
4835a35c1c
21 changed files with 831 additions and 84 deletions
|
@ -38,7 +38,17 @@
|
|||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSAttributedString.h>
|
||||
#include <Foundation/NSGeometry.h>
|
||||
#include <AppKit/NSAttributedString.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
typedef enum
|
||||
{
|
||||
NSStringDrawingUsesLineFragmentOrigin=0x01,
|
||||
NSStringDrawingUsesFontLeading=0x02,
|
||||
NSStringDrawingDisableScreenFontSubstitution=0x04,
|
||||
NSStringDrawingUsesDeviceMetrics=0x08,
|
||||
NSStringDrawingOneShot=0x10
|
||||
} NSStringDrawingOptions;
|
||||
#endif
|
||||
|
||||
@interface NSString (NSStringDrawing)
|
||||
|
||||
|
@ -46,6 +56,15 @@
|
|||
- (void) drawInRect: (NSRect)rect withAttributes: (NSDictionary*)attrs;
|
||||
- (NSSize) sizeWithAttributes: (NSDictionary*)attrs;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (NSRect) boundingRectWithSize: (NSSize)size
|
||||
options: (NSStringDrawingOptions)options
|
||||
attributes: (NSDictionary *)attributes;
|
||||
- (void) drawWithRect: (NSRect)rect
|
||||
options: (NSStringDrawingOptions)options
|
||||
attributes: (NSDictionary *)attributes;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@interface NSAttributedString (NSStringDrawing)
|
||||
|
@ -54,6 +73,13 @@
|
|||
- (void) drawAtPoint: (NSPoint)point;
|
||||
- (void) drawInRect: (NSRect)rect;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (NSRect) boundingRectWithSize: (NSSize)size
|
||||
options: (NSStringDrawingOptions)options;
|
||||
- (void) drawWithRect: (NSRect)rect
|
||||
options: (NSStringDrawingOptions)options;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue