• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ERROR3IF函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ERROR3IF函数的典型用法代码示例。如果您正苦于以下问题:C++ ERROR3IF函数的具体用法?C++ ERROR3IF怎么用?C++ ERROR3IF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: ERROR3IF

BOOL NodeAnimatingBitmap::AllocBitmapRefs(INT32 nCount)
{
	ERROR3IF(m_pBmpRefs != 0, "Bitmaps already allocated in NodeAnimatingBitmap::AllocBitmapRefs");
	ERROR3IF(nCount <= 0, "Invalid count in NodeAnimatingBitmap::AllocBitmapRefs");
	m_pBmpRefs = new KernelBitmapRef[nCount];
	return m_pBmpRefs != 0;
}
开发者ID:vata,项目名称:xarino,代码行数:7,代码来源:nodeabmp.cpp


示例2: sizeof

ActionCode LayerColourAction::Init(	UndoableOperation* pOp,
									ActionList* pActionList,
									OpChangeLayerColourParam EntryParam)
{
	UINT32 ActSize = sizeof(LayerColourAction);

	LayerColourAction* pNewAction;
	ActionCode Ac = Action::Init(pOp,pActionList,ActSize,CC_RUNTIME_CLASS(LayerColourAction),(Action**)&pNewAction);

	if (Ac != AC_FAIL && pNewAction != NULL)
	{
		OpChangeLayerColourParam& Param = ((LayerColourAction*)pNewAction)->Param;

		Document* pDoc 	 = EntryParam.pDoc;
		Layer*    pLayer = EntryParam.pLayer;

		Param.pDoc 	 = pDoc;
		Param.pLayer = pLayer;

		if (pDoc != NULL && pLayer != NULL)
		{
			DocColour* pDocColour = pLayer->GetGuideColour();
			Param.pColour = pDocColour->FindParentIndexedColour();

			pLayer->SetGuideColour(EntryParam.pColour);
			LayerSGallery::ForceRedrawLayer(pDoc,pLayer);
			BROADCAST_TO_ALL(LayerMsg(pLayer,LayerMsg::GUIDELINES_CHANGED));
		}

		ERROR3IF(pDoc == NULL,  "pDoc is NULL");			
		ERROR3IF(pLayer == NULL,"pLayer is NULL");			
	}

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


示例3: ERROR3IF

void ColourPlate::GetDescription(StringBase *Description)
{
	ERROR3IF(Description == NULL, "Illegal NULL param");
	*Description = TEXT("");

	switch(GetType())
	{
		case COLOURPLATE_CYAN:
			Description->MakeMsg(_R(IDS_COLOURPLATE_CYAN));
			break;

		case COLOURPLATE_MAGENTA:
			Description->MakeMsg(_R(IDS_COLOURPLATE_MAGENTA));
			break;

		case COLOURPLATE_YELLOW:
			Description->MakeMsg(_R(IDS_COLOURPLATE_YELLOW));
			break;

		case COLOURPLATE_KEY:
			Description->MakeMsg(_R(IDS_COLOURPLATE_BLACK));
			break;

		case COLOURPLATE_SPOT:
			{
				IndexedColour *Col = GetSpotColour();
				ERROR3IF(Col == NULL, "NULL Spot colour in spot plate");

				Description->MakeMsg(_R(IDS_COLOURPLATE_SPOT), (TCHAR *) *(Col->GetName()) );
			}
			break;
		default:
			break;
	}
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:35,代码来源:colplate.cpp


示例4: ERROR3IF

void PrintPrefsDlg::SetCurrentDlg(PrintPrefsDlg* pDlg)
{
	ERROR3IF(pDlg != NULL && pCurrentDlg != NULL,"Setting current Dlg, but there's already one there");
	ERROR3IF(pDlg == NULL && pCurrentDlg == NULL,"Setting current Dlg to NULL, but there's no current dlg");

	pCurrentDlg = pDlg;
}
开发者ID:vata,项目名称:xarino,代码行数:7,代码来源:prnprefs.cpp


示例5: ERROR3IF

void OpNudge::PerformMergeProcessing()
{
    // Obtain a pointer to the operation history for the current document
    OperationHistory* pOpHist = &pOurDoc->GetOpHistory();

    // Ensure that we are the last operation added to the operation history
    // Note cannot be an ERROR2 cos this function cannot fail.
    ERROR3IF(pOpHist->FindLastOp() != this, "Last Op should be this op");

    // OK lets see if the operation performed before this was an OpNudge operation
    Operation* pPrevOp = pOpHist->FindPrevToLastOp();

    if (pPrevOp != NULL)   // Check if there was a previous op
    {

        if (IS_A(pPrevOp, OpNudge))
        {
            // Yes it was
            // We can merge this op with pPrevOp if they both apply to the same set of objects
            // This will be TRUE is their SelectionStates are the same.
            RestoreSelectionsAction* pRestoreSelAct = (RestoreSelectionsAction*)
                    GetUndoActionList()->FindActionOfClass(CC_RUNTIME_CLASS(RestoreSelectionsAction));
            ERROR3IF(pRestoreSelAct == NULL, "This op should have a RestoreSelectionsAction");
            SelectionState* ThisOpsSelection = pRestoreSelAct->GetSelState();

            pRestoreSelAct = (RestoreSelectionsAction*)
                             pPrevOp->GetUndoActionList()->FindActionOfClass(CC_RUNTIME_CLASS(RestoreSelectionsAction));
            ERROR3IF(pRestoreSelAct == NULL, "OpNudge op should have a RestoreSelectionsAction");
            SelectionState* LastOpsSelection = pRestoreSelAct->GetSelState();

            if ((*ThisOpsSelection) == (*LastOpsSelection))
            {

                // scan to see if either of these ops hides a node
                // if either do then we cannot merge them together
                // this can happen if perhaps the extending definitions
                // were changed by the nudge (sjk 27-7-00)
                if (DoesActionListHideNodes(pPrevOp) || DoesActionListHideNodes(this) )
                    return;

                // this op can be merged into the previous op, we simply need to combine the
                // TransformNodeActions
                TransformNodeAction* pTransNdAct = (TransformNodeAction*)
                                                   GetUndoActionList()->FindActionOfClass(CC_RUNTIME_CLASS(TransformNodeAction));
                ERROR3IF(pTransNdAct == NULL, "This op should have a TransformNodeAction");

                TransformNodeAction* pLastOpsTransNdAct = (TransformNodeAction*)
                        pPrevOp->GetUndoActionList()->FindActionOfClass(CC_RUNTIME_CLASS(TransformNodeAction));
                ERROR3IF(pLastOpsTransNdAct == NULL,"OpNudgeOp should have a TransformNodeAction");

                pLastOpsTransNdAct->CombineWith(pTransNdAct);

                // This op is no longer required, so let's vape it
                pOpHist->DeleteLastOp();
            }
        }
    }
    return;
}
开发者ID:vata,项目名称:xarino,代码行数:59,代码来源:opnudge.cpp


示例6: ERROR3IF

void String_32::CopyConstruct( const StringBase &other )
{
	*(text = fixedbuf) = 0;
	length = FIX_LEN_BUFSIZE;
	ERROR3IF((const TCHAR*) other == 0, "StringBase to be copied has not been ALLOCated");
	ERROR3IF(camStrlen((const TCHAR*) other) >= length,
				"Constructed String_32 not large enough to hold StringBase copy");
	camStrcpy(text, (const TCHAR*) other);
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:9,代码来源:fixstr32.cpp


示例7: ERROR2IF

BOOL BfxPixelOp::SetAuxilliaryBitmaps(KernelBitmap * pProposed /*A*/, KernelBitmap * pCurrent /*B*/,
							  KernelBitmap * pOriginal /*T*/, INT32 Threshold, DWORD theColour)
{
	if (pProposed)
	{
		ERROR2IF( (pProposed->ActualBitmap==NULL) ,FALSE,"BfxPixelOp can't find OIL bitmap");
		ERROR3IF( (!(pProposed->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxPixelOp Oil layer inconsistency");
		
		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pProposed->ActualBitmap))->BMInfo->bmiHeader);
		
		ERROR2IF( ((pBMI->biHeight != Height) || (pBMI->biWidth != Width) || (BPP && pBMI->biBitCount !=BPP)), FALSE,
			  "Incompatible bitmaps for BfxPixelOp::SetAuxilliaryBitmap");
		pA = (DWORD *)(void *)(((CWxBitmap *)(pProposed->ActualBitmap))->BMBytes);
	}
	else
	{
		pA = NULL;
	}

	if (pOriginal)
	{
		ERROR2IF( (pOriginal->ActualBitmap==NULL) ,FALSE,"BfxPixelOp can't find OIL bitmap");
		ERROR3IF( (!(pOriginal->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxPixelOp Oil layer inconsistency");
		
		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pOriginal->ActualBitmap))->BMInfo->bmiHeader);
		
		ERROR2IF( ((pBMI->biHeight != Height) || (pBMI->biWidth != Width) || (BPP && pBMI->biBitCount !=BPP)), FALSE,
			  "Incompatible bitmaps for BfxPixelOp::SetAuxilliaryBitmap");
		pT = (DWORD *)(void *)(((CWxBitmap *)(pOriginal->ActualBitmap))->BMBytes);
	}
	else
	{
		pT = NULL;
	}

	if (pCurrent)
	{
		ERROR2IF( (pCurrent->ActualBitmap==NULL) ,FALSE,"BfxPixelOp can't find OIL bitmap");
		ERROR3IF( (!(pCurrent->ActualBitmap->IsKindOf(CC_RUNTIME_CLASS(CWxBitmap)) )),"BfxPixelOp Oil layer inconsistency");
		
		BITMAPINFOHEADER * pBMI=&(((CWxBitmap *)(pCurrent->ActualBitmap))->BMInfo->bmiHeader);
		
		ERROR2IF( ((pBMI->biHeight != Height) || (pBMI->biWidth != Width) || (BPP && pBMI->biBitCount !=BPP)), FALSE,
			  "Incompatible bitmaps for BfxPixelOp::SetAuxilliaryBitmap");
		pB = (DWORD *)(void *)(((CWxBitmap *)(pCurrent->ActualBitmap))->BMBytes);
	}
	else
	{
		pB = NULL;
	}

	
	Value = Threshold;
	Colour = theColour;
	return TRUE;
}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:56,代码来源:bfxpixop.cpp


示例8: ERROR3IF

void BitmapExportPaletteInterface::SetFlags(INT32 index, INT32 flags)
{
	if (!m_SortedPaletteValid) ValidateSortedPalette();

	ERROR3IF(index == -1, "Function called with an invalid palette index");

	ExtendedPalette	*palette = BmapPrevDlg::m_pExportOptions->GetExtendedPalette();
	ERROR3IF(!palette, "There is no palette - This should never happen");
	palette->Data[m_PaletteSortedToReal[index]].Flags = flags;
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:10,代码来源:bmpalint.cpp


示例9: Jonathan_Payne

/******************************************************************************************
>	INT32 BitmapExportPaletteInterface::HueComparisonFn(const INT32 *arg1, const INT32 *arg2)
	Author:		Jonathan_Payne (Xara Group Ltd) <[email protected]> (based on code by Alex Price)
	Created:	30/11/2000
	Inputs:		arg1	Pointer to a value in the m_PaletteSortedToReal array ie an index in
						the real palette
				arg2	Pointer to a value in the m_PaletteSortedToReal array ie an index in
						the real palette
	Purpose:	For use with qsort'ing the palette by hue
******************************************************************************************/
INT32 BitmapExportPaletteInterface::HueComparisonFn(const INT32 *arg1, const INT32 *arg2)
{
	INT32 paletteIndex1	= *arg1;
	INT32 paletteIndex2	= *arg2;

	ExtendedPalette	*palette = BmapPrevDlg::m_pExportOptions->GetExtendedPalette();
	ERROR3IF(!palette, "There is no palette - This should never happen");

	//  Extract the red, green, and blue values for the first index
	INT32 red1	= palette->Data[paletteIndex1].Red;
	INT32 green1	= palette->Data[paletteIndex1].Green;
	INT32 blue1	= palette->Data[paletteIndex1].Blue;

	//  Extract the red, green, and blue values for the first index
	INT32 red2	= palette->Data[paletteIndex2].Red;
	INT32 green2	= palette->Data[paletteIndex2].Green;
	INT32 blue2	= palette->Data[paletteIndex2].Blue;

	//  Get the Hue value corresponding to the first RGB triplet.
	DocColour colour1(red1, green1, blue1);
	INT32 hue1, saturation1, value1;
	colour1.GetHSVValue(&hue1, &saturation1, &value1);

	//  Get the Hue value corresponding to the first RGB triplet.
	DocColour colour2(red2, green2, blue2);
	INT32 hue2, saturation2, value2;
	colour2.GetHSVValue(&hue2, &saturation2, &value2);

	if		(hue1 > hue2)
		return 1;
	else if	(hue1 < hue2)
		return -1;

	ERROR3IF(hue1 != hue2, "This is not possible!");

	//  If the Hue values are the same, then put in order of Saturation
	if		(saturation1 < saturation2)
		return 1;
	else if (saturation1 > saturation2)
		return -1;

	ERROR3IF(saturation1 != saturation2, "This is not possible!");

	//  If the saturation values are the same, then the final step is
	//  to put them in order of Value
	if		(value1 < value2)
		return 1;
	else if	(value1 > value2)
		return -1;

	ERROR3IF(value1 != value2, "This is not possible!");

	
	return 0;	// Everything is eqaul
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:65,代码来源:bmpalint.cpp


示例10: ERROR3IF

void GBrush::GetLogBrushInternal( const COLORREF rgb, wxBrush* pBrush )
{
	ERROR3IF( !Valid, "GBrush called when not available");
	ERROR3IF( Current != this, "GBrush not current");

	pBrush->SetStyle(wxSOLID);

	// we let the Widgets handle primary colours cos they should be able to manage it (!)
	if ( ((rgb & 0x0000FF)==0x000000 || (rgb & 0x0000FF)==0x0000FF) &&
		 ((rgb & 0x00FF00)==0x000000 || (rgb & 0x00FF00)==0x00FF00) &&
		 ((rgb & 0xFF0000)==0x000000 || (rgb & 0xFF0000)==0xFF0000) )
	{
		pBrush->SetColour(GetRValue(rgb),GetGValue(rgb),GetBValue(rgb));
		return;
	}

	// We assume the GBrush is defined in the GContext belonging to GRenderRegions
	// ARRRGGHHH Who wrote MakeCurrent() without making it Virtual. What a naughty
	// boy I am (Andy, that is! - Jason ;-)
	GDrawContext *GContext = GRenderRegion::GetStaticDrawContext();
	const BYTE *pGBrush = NULL;

	// This was checked in init/start, but we might as well be safe
	if (GContext != NULL)
	{
		// If the current mode is for solid colours (no dithering) then we ask for solid colour.
		// This is used for things like pasteboards which shouldn't dither for aesthetic (eor!) reasons
		if (UseSolidColours)
			GContext->SetSolidColour(rgb);
		else
			GContext->SetColour(rgb);

		pGBrush = GContext->ReturnBrushRGB();
	}
	else
		ERROR3("GBrush got a NULL GContext!\n");

	if (pGBrush == NULL)
		pBrush->SetColour(GetRValue(rgb),GetGValue(rgb),GetBValue(rgb));
	else if ( UseSolidColours )
		pBrush->SetColour(pGBrush[0],pGBrush[1],pGBrush[2]);
	else
	{
#ifdef __WXGTK__
		// The following line shouldn't be necessary, but wxGTK appears to
		// fail if it doesn't have a valid colour when setting the brush
		// into a device context.
		pBrush->SetColour(0,0,0);
#endif
		wxImage image(4,4,(BYTE*)pGBrush,true);
		wxBitmap bitmap(image);
		pBrush->SetStipple(bitmap);		// Also sets style to wxSTIPPLE
	}
}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:54,代码来源:gbrush.cpp


示例11: ERROR3IF

void TEMPLATESGallery::CreateNewSubtree(Document *ParentDoc, SGDisplayGroup *ExistingGroup)
{
	ERROR3IF(ParentDoc == NULL, "TEMPLATESGallery::CreateNewSubtree - NULL parameter passed in");
	if (ParentDoc == NULL)
		return;

	SGDisplayGroup  *DisplayDocument;
	SGDisplayDATATYPE *DisplayDATATYPE;

	if (ExistingGroup != NULL)
	{
		ERROR3IF(ExistingGroup->GetParentDocument() != ParentDoc, 
				 "This group is not for that document! What's going down, dude?");
		DisplayDocument = ExistingGroup;							// Use existing group
		DisplayDocument->DestroySubtree(FALSE);	// Wipe any existing DATATYPE display items
	}
	else
	{
		DisplayDocument = new SGDisplayGroup(this, ParentDoc,NULL);	// Create new Group

		if (DisplayDocument == NULL)								// Total failure - abort
			return;

		DisplayTree->AddItem(DisplayDocument);						// Add new group to tree
	}


	// **** TO DO ****
	// Fill in some code here to generate SGDisplayDATATYPEs to be displayed.
	// e.g: (in PSEUDO code!! ;-)
	//
	// DATATYPE *Ptr = ParentDoc->GetDATATYPEList()->GetHead();
	// while (Ptr != NULL)
	// {
	//    DisplayDATATYPE = new SGDisplayDATATYPE(Ptr);
	//    if (DisplayDATATYPE != NULL)
	//       DisplayDocument->AddItem(DisplayDATATYPE);
	//
	//    Ptr = ParentDoc->GetDATATYPEList()->GetNext();
	// }
	//
	//
	// Default : create a few items to display
	// NOTE: The pointer faked up to pass in to the constructor will cause the thing
	// to blow up if you start actually trying to USE the data item! Replace this at
	// earliest convenience with proper tree construction code.
	for (INT32 Bob = 0; Bob < 7; Bob++)
	{
		DisplayDATATYPE = new SGDisplayDATATYPE( (DATATYPE *) 0xcdcdcdcd );
		if (DisplayDATATYPE != NULL)
			DisplayDocument->AddItem(DisplayDATATYPE);
	}
}
开发者ID:Amadiro,项目名称:xara-cairo,代码行数:53,代码来源:sgbase.cpp


示例12: ERROR3IF

BOOL LoadBrushDirect::OnLoadDocument(Document* pDoc)
{
	ERROR3IF(pDoc==NULL,"No doc pointer during PrintMarksMan::ConvertAllDocColours!");

	Node *CurNode = Node::DocFindFirstDepthFirst(pDoc);
	Node *NextNode;

	while (CurNode !=NULL)
	{
		// We may be about to chop this node out of the tree, so get the next node now
		NextNode = CurNode->DocFindNextDepthFirst();

		// Use to scan the colour fields of the attribute.
		UINT32 Context = 0;
		DocColour *pColour;

		if (CurNode->IsAnAttribute())
		{
			NodeAttribute *pNodeAttr = (NodeAttribute *) CurNode;

			// Get the next colour field from the attribute
			pColour = pNodeAttr->EnumerateColourFields(Context++);

			while (pColour != NULL)
			{
				// For each colour field, make sure the colour is a local DocColour so that
				// the sub-tree is entirely stand-alone
				if (pColour->FindParentIndexedColour() != NULL)
				{
					ColourGeneric ColDef;
					ColourContext *cc = ColourManager::GetColourContext(pColour->GetColourModel());
					ERROR3IF(cc == NULL, "Can't find colour context?!");

					// Get the IndexedColour definition as a standalone colour definition
					cc->ConvertColour(pColour->FindParentIndexedColour(), &ColDef);

					// Make the DocColour into a simple standalone "lookalike" of the parent colour
					*pColour = DocColour(pColour->GetColourModel(), &ColDef);
				}

				pColour = pNodeAttr->EnumerateColourFields(Context++);
			}
		}
		CurNode = NextNode;
	}

	// All is well we hope.
	return TRUE;
}
开发者ID:vata,项目名称:xarino,代码行数:49,代码来源:loadbrsh.cpp


示例13: ERROR3IF

BOOL UnitListComponent::StartExport(BaseCamelotFilter *pFilter)
{
#ifdef DO_EXPORT
	ERROR3IF(pExpUserUnitMap != NULL,"UnitListComponent::StartExport pExpUserUnitMap is non-NULL!");

	if (pFilter)
	{
		// Get the document we are interested in
		pDocument = pFilter->GetDocument();

		// Get the unit list attached to the current document
		if (pDocument)
			pDocUnitList = pDocument->GetDocUnitList();
		ERROR3IF(pDocUnitList == NULL,"UnitListComponent::StartExport No doc unit list attached to this doc yet");

		// Get a hash table for the user units...
/*		TRY
		{
			pExpUserUnitMap = new CMapPtrToPtr;
		}
		CATCH (CMemoryException, e)
		{
			ERROR1(FALSE, _R(IDS_OUT_OF_MEMORY));
		}
		END_CATCH
*/
		try
		{
			pExpUserUnitMap = new CMapPtrToLong;
		}
		catch (std::bad_alloc&)
		{
			ERROR1(FALSE, _R(IDS_OUT_OF_MEMORY));
		}
		catch (...)
		{
			ERROR1(FALSE, _R(IDS_UNKNOWN_ERROR));
		}

	}
	else
	{
		pDocUnitList = NULL;
		pDocument = NULL;
	}

#endif
	return TRUE;
}
开发者ID:UIKit0,项目名称:xara-xtreme,代码行数:49,代码来源:unitcomp.cpp


示例14: ERROR3IF

BOOL LiveEffectsTool::UpdatePPStack(BOOL bUCE)
{
	if (m_pPPStack!=NULL)
		return FALSE;

	m_pPPStack = EffectsStack::GetEffectsStackFromSelection();

	BOOL bOK;

	// If we know what type of effect we were last editing, try to find that type again
	if (!m_strCurrentEffectID.IsEmpty())
	{
		bOK = m_pPPStack->FindBestProcessor(&m_strCurrentEffectID, &m_iCurrentStackPos);
		if (!bOK)
		{
			m_strCurrentEffectID.Empty();
			m_iCurrentStackPos = STACKPOS_TOP;
		}
	}

	// If we don't have a current effect set for the current stack then try to
	// find the topmost effect
	if (m_strCurrentEffectID.IsEmpty())
	{
		m_iCurrentStackPos = STACKPOS_TOP;
		bOK = m_pPPStack->GetLevelInfo(&m_strCurrentEffectID, &m_iCurrentStackPos);
		if (!bOK)
		{
			m_strCurrentEffectID.Empty();
			m_iCurrentStackPos = STACKPOS_TOP;
		}
	}

	// Tell any running XPE editor that things have changed
	if (bUCE)
		OpLiveEffect::UpdateCurrentEditor();

	// Safety net: UpdateCurrentEditor should not leave m_pPPStack NULL!
	ERROR3IF(m_pPPStack==NULL, "Effect tool's effect stack is NULL in UpdatePPStack!");
	if (m_pPPStack==NULL)
		m_pPPStack = EffectsStack::GetEffectsStackFromSelection();

	// Safety net: UpdateCurrentEditor should not leave m_pPPStack NULL!
	ERROR3IF(m_pPPStack==NULL, "Effect tool's effect stack is NULL in UpdatePPStack!");
	if (m_pPPStack==NULL)
		m_pPPStack = EffectsStack::GetEffectsStackFromSelection();

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


示例15: GetApplication

void SelectionState::DeselectAll(BOOL RenderBlobs)
{
	// Find the selected objects in the tree;
	SelRange* Selected = GetApplication()->FindSelection();
	ERROR3IF( Selected==NULL, "Selection object is null in DeselectAll()");

	// Get the selected spread
 	Spread* pSpread = Document::GetSelectedSpread();
	ERROR3IF(pSpread == NULL,"NULL selected spread");

	// Make sure that we have a spread and a selection
	if (pSpread == NULL || Selected == NULL)
		return;

	// Find first selected node

#if !defined(EXCLUDE_FROM_RALPH)
	Node* pFirstSelectedNode = Selected->FindFirst();
	// If there is a selection, EOR blobs off, deselect nodes, and inform everybody
	if (pFirstSelectedNode != NULL && RenderBlobs)
	{
		// Go though and render all the EOR blobs off the screen

		// Find the Blob Manager
		BlobManager* BlobMgr = GetApplication()->GetBlobManager();
		ENSURE( BlobMgr!=NULL, "Blob Manager unexpectedly not there.");

		// Render all the blobs
		BlobMgr->RenderOff(NULL, pFirstSelectedNode->FindParentSpread());

		Tool* pTool = Tool::GetCurrent();
			
		// Get the tool to remove all its blobs before we deselect the nodes.
		// Only do this if the current tool dosent update itself on sel changed messages
		if (pSpread!=NULL && pTool!=NULL && !pTool->AreToolBlobsRenderedOnSelection())
			pTool->RenderToolBlobs(pSpread,NULL);
	}
#endif

	DeselectAll(pSpread->FindFirstChild());

	// Selection cache is no longer valid, so update and tell everyone that it has changed

	// *Note*, This used to be 'Selected->Update(TRUE)', but I (Will) removed the TRUE, so
	// that a message is NOT broadcast.  This should only be called from an operation,
	// and the op will send a message when it ends.

	Selected->Update();
}
开发者ID:vata,项目名称:xarino,代码行数:49,代码来源:selstate.cpp


示例16: ERROR3IF

BOOL BitmapPreviewData::ExportBrowserTypeBitmap(KernelBitmap *pBmp,PathName *pOutFile)
{
	ERROR3IF(pBmp == NULL, "NULL param passed in ExportPreviewBitmap");
	ERROR3IF(pOutFile == NULL, "NULL param passed in ExportPreviewBitmap");
	if ((pBmp == NULL) || (pOutFile == NULL))
		return FALSE;
	
	// create a disk file
	CCDiskFile TempDiskFile(1024, FALSE, TRUE);
	
	// Find the gif preview filter for export (so we don't get an options dialog box)
	Filter *pFilter = Filter::GetFirst();
	while (pFilter != NULL)
	{
		if (IS_A(pFilter,PreviewFilterGIF))
			// This is the filter!
			break;
		
		// Try the next filter
		pFilter = Filter::GetNext(pFilter);
	}
	
	if (pFilter == NULL)
		return FALSE;  // filter not found
	
	// get the preview bitmap filter, so no dialog box is displayed
	PreviewFilterGIF *pGIFFilter = (PreviewFilterGIF *)pFilter;
	
	BOOL ok = TRUE;
	
	// create an operation for the export
	SelOperation *pOp = new SelOperation;
	if (pOp != NULL)
	{
		ok = pGIFFilter->DoExportBitmap(pOp, &TempDiskFile, pOutFile, pBmp);
		
		// delete the created operation
		delete pOp;
	}
	else
		return FALSE;
	
	// close the file 
	if (TempDiskFile.isOpen())
		TempDiskFile.close();
	
	return ok;
}
开发者ID:vata,项目名称:xarino,代码行数:48,代码来源:cbmpdata.cpp


示例17: ERROR3IF

void OpPalettePopupCommand::Do( OpDescriptor* pOpDesc )
{  
	ERROR3IF(!m_pPaletteControl,	"Help, I am the palette right click menu and I can't talk to the palette");
	ERROR3IF(!m_pBmapPrevDlg,		"Help, I am the palette right click menu and I can't talk to the preview dialog");

	//  Get the token of the item selected by the user.
	String_256 s(pOpDesc->Token);


	if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_LOCKED))
		 m_pPaletteControl->SetSelectedColourToggleLocked();
	else if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_WEB_SAFE))
		m_pPaletteControl->SetSelectedColourWebSafe();
	else if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_TRANSPARENT_BACKGROUND))
	{
		BmapPrevDlg::m_pExportOptions->SetBackgroundTransparency(!BmapPrevDlg::m_pExportOptions->IsBackgroundTransparent());
		m_pBmapPrevDlg->DoPreview();
	}
	else if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_TRANSPARENT))
		m_pPaletteControl->SetSelectedColourToggleTransparent();
	else if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_DELETE))
		m_pPaletteControl->SetSelectedColourToggleDeleted();
	else if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_RESTORE))
		m_pPaletteControl->SetSelectedColourToggleDeleted();
	else if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_SYSTEM_COLOURS))
		BmapPrevDlg::m_pExportOptions->SetToUseSystemPalette(!BmapPrevDlg::m_pExportOptions->IsUsingSystemPalette());
	else if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_SORT_BY_USE))
	{
		m_pPaletteControl->SetCurrentSortType(BitmapExportPaletteInterface::SORT_USE);
		m_pPaletteControl->RenderSoon();
	}
	else if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_SORT_BY_LUMINANCE))
	{
		m_pPaletteControl->SetCurrentSortType(BitmapExportPaletteInterface::SORT_LUMINANCE);
		m_pPaletteControl->RenderSoon();
	}
	else if (s.IsIdentical((TCHAR *)OPTOKEN_PALETTE_SORT_BY_HUE))
	{
		m_pPaletteControl->SetCurrentSortType(BitmapExportPaletteInterface::SORT_HUE);
		m_pPaletteControl->RenderSoon();
	}

	BmapPrevDlg::m_pExportOptions->InvalidatePalette();
	m_pBmapPrevDlg->UpdateCurrentTab();
	m_pBmapPrevDlg->DoPreview();

	End();
}
开发者ID:vata,项目名称:xarino,代码行数:48,代码来源:palmenu.cpp


示例18: ERROR3IF

SGLibType LibraryFile::GetLibraryType(void)
{
	// Did the client forget to call Init() before calling this method?
	ERROR3IF(MyType == SGLib_Blank, "This LibraryFile has not been properly initialised!");

	return(MyType);
}
开发者ID:vata,项目名称:xarino,代码行数:7,代码来源:sgscanf.cpp


示例19: ERROR3_PF

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


示例20: ERROR3IF

void PlugInOp::Do(OpDescriptor* pOpDesc)
{
	if (pOpDesc == NULL)
	{
		ERROR3IF(pOpDesc == NULL,"PlugInOp::Do null OpDescriptor");
		return;
	}
	//ERROR3("PlugInOp - do");

	// Search the plug-ins list for the specified plug-in and invoke it
	PlugInManager* pManager = GetApplication()->GetPlugInManager();
	if (pManager == NULL)
		return;

	PlugInItem * pPlugIn = pManager->GetFirstPlugIn();
	String_32 OpToken;
	while (pPlugIn)
	{
		OpToken = pPlugIn->GetUniqueID();
		OpToken += pPlugIn->GetPlugInName();
		if (pOpDesc->Token == OpToken)
			pPlugIn->About();

		pPlugIn = pManager->GetNextPlugIn(pPlugIn);
	}

	// and finish
	End();
}
开发者ID:vata,项目名称:xarino,代码行数:29,代码来源:plugop.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ERRORF函数代码示例发布时间:2022-05-30
下一篇:
C++ ERROR2IF函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap