home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 2.7 KB | 99 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: PalFrame.h
- // Release Version: $ ODF 1 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PALFRAME_H
- #define PALFRAME_H
-
- // ----- OS Layer -----
-
- #ifndef FLOATFRM_H
- #include "FloatFrm.h"
- #endif
-
- //========================================================================================
- // Forward Declaration
- //========================================================================================
-
- class FW_CFacetContext;
- class FW_CColor;
- class FW_CMouseEvent;
-
- class CGrid;
-
- //========================================================================================
- // CPalette
- //========================================================================================
-
- class CPalette
- {
- //----------------------------------------------------------------------------------------
- // Initialization/destruction
- //
- public:
- CPalette();
- virtual ~ CPalette();
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void GetColor(short colorIndex, FW_CColor* color) const;
- short NumberOfColors() const
- {return fNumbersOfColors;}
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- short fNumbersOfColors;
- #ifdef FW_BUILD_MAC
- CTabHandle fColorTable;
- #endif
- #ifdef FW_BUILD_WIN
- PALETTEENTRY* fColorTable;
- #endif
- };
-
- //========================================================================================
- // CPaletteFrame
- //========================================================================================
-
- class CPaletteFrame : public CFloatingWindowFrame
- {
- //----------------------------------------------------------------------------------------
- // Initialization/destruction
- //
- public:
-
- FW_DECLARE_AUTO(CPaletteFrame)
-
- CPaletteFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, CDrawPart* drawPart);
- virtual ~ CPaletteFrame();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
- virtual FW_Boolean DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
-
- virtual void FacetAdded(Environment* ev, ODFacet* facet, unsigned short facetCount);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CPalette* fPalette;
- CGrid *fGrid;
- };
-
- #endif
-