00001 /* 00002 libwt - Vassilis Virvilis Toolkit - a widget library 00003 Copyright (C) 2006 Vassilis Virvilis <vasvir2@fastmail.fm> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the 00017 Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, SA. 00019 */ 00020 00021 #ifndef WT_FRAME_H 00022 #define WT_FRAME_H 00023 00024 #include <wt/widget.h> 00025 #include <wt/wvar.h> 00026 #include <wt/color.h> 00027 00028 namespace Wt { 00029 00030 class Frame : public Widget { 00031 public: 00032 Frame(Widget *parent = 0, const std::string &name = "Frame::anon", int wflags = 0); 00033 virtual ~Frame(); 00034 00035 int frameWidth() const; 00036 Rect contentsRect() const; 00037 00038 const Color& lineColor() const; 00039 void setLineColor(const Color &color); 00040 00041 WVar<int> lineWidth; 00042 WVar<int> margin; 00043 WVar<int> spacing; 00044 00045 protected: 00046 virtual void draw(Painter *p, const Region& region); 00047 virtual void drawFrame(Painter *p); 00048 virtual void drawContents(Painter *p); 00049 00050 void onLayoutChange(); 00051 00052 private: 00053 Color line_color_; 00054 }; 00055 00056 } 00057 #endif // WT_FRAME_H
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.