// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "cursor.h"
#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/cursor.h"
#include "wx/app.h"
#include "wx/utils.h"
~wxCursorRefData();
wxXCursorList m_cursors; // wxXCursor objects, one per display
- wxStockCursor m_cursorId; // wxWindows standard cursor id
+ wxStockCursor m_cursorId; // wxWidgets standard cursor id
};
#define M_CURSORDATA ((wxCursorRefData *)m_refData)
wxCursorRefData::~wxCursorRefData()
{
- wxXCursorList::Node* node = m_cursors.GetFirst();
+ wxXCursorList::compatibility_iterator node = m_cursors.GetFirst();
while (node)
{
wxXCursor* c = node->GetData();
int hotSpotX;
int hotSpotY;
- if (image.HasOption(wxCUR_HOTSPOT_X))
- hotSpotX = image.GetOptionInt(wxCUR_HOTSPOT_X);
+ if (image.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X))
+ hotSpotX = image.GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_X);
else
hotSpotX = 0;
- if (image.HasOption(wxCUR_HOTSPOT_Y))
- hotSpotY = image.GetOptionInt(wxCUR_HOTSPOT_Y);
+ if (image.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y))
+ hotSpotY = image.GetOptionInt(wxIMAGE_OPTION_CUR_HOTSPOT_Y);
else
hotSpotY = 0;
}
// Motif-specific: create/get a cursor for the current display
-WXCursor wxCursor::GetXCursor(WXDisplay* display)
+WXCursor wxCursor::GetXCursor(WXDisplay* display) const
{
if (!M_CURSORDATA)
return (WXCursor) 0;
- wxXCursorList::Node* node = M_CURSORDATA->m_cursors.GetFirst();
+ wxXCursorList::compatibility_iterator node = M_CURSORDATA->m_cursors.GetFirst();
while (node)
{
wxXCursor* c = node->GetData();
}
// Make a cursor from standard id
-WXCursor wxCursor::MakeCursor(WXDisplay* display, wxStockCursor id)
+WXCursor wxCursor::MakeCursor(WXDisplay* display, wxStockCursor id) const
{
Display* dpy = (Display*) display;
Cursor cursor = (Cursor) 0;
XFlush (display);
- for(wxWindowList::Node *node = win->GetChildren().GetFirst (); node;
+ for(wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst (); node;
node = node->GetNext())
{
wxWindow *child = node->GetData ();
wxBusyCursorCount++;
if (wxBusyCursorCount == 1)
{
- for(wxWindowList::Node *node = wxTopLevelWindows.GetFirst (); node;
+ for(wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst (); node;
node = node->GetNext())
{
wxWindow *win = node->GetData ();
wxBusyCursorCount--;
if (wxBusyCursorCount == 0)
{
- for(wxWindowList::Node *node = wxTopLevelWindows.GetFirst (); node;
+ for(wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst (); node;
node = node->GetNext())
{
wxWindow *win = node->GetData ();
}
}
-// TRUE if we're between the above two calls
+// true if we're between the above two calls
bool wxIsBusy()
{
return (wxBusyCursorCount > 0);