kwin Library API Documentation

tabbox.h

00001 /*****************************************************************
00002  KWin - the KDE window manager
00003  This file is part of the KDE project.
00004 
00005 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
00006 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
00007 
00008 You can Freely distribute this program under the GNU General Public
00009 License. See the file "COPYING" for the exact licensing terms.
00010 ******************************************************************/
00011 
00012 #ifndef KWIN_TABBOX_H
00013 #define KWIN_TABBOX_H
00014 
00015 #include <qwidget.h>
00016 #include <qtimer.h>
00017 #include <qvaluelist.h>
00018 #include "utils.h"
00019 
00020 class QLabel;
00021 
00022 namespace KWinInternal
00023 {
00024 
00025 class Workspace;
00026 class Client;
00027 
00028 class TabBox : public QWidget
00029     {
00030     Q_OBJECT
00031     public:
00032         TabBox( Workspace *ws, const char *name=0 );
00033         ~TabBox();
00034 
00035         Client* currentClient();
00036         int currentDesktop();
00037 
00038     // DesktopMode and WindowsMode are based on the order in which the desktop
00039     //  or window were viewed.
00040     // DesktopListMode lists them in the order created.
00041         enum Mode { DesktopMode, DesktopListMode, WindowsMode };
00042         void setMode( Mode mode );
00043         Mode mode() const;
00044 
00045         void reset();
00046         void nextPrev( bool next = TRUE);
00047 
00048         void delayedShow();
00049         void hide();
00050 
00051         void handleMouseEvent( XEvent* );
00052 
00053         Workspace* workspace() const;
00054 
00055         void reconfigure();
00056 
00057     protected:
00058         void paintEvent( QPaintEvent* );
00059         void showEvent( QShowEvent* );
00060         void hideEvent( QHideEvent* );
00061         void paintContents();
00062 
00063     private:
00064         Client* client;
00065         Mode m;
00066         Workspace* wspace;
00067         ClientList clients;
00068         int desk;
00069         QLabel* icon;
00070         int wmax;
00071         QTimer delayedShowTimer;
00072         QString no_tasks;
00073         bool options_traverse_all;
00074     };
00075 
00076 
00080 inline Workspace* TabBox::workspace() const
00081     {
00082     return wspace;
00083     }
00084 
00090 inline TabBox::Mode TabBox::mode() const
00091     {
00092     return m;
00093     }
00094 
00095 } // namespace
00096 
00097 #endif
KDE Logo
This file is part of the documentation for kwin Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Mar 5 04:41:14 2004 by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2003