HRESULT PreviewGenerator::ShowPreviewWithPreviewHandler(IStream *stream, CLSID cls) { DWORD dwRet = ERROR_BAD_ARGUMENTS; if (iPHandler) { iPHandler->Unload(); SAFERELEASE(iPHandler); } IInitializeWithStream *iIStream; HRESULT hr = CoCreateInstance(cls, NULL, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, IID_IPreviewHandler, (LPVOID*)&iPHandler); if (hr == S_OK) { hr = iPHandler->QueryInterface(IID_IInitializeWithStream, (LPVOID*)&iIStream); } else { return hr; } if ( iIStream) { hr = iIStream->Initialize(stream, STGM_READ); } if (iPHandler && hr == S_OK) hr = DoPreview(); SAFERELEASE(iIStream); return hr; }
bool wxHtmlEasyPrinting::PreviewText(const wxString &htmltext, const wxString &basepath) { wxHtmlPrintout *p1 = CreatePrintout(); p1->SetHtmlText(htmltext, basepath, true); wxHtmlPrintout *p2 = CreatePrintout(); p2->SetHtmlText(htmltext, basepath, true); return DoPreview(p1, p2); }
bool wxHtmlEasyPrinting::PreviewFile(const wxString &htmlfile) { wxHtmlPrintout *p1 = CreatePrintout(); p1->SetHtmlFile(htmlfile); wxHtmlPrintout *p2 = CreatePrintout(); p2->SetHtmlFile(htmlfile); return DoPreview(p1, p2); }
CamShiftPlugin::CamShiftPlugin( wxWindow* parent_, MyFrame *win_ ) : PluginBase(GetStaticName(), parent_, win_, true, true,true), backproject(NULL), hist(NULL), rotation(NULL), shift(NULL), planes(NULL) { sidebar = new CamShiftSidebar(parent_, this); sidebarw = sidebar; DoPreview(); }
ResizeMoviePlugin::ResizeMoviePlugin( wxWindow* parent_, MyFrame *win_ ) : PluginBase(GetStaticName(), parent_, win_, true, true) { sidebar = new ResizeMovieSidebar(parent_, this); sidebarw = sidebar; OnBookChange(); DoPreview(); }
FindFeaturesPlugin::FindFeaturesPlugin( wxWindow* parent_, MyFrame *win_ ) : PluginBase(GetStaticName(), parent_, win_, true, true), gray(NULL), eig(NULL), cnt_mask(NULL), tempimg(NULL) { sidebar = new FindFeaturesSidebar(parent_, this); sidebarw = sidebar; DoPreview(); }
ImproveContoursPlugin::ImproveContoursPlugin( wxWindow* parent_, MyFrame *win_ ): PluginBase(GetStaticName(), parent_, win_, true, true), gray(NULL) { sidebar = new ImproveContoursSidebar(parent_, this); sidebarw = sidebar; if (cm->viewFluorescence) sidebar->scope2->SetSelection(1); DoPreview(); }
MatchTemplatePlugin::MatchTemplatePlugin( wxWindow* parent_, MyFrame *win_ ) : PluginBase(GetStaticName(), parent_, win_, true, true,true), map(NULL) { sidebar = new MatchTemplateSidebar(parent_, this); sidebarw = sidebar; if (cm->viewFluorescence) sidebar->scope2->SetSelection(1); DoPreview(); }
bool wxRichTextPrinting::PreviewBuffer(const wxRichTextBuffer& buffer) { SetRichTextBufferPreview(new wxRichTextBuffer(buffer)); SetRichTextBufferPrinting(new wxRichTextBuffer(buffer)); wxRichTextPrintout *p1 = CreatePrintout(); p1->SetRichTextBuffer(m_richTextBufferPreview); wxRichTextPrintout *p2 = CreatePrintout(); p2->SetRichTextBuffer(m_richTextBufferPrinting); return DoPreview(p1, p2); }
void COpenCVStitch2013Dlg::OnTimer(UINT_PTR nIDEvent) { switch (nIDEvent) { case TIMER_STITCH: DoStitch(); break; case TIMER_PREVIEW: DoPreview(); break; } CDialogEx::OnTimer(nIDEvent); }
bool wxRichTextPrinting::PreviewFile(const wxString& richTextFile) { SetRichTextBufferPreview(new wxRichTextBuffer); if (!m_richTextBufferPreview->LoadFile(richTextFile)) { SetRichTextBufferPreview(NULL); return false; } else SetRichTextBufferPrinting(new wxRichTextBuffer(*m_richTextBufferPreview)); wxRichTextPrintout *p1 = CreatePrintout(); p1->SetRichTextBuffer(m_richTextBufferPreview); wxRichTextPrintout *p2 = CreatePrintout(); p2->SetRichTextBuffer(m_richTextBufferPrinting); return DoPreview(p1, p2); }
HRESULT PreviewGenerator::ShowPreviewWithPreviewHandler(CString filePath, CLSID cls) { DWORD dwRet = ERROR_BAD_ARGUMENTS; IInitializeWithFile *iIFile; if (iPHandler) { iPHandler->Unload(); SAFERELEASE(iPHandler); } HRESULT hr = CoCreateInstance(cls, NULL, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, IID_IPreviewHandler, (LPVOID*)&iPHandler); if (hr == S_OK) { hr = iPHandler->QueryInterface(IID_IInitializeWithFile, (LPVOID*)&iIFile); } else return hr; if (iIFile && hr == S_OK) hr = iIFile->Initialize(filePath, STGM_READ); if (iPHandler && hr == S_OK) hr = DoPreview(); SAFERELEASE(iIFile); return hr; }
SmoothPlugin::SmoothPlugin( wxWindow* parent_, MyFrame *win_ ): PluginBase(GetStaticName(), parent_, win_, true, true), temp(NULL) { sidebar = new SmoothSidebar(parent_, this); sidebarw = sidebar; DoPreview(); }