<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.dtd">
<gsdoc base="GSTheme" up="GuiAdditions">
  <head>
    <title>GSTheme</title>
    <author name="Adam Fedor">
      <email address="fedor@gnu.org">
        fedor@gnu.org
      </email>
    </author>
    <author name="Richard Frith-Macdonald">
      <email address="rfm@gnu.org">
        rfm@gnu.org
      </email>
    </author>
    <abstract>
      Useful/configurable drawing functions
    </abstract>
    <copy>2004-2006 Free Software Foundation, Inc.</copy>
  </head>
  <body>
    <front><contents /></front>
    <chapter>
      <heading>The theme management system</heading>
      <p>
        The theme management system for the GNUstep GUI is based
        around the
        <ref type="class" id="GSTheme">GSTheme</ref>
          class, which provides support for loading of theme
          bundles and methods for drawing common user interface
          elements. <br /> 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.
        </p>
        <p>
          Various design imperatives apply to the theme system,
          but probably the key ones are:
        </p>
        <list>
          <item>
            It should allow designers and other non-technical users
            to easily develop new and interesting GUI styles likely
            to attract new users to GNUstep.
          </item>
          <item>
            Using and switching between themes should be an easy
            and pleasant experience... so that people are not put
            off when they try using themes.
          </item>
          <item>
            It should eventually permit a GNUstep application to
            appear as a native application on ms-windows and
            other systems.
          </item>
        </list>
        <p>
          To attain these aims implies the recognition of some more
          specific objectives and some possible technical
          solutions:
        </p>
        <list>
          <item>
            We must have as simple as possible an API for the
            functions handling the way GUI elements work and
            the way they draw themselves. <br /> The standard
            OpenStep/MacOS-X API provides mechanisms
            for controlling the colors used to draw controls (via
            <ref type="class" id="NSColor">NSColor</ref>
              and
              <ref type="class" id="NSColorList">NSColorList</ref>
                ) and controlling the way controls behave
                (NSInterfaceStyleForKey() and
                <ref type="method" id="-interfaceStyle" class="NSResponder">[NSResponder -interfaceStyle]</ref>), but we need to extend that with methods to draw controls entirely differently if required.
              </item>
              <item>
                We must have a GUI application for theme
                development. It is not sufficient to
                provide an API if we want good graphic
                designers and user interface specialists to
                develop themes for us.
              </item>
              <item>
                It must be possible for an application to
                dynamically change the theme in use while
                it is running and it should be easy for a user to
                select between available themes. <br /> This
                implies that themes must be loadable bundles
                and that it must always be possible to unload a
                theme as well as loading one. <br /> It suggests
                that the theme selection mechanism should be in
                every application, perhaps as an extension to an
                existing panel such as the info panel.
              </item>
            </list>
            <section>
              <heading>Types of theming</heading>
              <p>
                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.
              </p>
              <deflist>
                <term>System images</term>
                <desc>
                  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.
                </desc>
                <term>System colors</term>
                <desc>
                  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.
                </desc>
                <term>Image tiling</term>
                <desc>
                  Controls might be given sets of images used
                  as tiling to draw themselves rather than using the
                  standard line drawing and color fill
                  mechanisms.
                </desc>
                <term>Interface style</term>
                <desc>
                  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.
                </desc>
                <term>Method override</term>
                <desc>
                  A theme might actually provide code, in the form of
                  a subclass of
                  <ref type="class" id="GSTheme">GSTheme</ref>
                    such that drawing methods have completely
                    custom behavior.
                  </desc>
                </deflist>
              </section>
            </chapter>
    <chapter>
      <heading>
        Software documentation for the GSTheme class
      </heading>
      <class name="GSTheme" super="NSObject" ovadd="0.0.0" ovrem="0.0.0">
        <declared>GNUstepGUI/GSTheme.h</declared>
        <desc>
          <p>
            <em>
              This interface is <strong>HIGHLY</strong> unstable
              and incomplete at present.
            </em>
          </p>
          <p>
            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).
          </p>
          <p>
            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.
          </p>
          <p>
            The default implementation uses the standard
            configurable colors defined in NSColor, such
            as <code>controlLightHighlightColor</code>,
            <code>controlShadowColor</code> and
            <code>controlDarkShadowColor</code>. <br /> Themes
            are expected to override the default system color list
            with their own versions, and this class cooperates
            with
            <ref type="class" id="NSColor">NSColor</ref>
              and
              <ref type="class" id="NSColorList">NSColorList</ref>
                to establish the correct system color list when a
                theme is activated.
              </p>
              <p>
                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).
              </p>
              <p>
                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
                <ref type="function" id="NSInterfaceStyleForKey">
                  NSInterfaceStyleForKey()
                </ref>
                so that controls use the appropriate behavior.
              </p>
        </desc>
        <method type="void" factory="yes" ovadd="0.0.0" ovrem="0.0.0">
          <sel>orderFrontSharedThemePanel:</sel>
          <arg type="id">sender</arg>
          <desc>
            Creates and displays a panel allowing selection of
            different themes and display of the current theme
            inspector.
          </desc>
        </method>
        <method type="void" factory="yes" ovadd="0.0.0" ovrem="0.0.0">
          <sel>setTheme:</sel>
          <arg type="GSTheme*">theme</arg>
          <desc>
            Set the currently active <var>theme</var> to be the
            instance specified. <br /> You do not normally
            need to call this method as it is called automatically
            when the user default which specifies the current
            <var>theme</var> (GSTheme) is updated.
          </desc>
        </method>
        <method type="GSTheme*" factory="yes" ovadd="0.0.0" ovrem="0.0.0">
          <sel>theme</sel>
          <desc>
            Returns the currently active theme instance. This
            is the value most recently set using
            <ref type="method" id="+setTheme:">
              +setTheme:
            </ref>
            or (if none has been set) is a default instance of the
            base class.
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>activate</sel>
          <desc>
            <p>
              This method is called automatically when the
              receiver is made into the currently active theme
              by the
              <ref type="method" id="+setTheme:">
                +setTheme:
              </ref>
              method. Subclasses may override it to perform
              startup operations, but should call the super
              class implementation after doing their own thing.
            </p>
            <p>
              The base implementation handles setup and caching of
              the system color list, standard image information,
              tiling information, and user defaults. <br /> It
              then sends a GSThemeWillActivateNotification and a
              GSThemeDidActivateNotification
              to allow other parts of the GUI library to update
              themselves from the new theme.
            </p>
            <p>
              Finally, this method marks all windows in the
              application as needing update... so they will
              draw themselves with the new theme information.
            </p>
          </desc>
        </method>
        <method type="NSArray*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>authors</sel>
          <desc>
            Returns the names of the theme's authors.
          </desc>
        </method>
        <method type="NSBundle*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>bundle</sel>
          <desc>
            Return the bundle containing the resources used by
            the current theme.
          </desc>
        </method>
        <method type="NSColor*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>colorNamed:</sel>
          <arg type="NSString*">aName</arg>
          <sel>state:</sel>
          <arg type="GSThemeControlState">elementState</arg>
          <sel>cache:</sel>
          <arg type="BOOL">useCache</arg>
          <desc>
            This returns the color for drawing the item whose name
            is <var>aName</var> in the specified state. If
            <var>aName</var> is <code>nil</code> or if there is
            no color defined for the particular combination of item
            name and state, the method returns <code>nil</code>.
            <br /> The <var>useCache</var> argument controls
            whether the information is retrieved from cache or
            regenerated from information in the theme
            bundle.
          </desc>
        </method>
        <method type="NSColorList*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>colors</sel>
          <desc>
            Returns the system color list defined by the
            receiver. <br /> The default implementation
            returns the color list provided in the theme bundle
            (if any) or the default system color list.
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>deactivate</sel>
          <desc>
            <p>
              This method is called automatically when the
              receiver is stopped from being the currently
              active theme by the use of the
              <ref type="method" id="+setTheme:">
                +setTheme:
              </ref>
              method to make another theme active. Subclasses
              may override it to perform shutdown operations, but
              should call the super class implementation after
              their own.
            </p>
            <p>
              The base implementation handles some cleanup and then
              sends a GSThemeDidDeactivateNotification to allow
              other parts of the GUI library to update
              themselves.
            </p>
          </desc>
        </method>
        <method type="NSImage*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>icon</sel>
          <desc>
            Returns the theme's icon.
          </desc>
        </method>
        <method type="NSDictionary*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>infoDictionary</sel>
          <desc>
            <p>
              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.
            </p>
            <p>Keys found in this dictionary include:</p>
            <deflist>
              <term>GSThemeDomain</term>
              <desc>
                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.
              </desc>
              <term>GSThemeTiles</term>
              <desc>
                A dictionary keyed on tile names and containing the
                following:
                <deflist>
                  <term>FileName</term>
                  <desc>
                    Name of the file (within the GSThemeTiles
                    directory in the bundle) in which the
                    image for this tile is tored.
                  </desc>
                  <term>HorizontalDivision</term>
                  <desc>
                    The offet along the X-axis used to divide the
                    image into columns of tiles.
                  </desc>
                  <term>VerticalDivision</term>
                  <desc>
                    The offet along the Y-axis used to divide the
                    image into rows of tiles.
                  </desc>
                </deflist>
              </desc>
            </deflist>
          </desc>
        </method>
        <method type="id" init="yes" ovadd="0.0.0" ovrem="0.0.0">
          <sel>initWithBundle:</sel>
          <arg type="NSBundle*">bundle</arg>
          <desc>
            Initialise an instance of a theme with the
            specified resource <var>bundle</var>. <br /> You
            don't need to call this method directly, but if you
            are subclassing you may need to override this to
            provide additional initialisation.
          </desc>
        </method>
        <method type="NSString*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>name</sel>
          <desc>
            Return the theme's name.
          </desc>
        </method>
        <method type="NSString*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>nameForElement:</sel>
          <arg type="id">anObject</arg>
          <desc>
            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
            <code>nil</code>.
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>setName:</sel>
          <arg type="NSString*">aString</arg>
          <desc>
            Set the name of this theme... used for testing by
            Thematic.app
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>setName:</sel>
          <arg type="NSString*">aString</arg>
          <sel>forElement:</sel>
          <arg type="id">anObject</arg>
          <sel>temporary:</sel>
          <arg type="BOOL">takeOwnership</arg>
          <desc>
            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. <br /> Supplying
            a <code>nil</code> value for <var>aString</var> simply
            removes any name setting for <var>anObject</var>.
            <br /> Supplying <code>nil</code> for
            <var>anObject</var> is illegal (raises an exception)
            unless the value of <var>aString</var> is also
            <code>nil</code> (and the method does nothing).
            <br /> 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
            <var>takeOwnership</var> option is <code>YES</code>,
            in which case <var>anObject</var> is retained, the name
            mapping lasts only until the receiver is
            deactivated, and at that point
            <var>anObject</var> is released.
          </desc>
        </method>
        <method type="NSWindow*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>themeInspector</sel>
          <desc>
            <p>
              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.
            </p>
            <p>
              The code managing this object (if any) must be
              prepared to have the content view of the window
              reparented into another window for display on
              screen.
            </p>
          </desc>
        </method>
        <method type="GSDrawTiles*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>tilesNamed:</sel>
          <arg type="NSString*">aName</arg>
          <sel>state:</sel>
          <arg type="GSThemeControlState">elementState</arg>
          <sel>cache:</sel>
          <arg type="BOOL">useCache</arg>
          <desc>
            Returns the tile image information for a particular
            image name, or <code>nil</code> if there is no such
            information or the name is <code>nil</code>.
            <br /> 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
            <ref type="method" id="-fillRect:withTiles:background:fillStyle:">-fillRect:withTiles:background:fillStyle:</ref> method. <br /> The <var>elementState</var> argument specifies the state for which tiles are requested. <br /> The <var>useCache</var> argument controls whether the information is retrieved from cache or regenerated from information in the theme bundle.
          </desc>
        </method>
      </class>
    </chapter>
    <chapter>
      <heading>
        Software documentation for the GSTheme(Drawing)
        category
      </heading>
      <category name="Drawing" class="GSTheme" ovadd="0.0.0" ovrem="0.0.0">
        <declared>GNUstepGUI/GSTheme.h</declared>
        <desc>
          Theme drawing methods
        </desc>
        <method type="NSSize" ovadd="0.0.0" ovrem="0.0.0">
          <sel>buttonBorderForCell:</sel>
          <arg type="NSCell*">cell</arg>
          <sel>style:</sel>
          <arg type="int">style</arg>
          <sel>state:</sel>
          <arg type="GSThemeControlState">state</arg>
          <desc>
            Amount by which the button is inset by the border.
          </desc>
        </method>
        <method type="NSButtonCell*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>cellForScrollerArrow:</sel>
          <arg type="NSScrollerArrow">part</arg>
          <sel>horizontal:</sel>
          <arg type="BOOL">horizontal</arg>
          <desc>
            Methods for scroller theming.
          </desc>
        </method>
        <method type="NSCell*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>cellForScrollerKnob:</sel>
          <arg type="BOOL">horizontal</arg>
          <desc>
            <em>Description forthcoming.</em>
          </desc>
        </method>
        <method type="NSCell*" ovadd="0.0.0" ovrem="0.0.0">
          <sel>cellForScrollerKnobSlot:</sel>
          <arg type="BOOL">horizontal</arg>
          <desc>
            <em>Description forthcoming.</em>
          </desc>
        </method>
        <method type="float" ovadd="0.0.0" ovrem="0.0.0">
          <sel>defaultScrollerWidth</sel>
          <desc>
            <em>Description forthcoming.</em>
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawBorderForImageFrameStyle:</sel>
          <arg type="NSImageFrameStyle">frameStyle</arg>
          <sel>frame:</sel>
          <arg type="NSRect">frame</arg>
          <sel>view:</sel>
          <arg type="NSView*">view</arg>
          <desc>
            Draw a border of the specified <var>frame</var> style.
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawBorderType:</sel>
          <arg type="NSBorderType">aType</arg>
          <sel>frame:</sel>
          <arg type="NSRect">frame</arg>
          <sel>view:</sel>
          <arg type="NSView*">view</arg>
          <desc>
            Draw a border of the specified border type.
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawButton:</sel>
          <arg type="NSRect">frame</arg>
          <sel>in:</sel>
          <arg type="NSCell*">cell</arg>
          <sel>view:</sel>
          <arg type="NSView*">view</arg>
          <sel>style:</sel>
          <arg type="int">style</arg>
          <sel>state:</sel>
          <arg type="GSThemeControlState">state</arg>
          <desc>
            Draws a button <var>frame</var> and background (not
            its content) for the specified <var>cell</var> and
            <var>view</var>.
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawFocusFrame:</sel>
          <arg type="NSRect">frame</arg>
          <sel>view:</sel>
          <arg type="NSView*">view</arg>
          <desc>
            Draws the indicator (normally a dotted rectangle) to
            show that the <var>view</var> currently has keyboard
            focus.
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawToobarRect:</sel>
          <arg type="NSRect">aRect</arg>
          <sel>frame:</sel>
          <arg type="NSRect">viewFrame</arg>
          <sel>borderMask:</sel>
          <arg type="unsigned int">borderMask</arg>
          <desc>
            Method for toolbar theming.
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawWindowBackground:</sel>
          <arg type="NSRect">frame</arg>
          <sel>view:</sel>
          <arg type="NSView*">view</arg>
          <desc>
            Draws the background of a window... normally a simple
            fill with the the window's background color.
          </desc>
        </method>
        <method type="NSSize" ovadd="0.0.0" ovrem="0.0.0">
          <sel>sizeForBorderType:</sel>
          <arg type="NSBorderType">aType</arg>
          <desc>
            Determine the size for the specified border type.
          </desc>
        </method>
        <method type="NSSize" ovadd="0.0.0" ovrem="0.0.0">
          <sel>sizeForImageFrameStyle:</sel>
          <arg type="NSImageFrameStyle">frameStyle</arg>
          <desc>
            Determine the size for the specified frame style.
          </desc>
        </method>
      </category>
    </chapter>
    <chapter>
      <heading>
        Software documentation for the
        GSTheme(LowLevelDrawing) category
      </heading>
      <category name="LowLevelDrawing" class="GSTheme" ovadd="0.0.0" ovrem="0.0.0">
        <declared>GNUstepGUI/GSTheme.h</declared>
        <desc>
          Low level drawiong methods... themes may use these for
          drawing, but should not normally override them.
        </desc>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>fillHorizontalRect:</sel>
          <arg type="NSRect">rect</arg>
          <sel>withImage:</sel>
          <arg type="NSImage*">image</arg>
          <sel>fromRect:</sel>
          <arg type="NSRect">source</arg>
          <sel>flipped:</sel>
          <arg type="BOOL">flipped</arg>
          <desc>
            Method to tile the supplied <var>image</var> to fill
            the horizontal rectangle. <br /> The <var>rect</var>
            argument is the rectangle to be filled. <br /> The
            <var>image</var> argument is the data to fill with.
            <br /> The <var>source</var> argument is the
            rectangle within the <var>image</var> which is
            used. <br /> The <var>flipped</var> argument
            specifies what sort of coordinate system is in
            use in the view where we are drawing.
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>fillRect:</sel>
          <arg type="NSRect">rect</arg>
          <sel>withRepeatedImage:</sel>
          <arg type="NSImage*">image</arg>
          <sel>fromRect:</sel>
          <arg type="NSRect">source</arg>
          <sel>center:</sel>
          <arg type="BOOL">center</arg>
          <desc>
            Tile <var>rect</var> with <var>image</var>. The tiling
            starts with the origin of the first copy of the
            <var>image</var> at the bottom left corner of the
            <var>rect</var> unless <var>center</var> is
            <code>YES</code>, in which case the <var>image</var>
            is centered in <var>rect</var> and tiled outwards from
            that.
          </desc>
        </method>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>fillRect:</sel>
          <arg type="NSRect">rect</arg>
          <sel>withTiles:</sel>
          <arg type="GSDrawTiles*">tiles</arg>
          <sel>background:</sel>
          <arg type="NSColor*">color</arg>
          <sel>fillStyle:</sel>
          <arg type="GSThemeFillStyle">style</arg>
          <desc>
            Method to tile a rectangle given a group of up to
            nine tile images. <br /> The GSDrawTiles object
            encapsulates the tile images and information
            about what parts of each image are used for tiling.
            <br /> 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 <var>style</var>.
            <br /> The background <var>color</var> specified is
            used to fill the center where <var>style</var> is
            FillStyleNone. <br /> The return value is
            the central rectangle (inside the border images).
          </desc>
        </method>
        <method type="void" ovadd="0.0.0" ovrem="0.0.0">
          <sel>fillVerticalRect:</sel>
          <arg type="NSRect">rect</arg>
          <sel>withImage:</sel>
          <arg type="NSImage*">image</arg>
          <sel>fromRect:</sel>
          <arg type="NSRect">source</arg>
          <sel>flipped:</sel>
          <arg type="BOOL">flipped</arg>
          <desc>
            Method to tile the supplied <var>image</var> to fill
            the vertical rectangle. <br /> The <var>rect</var>
            argument is the rectangle to be filled. <br /> The
            <var>image</var> argument is the data to fill with.
            <br /> The <var>source</var> argument is the
            rectangle within the <var>image</var> which is
            used. <br /> The <var>flipped</var> argument
            specifies what sort of coordinate system is in
            use in the view where we are drawing.
          </desc>
        </method>
      </category>
    </chapter>
    <chapter>
      <heading>
        Software documentation for the
        GSTheme(MidLevelDrawing) category
      </heading>
      <category name="MidLevelDrawing" class="GSTheme" ovadd="0.0.0" ovrem="0.0.0">
        <declared>GNUstepGUI/GSTheme.h</declared>
        <desc>
          Helper functions for drawing standard items.
        </desc>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawButton:</sel>
          <arg type="NSRect">border</arg>
          <sel>withClip:</sel>
          <arg type="NSRect">clip</arg>
          <desc>
            Draw a standard button
          </desc>
        </method>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawDarkBezel:</sel>
          <arg type="NSRect">border</arg>
          <sel>withClip:</sel>
          <arg type="NSRect">clip</arg>
          <desc>
            Draw a dark bezel <var>border</var>
          </desc>
        </method>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawDarkButton:</sel>
          <arg type="NSRect">border</arg>
          <sel>withClip:</sel>
          <arg type="NSRect">clip</arg>
          <desc>
            Draw a "dark" button <var>border</var> (used in
            tableviews)
          </desc>
        </method>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawFramePhoto:</sel>
          <arg type="NSRect">border</arg>
          <sel>withClip:</sel>
          <arg type="NSRect">clip</arg>
          <desc>
            Draw a frame photo <var>border</var>. Used in
            NSImageView.
          </desc>
        </method>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawGradientBorder:</sel>
          <arg type="NSGradientType">gradientType</arg>
          <sel>inRect:</sel>
          <arg type="NSRect">border</arg>
          <sel>withClip:</sel>
          <arg type="NSRect">clip</arg>
          <desc>
            Draw a gradient <var>border</var>.
          </desc>
        </method>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawGrayBezel:</sel>
          <arg type="NSRect">border</arg>
          <sel>withClip:</sel>
          <arg type="NSRect">clip</arg>
          <desc>
            Draw a grey bezel <var>border</var>
          </desc>
        </method>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawGroove:</sel>
          <arg type="NSRect">border</arg>
          <sel>withClip:</sel>
          <arg type="NSRect">clip</arg>
          <desc>
            Draw a groove <var>border</var>
          </desc>
        </method>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawLightBezel:</sel>
          <arg type="NSRect">border</arg>
          <sel>withClip:</sel>
          <arg type="NSRect">clip</arg>
          <desc>
            Draw a light bezel <var>border</var>
          </desc>
        </method>
        <method type="NSRect" ovadd="0.0.0" ovrem="0.0.0">
          <sel>drawWhiteBezel:</sel>
          <arg type="NSRect">border</arg>
          <sel>withClip:</sel>
          <arg type="NSRect">clip</arg>
          <desc>
            Draw a white bezel <var>border</var>
          </desc>
        </method>
      </category>
    </chapter>
  </body>
</gsdoc>
