// 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;
void OnNewWindow(wxCommandEvent& event);
void OnQuit(wxCommandEvent& event);
void FileSavePicture (wxCommandEvent& event);
-
+
unsigned int GetCountOfChildren() const
{ return m_nWinCreated; }
private:
unsigned int m_nWinCreated;
-
+
DECLARE_EVENT_TABLE()
};
class MyChild: public wxMDIChildFrame
{
public:
- MyChild(wxMDIParentFrame *parent, const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
+ MyChild(wxMDIParentFrame *parent, const wxString& title,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
const long style = wxDEFAULT_FRAME_STYLE);
~MyChild();
void OnActivate(wxActivateEvent& event);
void OnQuit(wxCommandEvent& event);
bool OnSave(wxString filename);
-
+
MyFrame* GetFrame()
{ return m_frame; }
private:
int m_index;
MyChild* m_child;
-
+
DECLARE_EVENT_TABLE()
};
frame->Show(true);
- SetTopWindow(frame);
-
return true;
}
{
m_nWinCreated = 0;
- SetIcon(wxICON(mondrian));
+ SetIcon(wxICON(sample));
// Make a menubar
wxMenu *file_menu = new wxMenu;
{
(void)wxMessageBox(wxT("wxWidgets SVG sample\n")
wxT("Author: Chris Elliott (c) 2002-2009\n")
- wxT("Usage: click File|New to show tests"),
+ wxT("Usage: click File|New to show tests"),
wxT("About SVG Test"));
}
wxString title;
title.Printf(wxT("SVG Test Window %d"), m_nWinCreated );
-
+
// counts number of children previously, even if now closed
m_nWinCreated ++;
// 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;
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 ");
: wxMDIChildFrame(parent, wxID_ANY, title, pos, size, style)
{
m_frame = (MyFrame *) parent;
-
+
#if wxUSE_STATUSBAR
CreateStatusBar();
SetStatusText(title);
#endif // wxUSE_STATUSBAR
m_canvas = new MyCanvas(this, wxPoint(0, 0), GetClientSize());
-
+
// Give it scrollbars
m_canvas->SetScrollbars(20, 20, 50, 50);
}