Up

GSTheme

Authors

Adam Fedor (fedor@gnu.org)
Richard Frith-Macdonald (rfm@gnu.org)

Date: Generated at 2023-12-22 15:07:59 -0500

Useful/configurable drawing functions

Copyright: (C) 2004-2023 Free Software Foundation, Inc.


Contents -

  1. The theme management system
  2. Types of theming
  3. Subclassing GSTheme
  4. Software documentation for the GSPageLayout class
  5. Software documentation for the GSPrintPanel class
  6. Software documentation for the GSTheme class
  7. Software documentation for the GSTheme(Drawing) category
  8. Software documentation for the GSTheme(LowLevelDrawing) category
  9. Software documentation for the GSTheme(Menus) category
  10. Software documentation for the GSTheme(MidLevelDrawing) category
  11. Software documentation for the GSTheme(NSBrowserCell) category
  12. Software documentation for the GSTheme(NSWindow) category
  13. Software documentation for the GSTheme(OpenSavePanels) category
  14. Software documentation for the GSTheme(PrintPanels) category

The theme management system

The theme management system for the GNUstep GUI is based around the GSTheme class, which provides support for loading of theme bundles and methods for drawing common user interface elements.
The theme system works in conjunction with a variety of other GUI classes and is intended to eventually allow for very major changes in GUI appearance and behavior.

Various design imperatives apply to the theme system, but probably the key ones are:

To attain these aims implies the recognition of some more specific objectives and some possible technical solutions:

Types of theming

There are various aspects of theming which can be treated pretty much separately, so there is no reason why a theme might not be created which just employs one of these mechanisms.

System images
Possibly the simples theme change... a theme might supply a new set of system images used for arrows and other icons that the GUI decorates controls with.
System colors
A theme might simply define a new system color list, so that controls are drawn in a new color range, though they would still function the same way. Even specifying new colors can make the GUI look quite different though.
Beyond system colors, the theming API also provides a mechanism for specifying colors for particular parts of GUI controls.
Image tiling
Controls might be given sets of images used as tiling to draw themselves rather than using the standard line drawing and color fill mechanisms.
Interface style
A theme might supply a set of interface style keys for various controls, defining how those controls should behave subject to the limitation of the range of behaviors coded into the GUI library.
Method override
A theme might actually provide code, in the form of a subclass of GSTheme such that drawing methods have completely custom behavior.

Subclassing GSTheme

While many themes can be created without subclassing GSTheme, there are some cases where writing code is necessary (most notably when interfacing to a native theming engine for some platform in order to make a GNUstep app have a native look).
In these cases the subclass should follow certain rules in order to operate cleanly and efficiently:

Stability
Theme operation should remain consistent while it is in use, particularly in the provision of resources such as images and colors.
If a theme needs to change a resource (such as an image) then it should do so by calling -deactivate , making the change, and then calling -activate . This sequence ensures that the GUI library is made aware of any changes and can redraw the screen.
The deactivation/activation sequence is expensive, so the subclass should attempt to combine multiple resource updates into a group rather than performing the deactivation/activation for each resource individually.
Activation
The standard -activate method replaces existing system images, colors, interface style settings and other user defaults settings with versions stored in the theme bundle.
If a subclass wishes to dynamically provide these resources rather than supplying them as static information in the bundle, it may update the in-memory information after the normal operation has taken place. This should be done by the theme registering itsself as an observer of GSThemeWillActivateNotification and adding the resources just before the theme becomes active.
Cleanup may be done in response to a GSThemeWillDeactivateNotification (called before the default cleanup) or a GSThemeDidDeactivateNotification (called after the default cleanup).
Versioning
With a theme which contains only static resources, versioning is not much of an issue, but with a code-based theme (ie where you subclass GSTheme) versioning does become very important. This is because, while you can load code from a bundle, you can't unload it again... so if you have two versions of a theme where the subclass has the same name, then you have a conflict and can't load both and swap between the two.
Thematic.app solves this problem my incorporating a version number into the name of the GSTheme subclasses it creates, but that's not the only consideration...
You must also ensure that either you do not define any other classes in your theme or that, if you do define them you make sure that each of them incorporates the theme version number.
A similar consideration would apply to any categories, however category conflicts are far more difficult to resolve since even with different version names of the categories, the categories all effect the same class/methods. In fact this issue is so tricky to deal with that you should simply not use categories within your theme code.
To work around this limitation, the GSTheme class supports overriding of the methods of any other class while the theme is active. See the -overriddenMethod:for: method for more information.
Image override
System images (those returned by the [NSImage +imageNamed:] method) are handled by the default theming mechanism, for each system image supplied in the theme bundle, the image is loaded from the bundle and used while the theme is active. Any pre-existing in-memory image is saved on theme activation and restored on theme deactivation.
A theme subclass may override the -imageClass method to change the class used to load each image from the bundle... thus allowing customisation of not just the images but also of the image behavior in the (very rare) cases where this is desirable.
Finally, a theme may provide application specific images which are loaded in preference to named images from the application's own bundle. These images are simply stored in a subdirectory whose name is the same as the application's bundleIdentifier.

Software documentation for the GSPageLayout class

GSPageLayout : NSPageLayout

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

Software documentation for the GSPrintPanel class

GSPrintPanel : NSPrintPanel

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

Software documentation for the GSTheme class

GSTheme : NSObject

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

This interface is HIGHLY unstable and incomplete at present.

This is a class used for 'theming', which is mostly a matter of encapsulating common drawing behaviors so that GUI appearance can be easily modified, but also includes mechanisms for altering some GUI behavior (such as orientation and position of menus).

Methods in this class standardize drawing of buttons, borders and other common GUI elements, so that all other classes within the GUI will provide a consistent appearance by using these methods.

The default implementation uses the standard configurable colors defined in NSColor, such as controlLightHighlightColor, controlShadowColor and controlDarkShadowColor.
Themes are expected to override the default system color list with their own versions, and this class cooperates with NSColor and NSColorList to establish the correct system color list when a theme is activated.

The class provides a mechanism for automatic loading of theme bundles consisting of resources used to define how drawing is done, plus an optional binary subclass of this class (to replace/extend the drawing methods this class provides).

In future this class should provide mechanisms to draw controls by tiling of images, and provide control over GUI behavior by controlling the values returned by NSInterfaceStyleForKey() so that controls use the appropriate behavior.

Method summary

loadThemeNamed: 

+ (GSTheme*) loadThemeNamed: (NSString*)themeName;
Availability: Not in OpenStep/MacOS-X

Loads a theme from a theme bundle of the specified name, which may be either a full path name of the theme bundle, or a simple theme name (in which case the standard directories are searched for it) or nil (in which case the default GNUstep theme is returned).
Returns the loaded theme but does not make it the current theme, to do that you will need to call the +setTheme: method.

orderFrontSharedThemePanel: 

+ (void) orderFrontSharedThemePanel: (id)sender;
Availability: Not in OpenStep/MacOS-X

Creates and displays a panel allowing selection of different themes and display of the current theme inspector.

setTheme: 

+ (void) setTheme: (GSTheme*)theme;
Availability: Not in OpenStep/MacOS-X

Set the currently active theme to be the instance specified.
You do not normally need to call this method as it is called automatically when the user default which specifies the current theme (GSTheme) is updated.

theme 

+ (GSTheme*) theme;
Availability: Not in OpenStep/MacOS-X

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.

activate 

- (void) activate;
Availability: Not in OpenStep/MacOS-X

This method is called automatically when the receiver is made into the currently active theme by the +setTheme: method. Subclasses may override it to perform startup operations, however, the method is not really intended to be overridden, and subclasses should generally handle activation work in response to the GSThemeWillActivatenotification posted by this method.

The base implementation handles setup and caching of the system color list, standard image information, tiling information, and user defaults.
It then sends a GSThemeWillActivateNotification to allow subclasses to perform further activation work, and a GSThemeDidActivateNotification to allow other parts of the GUI library to update themselves from the new theme.

Finally, this method marks all windows in the application as needing update... so they will draw themselves with the new theme information.

NB. If a GSTheme subclass is integrating to an external native theming mechanism in order to make GNUstep apps look like native apps, then the external theme may change dynamically and the GSTheme subclass may need to change the GNUstep application to reflect this change. When this happens, the update should be handled by the subclass calling -deactivate and then -activate to make the changes 'live'.


authors 

- (NSArray*) authors;
Availability: Not in OpenStep/MacOS-X

Returns the names of the theme's authors.

bundle 

- (NSBundle*) bundle;
Availability: Not in OpenStep/MacOS-X

Return the bundle containing the resources used by the current theme.

colorClass 

- (Class) colorClass;
Availability: Not in OpenStep/MacOS-X

Returns the class used by the theme for loading color lists. The default implementation returns the NSColorList class, but a subclass may override this to return a color list class whose values change dynamically in response to changes of a native theming API for instance.
The class returned by this method should be NSColorList or one of its subclasses. Subclasses should note that GSTheme will initialise the instances of the class using the [NSColerList -initWithName:fromFile:] method.

colorFlush: state: 

- (void) colorFlush: (NSString*)aName state: (GSThemeControlState)elementState;
Availability: Not in OpenStep/MacOS-X

Removes the name from the color cache forcing it to be re-created next time the named color is required.
Passing nil for aName removes all named colors.
Passing a negative value for elementState applies to all caches.

colorNamed: state: 

- (NSColor*) colorNamed: (NSString*)aName state: (GSThemeControlState)elementState;
Availability: Not in OpenStep/MacOS-X

This returns the color for drawing the item whose name is aName in the specified state. If aName is nil or if there is no color defined for the particular combination of item name and state, the method returns nil.
The standard names used for the parts of various controls are declared in GSTheme.h
See also the -tilesNamed:state: method.

colors 

- (NSColorList*) colors;
Availability: Not in OpenStep/MacOS-X

Returns the system color list defined by the receiver.
The default implementation returns the color list provided in the theme bundle (if any) or the default system color list.

deactivate 

- (void) deactivate;
Availability: Not in OpenStep/MacOS-X

This method is called automatically when the receiver is stopped from being the currently active theme by the use of the +setTheme: method to make another theme active. Subclasses may override it to perform shutdown operations, but it is preferred for subclasses to perform their own deactivation in response to a GSThemeWillDeactivateNotification.

The base implementation sends a GSThemeWillDeactivateNotification to allow subclasses to perform cleanup, then restores image, color and default information to the state before the theme was activates, and finally sends a GSThemeDidDeactivateNotification to allow other parts of the GUI library to update themselves.

NB. If a GSTheme subclass is integrating to an external native theming mechanism in order to make GNUstep apps look like native apps, then the external theme may change dynamically and the GSTheme subclass may need to change the GNUstep application to reflect this change. When this happens, the update should be handled by the subclass calling -deactivate and then -activate to make the changes 'live'.


icon 

- (NSImage*) icon;
Availability: Not in OpenStep/MacOS-X

Returns the theme's icon.

imageClass 

- (Class) imageClass;
Availability: Not in OpenStep/MacOS-X

Returns the class used by the theme for loading images. The default implementation returns the NSImage class, but a subclass may override this to return an image class whose instances dynamically alter what they draw in response to changes of a native theming API for instance.
This method must return the NSImage class or one of its subclasses. Subclass implementations should note that instances will be initialised using the [NSImage -initWithContentsOfFile:] method and will use the [NSImage -imageFileTypes] method to determine which image files can be loaded.

infoDictionary 

- (NSDictionary*) infoDictionary;
Availability: Not in OpenStep/MacOS-X

Returns the info dictionary for this theme. In the base class implementation this is simply the info dictionary of the theme bundle, but subclasses may override this method to return extra or different information.

Keys found in this dictionary include:

GSThemeDomain
A dictionary whose key/value pairs are used to set up new values in the GSThemeDomain domain of the user defaults system, and hence define values for these unless overridden by values set explicitly by the user.
GSThemeTiles
A dictionary keyed on tile names and containing the following:
FileName
Name of the file (within the GSThemeTiles directory in the bundle) in which the image for this tile is stored.
HorizontalDivision
The offset along the X-axis used to divide the image into columns of tiles.
VerticalDivision
The offer along the Y-axis used to divide the image into rows of tiles.

initWithBundle: 

- (id) initWithBundle: (NSBundle*)bundle;
Availability: Not in OpenStep/MacOS-X

This is a designated initialiser for the class.
Initialise an instance of a theme with the specified resource bundle.
You don't need to call this method directly, but if you are subclassing you may need to override this to provide additional initialisation.

license 

- (NSString*) license;
Availability: Not in OpenStep/MacOS-X

Return the theme's license.

name 

- (NSString*) name;
Availability: Not in OpenStep/MacOS-X

Return the theme's name.

nameForElement: 

- (NSString*) nameForElement: (id)anObject;
Availability: Not in OpenStep/MacOS-X

Returns the name used to locate theming resources for a particular GUI element. If no name has been set for the particular object this method returns nil.

overriddenMethod: for: 

- (IMP) overriddenMethod: (SEL)selector for: (id)receiver;
Availability: Not in OpenStep/MacOS-X

Returns the original implementation of a method overridden by this theme, or zero if the method was not overridden.

A theme may override a method of another class by implementing a method whose name is '_overrideXXXMethod_YYY' where 'XXX' is the name of the class whose method is to be overridden, and 'YYY' is the normal name of the method in that class.
eg. _overrideNSScrollerMethod_drawRect:

NB. The overriding method may not access instance variable directly and must cast all uses of 'self' to be the correct class.


setName: 

- (void) setName: (NSString*)aString;
Availability: Not in OpenStep/MacOS-X

Set the name of this theme... used for testing by Thematic.app

setName: forElement: temporary: 

- (void) setName: (NSString*)aString forElement: (id)anObject temporary: (BOOL)takeOwnership;
Availability: Not in OpenStep/MacOS-X

Set the name that is used to identify theming resources for a particular control or other GUI element. This is used so that where an element is part of a control it can be displayed differently from the same class of element used outside that control.
Supplying a nil value for aString simply removes any name setting for anObject.
Supplying nil for anObject is illegal (raises an exception) unless the value of aString is also nil (and the method does nothing).
Any control which uses this method to set names for subsidiary elements must also make sure to remove the name mapping before that element is deallocated, unless the takeOwnership option is YES, in which case anObject is retained, the name mapping lasts only until the receiver is deactivated, and at that point anObject is released.

themeInspector 

- (NSWindow*) themeInspector;
Availability: Not in OpenStep/MacOS-X

Provides a standard inspector window used to display information about the receiver. The default implementation displays the icon, the name, and the authors of the theme.

The code managing this object (if any) must be prepared to have the content view of the window re-parented into another window for display on screen.


tilesFlush: state: 

- (void) tilesFlush: (NSString*)aName state: (GSThemeControlState)elementState;
Availability: Not in OpenStep/MacOS-X

Removes the name tile images from cache, forcing re-creation next time the named tiles are required.
Passing nil for aName removes all named tiles.
Passing a negative value for elementState applies to all caches.

tilesNamed: state: 

- (GSDrawTiles*) tilesNamed: (NSString*)aName state: (GSThemeControlState)elementState;
Availability: Not in OpenStep/MacOS-X

Returns the tile image information for a particular image name, or nil if there is no such information or the name is nil.
The standard names used for the parts of various controls are declared in GSTheme.h
The GUI library uses this internally to handling tiling of image information to draw user interface elements. The tile information returned by this method can be passed to the -fillRect:withTiles:background:fillStyle: method.
The elementState argument specifies the state for which tiles are requested. See the -colorNamed:state: method for determining colors to be used for drawing specific GUI elements.

versionString 

- (NSString*) versionString;
Availability: Not in OpenStep/MacOS-X

Return the theme's version string.

Software documentation for the GSTheme(Drawing) category

GSTheme(Drawing)

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Theme drawing methods.
Methods which return information/resources are generally expected (ie unless explicitly documented otherwise) to be returning something which persists until the method is called again or until the current theme is deactivated (whichever comes first).
This means that drawing code should not need to retain/release any returned object (the theme is responsible for retaining the object), and should also be able to cache size information etc for later drawing.
This simple rule means that drawing code can be written to be as efficient as possible while keeping caching strategies simple and uniform.
To facilitate this within the theme code itsself, it is recommended that you make use of the -setName:forElement:temporary: method to retain any vended object until deactivation.
Method summary

badgeBackgroundColor 

- (NSColor*) badgeBackgroundColor;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

badgeDecorationColor 

- (NSColor*) badgeDecorationColor;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

badgeTextColor 

- (NSColor*) badgeTextColor;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

browserColumnSeparation 

- (CGFloat) browserColumnSeparation;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

browserHeaderDrawingRectForCell: withFrame: 

- (NSRect) browserHeaderDrawingRectForCell: (NSTableHeaderCell*)cell withFrame: (NSRect)rect;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

browserHeaderTextColor 

- (NSColor*) browserHeaderTextColor;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

browserUseBezels 

- (BOOL) browserUseBezels;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

browserVerticalPadding 

- (CGFloat) browserVerticalPadding;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

buttonMarginsForCell: style: state: 

- (GSThemeMargins) buttonMarginsForCell: (NSCell*)cell style: (int)style state: (GSThemeControlState)state;
Availability: Not in OpenStep/MacOS-X

Amount by which the button is inset by the border.

cellForScrollerArrow: horizontal: 

- (NSButtonCell*) cellForScrollerArrow: (NSScrollerArrow)part horizontal: (BOOL)horizontal;
Availability: Not in OpenStep/MacOS-X

Creates and returns the cell to be used to draw a scroller arrow of the specified type and orientation.
The theme instance is responsible for ensuring that the cell continues to exist until the theme is deactivated (the default implementation does this by naming the cell using the -setName:forElement:temporary: method, which also provides a name for the cell color and image).

cellForScrollerKnob: 

- (NSCell*) cellForScrollerKnob: (BOOL)horizontal;
Availability: Not in OpenStep/MacOS-X

Creates and returns the cell to be used to draw a scroller knob of the specified orientation.
The theme instance is responsible for ensuring that the cell continues to exist until the theme is deactivated (the default implementation does this by naming the cell using the -setName:forElement:temporary: method).

cellForScrollerKnobSlot: 

- (NSCell*) cellForScrollerKnobSlot: (BOOL)horizontal;
Availability: Not in OpenStep/MacOS-X

Creates and returns the cell to be used to draw a scroller slot of the specified orientation.
The theme instance is responsible for ensuring that the cell continues to exist until the theme is deactivated (the default implementation does this by naming the cell using the -setName:forElement:temporary: method).

closeButtonFrameForBounds: 

- (NSRect) closeButtonFrameForBounds: (NSRect)bounds;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

defaultScrollerWidth 

- (float) defaultScrollerWidth;
Availability: Not in OpenStep/MacOS-X

Returns the width which should be allowed for a scroller within the current theme. Drawing code is entitled to assume that this value will remain constant until the theme is deactivated.

drawBackgroundForMenuView: withFrame: dirtyRect: horizontal: 

- (void) drawBackgroundForMenuView: (NSMenuView*)menuView withFrame: (NSRect)bounds dirtyRect: (NSRect)dirtyRect horizontal: (BOOL)horizontal;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawBarInside: inCell: flipped: 

- (void) drawBarInside: (NSRect)rect inCell: (NSCell*)cell flipped: (BOOL)flipped;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawBorderAndBackgroundForMenuItemCell: withFrame: inView: state: isHorizontal: 

- (void) drawBorderAndBackgroundForMenuItemCell: (NSMenuItemCell*)cell withFrame: (NSRect)cellFrame inView: (NSView*)controlView state: (GSThemeControlState)state isHorizontal: (BOOL)isHorizontal;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawBorderForImageFrameStyle: frame: view: 

- (void) drawBorderForImageFrameStyle: (NSImageFrameStyle)frameStyle frame: (NSRect)frame view: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Draw a border of the specified frame style.

drawBorderType: frame: view: 

- (void) drawBorderType: (NSBorderType)aType frame: (NSRect)frame view: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Draw a border of the specified border type.

drawBoxInClipRect: boxType: borderType: inView: 

- (void) drawBoxInClipRect: (NSRect)clipRect boxType: (NSBoxType)boxType borderType: (NSBorderType)borderType inView: (NSBox*)box;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawBrowserHeaderCell: withFrame: inView: 

- (void) drawBrowserHeaderCell: (NSTableHeaderCell*)cell withFrame: (NSRect)rect inView: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawBrowserRect: inView: withScrollerRect: columnSize: 

- (void) drawBrowserRect: (NSRect)rect inView: (NSView*)view withScrollerRect: (NSRect)scrollerRect columnSize: (NSSize)columnSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawButton: in: view: style: state: 

- (void) drawButton: (NSRect)frame in: (NSCell*)cell view: (NSView*)view style: (int)style state: (GSThemeControlState)state;
Availability: Not in OpenStep/MacOS-X

Draws a button frame and background (not its content) for the specified cell and view.

drawColorWellBorder: withBounds: withClip: 

- (NSRect) drawColorWellBorder: (NSColorWell*)well withBounds: (NSRect)bounds withClip: (NSRect)clipRect;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawFocusFrame: view: 

- (void) drawFocusFrame: (NSRect)frame view: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Draws the indicator (normally a dotted rectangle) to show that the view currently has keyboard focus.

drawKnobInCell: 

- (void) drawKnobInCell: (NSCell*)cell;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawMenuRect: inView: isHorizontal: itemCells: 

- (void) drawMenuRect: (NSRect)rect inView: (NSView*)view isHorizontal: (BOOL)horizontal itemCells: (NSArray*)itemCells;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawMenuTitleBackground: withBounds: withClip: 

- (NSRect) drawMenuTitleBackground: (GSTitleView*)aTitleView withBounds: (NSRect)bounds withClip: (NSRect)clipRect;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawPathComponentCellWithFrame: inView: withCell: isLastComponent: 

- (void) drawPathComponentCellWithFrame: (NSRect)f inView: (NSPathControl*)pc withCell: (NSPathComponentCell*)cell isLastComponent: (BOOL)last;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawPopUpButtonCellInteriorWithFrame: withCell: inView: 

- (void) drawPopUpButtonCellInteriorWithFrame: (NSRect)cellFrame withCell: (NSCell*)cell inView: (NSView*)controlView;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawProgressIndicator: withBounds: withClip: atCount: forValue: 

- (void) drawProgressIndicator: (NSProgressIndicator*)progress withBounds: (NSRect)bounds withClip: (NSRect)rect atCount: (int)count forValue: (double)val;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawProgressIndicatorBarDeterminate: 

- (void) drawProgressIndicatorBarDeterminate: (NSRect)bounds;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawProgressIndicatorBezel: withClip: 

- (NSRect) drawProgressIndicatorBezel: (NSRect)bounds withClip: (NSRect)rect;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawScrollViewRect: inView: 

- (void) drawScrollViewRect: (NSRect)rect inView: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawScrollerRect: inView: hitPart: isHorizontal: 

- (void) drawScrollerRect: (NSRect)rect inView: (NSView*)view hitPart: (NSScrollerPart)hitPart isHorizontal: (BOOL)isHorizontal;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawSegmentedControlSegment: withFrame: inView: style: state: roundedLeft: roundedRight: 

- (void) drawSegmentedControlSegment: (NSCell*)cell withFrame: (NSRect)cellFrame inView: (NSView*)controlView style: (NSSegmentStyle)style state: (GSThemeControlState)state roundedLeft: (BOOL)roundedLeft roundedRight: (BOOL)roundedRight;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawSeparatorItemForMenuItemCell: withFrame: inView: isHorizontal: 

- (void) drawSeparatorItemForMenuItemCell: (NSMenuItemCell*)cell withFrame: (NSRect)cellFrame inView: (NSView*)controlView isHorizontal: (BOOL)isHorizontal;
Availability: Not in OpenStep/MacOS-X

Draws a separator between normal menu items in a menu.

Each separator corresponds to a menu item that returns YES to -isSeparatorItem

You can provide an image tile named GSMenuSeparatorItem to draw the separator.
Can be overridden in subclasses to customize the drawing.

See also -menuSeparatorColor and -menuSeparatorInset


drawSliderBorderAndBackground: frame: inCell: isHorizontal: 

- (void) drawSliderBorderAndBackground: (NSBorderType)aType frame: (NSRect)cellFrame inCell: (NSCell*)cell isHorizontal: (BOOL)horizontal;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawStepperBorder: 

- (void) drawStepperBorder: (NSRect)frame;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawStepperCell: withFrame: inView: highlightUp: highlightDown: 

- (void) drawStepperCell: (NSCell*)cell withFrame: (NSRect)cellFrame inView: (NSView*)controlView highlightUp: (BOOL)highlightUp highlightDown: (BOOL)highlightDown;
Availability: Not in OpenStep/MacOS-X

Draw a stepper cell

drawStepperDownButton: 

- (void) drawStepperDownButton: (NSRect)aRect;
Availability: Not in OpenStep/MacOS-X

Draw down button for stepper

drawStepperHighlightDownButton: 

- (void) drawStepperHighlightDownButton: (NSRect)aRect;
Availability: Not in OpenStep/MacOS-X

Draw highlighted stepper down button

drawStepperHighlightUpButton: 

- (void) drawStepperHighlightUpButton: (NSRect)aRect;
Availability: Not in OpenStep/MacOS-X

Draw highlighted up stepper button.

drawStepperLightButton: : 

- (NSRect) drawStepperLightButton: (NSRect)border : (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw light colored stepper using the border and clip rects

drawStepperUpButton: 

- (void) drawStepperUpButton: (NSRect)aRect;
Availability: Not in OpenStep/MacOS-X

Draw normal stepper up button.

drawSwitchBezel: forState: enabled: 

- (void) drawSwitchBezel: (NSRect)frame forState: (NSControlStateValue)v enabled: (BOOL)enabled;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawSwitchInRect: forState: enabled: 

- (void) drawSwitchInRect: (NSRect)rect forState: (NSControlStateValue)state enabled: (BOOL)enabled;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawSwitchKnob: forState: enabled: 

- (void) drawSwitchKnob: (NSRect)frame forState: (NSControlStateValue)value enabled: (BOOL)enabled;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawTabViewRect: inView: withItems: selectedItem: 

- (void) drawTabViewRect: (NSRect)rect inView: (NSView*)view withItems: (NSArray*)items selectedItem: (NSTabViewItem*)item;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawTableCornerView: withClip: 

- (void) drawTableCornerView: (NSView*)cornerView withClip: (NSRect)aRect;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawTableHeaderCell: withFrame: inView: state: 

- (void) drawTableHeaderCell: (NSTableHeaderCell*)cell withFrame: (NSRect)cellFrame inView: (NSView*)controlView state: (GSThemeControlState)state;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawTableHeaderRect: inView: 

- (void) drawTableHeaderRect: (NSRect)aRect inView: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawTableViewBackgroundInClipRect: inView: withBackgroundColor: 

- (void) drawTableViewBackgroundInClipRect: (NSRect)clipRect inView: (NSView*)view withBackgroundColor: (NSColor*)backgroundColor;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawTableViewGridInClipRect: inView: 

- (void) drawTableViewGridInClipRect: (NSRect)aRect inView: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawTableViewRect: inView: 

- (void) drawTableViewRect: (NSRect)aRect inView: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawTableViewRow: clipRect: inView: 

- (void) drawTableViewRow: (NSInteger)rowIndex clipRect: (NSRect)clipRect inView: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawTitleForMenuItemCell: withFrame: inView: state: isHorizontal: 

- (void) drawTitleForMenuItemCell: (NSMenuItemCell*)cell withFrame: (NSRect)cellFrame inView: (NSView*)controlView state: (GSThemeControlState)state isHorizontal: (BOOL)isHorizontal;
Availability: Not in OpenStep/MacOS-X

Draws the menu item title.

Can be overridden to customize the text font, size and position.
You can use [[cell menuItem] title] to get the title.

The title color is mapped to the theme state as described below:

GSThemeSelectedState
[NSColor +selectedMenuItemTextColor]
GSThemeDisabledState
[NSColor +controlTextColor] or [NSColor +disabledControlTextColor]

drawToolbarRect: frame: borderMask: 

- (void) drawToolbarRect: (NSRect)aRect frame: (NSRect)viewFrame borderMask: (unsigned int)borderMask;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawWindowBackground: view: 

- (void) drawWindowBackground: (NSRect)frame view: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Draws the background of a window... normally a simple fill with the the window's background color.

drawWindowBorder: withFrame: forStyleMask: state: andTitle: 

- (void) drawWindowBorder: (NSRect)rect withFrame: (NSRect)frame forStyleMask: (unsigned int)styleMask state: (int)inputState andTitle: (NSString*)title;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

drawsBorderForMenuItemCell: state: isHorizontal: 

- (BOOL) drawsBorderForMenuItemCell: (NSMenuItemCell*)cell state: (GSThemeControlState)state isHorizontal: (BOOL)horizontal;
Availability: Not in OpenStep/MacOS-X

Returns whether the menu item border should be drawn or not.

By default, returns [NSMenuItemCell -isBordered] value. The value is NO when the menu is horizontal, YES when vertical.

The returned value used by -drawBorderAndBackgroundForMenuItemCell:withFrame:inView:state:isHorizontal:

Can be overridden in subclasses to return a custom color, but generally should not. Instead themes should provide default colors in the GSThemeDomain (in their Info.plist).


highlightTableViewSelectionInClipRect: inView: selectingColumns: 

- (void) highlightTableViewSelectionInClipRect: (NSRect)clipRect inView: (NSView*)view selectingColumns: (BOOL)selectingColumns;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

menuBackgroundColor 

- (NSColor*) menuBackgroundColor;
Availability: Not in OpenStep/MacOS-X

Returns the color used to draw a menu view background.

By default, looks up the color named menuBackgroundColor, otherwise returns the window background color.

The returned color is used by -drawBackgroundForMenuView:withFrame:dirtyRect:horizontal:

Can be overridden in subclasses to return a custom color, but generally should not. Instead themes should provide default colors in the GSThemeDomain (in their Info.plist).


menuBarBackgroundColor 

- (NSColor*) menuBarBackgroundColor;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

menuBarBorderColor 

- (NSColor*) menuBarBorderColor;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

menuBarHeight 

- (CGFloat) menuBarHeight;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

menuBorderColor 

- (NSColor*) menuBorderColor;
Availability: Not in OpenStep/MacOS-X

Returns the color used to draw a menu view border.

By default, looks up the color named menuBorderColor, otherwise returns the dark gray color.

The returned color is used by -drawBackgroundForMenuView:withFrame:dirtyRect:horizontal:

Can be overridden in subclasses to return a custom color, but generally should not. Instead themes should provide default colors in the GSThemeDomain (in their Info.plist).


menuBorderColorForEdge: isHorizontal: 

- (NSColor*) menuBorderColorForEdge: (NSRectEdge)edge isHorizontal: (BOOL)horizontal;
Availability: Not in OpenStep/MacOS-X

Returns a color to draw each edge in a menu view border.

By default, returns -menuBorderColor for the upper and left edges of a vertical menu, or for the bottom edge of a horizontal one.

The returned edge color is used by -drawBackgroundForMenuView:withFrame:dirtyRect:horizontal:

Can be overridden in subclasses to return a custom color, but generally should not. Instead themes should provide default colors in the GSThemeDomain (in their Info.plist).


menuItemBackgroundColor 

- (NSColor*) menuItemBackgroundColor;
Availability: Not in OpenStep/MacOS-X

Returns the color used to draw a menu item background.

The menu item background is drawn atop the menu background.

By default, looks up the color named menuItemBackgroundColor, otherwise returns the control background color.
When selected or highlighted, the background color is provided by [NSColor +selectedMenuItemColor] .

The returned value used by -drawBorderAndBackgroundForMenuItemCell:withFrame:inView:state:isHorizontal: and [NSMenuItemCell -backgroundColor] .

Can be overridden in subclasses to return a custom color, but generally should not. Instead themes should provide default colors in the GSThemeDomain (in their Info.plist).


menuItemHeight 

- (CGFloat) menuItemHeight;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

menuSeparatorColor 

- (NSColor*) menuSeparatorColor;
Availability: Not in OpenStep/MacOS-X

Returns the color used to draw a separator line in a menu.

By default, looks up the color named menuSeparatorColor, otherwise returns nil.

The returned color is used by -drawSeparatorItemForMenuItemCell:withFrame:inView:isHorizontal:

Can be overridden in subclasses to return a custom color, but generally should not. Instead themes should provide default colors in the GSThemeDomain (in their Info.plist).


menuSeparatorHeight 

- (CGFloat) menuSeparatorHeight;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

menuSeparatorInset 

- (CGFloat) menuSeparatorInset;
Availability: Not in OpenStep/MacOS-X

Returns the left and right inset used to draw a separator line in a menu.

By default, returns 3.0.

The returned color is used by -drawSeparatorItemForMenuItemCell:withFrame:inView:isHorizontal:

Can be overridden in subclasses to return a custom color, but generally should not. Instead themes should provide default colors in the GSThemeDomain (in their Info.plist).


menuSubmenuHorizontalOverlap 

- (CGFloat) menuSubmenuHorizontalOverlap;
Availability: Not in OpenStep/MacOS-X

Amount that submenus overlap their parent menu by, horizontally. (i.e. applies to vertical menus) Controlled by GSMenuSubmenuHorizontalOverlap default

menuSubmenuVerticalOverlap 

- (CGFloat) menuSubmenuVerticalOverlap;
Availability: Not in OpenStep/MacOS-X

Amount that submenus overlap the horizontal menu bar by, vertically. Controlled by GSMenuSubmenuVerticalOverlap default

miniaturizeButtonFrameForBounds: 

- (NSRect) miniaturizeButtonFrameForBounds: (NSRect)bounds;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

resizebarHeight 

- (float) resizebarHeight;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

resizebarNotchWidth 

- (float) resizebarNotchWidth;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

scrollViewScrollersOverlapBorders 

- (BOOL) scrollViewScrollersOverlapBorders;
Availability: Not in OpenStep/MacOS-X

If YES, instructs NSScrollView to make the scrollers overlap the border. The scroll view border is drawn using the NSScrollView part, which must be provided by the theme if this method returns YES. Controlled by user default GSScrollViewScrollersOverlapBorders; default NO;

scrollViewUseBottomCorner 

- (BOOL) scrollViewUseBottomCorner;
Availability: Not in OpenStep/MacOS-X

If YES, instructs NSScrollView to leave an empty square space where the horizontal and vertical scrollers meet. Controlled by user default GSScrollViewUseBottomCorner; default YES.

scrollerArrowsSameEndForScroller: 

- (BOOL) scrollerArrowsSameEndForScroller: (NSScroller*)aScroller;
Availability: Not in OpenStep/MacOS-X

Return YES if the scroller arrows are at the same end. Return NO to get one scroller arrow at each end of the scroller. The default implementation first checks the default GSScrollerArrowsSameEnd and if that is not set, delegates to the NSInterfaceStyle.

scrollerScrollsByPageForScroller: 

- (BOOL) scrollerScrollsByPageForScroller: (NSScroller*)aScroller;
Availability: Not in OpenStep/MacOS-X

Returns YES if clicking in the scroller slot should scroll by one page, NO if the scroller should jump to the location clicked. The default implementation first checks the default GSScrollerScrollsByPage and if that is not set, delegates to the NSInterfaceStyle.

setFrameForCloseButton: viewSize: 

- (void) setFrameForCloseButton: (NSButton*)closeButton viewSize: (NSSize)viewSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

setKeyEquivalent: forButtonCell: 

- (void) setKeyEquivalent: (NSString*)key forButtonCell: (NSButtonCell*)cell;
Availability: Not in OpenStep/MacOS-X

Allows the theme to set an image or set attributes for drawing the button differently based on the key equivalent which is set.

sizeForBorderType: 

- (NSSize) sizeForBorderType: (NSBorderType)aType;
Availability: Not in OpenStep/MacOS-X

Determine the size for the specified border type.

sizeForImageFrameStyle: 

- (NSSize) sizeForImageFrameStyle: (NSImageFrameStyle)frameStyle;
Availability: Not in OpenStep/MacOS-X

Determine the size for the specified frame style.

stepperDownButtonRectWithFrame: 

- (NSRect) stepperDownButtonRectWithFrame: (NSRect)frame;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

stepperUpButtonRectWithFrame: 

- (NSRect) stepperUpButtonRectWithFrame: (NSRect)frame;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

tabViewContentRectForBounds: tabViewType: tabView: 

- (NSRect) tabViewContentRectForBounds: (NSRect)aRect tabViewType: (NSTabViewType)type tabView: (NSTabView*)view;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

tableHeaderCellDrawingRectForBounds: 

- (NSRect) tableHeaderCellDrawingRectForBounds: (NSRect)theRect;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

tableHeaderTextColorForState: 

- (NSColor*) tableHeaderTextColorForState: (GSThemeControlState)state;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

titleViewClassForMenuView: 

- (Class) titleViewClassForMenuView: (NSMenuView*)aMenuView;
Availability: Not in OpenStep/MacOS-X

Returns the class used to create the title bar in the given menu view. By default, returns GSTitleView.
A subclass can be returned to customize the title view look and behavior.

titlebarButtonSize 

- (float) titlebarButtonSize;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

titlebarHeight 

- (float) titlebarHeight;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

titlebarPaddingLeft 

- (float) titlebarPaddingLeft;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

titlebarPaddingRight 

- (float) titlebarPaddingRight;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

titlebarPaddingTop 

- (float) titlebarPaddingTop;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

toolbarBackgroundColor 

- (NSColor*) toolbarBackgroundColor;
Availability: Not in OpenStep/MacOS-X

Method for toolbar theming.

toolbarBorderColor 

- (NSColor*) toolbarBorderColor;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

toolbarIsOpaque 

- (BOOL) toolbarIsOpaque;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

Software documentation for the GSTheme(LowLevelDrawing) category

GSTheme(LowLevelDrawing)

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Low level drawing methods... themes may use these for drawing, but should not normally override them.
Method summary

fillHorizontalRect: withImage: fromRect: flipped: 

- (void) fillHorizontalRect: (NSRect)rect withImage: (NSImage*)image fromRect: (NSRect)source flipped: (BOOL)flipped;
Availability: Not in OpenStep/MacOS-X

Method to tile the supplied image to fill the horizontal rectangle.
The rect argument is the rectangle to be filled.
The image argument is the data to fill with.
The source argument is the rectangle within the image which is used.
The flipped argument specifies what sort of coordinate system is in use in the view where we are drawing.

fillRect: withRepeatedImage: fromRect: center: 

- (void) fillRect: (NSRect)rect withRepeatedImage: (NSImage*)image fromRect: (NSRect)source center: (BOOL)center;
Availability: Not in OpenStep/MacOS-X

Tile rect with image. The tiling starts with the origin of the first copy of the image at the bottom left corner of the rect unless center is YES, in which case the image is centered in rect and tiled outwards from that.

fillRect: withTiles: 

- (NSRect) fillRect: (NSRect)rect withTiles: (GSDrawTiles*)tiles;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

fillRect: withTiles: background: 

- (NSRect) fillRect: (NSRect)rect withTiles: (GSDrawTiles*)tiles background: (NSColor*)color;
Availability: Not in OpenStep/MacOS-X

Method to tile a rectangle given a group of up to nine tile images.
The GSDrawTiles object encapsulates the tile images and information about what parts of each image are used for tiling.
This draws the left, right, top and bottom borders by tiling the images at left, right, top and bottom. It then draws the four corner images and finally deals with the remaining space in the middle according to the default style set for the GSDrawTiles object used.
The background color specified is used to fill the center where style is FillStyleNone.
The return value is the central rectangle (inside the border images).

fillRect: withTiles: background: fillStyle: 

- (NSRect) fillRect: (NSRect)rect withTiles: (GSDrawTiles*)tiles background: (NSColor*)color fillStyle: (GSThemeFillStyle)style;
Availability: Not in OpenStep/MacOS-X

Method to tile a rectangle given a group of up to nine tile images.
The GSDrawTiles object encapsulates the tile images and information about what parts of each image are used for tiling.
This draws the left, right, top and bottom borders by tiling the images at left, right, top and bottom. It then draws the four corner images and finally deals with the remaining space in the middle according to the specified style.
The background color specified is used to fill the center where style is FillStyleNone.
The return value is the central rectangle (inside the border images).

fillVerticalRect: withImage: fromRect: flipped: 

- (void) fillVerticalRect: (NSRect)rect withImage: (NSImage*)image fromRect: (NSRect)source flipped: (BOOL)flipped;
Availability: Not in OpenStep/MacOS-X

Method to tile the supplied image to fill the vertical rectangle.
The rect argument is the rectangle to be filled.
The image argument is the data to fill with.
The source argument is the rectangle within the image which is used.
The flipped argument specifies what sort of coordinate system is in use in the view where we are drawing.

Software documentation for the GSTheme(Menus) category

GSTheme(Menus)

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.
Method summary

displayPopUpMenu: withCellFrame: controlViewWindow: preferredEdge: selectedItem: 

- (void) displayPopUpMenu: (NSMenuView*)mr withCellFrame: (NSRect)cellFrame controlViewWindow: (NSWindow*)cvWin preferredEdge: (NSRectEdge)edge selectedItem: (int)selectedItem;
Availability: Not in OpenStep/MacOS-X

Display popup menu item.

doesProcessEventsForPopUpMenu 

- (BOOL) doesProcessEventsForPopUpMenu;
Availability: Not in OpenStep/MacOS-X

Process events for popups.

keyForKeyEquivalent: 

- (NSString*) keyForKeyEquivalent: (NSString*)aString;
Availability: Not in OpenStep/MacOS-X

Modifies the proposed key equivalent string for the menu item. The default implementation simply returns the proposed string unmodified.

menuHeightForWindow: 

- (float) menuHeightForWindow: (NSWindow*)window;
Availability: Not in OpenStep/MacOS-X

Calculate the height of the menu for in-window menus. The default implementation returns [NSMenuView menuBarHeight];

menuShouldShowIcon 

- (BOOL) menuShouldShowIcon;
Availability: Not in OpenStep/MacOS-X

Display the menu icon in the application.

modifyRect: forMenu: isHorizontal: 

- (NSRect) modifyRect: (NSRect)aRect forMenu: (NSMenu*)aMenu isHorizontal: (BOOL)horizontal;
Availability: Not in OpenStep/MacOS-X

Modifies the given NSRect for use by NSMenu to position and size the displayed menu. The default implementation simply returns the original NSRect unmodified.

organizeMenu: isHorizontal: 

- (void) organizeMenu: (NSMenu*)menu isHorizontal: (BOOL)horizontal;
Availability: Not in OpenStep/MacOS-X

Used by the theme to organize the main menu . The default implementation organizes the main menu in the same way that NSMenu's old default behaviour did, generating an "app name" menu for horizontal display.

processCommand: 

- (void) processCommand: (void*)context;
Availability: Not in OpenStep/MacOS-X

Processes menu events for the theme. The default implementation does nothing.

proposedTitle: forMenuItem: 

- (NSString*) proposedTitle: (NSString*)title forMenuItem: (NSMenuItem*)menuItem;
Availability: Not in OpenStep/MacOS-X

Modifies the proposed menu item title. The default implementation simply returns the proposed string unmodified.

proposedTitleWidth: forMenuView: 

- (CGFloat) proposedTitleWidth: (CGFloat)proposedWidth forMenuView: (NSMenuView*)aMenuView;
Availability: Not in OpenStep/MacOS-X

Modifies the proposed default width for a menu title in the given NSMenuView. The default implementation simply returns the proposed width unmodified.

rightMouseDisplay: forEvent: 

- (void) rightMouseDisplay: (NSMenu*)menu forEvent: (NSEvent*)theEvent;
Availability: Not in OpenStep/MacOS-X

Display the context menu when the right mouse button is pressed.

setMenu: forWindow: 

- (void) setMenu: (NSMenu*)menu forWindow: (NSWindow*)window;
Availability: Not in OpenStep/MacOS-X

This method sets the menu for the window using the current theme In the default theme this calls the setMenu: method on the window giving the menu parameter as the argument.

updateAllWindowsWithMenu: 

- (void) updateAllWindowsWithMenu: (NSMenu*)menu;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.

updateMenu: forWindow: 

- (void) updateMenu: (NSMenu*)menu forWindow: (NSWindow*)window;
Availability: Not in OpenStep/MacOS-X

Update the menu for the window . This refreshes the menu contents. The default implementation of this method does nothing.

Software documentation for the GSTheme(MidLevelDrawing) category

GSTheme(MidLevelDrawing)

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Helper functions for drawing standard items.
Method summary

drawButton: withClip: 

- (NSRect) drawButton: (NSRect)border withClip: (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw a standard button

drawDarkBezel: withClip: 

- (NSRect) drawDarkBezel: (NSRect)border withClip: (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw a dark bezel border

drawDarkButton: withClip: 

- (NSRect) drawDarkButton: (NSRect)border withClip: (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw a "dark" button border (used in tableviews)

drawFramePhoto: withClip: 

- (NSRect) drawFramePhoto: (NSRect)border withClip: (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw a frame photo border. Used in NSImageView.

drawGradientBorder: inRect: withClip: 

- (NSRect) drawGradientBorder: (NSGradientType)gradientType inRect: (NSRect)border withClip: (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw a gradient border.

drawGrayBezel: withClip: 

- (NSRect) drawGrayBezel: (NSRect)border withClip: (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw a gray bezel border

drawGroove: withClip: 

- (NSRect) drawGroove: (NSRect)border withClip: (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw a groove border

drawLightBezel: withClip: 

- (NSRect) drawLightBezel: (NSRect)border withClip: (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw a light bezel border

drawWhiteBezel: withClip: 

- (NSRect) drawWhiteBezel: (NSRect)border withClip: (NSRect)clip;
Availability: Not in OpenStep/MacOS-X

Draw a white bezel border

Software documentation for the GSTheme(NSBrowserCell) category

GSTheme(NSBrowserCell)

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.
Method summary

branchImage 

- (NSImage*) branchImage;
Availability: Not in OpenStep/MacOS-X

This method returns the branch image

drawBrowserInteriorWithFrame: withCell: inView: withImage: alternateImage: isHighlighted: state: isLeaf: 

- (void) drawBrowserInteriorWithFrame: (NSRect)cellFrame withCell: (NSBrowserCell*)cell inView: (NSView*)controlView withImage: (NSImage*)theImage alternateImage: (NSImage*)alternateImage isHighlighted: (BOOL)isHighlighted state: (int)state isLeaf: (BOOL)isLeaf;
Availability: Not in OpenStep/MacOS-X

Draw the interior of the browser cell

drawEditorForCell: withFrame: inView: 

- (void) drawEditorForCell: (NSCell*)cell withFrame: (NSRect)cellFrame inView: (NSView*)view;
Availability: Not in OpenStep/MacOS-X

Draw editor in cell

drawInCell: attributedText: inFrame: 

- (void) drawInCell: (NSCell*)cell attributedText: (NSAttributedString*)stringValue inFrame: (NSRect)cellFrame;
Availability: Not in OpenStep/MacOS-X

Draw attributed text in cell

highlightedBranchImage 

- (NSImage*) highlightedBranchImage;
Availability: Not in OpenStep/MacOS-X

This method returns the highlighted version of the branch image

Software documentation for the GSTheme(NSWindow) category

GSTheme(NSWindow)

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.
Method summary

didSetDefaultButtonCell: 

- (void) didSetDefaultButtonCell: (NSButtonCell*)aCell;
Availability: Not in OpenStep/MacOS-X

This method does any additional setup after the default cell is set.

standardWindowButton: forStyleMask: 

- (NSButton*) standardWindowButton: (NSWindowButton)button forStyleMask: (NSUInteger)mask;
Availability: Not in OpenStep/MacOS-X

This method returns the standard window button for the given mask for the current theme.

windowDecorator 

- (id) windowDecorator;
Availability: Not in OpenStep/MacOS-X

This method returns the window decorator provided by the current theme.

Software documentation for the GSTheme(OpenSavePanels) category

GSTheme(OpenSavePanels)

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.
Method summary

openPanelClass 

- (Class) openPanelClass;
Availability: Not in OpenStep/MacOS-X

This method returns the open panel class needed by the native environment.

savePanelClass 

- (Class) savePanelClass;
Availability: Not in OpenStep/MacOS-X

This method returns the open panel class needed by the native environment.

Software documentation for the GSTheme(PrintPanels) category

GSTheme(PrintPanels)

Declared in:
GNUstepGUI/GSTheme.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.
Method summary

pageLayoutClass 

- (Class) pageLayoutClass;
Availability: Not in OpenStep/MacOS-X

This method returns the page layout class needed by the native environment.

printPanelClass 

- (Class) printPanelClass;
Availability: Not in OpenStep/MacOS-X

This method returns the print panel class needed by the native environment.


Up