1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-19 20:14:35 -04:00
|
|
|
// Name: wx/os2/cursor.h
|
1999-07-29 01:11:30 -04:00
|
|
|
// Purpose: wxCursor class
|
1999-10-14 00:43:46 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-14 00:43:46 -04:00
|
|
|
// Created: 10/13/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-14 00:43:46 -04:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CURSOR_H_
|
|
|
|
#define _WX_CURSOR_H_
|
|
|
|
|
|
|
|
#include "wx/bitmap.h"
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxCursorRefData: public wxGDIImageRefData
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxCursorRefData();
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxCursorRefData() { Free(); }
|
2002-08-04 23:12:36 -04:00
|
|
|
virtual void Free(void);
|
|
|
|
bool m_bDestroyCursor;
|
|
|
|
}; // end of CLASS wxCursorRefData
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
#define M_CURSORDATA ((wxCursorRefData *)m_refData)
|
|
|
|
#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
|
|
|
|
|
|
|
|
// Cursor
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxCursor: public wxBitmap
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
|
|
|
public:
|
2002-08-04 23:12:36 -04:00
|
|
|
wxCursor();
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2002-08-04 23:12:36 -04:00
|
|
|
wxCursor(const wxImage& rImage);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2002-08-04 23:12:36 -04:00
|
|
|
wxCursor( const wxString& rsName
|
2008-09-25 13:56:07 -04:00
|
|
|
,wxBitmapType lType = wxCURSOR_DEFAULT_TYPE
|
2002-08-04 23:12:36 -04:00
|
|
|
,int nHotSpotX = 0
|
|
|
|
,int nHotSpotY = 0
|
|
|
|
);
|
2008-09-25 13:56:07 -04:00
|
|
|
wxCursor(wxStockCursor id) { InitFromStock(id); }
|
|
|
|
#if WXWIN_COMPATIBILITY_2_8
|
|
|
|
wxCursor(int id) { InitFromStock((wxStockCursor)id); }
|
|
|
|
#endif
|
2002-08-04 23:12:36 -04:00
|
|
|
inline ~wxCursor() { }
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2002-08-04 23:12:36 -04:00
|
|
|
inline WXHCURSOR GetHCURSOR(void) const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
|
|
|
|
inline void SetHCURSOR(WXHCURSOR hCursor) { SetHandle((WXHANDLE)hCursor); }
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2002-08-04 23:12:36 -04:00
|
|
|
protected:
|
2008-09-25 13:56:07 -04:00
|
|
|
void InitFromStock(wxStockCursor);
|
2002-08-04 23:12:36 -04:00
|
|
|
inline virtual wxGDIImageRefData* CreateData(void) const { return (new wxCursorRefData); }
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2002-08-04 23:12:36 -04:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxCursor)
|
|
|
|
}; // end of CLASS wxCursor
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_CURSOR_H_
|