Commit 2884d125 authored by stambaughw's avatar stambaughw

Replace library editor pin properties dialog box and minor update.

* Replaced library pin properties dialog with wxFormBuilder version.
* Remove DialogBlocks version of pin properties dialog.
* Add pin properties dialog support code to pin object.
* Create single event handler for displaying pin properties dialog.
* Remove left over DialogBlocks project file for annotate dialog.
* Fixed escape key bug in library editor new component dialog.
* Add GetUnitsLabel() to get human readable units for dialog labels.
* Translate French comments in all modified files.
* Some minor clean up of Doxygen comments.
parent 29e217d3
......@@ -73,10 +73,7 @@ int g_DebugLevel;
int g_MouseOldButtons;
int g_KeyPressed;
// Nom (full file name) du file Configuration par defaut (kicad.pro)
wxString g_Prj_Default_Config_FullFilename;
// Nom du file Configuration local (<curr projet>.pro)
wxString g_Prj_Config_LocalFilename;
// Handle the preferd editor for browsing report files:
......@@ -257,6 +254,31 @@ wxString ReturnUnitSymbol( int Units )
}
wxString GetUnitsLabel( int units )
{
wxString label;
switch( units )
{
case INCHES:
label = _( "inches" );
break;
case MILLIMETRE:
label = _( "millimeters" );
break;
case CENTIMETRE:
label = _( "centimeters" );
break;
default:
label = _( "Unknown" );
break;
}
return label;
}
/*
* Add string " (mm):" or " ("):" to the static text Stext.
* Used in dialog boxes for entering values depending on selected units
......@@ -669,17 +691,6 @@ void WinEDA_TextFrame::OnClose( wxCloseEvent& event )
}
/**
* Routine d'affichage d'un parametre.
* pos_X = cadrage horizontal
* si pos_X < 0 : la position horizontale est la derniere
* valeur demandee >= 0
* texte_H = texte a afficher en ligne superieure.
* si "", par d'affichage sur cette ligne
* texte_L = texte a afficher en ligne inferieure.
* si "", par d'affichage sur cette ligne
* color = couleur d'affichage
*/
/*****************************************************************************/
void Affiche_1_Parametre( WinEDA_DrawFrame* frame, int pos_X,
const wxString& texte_H, const wxString& texte_L,
......@@ -693,10 +704,6 @@ void Affiche_1_Parametre( WinEDA_DrawFrame* frame, int pos_X,
/***********************/
int GetTimeStamp()
/***********************/
/*
* Retourne une identification temporelle (Time stamp) differente a chaque appel
*/
{
static int OldTimeStamp, NewTimeStamp;
......@@ -708,16 +715,12 @@ int GetTimeStamp()
}
/**
* TODO replace this obsolete funtion by ReturnStringFromValue
* Retourne pour affichage la valeur d'un parametre, selon type d'unites choisies
* entree : valeur en mils , buffer de texte
* retourne en buffer : texte : valeur exprimee en pouces ou millimetres
* suivie de " ou mm
/* Returns to display the value of a parameter, by type of units selected
* Input: value in mils, buffer text
* Returns to buffer: text: value expressed in inches or millimeters
* Followed by " or mm
*/
/*********************************************/
const wxString& valeur_param( int valeur, wxString& buf_texte )
/*********************************************/
{
if( g_UnitMetric )
{
......
......@@ -57,6 +57,8 @@ set(EESCHEMA_SRCS
# dialog_find.cpp
dialog_lib_edit_draw_item.cpp
dialog_lib_edit_draw_item_base.cpp
dialog_lib_edit_pin.cpp
dialog_lib_edit_pin_base.cpp
dialog_lib_new_component.cpp
dialog_lib_new_component_base.cpp
dialog_options.cpp
......@@ -97,7 +99,6 @@ set(EESCHEMA_SRCS
onrightclick.cpp
operations_on_items_lists.cpp
pinedit.cpp
# pinedit-dialog.cpp
plot.cpp
plothpgl.cpp
plotps.cpp
......
This diff is collapsed.
......@@ -30,7 +30,7 @@ LIB_TEXT::LIB_TEXT(LIB_COMPONENT * aParent) :
}
bool LIB_TEXT::Save( FILE* ExportFile ) const
bool LIB_TEXT::Save( FILE* ExportFile )
{
wxString text = m_Text;
......
......@@ -81,7 +81,6 @@ bool CMP_LIB_ENTRY::SaveDoc( FILE* aFile )
if( m_Doc.IsEmpty() && m_KeyWord.IsEmpty() && m_DocFile.IsEmpty() )
return true;
/* Generation des lignes utiles */
if( fprintf( aFile, "#\n$CMP %s\n", CONV_TO_UTF8( m_Name ) ) < 0 )
return false;
......@@ -427,6 +426,27 @@ void LIB_COMPONENT::GetPins( LIB_PIN_LIST& pins, int unit, int convert )
}
LIB_PIN* LIB_COMPONENT::GetPin( const wxString& number, int unit, int convert )
{
wxString pNumber;
LIB_PIN_LIST pinList;
GetPins( pinList, unit, convert );
for( size_t i = 0; i < pinList.size(); i++ )
{
wxASSERT( pinList[i]->Type() == COMPONENT_PIN_DRAW_TYPE );
pinList[i]->ReturnPinStringNum( pNumber );
if( number == pNumber )
return pinList[i];
}
return NULL;
}
bool LIB_COMPONENT::Save( FILE* aFile )
{
size_t i;
......@@ -930,7 +950,7 @@ LIB_FIELD& LIB_COMPONENT::GetReferenceField( void )
/*
* lit date et time de modif composant sous le format:
* Read date and time of component in the format:
* "Ti yy/mm/jj hh:mm:ss"
*/
bool LIB_COMPONENT::SaveDateAndTime( FILE* file )
......@@ -964,7 +984,7 @@ bool LIB_COMPONENT::LoadDateAndTime( char* Line )
year = mon = day = hour = min = sec = 0;
text = strtok( Line, " \r\t\n" );
text = strtok( NULL, " \r\t\n" ); // text pointe donnees utiles
text = strtok( NULL, " \r\t\n" );
if (sscanf( Line, "%d/%d/%d %d:%d:%d",
&year, &mon, &day, &hour, &min, &sec ) != 6 )
......
......@@ -69,8 +69,7 @@ public:
* Write the entry document information to a FILE in "*.dcm" format.
*
* @param aFile The FILE to write to.
*
* @return bool - true if success writing else false.
* @return True if success writing else false.
*/
bool SaveDoc( FILE* aFile );
......@@ -157,8 +156,7 @@ public:
* Write the data structures out to a FILE in "*.lib" format.
*
* @param aFile - The FILE to write to.
*
* @return bool - true if success writing else false.
* @return True if success writing else false.
*/
bool Save( FILE* aFile );
......@@ -169,8 +167,7 @@ public:
* @param line - The first line of the component definition.
* @param lineNum - The current line number in the file.
* @param errorMsg - Description of error on load failure.
*
* @return bool - Result of the load, false if there was an error.
* @return True if the load was successful, false if there was an error.
*/
bool Load( FILE* file, char* line, int* lineNum, wxString& errorMsg );
bool LoadField( char* line, wxString& errorMsg );
......@@ -198,9 +195,7 @@ public:
* Return pointer to the requested field.
*
* @param id - Id of field to return.
*
* @return LIB_FIELD* - Pointer to field if found. NULL is returned if
* field not found.
* @return The field if found, otherwise NULL.
*/
LIB_FIELD* GetField( int id );
......@@ -220,7 +215,7 @@ public:
* @param convert - Component conversion (DeMorgan) if available.
* @param drawMode - Device context drawing mode, see wxDC.
* @param color - Color to draw component.
* @param transformMatrix - Cooridinate adjustment settings.
* @param transformMatrix - Coordinate adjustment settings.
* @param showPinText - Show pin text if true.
* @param drawFields - Draw field text if true otherwise just draw
* body items (useful to draw a body in schematic,
......@@ -264,16 +259,14 @@ public:
WinEDA_DrawPanel* panel = NULL,
wxDC* dc = NULL );
/** GetNextDrawItem()
/**
* Return the next draw object pointer.
*
* @param item - Pointer to the current draw item. Setting item NULL
* with return the first item of type in the list.
* @param type - type of searched item (filter).
* if TYPE_NOT_INIT search for all items types
*
* @return - Pointer to the next drawing object in the list if found,
* otherwise NULL.
* @return - The next drawing object in the list if found, otherwise NULL.
*/
LIB_DRAW_ITEM* GetNextDrawItem( LIB_DRAW_ITEM* item = NULL,
......@@ -286,9 +279,7 @@ public:
*
* @param item - Pointer to the previous pin item, or NULL to get the
* first pin in the draw object list.
*
* @return - Pointer to the next pin object in the list if found,
* otherwise NULL.
* @return - The next pin object in the list if found, otherwise NULL.
*/
LIB_PIN* GetNextPin( LIB_PIN* item = NULL )
{
......@@ -312,6 +303,18 @@ public:
*/
void GetPins( LIB_PIN_LIST& pins, int unit = 0, int convert = 0 );
/**
* Return pin object with the requested pin number.
*
* @param number - Number of the pin to find.
* @param unit - Unit of the component to find. Set to 0 if a specific
* unit number is not required.
* @param convert - Alternate body style filter (DeMorgan). Set to 0 if
* no alternate body style is required.
* @return The pin object if found. Otherwise NULL.
*/
LIB_PIN* GetPin( const wxString& number, int unit = 0, int convert = 0 );
/**
* Move the component offset.
*
......@@ -327,7 +330,7 @@ public:
/**
* Test if component has more than one body conversion type (DeMorgan).
*
* @return bool - True if component has more than one conversion.
* @return True if component has more than one conversion.
*/
bool HasConversion() const;
......@@ -337,8 +340,7 @@ public:
* Alias name comparisons are case insensitive.
*
* @param name - Name of alias.
*
* @return bool - True if alias name in alias list.
* @return True if alias name in alias list.
*/
bool HasAlias( const wxChar* name )
{
......@@ -362,8 +364,7 @@ public:
* @param convert - Are the draw items being selected a conversion.
* @param editPinByPin - Used to ignore pin selections when in edit pin
* by pin mode is enabled.
*
* @return int - The number of draw object found inside the block select
* @return The number of draw objects found inside the block select
* rectangle.
*/
int SelectItems( EDA_Rect& rect, int unit, int convert,
......@@ -378,7 +379,7 @@ public:
* Deletes the select draw items marked by a block select.
*
* The name and reference field will not be deleted. They are the
* minimum drawing items required for any component. Thier properties
* minimum drawing items required for any component. Their properties
* can be changed but the cannot be removed.
*/
void DeleteSelectedItems( void );
......@@ -411,9 +412,7 @@ public:
* @param convert - Body style of draw item.
* @param type - Draw object type, set to 0 to search for any type.
* @param pt - Coordinate for hit testing.
*
* @return LIB_DRAW_ITEM - Pointer the the draw object if found.
* Otherwise NULL.
* @return The draw object if found. Otherwise NULL.
*/
LIB_DRAW_ITEM* LocateDrawItem( int unit, int convert, KICAD_T type,
const wxPoint& pt );
......@@ -426,9 +425,7 @@ public:
* @param type - Draw object type, set to 0 to search for any type.
* @param pt - Coordinate for hit testing.
* @param aTransMat = the transform matrix
*
* @return LIB_DRAW_ITEM - Pointer the the draw object if found.
* Otherwise NULL.
* @return The draw object if found. Otherwise NULL.
*/
LIB_DRAW_ITEM* LocateDrawItem( int unit, int convert, KICAD_T type,
const wxPoint& pt,
......
......@@ -84,7 +84,7 @@ void LIB_FIELD::Init( int id )
}
bool LIB_FIELD::Save( FILE* ExportFile ) const
bool LIB_FIELD::Save( FILE* ExportFile )
{
int hjustify, vjustify;
wxString text = m_Text;
......@@ -144,14 +144,13 @@ bool LIB_FIELD::Load( char* line, wxString& errorMsg )
return false;
}
/* Recherche du debut des donnees (debut du texte suivant) */
/* Search the beginning of the data. */
while( *line != 0 )
line++;
while( *line == 0 )
line++;
/* recherche du texte */
while( *line && (*line != '"') )
line++;
......@@ -161,7 +160,7 @@ bool LIB_FIELD::Load( char* line, wxString& errorMsg )
text = line;
/* recherche fin de texte */
/* Find end of text. */
while( *line && (*line != '"') )
line++;
......
......@@ -63,18 +63,18 @@ public:
int GetPenSize( );
/**
* Function Save
* writes the data structures for this object out to a FILE in "*.brd"
* format.
* Writes field object out to a FILE in "*.lib" format.
*
* @param aFile The FILE to write to.
* @return bool - true if success writing else false.
* @return True if success writing else false.
*/
virtual bool Save( FILE* aFile ) const;
virtual bool Save( FILE* aFile );
virtual bool Load( char* line, wxString& errorMsg );
/** Function Copy
* copy parameters of this to Target. Pointers are not copied
* @param aTarget = the LIB_FIELD to set with "this" values
/**
* Copy parameters of this field to another field. Pointers are not copied.
*
* @param aTarget = Target field to copy values to.
*/
void Copy( LIB_FIELD* aTarget ) const;
......@@ -87,25 +87,24 @@ public:
/**
* Return the bounding rectangle of the field text.
*
* @return EDA_Rect - Bounding rectangle.
* @return Bounding rectangle.
*/
virtual EDA_Rect GetBoundingBox();
/**
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* @param refPos A wxPoint to test, in Field coordinate system
* @return bool - true if a hit, else false
* Test if the given point is within the bounds of this object.
*
* @param refPos A point to test in field coordinate system
* @return True if a hit, else false
*/
bool HitTest( const wxPoint& refPos );
/**
* Function HitTest
* @return true if the point aPosRef is near this object
* @param aPosRef = a wxPoint to test
* @param aThreshold = max distance to this object (usually the half
* thickness of a line)
* @param aTransMat = the transform matrix
* @return True if the point aPosRef is near this object
*/
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
const int aTransMat[2][2] );
......@@ -135,8 +134,7 @@ public:
* the string U?A will be returned for unit = 1.
*
* @param unit - The package unit number. Only effects reference field.
*
* @return wxString - Field text.
* @return Field text.
*/
wxString GetFullText( int unit = 1 );
......
This diff is collapsed.
......@@ -261,7 +261,7 @@ void SCH_COMPONENT::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
/**
* Function AddHierarchicalReference
* adds a full hierachical reference (path + local reference)
* adds a full hierarchical reference (path + local reference)
* @param aPath = hierarchical path (/<sheet timestamp>/component timestamp>
* like /05678E50/A23EF560)
* @param aRef = local reference like C45, R56
......@@ -525,6 +525,19 @@ void SCH_COMPONENT::AddField( const SCH_CMP_FIELD& aField )
}
LIB_PIN* SCH_COMPONENT::GetPin( const wxString& number )
{
LIB_COMPONENT* Entry = CMP_LIBRARY::FindLibraryComponent( m_ChipName );
if( Entry == NULL )
return NULL;
wxASSERT( Entry->Type == ROOT );
return Entry->GetPin( number, m_Multi, m_Convert );
}
EDA_Rect SCH_COMPONENT::GetBoundaryBox() const
{
LIB_COMPONENT* Entry = CMP_LIBRARY::FindLibraryComponent( m_ChipName );
......@@ -663,7 +676,7 @@ void SCH_COMPONENT::ClearAnnotation( DrawSheetPath* aSheet )
path = GetPath( aSheet );
for( unsigned int ii = 0; ii < m_PathsAndReferences.GetCount(); ii++ )
{
// Break hierachical reference in path, ref and multi selection:
// Break hierarchical reference in path, ref and multi selection:
reference_fields = wxStringTokenize( m_PathsAndReferences[ii],
separators );
if( aSheet == NULL || reference_fields[0].Cmp( path ) == 0 )
......@@ -882,9 +895,9 @@ int SCH_COMPONENT::GetRotationMiroir()
/**
* Renvoie la coordonn�e du point coord, en fonction de l'orientation
* du composant (rotation, miroir).
* Les coord sont toujours relatives a l'ancre (coord 0,0) du composant
* Returns the coordinated point, depending on the orientation of the
* component (rotation, mirror).
* The coordinates are always relative to the anchor position of the component.
*/
wxPoint SCH_COMPONENT::GetScreenCoord( const wxPoint& coord )
{
......@@ -986,7 +999,7 @@ bool SCH_COMPONENT::Save( FILE* f ) const
if( fprintf( f, "L %s %s\n", Name2, Name1 ) == EOF )
return false;
/* Generation de numero d'unit, convert et Time Stamp*/
/* Generate unit number, convert and time stamp*/
if( fprintf( f, "U %d %d %8.8lX\n", m_Multi, m_Convert,
m_TimeStamp ) == EOF )
return false;
......@@ -998,7 +1011,7 @@ bool SCH_COMPONENT::Save( FILE* f ) const
/* If this is a complex hierarchy; save hierarchical references.
* but for simple hierarchies it is not necessary.
* the reference inf is already saved
* this is usefull for old eeschema version compatibility
* this is useful for old eeschema version compatibility
*/
if( m_PathsAndReferences.GetCount() > 1 )
{
......
......@@ -17,8 +17,7 @@ WX_DECLARE_OBJARRAY( DrawSheetPath, ArrayOfSheetLists );
/**
* Struct Error
* is a holder of an error message and may be thrown from functions.
* Holder of an error message and may be thrown from functions.
*/
struct Error
{
......@@ -87,7 +86,7 @@ public:
* first non-digits in the reference
* fields. */
int m_Convert; /* Handle mutiple shape (for instance
int m_Convert; /* Handle multiple shape (for instance
* De Morgan conversion) */
int m_Transform[2][2]; /* The rotation/mirror transformation
* matrix. */
......@@ -101,7 +100,7 @@ private:
* format is
* path reference multi
* with:
* path = /<timestamp1>/<timestamp2> (subsheet path, = / for the root scheet)
* path = /<timestamp1>/<timestamp2> (subsheet path, = / for the root sheet)
* reference = reference for this path (C23, R5, U78 ... )
* multi = part selection in multi parts per package (0 or 1 for one part per package)
*/
......@@ -118,7 +117,7 @@ public:
*
* @param libComponent - Component library object to create schematic
* component from.
* @param sheet - Schemitic sheet the component is place into.
* @param sheet - Schematic sheet the component is place into.
* @param unit - Part for components that have multiple parts per
* package.
* @param convert - Use the alternate body style for the schematic
......@@ -249,6 +248,14 @@ public:
*/
int GetFieldCount() const { return (int) m_Fields.size(); }
/**
* Find a component pin by number.
*
* @param number - The number of the pin to find.
* @return Pin object if found, otherwise NULL.
*/
LIB_PIN* GetPin( const wxString& number );
virtual void Draw( WinEDA_DrawPanel* panel,
wxDC* DC,
const wxPoint& offset,
......@@ -310,7 +317,7 @@ public:
// Geometric transforms (used in block operations):
/** virtual function Move
* move item to a new position.
* @param aMoveVector = the deplacement vector
* @param aMoveVector = the displacement vector
*/
virtual void Move(const wxPoint& aMoveVector)
{
......
......@@ -63,7 +63,6 @@ void LIB_DRAW_ITEM::DisplayInfo( WinEDA_DrawFrame* frame )
frame->ClearMsgPanel();
frame->AppendMsgPanel( _( "Type" ), m_typeName, CYAN );
/* Affichage de l'appartenance */
if( m_Unit == 0 )
msg = _( "All" );
else
......@@ -147,7 +146,7 @@ LIB_ARC::LIB_ARC( const LIB_ARC& arc ) : LIB_DRAW_ITEM( arc )
* A centre_posx centre_posy rayon start_angle end_angle unit convert
* fill('N', 'F' ou 'f') startx starty endx endy
*/
bool LIB_ARC::Save( FILE* ExportFile ) const
bool LIB_ARC::Save( FILE* ExportFile )
{
int x1 = m_t1;
......@@ -559,7 +558,7 @@ LIB_CIRCLE::LIB_CIRCLE( const LIB_CIRCLE& circle ) :
}
bool LIB_CIRCLE::Save( FILE* ExportFile ) const
bool LIB_CIRCLE::Save( FILE* ExportFile )
{
if( fprintf( ExportFile, "C %d %d %d %d %d %d %c\n", m_Pos.x, m_Pos.y,
m_Radius, m_Unit, m_Convert, m_Width, fill_tab[m_Fill] ) < 0 )
......@@ -825,7 +824,7 @@ LIB_RECTANGLE::LIB_RECTANGLE( const LIB_RECTANGLE& rect ) :
}
bool LIB_RECTANGLE::Save( FILE* ExportFile ) const
bool LIB_RECTANGLE::Save( FILE* ExportFile )
{
if( fprintf( ExportFile, "S %d %d %d %d %d %d %d %c\n", m_Pos.x, m_Pos.y,
m_End.x, m_End.y, m_Unit, m_Convert, m_Width,
......@@ -1110,7 +1109,7 @@ LIB_SEGMENT::LIB_SEGMENT( const LIB_SEGMENT& segment ) :
}
bool LIB_SEGMENT::Save( FILE* ExportFile ) const
bool LIB_SEGMENT::Save( FILE* ExportFile )
{
if( fprintf( ExportFile, "L %d %d %d", m_Unit, m_Convert, m_Width ) )
return false;
......@@ -1330,7 +1329,7 @@ LIB_POLYLINE::LIB_POLYLINE( const LIB_POLYLINE& polyline ) :
}
bool LIB_POLYLINE::Save( FILE* ExportFile ) const
bool LIB_POLYLINE::Save( FILE* ExportFile )
{
int ccount = GetCornerCount();
......@@ -1705,7 +1704,7 @@ LIB_BEZIER::LIB_BEZIER( const LIB_BEZIER& bezier ) : LIB_DRAW_ITEM( bezier )
}
bool LIB_BEZIER::Save( FILE* ExportFile ) const
bool LIB_BEZIER::Save( FILE* ExportFile )
{
int ccount = GetCornerCount();
......
This diff is collapsed.
......@@ -3,5 +3,6 @@
DIALOG_LIB_NEW_COMPONENT::DIALOG_LIB_NEW_COMPONENT( wxWindow* parent ) :
DIALOG_LIB_NEW_COMPONENT_BASE( parent )
{
SetDefaultItem( m_sdbSizerOK );
/* Required to make escape key work correctly in wxGTK. */
m_sdbSizerOK->SetFocus();
}
......@@ -161,7 +161,7 @@ enum id_eeschema_frm
ID_LIBEDIT_EXPORT_BODY_BUTT,
/* Library editor context menu IDs */
ID_POPUP_LIBEDIT_PIN_EDIT,
ID_LIBEDIT_EDIT_PIN,
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM,
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINSIZE_ITEM,
ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_PINNAMESIZE_ITEM,
......
......@@ -114,7 +114,7 @@ SCH_ITEM* WinEDA_SchematicFrame::FindComponentAndItem(
case 1: // find a pin
pos = pSch->m_Pos; // temporary: will be changed if the pin is found
pin = LocatePinByNumber( text_to_find, pSch );
pin = pSch->GetPin( text_to_find );
if( pin == NULL )
break;
NotFound = FALSE;
......@@ -167,10 +167,10 @@ SCH_ITEM* WinEDA_SchematicFrame::FindComponentAndItem(
&( GetScreen()->m_StartVisu.x ),
&( GetScreen()->m_StartVisu.y ) );
// calcul des coord curseur avec origine = screen
// Calculating cursor position with original screen.
curpos -= GetScreen()->m_StartVisu;
/* Il y a peut-etre necessite de recadrer le dessin: */
/* There may be need to reframe the drawing */
#define MARGIN 30
if( (curpos.x <= MARGIN) || (curpos.x >= DrawAreaSize.x - MARGIN)
|| (curpos.y <= MARGIN) || (curpos.y >= DrawAreaSize.y - MARGIN) )
......@@ -342,7 +342,6 @@ SCH_ITEM* WinEDA_SchematicFrame::FindMarker( int SearchType )
sheet->LastScreen()->m_Curseur = pos;
curpos = DrawPanel->CursorScreenPosition();
// calcul des coord curseur avec origine = screen
DrawPanel->GetViewStart( &m_CurrentSheet->LastScreen()->m_StartVisu.x,
&m_CurrentSheet->LastScreen()->m_StartVisu.y );
curpos.x -= m_CurrentSheet->LastScreen()->m_StartVisu.x;
......@@ -511,7 +510,7 @@ SCH_ITEM* WinEDA_SchematicFrame::FindSchematicItem(
StartCount++;
if( s_ItemsCount >= StartCount )
{
NotFound = TRUE; /* Continue recherche de l'element suivant */
NotFound = TRUE; /* Continue search of the next element */
}
else
{
......@@ -573,10 +572,9 @@ SCH_ITEM* WinEDA_SchematicFrame::FindSchematicItem(
&( GetScreen()->m_StartVisu.x ),
&( GetScreen()->m_StartVisu.y ) );
// calcul des coord curseur avec origine = screen
curpos -= m_CurrentSheet->LastScreen()->m_StartVisu;
/* Il y a peut-etre necessite de recadrer le dessin: */
/* There may be need to reframe the drawing */
#define MARGIN 30
if( (curpos.x <= MARGIN) || (curpos.x >= DrawAreaSize.x - MARGIN)
|| (curpos.y <= MARGIN) || (curpos.y >= DrawAreaSize.y - MARGIN) )
......
......@@ -633,7 +633,10 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey,
m_drawItem = LocateItemUsingCursor();
if( m_drawItem && m_drawItem->Type() == COMPONENT_PIN_DRAW_TYPE )
InstallPineditFrame( this, DC, MousePos );
{
cmd.SetId( ID_LIBEDIT_EDIT_PIN );
GetEventHandler()->ProcessEvent( cmd );
}
break;
......
......@@ -197,7 +197,9 @@ void WinEDA_LibeditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
case COMPONENT_PIN_DRAW_TYPE:
if( DrawEntry->m_Flags == 0 )
{
InstallPineditFrame( this, DC, pos );
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetId( ID_LIBEDIT_EDIT_PIN );
GetEventHandler()->ProcessEvent( cmd );
}
break;
......
......@@ -233,7 +233,7 @@ void AddMenusForPin( wxMenu* PopMenu,
wxString msg;
msg = AddHotkeyName( _( "Edit Pin " ), s_Libedit_Hokeys_Descr, HK_EDIT_PIN );
ADD_MENUITEM( PopMenu, ID_POPUP_LIBEDIT_PIN_EDIT, msg, edit_xpm );
ADD_MENUITEM( PopMenu, ID_LIBEDIT_EDIT_PIN, msg, edit_xpm );
if( not_in_move )
{
......
......@@ -47,6 +47,7 @@ public:
void OnViewEntryDoc( wxCommandEvent& event );
void OnCheckComponent( wxCommandEvent& event );
void OnSelectBodyStyle( wxCommandEvent& event );
void OnEditPin( wxCommandEvent& event );
void OnUpdateEditingPart( wxUpdateUIEvent& event );
void OnUpdateNotEditingPart( wxUpdateUIEvent& event );
......@@ -69,7 +70,7 @@ public:
void ReCreateVToolbar();
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu );
int BestZoom(); // Retourne le meilleur zoom
int BestZoom(); // Returns the best zoom
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
SCH_SCREEN* GetScreen() { return (SCH_SCREEN*) GetBaseScreen(); }
......@@ -146,17 +147,17 @@ private:
void GetComponentFromUndoList( wxCommandEvent& event );
void GetComponentFromRedoList( wxCommandEvent& event );
// Edition des Pins:
// Editing pins
void CreatePin( wxDC* DC );
void DeletePin( wxDC* DC,
LIB_COMPONENT* LibEntry,
LIB_PIN* Pin );
void StartMovePin( wxDC* DC );
// Edition de l'ancre
// Editing anchor
void PlaceAncre();
// Edition des graphismes:
// Editing graphic items
LIB_DRAW_ITEM* CreateGraphicItem( LIB_COMPONENT* LibEntry, wxDC* DC );
void GraphicItemBeginDraw( wxDC* DC );
void StartMoveDrawSymbol( wxDC* DC );
......@@ -181,10 +182,9 @@ public:
int HandleBlockEnd( wxDC* DC );
void PlacePin( wxDC* DC );
void InitEditOnePin();
void GlobalSetPins( wxDC* DC, LIB_PIN* MasterPin, int id );
// Repetition automatique de placement de pins
// Automatic placement of pins
void RepeatPinItem( wxDC* DC, LIB_PIN* Pin );
protected:
......
......@@ -109,7 +109,9 @@ BEGIN_EVENT_TABLE( WinEDA_LibeditFrame, WinEDA_DrawFrame )
WinEDA_LibeditFrame::Process_Special_Functions )
/* Context menu events and commands. */
EVT_MENU_RANGE( ID_POPUP_LIBEDIT_PIN_EDIT,
EVT_MENU( ID_LIBEDIT_EDIT_PIN, WinEDA_LibeditFrame::OnEditPin )
EVT_MENU_RANGE( ID_POPUP_LIBEDIT_PIN_GLOBAL_CHANGE_ITEM,
ID_POPUP_LIBEDIT_ROTATE_GRAPHIC_TEXT,
WinEDA_LibeditFrame::Process_Special_Functions )
......@@ -155,8 +157,8 @@ WinEDA_LibeditFrame::WinEDA_LibeditFrame( wxWindow* father,
WinEDA_DrawFrame( father, LIBEDITOR_FRAME, title, pos, size, style )
{
m_FrameName = wxT( "LibeditFrame" );
m_Draw_Axis = true; // true pour avoir les axes dessines
m_Draw_Grid = true; // true pour avoir la axes dessinee
m_Draw_Axis = true; // true to draw axis
m_Draw_Grid = true; // true to draw grid
m_ConfigPath = wxT( "LibraryEditor" );
SetShowDeMorgan( false );
m_drawSpecificConvert = true;
......@@ -579,10 +581,10 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
wxGetMousePosition( &pos.x, &pos.y );
pos.y += 20;
switch( id ) // Arret de la commande de d�placement en cours
switch( id ) // Stop placement commands before handling new command.
{
case ID_POPUP_LIBEDIT_END_CREATE_ITEM:
case ID_POPUP_LIBEDIT_PIN_EDIT:
case ID_LIBEDIT_EDIT_PIN:
case ID_POPUP_LIBEDIT_BODY_EDIT_ITEM:
case ID_POPUP_LIBEDIT_FIELD_ROTATE_ITEM:
case ID_POPUP_LIBEDIT_FIELD_EDIT_ITEM:
......@@ -626,10 +628,6 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
g_EditPinByPinIsOn = g_EditPinByPinIsOn ? false : true;
break;
case ID_POPUP_LIBEDIT_PIN_EDIT:
InstallPineditFrame( this, &dc, pos );
break;
case ID_LIBEDIT_PIN_BUTT:
if( m_component )
{
......@@ -638,7 +636,9 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
else
{
SetToolID( id, wxCURSOR_ARROW, _( "Set pin options" ) );
InstallPineditFrame( this, &dc, pos );
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetId( ID_LIBEDIT_EDIT_PIN );
GetEventHandler()->ProcessEvent( cmd );
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
}
break;
......
/******************************************************/
/* Routines de localisation d'un element d'un schema. */
/* Routines for locating an element of a schematic. */
/******************************************************/
#include "fctsys.h"
......@@ -480,8 +480,8 @@ bool DrawStructInBox( int x1, int y1, int x2, int y2, SCH_ITEM* DrawStruct )
case TYPE_SCH_GLOBALLABEL:
#undef STRUCT
#define STRUCT ( (SCH_LABEL*) DrawStruct )
dx = STRUCT->m_Size.x * ( STRUCT->GetLength() + 1); /* longueur totale */
dy = STRUCT->m_Size.y / 2; /* Demi hauteur */
dx = STRUCT->m_Size.x * ( STRUCT->GetLength() + 1); /* total length */
dy = STRUCT->m_Size.y / 2; /* half height */
xt1 = xt2 = STRUCT->m_Pos.x;
yt1 = yt2 = STRUCT->m_Pos.y;
......@@ -525,7 +525,7 @@ bool DrawStructInBox( int x1, int y1, int x2, int y2, SCH_ITEM* DrawStruct )
case DRAW_SHEET_STRUCT_TYPE:
#undef STRUCT
#define STRUCT ( (DrawSheetStruct*) DrawStruct )
/* Recalcul des coordonnees de l'encadrement du composant */
/* Recalculate the coordinates of the worksheet component */
xt1 = STRUCT->m_Pos.x;
yt1 = STRUCT->m_Pos.y;
xt2 = STRUCT->m_Pos.x + STRUCT->m_Size.x;
......@@ -556,12 +556,12 @@ static bool IsBox1InBox2( int StartX1, int StartY1, int EndX1, int EndY1,
int StartX2, int StartY2, int EndX2, int EndY2 )
/****************************************************************************/
/* Routine detectant que le rectangle 1 (Box1) et le rectangle 2 (Box2) se
* recouvrent.
* Retourne TRUE ou FALSE.
/* Routine detects that the rectangle 1 (Box1) and the rectangle 2 (Box2) is
* Overlap.
* Returns TRUE or FALSE.
*
* On Considere ici qu'il y a recouvrement si l'un au moins des coins
* d'un 'Box' est compris dans l'autre
* These assume that there is recovery if at least one corner
* A 'Box' is included in the other
*/
{
int cX, cY;
......@@ -575,87 +575,52 @@ static bool IsBox1InBox2( int StartX1, int StartY1, int EndX1, int EndY1,
if( StartY2 > EndY2 )
EXCHG( StartY2, EndY2 );
/* Tst des 4 coins du rectangle 1 */
cX = StartX1; cY = StartY1; /* 1er coin */
/* Test the 4 corners of the rectangle 1 */
cX = StartX1;
cY = StartY1;
if( (cX >= StartX2) && (cX <= EndX2) && (cY >= StartY2) && (cY <= EndY2) )
return TRUE;
cX = EndX1; cY = StartY1; /* 2er coin */
cX = EndX1;
cY = StartY1;
if( (cX >= StartX2) && (cX <= EndX2) && (cY >= StartY2) && (cY <= EndY2) )
return TRUE;
cX = EndX1; cY = EndY1; /* 3eme coin */
cX = EndX1;
cY = EndY1;
if( (cX >= StartX2) && (cX <= EndX2) && (cY >= StartY2) && (cY <= EndY2) )
return TRUE;
cX = StartX1; cY = EndY1; /* 4eme coin */
cX = StartX1;
cY = EndY1;
if( (cX >= StartX2) && (cX <= EndX2) && (cY >= StartY2) && (cY <= EndY2) )
return TRUE;
/* Tst des 4 coins du rectangle 2 */
cX = StartX2; cY = StartY2; /* 1er coin */
/* Test the 4 corners of the rectangle 2 */
cX = StartX2;
cY = StartY2;
if( (cX >= StartX1) && (cX <= EndX1) && (cY >= StartY1) && (cY <= EndY1) )
return TRUE;
cX = EndX2; cY = StartY2; /* 2er coin */
cX = EndX2;
cY = StartY2;
if( (cX >= StartX1) && (cX <= EndX1) && (cY >= StartY1) && (cY <= EndY1) )
return TRUE;
cX = EndX2; cY = EndY2; /* 3er coin */
cX = EndX2;
cY = EndY2;
if( (cX >= StartX1) && (cX <= EndX1) && (cY >= StartY1) && (cY <= EndY1) )
return TRUE;
cX = StartX2; cY = EndY2; /* 4er coin */
cX = StartX2;
cY = EndY2;
if( (cX >= StartX1) && (cX <= EndX1) && (cY >= StartY1) && (cY <= EndY1) )
return TRUE;
return FALSE;
}
/**
* Find a PIN in a component by pin number.
*
* @param ePin_Number - pin number to locate.
* @param eComponent - schematic component object to search.
*
* @return a pointer to the located the pin, or NULL if not found
*/
LIB_PIN* LocatePinByNumber( const wxString& ePin_Number,
SCH_COMPONENT* eComponent )
{
LIB_COMPONENT* Entry;
LIB_PIN_LIST pinList;
int Unit, Convert;
Entry = CMP_LIBRARY::FindLibraryComponent( eComponent->m_ChipName );
if( Entry == NULL )
return NULL;
wxASSERT( Entry->Type == ROOT );
Unit = eComponent->m_Multi;
Convert = eComponent->m_Convert;
Entry->GetPins( pinList, Unit, Convert );
for( size_t i = 0; i < pinList.size(); i++ )
{
wxASSERT( pinList[i]->Type() == COMPONENT_PIN_DRAW_TYPE );
wxString pNumber;
pinList[i]->ReturnPinStringNum( pNumber );
if( ePin_Number == pNumber )
return pinList[i];
}
return NULL;
}
Hierarchical_PIN_Sheet_Struct* LocateSheetLabel( DrawSheetStruct* Sheet,
const wxPoint& pos )
{
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: pinedit-dialog.h
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 11/02/2006 13:30:59
// RCS-ID:
// Copyright: License GNU
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 11/02/2006 13:30:59
#ifndef _PINEDIT_DIALOG_H_
#define _PINEDIT_DIALOG_H_
/* #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) */
/* #pragma interface "pinedit-dialog.h" */
/* #endif */
/*!
* Includes
*/
#include "fctsys.h"
#include "gr_basic.h"
#include "class_drawpanel.h"
#include "common.h"
#include "program.h"
#include "general.h"
#include "eeschema_id.h"
#include "libeditfrm.h"
#include "protos.h"
////@begin includes
#include "wx/spinbutt.h"
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
class wxSpinButton;
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_TEXTCTRL_PINNAME 10001
#define ID_TEXTCTRL_PINNUM 10002
#define ID_TEXTCTRL_PINSIZE 10003
#define ID_SPINBUTTON_INC_DEC_PINSIZE 10010
#define ID_CHECKBOX_COMMON_UNITS 10004
#define ID_CHECKBOX_COMMON_CONVERT 10005
#define ID_CHECKBOX_NOT_DRAWN 10006
#define ID_TEXTCTRL_PINNAME_SIZE 10007
#define ID_TEXTCTRL_PINNUM_SIZE 10008
#define ID_RADIOBOX 10009
#define ID_RADIOBOX1 10012
#define ID_RADIOBOX2 10013
#define SYMBOL_WINEDA_PINPROPERTIESFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_PINPROPERTIESFRAME_TITLE _("Pin properties")
#define SYMBOL_WINEDA_PINPROPERTIESFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_PINPROPERTIESFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_PINPROPERTIESFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
* WinEDA_PinPropertiesFrame class declaration
*/
class WinEDA_PinPropertiesFrame: public wxDialog
{
DECLARE_DYNAMIC_CLASS( WinEDA_PinPropertiesFrame )
DECLARE_EVENT_TABLE()
public:
/// Constructors
WinEDA_PinPropertiesFrame( );
WinEDA_PinPropertiesFrame( WinEDA_LibeditFrame* parent, wxWindowID id = SYMBOL_WINEDA_PINPROPERTIESFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PINPROPERTIESFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PINPROPERTIESFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PINPROPERTIESFRAME_SIZE, long style = SYMBOL_WINEDA_PINPROPERTIESFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PINPROPERTIESFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PINPROPERTIESFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PINPROPERTIESFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PINPROPERTIESFRAME_SIZE, long style = SYMBOL_WINEDA_PINPROPERTIESFRAME_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin WinEDA_PinPropertiesFrame event handler declarations
/// wxEVT_SCROLL_LINEUP event handler for ID_SPINBUTTON_INC_DEC_PINSIZE
void OnSpinbuttonIncDecPinsizeUp( wxSpinEvent& event );
/// wxEVT_SCROLL_LINEDOWN event handler for ID_SPINBUTTON_INC_DEC_PINSIZE
void OnSpinbuttonIncDecPinsizeDown( wxSpinEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
void OnOkClick( wxCommandEvent& event );
////@end WinEDA_PinPropertiesFrame event handler declarations
////@begin WinEDA_PinPropertiesFrame member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end WinEDA_PinPropertiesFrame member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
void SetValuesInDialog(void);
void PinPropertiesAccept(wxCommandEvent& event);
void SetPinName(const wxString & newname, int newsize);
void SetPinNum(const wxString & newnum, int newsize);
void NewSizePin(int newsize);
void SetPinShape( int newshape);
void SetPinType(int newtype);
void SetPinOrientation(int neworient);
void SetPinAttributes(bool draw, bool unit, bool convert);
////@begin WinEDA_PinPropertiesFrame member variables
wxTextCtrl* m_PinNameCtrl;
wxTextCtrl* m_PinNumCtrl;
wxTextCtrl* m_PinSizeCtrl;
wxSpinButton* m_PinSizeIncDecButton;
wxStaticText* m_PinSizeText;
wxCheckBox* m_CommonUnit;
wxCheckBox* m_CommonConvert;
wxCheckBox* m_NoDraw;
wxStaticText* m_PinNameSizeText;
wxTextCtrl* m_PinNameSizeCtrl;
wxStaticText* m_PinNumSizeText;
wxTextCtrl* m_PinNumSizeCtrl;
wxRadioBox* m_PinOrient;
wxButton* m_btClose;
wxRadioBox* m_PinShape;
wxRadioBox* m_PinElectricalType;
////@end WinEDA_PinPropertiesFrame member variables
WinEDA_LibeditFrame * m_Parent;
};
#endif
// _PINEDIT_DIALOG_H_
This diff is collapsed.
This diff is collapsed.
//*****************************************/
/* prototypage des fonctions de EESchema */
/*****************************************/
#ifndef __PROTOS_H__
#define __PROTOS_H__
......@@ -58,7 +55,6 @@ bool MapAngles( int* Angle1,
*
* @param aTransformMatrix = rotation, mirror .. matrix
* @param aPosition = the position to transform
*
* @return the new coordinate
*/
wxPoint TransformCoordinate( const int aTransformMatrix[2][2],
......@@ -71,10 +67,6 @@ void SnapLibItemPoint( int OrigX,
SCH_COMPONENT* DrawLibItem );
bool LibItemInBox( int x1, int y1, int x2, int y2,
SCH_COMPONENT* DrawLibItem );
char* StrPurge( char* text );
/* Supprime les caracteres Space en debut de la ligne text
* retourne un pointeur sur le 1er caractere non Space de text */
/************/
/* BLOCK.CPP */
......@@ -87,13 +79,10 @@ void DeleteStruct( WinEDA_DrawPanel* panel,
/*************/
/* LOCATE.CPP */
/*************/
LIB_PIN* LocatePinByNumber( const wxString& ePin_Number,
SCH_COMPONENT* eComponent );
SCH_COMPONENT* LocateSmallestComponent( SCH_SCREEN* Screen );
/* Recherche du plus petit (en surface) composant pointe par la souris */
/* Find the item within block selection. */
int PickItemsInBlock( BLOCK_SELECTOR& aBlock,
BASE_SCREEN* screen );
......@@ -123,14 +112,10 @@ int PickItemsInBlock( BLOCK_SELECTOR& aBlock,
*
*
* Return:
* -Bloc search:
* pointeur sur liste de pointeurs de structures si Plusieurs
* structures selectionnees.
* pointeur sur la structure si 1 seule
*
* Positon search:
* pointeur sur la structure.
* Si pas de structures selectionnees: retourne NULL */
* Pointer to list of pointers to structures if several items are selected.
* Pointer to the structure if only 1 item is selected.
* NULL if no items are selects.
*/
SCH_ITEM* PickStruct( const wxPoint& refpos,
BASE_SCREEN* screen,
int SearchMask );
......@@ -237,13 +222,14 @@ void InstallPineditFrame( WinEDA_LibeditFrame* parent,
/**
* Function DisplayComponentsNamesInLib
* Routine de selection d'un composant en librairie, par affichage de la
* liste des composants de cette librairie
* Si Library == NULL, selection de librairie demandee
* sinon recherche uniquement dans library
* Retourne
* 1 si composant selectionne
* 0 si commande annulee
* Select component from list of components in this library
*
* If == NULL Library, selection of library REQUESTED
* If only in research library
*
* Returns
* 1 if selected component
* 0 if canceled order
*/
int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame,
CMP_LIBRARY* Library,
......@@ -259,15 +245,13 @@ int DisplayComponentsNamesInLib( WinEDA_DrawFrame* frame,
CMP_LIBRARY* SelectLibraryFromList( WinEDA_DrawFrame* frame );
/**
* Function GetNameOfPartToLoad
* Routine de selection du nom d'un composant en librairie pour chargement,
* dans la librairie Library.
* Si Library == NULL, il y aura demande de selection d'une librairie
* Retourne
* 1 si composant selectionne
* 0 si commande annulee
* place le nom du composant a charger, selectionne a partir d'une liste dans
* BufName
* Get the name component from a library to load.
*
* If no library specified, there will be demand for selection of a library.
* Returns
* 1 if selected component
* 0 if canceled order
* Place the name of the selected component list in BufName
*/
int GetNameOfPartToLoad( WinEDA_DrawFrame* frame,
CMP_LIBRARY* Lib,
......@@ -292,9 +276,6 @@ void SchematicCleanUp( SCH_SCREEN* screen, wxDC* DC );
void BreakSegmentOnJunction( SCH_SCREEN* Screen );
/* Routine creant des debuts / fin de segment (BUS ou WIRES) sur les jonctions
* et les raccords */
/* Break a segment ( BUS, WIRE ) int 2 segments at location aBreakpoint,
* if aBreakpoint in on segment segment
* ( excluding ends)
......
......@@ -65,11 +65,9 @@ enum pseudokeys {
#define TEXT_ORIENT_HORIZ 0
#define TEXT_ORIENT_VERT 900
/* Affichage ou Effacement d'Item */
#define ON 1 /* Affichage */
#define OFF 0 /* Effacement */
#define ON 1
#define OFF 0
/* unites d'affichage sur ecran et autres */
#define INCHES 0
#define MILLIMETRE 1
#define CENTIMETRE 2
......@@ -86,7 +84,7 @@ class LibNameList;
/***********************************/
/* Classe pour affichage de textes */
/* Class to display text */
/***********************************/
class WinEDA_TextFrame : public wxDialog
{
......@@ -169,9 +167,9 @@ extern const wxString PdfFileWildcard;
extern const wxString AllFilesWildcard;
// Nom (full file name) du file Configuration par defaut (kicad.pro)
// Name of default configuration file. (kicad.pro)
extern wxString g_Prj_Default_Config_FullFilename;
// Nom du file Configuration local (<curr projet>.pro)
// Name of local configuration file. (<curr projet>.pro)
extern wxString g_Prj_Config_LocalFilename;
extern int g_UnitMetric; // display units mm = 1, inches = 0, cm = 2
......@@ -273,15 +271,15 @@ wxString GetAboutBuildVersion(); /* Return custom build date for about dialog
/**
* function Affiche_1_Parametre
* Routine d'affichage d'un parametre.
* pos_X = cadrage horizontal
* si pos_X < 0 : la position horizontale est la derniere
* valeur demandee >= 0
* texte_H = texte a afficher en ligne superieure.
* si "", par d'affichage sur cette ligne
* texte_L = texte a afficher en ligne inferieure.
* si "", par d'affichage sur cette ligne
* color = couleur d'affichage
* Routine to display a parameter.
* = POS_X horizontal framing
* If POS_X <0: horizontal position is the last
* Required value> = 0
* Texte_H = text to be displayed in top line.
* If "by posting on this line
* Texte_L = text to be displayed in bottom line.
* If "by posting on this line
* Color = color display
*/
void Affiche_1_Parametre( WinEDA_DrawFrame* frame,
int pos_X,
......@@ -289,25 +287,34 @@ void Affiche_1_Parametre( WinEDA_DrawFrame* frame,
const wxString& texte_L,
int color );
/* Routine d'affichage de la documentation associee a un composant */
int GetTimeStamp();
/* Retoure une identification temporelle (Time stamp) differente a chaque appel */
int DisplayColorFrame( wxWindow* parent, int OldColor );
int GetCommandOptions( const int argc, const char** argv,
const char* stringtst, const char** optarg,
int* optind );
/* Retourne pour affichage la valeur d'un parametre, selon type d'unites choisies
* entree : valeur en mils , buffer de texte
* retourne en buffer : texte : valeur exprimee en pouces ou millimetres
* suivie de " ou mm
/* Returns to display the value of a parameter, by type of units selected
* Input: value in mils, buffer text
* Returns to buffer: text: value expressed in inches or millimeters
* Followed by " or mm
*/
const wxString& valeur_param( int valeur, wxString& buf_texte );
wxString ReturnUnitSymbol( int Units = g_UnitMetric );
/**
* Get a human readable units string.
*
* The strings returned are full text name and not abbreviations or symbolic
* representations of units. Set ReturnUnitSymbol() for that.
*
* @param units - The units text to return.
* @return The human readable units string.
*/
wxString GetUnitsLabel( int units );
int ReturnValueFromString( int Units, const wxString& TextValue,
int Internal_Unit );
......
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