Qtopia library API Documentation

windowdecorationinterface.h

00001 /**********************************************************************
00002 ** Copyright (C) 2002 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of the Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 
00021 // !!! IMPORTANT !!!
00022 // This interface is still experimental and subject to change.
00023 
00024 #ifndef WINDOWDECORATIONINTERFACE_H
00025 #define WINDOWDECORATIONINTERFACE_H
00026 
00027 #include <qpe/qcom.h>
00028 #include <qpixmap.h>
00029 #include <qpalette.h>
00030 #include <qwsmanager_qws.h>
00031 
00032 // {11A45864-4CBA-4DDA-9846-FF234FD307CC} 
00033 #ifndef IID_WindowDecoration
00034 #define IID_WindowDecoration QUuid( 0x11a45864, 0x4cba, 0x4dda, 0x98, 0x46, 0xff, 0x23, 0x4f, 0xd3, 0x07, 0xcc)
00035 #endif
00036 
00037 struct WindowDecorationInterface : public QUnknownInterface
00038 {
00039     virtual ~WindowDecorationInterface() {}
00040 
00041     struct WindowData {
00042     QRect rect;
00043     QPalette palette;
00044     QString caption;
00045     enum Flags { Maximized=0x01, Dialog=0x02, Active=0x04 };
00046     Q_UINT32 flags;
00047     Q_UINT32 reserved;
00048     };
00049 
00050     enum Metric { TitleHeight, LeftBorder, RightBorder, TopBorder, BottomBorder, OKWidth, CloseWidth, HelpWidth, MaximizeWidth, CornerGrabSize };
00051     virtual int metric( Metric m, const WindowData * ) const;
00052 
00053     enum Area { Border, Title, TitleText };
00054     virtual void drawArea( Area a, QPainter *, const WindowData * ) const;
00055 
00056     enum Button { OK, Close, Help, Maximize };
00057     virtual void drawButton( Button b, QPainter *, const WindowData *, int x, int y, int w, int h, QWSButton::State ) const;
00058 
00059     virtual QRegion mask( const WindowData * ) const;
00060 
00061     virtual QString name() const = 0;
00062     virtual QPixmap icon() const = 0;
00063 };
00064 
00065 #endif
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:08 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001