]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/svg/svgtest.cpp
Fix selection corner cases in wxOSX wxComboBox.
[wxWidgets.git] / samples / svg / svgtest.cpp
index ccf21cff55498667cac2c12ffa026fed2132d2f6..78ffaf667b7e0b3425fd633c89aeb3621ada80ad 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Chris Elliott
 // Modified by:
 // RCS-ID:      $Id$
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ===========================================================================
 #include "wx/dcsvg.h"
 #include "wx/vector.h"
 
-#include "mondrian.xpm"
-
 #include "bitmaps/new.xpm"
 #include "bitmaps/save.xpm"
 #include "bitmaps/help.xpm"
 #include "SVGlogo24.xpm"
 
+#if !defined(__WXMSW__) && !defined(__WXPM__)
+    #include "../sample.xpm"
+#endif
+
 class MyChild;
 class MyCanvas;
 
@@ -175,7 +177,7 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
 {
     m_nWinCreated = 0;
 
-    SetIcon(wxICON(mondrian));
+    SetIcon(wxICON(sample));
 
     // Make a menubar
     wxMenu *file_menu = new wxMenu;
@@ -228,7 +230,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) )
 
     // Give it a title and icon
     subframe->SetTitle(title);
-    subframe->SetIcon(wxICON(mondrian));
+    subframe->SetIcon(wxICON(sample));
 
     // Make a menubar
     wxMenu *file_menu = new wxMenu;
@@ -318,7 +320,7 @@ END_EVENT_TABLE()
 MyCanvas::MyCanvas(MyChild *parent, const wxPoint& pos, const wxSize& size)
     : wxScrolledWindow(parent, wxID_ANY, pos, size, wxSUNKEN_BORDER|wxVSCROLL|wxHSCROLL)
 {
-    SetBackgroundColour(wxColour(_T("WHITE")));
+    SetBackgroundColour(wxColour(wxT("WHITE")));
 
     m_child = parent;
     m_index = m_child->GetFrame()->GetCountOfChildren() % 7;
@@ -365,10 +367,10 @@ void MyCanvas::OnDraw(wxDC& dc)
             dc.SetBrush(*wxCYAN_BRUSH);
             dc.SetPen(*wxRED_PEN);
             dc.DrawRectangle(10, 10, 100, 70);
-            wB = wxBrush (_T("DARK ORCHID"), wxBRUSHSTYLE_TRANSPARENT);
+            wB = wxBrush (wxT("DARK ORCHID"), wxBRUSHSTYLE_TRANSPARENT);
             dc.SetBrush (wB);
             dc.DrawRoundedRectangle(50, 50, 100, 70, 20);
-            dc.SetBrush (wxBrush(_T("GOLDENROD")) );
+            dc.SetBrush (wxBrush(wxT("GOLDENROD")) );
             dc.DrawEllipse(100, 100, 100, 50);
 
             points[0].x = 100; points[0].y = 200;
@@ -391,10 +393,10 @@ void MyCanvas::OnDraw(wxDC& dc)
             dc.DrawLine(45,30,55,30);
             dc.DrawText(wxT("This is a Swiss-style string"), 50, 30);
             wC = dc.GetTextForeground();
-            dc.SetTextForeground (_T("FIREBRICK"));
+            dc.SetTextForeground (wxT("FIREBRICK"));
 
             // no effect in msw ??
-            dc.SetTextBackground (_T("WHEAT"));
+            dc.SetTextBackground (wxT("WHEAT"));
             dc.DrawText(wxT("This is a Red string"), 50, 200);
             dc.DrawRotatedText(wxT("This is a 45 deg string"), 50, 200, 45);
             dc.DrawRotatedText(wxT("This is a 90 deg string"), 50, 200, 90);
@@ -417,11 +419,11 @@ void MyCanvas::OnDraw(wxDC& dc)
             dc.DrawArc ( 270-50, 270-86, 270-86, 270-50, 270,270 );
             dc.SetDeviceOrigin(0,0);
 
-            wP.SetColour (_T("CADET BLUE"));
+            wP.SetColour (wxT("CADET BLUE"));
             dc.SetPen(wP);
             dc.DrawArc ( 75,125, 110, 40, 75, 75 );
 
-            wP.SetColour (_T("SALMON"));
+            wP.SetColour (wxT("SALMON"));
             dc.SetPen(wP);
             dc.SetBrush(*wxRED_BRUSH);
             //top left corner, width and height, start and end angle
@@ -432,7 +434,7 @@ void MyCanvas::OnDraw(wxDC& dc)
             wP.SetWidth(3);
             dc.SetPen(wP);
                                  //wxTRANSPARENT));
-            dc.SetBrush (wxBrush (_T("SALMON")));
+            dc.SetBrush (wxBrush (wxT("SALMON")));
             dc.DrawEllipticArc(300,  0,200,100, 0.0,145.0);
                                  //same end point
             dc.DrawEllipticArc(300, 50,200,100,90.0,145.0);
@@ -445,7 +447,7 @@ void MyCanvas::OnDraw(wxDC& dc)
 
         case 4:
             dc.DrawCheckMark ( 30,30,25,25);
-            dc.SetBrush (wxBrush (_T("SALMON"),wxBRUSHSTYLE_TRANSPARENT));
+            dc.SetBrush (wxBrush (wxT("SALMON"),wxBRUSHSTYLE_TRANSPARENT));
             dc.DrawCheckMark ( 80,50,75,75);
             dc.DrawRectangle ( 80,50,75,75);
 #if wxUSE_STATUSBAR
@@ -486,7 +488,7 @@ void MyCanvas::OnDraw(wxDC& dc)
             break;
 
         case 6:
-            dc.DrawIcon( wxIcon(mondrian_xpm), 10, 10 );
+            dc.DrawIcon( wxICON(sample), 10, 10 );
             dc.DrawBitmap ( wxBitmap(svgbitmap_xpm), 50,15);
 #if wxUSE_STATUSBAR
             s = wxT("Icon and Bitmap ");