Qtopia library API Documentation

WindowDecorationInterface Struct Reference

Interface class for Window Decorations. More...

List of all members.

Public Types

enum  Metric {
  TitleHeight, LeftBorder, RightBorder, TopBorder,
  BottomBorder, OKWidth, CloseWidth, HelpWidth,
  MaximizeWidth, CornerGrabSize
}
enum  Area { Border, Title, TitleText }
enum  Button { OK, Close, Help, Maximize }

Public Member Functions

virtual int metric (Metric m, const WindowData *) const
virtual void drawArea (Area a, QPainter *, const WindowData *) const
 draw the Area specefic in a to the QPainter

virtual void drawButton (Button b, QPainter *, const WindowData *, int x, int y, int w, int h, QWSButton::State) const
virtual QRegion mask (const WindowData *) const
 The mask of the Decoration.

virtual QString name () const=0
virtual QPixmap icon () const=0


Detailed Description

Interface class for Window Decorations.

Yu need to implement metric and drawing functions.

Definition at line 37 of file windowdecorationinterface.h.


Member Function Documentation

void WindowDecorationInterface::drawArea Area  a,
QPainter ,
const WindowData
const [virtual]
 

draw the Area specefic in a to the QPainter

void WindowDecorationInterface::drawButton Button  b,
QPainter p,
const WindowData d,
int  x,
int  y,
int  w,
int  h,
QWSButton::State  s
const [virtual]
 

Parameters:
b The Button to be drawn
p The painter to draw at
d The Window Data
x The X position of the button
y The Y position of the button
w The width of the button
h The height of the button
s The state of the button

QRegion WindowDecorationInterface::mask const WindowData  )  const [virtual]
 

The mask of the Decoration.

     int th = metric(TitleHeight,wd);
   QRect rect( wd->rect );
   QRect r(rect.left() - metric(LeftBorder,wd),
          rect.top() - th - metric(TopBorder,wd),
          rect.width() + metric(LeftBorder,wd) + metric(RightBorder,wd),
          rect.height() + th + metric(TopBorder,wd) + metric(BottomBorder,wd));
  return QRegion(r) - rect;


The documentation for this struct was generated from the following files:
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:30 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001