]> git.saurik.com Git - wxWidgets.git/commitdiff
Add test for a custom cursor to the image sample.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Jul 2010 11:49:05 +0000 (11:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Jul 2010 11:49:05 +0000 (11:49 +0000)
Load a cursor from PNG file to check that it appears as expected.

See #11989.

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

samples/image/Makefile.in
samples/image/cursor.png [new file with mode: 0644]
samples/image/image.bkl
samples/image/image.cpp

index e11a0489b1ede6d0309815c6941396bb51928bee..9c499840ade8d1ba628ae214e53b2f1725f2f7d7 100644 (file)
@@ -177,7 +177,7 @@ image$(EXEEXT): $(IMAGE_OBJECTS) $(__image___win32rc)
 
 data: 
        @mkdir -p .
-       @for f in horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm horse_ag.pnm horse_rg.pnm horse.tif horse.tga horse.xpm horse.cur horse.ico horse3.ani smile.xbm toucan.png cmyk.jpg; do \
+       @for f in horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm horse_ag.pnm horse_rg.pnm horse.tif horse.tga horse.xpm horse.cur horse.ico horse3.ani smile.xbm toucan.png cmyk.jpg cursor.png; do \
        if test ! -f ./$$f -a ! -d ./$$f ; \
        then x=yep ; \
        else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \
diff --git a/samples/image/cursor.png b/samples/image/cursor.png
new file mode 100644 (file)
index 0000000..32895dc
Binary files /dev/null and b/samples/image/cursor.png differ
index 3762421268e4b359a130d4afc779b80dceab9662..3c6268b079ea6776cd41a74e71dfe2cdd63c09db 100644 (file)
@@ -16,7 +16,7 @@
         <files>
             horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm horse_ag.pnm horse_rg.pnm
             horse.tif horse.tga horse.xpm horse.cur horse.ico horse3.ani
-            smile.xbm toucan.png cmyk.jpg
+            smile.xbm toucan.png cmyk.jpg cursor.png
         </files>
     </wx-data>
 
index d265524368e646686e575620226f8b8f86448c4b..826cad76863e1ec2f9361d9dc9261ae07c9dd546 100644 (file)
@@ -678,6 +678,7 @@ MyFrame::MyFrame()
 
     // 500 width * 2750 height
     m_canvas->SetScrollbars( 10, 10, 50, 275 );
+    m_canvas->SetCursor(wxImage("cursor.png"));
 }
 
 void MyFrame::OnQuit( wxCommandEvent &WXUNUSED(event) )