plastik.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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 }
00103
00104 #endif // KNIFT_H
This file is part of the documentation for kwin Library Version 3.4.0.