]> git.saurik.com Git - wxWidgets.git/commitdiff
adding open and close hand cursor constants, implementation currently OSX only, close...
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 10 Jan 2009 09:45:16 +0000 (09:45 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 10 Jan 2009 09:45:16 +0000 (09:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gdicmn.h
src/osx/carbon/cursor.cpp
src/osx/carbon/utilscocoa.mm

index 4c546d93cbfebf220a6fc8f0a9c05803e0b3f002..38fb431a52ce27634127e29c27529808530b773c 100644 (file)
@@ -128,6 +128,14 @@ enum wxStockCursor
 #ifdef __WXMAC__
     wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
 #endif
+#ifdef __WXMAC__
+    wxCURSOR_OPEN_HAND, 
+    wxCURSOR_CLOSED_HAND, 
+#else
+    // TODO CS supply openhand and closedhand cursors
+    wxCURSOR_OPEN_HAND = wxCURSOR_HAND, 
+    wxCURSOR_CLOSED_HAND = wxCURSOR_HAND,     
+#endif
 #ifdef __X__
     // Not yet implemented for Windows
     wxCURSOR_CROSS_REVERSE,
index 6cfcea37040646f28084eae28d1a83b05a190039..751ea2b6f7558dc6bb50d105aaeb8966c31f4c32 100644 (file)
@@ -647,6 +647,14 @@ void wxCursor::InitFromStock(wxStockCursor cursor_type)
         M_CURSORDATA->m_hCursor = wxGetStockCursor(kwxCursorRoller);
         break;
 
+    case wxCURSOR_OPEN_HAND:
+        M_CURSORDATA->m_themeCursor = kThemeOpenHandCursor;
+        break;
+
+    case wxCURSOR_CLOSED_HAND:
+        M_CURSORDATA->m_themeCursor = kThemeClosedHandCursor;
+        break;
+        
     case wxCURSOR_CHAR:
     case wxCURSOR_ARROW:
     case wxCURSOR_LEFT_BUTTON:
index 9420e4c9ac4505c1ce0ac0e9165b2a764d818e8e..b9f214dee22f0b700f85ad8c9b4df5612e94e14e 100644 (file)
@@ -224,7 +224,7 @@ WX_NSCursor wxMacCocoaCreateStockCursor( int cursor_type )
     case wxCURSOR_HAND:
         cursor = [[NSCursor pointingHandCursor] retain];
         break;
-
+        
     case wxCURSOR_BULLSEYE:
         cursor = wxGetStockCursor(kwxCursorBullseye);
         break;
@@ -269,6 +269,14 @@ WX_NSCursor wxMacCocoaCreateStockCursor( int cursor_type )
         cursor = wxGetStockCursor(kwxCursorRoller);
         break;
 
+    case wxCURSOR_OPEN_HAND:
+        cursor = [[NSCursor openHandCursor] retain];
+        break;
+
+    case wxCURSOR_CLOSED_HAND:
+        cursor = [[NSCursor closedHandCursor] retain];
+        break;
+
     case wxCURSOR_CHAR:
     case wxCURSOR_ARROW:
     case wxCURSOR_LEFT_BUTTON: