]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxCURSOR_RIGHT_ARROW, which is like the typical wxCURSOR_ARROR,
authorRobin Dunn <robin@alldunn.com>
Fri, 15 Mar 2002 22:52:15 +0000 (22:52 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 15 Mar 2002 22:52:15 +0000 (22:52 +0000)
but points to the right, (duh...)  This cursor is now used in wxSTC in
the margin area.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/stc/PlatWX.cpp
docs/latex/wx/cursor.tex
include/wx/gdicmn.h
include/wx/msw/rightarr.cur [new file with mode: 0644]
include/wx/msw/wx.rc
src/gtk/cursor.cpp
src/gtk1/cursor.cpp
src/msw/cursor.cpp
src/stc/PlatWX.cpp

index dda64f77b22c786aa979b04956232e4025d4e94f..52a351218a568c0285e1dbe01edfa7b50deba0c6 100644 (file)
@@ -437,7 +437,7 @@ void Window::SetCursor(Cursor curs) {
         cursorId = wxCURSOR_SIZENS;
         break;
     case cursorReverseArrow:
-        cursorId = wxCURSOR_POINT_RIGHT;
+        cursorId = wxCURSOR_RIGHT_ARROW;
         break;
     default:
         cursorId = wxCURSOR_ARROW;
index 44e28edc18709000bb68d74d52ec9bda0ead9acf..fa34e256cb079d4dc15214a9e687c6864cbf1c31 100644 (file)
@@ -120,6 +120,8 @@ is enabled in setup.h). Specify {\it hotSpotX} and {\it hotSpotY}.}
 \twocolwidtha{6cm}
 \begin{twocollist}\itemsep=0pt
 \twocolitem{{\bf wxCURSOR\_ARROW}}{A standard arrow cursor.}
+\twocolitem{{\bf wxCURSOR\_RIGHT\_ARROW}}{A standard arrow cursor
+pointing to the right.}
 \twocolitem{{\bf wxCURSOR\_BULLSEYE}}{Bullseye cursor.}
 \twocolitem{{\bf wxCURSOR\_CHAR}}{Rectangular character cursor.}
 \twocolitem{{\bf wxCURSOR\_CROSS}}{A cross cursor.}
index 15a0c8d25b2551c842e0602b4430970597754ba1..d8d1bb44d660012fdc37b03d71abb2906e68485c 100644 (file)
@@ -90,6 +90,7 @@ enum wxStockCursor
 {
     wxCURSOR_NONE,          // should be 0
     wxCURSOR_ARROW,
+    wxCURSOR_RIGHT_ARROW,
     wxCURSOR_BULLSEYE,
     wxCURSOR_CHAR,
     wxCURSOR_CROSS,
diff --git a/include/wx/msw/rightarr.cur b/include/wx/msw/rightarr.cur
new file mode 100644 (file)
index 0000000..9e0e790
Binary files /dev/null and b/include/wx/msw/rightarr.cur differ
index 4553137c511af8a42da74ae754ed279637e92422..9b860f231338316d1e2ac5efbf3652a7987c6e59 100644 (file)
@@ -71,6 +71,8 @@ WXCURSOR_PLEFT          CURSOR  DISCARDABLE     "wx/msw/pntleft.cur"
 WXCURSOR_PRIGHT         CURSOR  DISCARDABLE     "wx/msw/pntright.cur"
 WXCURSOR_QARROW         CURSOR  DISCARDABLE     "wx/msw/query.cur"
 WXCURSOR_BLANK          CURSOR  DISCARDABLE     "wx/msw/blank.cur"
+WXCURSOR_RIGHT_ARROW    CURSOR  DISCARDABLE     "wx/msw/rightarr.cur"
+
 
 //////////////////////////////////////////////////////////////////////////////
 //
index adf882b13352c550475270b61ad803b36a2b81a7..c4b56c61723c5b952d566b6b731993698d74c9dd 100644 (file)
@@ -68,7 +68,9 @@ wxCursor::wxCursor( int cursorId )
     GdkCursorType gdk_cur = GDK_LEFT_PTR;
     switch (cursorId)
     {
+        case wxCURSOR_ARROW:            // fall through to default
         case wxCURSOR_DEFAULT:          gdk_cur = GDK_LEFT_PTR; break;
+        case wxCURSOR_RIGHT_ARROW:      gdk_cur = GDK_RIGHT_PTR; break;
         case wxCURSOR_HAND:             gdk_cur = GDK_HAND1; break;
         case wxCURSOR_CROSS:            gdk_cur = GDK_CROSSHAIR; break;
         case wxCURSOR_SIZEWE:           gdk_cur = GDK_SB_H_DOUBLE_ARROW; break;
@@ -103,8 +105,6 @@ wxCursor::wxCursor( int cursorId )
         default:
             wxFAIL_MSG(wxT("unsupported cursor type"));
             // will use the standard one
-
-        case wxCURSOR_ARROW:
             break;
     }
 
@@ -211,7 +211,7 @@ wxCursor::wxCursor( const wxImage & image )
     unsigned long key;
     unsigned long value;
     unsigned long keyMaskColor = 0;
-    if (bHasMask) 
+    if (bHasMask)
         keyMaskColor = (r << 16) | (g << 8) | b;
 
     tmpImage.ComputeHistogram(histogram);
@@ -249,14 +249,14 @@ wxCursor::wxCursor( const wxImage & image )
                              (unsigned char)(NextFreqCol >> 8),
                              (unsigned char)(NextFreqCol) ) ;
 
-    int hotSpotX=0; 
+    int hotSpotX=0;
     int hotSpotY=0;
 
     if (image.HasOption(wxCUR_HOTSPOT_X))
         hotSpotX = image.GetOptionInt(wxCUR_HOTSPOT_X);
     if (image.HasOption(wxCUR_HOTSPOT_Y))
         hotSpotY = image.GetOptionInt(wxCUR_HOTSPOT_Y);
-   
+
     if (hotSpotX < 0 || hotSpotX >= w)
         hotSpotX = 0;
     if (hotSpotY < 0 || hotSpotY >= h)
@@ -358,7 +358,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
 
     if (wxTheApp)
         wxTheApp->SendIdleEvents();
-        
+
     gdk_flush();
 }
 
index adf882b13352c550475270b61ad803b36a2b81a7..c4b56c61723c5b952d566b6b731993698d74c9dd 100644 (file)
@@ -68,7 +68,9 @@ wxCursor::wxCursor( int cursorId )
     GdkCursorType gdk_cur = GDK_LEFT_PTR;
     switch (cursorId)
     {
+        case wxCURSOR_ARROW:            // fall through to default
         case wxCURSOR_DEFAULT:          gdk_cur = GDK_LEFT_PTR; break;
+        case wxCURSOR_RIGHT_ARROW:      gdk_cur = GDK_RIGHT_PTR; break;
         case wxCURSOR_HAND:             gdk_cur = GDK_HAND1; break;
         case wxCURSOR_CROSS:            gdk_cur = GDK_CROSSHAIR; break;
         case wxCURSOR_SIZEWE:           gdk_cur = GDK_SB_H_DOUBLE_ARROW; break;
@@ -103,8 +105,6 @@ wxCursor::wxCursor( int cursorId )
         default:
             wxFAIL_MSG(wxT("unsupported cursor type"));
             // will use the standard one
-
-        case wxCURSOR_ARROW:
             break;
     }
 
@@ -211,7 +211,7 @@ wxCursor::wxCursor( const wxImage & image )
     unsigned long key;
     unsigned long value;
     unsigned long keyMaskColor = 0;
-    if (bHasMask) 
+    if (bHasMask)
         keyMaskColor = (r << 16) | (g << 8) | b;
 
     tmpImage.ComputeHistogram(histogram);
@@ -249,14 +249,14 @@ wxCursor::wxCursor( const wxImage & image )
                              (unsigned char)(NextFreqCol >> 8),
                              (unsigned char)(NextFreqCol) ) ;
 
-    int hotSpotX=0; 
+    int hotSpotX=0;
     int hotSpotY=0;
 
     if (image.HasOption(wxCUR_HOTSPOT_X))
         hotSpotX = image.GetOptionInt(wxCUR_HOTSPOT_X);
     if (image.HasOption(wxCUR_HOTSPOT_Y))
         hotSpotY = image.GetOptionInt(wxCUR_HOTSPOT_Y);
-   
+
     if (hotSpotX < 0 || hotSpotX >= w)
         hotSpotX = 0;
     if (hotSpotY < 0 || hotSpotY >= h)
@@ -358,7 +358,7 @@ void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
 
     if (wxTheApp)
         wxTheApp->SendIdleEvents();
-        
+
     gdk_flush();
 }
 
index bbe9e4662c0945964a3c097a4dcafb26c5f37ebe..feb1390dc3f49ec493028eaa9a948379b00d56b3 100644 (file)
@@ -187,7 +187,7 @@ wxCursor::wxCursor( const wxImage & image )
     wxCursorRefData *refData = new wxCursorRefData;
     m_refData = refData;
     refData->m_hCursor = (WXHCURSOR) CreateCursor ( wxGetInstance(), hotSpotX, hotSpotY, w, h, /*AND*/ maskBits, /*XOR*/ bits   );
-  
+
     delete [] bits ;
     delete [] maskBits;
 
@@ -383,6 +383,11 @@ wxCursor::wxCursor(int cursor_type)
       refData->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), wxT("wxCURSOR_BLANK"));
       break;
     }
+    case wxCURSOR_RIGHT_ARROW:
+    {
+        refData->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), wxT("wxCURSOR_RIGHT_ARROW"));
+        break;
+    }
     default:
     case wxCURSOR_ARROW:
       refData->m_hCursor = (WXHCURSOR) LoadCursor((HINSTANCE) NULL, IDC_ARROW);
index dda64f77b22c786aa979b04956232e4025d4e94f..52a351218a568c0285e1dbe01edfa7b50deba0c6 100644 (file)
@@ -437,7 +437,7 @@ void Window::SetCursor(Cursor curs) {
         cursorId = wxCURSOR_SIZENS;
         break;
     case cursorReverseArrow:
-        cursorId = wxCURSOR_POINT_RIGHT;
+        cursorId = wxCURSOR_RIGHT_ARROW;
         break;
     default:
         cursorId = wxCURSOR_ARROW;