]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/printing/printing.cpp
Added __WXMAC_OSX__ guards around the CFRunLoop calls, CFRunLoop not available on...
[wxWidgets.git] / samples / printing / printing.cpp
index a2af01db75d295719300b3d9b88b7bbe6e901003..5315efebea2d551861308ed44bd1a2e4090e1e3f 100644 (file)
 #include "mondrian.xpm"
 #endif
 
+#if wxUSE_LIBGNOMEPRINT
+#include "wx/html/forcelnk.h"
+FORCE_LINK(gnome_print)
+#endif
+
+
 // Declare a frame
 MyFrame   *frame = (MyFrame *) NULL;
 // int orientation = wxPORTRAIT;
@@ -278,13 +284,13 @@ void MyFrame::OnPrintAbout(wxCommandEvent& WXUNUSED(event))
         _T("About wxWidgets printing demo"), wxOK|wxCENTRE);
 }
 
-void MyFrame::OnAngleUp(wxCommandEvent& event)
+void MyFrame::OnAngleUp(wxCommandEvent& WXUNUSED(event))
 {
     m_angle += 5;
     canvas->Refresh();
 }
 
-void MyFrame::OnAngleDown(wxCommandEvent& event)
+void MyFrame::OnAngleDown(wxCommandEvent& WXUNUSED(event))
 {
     m_angle -= 5;
     canvas->Refresh();
@@ -301,7 +307,7 @@ void MyFrame::Draw(wxDC& dc)
     dc.SetBrush(*wxCYAN_BRUSH);
     dc.SetPen(*wxRED_PEN);
 
-    dc.DrawRectangle(0, 30, 200, 100);
+    dc.DrawRoundedRectangle(0, 30, 200, 100, 20);
 
     dc.DrawText( wxT("Rectangle 200 by 100"), 40, 40);
 
@@ -310,7 +316,7 @@ void MyFrame::Draw(wxDC& dc)
     dc.SetPen(*wxRED_PEN);
 
     dc.DrawText( wxT("Test message: this is in 10 point text"), 10, 180);
-    
+
 #if wxUSE_UNICODE
     char *test = "Hebrew    שלום -- Japanese (日本語)";
     wxString tmp = wxConvUTF8.cMB2WC( test );
@@ -333,7 +339,7 @@ void MyFrame::Draw(wxDC& dc)
     wxIcon my_icon = wxICON(mondrian) ;
 
     dc.DrawIcon( my_icon, 100, 100);
-    
+
     if (m_bitmap.Ok())
         dc.DrawBitmap( m_bitmap, 10, 10 );
 }
@@ -495,7 +501,7 @@ void MyPrintout::DrawPageTwo(wxDC *dc)
     dc->DrawLine(50, 250, 50, (long)(250.0 + logUnits));
 
     dc->SetBackgroundMode(wxTRANSPARENT);
-
+    dc->SetBrush(*wxTRANSPARENT_BRUSH);
 
     { // GetTextExtent demo:
         wxString words[7] = {_T("This "), _T("is "), _T("GetTextExtent "), _T("testing "), _T("string. "), _T("Enjoy "), _T("it!")};