]> git.saurik.com Git - wxWidgets.git/blame - include/wx/qt/cursor.h
Rewrote wxNotebook, incl. PAGE_CHANGING event
[wxWidgets.git] / include / wx / qt / cursor.h
CommitLineData
7c78e7c7
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: cursor.h
01b2eeec
KB
3// Purpose: wxCursor class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
7c78e7c7
RR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
01b2eeec
KB
12#ifndef _WX_CURSOR_H_
13#define _WX_CURSOR_H_
7c78e7c7
RR
14
15#ifdef __GNUG__
01b2eeec 16#pragma interface "cursor.h"
7c78e7c7
RR
17#endif
18
01b2eeec 19#include "wx/bitmap.h"
7c78e7c7 20
01b2eeec
KB
21class WXDLLEXPORT wxCursorRefData: public wxBitmapRefData
22{
23 friend class WXDLLEXPORT wxBitmap;
24 friend class WXDLLEXPORT wxCursor;
25public:
26 wxCursorRefData();
27 ~wxCursorRefData();
7c78e7c7 28
01b2eeec
KB
29protected:
30/* TODO: implementation
31 WXHCURSOR m_hCursor;
32*/
33};
7c78e7c7 34
01b2eeec
KB
35#define M_CURSORDATA ((wxCursorRefData *)m_refData)
36#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
7c78e7c7 37
01b2eeec
KB
38// Cursor
39class WXDLLEXPORT wxCursor: public wxBitmap
7c78e7c7
RR
40{
41 DECLARE_DYNAMIC_CLASS(wxCursor)
42
01b2eeec
KB
43public:
44 wxCursor();
45
46 // Copy constructors
47 inline wxCursor(const wxCursor& cursor) { Ref(cursor); }
48 inline wxCursor(const wxCursor* cursor) { if (cursor) Ref(*cursor); }
49
50 wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
51 const char maskBits[] = NULL);
52
53 /* TODO: make default type suit platform */
54 wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_CUR_RESOURCE,
55 int hotSpotX = 0, int hotSpotY = 0);
56
57 wxCursor(int cursor_type);
58 ~wxCursor();
59
60 virtual bool Ok() const { return (m_refData != NULL && M_CURSORDATA->m_hCursor) ; }
61
62 inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
63 inline bool operator == (const wxCursor& cursor) { return m_refData == cursor.m_refData; }
64 inline bool operator != (const wxCursor& cursor) { return m_refData != cursor.m_refData; }
65
66/* TODO: implementation
67 void SetHCURSOR(WXHCURSOR cursor);
68 inline WXHCURSOR GetHCURSOR() const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
69*/
7c78e7c7
RR
70};
71
01b2eeec
KB
72extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
73
74#endif
75 // _WX_CURSOR_H_