You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
103 lines
2.3 KiB
103 lines
2.3 KiB
15 years ago
|
/*****************************************************************
|
||
|
KWin - the KDE window manager
|
||
|
This file is part of the KDE project.
|
||
|
|
||
|
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
||
|
Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
|
||
|
|
||
|
You can Freely distribute this program under the GNU General Public
|
||
|
License. See the file "COPYING" for the exact licensing terms.
|
||
|
******************************************************************/
|
||
|
|
||
|
#ifndef KWIN_TABBOX_H
|
||
|
#define KWIN_TABBOX_H
|
||
|
|
||
15 years ago
|
#include <tqframe.h>
|
||
|
#include <tqtimer.h>
|
||
|
#include <tqvaluelist.h>
|
||
15 years ago
|
#include "utils.h"
|
||
|
|
||
14 years ago
|
class TQLabel;
|
||
15 years ago
|
|
||
|
namespace KWinInternal
|
||
|
{
|
||
|
|
||
|
class Workspace;
|
||
|
class Client;
|
||
|
|
||
14 years ago
|
class TabBox : public TQFrame
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
TabBox( Workspace *ws, const char *name=0 );
|
||
|
~TabBox();
|
||
|
|
||
|
Client* currentClient();
|
||
|
void setCurrentClient( Client* c );
|
||
|
int currentDesktop();
|
||
|
|
||
|
// DesktopMode and WindowsMode are based on the order in which the desktop
|
||
|
// or window were viewed.
|
||
|
// DesktopListMode lists them in the order created.
|
||
|
enum Mode { DesktopMode, DesktopListMode, WindowsMode };
|
||
|
void setMode( Mode mode );
|
||
|
Mode mode() const;
|
||
|
|
||
|
void reset();
|
||
|
void nextPrev( bool next = TRUE);
|
||
|
|
||
|
void delayedShow();
|
||
|
void hide();
|
||
|
|
||
|
void handleMouseEvent( XEvent* );
|
||
|
|
||
|
Workspace* workspace() const;
|
||
|
|
||
|
void reconfigure();
|
||
|
|
||
|
protected:
|
||
15 years ago
|
void showEvent( TQShowEvent* );
|
||
|
void hideEvent( TQHideEvent* );
|
||
|
void drawContents( TQPainter * );
|
||
15 years ago
|
|
||
|
private:
|
||
|
void createClientList(ClientList &list, int desktop /*-1 = all*/, Client *start, bool chain);
|
||
|
void updateOutline();
|
||
|
|
||
|
private:
|
||
|
Client* current_client;
|
||
|
Mode m;
|
||
|
Workspace* wspace;
|
||
|
ClientList clients;
|
||
|
int desk;
|
||
|
int lineHeight;
|
||
|
bool showMiniIcon;
|
||
15 years ago
|
TQTimer delayedShowTimer;
|
||
|
TQString no_tasks;
|
||
15 years ago
|
bool options_traverse_all;
|
||
|
Window outline_left, outline_right, outline_top, outline_bottom;
|
||
|
};
|
||
|
|
||
|
|
||
|
/*!
|
||
|
Returns the tab box' workspace
|
||
|
*/
|
||
|
inline Workspace* TabBox::workspace() const
|
||
|
{
|
||
|
return wspace;
|
||
|
}
|
||
|
|
||
|
/*!
|
||
|
Returns the current mode, either DesktopListMode or WindowsMode
|
||
|
|
||
|
\sa setMode()
|
||
|
*/
|
||
|
inline TabBox::Mode TabBox::mode() const
|
||
|
{
|
||
|
return m;
|
||
|
}
|
||
|
|
||
|
} // namespace
|
||
|
|
||
|
#endif
|