mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
theme reorganisation/tidy up
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23586 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c7ab1a2a90
commit
ed5990f599
24 changed files with 116 additions and 182 deletions
33
ChangeLog
33
ChangeLog
|
@ -1,3 +1,36 @@
|
|||
2006-09-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSDrawFunctions.h:
|
||||
* Headers/Additions/GNUstepGUI/GSTheme.h:
|
||||
* Source/GSDrawFunctions.m:
|
||||
* Source/GSTheme.m:
|
||||
Renamed file.
|
||||
* Source/NSBrowser.m:
|
||||
* Source/NSTableHeaderCell.m:
|
||||
* Source/GSWindowDecorationView.m:
|
||||
* Source/NSImageCell.m:
|
||||
* Source/NSBox.m:
|
||||
* Source/GNUmakefile:
|
||||
* Source/NSFormCell.m:
|
||||
* Source/NSButtonCell.m:
|
||||
* Source/NSColorWell.m:
|
||||
* Source/NSColor.m:
|
||||
* Source/NSMenuItemCell.m:
|
||||
* Source/GSTitleView.m:
|
||||
* Source/NSProgressIndicator.m:
|
||||
* Source/DocMakefile:
|
||||
* Source/NSComboBoxCell.m:
|
||||
* Source/NSStepperCell.m:
|
||||
* Source/NSScrollView.m:
|
||||
* Source/NSTabView.m:
|
||||
* Source/NSCell.m:
|
||||
* Source/NSTableView.m:
|
||||
* Documentation/GuiAdditions.gsdoc:
|
||||
Update for rename of 'GSDrawFunctions to GSTheme.
|
||||
Change all class based access to drawing methods to go via current
|
||||
instance.
|
||||
Remove all class based versions of drawing methods.
|
||||
|
||||
2006-09-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSWindowDecorationView.m: Merge in theme branch changes.
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</p>
|
||||
<list>
|
||||
<item><uref url="GSDisplayServer.html">GSDisplayServer</uref></item>
|
||||
<item><uref url="GSDrawFunctions.html">GSDrawFunctions</uref></item>
|
||||
<item><uref url="GSTheme.html">GSTheme</uref></item>
|
||||
<item><uref url="GSHbox.html">GSHbox</uref></item>
|
||||
<item><uref url="GSTable.html">GSTable</uref></item>
|
||||
<item><uref url="GSVbox.html">GSVbox</uref></item>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** <title>GSDrawFunctions</title>
|
||||
/** <title>GSTheme</title>
|
||||
|
||||
<abstract>Useful/configurable drawing functions</abstract>
|
||||
|
||||
|
@ -26,8 +26,8 @@
|
|||
Boston, MA 02111 USA.
|
||||
*/
|
||||
|
||||
#ifndef _GNUstep_H_GSDrawFunctions
|
||||
#define _GNUstep_H_GSDrawFunctions
|
||||
#ifndef _GNUstep_H_GSTheme
|
||||
#define _GNUstep_H_GSTheme
|
||||
|
||||
#include <Foundation/NSGeometry.h>
|
||||
// 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.
|
||||
</p>
|
||||
*/
|
||||
@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;
|
||||
|
||||
/**
|
||||
* <p>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 */
|
|
@ -148,7 +148,7 @@ NSWorkspace.h
|
|||
|
||||
AUTOGSDOC_HEADERS_GUIADD = \
|
||||
GSDisplayServer.h \
|
||||
GSDrawFunctions.h \
|
||||
GSTheme.h \
|
||||
GSFusedSilica.h \
|
||||
GSTable.h \
|
||||
GSHbox.h \
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/** <title>GSDrawFunctions</title>
|
||||
/** <title>GSTheme</title>
|
||||
|
||||
<abstract>Useful/configurable drawing functions</abstract>
|
||||
|
||||
|
@ -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
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
#include <Foundation/NSDebug.h>
|
||||
#include <Foundation/NSRunLoop.h>
|
||||
|
||||
#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};
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <math.h>
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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 <math.h>
|
||||
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 <Foundation/NSDebug.h>
|
||||
#include <Foundation/NSNotification.h>
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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 <math.h>
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue