use wxStockCursor (as documented and as already implemented in wxMotif) instead of a plain 'int'
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,7 +46,7 @@ public:
|
|||||||
wxCursor(const wxString& name, long flags = 0,
|
wxCursor(const wxString& name, long flags = 0,
|
||||||
int hotSpotX = 0, int hotSpotY = 0);
|
int hotSpotX = 0, int hotSpotY = 0);
|
||||||
|
|
||||||
wxCursor(int cursor_type);
|
wxCursor(wxStockCursor cursor_type);
|
||||||
virtual ~wxCursor();
|
virtual ~wxCursor();
|
||||||
|
|
||||||
// FIXME: operator==() is wrong!
|
// FIXME: operator==() is wrong!
|
||||||
|
@@ -24,7 +24,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCursor() {}
|
wxCursor() {}
|
||||||
wxCursor(int cursorId);
|
wxCursor(wxStockCursor cursorId);
|
||||||
wxCursor(const char bits[], int width, int height,
|
wxCursor(const char bits[], int width, int height,
|
||||||
int hotSpotX=-1, int hotSpotY=-1,
|
int hotSpotX=-1, int hotSpotY=-1,
|
||||||
const char maskBits[]=0, wxColour *fg=0, wxColour *bg=0);
|
const char maskBits[]=0, wxColour *fg=0, wxColour *bg=0);
|
||||||
|
@@ -23,7 +23,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCursor();
|
wxCursor();
|
||||||
wxCursor( int cursorId );
|
wxCursor( wxStockCursor cursorId );
|
||||||
#if wxUSE_IMAGE
|
#if wxUSE_IMAGE
|
||||||
wxCursor( const wxImage & image );
|
wxCursor( const wxImage & image );
|
||||||
#endif
|
#endif
|
||||||
|
@@ -25,7 +25,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCursor();
|
wxCursor();
|
||||||
wxCursor( int cursorId );
|
wxCursor( wxStockCursor cursorId );
|
||||||
#if wxUSE_IMAGE
|
#if wxUSE_IMAGE
|
||||||
wxCursor( const wxImage & image );
|
wxCursor( const wxImage & image );
|
||||||
#endif
|
#endif
|
||||||
|
@@ -24,7 +24,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
wxCursor();
|
wxCursor();
|
||||||
wxCursor(int cursorId);
|
wxCursor(wxStockCursor cursorId);
|
||||||
wxCursor(const char bits[], int width, int height,
|
wxCursor(const char bits[], int width, int height,
|
||||||
int hotSpotX=-1, int hotSpotY=-1,
|
int hotSpotX=-1, int hotSpotY=-1,
|
||||||
const char maskBits[]=0, wxColour *fg=0, wxColour *bg=0);
|
const char maskBits[]=0, wxColour *fg=0, wxColour *bg=0);
|
||||||
|
@@ -29,7 +29,7 @@ public:
|
|||||||
wxCursor(const wxString& name,
|
wxCursor(const wxString& name,
|
||||||
long flags = wxBITMAP_TYPE_CUR_RESOURCE,
|
long flags = wxBITMAP_TYPE_CUR_RESOURCE,
|
||||||
int hotSpotX = 0, int hotSpotY = 0);
|
int hotSpotX = 0, int hotSpotY = 0);
|
||||||
wxCursor(int idCursor);
|
wxCursor(wxStockCursor idCursor);
|
||||||
virtual ~wxCursor();
|
virtual ~wxCursor();
|
||||||
|
|
||||||
// implementation only
|
// implementation only
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
,int nHotSpotX = 0
|
,int nHotSpotX = 0
|
||||||
,int nHotSpotY = 0
|
,int nHotSpotY = 0
|
||||||
);
|
);
|
||||||
wxCursor(int nCursorType);
|
wxCursor(wxStockCursor nCursorType);
|
||||||
inline ~wxCursor() { }
|
inline ~wxCursor() { }
|
||||||
|
|
||||||
inline WXHCURSOR GetHCURSOR(void) const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
|
inline WXHCURSOR GetHCURSOR(void) const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
|
||||||
|
@@ -30,7 +30,7 @@ public:
|
|||||||
wxBitmapType flags = wxBITMAP_TYPE_MACCURSOR_RESOURCE,
|
wxBitmapType flags = wxBITMAP_TYPE_MACCURSOR_RESOURCE,
|
||||||
int hotSpotX = 0, int hotSpotY = 0);
|
int hotSpotX = 0, int hotSpotY = 0);
|
||||||
|
|
||||||
wxCursor(int cursor_type);
|
wxCursor(wxStockCursor cursor_type);
|
||||||
virtual ~wxCursor();
|
virtual ~wxCursor();
|
||||||
|
|
||||||
bool CreateFromXpm(const char* const* bits);
|
bool CreateFromXpm(const char* const* bits);
|
||||||
|
@@ -29,7 +29,7 @@ public:
|
|||||||
wxCursor(const wxString& name,
|
wxCursor(const wxString& name,
|
||||||
long flags = wxBITMAP_TYPE_CUR_RESOURCE,
|
long flags = wxBITMAP_TYPE_CUR_RESOURCE,
|
||||||
int hotSpotX = 0, int hotSpotY = 0);
|
int hotSpotX = 0, int hotSpotY = 0);
|
||||||
wxCursor(int idCursor);
|
wxCursor(wxStockCursor idCursor);
|
||||||
virtual ~wxCursor();
|
virtual ~wxCursor();
|
||||||
|
|
||||||
// implementation only
|
// implementation only
|
||||||
|
@@ -25,7 +25,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxCursor();
|
wxCursor();
|
||||||
wxCursor( int cursorId );
|
wxCursor( wxStockCursor cursorId );
|
||||||
#if wxUSE_IMAGE
|
#if wxUSE_IMAGE
|
||||||
wxCursor( const wxImage & image );
|
wxCursor( const wxImage & image );
|
||||||
#endif
|
#endif
|
||||||
|
@@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxObject)
|
||||||
|
|
||||||
wxCursor::wxCursor(int cursorId)
|
wxCursor::wxCursor(wxStockCursor cursorId)
|
||||||
{
|
{
|
||||||
#warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)"
|
#warning "FIXME -- implement the cursor as bitmaps (that's what DFB uses)"
|
||||||
}
|
}
|
||||||
|
@@ -56,7 +56,7 @@ wxCursor::wxCursor()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursor::wxCursor( int cursorId )
|
wxCursor::wxCursor( wxStockCursor cursorId )
|
||||||
{
|
{
|
||||||
m_refData = new wxCursorRefData();
|
m_refData = new wxCursorRefData();
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ wxCursor::wxCursor()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursor::wxCursor( int cursorId )
|
wxCursor::wxCursor( wxStockCursor cursorId )
|
||||||
{
|
{
|
||||||
m_refData = new wxCursorRefData();
|
m_refData = new wxCursorRefData();
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@ wxCursor::wxCursor()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursor::wxCursor(int cursorId)
|
wxCursor::wxCursor(wxStockCursor cursorId)
|
||||||
{
|
{
|
||||||
if ( !gs_cursorsHash )
|
if ( !gs_cursorsHash )
|
||||||
gs_cursorsHash = new wxCursorsHash;
|
gs_cursorsHash = new wxCursorsHash;
|
||||||
|
@@ -292,7 +292,7 @@ wxCursor::wxCursor(const wxString& filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Cursors by stock number
|
// Cursors by stock number
|
||||||
wxCursor::wxCursor(int idCursor)
|
wxCursor::wxCursor(wxStockCursor idCursor)
|
||||||
{
|
{
|
||||||
// all wxWidgets standard cursors
|
// all wxWidgets standard cursors
|
||||||
static const struct StdCursor
|
static const struct StdCursor
|
||||||
|
@@ -113,7 +113,7 @@ wxCursor::wxCursor( const wxString& WXUNUSED(rsCursorFile),
|
|||||||
} // end of wxCursor::wxCursor
|
} // end of wxCursor::wxCursor
|
||||||
|
|
||||||
// Cursors by stock number
|
// Cursors by stock number
|
||||||
wxCursor::wxCursor(int nCursorType)
|
wxCursor::wxCursor(wxStockCursor nCursorType)
|
||||||
{
|
{
|
||||||
wxCursorRefData* pRefData = new wxCursorRefData;
|
wxCursorRefData* pRefData = new wxCursorRefData;
|
||||||
|
|
||||||
|
@@ -556,7 +556,7 @@ wxCursor::wxCursor(const wxString& cursor_file, wxBitmapType flags, int hotSpotX
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Cursors by stock number
|
// Cursors by stock number
|
||||||
wxCursor::wxCursor(int cursor_type)
|
wxCursor::wxCursor(wxStockCursor cursor_type)
|
||||||
{
|
{
|
||||||
m_refData = new wxCursorRefData;
|
m_refData = new wxCursorRefData;
|
||||||
#if wxOSX_USE_COCOA
|
#if wxOSX_USE_COCOA
|
||||||
|
@@ -96,7 +96,7 @@ wxCursor::wxCursor(const wxString& filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Cursors by stock number
|
// Cursors by stock number
|
||||||
wxCursor::wxCursor(int idCursor)
|
wxCursor::wxCursor(wxStockCursor idCursor)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -677,7 +677,7 @@ void Window::SetFont(Font &font) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Window::SetCursor(Cursor curs) {
|
void Window::SetCursor(Cursor curs) {
|
||||||
int cursorId;
|
wxStockCursor cursorId;
|
||||||
|
|
||||||
switch (curs) {
|
switch (curs) {
|
||||||
case cursorText:
|
case cursorText:
|
||||||
@@ -708,11 +708,8 @@ void Window::SetCursor(Cursor curs) {
|
|||||||
cursorId = wxCURSOR_ARROW;
|
cursorId = wxCURSOR_ARROW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef __WXMOTIF__
|
|
||||||
wxCursor wc = wxStockCursor(cursorId) ;
|
wxCursor wc = wxCursor(cursorId);
|
||||||
#else
|
|
||||||
wxCursor wc = wxCursor(cursorId) ;
|
|
||||||
#endif
|
|
||||||
if(curs != cursorLast)
|
if(curs != cursorLast)
|
||||||
{
|
{
|
||||||
GETWIN(id)->SetCursor(wc);
|
GETWIN(id)->SetCursor(wc);
|
||||||
|
@@ -66,7 +66,7 @@ wxCursor::wxCursor()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursor::wxCursor( int cursorId )
|
wxCursor::wxCursor( wxStockCursor cursorId )
|
||||||
{
|
{
|
||||||
m_refData = new wxCursorRefData();
|
m_refData = new wxCursorRefData();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user