// For gradient types
@@ -46,7 +46,7 @@ typedef enum {
FillStyleScale, /** The image is scaled to fit */
FillStyleRepeat, /** The image is tiled from bottom left */
FillStyleCenter /** The image is tiled from the center */
-} GSDrawFunctionsFillStyle;
+} GSThemeFillStyle;
/** Notification sent when a theme has just become active.
@@ -95,7 +95,7 @@ APPKIT_EXPORT NSString *GSThemeDidDeactivateNotification;
use the appropriate behavior.
*/
-@interface GSDrawFunctions : NSObject
+@interface GSTheme : NSObject
{
@private
NSBundle *_bundle;
@@ -109,14 +109,14 @@ APPKIT_EXPORT NSString *GSThemeDidDeactivateNotification;
* automatically when the user default which specifies the current
* theme (GSTheme) is updated.
*/
-+ (void) setTheme: (GSDrawFunctions*)theme;
++ (void) setTheme: (GSTheme*)theme;
/**
* Returns the currently active theme instance. This is the value most
* recently set using +setTheme: or (if none has been set) is a default
* instance of the base class.
*/
-+ (GSDrawFunctions*) theme;
++ (GSTheme*) theme;
/**
* This method is called automatically when the receiver is made into
@@ -173,7 +173,7 @@ APPKIT_EXPORT NSString *GSThemeDidDeactivateNotification;
/**
* Theme drawing methods
*/
-@interface GSDrawFunctions (Drawing)
+@interface GSTheme (Drawing)
/**
* Draws a button frame and background (not its content) for the specified
@@ -202,7 +202,7 @@ APPKIT_EXPORT NSString *GSThemeDidDeactivateNotification;
/**
* Helper functions for drawing standard items.
*/
-@interface GSDrawFunctions (MidLevelDrawing)
+@interface GSTheme (MidLevelDrawing)
/** Draw a standard button */
- (NSRect) drawButton: (NSRect)border withClip: (NSRect)clip;
@@ -238,7 +238,7 @@ APPKIT_EXPORT NSString *GSThemeDidDeactivateNotification;
* Low level drawiong methods ... themes may use these for drawing,
* but should not normally override them.
*/
-@interface GSDrawFunctions (LowLevelDrawing)
+@interface GSTheme (LowLevelDrawing)
/**
* Method to tile the supplied image to fill the horizontal rectangle.
*/
@@ -269,7 +269,7 @@ withRepeatedImage: (NSImage*)image
- (void) fillRect: (NSRect)rect
withTiles: (GSDrawTiles*)tiles
background: (NSColor*)color
- fillStyle: (GSDrawFunctionsFillStyle)style;
+ fillStyle: (GSThemeFillStyle)style;
/**
* Method to tile the supplied image to fill the vertical rectangle.
@@ -280,30 +280,4 @@ withRepeatedImage: (NSImage*)image
flipped: (BOOL)flipped;
@end
-
-/**
- * Deprecated methods ... do not use
- */
-@interface GSDrawFunctions (deprecated)
-+ (NSRect) drawButton: (NSRect)border : (NSRect)clip;
-+ (NSRect) drawDarkBezel: (NSRect)border : (NSRect)clip;
-+ (NSRect) drawDarkButton: (NSRect)border : (NSRect)clip;
-+ (NSRect) drawLightBezel: (NSRect)border : (NSRect)clip;
-+ (NSRect) drawGradientBorder: (NSGradientType)gradientType
- inRect: (NSRect)border
- withClip: (NSRect)clip;
-+ (NSRect) drawGrayBezel: (NSRect)border : (NSRect)clip;
-+ (NSRect) drawGroove: (NSRect)border : (NSRect)clip;
-+ (NSRect) drawFramePhoto: (NSRect)border : (NSRect)clip;
-+ (NSRect) drawWhiteBezel: (NSRect)border : (NSRect)clip;
-- (NSRect) drawButton: (NSRect)border : (NSRect)clip;
-- (NSRect) drawDarkBezel: (NSRect)border : (NSRect)clip;
-- (NSRect) drawDarkButton: (NSRect)border : (NSRect)clip;
-- (NSRect) drawFramePhoto: (NSRect)border : (NSRect)clip;
-- (NSRect) drawGrayBezel: (NSRect)border : (NSRect)clip;
-- (NSRect) drawGroove: (NSRect)border : (NSRect)clip;
-- (NSRect) drawLightBezel: (NSRect)border : (NSRect)clip;
-- (NSRect) drawWhiteBezel: (NSRect)border : (NSRect)clip;
-@end
-
-#endif /* _GNUstep_H_GSDrawFunctions */
+#endif /* _GNUstep_H_GSTheme */
diff --git a/Source/DocMakefile b/Source/DocMakefile
index 249ab28ae..387970895 100644
--- a/Source/DocMakefile
+++ b/Source/DocMakefile
@@ -148,7 +148,7 @@ NSWorkspace.h
AUTOGSDOC_HEADERS_GUIADD = \
GSDisplayServer.h \
-GSDrawFunctions.h \
+GSTheme.h \
GSFusedSilica.h \
GSTable.h \
GSHbox.h \
diff --git a/Source/GNUmakefile b/Source/GNUmakefile
index 5c595f03f..5e917ef73 100644
--- a/Source/GNUmakefile
+++ b/Source/GNUmakefile
@@ -177,7 +177,7 @@ GSServicesManager.m \
tiff.m \
externs.m \
linking.m \
-GSDrawFunctions.m \
+GSTheme.m \
GSDragView.m \
GSFontInfo.m \
GSTable.m \
@@ -354,7 +354,7 @@ GUI_HEADERS = \
GSVersion.h \
GMAppKit.h \
GMArchiver.h \
-GSDrawFunctions.h \
+GSTheme.h \
GSFontInfo.h \
GSMemoryPanel.h \
GSInfoPanel.h \
diff --git a/Source/GSDrawFunctions.m b/Source/GSTheme.m
similarity index 90%
rename from Source/GSDrawFunctions.m
rename to Source/GSTheme.m
index 706bc3489..461a0cf42 100644
--- a/Source/GSDrawFunctions.m
+++ b/Source/GSTheme.m
@@ -1,4 +1,4 @@
-/**
GSDrawFunctions
+/** GSTheme
Useful/configurable drawing functions
@@ -32,7 +32,7 @@
#include "Foundation/NSNull.h"
#include "Foundation/NSPathUtilities.h"
#include "Foundation/NSUserDefaults.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
#include "AppKit/NSColor.h"
#include "AppKit/NSColorList.h"
#include "AppKit/NSGraphics.h"
@@ -58,7 +58,7 @@ typedef enum {
TileBL = 6, /** Bottom left corner */
TileBM = 7, /** Bottom middle section */
TileBR = 8 /** Bottom right corner */
-} GSDrawFunctionsTileOffset;
+} GSThemeTileOffset;
/** This is a trivial class to hold the nine tiles needed to draw a rectangle
*/
@@ -113,7 +113,7 @@ typedef enum {
}
@end
-@interface GSDrawFunctions (internal)
+@interface GSTheme (internal)
/**
* Called whenever user defaults are changed ... this checks for the
* GSTheme user default and ensures that the specified theme is the
@@ -131,10 +131,10 @@ typedef enum {
@end
-@implementation GSDrawFunctions
+@implementation GSTheme
-static GSDrawFunctions *defaultTheme = nil;
-static GSDrawFunctions *theTheme = nil;
+static GSTheme *defaultTheme = nil;
+static GSTheme *theTheme = nil;
static NSString *theThemeName = nil;
static NSMutableDictionary *themes = nil;
static NSNull *null = nil;
@@ -181,7 +181,7 @@ static NSNull *null = nil;
{
NSBundle *bundle;
Class cls;
- GSDrawFunctions *instance;
+ GSTheme *instance;
NSString *theme;
if ([aName length] == 0)
@@ -249,7 +249,7 @@ static NSNull *null = nil;
return YES;
}
-+ (void) setTheme: (GSDrawFunctions*)theme
++ (void) setTheme: (GSTheme*)theme
{
if (theme == nil)
{
@@ -263,7 +263,7 @@ static NSNull *null = nil;
}
}
-+ (GSDrawFunctions*) theme
++ (GSTheme*) theme
{
return theTheme;
}
@@ -395,7 +395,7 @@ static NSNull *null = nil;
@end
-@implementation GSDrawFunctions (Drawing)
+@implementation GSTheme (Drawing)
- (NSRect) drawButton: (NSRect) frame
in: (NSButtonCell*) cell
@@ -413,19 +413,19 @@ static NSNull *null = nil;
{
[[NSColor controlBackgroundColor] set];
NSRectFill(frame);
- [GSDrawFunctions drawButton: frame : NSZeroRect];
+ [self drawButton: frame withClip: NSZeroRect];
}
else if (state == 1) /* highlighted state */
{
[[NSColor selectedControlColor] set];
NSRectFill(frame);
- [GSDrawFunctions drawGrayBezel: frame : NSZeroRect];
+ [self drawGrayBezel: frame withClip: NSZeroRect];
}
else if (state == 2) /* pushed state */
{
[[NSColor selectedControlColor] set];
NSRectFill(frame);
- [GSDrawFunctions drawGrayBezel: frame : NSZeroRect];
+ [self drawGrayBezel: frame withClip: NSZeroRect];
interiorFrame
= NSOffsetRect(interiorFrame, 1.0, [view isFlipped] ? 1.0 : -1.0);
}
@@ -453,7 +453,7 @@ static NSNull *null = nil;
-@implementation GSDrawFunctions (MidLevelDrawing)
+@implementation GSTheme (MidLevelDrawing)
- (NSRect) drawButton: (NSRect)border withClip: (NSRect)clip
{
@@ -711,7 +711,7 @@ static NSNull *null = nil;
-@implementation GSDrawFunctions (LowLevelDrawing)
+@implementation GSTheme (LowLevelDrawing)
- (void) fillHorizontalRect: (NSRect)rect
withImage: (NSImage*)image
@@ -782,7 +782,7 @@ withRepeatedImage: (NSImage*)image
- (void) fillRect: (NSRect)rect
withTiles: (GSDrawTiles*)tiles
background: (NSColor*)color
- fillStyle: (GSDrawFunctionsFillStyle)style
+ fillStyle: (GSThemeFillStyle)style
{
NSGraphicsContext *ctxt = GSCurrentContext();
NSSize tls = tiles->rects[TileTL].size;
@@ -1026,80 +1026,3 @@ withRepeatedImage: (NSImage*)image
@end
-
-
-@implementation GSDrawFunctions (deprecated)
-+ (NSRect) drawButton: (NSRect)border : (NSRect)clip
-{
- return [[self theme] drawButton: border : clip];
-}
-+ (NSRect) drawDarkButton: (NSRect)border : (NSRect)clip
-{
- return [[self theme] drawDarkButton: border : clip];
-}
-+ (NSRect) drawDarkBezel: (NSRect)border : (NSRect)clip
-{
- return [[self theme] drawDarkBezel: border : clip];
-}
-+ (NSRect) drawLightBezel: (NSRect)border : (NSRect)clip
-{
- return [[self theme] drawLightBezel: border : clip];
-}
-+ (NSRect) drawWhiteBezel: (NSRect)border : (NSRect)clip
-{
- return [[self theme] drawWhiteBezel: border : clip];
-}
-+ (NSRect) drawGrayBezel: (NSRect)border : (NSRect)clip
-{
- return [[self theme] drawGrayBezel: border : clip];
-}
-+ (NSRect) drawGroove: (NSRect)border : (NSRect)clip
-{
- return [[self theme] drawGroove: border : clip];
-}
-+ (NSRect) drawFramePhoto: (NSRect)border : (NSRect)clip
-{
- return [[self theme] drawFramePhoto: border : clip];
-}
-+ (NSRect) drawGradientBorder: (NSGradientType)gradientType
- inRect: (NSRect)border
- withClip: (NSRect)clip
-{
- return [[self theme] drawGradientBorder: gradientType
- inRect: border
- withClip: clip];
-}
-- (NSRect) drawButton: (NSRect)border : (NSRect)clip
-{
- return [self drawButton: border withClip: clip];
-}
-- (NSRect) drawDarkButton: (NSRect)border : (NSRect)clip
-{
- return [self drawDarkButton: border withClip: clip];
-}
-- (NSRect) drawDarkBezel: (NSRect)border : (NSRect)clip
-{
- return [self drawDarkBezel: border withClip: clip];
-}
-- (NSRect) drawLightBezel: (NSRect)border : (NSRect)clip
-{
- return [self drawLightBezel: border withClip: clip];
-}
-- (NSRect) drawWhiteBezel: (NSRect)border : (NSRect)clip
-{
- return [self drawWhiteBezel: border withClip: clip];
-}
-- (NSRect) drawGrayBezel: (NSRect)border : (NSRect)clip
-{
- return [self drawGrayBezel: border withClip: clip];
-}
-- (NSRect) drawGroove: (NSRect)border : (NSRect)clip
-{
- return [self drawGroove: border withClip: clip];
-}
-- (NSRect) drawFramePhoto: (NSRect)border : (NSRect)clip
-{
- return [self drawFramePhoto: border withClip: clip];
-}
-@end
-
diff --git a/Source/GSTitleView.m b/Source/GSTitleView.m
index d6f0b4260..09b53d953 100644
--- a/Source/GSTitleView.m
+++ b/Source/GSTitleView.m
@@ -37,7 +37,7 @@
#include
#include
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
@implementation GSTitleView
@@ -195,7 +195,7 @@
- (void) drawRect: (NSRect)rect
{
- GSDrawFunctions *theme = [GSDrawFunctions theme];
+ GSTheme *theme = [GSTheme theme];
NSRect workRect = [self bounds];
NSSize titleSize;
NSRectEdge top_left[] = {NSMinXEdge, NSMaxYEdge};
diff --git a/Source/GSWindowDecorationView.m b/Source/GSWindowDecorationView.m
index 9096ac3fa..58316e870 100644
--- a/Source/GSWindowDecorationView.m
+++ b/Source/GSWindowDecorationView.m
@@ -30,7 +30,7 @@
#include "AppKit/NSColor.h"
#include "AppKit/NSWindow.h"
#include "GNUstepGUI/GSDisplayServer.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
struct NSWindow_struct
@@ -218,7 +218,7 @@ struct NSWindow_struct
{
if (NSIntersectsRect(rect, contentRect))
{
- [[GSDrawFunctions theme] drawWindowBackground: contentRect view: self];
+ [[GSTheme theme] drawWindowBackground: contentRect view: self];
}
}
diff --git a/Source/NSBox.m b/Source/NSBox.m
index 7ab474644..037fe6bbb 100644
--- a/Source/NSBox.m
+++ b/Source/NSBox.m
@@ -38,7 +38,7 @@
#include "AppKit/NSGraphics.h"
#include "AppKit/NSTextFieldCell.h"
#include "AppKit/NSWindow.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
#include
@@ -445,10 +445,10 @@
NSFrameRect(_border_rect);
break;
case NSBezelBorder:
- [GSDrawFunctions drawDarkBezel: _border_rect : rect];
+ [[GSTheme theme] drawDarkBezel: _border_rect withClip: rect];
break;
case NSGrooveBorder:
- [GSDrawFunctions drawGroove: _border_rect : rect];
+ [[GSTheme theme] drawGroove: _border_rect withClip: rect];
break;
}
diff --git a/Source/NSBrowser.m b/Source/NSBrowser.m
index 923adacdd..4a5fe0e43 100644
--- a/Source/NSBrowser.m
+++ b/Source/NSBrowser.m
@@ -52,7 +52,7 @@
#include "AppKit/NSEvent.h"
#include "AppKit/NSWindow.h"
#include "AppKit/NSBezierPath.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
DEFINE_RINT_IF_MISSING
@@ -206,7 +206,7 @@ static NSTextFieldCell *titleCell;
return;
}
- [GSDrawFunctions drawGrayBezel: cellFrame : NSZeroRect];
+ [[GSTheme theme] drawGrayBezel: cellFrame withClip: NSZeroRect];
[self drawInteriorWithFrame: cellFrame inView: controlView];
}
@end
@@ -2219,7 +2219,7 @@ static NSTextFieldCell *titleCell;
if ((NSIntersectsRect (scrollerBorderRect, rect) == YES) && _window)
{
- [GSDrawFunctions drawGrayBezel: scrollerBorderRect : rect];
+ [[GSTheme theme] drawGrayBezel: scrollerBorderRect withClip: rect];
}
}
@@ -2230,7 +2230,7 @@ static NSTextFieldCell *titleCell;
float hScrollerWidth = _hasHorizontalScroller ? scrollerWidth : 0;
// Columns borders
- [GSDrawFunctions drawGrayBezel: _bounds : rect];
+ [[GSTheme theme] drawGrayBezel: _bounds withClip: rect];
[[NSColor blackColor] set];
visibleColumns = [self numberOfVisibleColumns];
diff --git a/Source/NSButtonCell.m b/Source/NSButtonCell.m
index e172394f5..3c9bff6c3 100644
--- a/Source/NSButtonCell.m
+++ b/Source/NSButtonCell.m
@@ -51,7 +51,7 @@
#include "AppKit/NSImage.h"
#include "AppKit/NSSound.h"
#include "AppKit/NSWindow.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
#include "GNUstepGUI/GSNibCompatibility.h"
#include
@@ -890,7 +890,7 @@ typedef struct _GSButtonCellFlags
if ((_cell.is_bordered)
&& (!_shows_border_only_while_mouse_inside || _mouse_inside))
{
- cellFrame = [[GSDrawFunctions theme]
+ cellFrame = [[GSTheme theme]
drawButton: cellFrame in: self view: controlView
style: _bezel_style
state: buttonState];
@@ -902,7 +902,7 @@ typedef struct _GSButtonCellFlags
if (_cell.shows_first_responder
&& [[controlView window] firstResponder] == controlView)
{
- [[GSDrawFunctions theme] drawFocusFrame: cellFrame view: controlView];
+ [[GSTheme theme] drawFocusFrame: cellFrame view: controlView];
}
}
diff --git a/Source/NSCell.m b/Source/NSCell.m
index 6f31182ab..c9a56b774 100644
--- a/Source/NSCell.m
+++ b/Source/NSCell.m
@@ -60,7 +60,7 @@
#include "AppKit/NSTextContainer.h"
#include "AppKit/NSView.h"
#include "AppKit/NSWindow.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
static Class colorClass;
static Class cellClass;
@@ -1937,7 +1937,7 @@ static NSColor *shadowCol;
}
else if (_cell.is_bezeled)
{
- [GSDrawFunctions drawWhiteBezel: cellFrame : NSZeroRect];
+ [[GSTheme theme] drawWhiteBezel: cellFrame withClip: NSZeroRect];
}
[self drawInteriorWithFrame: cellFrame inView: controlView];
diff --git a/Source/NSColor.m b/Source/NSColor.m
index 470c55d28..35a2286ca 100644
--- a/Source/NSColor.m
+++ b/Source/NSColor.m
@@ -45,7 +45,7 @@
#include "AppKit/NSImage.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/PSOperators.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
static Class NSColorClass;
diff --git a/Source/NSColorWell.m b/Source/NSColorWell.m
index 8f2c4e109..0aa2cc0b0 100644
--- a/Source/NSColorWell.m
+++ b/Source/NSColorWell.m
@@ -37,7 +37,7 @@
#include "AppKit/NSGraphics.h"
#include "AppKit/NSPasteboard.h"
#include "AppKit/NSWindow.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
#include
#include
@@ -176,7 +176,7 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
/*
* Draw border.
*/
- [GSDrawFunctions drawButton: aRect : clipRect];
+ [[GSTheme theme] drawButton: aRect withClip: clipRect];
/*
* Fill in control color.
@@ -213,7 +213,7 @@ static NSString *GSColorWellDidBecomeExclusiveNotification =
/*
* Draw inner frame.
*/
- [GSDrawFunctions drawGrayBezel: aRect : clipRect];
+ [[GSTheme theme] drawGrayBezel: aRect withClip: clipRect];
aRect = NSInsetRect(aRect, 2.0, 2.0);
}
diff --git a/Source/NSComboBoxCell.m b/Source/NSComboBoxCell.m
index 5d90503c5..cba121de4 100644
--- a/Source/NSComboBoxCell.m
+++ b/Source/NSComboBoxCell.m
@@ -50,7 +50,7 @@
#include "AppKit/NSTableColumn.h"
#include "AppKit/NSTableView.h"
#include "AppKit/NSTextView.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
static NSNotificationCenter *nc;
static const BOOL ForceBrowser = NO;
diff --git a/Source/NSFormCell.m b/Source/NSFormCell.m
index e72d2312d..cc2ece69d 100644
--- a/Source/NSFormCell.m
+++ b/Source/NSFormCell.m
@@ -34,7 +34,7 @@
#include "AppKit/NSFont.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/NSTextFieldCell.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
static NSColor *shadowCol;
@@ -361,7 +361,10 @@ static NSColor *shadowCol;
}
else if (_cell.is_bezeled)
{
- NSRect frame = [GSDrawFunctions drawWhiteBezel: borderedFrame : NSZeroRect];
+ NSRect frame;
+
+ frame = [[GSTheme theme] drawWhiteBezel: borderedFrame
+ withClip: NSZeroRect];
[[NSColor textBackgroundColor] set];
NSRectFill (frame);
}
diff --git a/Source/NSImageCell.m b/Source/NSImageCell.m
index 2677d4508..4c969701a 100644
--- a/Source/NSImageCell.m
+++ b/Source/NSImageCell.m
@@ -31,7 +31,7 @@
#include "AppKit/NSGraphics.h"
#include "AppKit/NSImageCell.h"
#include "AppKit/NSImage.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
@implementation NSImageCell
@@ -134,16 +134,16 @@
// nada
break;
case NSImageFramePhoto:
- [GSDrawFunctions drawFramePhoto: cellFrame : NSZeroRect];
+ [[GSTheme theme] drawFramePhoto: cellFrame withClip: NSZeroRect];
break;
case NSImageFrameGrayBezel:
- [GSDrawFunctions drawGrayBezel: cellFrame : NSZeroRect];
+ [[GSTheme theme] drawGrayBezel: cellFrame withClip: NSZeroRect];
break;
case NSImageFrameGroove:
- [GSDrawFunctions drawGroove: cellFrame : NSZeroRect];
+ [[GSTheme theme] drawGroove: cellFrame withClip: NSZeroRect];
break;
case NSImageFrameButton:
- [GSDrawFunctions drawButton: cellFrame : NSZeroRect];
+ [[GSTheme theme] drawButton: cellFrame withClip: NSZeroRect];
break;
}
diff --git a/Source/NSMenuItemCell.m b/Source/NSMenuItemCell.m
index da0dd5871..139b317df 100644
--- a/Source/NSMenuItemCell.m
+++ b/Source/NSMenuItemCell.m
@@ -42,7 +42,7 @@
#include "AppKit/NSMenuItemCell.h"
#include "AppKit/NSMenuView.h"
#include "AppKit/NSParagraphStyle.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
@implementation NSMenuItemCell
@@ -446,11 +446,11 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
if (_cell.is_highlighted && (_highlightsByMask & NSPushInCellMask))
{
- [GSDrawFunctions drawGrayBezel: cellFrame : NSZeroRect];
+ [[GSTheme theme] drawGrayBezel: cellFrame withClip: NSZeroRect];
}
else
{
- [GSDrawFunctions drawButton: cellFrame : NSZeroRect];
+ [[GSTheme theme] drawButton: cellFrame withClip: NSZeroRect];
}
}
@@ -710,7 +710,8 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
// pushed in buttons contents are displaced to the bottom right 1px
if (_cell.is_bordered && (mask & NSPushInCellMask))
{
- cellFrame = NSOffsetRect(cellFrame, 1., [controlView isFlipped] ? 1. : -1.);
+ cellFrame
+ = NSOffsetRect(cellFrame, 1., [controlView isFlipped] ? 1. : -1.);
}
/*
diff --git a/Source/NSProgressIndicator.m b/Source/NSProgressIndicator.m
index 5d8eaee09..641180094 100644
--- a/Source/NSProgressIndicator.m
+++ b/Source/NSProgressIndicator.m
@@ -27,7 +27,7 @@
#include "AppKit/NSProgressIndicator.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/NSWindow.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
#include "GNUstepGUI/GSNibCompatibility.h"
@implementation NSProgressIndicator
@@ -231,7 +231,7 @@ static NSColor *fillColour = nil;
if (_isBezeled)
{
// Calc the inside rect to be drawn
- r = [GSDrawFunctions drawGrayBezel: _bounds :rect];
+ r = [[GSTheme theme] drawGrayBezel: _bounds withClip: rect];
}
else
r = _bounds;
diff --git a/Source/NSScrollView.m b/Source/NSScrollView.m
index 58492db29..2b3856c68 100644
--- a/Source/NSScrollView.m
+++ b/Source/NSScrollView.m
@@ -40,7 +40,7 @@
#include "AppKit/NSTableView.h"
#include "AppKit/NSWindow.h"
#include "AppKit/PSOperators.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
//
// For nib compatibility, this is used to properly
@@ -951,11 +951,11 @@ static float scrollerWidth;
break;
case NSBezelBorder:
- [GSDrawFunctions drawGrayBezel: _bounds : rect];
+ [[GSTheme theme] drawGrayBezel: _bounds : rect];
break;
case NSGrooveBorder:
- [GSDrawFunctions drawGroove: _bounds : rect];
+ [[GSTheme theme] drawGroove: _bounds : rect];
break;
}
diff --git a/Source/NSStepperCell.m b/Source/NSStepperCell.m
index 4e9d0d005..429991108 100644
--- a/Source/NSStepperCell.m
+++ b/Source/NSStepperCell.m
@@ -36,7 +36,7 @@
#include "AppKit/NSStepperCell.h"
#include "AppKit/NSWindow.h"
#include "AppKit/PSOperators.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
// Hard coded values for button sizes
#define STEPPER_WIDTH 15
@@ -144,7 +144,7 @@ static inline NSRect DrawLightButton(NSRect border, NSRect clip)
{
/*
NSRect highlightRect = NSInsetRect(border, 1., 1.);
- [GSDrawFunctions drawButton: border : clip];
+ [[GSTheme theme] drawButton: border : clip];
return highlightRect;
*/
NSRectEdge up_sides[] = {NSMaxXEdge, NSMinYEdge,
diff --git a/Source/NSTabView.m b/Source/NSTabView.m
index fd9d7147a..9b0adc5e4 100644
--- a/Source/NSTabView.m
+++ b/Source/NSTabView.m
@@ -35,7 +35,7 @@
#include "AppKit/NSTabView.h"
#include "AppKit/NSTabViewItem.h"
#include "AppKit/PSOperators.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
@implementation NSTabView
@@ -365,7 +365,7 @@
- (void) drawRect: (NSRect)rect
{
NSGraphicsContext *ctxt = GSCurrentContext();
- GSDrawFunctions *theme = [GSDrawFunctions theme];
+ GSTheme *theme = [GSTheme theme];
int howMany = [_items count];
int i;
NSRect previousRect = NSMakeRect(0, 0, 0, 0);
diff --git a/Source/NSTableHeaderCell.m b/Source/NSTableHeaderCell.m
index 239e129f8..03aa38d79 100644
--- a/Source/NSTableHeaderCell.m
+++ b/Source/NSTableHeaderCell.m
@@ -26,7 +26,7 @@
#include "AppKit/NSTableHeaderCell.h"
#include "AppKit/NSColor.h"
#include "AppKit/NSFont.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
@implementation NSTableHeaderCell
{
@@ -66,11 +66,11 @@
if (_cell.is_highlighted == YES)
{
- [GSDrawFunctions drawButton: cellFrame : cellFrame];
+ [[GSTheme theme] drawButton: cellFrame withClip: cellFrame];
}
else
{
- [GSDrawFunctions drawDarkButton: cellFrame : cellFrame];
+ [[GSTheme theme] drawDarkButton: cellFrame withClip: cellFrame];
}
[self drawInteriorWithFrame: cellFrame inView: controlView];
diff --git a/Source/NSTableView.m b/Source/NSTableView.m
index 6115c33b5..08193142f 100644
--- a/Source/NSTableView.m
+++ b/Source/NSTableView.m
@@ -59,7 +59,7 @@
#include "AppKit/NSPasteboard.h"
#include "AppKit/NSDragging.h"
#include "AppKit/NSCustomImageRep.h"
-#include "GNUstepGUI/GSDrawFunctions.h"
+#include "GNUstepGUI/GSTheme.h"
#include
static NSNotificationCenter *nc = nil;
@@ -1928,7 +1928,7 @@ static void computeNewSelection
[[NSColor blackColor] set];
NSRectFill (divide);
- rect = [GSDrawFunctions drawDarkButton: rect :aRect];
+ rect = [[GSTheme theme] drawDarkButton: rect withClip: aRect];
[[NSColor controlShadowColor] set];
NSRectFill (rect);
}