Introduce wxCursorBase class defining common wxCursor API.
This is done in preparation for adding a new wxCursor method and will allow us to define it in a single place by default instead of having to provide stubs for all ports. See #16539. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78133 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
261e7eac73
commit
e737363e6b
@ -1,10 +1,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/cursor.h
|
||||
// Purpose: wxCursor base header
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Author: Julian Smart, Vadim Zeitlin
|
||||
// Created:
|
||||
// Copyright: (c) Julian Smart
|
||||
// (c) 2014 Vadim Zeitlin (wxCursorBase)
|
||||
// Licence: wxWindows Licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -13,12 +13,22 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
/*
|
||||
wxCursor classes should have the following public API:
|
||||
#include "wx/gdiobj.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
// Under most ports, wxCursor derives directly from wxGDIObject, but in wxMSW
|
||||
// there is an intermediate wxGDIImage class.
|
||||
#ifdef __WXMSW__
|
||||
#include "wx/msw/gdiimage.h"
|
||||
#else
|
||||
typedef wxGDIObject wxGDIImage;
|
||||
#endif
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCursorBase : public wxGDIImage
|
||||
{
|
||||
public:
|
||||
/*
|
||||
wxCursor classes should provide the following ctors:
|
||||
|
||||
wxCursor();
|
||||
wxCursor(const wxImage& image);
|
||||
wxCursor(const wxString& name,
|
||||
@ -28,10 +38,8 @@ public:
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
wxCursor(int id) { InitFromStock((wxStockCursor)id); }
|
||||
#endif
|
||||
virtual ~wxCursor();
|
||||
};
|
||||
|
||||
*/
|
||||
};
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE
|
||||
|
@ -10,7 +10,6 @@
|
||||
#ifndef _WX_DFB_CURSOR_H_
|
||||
#define _WX_DFB_CURSOR_H_
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
@ -19,7 +18,7 @@ class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
||||
// wxCursor
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
||||
{
|
||||
public:
|
||||
wxCursor() {}
|
||||
|
@ -9,7 +9,6 @@
|
||||
#ifndef _WX_GTK_CURSOR_H_
|
||||
#define _WX_GTK_CURSOR_H_
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxColour;
|
||||
@ -19,7 +18,7 @@ class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
// wxCursor
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
|
@ -9,7 +9,6 @@
|
||||
#ifndef __GTKCURSORH__
|
||||
#define __GTKCURSORH__
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
@ -20,7 +19,7 @@
|
||||
// wxCursor
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
|
@ -11,13 +11,12 @@
|
||||
#ifndef _WX_CURSOR_H_
|
||||
#define _WX_CURSOR_H_
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
|
||||
// Cursor
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
|
@ -11,12 +11,10 @@
|
||||
#ifndef _WX_CURSOR_H_
|
||||
#define _WX_CURSOR_H_
|
||||
|
||||
#include "wx/msw/gdiimage.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
|
||||
// Cursor
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIImage
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
||||
{
|
||||
public:
|
||||
// constructors
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
// Cursor
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
|
@ -9,12 +9,11 @@
|
||||
#define _WX_QT_CURSOR_H_
|
||||
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/image.h"
|
||||
|
||||
#include <QtGui/QCursor>
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
||||
{
|
||||
public:
|
||||
wxCursor() { }
|
||||
|
@ -11,7 +11,6 @@
|
||||
#ifndef _WX_CURSOR_H_
|
||||
#define _WX_CURSOR_H_
|
||||
|
||||
#include "wx/gdiobj.h"
|
||||
#include "wx/gdicmn.h"
|
||||
#include "wx/colour.h"
|
||||
|
||||
@ -21,7 +20,7 @@ class WXDLLIMPEXP_FWD_CORE wxImage;
|
||||
// wxCursor
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
|
||||
class WXDLLIMPEXP_CORE wxCursor : public wxCursorBase
|
||||
{
|
||||
public:
|
||||
wxCursor();
|
||||
|
Loading…
Reference in New Issue
Block a user