kwin Library API Documentation

KWinInternal::TabBox Class Reference

Collaboration diagram for KWinInternal::TabBox:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Mode { DesktopMode, DesktopListMode, WindowsMode }

Public Member Functions

 TabBox (Workspace *ws, const char *name=0)
 ~TabBox ()
ClientcurrentClient ()
int currentDesktop ()
void setMode (Mode mode)
Mode mode () const
void reset ()
void nextPrev (bool next=TRUE)
void delayedShow ()
void hide ()
void handleMouseEvent (XEvent *)
Workspaceworkspace () const
void reconfigure ()

Protected Member Functions

void showEvent (QShowEvent *)
void hideEvent (QHideEvent *)
void drawContents (QPainter *)

Detailed Description

Definition at line 28 of file tabbox.h.


Member Function Documentation

Client * KWinInternal::TabBox::currentClient  ) 
 

Returns the currently displayed client ( only works in WindowsMode ). Returns 0 if no client is displayed.

Definition at line 283 of file tabbox.cpp.

References mode(), and workspace().

Referenced by drawContents().

int KWinInternal::TabBox::currentDesktop  ) 
 

Returns the currently displayed virtual desktop ( only works in DesktopListMode ) Returns -1 if no desktop is displayed.

Definition at line 297 of file tabbox.cpp.

References mode().

Referenced by drawContents(), and reset().

void KWinInternal::TabBox::setMode Mode  mode  ) 
 

Sets the current mode to mode, either DesktopListMode or WindowsMode

See also:
mode()

Definition at line 72 of file tabbox.cpp.

TabBox::Mode KWinInternal::TabBox::mode  )  const [inline]
 

Returns the current mode, either DesktopListMode or WindowsMode

See also:
setMode()

Definition at line 92 of file tabbox.h.

Referenced by currentClient(), currentDesktop(), drawContents(), handleMouseEvent(), nextPrev(), and reset().

void KWinInternal::TabBox::reset  ) 
 

Resets the tab box to display the active client in WindowsMode, or the current desktop in DesktopListMode

Definition at line 138 of file tabbox.cpp.

References KWinInternal::Workspace::activeClient(), KWinInternal::Workspace::currentDesktop(), currentDesktop(), mode(), KWinInternal::Workspace::numberOfDesktops(), and workspace().

Referenced by TabBox().

void KWinInternal::TabBox::nextPrev bool  next = TRUE  ) 
 

Shows the next or previous item, depending on next

Definition at line 226 of file tabbox.cpp.

References mode(), KWinInternal::Workspace::nextDesktopFocusChain(), KWinInternal::Workspace::nextFocusChainClient(), KWinInternal::Workspace::numberOfDesktops(), KWinInternal::Workspace::previousDesktopFocusChain(), KWinInternal::Workspace::previousFocusChainClient(), and workspace().

void KWinInternal::TabBox::delayedShow  ) 
 

Rikkus: please document! (Matthias)

Ok, here's the docs :)

You call delayedShow() instead of show() directly.

If the 'ShowDelay' setting is false, show() is simply called.

Otherwise, we start a timer for the delay given in the settings and only do a show() when it times out.

This means that you can alt-tab between windows and you don't see the tab box immediately. Not only does this make alt-tabbing faster, it gives less 'flicker' to the eyes. You don't need to see the tab box if you're just quickly switching between 2 or 3 windows. It seems to work quite nicely.

Definition at line 547 of file tabbox.cpp.

Workspace * KWinInternal::TabBox::workspace  )  const [inline]
 

Returns the tab box' workspace

Definition at line 82 of file tabbox.h.

Referenced by currentClient(), drawContents(), handleMouseEvent(), nextPrev(), and reset().

void KWinInternal::TabBox::showEvent QShowEvent *   )  [protected]
 

Reimplemented to raise the tab box as well

Definition at line 309 of file tabbox.cpp.

void KWinInternal::TabBox::hideEvent QHideEvent *   )  [protected]
 

hide the icon box if necessary

Definition at line 318 of file tabbox.cpp.

void KWinInternal::TabBox::drawContents QPainter *   )  [protected]
 

Paints the tab box

Definition at line 325 of file tabbox.cpp.

References currentClient(), KWinInternal::Workspace::currentDesktop(), currentDesktop(), KWinInternal::Workspace::desktopName(), KWinInternal::kwin_get_menu_pix_hack(), mode(), KWinInternal::Workspace::nextDesktopFocusChain(), and workspace().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kwin Library Version 3.4.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jun 14 01:54:31 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003