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:
Vadim Zeitlin 1999-03-07 23:31:46 +00:00
parent 978304896b
commit 8c0d01c876
3 changed files with 15 additions and 2 deletions

View File

@ -228,7 +228,8 @@ void MyFrame::OnCommand( wxCommandEvent &event )
wxLayoutExportObject *export;
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)
cout << *(export->content.text);
@ -275,9 +276,11 @@ void MyFrame::OnPrintPS(wxCommandEvent& WXUNUSED(event))
{
wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
#ifdef OS_UNIX
wxPostScriptPrinter printer;
wxLayoutPrintout printout( m_lwin->GetLayoutList(),"My printout");
printer.Print(this, &printout, TRUE);
#endif
}
void MyFrame::OnPrintPreview(wxCommandEvent& WXUNUSED(event))
@ -371,7 +374,11 @@ void MyFrame::OnPrintSetupPS(wxCommandEvent& WXUNUSED(event))
wxPrintData data;
data.SetOrientation(orientation);
#ifdef __WXMSW__
wxPrintDialog printerDialog(this, & data);
#else
wxGenericPrintDialog printerDialog(this, & data);
#endif
printerDialog.GetPrintData().SetSetupDialog(TRUE);
printerDialog.ShowModal();
@ -385,7 +392,11 @@ void MyFrame::OnPageSetupPS(wxCommandEvent& WXUNUSED(event))
wxPageSetupData data;
data.SetOrientation(orientation);
#ifdef __WXMSW__
wxPageSetupDialog pageSetupDialog(this, & data);
#else
wxGenericPageSetupDialog pageSetupDialog(this, & data);
#endif
pageSetupDialog.ShowModal();
orientation = pageSetupDialog.GetPageSetupData().GetOrientation();

View File

@ -369,6 +369,8 @@ wxLayoutLine::Insert(CoordType xpos, wxString text)
wxLayoutObjectText *tobj = (wxLayoutObjectText *) *i;
tobj->GetText().insert(offset, text);
m_Length += text.Length();
return true;
}
else
return Insert(xpos, new wxLayoutObjectText(text));

View File

@ -71,7 +71,7 @@ struct wxLayoutExportStatus
void wxLayoutImportText(wxLayoutList &list, wxString const &str,
int withflag = WXLO_EXPORT_WITH_CRLF);
wxLayoutExportObject *wxLayoutExport(wxLayoutList &list,
wxLayoutExportObject *wxLayoutExport(wxLayoutExportStatus *status,
int mode = WXLO_EXPORT_AS_TEXT|WXLO_EXPORT_WITH_CRLF);
#else
/// import text into a wxLayoutList (including linefeeds):