Wt examples 3.1.10
/build/buildd/witty-3.1.10/examples/painting/ShapesWidget.h
Go to the documentation of this file.
00001 // This may look like C code, but it's really -*- C++ -*-
00002 /*
00003  * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
00004  *
00005  * See the LICENSE file for terms of use.
00006  */
00007 
00008 #ifndef SHAPES_WIDGET_H_
00009 #define SHAPES_WIDGET_H_
00010 
00011 #include <Wt/WPaintedWidget>
00012 
00013 namespace Wt {
00014   class WPainter;
00015 }
00016 
00017 using namespace Wt;
00018 
00019 class ShapesWidget : public WPaintedWidget
00020 {
00021 public:
00022   ShapesWidget(WContainerWidget *parent = 0);
00023 
00024   void setAngle(double angle);
00025   double angle() const { return angle_; }
00026 
00027   void setRelativeSize(double size);
00028   double relativeSize() const { return size_; }
00029 
00030 protected:
00031   virtual void paintEvent(WPaintDevice *paintDevice);
00032 
00033 private:
00034   double angle_;
00035   double size_;
00036 
00037   void drawEmwebLogo(WPainter& p);
00038   void drawEmwebE(WPainter& p);
00039   void drawEmwebMW(WPainter& p);
00040 };
00041 
00042 #endif // SHAPES_WIDGET_H_

Generated on Sat Dec 24 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.4