kwin Library API Documentation

B2::B2Client Class Reference

Inheritance diagram for B2::B2Client:

Inheritance graph
[legend]
Collaboration diagram for B2::B2Client:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 B2Client (KDecorationBridge *b, KDecorationFactory *f)
 ~B2Client ()
void init ()
void unobscureTitlebar ()
void titleMoveAbs (int new_ofs)
void titleMoveRel (int xdiff)
virtual bool drawbound (const QRect &geom, bool clear)

Protected Member Functions

void resizeEvent (QResizeEvent *)
void paintEvent (QPaintEvent *)
void showEvent (QShowEvent *)
void windowWrapperShowEvent (QShowEvent *)
void captionChange ()
void desktopChange ()
void shadeChange ()
void activeChange ()
void maximizeChange ()
void iconChange ()
void doShape ()
Position mousePosition (const QPoint &p) const
void resize (const QSize &)
void borders (int &, int &, int &, int &) const
QSize minimumSize () const
bool eventFilter (QObject *, QEvent *)

Friends

class B2Titlebar

Detailed Description

Definition at line 93 of file b2client.h.


Member Function Documentation

void B2::B2Client::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 442 of file b2client.cpp.

bool B2::B2Client::drawbound const QRect &  geom,
bool  clear
[virtual]
 

This function may be reimplemented to provide custom bound drawing for transparent moving or resizing of the window.

False should be returned if the default implementation should be used. Note that if you e.g. paint the outline using a 5 pixels wide line, you should compensate for the 2 pixels that would make the window look larger.

Parameters:
geom The geometry at this the bound should be drawn
clear true if the bound should be cleared
See also:
workspaceWidget() and geometry().

Reimplemented from KDecoration.

Definition at line 1200 of file b2client.cpp.

void B2::B2Client::captionChange  )  [protected, virtual]
 

This function is called whenever the caption changes.

Use caption() to get it.

Implements KDecoration.

Definition at line 687 of file b2client.cpp.

References B2::buttonSize, unobscureTitlebar(), and KDecoration::width().

void B2::B2Client::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 895 of file b2client.cpp.

void B2::B2Client::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 939 of file b2client.cpp.

void B2::B2Client::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 924 of file b2client.cpp.

void B2::B2Client::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 906 of file b2client.cpp.

void B2::B2Client::iconChange  )  [protected, virtual]
 

This function is called whenever the window icon changes.

Use icon() to get it.

Implements KDecoration.

Definition at line 632 of file b2client.cpp.

KDecoration::Position B2::B2Client::mousePosition const QPoint &  p  )  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 829 of file b2client.cpp.

void B2::B2Client::resize const QSize &   )  [protected, 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 958 of file b2client.cpp.

References B2::pixmap.

void B2::B2Client::borders int &  ,
int &  ,
int &  ,
int & 
const [protected, 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 963 of file b2client.cpp.

QSize B2::B2Client::minimumSize  )  const [protected, 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 951 of file b2client.cpp.


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:21 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003