kwin Library API Documentation

KDecorationFactory Class Reference

Inheritance diagram for KDecorationFactory:

Inheritance graph
[legend]
Collaboration diagram for KDecorationFactory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KDecorationFactory ()
virtual ~KDecorationFactory ()
virtual KDecorationcreateDecoration (KDecorationBridge *bridge)=0
virtual bool reset (unsigned long changed)
virtual QValueList< BorderSizeborderSizes () const
virtual bool supports (Ability ability)
virtual void checkRequirements (KDecorationProvides *provides)
const KDecorationOptionsoptions ()
bool exists (const KDecoration *deco) const
void addDecoration (KDecoration *)
void removeDecoration (KDecoration *)

Protected Member Functions

void resetDecorations (unsigned long changed)
NET::WindowType windowType (unsigned long supported_types, KDecorationBridge *bridge) const

Detailed Description

Definition at line 34 of file kdecorationfactory.h.


Constructor & Destructor Documentation

KDecorationFactory::KDecorationFactory  ) 
 

Constructor.

Called after loading the decoration plugin. All global initialization of the plugin should be done in the factory constructor.

Definition at line 31 of file kdecorationfactory.cpp.

KDecorationFactory::~KDecorationFactory  )  [virtual]
 

Destructor.

Called before unloading the decoration plugin. All global cleanup of the plugin should be done in the factory destructor.

Definition at line 35 of file kdecorationfactory.cpp.


Member Function Documentation

virtual KDecoration* KDecorationFactory::createDecoration KDecorationBridge *  bridge  )  [pure virtual]
 

This function must be reimplemented to create decoration objects.

The argument should be passed to the KDecoration constructor, the second KDecoration argument should be this factory object.

Implemented in B2::B2ClientFactory, Default::KDEDefaultHandler, Keramik::KeramikHandler, KWMTheme::KWMThemeFactory, Laptop::LaptopClientFactory, ModernSystem::ModernSysFactory, KWinPlastik::PlastikHandler, Quartz::QuartzHandler, Redmond::RedmondDecoFactory, and Web::WebFactory.

bool KDecorationFactory::reset unsigned long  changed  )  [virtual]
 

This function is called when the configuration settings changed.

The argument specifies what has changed, using the SettingXXX masks. It should be determined whether the decorations need to be completely remade, in which case true should be returned, or whether only e.g. a repaint will be sufficient, in which case false should be returned, and resetDecorations() can be called to reset all decoration objects. Note that true should be returned only when really necessary.

Reimplemented in B2::B2ClientFactory, Default::KDEDefaultHandler, Keramik::KeramikHandler, KWMTheme::KWMThemeFactory, Laptop::LaptopClientFactory, ModernSystem::ModernSysFactory, KWinPlastik::PlastikHandler, Quartz::QuartzHandler, Redmond::RedmondDecoFactory, and Web::WebFactory.

Definition at line 40 of file kdecorationfactory.cpp.

QValueList< KDecorationDefines::BorderSize > KDecorationFactory::borderSizes  )  const [virtual]
 

Reimplement this function if your decoration supports more border sizes than the default one (BorderNormal).

The returned list must contain all supported sizes, ordered from the smallest to the largest one. By default, only BorderNormal is returned.

Reimplemented in B2::B2ClientFactory, Default::KDEDefaultHandler, Keramik::KeramikHandler, Laptop::LaptopClientFactory, ModernSystem::ModernSysFactory, KWinPlastik::PlastikHandler, Quartz::QuartzHandler, Redmond::RedmondDecoFactory, and Web::WebFactory.

Definition at line 54 of file kdecorationfactory.cpp.

References KDecorationDefines::BorderNormal.

Referenced by KDecorationOptions::preferredBorderSize().

const KDecorationOptions * KDecorationFactory::options  )  [inline]
 

Returns the KDecorationOptions object, which is used to access configuration settings for the decoration.

Definition at line 115 of file kdecorationfactory.h.

References KDecoration::options().

bool KDecorationFactory::exists const KDecoration deco  )  const
 

Returns true if the given decoration object still exists.

This is necessary e.g. when calling KDecoration::showWindowMenu(), which may cause the decoration to be destroyed. Note that this function is reliable only if called immediately after such actions.

Definition at line 59 of file kdecorationfactory.cpp.

Referenced by Redmond::RedmondDeco::menuButtonPressed(), Quartz::QuartzClient::menuButtonPressed(), Default::KDEDefaultClient::menuButtonPressed(), Web::WebButton::mouseReleaseEvent(), and B2::B2Client::titleMoveAbs().

void KDecorationFactory::resetDecorations unsigned long  changed  )  [protected]
 

Convenience function that calls KDecoration::reset() for all decoration objects.

Definition at line 74 of file kdecorationfactory.cpp.

Referenced by Web::WebFactory::reset(), Redmond::RedmondDecoFactory::reset(), Quartz::QuartzHandler::reset(), KWinPlastik::PlastikHandler::reset(), ModernSystem::ModernSysFactory::reset(), KWMTheme::KWMThemeFactory::reset(), Keramik::KeramikHandler::reset(), and Default::KDEDefaultHandler::reset().

NET::WindowType KDecorationFactory::windowType unsigned long  supported_types,
KDecorationBridge *  bridge
const [protected]
 

This function has the same functionality like KDecoration::windowType().

It can be used in createDecoration() to return different KDecoration inherited classes depending on the window type, as at that time KDecoration::windowType() is not available yet. The additional argument is the one passed to createDecoration().

Definition at line 82 of file kdecorationfactory.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kwin Library Version 3.4.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Nov 4 00:48:59 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003