src/widget.h

Go to the documentation of this file.
00001 // Copyright (c) 2003 - 2004 Anselm R. Garbe <anselmg at t-online.de>
00002 // See ../LICENSE.txt for license details.
00003 //
00004 // $Id: widget.h 2 2007-05-16 10:38:27Z eg $
00005 
00006 #ifndef __WIDGET_H
00007 #define __WIDGET_H
00008 
00009 extern "C" {
00010 #include <X11/Xlib.h>
00011 }
00012 
00013 #include "rectangle.h"
00014 
00015 class Monitor;
00016 
00018 class Widget : public Rectangle {
00019 
00020 public:
00021 
00022     Widget(Monitor *monitor, Rectangle *rect,
00023            bool initWindowAndGC = true);
00024     virtual ~Widget();
00025 
00026     Monitor *monitor() const;
00027     GC gc() const;
00028 
00029     Window window() const;
00030 
00031     virtual void resize();
00032     virtual void show();
00033     virtual void hide();
00034 
00035     bool isVisible() const;
00036 
00037 protected:
00038     bool isVisible_;
00039 
00040 private:
00041 
00042     void initWindow();
00043     void initGC();
00044 
00045     GC gc_;
00046     Monitor *monitor_;
00047     Window window_;
00048 };
00049 
00050 #endif // __WIDGET_H

Generated on Thu May 24 15:19:32 2007 for ncwm by  doxygen 1.5.1