2005-05-04 14:57:50 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/cursor.h
|
|
|
|
// Purpose: wxCursor base header
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created:
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows Licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-14 20:23:28 -04:00
|
|
|
#ifndef _WX_CURSOR_H_BASE_
|
|
|
|
#define _WX_CURSOR_H_BASE_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2004-12-20 07:44:22 -05:00
|
|
|
#if defined(__WXPALMOS__)
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/palmos/cursor.h"
|
2004-10-19 09:40:30 -04:00
|
|
|
#elif defined(__WXMSW__)
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/msw/cursor.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXMOTIF__)
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/motif/cursor.h"
|
2006-01-22 22:27:34 -05:00
|
|
|
#elif defined(__WXGTK20__)
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/gtk/cursor.h"
|
2006-01-22 22:27:34 -05:00
|
|
|
#elif defined(__WXGTK__)
|
|
|
|
#include "wx/gtk1/cursor.h"
|
2002-02-05 11:34:33 -05:00
|
|
|
#elif defined(__WXX11__)
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/x11/cursor.h"
|
2001-06-26 16:59:19 -04:00
|
|
|
#elif defined(__WXMGL__)
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/mgl/cursor.h"
|
2006-08-27 05:42:42 -04:00
|
|
|
#elif defined(__WXDFB__)
|
|
|
|
#include "wx/dfb/cursor.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXMAC__)
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/mac/cursor.h"
|
2003-03-22 01:18:36 -05:00
|
|
|
#elif defined(__WXCOCOA__)
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/cocoa/cursor.h"
|
1999-07-27 23:38:12 -04:00
|
|
|
#elif defined(__WXPM__)
|
2005-05-22 10:03:47 -04:00
|
|
|
#include "wx/os2/cursor.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
1999-08-12 11:36:50 -04:00
|
|
|
#include "wx/utils.h"
|
2000-09-12 11:15:44 -04:00
|
|
|
|
1999-08-12 11:36:50 -04:00
|
|
|
/* This is a small class which can be used by all ports
|
|
|
|
to temporarily suspend the busy cursor. Useful in modal
|
|
|
|
dialogs.
|
2000-07-15 15:51:35 -04:00
|
|
|
|
|
|
|
Actually that is not (any longer) quite true.. currently it is
|
|
|
|
only used in wxGTK Dialog::ShowModal() and now uses static
|
|
|
|
wxBusyCursor methods that are only implemented for wxGTK so far.
|
|
|
|
The BusyCursor handling code should probably be implemented in
|
|
|
|
common code somewhere instead of the separate implementations we
|
|
|
|
currently have. Also the name BusyCursorSuspender is a little
|
|
|
|
misleading since it doesn't actually suspend the BusyCursor, just
|
|
|
|
masks one that is already showing.
|
|
|
|
If another call to wxBeginBusyCursor is made while this is active
|
|
|
|
the Busy Cursor will again be shown. But at least now it doesn't
|
|
|
|
interfere with the state of wxIsBusy() -- RL
|
|
|
|
|
1999-08-12 11:36:50 -04:00
|
|
|
*/
|
|
|
|
class wxBusyCursorSuspender
|
|
|
|
{
|
|
|
|
public:
|
2000-07-15 15:51:35 -04:00
|
|
|
wxBusyCursorSuspender()
|
|
|
|
{
|
|
|
|
if( wxIsBusy() )
|
|
|
|
{
|
|
|
|
wxSetCursor( wxBusyCursor::GetStoredCursor() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
~wxBusyCursorSuspender()
|
|
|
|
{
|
|
|
|
if( wxIsBusy() )
|
|
|
|
{
|
|
|
|
wxSetCursor( wxBusyCursor::GetBusyCursor() );
|
|
|
|
}
|
|
|
|
}
|
1999-08-12 11:36:50 -04:00
|
|
|
};
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
1998-08-14 20:23:28 -04:00
|
|
|
// _WX_CURSOR_H_BASE_
|