TQWSDecoration Class Reference
The TQWSDecoration class allows the appearance of the TQt/Embedded Window
Manager to be customized.
More...
#include <qwsdecoration_qws.h>
List of all member functions.
Public Members
- TQWSDecoration ()
- virtual ~TQWSDecoration ()
- enum Region { None = 0, All = 1, Title = 2, Top = 3, Bottom = 4, Left = 5, Right = 6, TopLeft = 7, TopRight = 8, BottomLeft = 9, BottomRight = 10, Close = 11, Minimize = 12, Maximize = 13, Normalize = 14, Menu = 15, LastRegion = Menu }
- virtual TQRegion region ( const TQWidget * widget, const TQRect & rect, Region type = All ) = 0
- virtual void close ( TQWidget * widget )
- virtual void minimize ( TQWidget * widget )
- virtual void maximize ( TQWidget * widget )
- virtual TQPopupMenu * menu ( const TQWidget *, const TQPoint & )
- virtual void paint ( TQPainter * painter, const TQWidget * widget ) = 0
- virtual void paintButton ( TQPainter * painter, const TQWidget * widget, Region type, int state ) = 0
Detailed Description
The TQWSDecoration class allows the appearance of the TQt/Embedded Window
Manager to be customized.
TQt/Embedded provides window management to top level windows. The
appearance of the borders and buttons (the decoration) around the
managed windows can be customized by creating your own class
derived from TQWSDecoration and overriding a few methods.
This class is non-portable. It is available only in TQt/Embedded.
See also TQApplication::qwsSetDecoration() and TQt/Embedded.
Member Type Documentation
TQWSDecoration::Region
This enum describes the regions in the window decorations.
- TQWSDecoration::None - used internally.
- TQWSDecoration::All - the entire region used by the window decoration.
- TQWSDecoration::Title - Displays the window title and allows the window to be
moved by dragging.
- TQWSDecoration::Top - allows the top of the window to be resized.
- TQWSDecoration::Bottom - allows the bottom of the window to be resized.
- TQWSDecoration::Left - allows the left edge of the window to be resized.
- TQWSDecoration::Right - allows the right edge of the window to be resized.
- TQWSDecoration::TopLeft - allows the top-left of the window to be resized.
- TQWSDecoration::TopRight - allows the top-right of the window to be resized.
- TQWSDecoration::BottomLeft - allows the bottom-left of the window to be resized.
- TQWSDecoration::BottomRight - allows the bottom-right of the window to be resized.
- TQWSDecoration::Close - clicking in this region closes the window.
- TQWSDecoration::Minimize - clicking in this region minimizes the window.
- TQWSDecoration::Maximize - clicking in this region maximizes the window.
- TQWSDecoration::Normalize - returns a maximized window to its previous size.
- TQWSDecoration::Menu - clicking in this region opens the window operations
(system) menu.
Member Function Documentation
TQWSDecoration::TQWSDecoration ()
Constructs a decorator.
TQWSDecoration::~TQWSDecoration () [virtual]
Destroys a decorator.
void TQWSDecoration::close ( TQWidget * widget ) [virtual]
Called when the user clicks in the Close region.
widget is the widget to be closed.
The default behaviour is to close the widget.
void TQWSDecoration::maximize ( TQWidget * widget ) [virtual]
Called when the user clicks in the Maximize region.
widget is the widget to be maximized.
The default behaviour is to resize the widget to be full-screen.
This method can be overridden e.g. to allow room for launch
panels.
TQPopupMenu * TQWSDecoration::menu ( const TQWidget *, const TQPoint & ) [virtual]
Called to create a TQPopupMenu containing the valid menu operations.
The default implementation adds all possible window operations.
void TQWSDecoration::minimize ( TQWidget * widget ) [virtual]
Called when the user clicks in the Minimize region.
widget is the widget to be minimized.
The default behaviour is to ignore this action.
void TQWSDecoration::paint ( TQPainter * painter, const TQWidget * widget ) [pure virtual]
Override to paint the border and title decoration around widget
using painter.
void TQWSDecoration::paintButton ( TQPainter * painter, const TQWidget * widget, Region type, int state ) [pure virtual]
Override to paint a button of type type using painter.
widget is the widget whose button is to be drawn.
state is the state of the button. It can be a combination of the
following OR-ed together:
- TQWSButton::MouseOver
- TQWSButton::Clicked
- TQWSButton::On
TQRegion TQWSDecoration::region ( const TQWidget * widget, const TQRect & rect, Region type = All ) [pure virtual]
Returns the requested region type which will contain widget
with geometry rect.
This file is part of the TQt toolkit.
Copyright © 1995-2007
Trolltech. All Rights Reserved.