X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f80ea77b4a8bac4ab005bfc592f9cd3262ffa397..749a05ee85ea5453f155454e4640ebf795233ad3:/contrib/utils/wxrcedit/preview.cpp diff --git a/contrib/utils/wxrcedit/preview.cpp b/contrib/utils/wxrcedit/preview.cpp index 21f3668cf1..d38b79589a 100644 --- a/contrib/utils/wxrcedit/preview.cpp +++ b/contrib/utils/wxrcedit/preview.cpp @@ -80,17 +80,23 @@ PreviewFrame::PreviewFrame() ResetResource(); wxConfigBase *cfg = wxConfigBase::Get(); - SetSize(wxRect(wxPoint(cfg->Read(_T("previewframe_x"), wxDefaultPosition.x), cfg->Read(_T("previewframe_y"), wxDefaultPosition.y)), + SetSize(wxRect(wxPoint(cfg->Read(_T("previewframe_x"), wxDefaultCoord), cfg->Read(_T("previewframe_y"), wxDefaultCoord)), wxSize(cfg->Read(_T("previewframe_w"), 400), cfg->Read(_T("previewframe_h"), 400)))); m_Splitter = new wxSplitterWindow(this, wxID_ANY); +#if wxUSE_LOG m_LogCtrl = new wxTextCtrl(m_Splitter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE); +#endif // wxUSE_LOG m_ScrollWin = new wxScrolledWindow(m_Splitter, wxID_ANY); m_ScrollWin->SetBackgroundColour(_T("light steel blue")); +#if wxUSE_LOG m_Splitter->SplitHorizontally(m_ScrollWin, m_LogCtrl, cfg->Read(_T("previewframe_sash"), 300)); +#endif // wxUSE_LOG +#if wxUSE_STATUSBAR CreateStatusBar(); +#endif // wxUSE_STATUSBAR #ifdef __WXMSW__ SendSizeEvent(); // force resize for WXMSW @@ -133,8 +139,10 @@ void PreviewFrame::MakeDirty() if (m_Node == NULL) return; if (m_Dirty) return; m_Dirty = true; +#if wxUSE_LOG m_LogCtrl->Clear(); m_LogCtrl->SetValue(_("Resource modified.\nMove mouse cursor over the preview window to refresh it.")); +#endif // wxUSE_LOG } @@ -175,9 +183,11 @@ void PreviewFrame::Preview(wxXmlNode *node, wxXmlDocument *orig_doc) m_Node = node; m_Doc = orig_doc; +#if wxUSE_LOG m_LogCtrl->Clear(); wxLogTextCtrl mylog(m_LogCtrl); wxLog *oldlog = wxLog::SetActiveTarget(&mylog); +#endif // wxUSE_LOG wxString oldcwd = wxGetCwd(); wxSetWorkingDirectory(wxPathOnly(EditorFrame::Get()->GetFileName())); @@ -192,7 +202,9 @@ void PreviewFrame::Preview(wxXmlNode *node, wxXmlDocument *orig_doc) PreviewWXFrame(); wxSetWorkingDirectory(oldcwd); +#if wxUSE_LOG wxLog::SetActiveTarget(oldlog); +#endif // wxUSE_LOG m_Dirty = false; }