projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added wxDC::GetAsBitmap, and implemented wxWindowDC::DoGetAsBitmap on OS X, in order...
[wxWidgets.git]
/
src
/
x11
/
cursor.cpp
diff --git
a/src/x11/cursor.cpp
b/src/x11/cursor.cpp
index 7722a56fb9bac2a34cf7eb45f8545c200fee48b3..bd861353d6082de93f9ccb259112793f0781e66b 100644
(file)
--- a/
src/x11/cursor.cpp
+++ b/
src/x11/cursor.cpp
@@
-1,23
+1,25
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: cursor.cpp
+// Name:
src/x11/
cursor.cpp
// Purpose: wxCursor class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Purpose: wxCursor class
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence:
wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "cursor.h"
-#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
#include "wx/cursor.h"
#include "wx/cursor.h"
-#include "wx/gdicmn.h"
-#include "wx/icon.h"
-#include "wx/app.h"
-#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/utils.h"
+ #include "wx/icon.h"
+ #include "wx/gdicmn.h"
+#endif
#include "wx/x11/private.h"
#include "wx/x11/private.h"
@@
-34,7
+36,7
@@
class wxCursorRefData: public wxObjectRefData
public:
wxCursorRefData();
public:
wxCursorRefData();
- ~wxCursorRefData();
+
virtual
~wxCursorRefData();
WXCursor m_cursor;
WXDisplay *m_display;
WXCursor m_cursor;
WXDisplay *m_display;
@@
-69,14
+71,14
@@
wxCursor::wxCursor( int cursorId )
#if wxUSE_NANOX
// TODO Create some standard cursors from bitmaps.
#if wxUSE_NANOX
// TODO Create some standard cursors from bitmaps.
-
-
+
+
#else
// !wxUSE_NANOX
#else
// !wxUSE_NANOX
-
+
M_CURSORDATA->m_display = wxGlobalDisplay();
wxASSERT_MSG( M_CURSORDATA->m_display, wxT("No display") );
M_CURSORDATA->m_display = wxGlobalDisplay();
wxASSERT_MSG( M_CURSORDATA->m_display, wxT("No display") );
-
+
int x_cur = XC_left_ptr;
switch (cursorId)
{
int x_cur = XC_left_ptr;
switch (cursorId)
{
@@
-125,19
+127,13
@@
wxCursor::wxCursor(const char bits[], int width, int height,
int hotSpotX, int hotSpotY,
const char maskBits[], wxColour *fg, wxColour *bg)
{
int hotSpotX, int hotSpotY,
const char maskBits[], wxColour *fg, wxColour *bg)
{
- wxFAIL_MSG( "wxCursor creation from bits not yet implemented" );
-}
-
-
-wxCursor::wxCursor( const wxCursor &cursor )
-{
- Ref( cursor );
+ wxFAIL_MSG( wxT("wxCursor creation from bits not yet implemented") );
}
#if wxUSE_IMAGE
wxCursor::wxCursor( const wxImage & image )
{
}
#if wxUSE_IMAGE
wxCursor::wxCursor( const wxImage & image )
{
- wxFAIL_MSG(
"wxCursor creation from wxImage not yet implemented"
);
+ wxFAIL_MSG(
wxT("wxCursor creation from wxImage not yet implemented")
);
}
#endif
}
#endif
@@
-145,16
+141,6
@@
wxCursor::~wxCursor()
{
}
{
}
-wxCursor& wxCursor::operator = ( const wxCursor& cursor )
-{
- if (*this == cursor)
- return (*this);
-
- Ref( cursor );
-
- return *this;
-}
-
bool wxCursor::operator == ( const wxCursor& cursor ) const
{
return m_refData == cursor.m_refData;
bool wxCursor::operator == ( const wxCursor& cursor ) const
{
return m_refData == cursor.m_refData;
@@
-165,7
+151,7
@@
bool wxCursor::operator != ( const wxCursor& cursor ) const
return m_refData != cursor.m_refData;
}
return m_refData != cursor.m_refData;
}
-bool wxCursor::Ok() const
+bool wxCursor::
Is
Ok() const
{
return (m_refData != NULL);
}
{
return (m_refData != NULL);
}
@@
-206,7
+192,7
@@
void wxEndBusyCursor()
wxTheApp->ProcessIdle();
}
wxTheApp->ProcessIdle();
}
-void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
+void wxBeginBusyCursor(
const
wxCursor *WXUNUSED(cursor) )
{
if (gs_busyCount++ > 0)
return;
{
if (gs_busyCount++ > 0)
return;