Commit 664a1f72 authored by dickelbeck's avatar dickelbeck

see my 2007-Sep-20 change_log.txt

parent 33939aeb
...@@ -4,12 +4,20 @@ Started 2007-June-11 ...@@ -4,12 +4,20 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2007-Sep-20 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+ eeschema
* beautify, add debug Show() functions, changed ReturnFieldName()
to return "const wxString&" for speed, added GetFieldValue().
* tracking down questionable behavior (a bug?) in erc regarding pwr_flag, still looking
2007-sept-20 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-sept-20 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+ all + all
* hotkeys handling finished * hotkeys handling finished
+ pcbnew + pcbnew
* bug fix: a subtle bug in place via : partial drc only was made. * bug fix: a subtle bug in place via : partial drc only was made.
2007-Sep-14 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Sep-14 UPDATE Dick Hollenbeck <dick@softplc.com>
...@@ -42,11 +50,11 @@ email address. ...@@ -42,11 +50,11 @@ email address.
2007-sept-13 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-sept-13 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+ all + all
* EDA_BaseStruct.SetType() removed. * EDA_BaseStruct.SetType() removed.
The m_StructType member of class EDA_BaseStruct is no more modified in kicad. The m_StructType member of class EDA_BaseStruct is no more modified in kicad.
Now Virtual functions can be widely used. Now Virtual functions can be widely used.
* The old EDA_BaseStruct.ReturnClassName() was removed. * The old EDA_BaseStruct.ReturnClassName() was removed.
the virtual EDA_BaseStruct.GetClass() is used instead. the virtual EDA_BaseStruct.GetClass() is used instead.
+ gerbview: hotkeys Ok. + gerbview: hotkeys Ok.
...@@ -106,10 +114,10 @@ email address. ...@@ -106,10 +114,10 @@ email address.
================================================================================ ================================================================================
+ eeschema & pcbnew + eeschema & pcbnew
Programmable hotkeys update. Programmable hotkeys update.
some features are still subject to change (mainly path for config files: see 2007-aug-30 UPDATE)) some features are still subject to change (mainly path for config files: see 2007-aug-30 UPDATE))
The preference menu has a command to create and reread config hotkey files. The preference menu has a command to create and reread config hotkey files.
the hotkey ? lists the current hotkeys. the hotkey ? lists the current hotkeys.
2007-Sep-4 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Sep-4 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
...@@ -125,7 +133,7 @@ email address. ...@@ -125,7 +133,7 @@ email address.
2007-sept-04 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-sept-04 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+ pcbnew + pcbnew
better comments in editrack-part2 (the todo remark solved) better comments in editrack-part2 (the todo remark solved)
+ todo.txt: note about editrack-part2 modified (problem solved) + todo.txt: note about editrack-part2 modified (problem solved)
......
...@@ -555,3 +555,29 @@ EDA_BaseStruct* BASE_SCREEN::GetItemFromRedoList() ...@@ -555,3 +555,29 @@ EDA_BaseStruct* BASE_SCREEN::GetItemFromRedoList()
return item; return item;
} }
#if defined(DEBUG)
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void BASE_SCREEN::Show( int nestLevel, std::ostream& os )
{
EDA_BaseStruct* item = EEDrawList;
// for now, make it look like XML, expand on this later.
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
">\n";
for( ; item; item = item->Next() )
{
item->Show( nestLevel+1, os );
}
NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
}
#endif
\ No newline at end of file
...@@ -188,11 +188,14 @@ void EDA_BaseStruct::Show( int nestLevel, std::ostream& os ) ...@@ -188,11 +188,14 @@ void EDA_BaseStruct::Show( int nestLevel, std::ostream& os )
// for now, make it look like XML: // for now, make it look like XML:
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << ">\n"; NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << ">\n";
/*
EDA_BaseStruct* kid = m_Son; EDA_BaseStruct* kid = m_Son;
for( ; kid; kid = kid->Pnext ) for( ; kid; kid = kid->Pnext )
{ {
kid->Show( nestLevel+1, os ); kid->Show( nestLevel+1, os );
} }
*/
NestedSpace( nestLevel+1, os ) << "Need ::Show() override, shown class is using EDA_BaseStruct::Show()\n";
NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n"; NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
} }
......
This diff is collapsed.
...@@ -90,11 +90,11 @@ class SCH_SCREEN : public BASE_SCREEN ...@@ -90,11 +90,11 @@ class SCH_SCREEN : public BASE_SCREEN
public: public:
SCH_SCREEN( int idtype, KICAD_T aType = SCREEN_STRUCT_TYPE ); SCH_SCREEN( int idtype, KICAD_T aType = SCREEN_STRUCT_TYPE );
~SCH_SCREEN(); ~SCH_SCREEN();
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT("SCH_SCREEN"); return wxT("SCH_SCREEN");
} }
void FreeDrawList(); // Free EESchema drawing list (does not delete the sub hierarchies) void FreeDrawList(); // Free EESchema drawing list (does not delete the sub hierarchies)
......
This diff is collapsed.
...@@ -143,6 +143,23 @@ wxString DrawMarkerStruct::GetComment() ...@@ -143,6 +143,23 @@ wxString DrawMarkerStruct::GetComment()
} }
#if defined(DEBUG)
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void DrawMarkerStruct::Show( int nestLevel, std::ostream& os )
{
// for now, make it look like XML:
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << m_Pos
<< "/>\n";
}
#endif
/***************************/ /***************************/
/* Class EDA_DrawLineStruct */ /* Class EDA_DrawLineStruct */
/***************************/ /***************************/
...@@ -201,6 +218,28 @@ bool EDA_DrawLineStruct::IsOneEndPointAt( const wxPoint& pos ) ...@@ -201,6 +218,28 @@ bool EDA_DrawLineStruct::IsOneEndPointAt( const wxPoint& pos )
} }
#if defined(DEBUG)
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void EDA_DrawLineStruct::Show( int nestLevel, std::ostream& os )
{
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
" layer=\"" << m_Layer << '"' <<
" width=\"" << m_Width << '"' <<
" startIsDangling=\"" << m_StartIsDangling << '"' <<
" endIsDangling=\"" << m_EndIsDangling << '"' << ">" <<
" <start" << m_Start << "/>" <<
" <end" << m_End << "/>" <<
"</" << GetClass().Lower().mb_str() << ">\n";
}
#endif
/****************************/ /****************************/
/* Class DrawPolylineStruct */ /* Class DrawPolylineStruct */
/****************************/ /****************************/
......
This diff is collapsed.
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
/* Definition de la representation du composant */ /* Definition de la representation du composant */
#define NUMBER_OF_FIELDS 12 /* Nombre de champs de texte affectes au composant */ #define NUMBER_OF_FIELDS 12 /* Nombre de champs de texte affectes au composant */
typedef enum { enum NumFieldType {
REFERENCE = 0, /* Champ Reference of part, i.e. "IC21" */ REFERENCE = 0, /* Champ Reference of part, i.e. "IC21" */
VALUE, /* Champ Value of part, i.e. "3.3K" */ VALUE, /* Champ Value of part, i.e. "3.3K" */
FOOTPRINT, /* Champ Name Module PCB, i.e. "16DIP300" */ FOOTPRINT, /* Champ Name Module PCB, i.e. "16DIP300" */
...@@ -28,7 +28,7 @@ typedef enum { ...@@ -28,7 +28,7 @@ typedef enum {
FIELD6, FIELD6,
FIELD7, FIELD7,
FIELD8 FIELD8
} NumFieldType; };
/* Class to manage component fields. /* Class to manage component fields.
...@@ -46,9 +46,10 @@ public: ...@@ -46,9 +46,10 @@ public:
public: public:
PartTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString ); PartTextStruct( const wxPoint& pos = wxPoint( 0, 0 ), const wxString& text = wxEmptyString );
~PartTextStruct(); ~PartTextStruct();
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT( "PartTextStruct" ); return wxT( "PartText" );
} }
...@@ -77,10 +78,18 @@ public: ...@@ -77,10 +78,18 @@ public:
public: public:
DrawPartStruct( KICAD_T struct_type, const wxPoint &pos ); DrawPartStruct( KICAD_T struct_type, const wxPoint &pos );
~DrawPartStruct(); ~DrawPartStruct();
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT( "DrawPartStruct" ); return wxT( "DrawPart" );
} }
/**
* Function GetReference
* returns a reference to the Reference
*/
const wxString& GetReference() { return m_Field[REFERENCE].m_Text; }
}; };
...@@ -101,19 +110,30 @@ public: ...@@ -101,19 +110,30 @@ public:
virtual wxString GetClass() const virtual wxString GetClass() const
{ {
return wxT( "EDA_SchComponentStruct" ); return wxT( "EDA_SchComponent" );
} }
EDA_SchComponentStruct* GenCopy( void ); EDA_SchComponentStruct* GenCopy();
void SetRotationMiroir( int type ); void SetRotationMiroir( int type );
int GetRotationMiroir(); int GetRotationMiroir();
wxPoint GetScreenCoord( const wxPoint& coord ); wxPoint GetScreenCoord( const wxPoint& coord );
void Display_Infos( WinEDA_DrawFrame* frame ); void Display_Infos( WinEDA_DrawFrame* frame );
void ClearAnnotation(); void ClearAnnotation();
EDA_Rect GetBoundaryBox(); EDA_Rect GetBoundaryBox();
wxString ReturnFieldName( int FieldNumber );
const wxString& ReturnFieldName( int aFieldNdx ) const;
/**
* Function GetFieldValue
* returns a reference to the field value.
* @param aFieldNdx An index into the array of fields, 0 - FIELD8
* @return const wxString& - the field value or wxEmptyString
*/
const wxString& GetFieldValue( int aFieldNdx ) const;
virtual void Draw( WinEDA_DrawPanel* panel, virtual void Draw( WinEDA_DrawPanel* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
...@@ -122,6 +142,17 @@ public: ...@@ -122,6 +142,17 @@ public:
void SwapData( EDA_SchComponentStruct* copyitem ); void SwapData( EDA_SchComponentStruct* copyitem );
virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC ); virtual void Place( WinEDA_DrawFrame* frame, wxDC* DC );
#if defined(DEBUG)
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void Show( int nestLevel, std::ostream& os );
#endif
}; };
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -272,8 +272,7 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F ...@@ -272,8 +272,7 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F
if( !Failed ) if( !Failed )
{ {
PolylineStruct->Pnext = screen->EEDrawList; PolylineStruct->Pnext = screen->EEDrawList;
screen->EEDrawList = (EDA_BaseStruct*) screen->EEDrawList = (EDA_BaseStruct*) PolylineStruct;
PolylineStruct;
} }
break; break;
...@@ -441,6 +440,10 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F ...@@ -441,6 +440,10 @@ bool WinEDA_SchematicFrame::LoadOneEEFile( SCH_SCREEN* screen, const wxString& F
screen->EEDrawList = Phead; screen->EEDrawList = Phead;
#if defined(DEBUG)
screen->Show( 0, std::cout );
#endif
fclose( f ); fclose( f );
TestDanglingEnds( screen->EEDrawList, NULL ); TestDanglingEnds( screen->EEDrawList, NULL );
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -8,7 +8,7 @@ LibEDA_BaseStruct * LocatePin(const wxPoint & RefPos, ...@@ -8,7 +8,7 @@ LibEDA_BaseStruct * LocatePin(const wxPoint & RefPos,
int Unit, int Convert, EDA_SchComponentStruct * DrawItem = NULL); int Unit, int Convert, EDA_SchComponentStruct * DrawItem = NULL);
/* Routine de localisation d'une PIN de la PartLib pointee par Entry */ /* Routine de localisation d'une PIN de la PartLib pointee par Entry */
wxString ReturnDefaultFieldName(int FieldNumber); const wxString& ReturnDefaultFieldName( int aFieldNdx );
/***************/ /***************/
......
...@@ -215,7 +215,7 @@ private: ...@@ -215,7 +215,7 @@ private:
char m_FlagRefreshReq; /* indique que l'ecran doit redessine */ char m_FlagRefreshReq; /* indique que l'ecran doit redessine */
char m_FlagModified; // indique modif du PCB,utilise pour eviter une sortie sans sauvegarde char m_FlagModified; // indique modif du PCB,utilise pour eviter une sortie sans sauvegarde
char m_FlagSave; // indique sauvegarde auto faite char m_FlagSave; // indique sauvegarde auto faite
EDA_BaseStruct* m_CurrentItem; ///< Current selected object EDA_BaseStruct* m_CurrentItem; ///< Currently selected object
/* Valeurs du pas de grille et du zoom */ /* Valeurs du pas de grille et du zoom */
public: public:
...@@ -260,16 +260,11 @@ public: ...@@ -260,16 +260,11 @@ public:
/** /**
* Function SetCurItem * Function SetCurItem
* sets the currently selected object, m_CurrentItem. * sets the currently selected object, m_CurrentItem.
* This is intentionally not inlined so we can set breakpoints on the
* activity easier in base_screen.cpp.
* @param current Any object derived from EDA_BaseStruct * @param current Any object derived from EDA_BaseStruct
*/ */
void SetCurItem( EDA_BaseStruct* current ) void SetCurItem( EDA_BaseStruct* current ) { m_CurrentItem = current; }
{
m_CurrentItem = current;
}
EDA_BaseStruct* GetCurItem() const { return m_CurrentItem; } EDA_BaseStruct* GetCurItem() const { return m_CurrentItem; }
/* fonctions relatives au zoom */ /* fonctions relatives au zoom */
int GetZoom(); /* retourne le coeff de zoom */ int GetZoom(); /* retourne le coeff de zoom */
...@@ -313,6 +308,18 @@ public: ...@@ -313,6 +308,18 @@ public:
{ {
return wxT( "BASE_SCREEN" ); return wxT( "BASE_SCREEN" );
} }
#if defined(DEBUG)
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void Show( int nestLevel, std::ostream& os );
#endif
}; };
......
...@@ -441,10 +441,10 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay() ...@@ -441,10 +441,10 @@ BOARD_ITEM* WinEDA_BasePcbFrame::PcbGeneralLocateAndDisplay()
{ {
wxMenu itemMenu; wxMenu itemMenu;
int limit = MIN( MAX_ITEMS_IN_PICKER, m_Collector->GetCount() );
itemMenu.SetTitle( _("Selection Clarification") ); // does this work? not under Linux! itemMenu.SetTitle( _("Selection Clarification") ); // does this work? not under Linux!
int limit = MIN( MAX_ITEMS_IN_PICKER, m_Collector->GetCount() );
for( int i=0; i<limit; ++i ) for( int i=0; i<limit; ++i )
{ {
wxString text; wxString text;
......
This diff is collapsed.
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