home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / prefs / CMenuTable.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.6 KB  |  68 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. #pragma once
  20.  
  21. #include <LTextHierTable.h>
  22. //#include <QAP_Assist.h>
  23.  
  24. //========================================================================================
  25. class CMenuTable
  26. // This descendant of LHierTextTable initializes itself from menu resources.  The hierarchical
  27. // menus give rise to a hierarchical table.  This trick avoids the difficult task of defining a
  28. // new dynamic hierarchical resource template for such tables.  Currently this is only used
  29. // for the left pane of the preferences dialog.
  30. //========================================================================================
  31. :     public LTextHierTable
  32. ,    public LBroadcaster
  33. //,    public CQAPartnerTableMixin
  34. {
  35.     public:
  36.         enum
  37.         {
  38.             class_ID = 'Itxh',
  39.             msg_SelectionChanged = 'selc'
  40.         };
  41.                             CMenuTable(LStream *inStream);
  42.         virtual                ~CMenuTable();
  43.         
  44.         virtual void        FinishCreate();
  45.         virtual void        SelectionChanged();
  46.         virtual MessageT    GetSelectedMessage();
  47.         virtual void        GetHiliteRgn(RgnHandle ioHiliteRgn);
  48.         virtual void        HiliteSelection(Boolean    inActively,    Boolean    inHilite);
  49.         virtual void        HiliteCellActively(const STableCell    &inCell, Boolean inHilite);
  50.         virtual void        HiliteCellInactively(const STableCell    &inCell, Boolean inHilite);
  51.         virtual void        ClickSelf(const SMouseDownEvent &inMouseDown);
  52.                 TableIndexT    FindMessage( MessageT message );
  53. //#if defined(QAP_BUILD)        
  54. //        virtual void        QapGetListInfo (PQAPLISTINFO pInfo);
  55. //        virtual Ptr            QapAddCellToBuf(Ptr pBuf, Ptr pLimit, const STableCell& sTblCell);
  56. //#endif
  57.     protected:
  58.         ResIDT                mMenuID;
  59.  
  60.         virtual void        DrawCell(
  61.                                     const STableCell    &inCell,
  62.                                     const Rect            &inLocalRect);                                    
  63.         void                AddTableLabels(
  64.                                     TableIndexT    ¤tRow,
  65.                                     ResIDT        mMenuID,
  66.                                     Boolean        firstLevel = true);
  67. }; // class CMenuTable
  68.