Explain in docs how to do maximize + convenience function.
svn path=/trunk/kdebase/kwin/; revision=331721
This commit is contained in:
parent
de1ddb988a
commit
f5668e9dff
2 changed files with 37 additions and 0 deletions
|
@ -231,6 +231,17 @@ void KDecoration::closeWindow()
|
||||||
bridge_->closeWindow();
|
bridge_->closeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void KDecoration::maximize( ButtonState button )
|
||||||
|
{
|
||||||
|
// This can be made configurable if needed.
|
||||||
|
if( button == MidButton )
|
||||||
|
maximize( maximizeMode() ^ MaximizeVertical );
|
||||||
|
else if ( button == RightButton )
|
||||||
|
maximize( maximizeMode() ^ MaximizeHorizontal );
|
||||||
|
else
|
||||||
|
maximize( maximizeMode() == MaximizeFull ? MaximizeRestore : MaximizeFull );
|
||||||
|
}
|
||||||
|
|
||||||
void KDecoration::maximize( MaximizeMode mode )
|
void KDecoration::maximize( MaximizeMode mode )
|
||||||
{
|
{
|
||||||
bridge_->maximize( mode );
|
bridge_->maximize( mode );
|
||||||
|
|
|
@ -30,6 +30,7 @@ DEALINGS IN THE SOFTWARE.
|
||||||
#include <qobject.h>
|
#include <qobject.h>
|
||||||
#include <qiconset.h>
|
#include <qiconset.h>
|
||||||
#include <netwm_def.h>
|
#include <netwm_def.h>
|
||||||
|
#include <kdeversion.h>
|
||||||
|
|
||||||
class KDecorationOptionsPrivate;
|
class KDecorationOptionsPrivate;
|
||||||
class KDecorationBridge;
|
class KDecorationBridge;
|
||||||
|
@ -679,6 +680,31 @@ class KDecoration
|
||||||
* just like showWindowMenu().
|
* just like showWindowMenu().
|
||||||
*/
|
*/
|
||||||
void closeWindow();
|
void closeWindow();
|
||||||
|
/*
|
||||||
|
* Changes the maximize mode of the decorated window. This function should
|
||||||
|
* be preferred to the other maximize() overload for reacting on clicks
|
||||||
|
* on the maximize titlebar button.
|
||||||
|
* NOTE: This function is new in KDE3.3. In order to support also KDE3.2,
|
||||||
|
* it is recommended to use code like this:
|
||||||
|
* \code
|
||||||
|
* int button = ... ;
|
||||||
|
* #if KDE_IS_VERSION( 3, 3, 0 )
|
||||||
|
* maximize( button );
|
||||||
|
* #else
|
||||||
|
* if( button == MidButton )
|
||||||
|
* maximize( maximizeMode() ^ MaximizeVertical );
|
||||||
|
* else if( button == RightButton )
|
||||||
|
* maximize( maximizeMode() ^ MaximizeHorizontal );
|
||||||
|
* else
|
||||||
|
* maximize( maximizeMode() == MaximizeFull ? MaximizeRestore : MaximizeFull );
|
||||||
|
* #endif
|
||||||
|
* \endcode
|
||||||
|
* @since 3.3
|
||||||
|
*/
|
||||||
|
#if KDE_IS_VERSION( 3, 90, 0 )
|
||||||
|
#warning Update the docs.
|
||||||
|
#endif
|
||||||
|
void maximize( ButtonState button );
|
||||||
/**
|
/**
|
||||||
* Set the maximize mode of the decorated window.
|
* Set the maximize mode of the decorated window.
|
||||||
* @param mode The maximization mode to be set.
|
* @param mode The maximization mode to be set.
|
||||||
|
|
Loading…
Reference in a new issue