1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-11-24 12:30:56 +00:00
|
|
|
// Name: wx/msw/cursor.h
|
1998-05-20 14:12:05 +00:00
|
|
|
// Purpose: wxCursor class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 23:52:45 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
1999-11-24 12:30:56 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:12:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 23:52:45 +00:00
|
|
|
#ifndef _WX_CURSOR_H_
|
|
|
|
#define _WX_CURSOR_H_
|
1998-05-20 14:12:05 +00:00
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-11-24 12:30:56 +00:00
|
|
|
#pragma interface "cursor.h"
|
1998-05-20 14:12:05 +00:00
|
|
|
#endif
|
|
|
|
|
2003-01-25 13:06:00 +00:00
|
|
|
#include "wx/msw/gdiimage.h"
|
1999-11-24 12:30:56 +00:00
|
|
|
|
2002-04-23 23:51:52 +00:00
|
|
|
class WXDLLEXPORT wxImage;
|
|
|
|
|
1998-05-20 14:12:05 +00:00
|
|
|
// Cursor
|
2003-01-25 13:06:00 +00:00
|
|
|
class WXDLLEXPORT wxCursor : public wxGDIImage
|
1998-05-20 14:12:05 +00:00
|
|
|
{
|
|
|
|
public:
|
2003-02-02 02:06:34 +00:00
|
|
|
// constructors
|
1999-11-24 12:30:56 +00:00
|
|
|
wxCursor();
|
|
|
|
wxCursor(const wxCursor& cursor) { Ref(cursor); }
|
2003-01-25 13:06:00 +00:00
|
|
|
wxCursor(const wxImage& image);
|
1999-11-24 12:30:56 +00:00
|
|
|
wxCursor(const char bits[], int width, int height,
|
|
|
|
int hotSpotX = -1, int hotSpotY = -1,
|
|
|
|
const char maskBits[] = NULL);
|
|
|
|
wxCursor(const wxString& name,
|
|
|
|
long flags = wxBITMAP_TYPE_CUR_RESOURCE,
|
|
|
|
int hotSpotX = 0, int hotSpotY = 0);
|
2003-02-02 02:06:34 +00:00
|
|
|
wxCursor(int idCursor);
|
1999-11-24 12:30:56 +00:00
|
|
|
virtual ~wxCursor();
|
1998-05-20 14:12:05 +00:00
|
|
|
|
2003-02-02 02:06:34 +00:00
|
|
|
wxCursor& operator=(const wxCursor& cursor)
|
|
|
|
{ if (*this == cursor) return (*this); Ref(cursor); return *this; }
|
|
|
|
|
|
|
|
bool operator==(const wxCursor& cursor) const;
|
|
|
|
bool operator!=(const wxCursor& cursor) const
|
|
|
|
{ return !(*this == cursor); }
|
1998-05-20 14:12:05 +00:00
|
|
|
|
2003-02-02 02:06:34 +00:00
|
|
|
// implementation only
|
1999-11-24 12:30:56 +00:00
|
|
|
void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); }
|
|
|
|
WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); }
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
protected:
|
2003-02-02 02:06:34 +00:00
|
|
|
virtual wxGDIImageRefData *CreateData() const;
|
1998-05-20 14:12:05 +00:00
|
|
|
|
1999-11-24 12:30:56 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxCursor)
|
1998-05-20 14:12:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-08-07 23:52:45 +00:00
|
|
|
// _WX_CURSOR_H_
|