当前位置: 首页>>代码示例>>C++>>正文


C++ OpDescriptor::Invoke方法代码示例

本文整理汇总了C++中OpDescriptor::Invoke方法的典型用法代码示例。如果您正苦于以下问题:C++ OpDescriptor::Invoke方法的具体用法?C++ OpDescriptor::Invoke怎么用?C++ OpDescriptor::Invoke使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OpDescriptor的用法示例。


在下文中一共展示了OpDescriptor::Invoke方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CommitSection

BOOL LayerPropertiesTab::CommitSection()
{
TRACEUSER( "Neville", _T("LayerPropertiesTab::CommitSection\n"));
	ERROR2IF(pPropertiesDlg == NULL,FALSE,"LayerPropertiesTab::CommitSection called with no dialog pointer");

	BOOL ok = pPropertiesDlg->TalkToPage(GetPageID());
	if (!ok)
		return TRUE;			// Talk to page failed to return now

	Layer* pLayer = GetActiveLayer();

	// Only do the op if we have a layer with a different set of properties
	if (pLayer != NULL && HavePropertiesChanged(pLayer))
	{
		// Initialise the param structure
		OpLayerGalParam Param(LAYER_CHANGE, pSpread);
		Param.pLayer = pLayer;

		Param.VisibleState  =  pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_LAYERTAB_VISIBLE));
		Param.LockedState   = !pPropertiesDlg->GetBoolGadgetSelected(_R(IDC_LAYERTAB_EDITABLE));
		Param.NewName		=  pPropertiesDlg->GetStringGadgetValue(_R(IDC_LAYERTAB_NAME),NULL);

		// Invoke the operation
		OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_LAYERGALCHANGE); 
		if (pOpDesc != NULL)
			pOpDesc->Invoke((OpParam*)&Param);
		else
		{
			ERROR3("Couldn't find OPTOKEN_LAYERGALCHANGE op descriptor");
		}
	}

	return TRUE;
}
开发者ID:vata,项目名称:xarino,代码行数:34,代码来源:prpslyrs.cpp

示例2: DeleteClicked

BOOL GuidesPropertiesTab::DeleteClicked()
{
	INT32* pIndexList = pPropertiesDlg->GetSelectedItems(_R(IDC_GUIDETAB_GUIDELINELIST));
	INT32 Count = GuidelineList.GetCount();

	INT32 i;

	BOOL ok = (pIndexList != NULL && Count > 0);
	NodeGuideline** pGuidelineList = NULL;

	if (ok)
	{
		pGuidelineList = (NodeGuideline**)CCMalloc(sizeof(NodeGuideline*)*(Count+1));

		ok = (pGuidelineList != NULL);

		if (ok)
		{
			for (i=0; (pIndexList[i] >= 0) && (i < Count);i++)
			{
				GuidelineListItem* pItem = (GuidelineListItem*)GuidelineList.FindItem(pIndexList[i]);
				if (pItem != NULL)
					pGuidelineList[i] = pItem->pGuideline;
				else
				{
					pGuidelineList[i] = NULL;
					ERROR3_PF(("List item at index [%d] is NULL",i));
				}
			}

			pGuidelineList[i] = NULL;
		}
	}
	else
		ok = FALSE;

	if (ok)
	{
		OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_GUIDELINE);
		ERROR3IF(pOpDesc == NULL,"FindOpDescriptor(OPTOKEN_GUIDELINE) failed");

		if (pOpDesc != NULL)
		{
			OpGuidelineParam GuidelineParam;

			GuidelineParam.Method 			= GUIDELINEOPMETHOD_DELETE;
			GuidelineParam.pGuidelineList 	= pGuidelineList;

			pOpDesc->Invoke(&GuidelineParam);
		}
	}

	if (pGuidelineList != NULL)
		CCFree(pGuidelineList);

	if (pIndexList != NULL)
		delete [] pIndexList;

	return ok;
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:60,代码来源:prpsgds.cpp

示例3: OnTreeView

void CCamFrame::OnTreeView( wxCommandEvent& WXUNUSED(event) )
{
//	OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(DebugTreeDlg));
	OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_DEBUGTREEDLG);
	if ( pOpDesc )
		pOpDesc->Invoke();
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:7,代码来源:camframe.cpp

示例4: PropertiesClicked

BOOL GuidesPropertiesTab::PropertiesClicked()
{
	INT32 Index = pPropertiesDlg->GetFirstSelectedItem(_R(IDC_GUIDETAB_GUIDELINELIST));
	Layer* pLayer = GetGuideLayer();
	if (Index < 0 || pLayer == NULL) return FALSE;

	BOOL Valid;
	/*MILLIPOINT Ordinate =*/ pPropertiesDlg->GetDimensionGadgetValue(_R(IDC_GUIDETAB_GUIDELINELIST),pLayer,&Valid,Index);

	if (Valid)
	{
		GuidelineListItem* pItem = (GuidelineListItem*)GuidelineList.FindItem(Index);
		if (pItem!=NULL && pItem->pGuideline!=NULL)
		{
			GuidelinePropDlg::SetEditGuidelineParams(pItem->pGuideline);
			OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_EDITGUIDELINEPROPDLG);
			if (pOpDesc != NULL)
				pOpDesc->Invoke();
			else
				ERROR3("GuidesPropertiesTab::PropertiesClicked() - OpDescriptor::FindOpDescriptor(OPTOKEN_EDITGUIDELINEPROPDLG) failed");
		}
		else
			ERROR3_PF(("Unable to find guideline item at index (%d)",Index));
	}

	return TRUE;	
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:27,代码来源:prpsgds.cpp

示例5: OnQualityAntialiased

void CCamFrame::OnQualityAntialiased( wxCommandEvent& WXUNUSED(event) )
{
	Document::GetSelected()->SetCurrent();
	DocView::GetSelected()->SetCurrent();
	OpDescriptor* pOpDesc = (OpDescriptor*)OpDescriptor::FindOpDescriptor( OPTOKEN_QUALITYANTIALIASED );
	if ( pOpDesc )
		pOpDesc->Invoke();
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:8,代码来源:camframe.cpp

示例6: Do

/********************************************************************************************
>	void OpMakeStroke::Do(OpDescriptor*)

	Author:		Richard_Millican (Xara Group Ltd) <[email protected]>
	Created:	04/03/97
	Inputs:		OpDescriptor (unused)
	Outputs:	-
	Returns:	-
	Purpose:	Performs the MakeShapes operation. 
********************************************************************************************/
void OpMakeStroke::Do(OpDescriptor*)
{   
	// Obtain the current selections 
	Range Selection = *GetApplication()->FindSelection();
	Node* CurrentNode = Selection.FindFirst(); 
	BOOL Success = TRUE;		
	
	ERROR3IF(CurrentNode == NULL, "Make shapes called with no nodes selected"); 
	
	if (CurrentNode != NULL) // No nodes selected so End
	{                    
		// Try to record the selection state, don't render the blobs though 
		if (Success)
			Success = DoStartSelOp(FALSE,FALSE);								   

		// First, Make Shapes on everything so they're all simple paths
		String_256 Desc("Building new stroke brush...");
		Progress::Start(FALSE, &Desc);
		OpDescriptor *pOp = OpDescriptor::FindOpDescriptor(OPTOKEN_MAKE_SHAPES);
		if (pOp != NULL)
			pOp->Invoke();

		// Second, Group everything
		pOp = OpDescriptor::FindOpDescriptor(OPTOKEN_GROUP);
		if (pOp != NULL)
			pOp->Invoke();

		pOp = OpDescriptor::FindOpDescriptor(OPTOKEN_GROUP);
		if (pOp != NULL)
			pOp->Invoke();

		// Finally, create a new brush
		PathStrokerVector::BodgeRipSelection(/*(CommandIndex == 0) ? FALSE :*/ TRUE);
		Progress::Stop();

	}                   

	if (!Success)
	{
		InformError();
		FailAndExecute();
	}

 	End(); 
}			
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:55,代码来源:mkstroke.cpp

示例7: NewToolbar

void ToolbarDlg::NewToolbar()
{
	// Invoke the new toolbar name operation
	// Obtain a pointer to the op descriptor for the new toolbar name operation
	OpDescriptor* pOpDesc =
		OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(ToolnameDlg));
	ENSURE(pOpDesc,"Can't find ToolnameDlg Op.");
	// Invoke the operation.
	pOpDesc->Invoke();
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:10,代码来源:tooldlg.cpp

示例8: OnStandardBar

void CCamFrame::OnStandardBar( wxCommandEvent& event)
{
	// We can't find by Runtime Class as there are multiple OpDescriptors with the same Class
	// So get the resource ID (which also happens to be the dialog ID to use
	ResourceID r = (ResourceID)(event.GetId());
	// Find the Op Descriptor by name
	OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor((TCHAR *)(CamResource::GetObjectName(r))); 
	// Stick the resource ID in he Op Param
//	OpParam Param(CUniversalParam((INT32)r), CUniversalParam(0));
	pOpDesc->Invoke();
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:11,代码来源:camframe.cpp

示例9: GetExportOptions

/********************************************************************************************

>	virtual BOOL PNGFilter::GetExportOptions(BitmapExportOptions* pOptions)

	Author:		Colin_Barfoot (Xara Group Ltd) <[email protected]>
	Created:	12/11/96
	Purpose:	See BaseBitmapFilter for interface details

********************************************************************************************/
BOOL PNGFilter::GetExportOptions(BitmapExportOptions* pOptions)
{
	ERROR2IF(pOptions == NULL, FALSE, "NULL Args");

	PNGExportOptions* pPNGOptions = (PNGExportOptions*)pOptions;
	ERROR3IF(!pPNGOptions->IS_KIND_OF(PNGExportOptions), "pPNGOptions isn't");

	// the depth we ask GDraw to render is always 32-bit, so we can get transparency
	// we have to convert for other formats	when writing the actual bytes to the file
	SetDepthToRender(32);

	// We haven't written the header yet
	WrittenHeader = FALSE;

	// We are a first pass render and not doing the mask, by default
	SecondPass = FALSE;
	DoingMask = FALSE;

	// Determine the filter type currently in use in Accusoft format
	s_FilterType = PNG;
	pPNGOptions->SetFilterType(PNG);

	BOOL Ok = FALSE;

	OpDescriptor* pOpDes = OpDescriptor::FindOpDescriptor(OPTOKEN_GIFTABDLG);
	if (pOpDes != NULL)
	{
		// set up the data for the export options dialog
		OpParam Param((void *)pOptions, (void *)this);

		// invoke the dialog
		pOpDes->Invoke(&Param);

		// SMFIX
		// we have brought the dlg up so get the options from the dlg as the graphic type may have changed
		pOptions = BmapPrevDlg::m_pExportOptions;

		// check for valid options
		//  This may get messed up, so have to use the second line below.
		Ok = BmapPrevDlg::m_bClickedOnExport;
	}
	else
	{	
		ERROR3("Unable to find OPTOKEN_BMAPPREVDLG");
	} 

	// Return with the ok/cancel state used on the dialog box
	return Ok;
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:58,代码来源:pngfiltr.cpp

示例10: OnPageDrop

BOOL SGNameDrag::OnPageDrop(ViewDragTarget* pDragTarget)
{
	// Extract the address of the object dropped on and apply the dragged name
	// attribute to it.
	PageDropInfo pdInfo;
	pDragTarget->GetDropInfo(&pdInfo);
	if (pdInfo.pObjectHit != 0)
	{
		OpDescriptor* pDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_APPLY_NAMES_TO_ONE);
		ERROR3IF(pDesc == 0, "SGNameDrag::OnPageDrop: no descriptor");
		pDesc->Invoke(&OpParam((INT32) (Node*) pdInfo.pObjectHit, 0));
	}

	return TRUE;
}
开发者ID:vata,项目名称:xarino,代码行数:15,代码来源:ngdrag.cpp

示例11: NewClicked

BOOL GuidesPropertiesTab::NewClicked()
{
	// set guideline to be at user ordinate 0
	Spread*    pSpread  = Document::GetSelectedSpread();
	MILLIPOINT Ordinate = NodeGuideline::ToSpreadOrdinate(pSpread,0,GuideType);
	GuidelinePropDlg::SetNewGuidelineParams(GuideType,Ordinate);

	OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_NEWGUIDELINEPROPDLG);
	if (pOpDesc!=NULL)
		pOpDesc->Invoke();
	else
		ERROR3("GuidesPropertiesTab::NewClicked() - OpDescriptor::FindOpDescriptor(OPTOKEN_NEWGUIDELINEPROPDLG) - failed");

	return TRUE;
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:15,代码来源:prpsgds.cpp

示例12: OpenAndGetURL

BOOL URLImportDlg::OpenAndGetURL(WebAddress* purlToReturn) 
{
	//Say that the dialog wasn't cancelled
	DialogWasCancelled=FALSE;

	//Find the dialog's op descriptor
	OpDescriptor *OpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(URLImportDlg));

	//And start up the dialog
	if (OpDesc != NULL)
		OpDesc->Invoke();

	//And return the member variable
	*purlToReturn=URLImportDlg::ms_url;

	return !DialogWasCancelled;
}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:17,代码来源:urldlg.cpp

示例13: CommitLayerChanges

BOOL LayerManager::CommitLayerChanges()
{
	if (LayerDetailsChanged()) // The layer details have changed so we need to perform 
							   // a LayerChangeOp to commit the changes.  
	{
		// Invoke the layer change operation 
		// Obtain a pointer to the op descriptor for the Layer change operation 
		OpDescriptor* OpDesc = 
			OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(OpLayerChange)); 
		// Invoke the operation. 
		OpDesc->Invoke();
	}
	if (RefreshLayerDetails()) // We need to refresh the layer details even if the layers were 
						   	   // not changed because a new layer could have been deleted  
	{
		return TRUE; 
	}
	else return FALSE; // Failed to refresh layer details (InformError has been called)
} 				
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:19,代码来源:layermgr.cpp

示例14: InvokeDialog

BOOL ImagemapDlg::InvokeDialog(ImagemapFilterOptions* pifoDefault, List* plstNames) 
{
	// Make a local copy of the options
	ms_Options=*pifoDefault;
	ms_plstNames=plstNames;

	//Say that the dialog wasn't cancelled
	DialogWasCancelled=FALSE;

	//Find the dialog's op descriptor
	OpDescriptor *OpDesc = OpDescriptor::FindOpDescriptor(CC_RUNTIME_CLASS(ImagemapDlg));

	//And start up the dialog
	if (OpDesc != NULL)
		OpDesc->Invoke();

	//And return the options we've got back
	*pifoDefault=ms_Options;

	return !DialogWasCancelled;
}
开发者ID:vata,项目名称:xarino,代码行数:21,代码来源:fimagdlg.cpp

示例15: InvokeNativeFileOp

BOOL InvokeNativeFileOp(const TCHAR* pOpName, CCLexFile* pFile, UINT32 nPrefFilter)
{
	// Find the requested Operation.
	OpDescriptor* pOp = OpDescriptor::FindOpDescriptor((TCHAR*) pOpName);
	if (pOp == 0)
	{
		ERROR3("Can't find OpDescriptor in InvokeNativeFileOp");
		return FALSE;
	}

	// Build the parameter block.
	NativeFileOpParams pm;
	pm.pFile = pFile;
	pm.fStatus = FALSE;
	pm.nPrefFilter = nPrefFilter;

	// Invoke it with the given parameters, returning its status.
	OpParam				param( &pm, INT32(0) );
	pOp->Invoke( &param );
	return pm.fStatus;
}
开发者ID:vata,项目名称:xarino,代码行数:21,代码来源:nativeop.cpp


注:本文中的OpDescriptor::Invoke方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。