Rename Mac wxCursor::CreateFromImage() to InitFromImage()
Use the same name as in the other ports for the function doing the same thing, there doesn't seem to be any good reason to name it differently. Also avoid declaring it when wxUSE_IMAGE==0 as it's not defined in this case (again, consistently with the other ports).
This commit is contained in:
@@ -44,7 +44,9 @@ protected:
|
||||
private:
|
||||
void InitFromStock(wxStockCursor);
|
||||
|
||||
void CreateFromImage(const wxImage & image) ;
|
||||
#if wxUSE_IMAGE
|
||||
void InitFromImage(const wxImage & image) ;
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxCursor);
|
||||
};
|
||||
|
@@ -228,7 +228,7 @@ wxCursor::wxCursor()
|
||||
#if wxUSE_IMAGE
|
||||
wxCursor::wxCursor( const wxImage &image )
|
||||
{
|
||||
CreateFromImage( image ) ;
|
||||
InitFromImage( image ) ;
|
||||
}
|
||||
#endif // wxUSE_IMAGE
|
||||
|
||||
@@ -249,7 +249,7 @@ WXHCURSOR wxCursor::GetHCURSOR() const
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
|
||||
void wxCursor::CreateFromImage(const wxImage & image)
|
||||
void wxCursor::InitFromImage(const wxImage & image)
|
||||
{
|
||||
m_refData = new wxCursorRefData;
|
||||
int hotSpotX = image.GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X);
|
||||
@@ -287,7 +287,7 @@ wxCursor::wxCursor(const wxString& cursor_file, wxBitmapType flags, int hotSpotX
|
||||
image.SetOption( wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY ) ;
|
||||
m_refData->DecRef() ;
|
||||
m_refData = NULL ;
|
||||
CreateFromImage( image ) ;
|
||||
InitFromImage( image ) ;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user