kwin Library API Documentation

placement.h

00001 /***************************************************************** 00002 KWin - the KDE window manager 00003 This file is part of the KDE project. 00004 00005 Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org> 00006 Copyright (C) 1997 to 2002 Cristian Tibirna <tibirna@kde.org> 00007 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org> 00008 00009 You can Freely distribute this program under the GNU General Public 00010 License. See the file "COPYING" for the exact licensing terms. 00011 ******************************************************************/ 00012 00013 #ifndef KWIN_PLACEMENT_H 00014 #define KWIN_PLACEMENT_H 00015 00016 #include <qpoint.h> 00017 #include <qvaluelist.h> 00018 00019 namespace KWinInternal 00020 { 00021 00022 class Workspace; 00023 class Client; 00024 00025 class Placement 00026 { 00027 public: 00028 00029 Placement(Workspace* w); 00030 00031 void place(Client* c, QRect& area ); 00032 00033 void placeAtRandom (Client* c, const QRect& area ); 00034 void placeCascaded (Client* c, const QRect& area, bool re_init = false); 00035 void placeSmart (Client* c, const QRect& area ); 00036 void placeCentered (Client* c, const QRect& area ); 00037 void placeZeroCornered(Client* c, const QRect& area ); 00038 void placeDialog (Client* c, QRect& area ); 00039 void placeUtility (Client* c, QRect& area ); 00040 00047 enum Policy 00048 { 00049 NoPlacement, // not really a placement 00050 Default, // special, means to use the global default 00051 Random, 00052 Smart, 00053 Cascade, 00054 Centered, 00055 ZeroCornered, 00056 UnderMouse, // special 00057 OnMainWindow // special 00058 }; 00059 00060 static Policy policyFromString( const QString& policy, bool no_special ); 00061 static const char* policyToString( Policy policy ); 00062 00063 private: 00064 00065 void place(Client* c, Policy policy, QRect& area); 00066 void placeUnderMouse(Client* c, QRect& area ); 00067 void placeOnMainWindow(Client* c, QRect& area ); 00068 QRect checkArea( const Client*c, const QRect& area ); 00069 00070 Placement(); 00071 00072 //CT needed for cascading+ 00073 struct DesktopCascadingInfo 00074 { 00075 QPoint pos; 00076 int col; 00077 int row; 00078 }; 00079 00080 QValueList<DesktopCascadingInfo> cci; 00081 00082 Workspace* m_WorkspacePtr; 00083 }; 00084 00085 } // namespace 00086 00087 #endif
KDE Logo
This file is part of the documentation for kwin Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 13 21:47:05 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003