1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
1999-11-24 07:30:56 -05:00
|
|
|
// Name: wx/msw/cursor.h
|
1998-05-20 10:12:05 -04:00
|
|
|
// Purpose: wxCursor class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_CURSOR_H_
|
|
|
|
#define _WX_CURSOR_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-11-24 07:30:56 -05:00
|
|
|
#pragma interface "cursor.h"
|
1998-05-20 10:12:05 -04:00
|
|
|
#endif
|
|
|
|
|
2003-01-25 08:06:00 -05:00
|
|
|
#include "wx/msw/gdiimage.h"
|
1999-11-24 07:30:56 -05:00
|
|
|
|
2002-04-23 19:51:52 -04:00
|
|
|
class WXDLLEXPORT wxImage;
|
|
|
|
|
1998-05-20 10:12:05 -04:00
|
|
|
// Cursor
|
2003-01-25 08:06:00 -05:00
|
|
|
class WXDLLEXPORT wxCursor : public wxGDIImage
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
|
|
|
public:
|
2003-02-01 21:06:34 -05:00
|
|
|
// constructors
|
1999-11-24 07:30:56 -05:00
|
|
|
wxCursor();
|
2004-09-16 18:36:12 -04:00
|
|
|
wxCursor(const wxCursor& cursor) : wxGDIImage(cursor) { Ref(cursor); }
|
2003-01-25 08:06:00 -05:00
|
|
|
wxCursor(const wxImage& image);
|
1999-11-24 07:30:56 -05: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-01 21:06:34 -05:00
|
|
|
wxCursor(int idCursor);
|
1999-11-24 07:30:56 -05:00
|
|
|
virtual ~wxCursor();
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2003-02-01 21:06:34 -05: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 10:12:05 -04:00
|
|
|
|
2003-02-01 21:06:34 -05:00
|
|
|
// implementation only
|
1999-11-24 07:30:56 -05:00
|
|
|
void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); }
|
|
|
|
WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); }
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
protected:
|
2003-02-01 21:06:34 -05:00
|
|
|
virtual wxGDIImageRefData *CreateData() const;
|
1998-05-20 10:12:05 -04:00
|
|
|
|
1999-11-24 07:30:56 -05:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxCursor)
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-08-07 19:52:45 -04:00
|
|
|
// _WX_CURSOR_H_
|