home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / TaskBar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.3 KB  |  94 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.    TaskBar.h -- class definition for taskbar.
  20.    Created: Stephen Lamm <slamm@netscape.com>, 19-Nov-96.
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_taskbar_h
  26. #define _xfe_taskbar_h
  27.  
  28. #include "xp_core.h"
  29. #include "Chrome.h"
  30. #include "Command.h"
  31. #include "Component.h"
  32. #include "IconGroup.h"
  33. #include "icons.h"
  34.  
  35. #include <Xm/Xm.h>
  36.  
  37. class XFE_Frame;
  38.  
  39. typedef struct TaskBarSpec 
  40. {
  41.     const char *    taskBarButtonName;
  42.     EChromeTag        tag;
  43.     IconGroup *        icons;
  44. } TaskBarSpec;
  45.  
  46.  
  47. class XFE_TaskBar : public XFE_Component
  48. {
  49. public:
  50.     
  51.     XFE_TaskBar(Widget            parent,
  52.                 XFE_Frame *        parent_frame,
  53.                 XP_Bool            is_floating);
  54.     
  55.     virtual ~XFE_TaskBar();
  56.     
  57.     XFE_CALLBACK_DECL(doCommandNotice)
  58.         
  59.     void        setFloatingTitle            (const char * title);
  60.     void        updateFloatingAppearance    ();
  61.  
  62.     Cardinal    numEnabledButtons            ();
  63.  
  64. private:
  65.   
  66.     static TaskBarSpec    m_floatingSpec[];
  67.     static TaskBarSpec    m_dockedSpec[];
  68.     
  69.     XP_Bool                m_isFloating;
  70.     XFE_Frame *            m_parentFrame;
  71.  
  72. #ifdef MOZ_MAIL_NEWS
  73.     XP_Bool                m_biffNoticeInstalled;
  74.     
  75.     // these two needed to update the biff icon
  76.     XFE_CALLBACK_DECL(updateBiffStateNotice)
  77. #endif
  78.  
  79.     void setIconGroupForCommand(CommandType cmd, IconGroup *icons);    
  80.     
  81.     Widget        createTaskBarButton            (TaskBarSpec *spec);
  82.     void        createButtons                (TaskBarSpec * spec);
  83.  
  84.     void        createFloatingWidgets        (Widget parent);
  85.     void        createDockedWidgets            (Widget parent);
  86.  
  87.     // update the icon appearance
  88.     XFE_CALLBACK_DECL(updateIconAppearance)
  89.  
  90.     XFE_CALLBACK_DECL(updateFloatingBusyState)
  91. };
  92.  
  93. #endif /* _xfe_taskbar_h */
  94.