home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 3
/
AACD03.BIN
/
AACD
/
Programming
/
ClassFree
/
CFtexticlass
/
CFtext.doc
next >
Wrap
Text File
|
1998-06-05
|
2KB
|
68 lines
Class: CFtexticlass
Author: Anders E. Andersen <andersa@fys.ku.dk>
Superclass: imageclass
Desciption: A simple text outputting image.
Include File: CFtexti.h
New methods:
------------
None
Changed Methods:
----------------
IM_HITTEST - If the coordinates recieved in the message is outside
the imame dimensions as defined by the fields of the image structure,
then this method returns FALSE, else it returns TRUE.
This is a slight change from imageclass, which doesn't include the
edges of the image when it determines wether the point is within the
image. This doesn't really make sence for text, which hasn't got
edges.
IM_DRAW - Uses graphics.library's Text() to print the string
pointed to by the IA_Data attribute in the RastPort passed
in the message, at the x and y offset and in the state provided in
the message.
Attributes:
-----------
IA_Left, IA_Top
Decides where the text is displayed, together with
the offsets provided in the message.
IA_Height
Set to the rastports TxHeight+1 by CFtexticlass, at every IM_DRAW
method issued. IM_HITTEST needs it to determine if the
image was hit. The +1 is responsible for borders on the text when
it is selected, which makes it look a bit nicer.
IA_Width
Determines the boundery in pixels the text output must be
contained widthin. An area this wide and with the provided
rastports TxHeight attributes height is cleared with
BltPattern(), before the text is displayed. So if you change
the string to a shorter one, the old text is erased when the
new text is written.
IA_Data
Must point to a standard NULL terminated C string.
IA_FGPen, IA_BGPen
Controls the rendering pens. They are switched when the
drawing state is IDS_SELECTED.