home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************
- LGBIconButton
-
- Public domain, by Zig Zichterman.
-
- This class implements 3D icon push buttons according to the guidelines
- suggested in _develop_ 15. Some of the drawing code is taken from
- the public domain source accompanying _develop_ 15.
-
- A new button variant that draws an icon button. The icon draws
- in a rectangular frame with 3D effects.
-
- LGBIconButton uses contrlValue for the resource id of the icon family.
- You must set contrlValue (and probably contrlMax).
-
- LGBIconButton does not draw a title. Ever. Since it is bad HI to
- display an icon without an accompanying text, you should place a
- caption near this button to clue the user in to just what your
- icon means.
- **************************************************************************/
- #pragma once
-
- class LGBIconButton {
- public :
- static long Main(short inVariation, ControlHandle ioControl,
- short inMsg, long ioParam);
-
- // ———— contstructor —————————————————————————————————————————————
- protected :
- LGBIconButton(ControlRecord *inControl);
- ControlRecord *mControl;
-
- // ———— dispatch —————————————————————————————————————————————————
- protected :
- void Draw(long inPartCode);
- Boolean Test(Point inHitPt);
- void CalcCRgn(RgnHandle ioRgn);
-
- // ———— Draw —————————————————————————————————————————————————————
- protected :
- void DrawBW(void);
- void DrawBW3D(void);
- void DrawColor(void);
- void DrawColorInactive(void);
- void DrawColorActive(void);
- void DrawFrame(void);
- void EraseInsides(void);
- void DrawIcon(Boolean inColor = true);
- void Draw3DEffects(void);
- };
-