]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/svg/svgtest.cpp
force use of generic about dialog as to test unfocused-repainting of wxGrid
[wxWidgets.git] / samples / svg / svgtest.cpp
index a353b440ced1a83f6cde056dbbafd96d59828b86..2d20ab13685a26354ab5c6064350f7d34f4715b6 100644 (file)
@@ -1,12 +1,3 @@
-// biol75@york.ac.uk (Chris Elliott) March 2000
-
-#ifdef __BIDE__
-#define _NO_VCL
-#include "condefs.h"
-USERC("svg.rc");
-//---------------------------------------------------------------------------
-#define WinMain WinMain
-#endif
 /////////////////////////////////////////////////////////////////////////////
 // Name:        svgtest.cpp
 // Purpose:     SVG sample
@@ -37,7 +28,7 @@ USERC("svg.rc");
 #endif
 
 #include "wx/toolbar.h"
-#include "wx/svg/dcsvg.h"
+#include "wx/dcsvg.h"
 
 #include "mondrian.xpm"
 
@@ -321,15 +312,10 @@ void MyFrame::InitToolBar(wxToolBar* toolBar)
     bitmaps[1] = new wxBitmap( save_xpm );
     bitmaps[2] = new wxBitmap( help_xpm );
 
-    int width = 16;
-    int currentX = 5;
-
-    toolBar->AddTool( MDI_NEW_WINDOW, *(bitmaps[0]), wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, wxT("New SVG test window"));
-    currentX += width + 5;
-    toolBar->AddTool( MDI_SAVE, *bitmaps[1], wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, wxT("Save test in SVG format"));
-    currentX += width + 5;
+    toolBar->AddTool(MDI_NEW_WINDOW, wxEmptyString, *(bitmaps[0]), wxS("New SVG test window"));
+    toolBar->AddTool(MDI_SAVE, wxEmptyString, *bitmaps[1], wxS("Save test in SVG format"));
     toolBar->AddSeparator();
-    toolBar->AddTool(MDI_ABOUT, *bitmaps[2], wxNullBitmap, false, currentX, wxDefaultCoord, (wxObject *) NULL, wxT("Help"));
+    toolBar->AddTool(MDI_ABOUT, wxEmptyString, *bitmaps[2], wxS("Help"));
 
     toolBar->Realize();
 
@@ -433,10 +419,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"), wxTRANSPARENT);
+            wB = wxBrush (_T("DARK ORCHID"), wxBRUSHSTYLE_TRANSPARENT);
             dc.SetBrush (wB);
             dc.DrawRoundedRectangle(50, 50, 100, 70, 20);
-            dc.SetBrush (wxBrush(_T("GOLDENROD"), wxSOLID) );
+            dc.SetBrush (wxBrush(_T("GOLDENROD")) );
             dc.DrawEllipse(100, 100, 100, 50);
 
             points[0].x = 100; points[0].y = 200;
@@ -500,7 +486,7 @@ void MyCanvas::OnDraw(wxDC& dc)
             wP.SetWidth(3);
             dc.SetPen(wP);
                                  //wxTRANSPARENT));
-            dc.SetBrush (wxBrush (_T("SALMON"),wxSOLID)) ;
+            dc.SetBrush (wxBrush (_T("SALMON"))) ;
             dc.DrawEllipticArc(300,  0,200,100, 0.0,145.0) ;
                                  //same end point
             dc.DrawEllipticArc(300, 50,200,100,90.0,145.0) ;
@@ -513,7 +499,7 @@ void MyCanvas::OnDraw(wxDC& dc)
 
         case 4:
             dc.DrawCheckMark ( 30,30,25,25);
-            dc.SetBrush (wxBrush (_T("SALMON"),wxTRANSPARENT));
+            dc.SetBrush (wxBrush (_T("SALMON"),wxBRUSHSTYLE_TRANSPARENT));
             dc.DrawCheckMark ( 80,50,75,75);
             dc.DrawRectangle ( 80,50,75,75);
 #if wxUSE_STATUSBAR
@@ -611,7 +597,7 @@ bool MyChild::OnSave(wxString filename)
 {
     wxSVGFileDC svgDC (filename, 600, 650) ;
     m_canvas->OnDraw (svgDC);
-    return svgDC.Ok();
+    return svgDC.IsOk();
 }