YggdrasilWM  0.1.1
A tiny window manager coded in C++
Widget.hpp
Go to the documentation of this file.
1 
24 #ifndef WIDGET_HPP
25 #define WIDGET_HPP
26 extern "C" {
27 #include <X11/Xlib.h>
28 };
29 #include <string>
30 #include <vector>
31 
32 class Widget
33 {
34 public:
35  Widget() = default;
36  virtual ~Widget() = 0;
37  virtual Window
38  initialize(Display *display,
39  Window parentWindow,
40  int x,
41  int y,
42  int width,
43  int height,
44  std::string font_,
45  unsigned long bgColor_,
46  unsigned long fgColor_,
47  int fontSize) = 0;
48  virtual void draw() = 0;
49  virtual void handleEvent(XEvent& event) = 0;
50  virtual void shutdown() = 0;
51  virtual void setPosition(int x, int y) = 0;
52  virtual void setSize(int width, int height) = 0;
53  virtual std::vector<std::string> registerDataKey() = 0;
54  virtual void unregisterDataKey(const std::string& key) = 0;
55  virtual void updateData(const std::string& key, const std::string& value) = 0;
56 };
57 //Widget::~Widget() {}
58 #endif // WIDGET_HPP
Definition: Widget.hpp:33
virtual void setPosition(int x, int y)=0
virtual Window initialize(Display *display, Window parentWindow, int x, int y, int width, int height, std::string font_, unsigned long bgColor_, unsigned long fgColor_, int fontSize)=0
virtual void updateData(const std::string &key, const std::string &value)=0
virtual void handleEvent(XEvent &event)=0
Widget()=default
virtual ~Widget()=0
virtual void setSize(int width, int height)=0
virtual void unregisterDataKey(const std::string &key)=0
virtual void shutdown()=0
virtual std::vector< std::string > registerDataKey()=0
virtual void draw()=0