kwin Library API Documentation

KWinPlastik::PlastikClient Class Reference

Inheritance diagram for KWinPlastik::PlastikClient:

Inheritance graph
[legend]
Collaboration diagram for KWinPlastik::PlastikClient:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PlastikClient (KDecorationBridge *bridge, KDecorationFactory *factory)
 ~PlastikClient ()
virtual void init ()
virtual void borders (int &left, int &right, int &top, int &bottom) const
virtual void resize (const QSize &)
virtual QSize minimumSize () const
virtual void show ()
virtual bool eventFilter (QObject *o, QEvent *e)
QPixmap getTitleBarTile (bool active) const

Protected Member Functions

virtual void resizeEvent ()
virtual void paintEvent (QPaintEvent *e)
virtual void mouseDoubleClickEvent (QMouseEvent *e)
virtual void maximizeChange ()
virtual void desktopChange ()
virtual void shadeChange ()
virtual void doShape ()
virtual void reset (unsigned long changed)
virtual void captionChange ()
virtual void iconChange ()
virtual void activeChange ()
virtual Position mousePosition (const QPoint &point) const

Detailed Description

Definition at line 37 of file plastikclient.h.


Member Function Documentation

void KWinPlastik::PlastikClient::init  )  [virtual]
 

This function is called immediately after the decoration object is created.

Due to some technical reasons, initialization should be done here instead of in the constructor.

Implements KDecoration.

Definition at line 82 of file plastikclient.cpp.

References KDecoration::createMainWidget(), KDecoration::keepAboveChanged(), KDecoration::keepBelowChanged(), KWinPlastik::PlastikHandler::titleFont(), KWinPlastik::PlastikHandler::titleFontTool(), KWinPlastik::PlastikHandler::titleHeight(), KWinPlastik::PlastikHandler::titleHeightTool(), and KDecoration::widget().

void KWinPlastik::PlastikClient::borders int &  left,
int &  right,
int &  top,
int &  bottom
const [virtual]
 

This function should return the distance from each window side to the inner window.

The sizes may depend on the state of the decorated window, such as whether it's shaded. Decorations often turn off their bottom border when the window is shaded, and turn off their left/right/bottom borders when the window is maximized and moving and resizing of maximized windows is disabled. This function mustn't do any repaints or resizes. Also, if the sizes returned by this function don't match the real values, this may result in drawing errors or other problems.

See also:
KDecorationOptions::moveResizeMaximizedWindows()

Implements KDecoration.

Definition at line 1029 of file plastikclient.cpp.

References KWinPlastik::PlastikHandler::borderSize(), KDecorationDefines::MaximizeFull, KDecoration::maximizeMode(), KDecoration::options(), and KDecoration::widget().

void KWinPlastik::PlastikClient::resize const QSize &   )  [virtual]
 

This method is called by kwin when the style should resize the decoration window.

The usual implementation is to resize the main widget of the decoration to the given size.

Parameters:
s Specifies the new size of the decoration window.

Implements KDecoration.

Definition at line 1073 of file plastikclient.cpp.

References KDecoration::widget().

QSize KWinPlastik::PlastikClient::minimumSize  )  const [virtual]
 

This function should return the minimum required size for the decoration.

Note that the returned size shouldn't be too large, because it will be used to keep the decorated window at least as large.

Implements KDecoration.

Definition at line 1063 of file plastikclient.cpp.

References KDecoration::widget().

void KWinPlastik::PlastikClient::maximizeChange  )  [protected, virtual]
 

This function is called whenever the maximalization state of the window changes.

Use maximizeMode() to get the current state.

Implements KDecoration.

Definition at line 773 of file plastikclient.cpp.

References KWinPlastik::PlastikHandler::initialized(), KDecorationDefines::MaximizeFull, KDecoration::maximizeMode(), KWinPlastik::PlastikButton::setOn(), and KWinPlastik::PlastikButton::setTipText().

void KWinPlastik::PlastikClient::desktopChange  )  [protected, virtual]
 

This function is called whenever the desktop for the window changes.

Use desktop() or isOnAllDesktops() to find out the current desktop on which the window is.

Implements KDecoration.

Definition at line 785 of file plastikclient.cpp.

References KDecoration::isOnAllDesktops(), KWinPlastik::PlastikButton::setOn(), and KWinPlastik::PlastikButton::setTipText().

void KWinPlastik::PlastikClient::shadeChange  )  [protected, virtual]
 

This function is called whenever the window is shaded or unshaded.

Use isShade() to get the current state.

Implements KDecoration.

Definition at line 795 of file plastikclient.cpp.

References KDecoration::isSetShade(), KWinPlastik::PlastikButton::setOn(), and KWinPlastik::PlastikButton::setTipText().

void KWinPlastik::PlastikClient::reset unsigned long  changed  )  [protected, virtual]
 

This function is called to reset the decoration on settings changes.

It is usually invoked by calling KDecorationFactory::resetDecorations().

Parameters:
changed Specifies which settings were changed, given by the SettingXXX masks

Reimplemented from KDecoration.

Definition at line 667 of file plastikclient.cpp.

References KWinPlastik::PlastikButton::setSize(), KDecorationDefines::SettingColors, KDecorationDefines::SettingFont, KWinPlastik::PlastikHandler::titleFont(), KWinPlastik::PlastikHandler::titleFontTool(), KWinPlastik::PlastikHandler::titleHeight(), KWinPlastik::PlastikHandler::titleHeightTool(), and KDecoration::widget().

void KWinPlastik::PlastikClient::captionChange  )  [protected, virtual]
 

This function is called whenever the caption changes.

Use caption() to get it.

Implements KDecoration.

Definition at line 661 of file plastikclient.cpp.

References KDecoration::widget().

void KWinPlastik::PlastikClient::iconChange  )  [protected, virtual]
 

This function is called whenever the window icon changes.

Use icon() to get it.

Implements KDecoration.

Definition at line 758 of file plastikclient.cpp.

void KWinPlastik::PlastikClient::activeChange  )  [protected, virtual]
 

This function is called whenever the window either becomes or stops being active.

Use isActive() to find out the current state.

Implements KDecoration.

Definition at line 766 of file plastikclient.cpp.

References KDecoration::widget().

PlastikClient::Position KWinPlastik::PlastikClient::mousePosition const QPoint &  point  )  const [protected, virtual]
 

This function should return mouse cursor position in the decoration.

Positions at the edge will result in window resizing with mouse button pressed, center position will result in moving.

Implements KDecoration.

Definition at line 702 of file plastikclient.cpp.

References KWinPlastik::PlastikHandler::borderSize().


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 Fri Nov 4 00:49:19 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003