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


C++ PCB_SCREEN::Trace_Curseur方法代码示例

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


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

示例1: RedrawActiveWindow

void WinEDA_PcbFrame::RedrawActiveWindow(wxDC * DC, bool EraseBg)
/****************************************************************/
/* Trace le PCB, et les elements complementaires ( axes, grille .. )
 pour l'ecran actif et ses sous ecran
*/
{
PCB_SCREEN * Screen = GetScreen();

	if ( ! m_Pcb || ! Screen ) return;

	ActiveScreen = GetScreen();
	GRSetDrawMode(DC, GR_COPY);

	if ( EraseBg ) DrawPanel->EraseScreen(DC);

	DrawPanel->DrawBackGround(DC);

	Trace_Pcb(DC, GR_OR);
	TraceWorkSheet(DC, GetScreen());
	Affiche_Status_Box();

	/* Reaffichage des curseurs */
	for( Screen = GetScreen(); Screen != NULL; Screen = Screen->Next() )
	{
		if( m_CurrentScreen->ManageCurseur )
			m_CurrentScreen->ManageCurseur(DrawPanel, DC, FALSE);
		Screen->Trace_Curseur(DrawPanel, DC);
	}
}
开发者ID:BackupTheBerlios,项目名称:kicad-svn,代码行数:29,代码来源:tracepcb.cpp

示例2: FindItem

void WinEDA_PcbFindFrame::FindItem(wxCommandEvent& event)
/********************************************************/
{
PCB_SCREEN * screen = m_Parent->GetScreen();
wxPoint locate_pos;
wxString msg;
bool succes = FALSE;
bool FindMarker = FALSE;
MODULE * Module;
int StartCount;
	
	switch ( event.GetId() )
	{
		case ID_FIND_ITEM:
			s_ItemCount = 0;
			break;
		
		case ID_FIND_MARKER: s_MarkerCount = 0;
		case ID_FIND_NEXT_MARKER:
			FindMarker = TRUE;
			break;
	}

	s_OldStringFound = m_NewText->GetValue();

	m_Parent->DrawPanel->GetViewStart(&screen->m_StartVisu.x, &screen->m_StartVisu.y);
	StartCount = 0;
	
	if( FindMarker )
	{
	MARQUEUR * Marker = (MARQUEUR *) m_Parent->m_Pcb->m_Drawings; 
		for( ; Marker != NULL; Marker = (MARQUEUR *)Marker->Pnext)
		{
			if( Marker->m_StructType != TYPEMARQUEUR ) continue;
			StartCount++;
			if ( StartCount > s_MarkerCount )
			{
				succes = TRUE;
				locate_pos = Marker->m_Pos;
				s_MarkerCount++;
				break;
			}
		}
	}
	
	else for ( Module = m_Parent->m_Pcb->m_Modules; Module != NULL; Module = (MODULE*)Module->Pnext)
	{
		if( WildCompareString( s_OldStringFound, Module->m_Reference->m_Text.GetData(), FALSE ) )
		{
			StartCount++;
			if ( StartCount > s_ItemCount )
			{
				succes = TRUE;
				locate_pos = Module->m_Pos;
				s_ItemCount++;
				break;
			}
		}
		if( WildCompareString( s_OldStringFound, Module->m_Value->m_Text.GetData(), FALSE ) )
		{
			StartCount++;
			if ( StartCount > s_ItemCount )
			{
				succes = TRUE;
				locate_pos = Module->m_Pos;
				s_ItemCount++;
				break;
			}
		}
	}
	
	if ( succes )
	{	/* Il y a peut-etre necessite de recadrer le dessin: */		
		if( ! m_Parent->DrawPanel->IsPointOnDisplay(locate_pos) )
		{
			screen->m_Curseur = locate_pos;
			m_Parent->Recadre_Trace(TRUE);
		}
		else
		{	// Positionnement du curseur sur l'item
			screen->Trace_Curseur(m_Parent->DrawPanel, m_DC);
			screen->m_Curseur = locate_pos;
			GRMouseWarp(m_Parent->DrawPanel, screen->m_Curseur );
			m_Parent->DrawPanel->MouseToCursorSchema();
			screen->Trace_Curseur(m_Parent->DrawPanel, m_DC);
		}

		if( FindMarker ) msg = _("Marker found");
		else msg.Printf( _("<%s> Found"), s_OldStringFound.GetData() );
		m_Parent->Affiche_Message(msg);
		EndModal(1);
	}

	else
	{
		m_Parent->Affiche_Message(wxEmptyString);
		if( FindMarker ) msg = _("Marker not found");
		else msg.Printf( _("<%s> Not Found"), s_OldStringFound.GetData());
		DisplayError(this,msg, 10);
	}
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:kicad-svn,代码行数:101,代码来源:find.cpp


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