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_ROOTWINDOW_H 00022 #define WT_ROOTWINDOW_H 00023 00024 #include <wt/display.h> 00025 #include <wt/window.h> 00026 #include <wt/singleton.h> 00027 00028 namespace Wt { 00029 00030 class RootWindow : public Display, public Window { 00031 public: 00032 using Window::resize; 00033 virtual void resize(int w, int h); 00034 00035 static RootWindow *instance() { 00036 return static_cast<RootWindow *>(instance_); 00037 } 00038 00039 RootWindow(int w = Display::defaultWidth, int h = Display::defaultHeight, 00040 int depth = Display::defaultDepth, 00041 const std::string &name = "RootWindow::anon", int wflags = 0); 00042 00043 protected: 00044 virtual void paintEvent(PaintEvent *e); 00045 00046 private: 00047 /// called recursively to blit the changed widgets to screen 00048 void blit_region(const Widget *w, const Region& r); 00049 void blit_region_ex(const Widget *w, const Region& r); 00050 }; 00051 00052 } 00053 #endif // ROOTWINDOW_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.