1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-20 00:14:35 +00:00
|
|
|
// Name: wx/gtk/cursor.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-26 10:56:58 +00:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-08-30 05:55:56 +00:00
|
|
|
#ifndef _WX_GTK_CURSOR_H_
|
|
|
|
#define _WX_GTK_CURSOR_H_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2007-12-15 17:54:20 +00:00
|
|
|
#include "wx/gdiobj.h"
|
2008-09-25 09:56:22 +00:00
|
|
|
#include "wx/gdicmn.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxColour;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxImage;
|
2002-01-31 22:11:06 +00:00
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxCursor
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-12-15 17:54:20 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1999-11-22 19:44:25 +00:00
|
|
|
public:
|
1998-12-09 17:30:17 +00:00
|
|
|
wxCursor();
|
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
|
2002-01-31 22:11:06 +00:00
|
|
|
#if wxUSE_IMAGE
|
|
|
|
wxCursor( const wxImage & image );
|
2009-05-16 10:42:48 +00:00
|
|
|
wxCursor(const wxString& name,
|
|
|
|
wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
|
|
|
|
int hotSpotX = 0, int hotSpotY = 0);
|
2002-01-31 22:11:06 +00:00
|
|
|
#endif
|
2008-09-25 09:56:22 +00:00
|
|
|
wxCursor( const char bits[], int width, int height,
|
|
|
|
int hotSpotX = -1, int hotSpotY = -1,
|
2007-12-15 17:54:20 +00:00
|
|
|
const char maskBits[] = NULL,
|
2008-09-25 09:56:22 +00:00
|
|
|
const wxColour* fg = NULL, const wxColour* bg = NULL);
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxCursor();
|
1998-12-09 17:30:17 +00:00
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
// implementation
|
|
|
|
|
1998-12-09 17:30:17 +00:00
|
|
|
GdkCursor *GetCursor() const;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2007-12-15 17:54:20 +00:00
|
|
|
protected:
|
2008-09-25 17:56:07 +00:00
|
|
|
void InitFromStock(wxStockCursor);
|
2009-05-16 10:42:48 +00:00
|
|
|
#if wxUSE_IMAGE
|
|
|
|
void InitFromImage(const wxImage& image);
|
|
|
|
#endif
|
2008-09-25 17:56:07 +00:00
|
|
|
|
2007-12-15 17:54:20 +00:00
|
|
|
virtual wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxCursor)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
2006-08-30 05:55:56 +00:00
|
|
|
#endif // _WX_GTK_CURSOR_H_
|