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
Widget
Definition:
Widget.hpp:33
Widget::setPosition
virtual void setPosition(int x, int y)=0
Widget::initialize
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
Widget::updateData
virtual void updateData(const std::string &key, const std::string &value)=0
Widget::handleEvent
virtual void handleEvent(XEvent &event)=0
Widget::Widget
Widget()=default
Widget::~Widget
virtual ~Widget()=0
Widget::setSize
virtual void setSize(int width, int height)=0
Widget::unregisterDataKey
virtual void unregisterDataKey(const std::string &key)=0
Widget::shutdown
virtual void shutdown()=0
Widget::registerDataKey
virtual std::vector< std::string > registerDataKey()=0
Widget::draw
virtual void draw()=0
inc
Bars
Widget.hpp
Generated by
1.9.1