1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#include "window.h"
SRDWindow::SRDWindow(int id, const std::string& title)
: id_(id), title_(title), x_(0), y_(0), width_(0), height_(0), decorated_(true) {
}
int SRDWindow::getId() const {
return id_;
}
const std::string& SRDWindow::getTitle() const {
return title_;
}
int SRDWindow::getX() const {
return x_;
}
int SRDWindow::getY() const {
return y_;
}
int SRDWindow::getWidth() const {
return width_;
}
int SRDWindow::getHeight() const {
return height_;
}
bool SRDWindow::isDecorated() const {
return decorated_;
}
void SRDWindow::setPosition(int x, int y) {
x_ = x;
y_ = y;
}
void SRDWindow::setSize(int width, int height) {
width_ = width;
height_ = height;
}
void SRDWindow::setGeometry(int x, int y, int width, int height) {
x_ = x;
y_ = y;
width_ = width;
height_ = height;
}
void SRDWindow::setDimensions(int x, int y, int width, int height) {
x_ = x;
y_ = y;
width_ = width;
height_ = height;
}
void SRDWindow::setDecorated(bool decorated) {
decorated_ = decorated;
}
void SRDWindow::setId(int id) {
id_ = id;
}
// Basic methods for managing window state (will be platform-specific)
void SRDWindow::map() {
// Platform-specific implementation to show the window
}
void SRDWindow::unmap() {
// Platform-specific implementation to hide the window
}
void SRDWindow::focus() {
// Platform-specific implementation to give focus to the window
}
void SRDWindow::close() {
// Platform-specific implementation to close the window
}
|