Include wx/cursor.h according to precompiled headers of wx/wx.h (with other minor cleaning).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-05-22 07:11:26 +00:00
parent cf6f325cd3
commit c8326d649c
15 changed files with 78 additions and 79 deletions

View File

@@ -1,18 +1,20 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: cursor.mm // Name: src/cocoa/cursor.mm
// Purpose: wxCursor class for wxCocoa // Purpose: wxCursor class for wxCocoa
// Author: Ryan Norton // Author: Ryan Norton
// Modified by: // Modified by:
// Created: 2004-10-05 // Created: 2004-10-05
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Ryan Norton // Copyright: (c) Ryan Norton
// Licence: wxWidgets licence // Licence: wxWidgets licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/cursor.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/cursor.h"
#endif //WX_PRECOMP #endif //WX_PRECOMP
#import <AppKit/NSCursor.h> #import <AppKit/NSCursor.h>
@@ -187,7 +189,7 @@ NSCursor* wxGetStockCursor( short sIndex )
pixelsHigh: 16 pixelsHigh: 16
bitsPerSample: 1 bitsPerSample: 1
samplesPerPixel: 2 samplesPerPixel: 2
hasAlpha: YES // Well, more like a mask... hasAlpha: YES // Well, more like a mask...
isPlanar: NO isPlanar: NO
colorSpaceName: NSCalibratedWhiteColorSpace // Normal B/W - 0 black 1 white colorSpaceName: NSCalibratedWhiteColorSpace // Normal B/W - 0 black 1 white
bytesPerRow: 0 // I don't care - figure it out for me :) bytesPerRow: 0 // I don't care - figure it out for me :)
@@ -219,7 +221,7 @@ NSCursor* wxGetStockCursor( short sIndex )
[theImage addRepresentation:theRep]; [theImage addRepresentation:theRep];
//create the new cursor //create the new cursor
NSCursor* theCursor = [[NSCursor alloc] initWithImage:theImage NSCursor* theCursor = [[NSCursor alloc] initWithImage:theImage
hotSpot:NSMakePoint(pCursor->hotspot[1], pCursor->hotspot[0]) hotSpot:NSMakePoint(pCursor->hotspot[1], pCursor->hotspot[0])
]; ];
@@ -250,7 +252,6 @@ wxCursor::wxCursor()
wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height), wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), int WXUNUSED(height),
int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), const char WXUNUSED(maskBits)[]) int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY), const char WXUNUSED(maskBits)[])
{ {
} }
wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY) wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int hotSpotY)
@@ -294,7 +295,7 @@ wxCursor::wxCursor(int cursor_type)
case wxCURSOR_ARROW: case wxCURSOR_ARROW:
M_CURSORDATA->m_hCursor = [[NSCursor arrowCursor] retain]; M_CURSORDATA->m_hCursor = [[NSCursor arrowCursor] retain];
break; break;
/* TODO: /* TODO:
case wxCURSOR_COPY_ARROW: case wxCURSOR_COPY_ARROW:
M_CURSORDATA->m_themeCursor = kThemeCopyArrowCursor ; M_CURSORDATA->m_themeCursor = kThemeCopyArrowCursor ;
break; break;
@@ -315,7 +316,7 @@ wxCursor::wxCursor(int cursor_type)
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorSizeNESW); M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorSizeNESW);
} }
break; break;
/* TODO: /* TODO:
case wxCURSOR_SIZEWE: case wxCURSOR_SIZEWE:
{ {
M_CURSORDATA->m_themeCursor = kThemeResizeLeftRightCursor; M_CURSORDATA->m_themeCursor = kThemeResizeLeftRightCursor;
@@ -332,7 +333,7 @@ wxCursor::wxCursor(int cursor_type)
M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorSize); M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorSize);
} }
break; break;
/* TODO: /* TODO:
case wxCURSOR_HAND: case wxCURSOR_HAND:
{ {
M_CURSORDATA->m_themeCursor = kThemePointingHandCursor; M_CURSORDATA->m_themeCursor = kThemePointingHandCursor;
@@ -426,33 +427,32 @@ static int wxBusyCursorCount = 0;
// Set the cursor to the busy cursor for all windows // Set the cursor to the busy cursor for all windows
void wxBeginBusyCursor(const wxCursor *cursor) void wxBeginBusyCursor(const wxCursor *cursor)
{ {
wxBusyCursorCount ++; wxBusyCursorCount ++;
if (wxBusyCursorCount == 1) if (wxBusyCursorCount == 1)
{ {
// TODO // TODO
} }
else else
{ {
// TODO // TODO
} }
} }
// Restore cursor to normal // Restore cursor to normal
void wxEndBusyCursor() void wxEndBusyCursor()
{ {
if (wxBusyCursorCount == 0) if (wxBusyCursorCount == 0)
return; return;
wxBusyCursorCount --; wxBusyCursorCount --;
if (wxBusyCursorCount == 0) if (wxBusyCursorCount == 0)
{ {
// TODO // TODO
} }
} }
// TRUE if we're between the above two calls // true if we're between the above two calls
bool wxIsBusy() bool wxIsBusy()
{ {
return (wxBusyCursorCount > 0); return (wxBusyCursorCount > 0);
} }

View File

@@ -32,10 +32,10 @@
#include "wx/brush.h" #include "wx/brush.h"
#include "wx/palette.h" #include "wx/palette.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/cursor.h"
#endif #endif
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/cursor.h"
#include "wx/font.h" #include "wx/font.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/hashmap.h" #include "wx/hashmap.h"

View File

@@ -14,10 +14,9 @@
#include "wx/object.h" #include "wx/object.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/cursor.h"
#endif #endif
#include "wx/cursor.h"
/* Current cursor, in order to hang on to /* Current cursor, in order to hang on to
* cursor handle when setting the cursor globally */ * cursor handle when setting the cursor globally */
wxCursor g_globalCursor; wxCursor g_globalCursor;

View File

@@ -15,9 +15,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/cursor.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/cursor.h"
#include "wx/evtloop.h" #include "wx/evtloop.h"
#include <gdk/gdk.h> #include <gdk/gdk.h>

View File

@@ -17,10 +17,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/cursor.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/cursor.h"
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>

View File

@@ -14,10 +14,9 @@
#include "wx/object.h" #include "wx/object.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/cursor.h"
#endif #endif
#include "wx/cursor.h"
/* Current cursor, in order to hang on to /* Current cursor, in order to hang on to
* cursor handle when setting the cursor globally */ * cursor handle when setting the cursor globally */
wxCursor g_globalCursor; wxCursor g_globalCursor;

View File

@@ -15,9 +15,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/cursor.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/cursor.h"
#include "wx/evtloop.h" #include "wx/evtloop.h"
#include <gdk/gdk.h> #include <gdk/gdk.h>

View File

@@ -17,10 +17,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/cursor.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/cursor.h"
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
@@ -221,7 +220,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style )
gtk_signal_connect (GTK_OBJECT(m_widget), "button_press_event", gtk_signal_connect (GTK_OBJECT(m_widget), "button_press_event",
GTK_SIGNAL_FUNC(gtk_popup_button_press), (gpointer)this ); GTK_SIGNAL_FUNC(gtk_popup_button_press), (gpointer)this );
return TRUE; return true;
} }
void wxPopupWindow::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height) ) void wxPopupWindow::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height) )

View File

@@ -26,10 +26,10 @@
#include "wx/brush.h" #include "wx/brush.h"
#include "wx/palette.h" #include "wx/palette.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/cursor.h"
#endif #endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/cursor.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/module.h" #include "wx/module.h"

View File

@@ -30,10 +30,10 @@
#include "wx/brush.h" #include "wx/brush.h"
#include "wx/palette.h" #include "wx/palette.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/cursor.h"
#endif #endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/cursor.h"
#include "wx/dialog.h" #include "wx/dialog.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/module.h" #include "wx/module.h"

View File

@@ -14,7 +14,9 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/cursor.h" #ifndef WX_PRECOMP
#include "wx/cursor.h"
#endif
/* Current cursor, in order to hang on to /* Current cursor, in order to hang on to
* cursor handle when setting the cursor globally */ * cursor handle when setting the cursor globally */

View File

@@ -24,12 +24,13 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/cursor.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/cursor.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/intl.h" #include "wx/intl.h"
#endif #endif

View File

@@ -12,12 +12,13 @@
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/cursor.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/list.h" #include "wx/list.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/cursor.h"
#include "wx/icon.h" #include "wx/icon.h"
#endif #endif

View File

@@ -24,12 +24,13 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/cursor.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/cursor.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/intl.h" #include "wx/intl.h"
#endif #endif
@@ -110,7 +111,7 @@ wxCursor::~wxCursor()
bool wxCursor::operator==(const wxCursor& cursor) const bool wxCursor::operator==(const wxCursor& cursor) const
{ {
return FALSE; return false;
} }
wxGDIImageRefData *wxCursor::CreateData() const wxGDIImageRefData *wxCursor::CreateData() const
@@ -130,5 +131,3 @@ const wxCursor *wxGetGlobalCursor()
void wxSetCursor(const wxCursor& cursor) void wxSetCursor(const wxCursor& cursor)
{ {
} }

View File

@@ -29,11 +29,11 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"
#include "wx/window.h" // for wxTopLevelWindows #include "wx/window.h" // for wxTopLevelWindows
#include "wx/cursor.h"
#endif #endif
#include "wx/apptrait.h" #include "wx/apptrait.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/cursor.h"
#include <ctype.h> #include <ctype.h>
#include <stdarg.h> #include <stdarg.h>