From 4ec9bdbee2cfc2f558f6b85c1dae9521595fa353 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Sat, 17 May 2003 10:43:20 +0000
Subject: added set and unsetCursor

---
 src/FbTk/FbWindow.cc | 10 +++++++++-
 src/FbTk/FbWindow.hh |  7 ++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index 14298ef..5634a5d 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -19,7 +19,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: FbWindow.cc,v 1.17 2003/05/13 14:07:24 fluxgen Exp $
+// $Id: FbWindow.cc,v 1.18 2003/05/17 10:43:20 fluxgen Exp $
 
 #include "FbWindow.hh"
 #include "EventManager.hh"
@@ -177,6 +177,14 @@ void FbWindow::raise() {
     XRaiseWindow(s_display, m_window);
 }
 
+void FbWindow::setCursor(Cursor cur) {
+    XDefineCursor(s_display, window(), cur); 
+}
+
+void FbWindow::unsetCursor() {
+    XUndefineCursor(s_display, window());
+}
+
 int FbWindow::screenNumber() const {
     return m_screen_num;
 }
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh
index eeb4250..f8a5505 100644
--- a/src/FbTk/FbWindow.hh
+++ b/src/FbTk/FbWindow.hh
@@ -19,7 +19,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: FbWindow.hh,v 1.15 2003/05/12 04:20:25 fluxgen Exp $
+// $Id: FbWindow.hh,v 1.16 2003/05/17 10:42:34 fluxgen Exp $
 
 #ifndef FBTK_FBWINDOW_HH
 #define FBTK_FBWINDOW_HH
@@ -85,6 +85,11 @@ public:
     virtual void lower();
     virtual void raise();
 
+    /// defines a cursor for this window
+    void setCursor(Cursor cur);
+    /// uses the parents cursor instead
+    void unsetCursor();
+
     /// @return parent FbWindow
     const FbWindow *parent() const { return m_parent; }
     /// @return real X window
-- 
cgit v0.11.2