kwin Library API Documentation

windows.h

00001 /*
00002  * windows.h
00003  *
00004  * Copyright (c) 1997 Patrick Dowler dowler@morgul.fsh.uvic.ca
00005  * Copyright (c) 2001 Waldo Bastian bastian@kde.org
00006  *
00007  *  This program is free software; you can redistribute it and/or modify
00008  *  it under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation; either version 2 of the License, or
00010  *  (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
00015  *  GNU 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; if not, write to the Free Software
00019  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00020  */
00021 
00022 #ifndef __KWINDOWCONFIG_H__
00023 #define __KWINDOWCONFIG_H__
00024 
00025 #include <qwidget.h>
00026 #include <kcmodule.h>
00027 #include <config.h>
00028 
00029 class QRadioButton;
00030 class QCheckBox;
00031 class QPushButton;
00032 class QComboBox;
00033 class QGroupBox;
00034 class QLabel;
00035 class QSlider;
00036 class QButtonGroup;
00037 class QSpinBox;
00038 class QVButtonGroup;
00039 
00040 class KColorButton;
00041 class KIntNumInput;
00042 
00043 #define TRANSPARENT 0
00044 #define OPAQUE      1
00045 
00046 #define CLICK_TO_FOCUS     0
00047 #define FOCUS_FOLLOW_MOUSE 1
00048 
00049 #define TITLEBAR_PLAIN  0
00050 #define TITLEBAR_SHADED 1
00051 
00052 #define RESIZE_TRANSPARENT  0
00053 #define RESIZE_OPAQUE       1
00054 
00055 #define SMART_PLACEMENT        0
00056 #define CASCADE_PLACEMENT      1
00057 #define RANDOM_PLACEMENT       2
00058 #define CENTERED_PLACEMENT     3
00059 #define ZEROCORNERED_PLACEMENT 4
00060 #define INTERACTIVE_PLACEMENT  5
00061 #define MANUAL_PLACEMENT       6
00062 
00063 #define  CLICK_TO_FOCUS               0
00064 #define  FOCUS_FOLLOWS_MOUSE          1
00065 #define  FOCUS_UNDER_MOUSE            2
00066 #define  FOCUS_STRICTLY_UNDER_MOUSE   3
00067 
00068 class QSpinBox;
00069 
00070 class KFocusConfig : public KCModule
00071 {
00072   Q_OBJECT
00073 public:
00074   KFocusConfig( bool _standAlone, KConfig *_config, QWidget *parent=0, const char* name=0 );
00075   ~KFocusConfig();
00076 
00077   void load();
00078   void save();
00079   void defaults();
00080 
00081 private slots:
00082   void setDelayFocusEnabled();
00083   void setAutoRaiseEnabled();
00084   void autoRaiseOnTog(bool);//CT 23Oct1998
00085   void delayFocusOnTog(bool);
00086   void clickRaiseOnTog(bool);
00087     void changed() { emit KCModule::changed(true); }
00088 
00089 
00090 private:
00091 
00092   int getFocus( void );
00093   int getAutoRaiseInterval( void );
00094   int getDelayFocusInterval( void );
00095 
00096   void setFocus(int);
00097   void setAutoRaiseInterval(int);
00098   void setAutoRaise(bool);
00099   void setDelayFocusInterval(int);
00100   void setDelayFocus(bool);
00101   void setClickRaise(bool);
00102   void setAltTabMode(bool);
00103   void setTraverseAll(bool);
00104   void setRollOverDesktops(bool);
00105   void setShowPopupinfo(bool);
00106 
00107   QButtonGroup *fcsBox;
00108   QComboBox *focusCombo;
00109   QCheckBox *autoRaiseOn;
00110   QCheckBox *delayFocusOn;
00111   QCheckBox *clickRaiseOn;
00112   KIntNumInput *autoRaise;
00113   KIntNumInput *delayFocus;
00114 
00115   QButtonGroup *kbdBox;
00116   QCheckBox    *altTabPopup;
00117   QCheckBox    *traverseAll;
00118   QCheckBox    *rollOverDesktops;
00119   QCheckBox    *showPopupinfo;
00120 
00121   KConfig *config;
00122   bool     standAlone;
00123 };
00124 
00125 class KMovingConfig : public KCModule
00126 {
00127   Q_OBJECT
00128 public:
00129   KMovingConfig( bool _standAlone, KConfig *config, QWidget *parent=0, const char* name=0 );
00130   ~KMovingConfig();
00131 
00132   void load();
00133   void save();
00134   void defaults();
00135 
00136 private slots:
00137   void setMinimizeAnim( bool );
00138   void setMinimizeAnimSpeed( int );
00139     void changed() { emit KCModule::changed(true); }
00140 
00141 private:
00142   int getMove( void );
00143   bool getMinimizeAnim( void );
00144   int getMinimizeAnimSpeed( void );
00145   int getResizeOpaque ( void );
00146   bool getGeometryTip( void ); //KS
00147   int getPlacement( void ); //CT
00148 
00149   void setMove(int);
00150   void setResizeOpaque(int);
00151   void setGeometryTip(bool); //KS
00152   void setPlacement(int); //CT
00153   void setMoveResizeMaximized(bool);
00154 
00155   QButtonGroup *windowsBox;
00156   QCheckBox *opaque;
00157   QCheckBox *resizeOpaqueOn;
00158   QCheckBox *geometryTipOn;
00159   QCheckBox* minimizeAnimOn;
00160   QSlider *minimizeAnimSlider;
00161   QLabel *minimizeAnimSlowLabel, *minimizeAnimFastLabel;
00162   QCheckBox *moveResizeMaximized;
00163 
00164   QComboBox *placementCombo;
00165 
00166   KConfig *config;
00167   bool     standAlone;
00168 
00169   int getBorderSnapZone();
00170   void setBorderSnapZone( int );
00171   int getWindowSnapZone();
00172   void setWindowSnapZone( int );
00173 
00174   QVButtonGroup *MagicBox;
00175   KIntNumInput *BrdrSnap, *WndwSnap;
00176   QCheckBox *OverlapSnap;
00177 
00178 };
00179 
00180 class KAdvancedConfig : public KCModule
00181 {
00182   Q_OBJECT
00183 public:
00184   KAdvancedConfig( bool _standAlone, KConfig *config, QWidget *parent=0, const char* name=0 );
00185   ~KAdvancedConfig();
00186 
00187   void load();
00188   void save();
00189   void defaults();
00190 
00191 private slots:
00192   void shadeHoverChanged(bool);
00193 
00194   //copied from kcontrol/konq/kwindesktop, aleXXX
00195   void setEBorders();
00196 
00197   void changed() { emit KCModule::changed(true); }
00198 
00199 private:
00200 
00201   int getShadeHoverInterval (void );
00202   void setAnimateShade(bool);
00203   void setShadeHover(bool);
00204   void setShadeHoverInterval(int);
00205 
00206   QCheckBox *animateShade;
00207   QButtonGroup *shBox;
00208   QCheckBox *shadeHoverOn;
00209   KIntNumInput *shadeHover;
00210 
00211   KConfig *config;
00212   bool     standAlone;
00213 
00214   int getElectricBorders( void );
00215   int getElectricBorderDelay();
00216   void setElectricBorders( int );
00217   void setElectricBorderDelay( int );
00218 
00219   QVButtonGroup *electricBox;
00220   QRadioButton *active_disable;
00221   QRadioButton *active_move;
00222   QRadioButton *active_always;
00223   KIntNumInput *delays;
00224   
00225   void setFocusStealing( int );
00226 
00227   QComboBox* focusStealing;
00228 };
00229 
00230 class KProcess;
00231 class KTranslucencyConfig : public KCModule
00232 {
00233   Q_OBJECT
00234 public:
00235   KTranslucencyConfig( bool _standAlone, KConfig *config, QWidget *parent=0, const char* name=0 );
00236   ~KTranslucencyConfig();
00237   
00238   void load();
00239   void save();
00240   void defaults();
00241   
00242 private:
00243   QCheckBox *useTranslucency;
00244   QCheckBox *activeWindowTransparency;
00245   QCheckBox *inactiveWindowTransparency;
00246   QCheckBox *movingWindowTransparency;
00247   QCheckBox *dockWindowTransparency;
00248   QCheckBox *keepAboveAsActive;
00249   QCheckBox *disableARGB;
00250   QCheckBox *fadeInWindows;
00251   QCheckBox *fadeOnOpacityChange;
00252   QCheckBox *useShadows;
00253   QCheckBox *removeShadowsOnResize;
00254   QCheckBox *removeShadowsOnMove;
00255   QGroupBox *sGroup;
00256   QComboBox *transMode;
00257 //   QPushButton *xcompmgrButton;
00258   KIntNumInput *activeWindowOpacity;
00259   KIntNumInput *inactiveWindowOpacity;
00260   KIntNumInput *movingWindowOpacity;
00261   KIntNumInput *dockWindowOpacity;
00262   KIntNumInput *dockWindowShadowSize;
00263   KIntNumInput *activeWindowShadowSize;
00264   KIntNumInput *inactiveWindowShadowSize;
00265   KIntNumInput *shadowTopOffset;
00266   KIntNumInput *shadowLeftOffset;
00267   KIntNumInput *fadeInSpeed;
00268   KIntNumInput *fadeOutSpeed;
00269   KColorButton *shadowColor;
00270   KConfig *config;
00271   bool     standAlone;
00272   bool alphaActivated;
00273   bool resetKompmgr_;
00274   bool kompmgrAvailable();
00275   bool kompmgrAvailable_;
00276   KProcess *kompmgr;
00277   
00278 private slots:
00279   void resetKompmgr();
00280   void showWarning(bool alphaActivated);
00281 
00282 };
00283 #endif
KDE Logo
This file is part of the documentation for kwin Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 13 19:28:02 2006 by doxygen 1.4.3 written by Dimitri van Heesch, © 1997-2003