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 <qframe.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 QFrame
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 showEvent( QShowEvent* );
00059         void hideEvent( QHideEvent* );
00060         void drawContents( QPainter * );
00061 
00062     private:
00063         void createClientList(ClientList &list, int desktop /*-1 = all*/, Client *start, bool chain);
00064 
00065     private:
00066         Client* client;
00067         Mode m;
00068         Workspace* wspace;
00069         ClientList clients;
00070         int desk;
00071         int lineHeight;
00072         bool showMiniIcon;
00073         QTimer delayedShowTimer;
00074         QString no_tasks;
00075         bool options_traverse_all;
00076     };
00077 
00078 
00082 inline Workspace* TabBox::workspace() const
00083     {
00084     return wspace;
00085     }
00086 
00092 inline TabBox::Mode TabBox::mode() const
00093     {
00094     return m;
00095     }
00096 
00097 } // namespace
00098 
00099 #endif
KDE Logo
This file is part of the documentation for kwin Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jun 14 16:47:04 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003