aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/GContext.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/GContext.hh')
-rw-r--r--src/FbTk/GContext.hh46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/FbTk/GContext.hh b/src/FbTk/GContext.hh
index 047de6f..03c4235 100644
--- a/src/FbTk/GContext.hh
+++ b/src/FbTk/GContext.hh
@@ -53,7 +53,7 @@ public:
53 CAPROUND= CapRound, 53 CAPROUND= CapRound,
54 CAPPROJECTING= CapProjecting 54 CAPPROJECTING= CapProjecting
55 } CapStyle; 55 } CapStyle;
56 56
57 /// for FbTk drawable 57 /// for FbTk drawable
58 explicit GContext(const FbTk::FbDrawable &drawable); 58 explicit GContext(const FbTk::FbDrawable &drawable);
59 /// for X drawable 59 /// for X drawable
@@ -61,81 +61,81 @@ public:
61 GContext(Drawable d, const FbTk::GContext &gc); 61 GContext(Drawable d, const FbTk::GContext &gc);
62 virtual ~GContext(); 62 virtual ~GContext();
63 63
64 inline void setForeground(const FbTk::Color &color) { 64 void setForeground(const FbTk::Color &color) {
65 setForeground(color.pixel()); 65 setForeground(color.pixel());
66 } 66 }
67 67
68 inline void setForeground(long pixel_value) { 68 void setForeground(long pixel_value) {
69 XSetForeground(m_display, m_gc, 69 XSetForeground(m_display, m_gc,
70 pixel_value); 70 pixel_value);
71 } 71 }
72 72
73 inline void setBackground(const FbTk::Color &color) { 73 void setBackground(const FbTk::Color &color) {
74 setBackground(color.pixel()); 74 setBackground(color.pixel());
75 } 75 }
76 76
77 inline void setBackground(long pixel_value) { 77 void setBackground(long pixel_value) {
78 XSetBackground(m_display, m_gc, pixel_value); 78 XSetBackground(m_display, m_gc, pixel_value);
79 } 79 }
80 80
81 inline void setTile(Drawable draw) { 81 void setTile(Drawable draw) {
82 XSetTile(m_display, m_gc, draw); 82 XSetTile(m_display, m_gc, draw);
83 } 83 }
84 84
85 inline void setTile(const FbTk::FbPixmap &draw) { 85 void setTile(const FbTk::FbPixmap &draw) {
86 setTile(draw.drawable()); 86 setTile(draw.drawable());
87 } 87 }
88 88
89 /// not implemented 89 /// not implemented
90 inline void setFont(const FbTk::Font &) {} 90 void setFont(const FbTk::Font &) {}
91 91
92 /// set font id 92 /// set font id
93 inline void setFont(int fid) { 93 void setFont(int fid) {
94 XSetFont(m_display, m_gc, fid); 94 XSetFont(m_display, m_gc, fid);
95 } 95 }
96#ifdef NOT_USED 96#ifdef NOT_USED
97 inline void setClipMask(const FbTk::FbPixmap &mask) { 97 void setClipMask(const FbTk::FbPixmap &mask) {
98 XSetClipMask(m_display, m_gc, mask.drawable()); 98 XSetClipMask(m_display, m_gc, mask.drawable());
99 } 99 }
100 100
101 inline void setClipOrigin(int x, int y) { 101 void setClipOrigin(int x, int y) {
102 XSetClipOrigin(m_display, m_gc, x, y); 102 XSetClipOrigin(m_display, m_gc, x, y);
103 } 103 }
104#endif 104#endif
105 inline void setGraphicsExposure(bool value) { 105 void setGraphicsExposure(bool value) {
106 XSetGraphicsExposures(m_display, m_gc, value); 106 XSetGraphicsExposures(m_display, m_gc, value);
107 } 107 }
108 108
109 inline void setFunction(int func) { 109 void setFunction(int func) {
110 XSetFunction(m_display, m_gc, func); 110 XSetFunction(m_display, m_gc, func);
111 } 111 }
112 112
113 inline void setSubwindowMode(int mode) { 113 void setSubwindowMode(int mode) {
114 XSetSubwindowMode(m_display, m_gc, mode); 114 XSetSubwindowMode(m_display, m_gc, mode);
115 } 115 }
116 inline void setFillStyle(int style) { 116 void setFillStyle(int style) {
117 XSetFillStyle(m_display, m_gc, style); 117 XSetFillStyle(m_display, m_gc, style);
118 } 118 }
119#ifdef NOT_USED 119#ifdef NOT_USED
120 inline void setFillRule(int rule) { 120 void setFillRule(int rule) {
121 XSetFillRule(m_display, m_gc, rule); 121 XSetFillRule(m_display, m_gc, rule);
122 } 122 }
123#endif 123#endif
124 inline void setLineAttributes(unsigned int width, 124 void setLineAttributes(unsigned int width,
125 int line_style, 125 int line_style,
126 int cap_style, 126 int cap_style,
127 int join_style) { 127 int join_style) {
128 128
129 XSetLineAttributes(m_display, m_gc, width, line_style, cap_style, join_style); 129 XSetLineAttributes(m_display, m_gc, width, line_style, cap_style, join_style);
130 } 130 }
131 131
132 132
133 void copy(GC gc); 133 void copy(GC gc);
134 void copy(const GContext &gc); 134 void copy(const GContext &gc);
135 135
136 inline GContext &operator = (const GContext &copy_gc) { copy(copy_gc); return *this; } 136 GContext &operator = (const GContext &copy_gc) { copy(copy_gc); return *this; }
137 inline GContext &operator = (GC copy_gc) { copy(copy_gc); return *this; } 137 GContext &operator = (GC copy_gc) { copy(copy_gc); return *this; }
138 inline GC gc() const { return m_gc; } 138 GC gc() const { return m_gc; }
139 139
140private: 140private:
141 GContext(const GContext &cont); 141 GContext(const GContext &cont);