kwin Library API Documentation

KWinInternal::Placement Class Reference

Collaboration diagram for KWinInternal::Placement:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Policy {
  NoPlacement, Default, Random, Smart,
  Cascade, Centered, ZeroCornered, UnderMouse,
  OnMainWindow
}

Public Member Functions

 Placement (Workspace *w)
void place (Client *c, QRect &area)
void placeAtRandom (Client *c, const QRect &area)
void placeCascaded (Client *c, const QRect &area, bool re_init=false)
void placeSmart (Client *c, const QRect &area)
void placeCentered (Client *c, const QRect &area)
void placeZeroCornered (Client *c, const QRect &area)
void placeDialog (Client *c, QRect &area)
void placeUtility (Client *c, QRect &area)

Static Public Member Functions

static Policy policyFromString (const QString &policy, bool no_special)
static const char * policyToString (Policy policy)

Detailed Description

Definition at line 25 of file placement.h.


Member Enumeration Documentation

enum KWinInternal::Placement::Policy
 

Placement policies.

How workspace decides the way windows get positioned on the screen. The better the policy, the heavier the resource use. Normally you don't have to worry. What the WM adds to the startup time is nil compared to the creation of the window itself in the memory

Definition at line 47 of file placement.h.


Member Function Documentation

void KWinInternal::Placement::place Client c,
QRect &  area
 

Places the client c according to the workspace's layout policy

Definition at line 49 of file placement.cpp.

References KWinInternal::WindowRules::checkPlacement(), KWinInternal::Client::isDialog(), KWinInternal::Client::isSplash(), KWinInternal::Client::isUtility(), KWinInternal::options, placeDialog(), KWinInternal::Options::placement, placeUtility(), and KWinInternal::Client::rules().

Referenced by KWinInternal::Workspace::place(), and placeUtility().

void KWinInternal::Placement::placeAtRandom Client c,
const QRect &  area
 

Place the client c according to a simply "random" placement algorithm.

Definition at line 90 of file placement.cpp.

References KWinInternal::Client::height(), KWinInternal::Client::move(), and KWinInternal::Client::width().

void KWinInternal::Placement::placeCascaded Client c,
const QRect &  area,
bool  re_init = false
 

Place windows in a cascading order, remembering positions for each desktop

Definition at line 304 of file placement.cpp.

References KWinInternal::Workspace::currentDesktop(), KWinInternal::Client::desktop(), KWinInternal::Client::height(), KWinInternal::Client::isOnAllDesktops(), KWinInternal::Client::move(), placeSmart(), and KWinInternal::Client::width().

Referenced by KWinInternal::Workspace::cascadeDesktop().

void KWinInternal::Placement::placeSmart Client c,
const QRect &  area
 

Place the client c according to a really smart placement algorithm :-)

Definition at line 133 of file placement.cpp.

References KWinInternal::Workspace::currentDesktop(), KWinInternal::Client::desktop(), KWinInternal::Client::height(), KWinInternal::Client::isOnAllDesktops(), KWinInternal::Client::isShown(), KWinInternal::Client::move(), KWinInternal::Workspace::stackingOrder(), and KWinInternal::Client::width().

Referenced by placeCascaded(), KWinInternal::Workspace::placeSmart(), and KWinInternal::Workspace::unclutterDesktop().

void KWinInternal::Placement::placeCentered Client c,
const QRect &  area
 

Place windows centered, on top of all others

Definition at line 389 of file placement.cpp.

References KWinInternal::Client::height(), KWinInternal::Client::move(), and KWinInternal::Client::width().

void KWinInternal::Placement::placeZeroCornered Client c,
const QRect &  area
 

Place windows in the (0,0) corner, on top of all others

Definition at line 405 of file placement.cpp.

References KWinInternal::Client::move().


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