home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / prefs / CSizePopup.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.7 KB  |  56 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #include <LGAPopup.h>
  20.  
  21. //======================================
  22. class CSizePopup: public LGAPopup
  23. //======================================
  24. {
  25. public:
  26.         enum
  27.         {
  28.             class_ID = 'Szpp'
  29.         };
  30.                         CSizePopup(LStream* inStream);
  31.     Int32                GetMenuSize() const;
  32.  
  33.     virtual void        SetFontSize(Int32 inFontSize);    // the value is font size in points
  34.     Int32                GetFontSize() const    // the value is font size in points
  35.                         {
  36.                             return mFontSize;
  37.                         }
  38.  
  39.     virtual void        SetValue(Int32 inValue);
  40.                         
  41.     void                MarkRealFontSizes(short fontNum);
  42.     void                MarkRealFontSizes(LGAPopup *fontPopup);
  43.  
  44.     virtual    void        SetUpCurrentMenuItem(MenuHandle    inMenuH, Int16 inCurrentItem);
  45.     
  46. protected:
  47.  
  48.     virtual Boolean        TrackHotSpot(Int16 inHotSpot, Point inPoint, Int16 inModifiers);
  49.     virtual Int32        GetFontSizeFromMenuItem(Int32 inMenuItem) const;
  50.     virtual void        DrawPopupTitle();
  51.     virtual void        DrawPopupArrow();
  52.  
  53.     Int32                mFontSize;    
  54.     short                mFontNumber;
  55. }; // class CSizePopup
  56.