home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-30 | 4.0 KB | 106 lines | [TEXT/CWIE] |
- // ===========================================================================
- // LAGAPopupMenu.h
- // ===========================================================================
- //
- // Copyright © 1996 Chrisoft (Christophe ANDRES) All rights reserved.
- //
- // You may use this source code in any application (commercial, shareware, freeware,
- // postcardware, etc), but not remove this notice (no need to acknowledge the use of
- // this class in the about box)
- // You may not sell this source code in any form. This source code may be placed on
- // publicly accessable archive sites and source code disks. It may not be placed on
- // profit archive sites and source code disks without the permission of the author,
- // Christophe ANDRES.
- //
- // This source code is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- //
- // If you make any change or improvement on this class, please send the improved/changed
- // version to : chrisoft@calva.net or Christophe ANDRES
- // 20, rue Prosper Mérimée
- // 67100 STRASBOURG
- // FRANCE
- //
- // ===========================================================================
- // LAGAPopupMenu.cp <- double-click + Command-D to see class implementation
- //
- // LAGAPopupMenu is simply a Popup menu class that works in windows with non white backgrounds.
- // The standard Popup Menu CDEF erases in white its title, which in turn looks ugly if your
- // background is NOT white.
- //
- // Note:
- // This class is called LAGAPopupMenu, because it was conceived to be used in conjunction with
- // other “Apple Grayscale Appearance” classes, although it uses only the standard System 7
- // Popup Menu CDEF and henceforth has NOT the look described in the AGA document.
- // Sorry, no fancy new look ;)
- //
- // Note:
- // The use of this class is only necessary IF the Popup Menu you are using uses a title
- //
- // This class requires AGAColors.cp to be present in your project
- //
- // Version : 1.2
- //
- // Change History (most recent first, date in US form : mm/dd/yy):
- //
- // 06/30/96 ca Public release of version 1.2
- // 06/09/96 bp Brad Pettit <bpettit@aimnet.com>
- // reimplemented using new StAGAEraseHack, since text alignment of the label
- // wasn't always correct for different fonts and label justification.
- // 06/05/96 ca Added RegisterClass method to ease registry
- // Added guard macros in header files
- // Increased version to 1.2
- // 05/17/96 ca Increased version to 1.1
- // Added change history
- // 05/07/96 ca class made available by Christophe ANDRES <chrisoft@calva.net>
- // (version 1.0)
- //
- // To Do:
- //
-
-
- #ifndef _H_LAGAPopupMenu
- #define _H_LAGAPopupMenu
- #pragma once
-
- #include <LStdControl.h>
-
- class LAGAPopupMenu : public LStdControl
-
- {
- public:
- enum { class_ID = 'AGAp' };
- static void RegisterClass (); // <06/05/96 ca>
- static LAGAPopupMenu* CreateAGAPopupMenuStream (LStream *inStream);
-
- LAGAPopupMenu (LStream *inStream);
-
- LAGAPopupMenu ( const SPaneInfo &inPaneInfo, MessageT inValueMessage,
- Int16 inTitleOptions, ResIDT inMENUid, Int16 inTitleWidth,
- Int16 inPopupVariation, ResIDT inTextTraitsID, Str255 inTitle,
- OSType inResTypeMENU, Int16 inInitialMenuItem);
-
- virtual MenuHandle GetMacMenuH ();
-
- // begin <06/09/96 bp>
- virtual void SetValue (Int32 inValue);
- virtual void SetMaxValue (Int32 inValue);
- virtual void SetMinValue (Int32 inValue);
- // end <06/09/96 bp>
-
- protected:
- virtual void DrawSelf ();
-
- Boolean TrackHotSpot (Int16 inHotSpot, Point inPoint); // <06/09/96 bp>
-
- short mTitleWidth;
-
- private:
- void InitAGAPopupMenu (Int16 inInitialMenuItem);
-
- void GetTitleRect (Rect& outRect); // <06/09/96 bp>
- };
-
- #endif
-