home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / gui / CGAIconPopup.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.7 KB  |  84 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. #ifndef __H_CGAIconPopup
  20. #define __H_CGAIconPopup
  21. #pragma once
  22.  
  23. /*======================================================================================
  24.     AUTHOR:            Ted Morris - 07 NOV 96
  25.  
  26.     DESCRIPTION:    Implements a class for drawing a popup with associated 16x16 'cicn'
  27.                     icons for each item.
  28.                     
  29.     MODIFICATIONS:
  30.  
  31.     Date            Person            Description
  32.     ----            ------            -----------
  33. ======================================================================================*/
  34.  
  35.  
  36. /*====================================================================================*/
  37.     #pragma mark INCLUDE FILES
  38. /*====================================================================================*/
  39.  
  40. #include <LGAPopup.h>
  41.  
  42.  
  43. /*====================================================================================*/
  44.     #pragma mark TYPEDEFS
  45. /*====================================================================================*/
  46.  
  47.  
  48. /*====================================================================================*/
  49.     #pragma mark CONSTANTS
  50. /*====================================================================================*/
  51.  
  52.  
  53. /*====================================================================================*/
  54.     #pragma mark CLASS DECLARATIONS
  55. /*====================================================================================*/
  56.  
  57. #pragma mark -
  58.  
  59. class CGAIconPopup : public LGAPopup {
  60.                   
  61. public:
  62.  
  63.                         enum { class_ID = 'Gipu' };
  64.                         
  65.                         enum { cMenuIconWidth = 16, cMenuIconHeight = 16, cMenuIconTitleMargin = 4,
  66.                                cMenuIconType = 'cicn' };
  67.  
  68.                         CGAIconPopup(LStream *inStream) :
  69.                                      LGAPopup(inStream) {
  70.                         }
  71.                         
  72.     Int16                GetTitleIconID(void);
  73.     virtual    void        RefreshMenu(void);
  74.     
  75. protected:
  76.  
  77.     virtual    void        CalcTitleRect(Rect &outRect);
  78.     virtual    void        CalcLabelRect(Rect &outRect);
  79.     virtual    void        DrawPopupTitle(void);
  80. };
  81.  
  82.  
  83. #endif // __H_CGAIconPopup
  84.