home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 3
/
AACD03.BIN
/
AACD
/
Programming
/
ClassFree
/
CFbuttonclass
/
CFbutton.doc
next >
Wrap
Text File
|
1998-06-09
|
2KB
|
88 lines
Class: CFbuttonclass
Author: Anders E. Andersen <andersa@fys.ku.dk>
Superclass: gadgetclass
Desciption: GadTools button gadget replacement
Include File: "CDbutton.h"
New Methods:
------------
None
Changed Methods:
----------------
GM_HITTEST - Allways returns GMR_GADGETHIT
GM_GOACTIVE - Sets gadget flag GFLG_SELECTED, renders
gadget and returns GMR_MEACTIVE.
GM_HANDLEINPUT - Handles gadget rendering according to
mouse movements, checks for gadget abort in two ways,
MENUDOWN and SELECTUP with mousepointer outside gadget.
Also checks for GACT_RELVERIFY to see if IDCMP_GADGETUP
should be sent.
GM_GOINACTIVE - If GFLG_SELECTED is set, it clears it
and renders the gadget.
Attributes:
-----------
All attributes are passed directly to gadgetclass. The
following attributes are used by CFbuttonclass:
GA_Left, GA_Top, GA_Width, GA_Height
Positions and sizes the button.
GA_Text
NULL terminated C string. Automatically centered, truncated
(if needed) and displayed.
GA_RelVerify
Determines if IDCMP_GADGETUP messages should be sent.
CFBU_Textposflags
Excepts position flags to determine how text should be
positioned inside the button. 'Or' the flags together.
The accepted flags are:
POS_CENTER - No flags set, text is centered. DEFAULT.
POS_HORLEFT - Text is positioned as far to the left as
possible.
POS_HORRIGHT - As far to the right as posible.
POS_VERTOP - Position as far to the top of the
button as possible.
POS_VERBOTTOM - Position text in the bottom of the gadget.
POS_HORLEFT and POS_VERTOP takes precedence over
POS_HORRIGHT and POS_VERBOTTOM.
CFBU_Imageposflags
Has the same meaning for gadget images as flags as
CFBU_Textposflags has for gadgettext.
(But it doesn't work, because CFbuttonclass can't handle
images yet..)
CFBU_Textrestraint
Maximum lenght in pixels that the gadgettext can be.
CFbuttonclass cuts the gadget text string in case it would
display outside the bounds of this attribute.
Defaults to a reasonable value within the bounds of the
gadget.