Win compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -228,7 +228,8 @@ void MyFrame::OnCommand( wxCommandEvent &event )
|
|||||||
wxLayoutExportObject *export;
|
wxLayoutExportObject *export;
|
||||||
wxLayoutExportStatus status(m_lwin->GetLayoutList());
|
wxLayoutExportStatus status(m_lwin->GetLayoutList());
|
||||||
|
|
||||||
while((export = wxLayoutExport( &status, WXLO_EXPORT_AS_HTML)) != NULL)
|
while((export = wxLayoutExport( &status,
|
||||||
|
WXLO_EXPORT_AS_HTML)) != NULL)
|
||||||
{
|
{
|
||||||
if(export->type == WXLO_EXPORT_HTML)
|
if(export->type == WXLO_EXPORT_HTML)
|
||||||
cout << *(export->content.text);
|
cout << *(export->content.text);
|
||||||
@@ -275,9 +276,11 @@ void MyFrame::OnPrintPS(wxCommandEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
|
wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
|
||||||
|
|
||||||
|
#ifdef OS_UNIX
|
||||||
wxPostScriptPrinter printer;
|
wxPostScriptPrinter printer;
|
||||||
wxLayoutPrintout printout( m_lwin->GetLayoutList(),"My printout");
|
wxLayoutPrintout printout( m_lwin->GetLayoutList(),"My printout");
|
||||||
printer.Print(this, &printout, TRUE);
|
printer.Print(this, &printout, TRUE);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnPrintPreview(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnPrintPreview(wxCommandEvent& WXUNUSED(event))
|
||||||
@@ -371,7 +374,11 @@ void MyFrame::OnPrintSetupPS(wxCommandEvent& WXUNUSED(event))
|
|||||||
wxPrintData data;
|
wxPrintData data;
|
||||||
data.SetOrientation(orientation);
|
data.SetOrientation(orientation);
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
wxPrintDialog printerDialog(this, & data);
|
||||||
|
#else
|
||||||
wxGenericPrintDialog printerDialog(this, & data);
|
wxGenericPrintDialog printerDialog(this, & data);
|
||||||
|
#endif
|
||||||
printerDialog.GetPrintData().SetSetupDialog(TRUE);
|
printerDialog.GetPrintData().SetSetupDialog(TRUE);
|
||||||
printerDialog.ShowModal();
|
printerDialog.ShowModal();
|
||||||
|
|
||||||
@@ -385,7 +392,11 @@ void MyFrame::OnPageSetupPS(wxCommandEvent& WXUNUSED(event))
|
|||||||
wxPageSetupData data;
|
wxPageSetupData data;
|
||||||
data.SetOrientation(orientation);
|
data.SetOrientation(orientation);
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
wxPageSetupDialog pageSetupDialog(this, & data);
|
||||||
|
#else
|
||||||
wxGenericPageSetupDialog pageSetupDialog(this, & data);
|
wxGenericPageSetupDialog pageSetupDialog(this, & data);
|
||||||
|
#endif
|
||||||
pageSetupDialog.ShowModal();
|
pageSetupDialog.ShowModal();
|
||||||
|
|
||||||
orientation = pageSetupDialog.GetPageSetupData().GetOrientation();
|
orientation = pageSetupDialog.GetPageSetupData().GetOrientation();
|
||||||
|
@@ -369,6 +369,8 @@ wxLayoutLine::Insert(CoordType xpos, wxString text)
|
|||||||
wxLayoutObjectText *tobj = (wxLayoutObjectText *) *i;
|
wxLayoutObjectText *tobj = (wxLayoutObjectText *) *i;
|
||||||
tobj->GetText().insert(offset, text);
|
tobj->GetText().insert(offset, text);
|
||||||
m_Length += text.Length();
|
m_Length += text.Length();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return Insert(xpos, new wxLayoutObjectText(text));
|
return Insert(xpos, new wxLayoutObjectText(text));
|
||||||
|
@@ -71,7 +71,7 @@ struct wxLayoutExportStatus
|
|||||||
void wxLayoutImportText(wxLayoutList &list, wxString const &str,
|
void wxLayoutImportText(wxLayoutList &list, wxString const &str,
|
||||||
int withflag = WXLO_EXPORT_WITH_CRLF);
|
int withflag = WXLO_EXPORT_WITH_CRLF);
|
||||||
|
|
||||||
wxLayoutExportObject *wxLayoutExport(wxLayoutList &list,
|
wxLayoutExportObject *wxLayoutExport(wxLayoutExportStatus *status,
|
||||||
int mode = WXLO_EXPORT_AS_TEXT|WXLO_EXPORT_WITH_CRLF);
|
int mode = WXLO_EXPORT_AS_TEXT|WXLO_EXPORT_WITH_CRLF);
|
||||||
#else
|
#else
|
||||||
/// import text into a wxLayoutList (including linefeeds):
|
/// import text into a wxLayoutList (including linefeeds):
|
||||||
|
Reference in New Issue
Block a user