home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / FrameListMenu.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.7 KB  |  87 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. /*                                                                        */
  20. /* Name:        FrameListMenu.h                                            */
  21. /* Description:    XFE_FrameListMenu component header file.                */
  22. /*                These are the menu items that appear at the end of the    */
  23. /*                                                                        */
  24. /* Author:        Ramiro Estrugo <ramiro@netscape.com>                    */
  25.  
  26.  
  27. /* Date:        Sun Mar  2 01:34:13 PST 1997                            */
  28. /*                                                                        */
  29. /*----------------------------------------------------------------------*/
  30.  
  31. #include "NotificationCenter.h"
  32. #include "Frame.h"
  33.  
  34. #ifndef _xfe_frame_list_menu_h_
  35. #define _xfe_frame_list_menu_h_
  36.  
  37. // This class can be used with a DYNA_CASCADEBUTTON or
  38. // DYNA_MENUITEMS.
  39.  
  40. class XFE_FrameListMenu : public XFE_NotificationCenter
  41. {
  42. public:
  43.  
  44.     virtual ~XFE_FrameListMenu();
  45.  
  46.     // this function occupies the generateCallback slot in a menuspec.
  47.     static void generate(Widget, void *, XFE_Frame *);
  48.  
  49. private:
  50.     
  51.     XFE_FrameListMenu(Widget, XFE_Frame *);
  52.     
  53.     // the toplevel component -- the thing we dispatch our events to.
  54.     XFE_Frame *m_parentFrame;
  55.     
  56.     // the cascade button we're tied to.
  57.     Widget m_cascade;
  58.     
  59.     // the row column we're in.
  60.     Widget m_submenu;
  61.     
  62.     // this is the first slot we are using the code assumes that the 
  63.     // dynamic portion of the menu is at the end, so we can destroy from
  64.     // this index down.
  65.     int m_firstslot;
  66.     
  67.     // this function is substituted as the cascadingCallback once the
  68.     // object has been created, and is used from then on.
  69.     static void update_cb(Widget, XtPointer, XtPointer);
  70.     
  71.     // callback added in generate() that destroys this object when the cascade button
  72.     // is destroyed.
  73.     static void destroy_cb(Widget, XtPointer, XtPointer);
  74.  
  75.     static void item_activate_cb(Widget, XtPointer, XtPointer);
  76.  
  77.      static void cascading_cb(Widget, XtPointer, XtPointer);
  78.  
  79.     void cascading();
  80.     void item_activate(Widget item);
  81.  
  82.     XP_List * getShownFrames();
  83.  
  84. };
  85.  
  86. #endif /* _xfe_frame_list_menu_h_ */
  87.