home *** CD-ROM | disk | FTP | other *** search
-
- File: paletteclass.doc
- Description: PaletteClass documentation.
- Copyright: (C) Copyright 1995 Jaba Development.
- (C) Copyright 1995 Jan van den Baard.
- All Rights Reserved.
-
- ------------------------------------------------------------------------------
-
- TABLE OF CONTENTS
-
- paletteclass/--background--
- paletteclass/Methods
- paletteclass/Attributes
-
- paletteclass/--background-- paletteclass/--background--
-
- NAME
- Class: paletteclass
- Superclass: baseclass
- Include File: "PaletteClass.h"
-
- FUNCTION
- To provide you with a palette selector gadget simular to the gadtools
- palette gadget. It allows you to select a pen from a range of screen
- colors or a range of pens selected by you.
-
- Objects from this class send out the following attribute pairs
- in their notification messages:
-
- GA_ID - Gadget object ID.
- PALETTE_CurrentColor - The currently selected pen.
-
- NOTE
- This class is provided as source code. To make use of this class you
- must compile it into an object module and link it in with your main
- program.
-
- Also your program must open the following libraries:
-
- intuition.library - V37 or better.
- graphics.library - V37 or better.
- utility.library - V37 or better.
- bgui.library - V39 or better.
-
- Ofcourse these libraries must remain open until you are done using the
- class.
-
- paletteclass/Methods paletteclass/Methods
-
- NEW METHODS
- None.
-
- CHANGED METHODS
- None.
-
- paletteclass/Attributes paletteclass/Attributes
-
- NOTE
- All baseclass attributes are also valid for this class.
-
- NAME
- PALETTE_Depth -- ( ULONG )
-
- FUNCTION
- To determine the depth of the palette object. Currently this is the
- only way to determine the amount of colors in the palette object. This
- will always be a power of 2 (I.E. 2, 4, 8, 16, 32, 64, 128 or 256).
- Allowable values here are 1 for two colors through 8 for 256 colors.
-
- Default is 1 (two colors). Applicability is (I).
-
- NAME
- PALETTE_ColorOffset -- ( ULONG )
-
- FUNCTION
- To specify the first color which is used in the palette. Please note
- that you must specify an ordinal number here, not a pen number. This
- value must range between 0 and 256 minus the amount of colors
- displayed in the palette object.
-
- Default is 0. Applicability is (I).
-
- NAME
- PALETTE_PenTable -- ( UWORD * )
-
- FUNCTION
- To optionally specify an array with pen numbers so that you can build
- a palette object with the colors you want. Please note that the array
- must contain at least PALETTE_ColorOffset + ( 1 << PALETTE_Depth ) pen
- entries. This is because the PALETTE_ColorOffset attribute determines
- at which offset in the array the class will get it's pens.
-
- Default is NULL. Applicability is (I).
-
- SEE ALSO
- PALETTE_ColorOffset
-
- NAME
- PALETTE_CurrentColor -- ( ULONG )
-
- FUNCTION
- To determine the currently selected pen in the palette object. Please
- note that this number is a pen number, not an ordinal color number
- within the palette object itself.
-
- Default is the first color in the palette object. Applicability is
- (ISGNU).
-