Commit 9f049640 authored by dickelbeck's avatar dickelbeck

whitespace consistency

parent 2a40051a
This diff is collapsed.
/***************************************************/ /***************************************************/
/* PCBNEW - Gestion des Recherches (fonction Find) */ /* PCBNEW - Gestion des Recherches (fonction Find) */
/***************************************************/ /***************************************************/
/* Fichier find.cpp */ /* Fichier find.cpp */
/* /*
Affichage et modifications des parametres de travail de PcbNew Affichage et modifications des parametres de travail de PcbNew
...@@ -33,8 +33,8 @@ static int s_ItemCount, s_MarkerCount; ...@@ -33,8 +33,8 @@ static int s_ItemCount, s_MarkerCount;
void WinEDA_PcbFrame::InstallFindFrame(const wxPoint & pos, wxDC * DC) void WinEDA_PcbFrame::InstallFindFrame(const wxPoint & pos, wxDC * DC)
/*********************************************************************/ /*********************************************************************/
{ {
WinEDA_PcbFindFrame * frame = new WinEDA_PcbFindFrame(this, DC, pos); WinEDA_PcbFindFrame * frame = new WinEDA_PcbFindFrame(this, DC, pos);
frame->ShowModal(); frame->Destroy(); frame->ShowModal(); frame->Destroy();
} }
...@@ -50,97 +50,97 @@ bool succes = FALSE; ...@@ -50,97 +50,97 @@ bool succes = FALSE;
bool FindMarker = FALSE; bool FindMarker = FALSE;
MODULE * Module; MODULE * Module;
int StartCount; int StartCount;
switch ( event.GetId() ) switch ( event.GetId() )
{ {
case ID_FIND_ITEM: case ID_FIND_ITEM:
s_ItemCount = 0; s_ItemCount = 0;
break; break;
case ID_FIND_MARKER: s_MarkerCount = 0; case ID_FIND_MARKER: s_MarkerCount = 0;
case ID_FIND_NEXT_MARKER: case ID_FIND_NEXT_MARKER:
FindMarker = TRUE; FindMarker = TRUE;
break; break;
} }
s_OldStringFound = m_NewText->GetValue(); s_OldStringFound = m_NewText->GetValue();
m_Parent->DrawPanel->GetViewStart(&screen->m_StartVisu.x, &screen->m_StartVisu.y); m_Parent->DrawPanel->GetViewStart(&screen->m_StartVisu.x, &screen->m_StartVisu.y);
StartCount = 0; StartCount = 0;
if( FindMarker ) if( FindMarker )
{ {
MARQUEUR * Marker = (MARQUEUR *) m_Parent->m_Pcb->m_Drawings; MARQUEUR * Marker = (MARQUEUR *) m_Parent->m_Pcb->m_Drawings;
for( ; Marker != NULL; Marker = (MARQUEUR *)Marker->Pnext) for( ; Marker != NULL; Marker = (MARQUEUR *)Marker->Pnext)
{ {
if( Marker->m_StructType != TYPEMARQUEUR ) continue; if( Marker->m_StructType != TYPEMARQUEUR ) continue;
StartCount++; StartCount++;
if ( StartCount > s_MarkerCount ) if ( StartCount > s_MarkerCount )
{ {
succes = TRUE; succes = TRUE;
locate_pos = Marker->m_Pos; locate_pos = Marker->m_Pos;
s_MarkerCount++; s_MarkerCount++;
break; break;
} }
} }
} }
else for ( Module = m_Parent->m_Pcb->m_Modules; Module != NULL; Module = (MODULE*)Module->Pnext) 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 ) ) if( WildCompareString( s_OldStringFound, Module->m_Reference->m_Text.GetData(), FALSE ) )
{ {
StartCount++; StartCount++;
if ( StartCount > s_ItemCount ) if ( StartCount > s_ItemCount )
{ {
succes = TRUE; succes = TRUE;
locate_pos = Module->m_Pos; locate_pos = Module->m_Pos;
s_ItemCount++; s_ItemCount++;
break; break;
} }
} }
if( WildCompareString( s_OldStringFound, Module->m_Value->m_Text.GetData(), FALSE ) ) if( WildCompareString( s_OldStringFound, Module->m_Value->m_Text.GetData(), FALSE ) )
{ {
StartCount++; StartCount++;
if ( StartCount > s_ItemCount ) if ( StartCount > s_ItemCount )
{ {
succes = TRUE; succes = TRUE;
locate_pos = Module->m_Pos; locate_pos = Module->m_Pos;
s_ItemCount++; s_ItemCount++;
break; break;
} }
} }
} }
if ( succes ) if ( succes )
{ /* Il y a peut-etre necessite de recadrer le dessin: */ { /* Il y a peut-etre necessite de recadrer le dessin: */
if( ! m_Parent->DrawPanel->IsPointOnDisplay(locate_pos) ) if( ! m_Parent->DrawPanel->IsPointOnDisplay(locate_pos) )
{ {
screen->m_Curseur = locate_pos; screen->m_Curseur = locate_pos;
m_Parent->Recadre_Trace(TRUE); m_Parent->Recadre_Trace(TRUE);
} }
else else
{ // Positionnement du curseur sur l'item { // Positionnement du curseur sur l'item
m_Parent->DrawPanel->CursorOff(m_DC); m_Parent->DrawPanel->CursorOff(m_DC);
screen->m_Curseur = locate_pos; screen->m_Curseur = locate_pos;
GRMouseWarp(m_Parent->DrawPanel, screen->m_Curseur ); GRMouseWarp(m_Parent->DrawPanel, screen->m_Curseur );
m_Parent->DrawPanel->MouseToCursorSchema(); m_Parent->DrawPanel->MouseToCursorSchema();
m_Parent->DrawPanel->CursorOn(m_DC); m_Parent->DrawPanel->CursorOn(m_DC);
} }
if( FindMarker ) msg = _("Marker found"); if( FindMarker ) msg = _("Marker found");
else msg.Printf( _("<%s> Found"), s_OldStringFound.GetData() ); else msg.Printf( _("<%s> Found"), s_OldStringFound.GetData() );
m_Parent->Affiche_Message(msg); m_Parent->Affiche_Message(msg);
EndModal(1); EndModal(1);
} }
else else
{ {
m_Parent->Affiche_Message(wxEmptyString); m_Parent->Affiche_Message(wxEmptyString);
if( FindMarker ) msg = _("Marker not found"); if( FindMarker ) msg = _("Marker not found");
else msg.Printf( _("<%s> Not Found"), s_OldStringFound.GetData()); else msg.Printf( _("<%s> Not Found"), s_OldStringFound.GetData());
DisplayError(this,msg, 10); DisplayError(this,msg, 10);
EndModal(0); EndModal(0);
} }
} }
...@@ -180,15 +180,15 @@ WinEDA_PcbFindFrame::WinEDA_PcbFindFrame( ) ...@@ -180,15 +180,15 @@ WinEDA_PcbFindFrame::WinEDA_PcbFindFrame( )
} }
WinEDA_PcbFindFrame::WinEDA_PcbFindFrame( WinEDA_BasePcbFrame *parent, wxDC * DC, WinEDA_PcbFindFrame::WinEDA_PcbFindFrame( WinEDA_BasePcbFrame *parent, wxDC * DC,
const wxPoint& pos, const wxPoint& pos,
wxWindowID id, const wxString& caption, const wxSize& size, long style ) wxWindowID id, const wxString& caption, const wxSize& size, long style )
{ {
m_Parent = parent; m_Parent = parent;
m_DC = DC; m_DC = DC;
Create(parent, id, caption, pos, size, style); Create(parent, id, caption, pos, size, style);
m_NewText->SetFocus(); m_NewText->SetFocus();
} }
/*! /*!
...@@ -219,7 +219,7 @@ bool WinEDA_PcbFindFrame::Create( wxWindow* parent, wxWindowID id, const wxStrin ...@@ -219,7 +219,7 @@ bool WinEDA_PcbFindFrame::Create( wxWindow* parent, wxWindowID id, const wxStrin
void WinEDA_PcbFindFrame::CreateControls() void WinEDA_PcbFindFrame::CreateControls()
{ {
SetFont(*g_DialogFont); SetFont(*g_DialogFont);
////@begin WinEDA_PcbFindFrame content construction ////@begin WinEDA_PcbFindFrame content construction
// Generated by DialogBlocks, 04/03/2006 14:04:20 (unregistered) // Generated by DialogBlocks, 04/03/2006 14:04:20 (unregistered)
...@@ -304,7 +304,7 @@ wxIcon WinEDA_PcbFindFrame::GetIconResource( const wxString& name ) ...@@ -304,7 +304,7 @@ wxIcon WinEDA_PcbFindFrame::GetIconResource( const wxString& name )
void WinEDA_PcbFindFrame::OnFindItemClick( wxCommandEvent& event ) void WinEDA_PcbFindFrame::OnFindItemClick( wxCommandEvent& event )
{ {
FindItem(event); FindItem(event);
} }
/*! /*!
...@@ -313,7 +313,7 @@ void WinEDA_PcbFindFrame::OnFindItemClick( wxCommandEvent& event ) ...@@ -313,7 +313,7 @@ void WinEDA_PcbFindFrame::OnFindItemClick( wxCommandEvent& event )
void WinEDA_PcbFindFrame::OnFindNextItemClick( wxCommandEvent& event ) void WinEDA_PcbFindFrame::OnFindNextItemClick( wxCommandEvent& event )
{ {
FindItem(event); FindItem(event);
} }
/*! /*!
...@@ -322,7 +322,7 @@ void WinEDA_PcbFindFrame::OnFindNextItemClick( wxCommandEvent& event ) ...@@ -322,7 +322,7 @@ void WinEDA_PcbFindFrame::OnFindNextItemClick( wxCommandEvent& event )
void WinEDA_PcbFindFrame::OnFindMarkerClick( wxCommandEvent& event ) void WinEDA_PcbFindFrame::OnFindMarkerClick( wxCommandEvent& event )
{ {
FindItem(event); FindItem(event);
} }
/*! /*!
...@@ -331,7 +331,7 @@ void WinEDA_PcbFindFrame::OnFindMarkerClick( wxCommandEvent& event ) ...@@ -331,7 +331,7 @@ void WinEDA_PcbFindFrame::OnFindMarkerClick( wxCommandEvent& event )
void WinEDA_PcbFindFrame::OnFindNextMarkerClick( wxCommandEvent& event ) void WinEDA_PcbFindFrame::OnFindNextMarkerClick( wxCommandEvent& event )
{ {
FindItem(event); FindItem(event);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment