本文整理汇总了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);
}
}
示例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);
}
//.........这里部分代码省略.........