aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-09-11 19:57:38 (GMT)
committerfluxgen <fluxgen>2003-09-11 19:57:38 (GMT)
commit3b9f04d4405abe242f4d198342d50f497d3475b3 (patch)
tree64726664981d982cfbf450eec6b6c894c6f758ab /src/FbTk
parent6d6425cbde2a4c2038f513c78e5953d0dbdbc20d (diff)
downloadfluxbox_paul-3b9f04d4405abe242f4d198342d50f497d3475b3.zip
fluxbox_paul-3b9f04d4405abe242f4d198342d50f497d3475b3.tar.bz2
added font, function and subwindow mode
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/GContext.cc20
-rw-r--r--src/FbTk/GContext.hh9
2 files changed, 24 insertions, 5 deletions
diff --git a/src/FbTk/GContext.cc b/src/FbTk/GContext.cc
index 3885a46..f3fcaf4 100644
--- a/src/FbTk/GContext.cc
+++ b/src/FbTk/GContext.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: GContext.cc,v 1.2 2003/09/10 21:27:02 fluxgen Exp $ 22// $Id: GContext.cc,v 1.3 2003/09/11 19:57:38 fluxgen Exp $
23 23
24#include "GContext.hh" 24#include "GContext.hh"
25 25
@@ -33,8 +33,8 @@ namespace FbTk {
33 33
34GContext::GContext(const FbTk::FbDrawable &drawable): 34GContext::GContext(const FbTk::FbDrawable &drawable):
35 m_gc(XCreateGC(FbTk::App::instance()->display(), 35 m_gc(XCreateGC(FbTk::App::instance()->display(),
36 drawable.drawable(), 36 drawable.drawable(),
37 0, 0)) { 37 0, 0)) {
38 setGraphicsExposure(false); 38 setGraphicsExposure(false);
39} 39}
40 40
@@ -73,6 +73,9 @@ void GContext::setFont(const FbTk::Font &font) {
73 //!! TODO 73 //!! TODO
74} 74}
75 75
76void GContext::setFont(int fid) {
77 XSetFont(FbTk::App::instance()->display(), m_gc, fid);
78}
76void GContext::setClipMask(const FbTk::FbPixmap &mask) { 79void GContext::setClipMask(const FbTk::FbPixmap &mask) {
77 XSetClipMask(FbTk::App::instance()->display(), m_gc, 80 XSetClipMask(FbTk::App::instance()->display(), m_gc,
78 mask.drawable()); 81 mask.drawable());
@@ -88,4 +91,15 @@ void GContext::setGraphicsExposure(bool flag) {
88 flag); 91 flag);
89} 92}
90 93
94void GContext::setFunction(int func) {
95 XSetFunction(FbTk::App::instance()->display(), m_gc,
96 func);
97}
98
99void GContext::setSubwindowMode(int mode) {
100 XSetSubwindowMode(FbTk::App::instance()->display(), m_gc,
101 mode);
102}
103
104
91} // end namespace FbTk 105} // end namespace FbTk
diff --git a/src/FbTk/GContext.hh b/src/FbTk/GContext.hh
index 29e8f0d..6175b2d 100644
--- a/src/FbTk/GContext.hh
+++ b/src/FbTk/GContext.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: GContext.hh,v 1.2 2003/09/10 21:27:02 fluxgen Exp $ 22// $Id: GContext.hh,v 1.3 2003/09/11 19:57:38 fluxgen Exp $
23 23
24#ifndef FBTK_GCONTEXT_HH 24#ifndef FBTK_GCONTEXT_HH
25#define FBTK_GCONTEXT_HH 25#define FBTK_GCONTEXT_HH
@@ -47,11 +47,16 @@ public:
47 void setForeground(long pixel_value); 47 void setForeground(long pixel_value);
48 void setBackground(const FbTk::Color &color); 48 void setBackground(const FbTk::Color &color);
49 void setBackground(long pixel_value); 49 void setBackground(long pixel_value);
50 /// not implemented
50 void setFont(const FbTk::Font &font); 51 void setFont(const FbTk::Font &font);
52 /// set font id
53 void setFont(int fid);
51 void setClipMask(const FbTk::FbPixmap &pm); 54 void setClipMask(const FbTk::FbPixmap &pm);
52 void setClipOrigin(int x, int y); 55 void setClipOrigin(int x, int y);
53 void setGraphicsExposure(bool value); 56 void setGraphicsExposure(bool value);
54 57 void setFunction(int func);
58 void setSubwindowMode(int mode);
59
55 GC gc() const { return m_gc; } 60 GC gc() const { return m_gc; }
56 61
57private: 62private: