kwin Library API Documentation

plastik.h

00001 /* Plastik KWin window decoration
00002   Copyright (C) 2003 Sandro Giessl <ceebx@users.sourceforge.net>
00003 
00004   based on the window decoration "Web":
00005   Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
00006 
00007   This program is free software; you can redistribute it and/or
00008   modify it under the terms of the GNU General Public
00009   License as published by the Free Software Foundation; either
00010   version 2 of the License, or (at your option) any later version.
00011 
00012   This program is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015   General Public License for more details.
00016 
00017   You should have received a copy of the GNU General Public License
00018   along with this program; see the file COPYING.  If not, write to
00019   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00020   Boston, MA 02111-1307, USA.
00021  */
00022 
00023 #ifndef KNIFTY_H
00024 #define KNIFTY_H
00025 
00026 #include <kdecoration.h>
00027 #include <kdecorationfactory.h>
00028 
00029 namespace KWinPlastik {
00030 
00031 #include <qfont.h>
00032 
00033 enum ButtonType {
00034     HelpButton=0,
00035     MaxButton,
00036     MinButton,
00037     CloseButton,
00038     MenuButton,
00039     OnAllDesktopsButton,
00040     AboveButton,
00041     BelowButton,
00042     ShadeButton,
00043     NumButtons
00044 };
00045 
00046 enum ColorType {
00047     WindowContour=0,
00048     TitleGradientFrom,
00049     TitleGradientTo,
00050     TitleGradientToTop,
00051     TitleHighlightTop,
00052     SideHighlightLeft,
00053     SideHighlightRight,
00054     SideHighlightBottom,
00055     Border,
00056     TitleFont
00057 };
00058 
00059 class PlastikHandler: public QObject, public KDecorationFactory
00060 {
00061     Q_OBJECT
00062 public:
00063     PlastikHandler();
00064     ~PlastikHandler();
00065     virtual bool reset( unsigned long changed );
00066 
00067     virtual KDecoration* createDecoration( KDecorationBridge* );
00068     virtual bool supports( Ability ability );
00069 
00070     static bool initialized() { return m_initialized; }
00071 
00072     static int  titleHeight() { return m_titleHeight; }
00073     static int  titleHeightTool() { return m_titleHeightTool; }
00074     static QFont titleFont() { return m_titleFont; }
00075     static QFont titleFontTool() { return m_titleFontTool; }
00076     static bool titleShadow() { return m_titleShadow; }
00077     static int  borderSize() { return m_borderSize; }
00078     static bool animateButtons() { return m_animateButtons; }
00079     static bool menuClose() { return m_menuClose; }
00080     static Qt::AlignmentFlags titleAlign() { return m_titleAlign; }
00081     static bool reverseLayout() { return m_reverse; }
00082     static QColor getColor(KWinPlastik::ColorType type, const bool active = true);
00083     QValueList< PlastikHandler::BorderSize >  borderSizes() const;
00084 private:
00085     void readConfig();
00086 
00087     static bool m_titleShadow;
00088     static bool m_shrinkBorders;
00089     static bool m_animateButtons;
00090     static bool m_menuClose;
00091     static bool m_reverse;
00092     static int  m_borderSize;
00093     static int  m_titleHeight;
00094     static int  m_titleHeightTool;
00095     static QFont m_titleFont;
00096     static QFont m_titleFontTool;
00097     static Qt::AlignmentFlags m_titleAlign;
00098 
00099     static bool m_initialized;
00100 };
00101 
00102 } // KWinPlastik
00103 
00104 #endif // KNIFT_H
KDE Logo
This file is part of the documentation for kwin Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jun 14 19:06:09 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003