1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: cursor.h
|
|
|
|
// Purpose: wxCursor class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CURSOR_H_
|
|
|
|
#define _WX_CURSOR_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "cursor.h"
|
|
|
|
#endif
|
|
|
|
|
2003-03-22 10:46:22 -05:00
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/gdicmn.h"
|
1998-09-18 06:19:10 -04:00
|
|
|
|
2003-03-22 10:46:22 -05:00
|
|
|
class WXDLLEXPORT wxImage;
|
1998-09-18 06:19:10 -04:00
|
|
|
|
|
|
|
// Cursor
|
2003-03-22 10:46:22 -05:00
|
|
|
class WXDLLEXPORT wxCursor: public wxObject
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
2002-02-05 11:34:33 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCursor)
|
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
public:
|
2002-02-05 11:34:33 -05:00
|
|
|
wxCursor();
|
|
|
|
|
|
|
|
// Copy constructors
|
|
|
|
wxCursor(const wxCursor& cursor) { Ref(cursor); }
|
|
|
|
|
|
|
|
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_XBM,
|
|
|
|
int hotSpotX = 0, int hotSpotY = 0);
|
2002-07-01 16:34:20 -04:00
|
|
|
|
|
|
|
#if wxUSE_IMAGE
|
|
|
|
wxCursor(const wxImage& image);
|
|
|
|
#endif
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
wxCursor(wxStockCursor id);
|
|
|
|
~wxCursor();
|
|
|
|
|
2003-03-22 10:46:22 -05:00
|
|
|
virtual bool Ok() const;
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2003-03-22 10:46:22 -05:00
|
|
|
wxCursor& operator = (const wxCursor& cursor)
|
|
|
|
{ if (*this == cursor) return (*this); Ref(cursor); return *this; }
|
|
|
|
bool operator == (const wxCursor& cursor) const
|
|
|
|
{ return m_refData == cursor.m_refData; }
|
|
|
|
bool operator != (const wxCursor& cursor) const
|
|
|
|
{ return m_refData != cursor.m_refData; }
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
// Motif-specific.
|
|
|
|
// Create/get a cursor for the current display
|
|
|
|
WXCursor GetXCursor(WXDisplay* display) ;
|
2003-03-22 10:46:22 -05:00
|
|
|
private:
|
2002-02-05 11:34:33 -05:00
|
|
|
// Make a cursor from standard id
|
|
|
|
WXCursor MakeCursor(WXDisplay* display, wxStockCursor id);
|
1998-09-18 06:19:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 11:34:33 -05:00
|
|
|
// _WX_CURSOR_H_
|