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


C++ TypeSpec::ptr方法代码示例

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


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

示例1: SetParaStyle

void scCachedStyle::SetParaStyle( const scContUnit* cu, TypeSpec& ts )
{
	if ( ts.ptr() == cachedParaStyle_.fSpec.ptr() )
		return;
	cachedPara_ = cu;
	cachedParaStyle_.Init( ts );
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:7,代码来源:Scstcach.cpp

示例2: SetDefaultSpec

void scContUnit::SetDefaultSpec( TypeSpec& ts )
{
	if ( ts.ptr() != defspec_.ptr() ) {
		defspec_ = ts;
		Mark( scREBREAK );
	}
	ForceRepaint( 0, LONG_MAX );
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:8,代码来源:Scparagr.cpp

示例3: Insert

void scTypeSpecList::Insert( TypeSpec& ts )
{	
	for ( int i = 0; i < NumItems(); i++ ) {
		if ( ts.ptr() == (*this)[i].ptr() )
			return;
	}
	Append( ts );
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:8,代码来源:sccspecl.cpp

示例4: Insert

void scContUnit::Insert( const CharRecord&	ch,
						 TypeSpec&			spec,
						 long				offset )
{
	CharRecordP chRec = (CharRecordP)&ch;
	fCharArray.Insert( chRec, offset, 1 );
	fSpecRun.BumpOffset( offset, fCharArray.GetNumItems() );

	if ( spec.ptr() )
		fSpecRun.ApplySpec( spec, offset, offset + 1 );

	Mark( scREBREAK );
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:13,代码来源:Scparagr.cpp

示例5: ContainTS

/* return true if a spec exists on a line */
BOOL scTextline::ContainTS( TypeSpec ts )
{
	scSpecRun&		run = fPara->GetSpecRun();

	int i = run.indexAtOffset( fStartOffset );

	do {
		if ( run[i].spec().ptr() == ts.ptr() )
			return true;			
	} while ( run[++i].offset() < fEndOffset );

	return false;
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:14,代码来源:Sctextli.cpp

示例6: StyleInvalidateCache

void scCachedStyle::StyleInvalidateCache( TypeSpec& ts )
{
	int i;

	TypeSpec nullSpec;

	for ( i = 0; i < fEntries; i++ ) {
		if ( ts.ptr() == fCachedStyles[i].GetSpec().ptr() )
			fCachedStyles[i].Init( nullSpec );
		else
			fCachedStyles[i].Init( nullSpec );			
	}
	cachedParaStyle_.Init( nullSpec );
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:14,代码来源:Scstcach.cpp

示例7: PasteText

void scContUnit::PasteText( const scContUnit*	srcPara,
							long&				offset )
{
	try {
		if ( offset == 0 ) {
			TypeSpec ts = srcPara->GetDefaultSpec();
			if ( ts.ptr() )
				SetDefaultSpec( ts );
		}
			
			// paste the specs in
		fSpecRun.InsertRun( offset, srcPara->GetContentSize(), srcPara->GetSpecRun() );

			// paste the text in
		fCharArray.Paste( ((scContUnit*)srcPara)->GetCharArray(), offset );
		Mark( scREBREAK );

#ifdef _RUBI_SUPPORT
			// paste the rubis in
		if ( fRubiArray || srcPara->GetRubiArray() ) {
	
			if ( fRubiArray && !srcPara->GetRubiArray() )
				fRubiArray->BumpRubiData( offset, srcPara->GetContentSize() );
			else if ( !fRubiArray && srcPara->GetRubiArray() ) {
				AllocRubiArray( *srcPara->GetRubiArray() );
				fRubiArray->BumpRubiData( 0, offset );
			}
			else
				fRubiArray->Paste( *srcPara->GetRubiArray(), offset, srcPara->GetContentSize() );
		}
#endif

		scTextline* txl = FindLine( offset );
		if ( txl )
			txl->Mark( scREPAINT ); /* force repaint */

		long startOffset = offset;
		offset += srcPara->GetContentSize();

		fSpecRun.SetContentSize( GetContentSize() );
		
		fCharArray.RepairText( fSpecRun, startOffset, offset );
	} 
	catch( ... ) {
		SCDebugBreak(); // remove stuff from the paragraph
		throw;
	} 
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:48,代码来源:Scparagr.cpp

示例8: Init

void scCachedStyle::Init( TypeSpec& ts )
{
	if ( ts.ptr() ) {
		TSGetStyle( ts, *this );
		
		SetSpec( ts );
		fTimeStamp = ++scCachedStyle::fCacheTime;

		fPtConv 	= (REAL)GetGlyphHeight() / scBaseRLUsystem;
		fSetConv	= (REAL)GetGlyphWidth()  / scBaseRLUsystem;
		 
		InitWidths();
		ComputeExtentsnCursor();
	}
	else {
		TypeSpec nullSpec;
		SetSpec( nullSpec );
		fPtConv 	= 0;
		fSetConv	= 0;
		InitWidths();
		fTimeStamp = 0;
	}
		
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:24,代码来源:Scstcach.cpp

示例9: CharInsert

void scCharArray::CharInsert( long& 		cursorSize,
							  scSpecRun&	specRun,
#ifdef _RUBI_SUPPORT
							  scRubiArray*	rubiArray,
#endif							  
							  long			offset,
							  scKeyRecord&	keyRec,
							  BOOL			textCleared,
							  TypeSpec		clearedSpec )
{
		/* can we accept a spec with this character */
	BOOL		specInsert	= false;
	long		streamSize	= 0;


#if SCDEBUG > 1
	static int doit;
	if ( doit )
		specRun.PrintRun( "scCharArray::CharInsert" );
#endif

	cursorSize	= 0;

#ifdef _RUBI_SUPPORT
		// handle character insertion
	switch ( keyRec.keycode() ) {

		case scBackSpace:
			DoBackSpace( streamSize, cursorSize, specRun, rubiArray, offset, keyRec, textCleared );
			break;

		case scForwardDelete:
			DoForwardDelete( streamSize, cursorSize, specRun, rubiArray, offset, keyRec, textCleared );
			break;
			
		case scDiscHyphen:
			DoDiscHyphen( streamSize, cursorSize, specRun, rubiArray, offset, keyRec, textCleared );
			break;
			
		case scFixAbsSpace:
		case scFixRelSpace:
			DoFixSpace( streamSize, cursorSize, specRun, rubiArray, offset, keyRec, textCleared );
			break;
			
		case scFillSpace:
		default:
			DoCharacter( streamSize, cursorSize, specRun, rubiArray, offset, keyRec, textCleared );
			specInsert = true;
			break;
	}
#else
		// handle character insertion
	switch ( keyRec.keycode() ) {

		case scBackSpace:
			DoBackSpace( streamSize, cursorSize, specRun, offset, keyRec, textCleared );
			specRun.BumpOffset( MAX( offset-1, 0 ), streamSize );
			break;

		case scForwardDelete:
			DoForwardDelete( streamSize, cursorSize, specRun, offset, keyRec, textCleared );
			specRun.BumpOffset( MAX( offset, 0 ), streamSize );
			break;
			
		case scDiscHyphen:
			DoDiscHyphen( streamSize, cursorSize, specRun, offset, keyRec, textCleared );
			specRun.BumpOffset( MAX( offset-1, 0 ), streamSize );
			break;
			
		case scFixAbsSpace:
		case scFixRelSpace:
			DoFixSpace( streamSize, cursorSize, specRun, offset, keyRec, textCleared );
			specRun.BumpOffset( MAX( offset-1, 0 ), streamSize );
			break;
			
		case scFillSpace:
		default:
			DoCharacter( streamSize, cursorSize, specRun, offset, keyRec, textCleared );
			specRun.BumpOffset( MAX( offset-1, 0 ), streamSize );
			specInsert = true;
			break;
	}
	
#endif
	
	if ( streamSize ) {
		
			// we have changed the size of the stream and now
			// we must move the specRec stuff around
		fNumItems += streamSize;

#ifdef _RUBI_SUPPORT
		if ( rubiArray )
			rubiArray->BumpRubiData( MAX( offset, 0 ), streamSize );
#endif

		/* if we inserted a spec split the specrun and insert the new one */
		if ( specInsert && keyRec.spec().ptr() ) {
			specRun.ApplySpec( keyRec.spec(), offset, offset + 1 ); 	
			specRun.SetContentSize( GetContentSize() );
//.........这里部分代码省略.........
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:101,代码来源:Sctextch.cpp

示例10: setDBCS

/* ==================================================================== */
void scDBCSDetector::setDBCS( TypeSpec ts )
{
	dbcs_ = ts.ptr() ? scCachedStyle::GetCachedStyle( ts ).GetBreakLang() : false;
}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:5,代码来源:scdbcsdt.cpp


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