1 /********************************************************************
2 KWin - the KDE window manager
3 This file is part of the KDE project.
5 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
6 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *********************************************************************/
36 class TabBox
: public QFrame
40 TabBox( Workspace
*ws
);
43 Client
* currentClient();
44 ClientList
currentClientList();
46 QList
< int > currentDesktopList();
48 void setCurrentClient( Client
* newClient
);
49 void setCurrentDesktop( int newDesktop
);
51 enum SortOrder
{ StaticOrder
, MostRecentlyUsedOrder
};
52 void setMode( TabBoxMode mode
);
53 TabBoxMode
mode() const;
55 void reset( bool partial_reset
= false );
56 void nextPrev( bool next
= true);
63 bool isDisplayed() const;
65 void handleMouseEvent( XEvent
* );
67 Workspace
* workspace() const;
75 void showEvent( QShowEvent
* );
76 void hideEvent( QHideEvent
* );
77 void paintEvent( QPaintEvent
* );
80 void createClientList(ClientList
&list
, int desktop
/*-1 = all*/, Client
*start
, bool chain
);
81 void createDesktopList(QList
< int > &list
, int start
, SortOrder order
);
88 QList
< int > desktops
;
91 QTimer delayedShowTimer
;
96 bool options_traverse_all
;
101 Returns the tab box' workspace
103 inline Workspace
* TabBox::workspace() const
109 Returns the current mode, either TabBoxDesktopListMode or TabBoxWindowsMode
113 inline TabBoxMode
TabBox::mode() const
119 Increase the reference count, preventing the default tabbox from showing.
121 \sa unrefDisplay(), isDisplayed()
123 inline void TabBox::refDisplay()
129 Returns whether the tab box is being displayed, either natively or by an
132 \sa refDisplay(), unrefDisplay()
134 inline bool TabBox::isDisplayed() const
136 return display_refcount
> 0;