1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 14:31:55 +00:00
|
|
|
// Name: wx/motif/cursor.h
|
1998-09-18 10:19:10 +00:00
|
|
|
// Purpose: wxCursor class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// Copyright: (c) Julian Smart
|
2006-07-25 14:31:55 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CURSOR_H_
|
|
|
|
#define _WX_CURSOR_H_
|
|
|
|
|
2003-03-22 15:46:22 +00:00
|
|
|
#include "wx/gdicmn.h"
|
1998-09-18 10:19:10 +00:00
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxImage;
|
1998-09-18 10:19:10 +00:00
|
|
|
|
|
|
|
// Cursor
|
2014-11-11 01:02:45 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
|
|
|
public:
|
2002-02-05 16:34:33 +00:00
|
|
|
wxCursor();
|
2006-02-09 00:51:23 +00:00
|
|
|
|
2003-05-27 20:31:41 +00:00
|
|
|
wxCursor(const char bits[], int width, int height,
|
|
|
|
int hotSpotX = -1, int hotSpotY = -1,
|
2008-09-25 17:56:07 +00:00
|
|
|
const char maskBits[] = NULL,
|
|
|
|
const wxColour* fg = NULL, const wxColour* bg = NULL);
|
2006-07-25 14:31:55 +00:00
|
|
|
|
2008-09-25 17:56:07 +00:00
|
|
|
wxCursor(const wxString& name,
|
|
|
|
wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
|
|
|
|
int hotSpotX = 0, int hotSpotY = 0);
|
2002-07-01 20:34:20 +00:00
|
|
|
|
2006-07-25 14:31:55 +00:00
|
|
|
#if wxUSE_IMAGE
|
2002-07-01 20:34:20 +00:00
|
|
|
wxCursor(const wxImage& image);
|
|
|
|
#endif
|
2006-07-25 14:31:55 +00:00
|
|
|
|
2008-09-25 17:56:07 +00:00
|
|
|
wxCursor(wxStockCursor id) { InitFromStock(id); }
|
|
|
|
#if WXWIN_COMPATIBILITY_2_8
|
|
|
|
wxCursor(int id) { InitFromStock((wxStockCursor)id); }
|
|
|
|
#endif
|
|
|
|
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxCursor();
|
2006-07-25 14:31:55 +00:00
|
|
|
|
2002-02-05 16:34:33 +00:00
|
|
|
// Motif-specific.
|
|
|
|
// Create/get a cursor for the current display
|
2004-06-28 19:22:48 +00:00
|
|
|
WXCursor GetXCursor(WXDisplay* display) const;
|
2007-12-15 17:54:20 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
|
|
|
|
2003-03-22 15:46:22 +00:00
|
|
|
private:
|
2008-09-25 17:56:07 +00:00
|
|
|
void InitFromStock(wxStockCursor);
|
|
|
|
|
2003-05-27 20:31:41 +00: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 16:34:33 +00:00
|
|
|
// Make a cursor from standard id
|
2004-06-28 19:22:48 +00:00
|
|
|
WXCursor MakeCursor(WXDisplay* display, wxStockCursor id) const;
|
2007-12-15 17:54:20 +00:00
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxCursor);
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
extern WXDLLIMPEXP_CORE void wxSetCursor(const wxCursor& cursor);
|
1998-09-18 10:19:10 +00:00
|
|
|
|
|
|
|
#endif
|
2002-02-05 16:34:33 +00:00
|
|
|
// _WX_CURSOR_H_
|