Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
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);
}
Exemplo n.º 3
0
bool wxHtmlEasyPrinting::PreviewFile(const wxString &htmlfile)
{
    wxHtmlPrintout *p1 = CreatePrintout();
    p1->SetHtmlFile(htmlfile);
    wxHtmlPrintout *p2 = CreatePrintout();
    p2->SetHtmlFile(htmlfile);
    return DoPreview(p1, p2);
}
Exemplo n.º 4
0
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();
}
Exemplo n.º 5
0
ResizeMoviePlugin::ResizeMoviePlugin( wxWindow* parent_, MyFrame *win_ )
: PluginBase(GetStaticName(), parent_, win_, true, true)
{
	sidebar =  new ResizeMovieSidebar(parent_, this);
	sidebarw = sidebar;
	OnBookChange();
	DoPreview();
}
Exemplo n.º 6
0
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();
}
Exemplo n.º 7
0
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();
}
Exemplo n.º 8
0
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();
}
Exemplo n.º 9
0
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);
}
Exemplo n.º 10
0
void COpenCVStitch2013Dlg::OnTimer(UINT_PTR nIDEvent)
{
	switch (nIDEvent)
	{
	case TIMER_STITCH:
		DoStitch();
		break;

	case TIMER_PREVIEW:
		DoPreview();
		break;
	}

	CDialogEx::OnTimer(nIDEvent);
}
Exemplo n.º 11
0
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);
}
Exemplo n.º 12
0
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;
}
Exemplo n.º 13
0
SmoothPlugin::SmoothPlugin( wxWindow* parent_, MyFrame *win_ ): PluginBase(GetStaticName(), parent_, win_, true, true), temp(NULL) {
	sidebar =  new SmoothSidebar(parent_, this);
	sidebarw = sidebar;
	DoPreview();
}