34class KDecorationOptionsPrivate;
35class KDecorationBridge;
36class KDecorationPrivate;
37class KDecorationFactory;
39#define KWIN_EXPORT TDE_EXPORT
54 PositionCenter = 0x00,
58 PositionBottom = 0x08,
59 PositionTopLeft = PositionLeft | PositionTop,
60 PositionTopRight = PositionRight | PositionTop,
61 PositionBottomLeft = PositionLeft | PositionBottom,
62 PositionBottomRight = PositionRight | PositionBottom
72 MaximizeHorizontal = 2,
74 MaximizeFull = MaximizeVertical | MaximizeHorizontal
93 ToggleStoreSettingsOp = WindowRulesOp,
100 SetupWindowShortcutOp,
128 SettingDecoration = 1 << 0,
129 SettingColors = 1 << 1,
130 SettingFont = 1 << 2,
131 SettingButtons = 1 << 3,
132 SettingTooltips = 1 << 4,
133 SettingBorder = 1 << 5
158 AbilityAnnounceButtons = 0,
159 AbilityButtonMenu = 1000,
160 AbilityButtonOnAllDesktops = 1001,
161 AbilityButtonSpacer = 1002,
162 AbilityButtonHelp = 1003,
163 AbilityButtonMinimize = 1004,
164 AbilityButtonMaximize = 1005,
165 AbilityButtonClose = 1006,
166 AbilityButtonAboveOthers = 1007,
167 AbilityButtonBelowOthers = 1008,
168 AbilityButtonShade = 1009,
169 AbilityButtonResize = 1010,
170 ABILITY_DUMMY = 10000000
173 enum Requirement { REQUIREMENT_DUMMY = 1000000 };
176class KDecorationProvides
180 virtual bool provides( Requirement req ) = 0;
201 const TQColor& color(
ColorType type,
bool active=
true)
const;
209 const TQColorGroup& colorGroup(
ColorType type,
bool active=
true)
const;
217 const TQFont& font(
bool active=
true,
bool small =
false)
const;
225 bool customButtonPositions()
const;
247 TQString titleButtonsLeft()
const;
259 TQString titleButtonsRight()
const;
265 bool showTooltips()
const;
277 BorderSize preferredBorderSize( KDecorationFactory* factory )
const;
285 bool moveResizeMaximizedWindows()
const;
290 WindowOperation operationMaxButtonClick( TQt::ButtonState button )
const;
295 virtual unsigned long updateSettings() = 0;
301 KDecorationOptionsPrivate* d;
322 KDecoration( KDecorationBridge* bridge, KDecorationFactory* factory );
338 bool isActive()
const;
342 bool isCloseable()
const;
346 bool isMaximizable()
const;
356 bool isMinimizable()
const;
361 bool providesContextHelp()
const;
372 bool isOnAllDesktops()
const;
376 bool isModal()
const;
380 bool isShadeable()
const;
389 bool isShade()
const;
397 bool isSetShade()
const;
401 bool keepAbove()
const;
405 bool keepBelow()
const;
409 bool isMovable()
const;
413 bool isResizable()
const;
437 NET::WindowType windowType(
unsigned long supported_types )
const;
441 TQIconSet icon()
const;
445 TQString caption()
const;
472 void showWindowMenu(
const TQRect &pos );
477 void showWindowMenu( TQPoint pos );
491 void setMask(
const TQRegion& reg,
int mode = 0 );
501 bool isPreview()
const;
505 TQRect geometry()
const;
511 TQRect iconGeometry()
const;
520 TQRegion unobscuredRegion(
const TQRegion& r )
const;
525 TQWidget* workspaceWidget()
const;
539 WId windowId()
const;
553 void processMousePressEvent( TQMouseEvent* e );
569 virtual Position mousePosition(
const TQPoint& p )
const = 0;
584 virtual void borders(
int& left,
int& right,
int& top,
int& bottom )
const = 0;
592 virtual void resize(
const TQSize& s ) = 0;
654 virtual bool drawbound(
const TQRect& geom,
bool clear );
665 virtual bool animateMinimize(
bool minimize );
670 virtual bool windowDocked(
Position side );
677 virtual void reset(
unsigned long changed );
687 void setMainWidget( TQWidget* );
697 void createMainWidget( TQt::WFlags flags = 0 );
701 TQWidget* initialParentWidget()
const;
708 TQt::WFlags initialWFlags()
const;
715 void helperShowHide(
bool show );
723 const TQWidget* widget()
const;
727 KDecorationFactory* factory()
const;
735 void ungrabXServer();
754 void maximize( ButtonState button );
768 void showContextHelp();
773 void setDesktop(
int desktop );
777 void toggleOnAllDesktops();
782 void titlebarDblClickOperation();
789 void titlebarMouseWheelOperation(
int delta );
794 void setShade(
bool set );
799 void setKeepAbove(
bool set );
804 void setKeepBelow(
bool set );
808 void emitKeepAboveChanged(
bool above ) { emit keepAboveChanged( above ); }
812 void emitKeepBelowChanged(
bool below ) { emit keepBelowChanged( below ); }
814 KDecorationBridge* bridge_;
816 KDecorationFactory* factory_;
819 KDecorationPrivate* d;
857 return desktop() == NET::OnAllDesktops;
This class provides a namespace for all decoration related classes.
Position
These values represent positions inside an area.
ColorType
Basic color types that should be recognized by all decoration styles.
@ ColorTitleBar
The color for the titlebar.
@ ColorButtonBg
The color to use for the titlebar buttons.
@ ColorFont
The titlebar text color.
@ ColorFrame
The color for the window frame (border)
@ ColorTitleBlend
The blend color for the titlebar.
@ ColorHandle
The color for the resize handle.
Ability
Used to find out which features the decoration supports.
MaximizeMode
Maximize mode.
@ BorderVeryHuge
Very huge borders.
@ BorderOversized
Oversized borders.
@ BorderHuge
Huge borders.
@ BorderVeryLarge
Very large borders.
@ BorderTiny
Minimal borders.
@ BorderNormal
Standard size borders, the default setting.
@ BorderLarge
Larger borders.
This class holds various configuration settings for the decoration.
This is the base class for a decoration object.
virtual void iconChange()=0
This function is called whenever the window icon changes.
virtual void desktopChange()=0
This function is called whenever the desktop for the window changes.
virtual void resize(const TQSize &s)=0
This method is called by twin when the style should resize the decoration window.
virtual void init()=0
This function is called immediately after the decoration object is created.
TQRect geometry() const
Returns the geometry of the decoration.
virtual void captionChange()=0
This function is called whenever the caption changes.
int height() const
Convenience function that returns the height of the decoration.
TQWidget * widget()
Returns the main widget for the decoration.
KDecorationFactory * factory() const
Returns the factory that created this decoration.
virtual void shadeChange()=0
This function is called whenever the window is shaded or unshaded.
virtual void maximizeChange()=0
This function is called whenever the maximalization state of the window changes.
virtual void activeChange()=0
This function is called whenever the window either becomes or stops being active.
int desktop() const
Returns the number of the virtual desktop the decorated window is currently on (including NET::OnAllD...
void keepBelowChanged(bool)
This signal is emitted whenever the window's keep-below state changes.
void keepAboveChanged(bool)
This signal is emitted whenever the window's keep-above state changes.
bool isOnAllDesktops() const
Convenience function that returns true if the window is on all virtual desktops.
int width() const
Convenience function that returns the width of the decoration.
virtual void borders(int &left, int &right, int &top, int &bottom) const =0
This function should return the distance from each window side to the inner window.
virtual TQSize minimumSize() const =0
This function should return the minimum required size for the decoration.