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:
parent
54590cb078
commit
d4f392ea20
@ -46,7 +46,7 @@ public:
|
||||
wxCursor(const wxString& name, long flags = 0,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
|
||||
wxCursor(int cursor_type);
|
||||
wxCursor(wxStockCursor cursor_type);
|
||||
virtual ~wxCursor();
|
||||
|
||||
// FIXME: operator==() is wrong!
|
||||
|
@ -24,7 +24,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxCursor() {}
|
||||
wxCursor(int cursorId);
|
||||
wxCursor(wxStockCursor cursorId);
|
||||
wxCursor(const char bits[], int width, int height,
|
||||
int hotSpotX=-1, int hotSpotY=-1,
|
||||
const char maskBits[]=0, wxColour *fg=0, wxColour *bg=0);
|
||||
|
@ -23,7 +23,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
wxCursor( int cursorId );
|
||||
wxCursor( wxStockCursor cursorId );
|
||||
#if wxUSE_IMAGE
|
||||
wxCursor( const wxImage & image );
|
||||
#endif
|
||||
|
@ -25,7 +25,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
wxCursor( int cursorId );
|
||||
wxCursor( wxStockCursor cursorId );
|
||||
#if wxUSE_IMAGE
|
||||
wxCursor( const wxImage & image );
|
||||
#endif
|
||||
|
@ -24,7 +24,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
public:
|
||||
|
||||
wxCursor();
|
||||
wxCursor(int cursorId);
|
||||
wxCursor(wxStockCursor cursorId);
|
||||
wxCursor(const char bits[], int width, int height,
|
||||
int hotSpotX=-1, int hotSpotY=-1,
|
||||
const char maskBits[]=0, wxColour *fg=0, wxColour *bg=0);
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
wxCursor(const wxString& name,
|
||||
long flags = wxBITMAP_TYPE_CUR_RESOURCE,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
wxCursor(int idCursor);
|
||||
wxCursor(wxStockCursor idCursor);
|
||||
virtual ~wxCursor();
|
||||
|
||||
// implementation only
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
,int nHotSpotX = 0
|
||||
,int nHotSpotY = 0
|
||||
);
|
||||
wxCursor(int nCursorType);
|
||||
wxCursor(wxStockCursor nCursorType);
|
||||
inline ~wxCursor() { }
|
||||
|
||||
inline WXHCURSOR GetHCURSOR(void) const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
wxBitmapType flags = wxBITMAP_TYPE_MACCURSOR_RESOURCE,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
|
||||
wxCursor(int cursor_type);
|
||||
wxCursor(wxStockCursor cursor_type);
|
||||
virtual ~wxCursor();
|
||||
|
||||
bool CreateFromXpm(const char* const* bits);
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
wxCursor(const wxString& name,
|
||||
long flags = wxBITMAP_TYPE_CUR_RESOURCE,
|
||||
int hotSpotX = 0, int hotSpotY = 0);
|
||||
wxCursor(int idCursor);
|
||||
wxCursor(wxStockCursor idCursor);
|
||||
virtual ~wxCursor();
|
||||
|
||||
// implementation only
|
||||
|
@ -25,7 +25,7 @@ class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
wxCursor( int cursorId );
|
||||
wxCursor( wxStockCursor cursorId );
|
||||
#if wxUSE_IMAGE
|
||||
wxCursor( const wxImage & image );
|
||||
#endif
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
|
||||
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)"
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ wxCursor::wxCursor()
|
||||
{
|
||||
}
|
||||
|
||||
wxCursor::wxCursor( int cursorId )
|
||||
wxCursor::wxCursor( wxStockCursor cursorId )
|
||||
{
|
||||
m_refData = new wxCursorRefData();
|
||||
|
||||
|
@ -61,7 +61,7 @@ wxCursor::wxCursor()
|
||||
|
||||
}
|
||||
|
||||
wxCursor::wxCursor( int cursorId )
|
||||
wxCursor::wxCursor( wxStockCursor cursorId )
|
||||
{
|
||||
m_refData = new wxCursorRefData();
|
||||
|
||||
|
@ -65,7 +65,7 @@ wxCursor::wxCursor()
|
||||
{
|
||||
}
|
||||
|
||||
wxCursor::wxCursor(int cursorId)
|
||||
wxCursor::wxCursor(wxStockCursor cursorId)
|
||||
{
|
||||
if ( !gs_cursorsHash )
|
||||
gs_cursorsHash = new wxCursorsHash;
|
||||
|
@ -292,7 +292,7 @@ wxCursor::wxCursor(const wxString& filename,
|
||||
}
|
||||
|
||||
// Cursors by stock number
|
||||
wxCursor::wxCursor(int idCursor)
|
||||
wxCursor::wxCursor(wxStockCursor idCursor)
|
||||
{
|
||||
// all wxWidgets standard cursors
|
||||
static const struct StdCursor
|
||||
|
@ -113,7 +113,7 @@ wxCursor::wxCursor( const wxString& WXUNUSED(rsCursorFile),
|
||||
} // end of wxCursor::wxCursor
|
||||
|
||||
// Cursors by stock number
|
||||
wxCursor::wxCursor(int nCursorType)
|
||||
wxCursor::wxCursor(wxStockCursor nCursorType)
|
||||
{
|
||||
wxCursorRefData* pRefData = new wxCursorRefData;
|
||||
|
||||
|
@ -355,7 +355,7 @@ void wxCursor::CreateFromImage(const wxImage & image)
|
||||
CGImageRef cgimage = wxMacCreateCGImageFromBitmap(bmp);
|
||||
if ( cgimage )
|
||||
{
|
||||
M_CURSORDATA->m_hCursor = wxMacCocoaCreateCursorFromCGImage( cgimage, hotSpotX, hotSpotY );
|
||||
M_CURSORDATA->m_hCursor = wxMacCocoaCreateCursorFromCGImage( cgimage, hotSpotX, hotSpotY );
|
||||
CFRelease( cgimage );
|
||||
}
|
||||
#elif wxOSX_USE_CARBON
|
||||
@ -556,7 +556,7 @@ wxCursor::wxCursor(const wxString& cursor_file, wxBitmapType flags, int hotSpotX
|
||||
}
|
||||
|
||||
// Cursors by stock number
|
||||
wxCursor::wxCursor(int cursor_type)
|
||||
wxCursor::wxCursor(wxStockCursor cursor_type)
|
||||
{
|
||||
m_refData = new wxCursorRefData;
|
||||
#if wxOSX_USE_COCOA
|
||||
|
@ -96,7 +96,7 @@ wxCursor::wxCursor(const wxString& filename,
|
||||
}
|
||||
|
||||
// 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) {
|
||||
int cursorId;
|
||||
wxStockCursor cursorId;
|
||||
|
||||
switch (curs) {
|
||||
case cursorText:
|
||||
@ -708,16 +708,13 @@ void Window::SetCursor(Cursor curs) {
|
||||
cursorId = wxCURSOR_ARROW;
|
||||
break;
|
||||
}
|
||||
#ifdef __WXMOTIF__
|
||||
wxCursor wc = wxStockCursor(cursorId) ;
|
||||
#else
|
||||
wxCursor wc = wxCursor(cursorId) ;
|
||||
#endif
|
||||
if(curs != cursorLast)
|
||||
{
|
||||
GETWIN(id)->SetCursor(wc);
|
||||
cursorLast = curs;
|
||||
}
|
||||
|
||||
wxCursor wc = wxCursor(cursorId);
|
||||
if(curs != cursorLast)
|
||||
{
|
||||
GETWIN(id)->SetCursor(wc);
|
||||
cursorLast = curs;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@ wxCursor::wxCursor()
|
||||
|
||||
}
|
||||
|
||||
wxCursor::wxCursor( int cursorId )
|
||||
wxCursor::wxCursor( wxStockCursor cursorId )
|
||||
{
|
||||
m_refData = new wxCursorRefData();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user