1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 10:31:55 -04:00
|
|
|
// Name: wx/motif/cursor.h
|
1998-09-18 06:19:10 -04:00
|
|
|
// Purpose: wxCursor class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2006-07-25 10:31:55 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CURSOR_H_
|
|
|
|
#define _WX_CURSOR_H_
|
|
|
|
|
2003-03-22 10:46:22 -05:00
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/gdicmn.h"
|
1998-09-18 06:19:10 -04:00
|
|
|
|
2003-03-22 10:46:22 -05:00
|
|
|
class WXDLLEXPORT wxImage;
|
1998-09-18 06:19:10 -04:00
|
|
|
|
|
|
|
// Cursor
|
2003-03-22 10:46:22 -05:00
|
|
|
class WXDLLEXPORT wxCursor: public wxObject
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
2002-02-05 11:34:33 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCursor)
|
2006-07-25 10:31:55 -04:00
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
public:
|
2002-02-05 11:34:33 -05:00
|
|
|
wxCursor();
|
2006-02-08 19:51:23 -05:00
|
|
|
|
2003-05-27 16:31:41 -04:00
|
|
|
wxCursor(const char bits[], int width, int height,
|
|
|
|
int hotSpotX = -1, int hotSpotY = -1,
|
|
|
|
const char maskBits[] = NULL);
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_XBM,
|
|
|
|
int hotSpotX = 0, int hotSpotY = 0);
|
2002-07-01 16:34:20 -04:00
|
|
|
|
2006-07-25 10:31:55 -04:00
|
|
|
#if wxUSE_IMAGE
|
2002-07-01 16:34:20 -04:00
|
|
|
wxCursor(const wxImage& image);
|
|
|
|
#endif
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
wxCursor(wxStockCursor id);
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxCursor();
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2006-10-08 17:56:55 -04:00
|
|
|
virtual bool Ok() const { return IsOk(); }
|
|
|
|
virtual bool IsOk() const;
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2003-03-22 10:46:22 -05:00
|
|
|
bool operator == (const wxCursor& cursor) const
|
|
|
|
{ return m_refData == cursor.m_refData; }
|
|
|
|
bool operator != (const wxCursor& cursor) const
|
|
|
|
{ return m_refData != cursor.m_refData; }
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
// Motif-specific.
|
|
|
|
// Create/get a cursor for the current display
|
2004-06-28 15:22:48 -04:00
|
|
|
WXCursor GetXCursor(WXDisplay* display) const;
|
2003-03-22 10:46:22 -05:00
|
|
|
private:
|
2003-05-27 16:31:41 -04:00
|
|
|
void Create(const char bits[], int width, int height,
|
|
|
|
int hotSpotX = -1, int hotSpotY = -1,
|
|
|
|
const char maskBits[] = NULL);
|
|
|
|
void Create(WXPixmap cursor, WXPixmap mask, int hotSpotX, int hotSpotY);
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
// Make a cursor from standard id
|
2004-06-28 15:22:48 -04:00
|
|
|
WXCursor MakeCursor(WXDisplay* display, wxStockCursor id) const;
|
1998-09-18 06:19:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 11:34:33 -05:00
|
|
|
// _WX_CURSOR_H_
|