31 #include <tqiconset.h> 32 #include <netwm_def.h> 33 #include <tdeversion.h> 35 class KDecorationOptionsPrivate;
36 class KDecorationBridge;
37 class KDecorationPrivate;
38 class KDecorationFactory;
40 #define KWIN_EXPORT TDE_EXPORT 55 PositionCenter = 0x00,
59 PositionBottom = 0x08,
60 PositionTopLeft = PositionLeft | PositionTop,
61 PositionTopRight = PositionRight | PositionTop,
62 PositionBottomLeft = PositionLeft | PositionBottom,
63 PositionBottomRight = PositionRight | PositionBottom
73 MaximizeHorizontal = 2,
74 MaximizeFull = MaximizeVertical | MaximizeHorizontal
94 ToggleStoreSettingsOp = WindowRulesOp,
101 SetupWindowShortcutOp,
129 SettingDecoration = 1 << 0,
130 SettingColors = 1 << 1,
131 SettingFont = 1 << 2,
132 SettingButtons = 1 << 3,
133 SettingTooltips = 1 << 4,
134 SettingBorder = 1 << 5
159 AbilityAnnounceButtons = 0,
160 AbilityButtonMenu = 1000,
161 AbilityButtonOnAllDesktops = 1001,
162 AbilityButtonSpacer = 1002,
163 AbilityButtonHelp = 1003,
164 AbilityButtonMinimize = 1004,
165 AbilityButtonMaximize = 1005,
166 AbilityButtonClose = 1006,
167 AbilityButtonAboveOthers = 1007,
168 AbilityButtonBelowOthers = 1008,
169 AbilityButtonShade = 1009,
170 AbilityButtonResize = 1010,
171 ABILITY_DUMMY = 10000000
174 enum Requirement { REQUIREMENT_DUMMY = 1000000 };
177 class KDecorationProvides
181 virtual bool provides( Requirement req ) = 0;
202 const TQColor& color(
ColorType type,
bool active=
true)
const;
210 const TQColorGroup& colorGroup(
ColorType type,
bool active=
true)
const;
218 const TQFont& font(
bool active=
true,
bool small =
false)
const;
226 bool customButtonPositions()
const;
248 TQString titleButtonsLeft()
const;
260 TQString titleButtonsRight()
const;
266 bool showTooltips()
const;
278 BorderSize preferredBorderSize( KDecorationFactory* factory )
const;
286 bool moveResizeMaximizedWindows()
const;
291 WindowOperation operationMaxButtonClick( TQt::ButtonState button )
const;
296 virtual unsigned long updateSettings() = 0;
302 KDecorationOptionsPrivate* d;
323 KDecoration( KDecorationBridge* bridge, KDecorationFactory* factory );
339 bool isActive()
const;
343 bool isCloseable()
const;
347 bool isMaximizable()
const;
357 bool isMinimizable()
const;
362 bool providesContextHelp()
const;
373 bool isOnAllDesktops()
const;
377 bool isModal()
const;
381 bool isShadeable()
const;
390 bool isShade()
const;
398 bool isSetShade()
const;
402 bool keepAbove()
const;
406 bool keepBelow()
const;
410 bool isMovable()
const;
414 bool isResizable()
const;
438 NET::WindowType windowType(
unsigned long supported_types )
const;
442 TQIconSet icon()
const;
446 TQString caption()
const;
473 void showWindowMenu(
const TQRect &pos );
478 void showWindowMenu( TQPoint pos );
492 void setMask(
const TQRegion& reg,
int mode = 0 );
502 bool isPreview()
const;
506 TQRect geometry()
const;
512 TQRect iconGeometry()
const;
521 TQRegion unobscuredRegion(
const TQRegion& r )
const;
526 TQWidget* workspaceWidget()
const;
540 WId windowId()
const;
554 void processMousePressEvent( TQMouseEvent* e );
563 virtual void init() = 0;
570 virtual Position mousePosition(
const TQPoint& p )
const = 0;
585 virtual void borders(
int& left,
int& right,
int& top,
int& bottom )
const = 0;
593 virtual void resize(
const TQSize& s ) = 0;
599 virtual TQSize minimumSize()
const = 0;
604 virtual void activeChange() = 0;
608 virtual void captionChange() = 0;
612 virtual void iconChange() = 0;
617 virtual void maximizeChange() = 0;
623 virtual void desktopChange() = 0;
628 virtual void shadeChange() = 0;
629 #if KDE_IS_VERSION( 3, 90, 0 ) 630 #warning Redo all the XYZChange() virtuals as signals. 637 void keepAboveChanged(
bool );
642 void keepBelowChanged(
bool );
657 virtual bool drawbound(
const TQRect& geom,
bool clear );
668 virtual bool animateMinimize(
bool minimize );
673 virtual bool windowDocked(
Position side );
680 virtual void reset(
unsigned long changed );
690 void setMainWidget( TQWidget* );
700 void createMainWidget( TQt::WFlags flags = 0 );
704 TQWidget* initialParentWidget()
const;
711 TQt::WFlags initialWFlags()
const;
718 void helperShowHide(
bool show );
726 const TQWidget* widget()
const;
730 KDecorationFactory* factory()
const;
738 void ungrabXServer();
771 #if KDE_IS_VERSION( 3, 90, 0 ) 772 #warning Update the docs. 774 void maximize( ButtonState button );
788 void showContextHelp();
793 void setDesktop(
int desktop );
797 void toggleOnAllDesktops();
802 void titlebarDblClickOperation();
809 void titlebarMouseWheelOperation(
int delta );
814 void setShade(
bool set );
819 void setKeepAbove(
bool set );
824 void setKeepBelow(
bool set );
828 void emitKeepAboveChanged(
bool above ) { emit keepAboveChanged( above ); }
832 void emitKeepBelowChanged(
bool below ) { emit keepBelowChanged( below ); }
834 KDecorationBridge* bridge_;
836 KDecorationFactory* factory_;
839 KDecorationPrivate* d;
877 return desktop() == NET::OnAllDesktops;
882 return geometry().width();
887 return geometry().height();
The color for the titlebar.
This class provides a namespace for all decoration related classes.
The color for the window frame (border)
This is the base class for a decoration object.
The color to use for the titlebar buttons.
Ability
Used to find out which features the decoration supports.
bool isOnAllDesktops() const
Convenience function that returns true if the window is on all virtual desktops.
The blend color for the titlebar.
The color for the resize handle.
int height() const
Convenience function that returns the height of the decoration.
TQWidget * widget()
Returns the main widget for the decoration.
Standard size borders, the default setting.
Position
These values represent positions inside an area.
int width() const
Convenience function that returns the width of the decoration.
KDecorationFactory * factory() const
Returns the factory that created this decoration.
ColorType
Basic color types that should be recognized by all decoration styles.
This class holds various configuration settings for the decoration.
MaximizeMode
Maximize mode.