added set and unsetCursor

This commit is contained in:
fluxgen 2003-05-17 10:43:20 +00:00
parent f1a34dc2f6
commit 4ec9bdbee2
2 changed files with 15 additions and 2 deletions

View file

@ -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;
}

View file

@ -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