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:
Francesco Montorsi 2008-09-24 19:40:13 +00:00
parent 54590cb078
commit d4f392ea20
20 changed files with 28 additions and 31 deletions

View File

@ -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!

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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); }

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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)"
}

View File

@ -56,7 +56,7 @@ wxCursor::wxCursor()
{
}
wxCursor::wxCursor( int cursorId )
wxCursor::wxCursor( wxStockCursor cursorId )
{
m_refData = new wxCursorRefData();

View File

@ -61,7 +61,7 @@ wxCursor::wxCursor()
}
wxCursor::wxCursor( int cursorId )
wxCursor::wxCursor( wxStockCursor cursorId )
{
m_refData = new wxCursorRefData();

View File

@ -65,7 +65,7 @@ wxCursor::wxCursor()
{
}
wxCursor::wxCursor(int cursorId)
wxCursor::wxCursor(wxStockCursor cursorId)
{
if ( !gs_cursorsHash )
gs_cursorsHash = new wxCursorsHash;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -96,7 +96,7 @@ wxCursor::wxCursor(const wxString& filename,
}
// Cursors by stock number
wxCursor::wxCursor(int idCursor)
wxCursor::wxCursor(wxStockCursor idCursor)
{
}

View File

@ -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;
}
}

View File

@ -66,7 +66,7 @@ wxCursor::wxCursor()
}
wxCursor::wxCursor( int cursorId )
wxCursor::wxCursor( wxStockCursor cursorId )
{
m_refData = new wxCursorRefData();