diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 00a9e59a02..16f1a81f94 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -6,6 +6,12 @@ Please add newer entries at the top, list the date and your name with email address. +2008-Dec-28 UPDATE Jean-Pierre Charras +================================================================================ +++Eeschema: + More about italic and bold texts options in fields and graphic texts + + 2008-Dec-22 UPDATE Jean-Pierre Charras ================================================================================ ++Pcbnew: diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index b9dccfcf8e..57e29ebca7 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -32,6 +32,7 @@ set(EESCHEMA_SRCS delete.cpp delsheet.cpp # dialog_backanno.cpp + dialog_bodygraphictext_properties_base.cpp dialog_build_BOM.cpp # dialog_cmp_graphic_properties.cpp dialog_create_component.cpp @@ -94,7 +95,7 @@ set(EESCHEMA_SRCS sheetlab.cpp symbdraw.cpp symbedit.cpp - symbtext.cpp + edit_graphic_bodyitem_text.cpp tool_lib.cpp tool_sch.cpp tool_viewlib.cpp diff --git a/eeschema/affiche.cpp b/eeschema/affiche.cpp index 04990b719c..db14aad0ad 100644 --- a/eeschema/affiche.cpp +++ b/eeschema/affiche.cpp @@ -126,6 +126,7 @@ void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame ) */ { wxString msg; + int thickness = 0; frame->MsgPanel->EraseMsgBox(); @@ -135,21 +136,27 @@ void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame ) switch( Type() ) { case COMPONENT_ARC_DRAW_TYPE: + thickness = ( (LibDrawArc*) this )->m_Width; msg = wxT( "Arc" ); break; case COMPONENT_CIRCLE_DRAW_TYPE: + thickness = ( (LibDrawCircle*) this )->m_Width; msg = wxT( "Circle" ); break; case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE: + thickness = ( (LibDrawText*) this )->m_Width; msg = wxT( "Text" ); break; case COMPONENT_RECT_DRAW_TYPE: + thickness = ( (LibDrawSquare*) this )->m_Width; msg = wxT( "Rect" ); break; case COMPONENT_POLYLINE_DRAW_TYPE: + thickness = ( (LibDrawPolyline*) this )->m_Width; msg = wxT( "PolyLine" ); break; case COMPONENT_LINE_DRAW_TYPE: + thickness = ( (LibDrawSegment*) this )->m_Width; msg = wxT( "Segment" ); break; case COMPONENT_PIN_DRAW_TYPE: @@ -181,9 +188,9 @@ void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame ) msg = wxT( "?" ); Affiche_1_Parametre( frame, 14, _( "Convert" ), msg, BROWN ); - if( m_Width ) - msg = ReturnStringFromValue( g_UnitMetric, m_Width, EESCHEMA_INTERNAL_UNIT, true ); + if( thickness ) + msg = ReturnStringFromValue( g_UnitMetric, thickness, EESCHEMA_INTERNAL_UNIT, true ); else msg = _( "default" ); - Affiche_1_Parametre( frame, 20, _( "Width" ), msg, BLUE ); + Affiche_1_Parametre( frame, 20, _( "Thickness" ), msg, BLUE ); } diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp index aef4e902b2..54e94e88d9 100644 --- a/eeschema/class_library.cpp +++ b/eeschema/class_library.cpp @@ -12,11 +12,6 @@ #include "protos.h" - -/*******************************************************/ -/* Methodes relatives a la manipulation des librairies */ -/*******************************************************/ - /***************************************************************************************/ LibraryStruct::LibraryStruct( int type, const wxString& name, const wxString& fullname ) /***************************************************************************************/ @@ -396,11 +391,6 @@ LibDrawField::LibDrawField( int idfield ) : LibEDA_BaseStruct( COMPONENT_FIELD_D if( m_FieldId >= NUMBER_OF_FIELDS ) m_FieldId = NUMBER_OF_FIELDS - 1; m_Size.x = m_Size.y = DEFAULT_SIZE_TEXT; - m_Orient = 0; /* Orientation */ - m_Attributs = 0; /* Attributs = unvisible ... */ - m_Width = 0; - m_HJustify = GR_TEXT_HJUSTIFY_CENTER; - m_VJustify = GR_TEXT_VJUSTIFY_CENTER; /* Horizontal and vertical text justification */ } @@ -432,6 +422,7 @@ void LibDrawField::Copy( LibDrawField* Target ) Target->m_Name = m_Name; Target->m_HJustify = m_HJustify; Target->m_VJustify = m_VJustify; + Target->m_Italic = m_Italic; } @@ -494,13 +485,11 @@ LibDrawCircle* LibDrawCircle::GenCopy() /*****************************************************************/ -LibDrawText::LibDrawText() : LibEDA_BaseStruct( COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ) +LibDrawText::LibDrawText() : LibEDA_BaseStruct( COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ), + EDA_TextStruct() /*****************************************************************/ { - m_Horiz = TEXT_ORIENT_HORIZ; m_Size = wxSize( 50, 50 ); - m_Type = 0; - m_Width = 0; } @@ -511,14 +500,17 @@ LibDrawText* LibDrawText::GenCopy() LibDrawText* newitem = new LibDrawText(); newitem->m_Pos = m_Pos; - newitem->m_Horiz = m_Horiz; + newitem->m_Orient = m_Orient; newitem->m_Size = m_Size; - newitem->m_Type = m_Type; + newitem->m_Attributs = m_Attributs; newitem->m_Unit = m_Unit; newitem->m_Convert = m_Convert; newitem->m_Flags = m_Flags; newitem->m_Text = m_Text; newitem->m_Width = m_Width; + newitem->m_Italic = m_Italic; + newitem->m_HJustify = m_HJustify; + newitem->m_VJustify = m_VJustify; return newitem; } @@ -589,7 +581,6 @@ LibDrawPolyline* LibDrawPolyline::GenCopy() newitem->m_PolyList = (int*) MyMalloc( size ); memcpy( newitem->m_PolyList, m_PolyList, size ); } - newitem->m_Pos = m_Pos; newitem->m_Width = m_Width; newitem->m_Unit = m_Unit; newitem->m_Convert = m_Convert; diff --git a/eeschema/class_sch_cmp_field.cpp b/eeschema/class_sch_cmp_field.cpp index 7697dedfdc..ad3347aa8b 100644 --- a/eeschema/class_sch_cmp_field.cpp +++ b/eeschema/class_sch_cmp_field.cpp @@ -198,14 +198,16 @@ bool SCH_CMP_FIELD::Save( FILE* aFile ) const else if( m_VJustify == GR_TEXT_VJUSTIFY_TOP ) vjustify = 'T'; - if( fprintf( aFile, "F %d \"%s\" %c %-3d %-3d %-3d %4.4X %c %c", + if( fprintf( aFile, "F %d \"%s\" %c %-3d %-3d %-3d %4.4X %c %c%c%c", m_FieldId, CONV_TO_UTF8( m_Text ), m_Orient == TEXT_ORIENT_HORIZ ? 'H' : 'V', m_Pos.x, m_Pos.y, m_Size.x, m_Attributs, - hjustify, vjustify ) == EOF ) + hjustify, vjustify, + m_Italic ? 'I' : 'N', + m_Width > 1 ? 'B' : 'N' ) == EOF ) { return false; } diff --git a/eeschema/classes_body_items.cpp b/eeschema/classes_body_items.cpp index 16d8ff0d08..06ba3b76f8 100644 --- a/eeschema/classes_body_items.cpp +++ b/eeschema/classes_body_items.cpp @@ -23,9 +23,7 @@ LibEDA_BaseStruct::LibEDA_BaseStruct( KICAD_T struct_type ) : * 0 if the item is common to all units */ m_Convert = 0; /* Shape identification (for parts which have a convert shape) * 0 if the item is common to all shapes */ - m_Width = 0; /* Default value to draw lines or arc ... */ - m_Fill = NO_FILL; /* NO_FILL, FILLED_SHAPE or FILLED_WITH_BG_BODYCOLOR. - * has meaning only for some items */ + m_Fill = NO_FILL; } @@ -159,12 +157,12 @@ void LibDrawText::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOff /* The text orientation may need to be flipped if the * transformation matrix causes xy axes to be flipped. */ - int t1 = (aTransformMatrix[0][0] != 0) ^ (m_Horiz != 0); + int t1 = (aTransformMatrix[0][0] != 0) ^ (m_Orient != 0); DrawGraphicText( aPanel, aDC, pos1, (EDA_Colors) color, m_Text, t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT, m_Size, - GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, linewidth ); + GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, linewidth, m_Italic ); } @@ -299,7 +297,7 @@ void LibDrawField::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOf int aDrawMode, void* aData, int aTransformMatrix[2][2] ) /*************************************************************************************************/ -/* if aData not NULL, adat must point a wxString which is used instead of the m_Text +/* if aData not NULL, aData must point a wxString which is used instead of the m_Text */ { wxPoint text_pos; @@ -340,7 +338,7 @@ void LibDrawField::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOf (EDA_Colors) color, text->GetData(), m_Orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ, m_Size, - m_HJustify, m_VJustify, linewidth ); + m_HJustify, m_VJustify, linewidth, m_Italic ); } diff --git a/eeschema/classes_body_items.h b/eeschema/classes_body_items.h index 0ca6c82343..da20c65b10 100644 --- a/eeschema/classes_body_items.h +++ b/eeschema/classes_body_items.h @@ -130,8 +130,6 @@ public: * 0 if the item is common to all units */ int m_Convert; /* Shape identification (for parts which have a convert shape) * 0 if the item is common to all shapes */ - wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point (segments) */ - int m_Width; /* Tickness */ FILL_T m_Fill; /* NO_FILL, FILLED_SHAPE or FILLED_WITH_BG_BODYCOLOR. has meaning only for some items */ public: @@ -189,6 +187,8 @@ public: int m_PinNumSize, m_PinNameSize; /* Pin num and Pin name sizes */ // int m_PinNumWidth, m_PinNameWidth; /* (Currently Unused) Pin num and Pin name text width */ + wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point (segments) */ + int m_Width; /* Tickness */ public: LibDrawPin(); @@ -246,6 +246,8 @@ public: int m_Rayon; int t1, t2; /* position des 2 extremites de l'arc en 0.1 degres */ wxPoint m_ArcStart, m_ArcEnd; /* position des 2 extremites de l'arc en coord reelles*/ + wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point (segments) */ + int m_Width; /* Tickness */ public: LibDrawArc(); @@ -278,6 +280,8 @@ class LibDrawCircle : public LibEDA_BaseStruct { public: int m_Rayon; + wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point (segments) */ + int m_Width; /* Tickness */ public: LibDrawCircle(); @@ -311,12 +315,8 @@ public: /* they are a separate class */ /*********************************************/ class LibDrawText : public LibEDA_BaseStruct + , public EDA_TextStruct { -public: - int m_Horiz; - wxSize m_Size; - int m_Type; - wxString m_Text; public: LibDrawText(); @@ -350,6 +350,8 @@ class LibDrawSquare : public LibEDA_BaseStruct { public: wxPoint m_End; + wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point (segments) */ + int m_Width; /* Tickness */ public: LibDrawSquare(); @@ -382,6 +384,8 @@ class LibDrawSegment : public LibEDA_BaseStruct { public: wxPoint m_End; + wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point (segments) */ + int m_Width; /* Tickness */ public: LibDrawSegment(); @@ -415,6 +419,7 @@ class LibDrawPolyline : public LibEDA_BaseStruct public: int m_CornersCount; int* m_PolyList; + int m_Width; /* Tickness */ public: LibDrawPolyline(); @@ -458,6 +463,7 @@ public: * Name (74LS00..) used to find the component in libraries, and give the default value in schematic */ class LibDrawField : public LibEDA_BaseStruct + , public EDA_TextStruct { public: int m_FieldId; /* 0 a 11 @@ -465,13 +471,7 @@ public: * 2 = Default footprint, 3 = subsheet (not used, reserved) * .. 11 other fields */ - wxSize m_Size; - int m_Orient; /* Orientation */ - int m_Attributs; /* Attributes (Non visible ...) */ - enum GRTextHorizJustifyType m_HJustify; /* Horizontal Text Justify */ - enum GRTextVertJustifyType m_VJustify; /* Vertical Text Justify */ - wxString m_Text; /* Field Data */ - wxString m_Name; /* Field Name */ + wxString m_Name; /* Field Name (not the fielsd text itself, that is .m_Text) */ public: diff --git a/eeschema/dialog_bodygraphictext_properties_base.cpp b/eeschema/dialog_bodygraphictext_properties_base.cpp new file mode 100644 index 0000000000..884d6769b9 --- /dev/null +++ b/eeschema/dialog_bodygraphictext_properties_base.cpp @@ -0,0 +1,94 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_bodygraphictext_properties_base.h" + +/////////////////////////////////////////////////////////////////////////// + +Dialog_BodyGraphicText_Properties_base::Dialog_BodyGraphicText_Properties_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bLeftSizer; + bLeftSizer = new wxBoxSizer( wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bLeftSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_TextValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_TextValue->SetMinSize( wxSize( 200,-1 ) ); + + bLeftSizer->Add( m_TextValue, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + wxStaticBoxSizer* sOptionsSizer; + sOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _(" Text Options : ") ), wxVERTICAL ); + + m_CommonUnit = new wxCheckBox( this, wxID_ANY, _("Common to Units"), wxDefaultPosition, wxDefaultSize, 0 ); + + sOptionsSizer->Add( m_CommonUnit, 0, wxALL, 5 ); + + m_CommonConvert = new wxCheckBox( this, wxID_ANY, _("Common to convert"), wxDefaultPosition, wxDefaultSize, 0 ); + + sOptionsSizer->Add( m_CommonConvert, 0, wxALL, 5 ); + + m_Orient = new wxCheckBox( this, wxID_ANY, _("Vertical"), wxDefaultPosition, wxDefaultSize, 0 ); + + sOptionsSizer->Add( m_Orient, 0, wxALL, 5 ); + + bLeftSizer->Add( sOptionsSizer, 0, 0, 5 ); + + bMainSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bRightSizer; + bRightSizer = new wxBoxSizer( wxVERTICAL ); + + m_TextSizeText = new wxStaticText( this, wxID_ANY, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_TextSizeText->Wrap( -1 ); + bRightSizer->Add( m_TextSizeText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_TextSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizer->Add( m_TextSize, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + wxString m_TextShapeOptChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") }; + int m_TextShapeOptNChoices = sizeof( m_TextShapeOptChoices ) / sizeof( wxString ); + m_TextShapeOpt = new wxRadioBox( this, wxID_ANY, _("Text Shape:"), wxDefaultPosition, wxDefaultSize, m_TextShapeOptNChoices, m_TextShapeOptChoices, 1, wxRA_SPECIFY_COLS ); + m_TextShapeOpt->SetSelection( 3 ); + bRightSizer->Add( m_TextShapeOpt, 0, wxALL|wxEXPAND, 5 ); + + bMainSizer->Add( bRightSizer, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxVERTICAL ); + + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_buttonOK, 0, wxALL, 5 ); + + m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_buttonCANCEL, 0, wxALL, 5 ); + + bMainSizer->Add( bSizer4, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( Dialog_BodyGraphicText_Properties_base::OnInitDialog ) ); + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Dialog_BodyGraphicText_Properties_base::OnOkClick ), NULL, this ); + m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Dialog_BodyGraphicText_Properties_base::OnCancelClick ), NULL, this ); +} + +Dialog_BodyGraphicText_Properties_base::~Dialog_BodyGraphicText_Properties_base() +{ + // Disconnect Events + this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( Dialog_BodyGraphicText_Properties_base::OnInitDialog ) ); + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Dialog_BodyGraphicText_Properties_base::OnOkClick ), NULL, this ); + m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( Dialog_BodyGraphicText_Properties_base::OnCancelClick ), NULL, this ); +} diff --git a/eeschema/dialog_bodygraphictext_properties_base.fbp b/eeschema/dialog_bodygraphictext_properties_base.fbp new file mode 100644 index 0000000000..044e8231bc --- /dev/null +++ b/eeschema/dialog_bodygraphictext_properties_base.fbp @@ -0,0 +1,654 @@ + + + + + + C++ + 1 + UTF-8 + connect + dialog_bodygraphictext_properties_base + 1000 + none + 1 + Dialog_BodyGraphicText_Properties_base + + . + + 1 + 1 + 0 + + + + + 1 + + + + 0 + wxID_ANY + + + Dialog_BodyGraphicText_Properties_base + + 360,180 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Graphic text properties: + + + + + + + + + + + + + + OnInitDialog + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bLeftSizer + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Text: + + + m_staticText1 + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + 200,-1 + m_TextValue + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + wxID_ANY + Text Options : + + sOptionsSizer + wxVERTICAL + none + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Common to Units + + + m_CommonUnit + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Common to convert + + + m_CommonConvert + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Vertical + + + m_Orient + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bRightSizer + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + Size: + + + m_TextSizeText + protected + + + + + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_TextSize + protected + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Normal" "Italic" "Bold" "Bold Italic" + + 1 + + + 0 + wxID_ANY + Text Shape: + 1 + + + m_TextShapeOpt + protected + + 3 + + wxRA_SPECIFY_COLS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + bSizer4 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_OK + OK + + + m_buttonOK + protected + + + + + + + + + OnOkClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 0 + 1 + + + 0 + wxID_CANCEL + Cancel + + + m_buttonCANCEL + protected + + + + + + + + + OnCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eeschema/dialog_bodygraphictext_properties_base.h b/eeschema/dialog_bodygraphictext_properties_base.h new file mode 100644 index 0000000000..286431aeab --- /dev/null +++ b/eeschema/dialog_bodygraphictext_properties_base.h @@ -0,0 +1,60 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 16 2008) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_bodygraphictext_properties_base__ +#define __dialog_bodygraphictext_properties_base__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class Dialog_BodyGraphicText_Properties_base +/////////////////////////////////////////////////////////////////////////////// +class Dialog_BodyGraphicText_Properties_base : public wxDialog +{ + private: + + protected: + wxStaticText* m_staticText1; + wxTextCtrl* m_TextValue; + wxCheckBox* m_CommonUnit; + wxCheckBox* m_CommonConvert; + wxCheckBox* m_Orient; + wxStaticText* m_TextSizeText; + wxTextCtrl* m_TextSize; + wxRadioBox* m_TextShapeOpt; + wxButton* m_buttonOK; + wxButton* m_buttonCANCEL; + + // Virtual event handlers, overide them in your derived class + virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } + + + public: + Dialog_BodyGraphicText_Properties_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Graphic text properties:"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 360,180 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~Dialog_BodyGraphicText_Properties_base(); + +}; + +#endif //__dialog_bodygraphictext_properties_base__ diff --git a/eeschema/dialog_edit_component_in_schematic.cpp b/eeschema/dialog_edit_component_in_schematic.cpp index cec4d8c458..21a956e9da 100644 --- a/eeschema/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialog_edit_component_in_schematic.cpp @@ -435,6 +435,13 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT ); + int style = 0; + if ( field.m_Italic ) + style = 1; + if ( field.m_Width > 1 ) + style |= 2; + m_StyleRadioBox->SetSelection(style); + fieldNameTextCtrl->SetValue( field.m_Name ); // if fieldNdx == REFERENCE, VALUE, FOOTPRINT, or DATASHEET, then disable editing @@ -499,6 +506,7 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField() rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT ); + field.m_Name = fieldNameTextCtrl->GetValue(); field.m_Text = fieldValueTextCtrl->GetValue(); @@ -507,6 +515,17 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField() field.m_Size.x = WinEDA_GraphicTextCtrl::ParseSize( textSizeTextCtrl->GetValue(), EESCHEMA_INTERNAL_UNIT, g_UnitMetric ); field.m_Size.y = field.m_Size.x; + int style = m_StyleRadioBox->GetSelection( ); + if ( (style & 1 ) != 0 ) + field.m_Italic = true; + else + field.m_Italic = false; + + if ( (style & 2 ) != 0 ) + field.m_Width = field.m_Size.x / 4; + else + field.m_Width = 0; + double value; posXTextCtrl->GetValue().ToDouble( &value ); diff --git a/eeschema/dialog_edit_component_in_schematic.fbp b/eeschema/dialog_edit_component_in_schematic.fbp index 2f7a9ba0a2..8eb57011e8 100644 --- a/eeschema/dialog_edit_component_in_schematic.fbp +++ b/eeschema/dialog_edit_component_in_schematic.fbp @@ -727,9 +727,9 @@ none 5 - wxALL|wxEXPAND + wxEXPAND 0 - + wxID_ANY Visibility @@ -739,84 +739,148 @@ 5 - wxALL + wxALIGN_CENTER_VERTICAL 1 - - - 0 - - 1 - - - 0 - wxID_ANY - Show - + - showCheckBox - protected - - - - - Check if you want this field visible - - - - - - - - - - - - - - - - - - - - - - - - - - - + bShowRotateSizer + wxVERTICAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Show + + + showCheckBox + protected + + + + + Check if you want this field visible + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Rotate + + + rotateCheckBox + protected + + + + + Check if you want this field's text rotated 90 degrees + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 - wxALL + wxBOTTOM|wxRIGHT|wxLEFT 1 - + - 0 + "Normal" "Italic" "Bold" "Bold Italic" 1 0 wxID_ANY - Rotate + Style: + 1 - rotateCheckBox + m_StyleRadioBox protected + 0 - + wxRA_SPECIFY_COLS - Check if you want this field's text rotated 90 degrees + - @@ -833,6 +897,7 @@ + diff --git a/eeschema/dialog_edit_component_in_schematic_fbp.cpp b/eeschema/dialog_edit_component_in_schematic_fbp.cpp index 91680e2640..6ce3757016 100644 --- a/eeschema/dialog_edit_component_in_schematic_fbp.cpp +++ b/eeschema/dialog_edit_component_in_schematic_fbp.cpp @@ -114,19 +114,30 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxStaticBoxSizer* visibilitySizer; visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL ); + wxBoxSizer* bShowRotateSizer; + bShowRotateSizer = new wxBoxSizer( wxVERTICAL ); + showCheckBox = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); showCheckBox->SetToolTip( _("Check if you want this field visible") ); - visibilitySizer->Add( showCheckBox, 1, wxALL, 5 ); + bShowRotateSizer->Add( showCheckBox, 0, wxALL, 5 ); rotateCheckBox = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 ); rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") ); - visibilitySizer->Add( rotateCheckBox, 1, wxALL, 5 ); + bShowRotateSizer->Add( rotateCheckBox, 0, wxALL, 5 ); - fieldEditBoxSizer->Add( visibilitySizer, 0, wxALL|wxEXPAND, 5 ); + visibilitySizer->Add( bShowRotateSizer, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_StyleRadioBoxChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") }; + int m_StyleRadioBoxNChoices = sizeof( m_StyleRadioBoxChoices ) / sizeof( wxString ); + m_StyleRadioBox = new wxRadioBox( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, m_StyleRadioBoxNChoices, m_StyleRadioBoxChoices, 1, wxRA_SPECIFY_COLS ); + m_StyleRadioBox->SetSelection( 0 ); + visibilitySizer->Add( m_StyleRadioBox, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + fieldEditBoxSizer->Add( visibilitySizer, 0, wxEXPAND, 5 ); wxBoxSizer* fieldNameBoxSizer; fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); diff --git a/eeschema/dialog_edit_component_in_schematic_fbp.h b/eeschema/dialog_edit_component_in_schematic_fbp.h index f9fe5979e9..67c0b403b4 100644 --- a/eeschema/dialog_edit_component_in_schematic_fbp.h +++ b/eeschema/dialog_edit_component_in_schematic_fbp.h @@ -49,6 +49,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog wxButton* moveUpButton; wxCheckBox* showCheckBox; wxCheckBox* rotateCheckBox; + wxRadioBox* m_StyleRadioBox; wxStaticText* fieldNameLabel; wxTextCtrl* fieldNameTextCtrl; wxStaticText* fieldValueLabel; diff --git a/eeschema/edit_graphic_bodyitem_text.cpp b/eeschema/edit_graphic_bodyitem_text.cpp new file mode 100644 index 0000000000..3c8db481fa --- /dev/null +++ b/eeschema/edit_graphic_bodyitem_text.cpp @@ -0,0 +1,205 @@ + /**********************************************/ + /* EESchema - symbtext.cpp for Library Editor */ + /**********************************************/ + +/* Menu et routines de creation, modification, suppression de textes + du type symbole + (textes autres que Fields) +*/ + +#include "fctsys.h" + +#include "common.h" +#include "program.h" +#include "libcmp.h" +#include "general.h" + +#include "dialog_bodygraphictext_properties_base.h" + +#include "protos.h" + + +class Dialog_BodyGraphicText_Properties : public Dialog_BodyGraphicText_Properties_base +{ +private: + WinEDA_LibeditFrame * m_Parent; + LibDrawText * m_GraphicText; + +public: + Dialog_BodyGraphicText_Properties( WinEDA_LibeditFrame* aParent, LibDrawText * aGraphicText); + ~Dialog_BodyGraphicText_Properties() {}; + +private: + void OnInitDialog( wxInitDialogEvent& event ); + void OnOkClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); +}; + + +Dialog_BodyGraphicText_Properties::Dialog_BodyGraphicText_Properties( WinEDA_LibeditFrame* aParent, LibDrawText * aGraphicText) : + Dialog_BodyGraphicText_Properties_base(aParent) +{ + m_Parent = aParent; + m_GraphicText = aGraphicText; +} + + +/********************************************************************************/ +void Dialog_BodyGraphicText_Properties::OnInitDialog( wxInitDialogEvent& event ) +/********************************************************************************/ +{ +wxString msg; + + SetFocus(); + + if ( m_GraphicText ) + { + msg = ReturnStringFromValue(g_UnitMetric, m_GraphicText->m_Size.x, m_Parent->m_InternalUnits); + m_TextSize->SetValue(msg); + m_TextValue->SetValue(m_GraphicText->m_Text); + if ( m_GraphicText->m_Unit == 0 ) m_CommonUnit->SetValue(TRUE); + if ( m_GraphicText->m_Convert == 0 ) m_CommonConvert->SetValue(TRUE); + if ( m_GraphicText->m_Orient == TEXT_ORIENT_VERT ) m_Orient->SetValue(TRUE); + int shape = 0; + if ( m_GraphicText->m_Italic) + shape = 1; + if ( m_GraphicText->m_Width > 1) + shape |= 2; + + m_TextShapeOpt->SetSelection(shape); + } + else + { + msg = ReturnStringFromValue(g_UnitMetric, g_LastTextSize, m_Parent->m_InternalUnits); + m_TextSize->SetValue(msg); + if ( ! g_FlDrawSpecificUnit ) m_CommonUnit->SetValue(TRUE); + if ( ! g_FlDrawSpecificConvert ) m_CommonConvert->SetValue(TRUE); + if ( g_LastTextOrient == TEXT_ORIENT_VERT ) m_Orient->SetValue(TRUE); + } + + msg = m_TextSizeText->GetLabel() + ReturnUnitSymbol(); + m_TextSizeText->SetLabel(msg); + if (GetSizer()) + { + GetSizer()->SetSizeHints(this); + } +} + + +void Dialog_BodyGraphicText_Properties::OnCancelClick( wxCommandEvent& event ) +{ + event.Skip(); +} + + +/***************************************************************************/ +void Dialog_BodyGraphicText_Properties::OnOkClick( wxCommandEvent& event ) +/***************************************************************************/ +/* Met a jour les differents parametres pour le composant en cours d'edition +*/ +{ +wxString Line; + + Line = m_TextValue->GetValue(); + g_LastTextOrient = m_Orient->GetValue() ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ; + wxString msg = m_TextSize->GetValue(); + g_LastTextSize = ReturnValueFromString(g_UnitMetric, msg, m_Parent->m_InternalUnits); + g_FlDrawSpecificConvert = m_CommonConvert->GetValue() ? FALSE : TRUE; + g_FlDrawSpecificUnit = m_CommonUnit->GetValue() ? FALSE : TRUE; + + if ( m_GraphicText ) + { + if ( ! Line.IsEmpty() ) m_GraphicText->m_Text = Line; + else m_GraphicText->m_Text = wxT("[null]"); + m_GraphicText->m_Size.x = m_GraphicText->m_Size.y = g_LastTextSize; + m_GraphicText->m_Orient = g_LastTextOrient; + if( g_FlDrawSpecificUnit ) m_GraphicText->m_Unit = CurrentUnit; + else m_GraphicText->m_Unit = 0; + if( g_FlDrawSpecificConvert ) m_GraphicText->m_Convert = CurrentConvert; + else m_GraphicText->m_Convert = 0; + + if ( (m_TextShapeOpt->GetSelection() & 1 ) != 0 ) + m_GraphicText->m_Italic = true; + else + m_GraphicText->m_Italic = false; + + if ( (m_TextShapeOpt->GetSelection() & 2 ) != 0 ) + m_GraphicText->m_Width = m_GraphicText->m_Size.x / 4; + else + m_GraphicText->m_Width = 0; + + } + Close(); + + if ( CurrentDrawItem ) + CurrentDrawItem->Display_Infos_DrawEntry(m_Parent); + Close(); +} + + + +/*******************************************************/ +void WinEDA_LibeditFrame::EditSymbolText(wxDC * DC, + LibEDA_BaseStruct * DrawItem) +/*******************************************************/ +{ +int DrawMode = g_XorMode; + + if ( DrawItem == NULL ) return; + if ( DrawItem->Type() != COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ) return; + + /* Effacement ancien texte */ + if( ((LibDrawText*)DrawItem)->m_Text && DC) + DrawLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry, wxPoint(0, 0), + DrawItem, DrawMode); + + + Dialog_BodyGraphicText_Properties * frame = + new Dialog_BodyGraphicText_Properties(this, (LibDrawText *) DrawItem); + frame->ShowModal(); frame->Destroy(); + + GetScreen()->SetModify(); + + /* Affichage nouveau texte */ + if( ((LibDrawText*)DrawItem)->m_Text && DC) + { + if ( (DrawItem->m_Flags & IS_MOVED) == 0 ) + DrawMode = GR_DEFAULT_DRAWMODE; + DrawLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry, wxPoint(0, 0), + DrawItem, DrawMode); + } +} + + +/****************************************************/ +void WinEDA_LibeditFrame::RotateSymbolText(wxDC * DC) +/****************************************************/ +/* + 90 deg Graphic text Rotation . +*/ +{ +LibDrawText * DrawItem = (LibDrawText *) CurrentDrawItem; + + if(DrawItem == NULL) return; + + /* Erase drawing (can be within a move command) */ + if ( DrawPanel->ManageCurseur == NULL) + DrawLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry, wxPoint(0, 0), + DrawItem, g_XorMode); + else DrawPanel->ManageCurseur(DrawPanel, DC, FALSE); + + if( DrawItem->m_Orient == TEXT_ORIENT_HORIZ) + DrawItem->m_Orient = TEXT_ORIENT_VERT; + else DrawItem->m_Orient = TEXT_ORIENT_HORIZ; + + GetScreen()->SetModify(); + + /* Redraw item with new orient */ + if ( DrawPanel->ManageCurseur == NULL) + DrawLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry, wxPoint(0, 0), + DrawItem, GR_DEFAULT_DRAWMODE); + else DrawPanel->ManageCurseur(DrawPanel, DC, FALSE); + +} + + diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp index 7b1d008f54..9cd06ee6a0 100644 --- a/eeschema/edit_label.cpp +++ b/eeschema/edit_label.cpp @@ -59,7 +59,7 @@ void DialogLabelEditor::TextPropertiesAccept( wxCommandEvent& event ) m_CurrentText->m_Italic = 0; if ( ( style & 2 ) ) - m_CurrentText->m_Width = m_CurrentText->m_Size.x / 5; + m_CurrentText->m_Width = m_CurrentText->m_Size.x / 4; else m_CurrentText->m_Width = 0; diff --git a/eeschema/eelibs_draw_components.cpp b/eeschema/eelibs_draw_components.cpp index cb9083c411..e1dd7ec874 100644 --- a/eeschema/eelibs_draw_components.cpp +++ b/eeschema/eelibs_draw_components.cpp @@ -350,7 +350,7 @@ void SCH_CMP_FIELD::Draw( WinEDA_DrawPanel* panel, DrawGraphicText( panel, DC, pos, color, m_Text, orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ, m_Size, - hjustify, vjustify, LineWidth ); + hjustify, vjustify, LineWidth, m_Italic ); } else // For more than one part per package, we must add the part selection to the reference ) { @@ -366,7 +366,7 @@ void SCH_CMP_FIELD::Draw( WinEDA_DrawPanel* panel, DrawGraphicText( panel, DC, pos, color, fulltext, orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ, m_Size, - hjustify, vjustify, LineWidth ); + hjustify, vjustify, LineWidth, m_Italic ); } } diff --git a/eeschema/eelibs_read_libraryfiles.cpp b/eeschema/eelibs_read_libraryfiles.cpp index c95e15657a..79446a4f10 100644 --- a/eeschema/eelibs_read_libraryfiles.cpp +++ b/eeschema/eelibs_read_libraryfiles.cpp @@ -610,14 +610,21 @@ LibEDA_BaseStruct* GetDrawEntry (WinEDA_DrawFrame* frame, New = Text; Buffer[0] = 0; - Error = sscanf( &Line[2], "%d %d %d %d %d %d %d %s", - &Text->m_Horiz, + chartmp[0] = 0; // For italic option, Not in old versions + int thickness = 0; // Not in old versions + Error = sscanf( &Line[2], "%d %d %d %d %d %d %d %s %s %d", + &Text->m_Orient, &Text->m_Pos.x, &Text->m_Pos.y, - &Text->m_Size.x, &Text->m_Type, - &Unit, &Convert, Buffer ) != 8; + &Text->m_Size.x, &Text->m_Attributs, + &Unit, &Convert, Buffer, chartmp, &thickness ) < 8; Text->m_Unit = Unit; Text->m_Convert = Convert; Text->m_Size.y = Text->m_Size.x; + if ( strnicmp(chartmp, "Italic", 6) == 0 ) + Text->m_Italic = true; + + Text->m_Width = thickness; + if( !Error ) { /* Convert '~' to spaces. */ Text->m_Text = CONV_FROM_UTF8( Buffer ); @@ -909,8 +916,8 @@ GetLibEntryField (EDA_LibComponentStruct* LibEntry, line++; FieldUserName[0] = 0; - - nbparam = sscanf( line, " %d %d %d %c %c %c %c", + memset( Char4, 0, sizeof(Char4)); + nbparam = sscanf( line, " %d %d %d %c %c %c %s", &posx, &posy, &size, Char1, Char2, Char3, Char4 ); orient = TEXT_ORIENT_HORIZ; @@ -928,10 +935,15 @@ GetLibEntryField (EDA_LibComponentStruct* LibEntry, hjustify = GR_TEXT_HJUSTIFY_LEFT; else if( *Char3 == 'R' ) hjustify = GR_TEXT_HJUSTIFY_RIGHT; - if( *Char4 == 'B' ) + if( Char4[0] == 'B' ) vjustify = GR_TEXT_VJUSTIFY_BOTTOM; - else if( *Char4 == 'T' ) + else if( Char4[0] == 'T' ) vjustify = GR_TEXT_VJUSTIFY_TOP; + + if ( Char4[1] == 'I' ) // Italic + Field->m_Italic = true; + if ( Char4[2] == 'B' ) // Bold + Field->m_Width = size / 4; } switch( NumOfField ) diff --git a/eeschema/locate.cpp b/eeschema/locate.cpp index 7e392be1bf..a4470d48a4 100644 --- a/eeschema/locate.cpp +++ b/eeschema/locate.cpp @@ -913,7 +913,7 @@ LibEDA_BaseStruct* LocateDrawItem( SCH_SCREEN* Screen, ii = 2; dx = (Text->m_Size.x * ii) / 2; dy = Text->m_Size.y / 2; - if( Text->m_Horiz == TEXT_ORIENT_VERT ) + if( Text->m_Orient == TEXT_ORIENT_VERT ) { EXCHG( dx, dy ); } diff --git a/eeschema/makefile.include b/eeschema/makefile.include index 7b2db517d9..24d2246bad 100644 --- a/eeschema/makefile.include +++ b/eeschema/makefile.include @@ -56,6 +56,7 @@ OBJECTS = eeschema.o\ edit_component_in_schematic.o\ dialog_edit_component_in_schematic_fbp.o \ dialog_edit_component_in_schematic.o \ + dialog_bodygraphictext_properties_base.o\ locate.o \ save_schemas.o sheet.o \ read_from_file_schematic_items_descriptions.o\ @@ -67,7 +68,8 @@ OBJECTS = eeschema.o\ libfield.o \ edit_component_in_lib.o \ menubar.o \ - savelib.o symbtext.o \ + savelib.o\ + edit_graphic_bodyitem_text.o \ symbdraw.o \ hierarch.o files-io.o \ annotate.o\ diff --git a/eeschema/plot.cpp b/eeschema/plot.cpp index 9ac6b611bb..eada8981c5 100644 --- a/eeschema/plot.cpp +++ b/eeschema/plot.cpp @@ -249,7 +249,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem ) /* The text orientation may need to be flipped if the * transformation matrix causes xy axes to be flipped. */ - t1 = (TransMat[0][0] != 0) ^ (Text->m_Horiz != 0); + t1 = (TransMat[0][0] != 0) ^ (Text->m_Orient != 0); pos = TransformCoordinate( TransMat, Text->m_Pos ) + DrawLibItem->m_Pos; SetCurrentLineWidth( -1 ); int thickness = Text->m_Width; diff --git a/eeschema/read_from_file_schematic_items_descriptions.cpp b/eeschema/read_from_file_schematic_items_descriptions.cpp index 2b7a4096d3..7473f4db8b 100644 --- a/eeschema/read_from_file_schematic_items_descriptions.cpp +++ b/eeschema/read_from_file_schematic_items_descriptions.cpp @@ -695,8 +695,8 @@ int ReadPartDescr( wxWindow* frame, char* Line, FILE* f, { int newNdx = component->GetFieldCount(); - SCH_CMP_FIELD f( wxPoint( 0, 0 ), newNdx, component, fieldName ); - component->AddField( f ); + SCH_CMP_FIELD field( wxPoint( 0, 0 ), newNdx, component, fieldName ); + component->AddField( field ); } } else @@ -705,7 +705,7 @@ int ReadPartDescr( wxWindow* frame, char* Line, FILE* f, } component->GetField( fieldNdx )->m_Text = CONV_FROM_UTF8( Name1 ); - + memset(Char3, 0, sizeof(Char3) ); if( ( ii = sscanf( ptcar, "%s %d %d %d %X %s %s", Char1, &component->GetField( fieldNdx )->m_Pos.x, &component->GetField( fieldNdx )->m_Pos.y, @@ -735,10 +735,18 @@ int ReadPartDescr( wxWindow* frame, char* Line, FILE* f, hjustify = GR_TEXT_HJUSTIFY_LEFT; else if( *Char2 == 'R' ) hjustify = GR_TEXT_HJUSTIFY_RIGHT; - if( *Char3 == 'B' ) + if( Char3[0] == 'B' ) vjustify = GR_TEXT_VJUSTIFY_BOTTOM; - else if( *Char3 == 'T' ) + else if( Char3[0] == 'T' ) vjustify = GR_TEXT_VJUSTIFY_TOP; + if( Char3[1] == 'I' ) + component->GetField( fieldNdx )->m_Italic = true; + else + component->GetField( fieldNdx )->m_Italic = false; + if( Char3[2] == 'B' ) + component->GetField( fieldNdx )->m_Width = component->GetField( fieldNdx )->m_Size.x / 4; + else + component->GetField( fieldNdx )->m_Width = 0; component->GetField( fieldNdx )->m_HJustify = hjustify; component->GetField( fieldNdx )->m_VJustify = vjustify; diff --git a/eeschema/savelib.cpp b/eeschema/savelib.cpp index 90bfa76897..4d2b16fb12 100644 --- a/eeschema/savelib.cpp +++ b/eeschema/savelib.cpp @@ -68,15 +68,19 @@ bool LibDrawText::Save( FILE* ExportFile ) const /************************************************/ { wxString text = m_Text; + // Spaces are not allowed in text because it is not double quoted: changed to '~' + text.Replace( wxT( " " ), wxT( "~" ) ); - text.Replace( wxT( " " ), wxT( "~" ) ); // Spaces are not allowed: changed to '~' - - fprintf( ExportFile, "T %d %d %d %d %d %d %d %s\n", - m_Horiz, + fprintf( ExportFile, "T %d %d %d %d %d %d %d %s ", + m_Orient, m_Pos.x, m_Pos.y, - m_Size.x, m_Type, + m_Size.x, m_Attributs, m_Unit, m_Convert, - CONV_TO_UTF8( text ) ); + CONV_TO_UTF8( text )); + + fprintf( ExportFile, " %s %d", m_Italic ? "Italic" : "Normal", m_Width ); + + fprintf( ExportFile, "\n"); return true; } @@ -200,13 +204,15 @@ bool LibDrawField::Save( FILE* ExportFile ) const vjustify = 'T'; if( text.IsEmpty() ) text = wxT( "~" ); - fprintf( ExportFile, "F%d \"%s\" %d %d %d %c %c %c %c", + fprintf( ExportFile, "F%d \"%s\" %d %d %d %c %c %c %c%c%c", m_FieldId, CONV_TO_UTF8( text ), m_Pos.x, m_Pos.y, m_Size.x, m_Orient == 0 ? 'H' : 'V', (m_Attributs & TEXT_NO_VISIBLE ) ? 'I' : 'V', - hjustify, vjustify ); + hjustify, vjustify, + m_Italic ? 'I' : 'N', + m_Width > 1 ? 'B' : 'N'); // Save field name, if necessary if( m_FieldId >= FIELD1 && !m_Name.IsEmpty() ) @@ -222,7 +228,8 @@ LibEDA_BaseStruct* CopyDrawEntryStruct( wxWindow* frame, LibEDA_BaseStruct* DrawItem ) /**********************************************************/ -/* Duplicate a DrawLibItem +/** Function CopyDrawEntryStruct + * Duplicate a DrawLibItem * the new item is only created, it is not put in the current component linked list * @param DrawEntry = DrawLibItem * item to duplicate * @return a pointer to the new item diff --git a/eeschema/symbdraw.cpp b/eeschema/symbdraw.cpp index 454f2b81a6..04d0b5bd01 100644 --- a/eeschema/symbdraw.cpp +++ b/eeschema/symbdraw.cpp @@ -304,7 +304,7 @@ LibEDA_BaseStruct* WinEDA_LibeditFrame::CreateGraphicItem( wxDC* DC ) CurrentDrawItem = Text; Text->m_Size.x = Text->m_Size.y = g_LastTextSize; - Text->m_Horiz = g_LastTextOrient; + Text->m_Orient = g_LastTextOrient; Text->m_Pos.x = GetScreen()->m_Curseur.x; Text->m_Pos.y = -( GetScreen()->m_Curseur.y ); EditSymbolText( NULL, Text ); diff --git a/eeschema/symbtext.cpp b/eeschema/symbtext.cpp deleted file mode 100644 index 966f63bae8..0000000000 --- a/eeschema/symbtext.cpp +++ /dev/null @@ -1,346 +0,0 @@ - /**********************************************/ - /* EESchema - symbtext.cpp for Library Editor */ - /**********************************************/ - -/* Menu et routines de creation, modification, suppression de textes - du type symbole - (textes autres que Fields) -*/ - -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "symbtext.h" -#endif - -#include "fctsys.h" -#include "gr_basic.h" - -#include "common.h" -#include "program.h" -#include "libcmp.h" -#include "general.h" - -#include "symbtext.h" - -#include "protos.h" - - - -/*! - * WinEDA_bodytext_PropertiesFrame type definition - */ - -IMPLEMENT_DYNAMIC_CLASS( WinEDA_bodytext_PropertiesFrame, wxDialog ) - -/*! - * WinEDA_bodytext_PropertiesFrame event table definition - */ - -BEGIN_EVENT_TABLE( WinEDA_bodytext_PropertiesFrame, wxDialog ) - -////@begin WinEDA_bodytext_PropertiesFrame event table entries - EVT_BUTTON( wxID_OK, WinEDA_bodytext_PropertiesFrame::OnOkClick ) - - EVT_BUTTON( wxID_CANCEL, WinEDA_bodytext_PropertiesFrame::OnCancelClick ) - -////@end WinEDA_bodytext_PropertiesFrame event table entries - -END_EVENT_TABLE() - -/*! - * WinEDA_bodytext_PropertiesFrame constructors - */ - -WinEDA_bodytext_PropertiesFrame::WinEDA_bodytext_PropertiesFrame( ) -{ -} - -WinEDA_bodytext_PropertiesFrame::WinEDA_bodytext_PropertiesFrame( WinEDA_LibeditFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) -{ -LibDrawText * CurrentText = (LibDrawText *) CurrentDrawItem; -wxString msg; - - m_Parent = parent; - Create(parent, id, caption, pos, size, style); - - if ( CurrentText ) - { - msg = ReturnStringFromValue(g_UnitMetric, CurrentText->m_Size.x, m_Parent->m_InternalUnits); - m_Size->SetValue(msg); - m_NewText->SetValue(CurrentText->m_Text); - if ( CurrentText->m_Unit == 0 ) m_CommonUnit->SetValue(TRUE); - if ( CurrentText->m_Convert == 0 ) m_CommonConvert->SetValue(TRUE); - if ( CurrentText->m_Horiz == TEXT_ORIENT_VERT ) m_Orient->SetValue(TRUE); - } - else - { - msg = ReturnStringFromValue(g_UnitMetric, g_LastTextSize, m_Parent->m_InternalUnits); - m_Size->SetValue(msg); - if ( ! g_FlDrawSpecificUnit ) m_CommonUnit->SetValue(TRUE); - if ( ! g_FlDrawSpecificConvert ) m_CommonConvert->SetValue(TRUE); - if ( g_LastTextOrient == TEXT_ORIENT_VERT ) m_Orient->SetValue(TRUE); - } - - msg = m_SizeText->GetLabel() + ReturnUnitSymbol(); - m_SizeText->SetLabel(msg); -} - -/*! - * WinEDA_bodytext_PropertiesFrame creator - */ - -bool WinEDA_bodytext_PropertiesFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) -{ -////@begin WinEDA_bodytext_PropertiesFrame member initialisation - m_NewText = NULL; - m_SizeText = NULL; - m_Size = NULL; - m_CommonUnit = NULL; - m_CommonConvert = NULL; - m_Orient = NULL; - m_btClose = NULL; -////@end WinEDA_bodytext_PropertiesFrame member initialisation - -////@begin WinEDA_bodytext_PropertiesFrame creation - SetExtraStyle(wxWS_EX_BLOCK_EVENTS); - wxDialog::Create( parent, id, caption, pos, size, style ); - - CreateControls(); - if (GetSizer()) - { - GetSizer()->SetSizeHints(this); - } - Centre(); -////@end WinEDA_bodytext_PropertiesFrame creation - return true; -} - -/*! - * Control creation for WinEDA_bodytext_PropertiesFrame - */ - -void WinEDA_bodytext_PropertiesFrame::CreateControls() -{ - SetFont(*g_DialogFont); - -////@begin WinEDA_bodytext_PropertiesFrame content construction - // Generated by DialogBlocks, 29/04/2008 21:08:05 (unregistered) - - WinEDA_bodytext_PropertiesFrame* itemDialog1 = this; - - wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL); - itemDialog1->SetSizer(itemBoxSizer2); - - wxStaticBox* itemStaticBoxSizer3Static = new wxStaticBox(itemDialog1, wxID_ANY, _(" Text : ")); - wxStaticBoxSizer* itemStaticBoxSizer3 = new wxStaticBoxSizer(itemStaticBoxSizer3Static, wxVERTICAL); - itemBoxSizer2->Add(itemStaticBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL); - itemStaticBoxSizer3->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - - wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer4->Add(itemBoxSizer5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxStaticText* itemStaticText6 = new wxStaticText( itemDialog1, wxID_STATIC, _("Component name:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer5->Add(itemStaticText6, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); - - m_NewText = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxSize(250, -1), 0 ); - itemBoxSizer5->Add(m_NewText, 0, wxALIGN_LEFT|wxALL, 5); - - wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer4->Add(itemBoxSizer8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - m_SizeText = new wxStaticText( itemDialog1, wxID_STATIC, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer8->Add(m_SizeText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5); - - m_Size = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer8->Add(m_Size, 0, wxALIGN_LEFT|wxALL, 5); - - wxStaticBox* itemStaticBoxSizer11Static = new wxStaticBox(itemDialog1, wxID_ANY, _(" Text Options : ")); - wxStaticBoxSizer* itemStaticBoxSizer11 = new wxStaticBoxSizer(itemStaticBoxSizer11Static, wxVERTICAL); - itemStaticBoxSizer3->Add(itemStaticBoxSizer11, 0, wxALIGN_LEFT|wxALL, 5); - - m_CommonUnit = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Common to Units"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - m_CommonUnit->SetValue(false); - itemStaticBoxSizer11->Add(m_CommonUnit, 0, wxALIGN_LEFT|wxALL, 5); - - m_CommonConvert = new wxCheckBox( itemDialog1, ID_CHECKBOX1, _("Common to convert"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - m_CommonConvert->SetValue(false); - itemStaticBoxSizer11->Add(m_CommonConvert, 0, wxALIGN_LEFT|wxALL, 5); - - m_Orient = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _("Vertical"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); - m_Orient->SetValue(false); - itemStaticBoxSizer11->Add(m_Orient, 0, wxALIGN_LEFT|wxALL, 5); - - wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); - itemBoxSizer2->Add(itemBoxSizer15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); - - wxButton* itemButton16 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); - itemButton16->SetDefault(); - itemButton16->SetForegroundColour(wxColour(206, 0, 0)); - itemBoxSizer15->Add(itemButton16, 0, wxGROW|wxALL, 5); - - m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - m_btClose->SetForegroundColour(wxColour(0, 0, 255)); - itemBoxSizer15->Add(m_btClose, 0, wxGROW|wxALL, 5); - -////@end WinEDA_bodytext_PropertiesFrame content construction - m_btClose->SetFocus(); -} - -/*! - * Should we show tooltips? - */ - -bool WinEDA_bodytext_PropertiesFrame::ShowToolTips() -{ - return true; -} - -/*! - * Get bitmap resources - */ - -wxBitmap WinEDA_bodytext_PropertiesFrame::GetBitmapResource( const wxString& name ) -{ - // Bitmap retrieval -////@begin WinEDA_bodytext_PropertiesFrame bitmap retrieval - wxUnusedVar(name); - return wxNullBitmap; -////@end WinEDA_bodytext_PropertiesFrame bitmap retrieval -} - -/*! - * Get icon resources - */ - -wxIcon WinEDA_bodytext_PropertiesFrame::GetIconResource( const wxString& name ) -{ - // Icon retrieval -////@begin WinEDA_bodytext_PropertiesFrame icon retrieval - wxUnusedVar(name); - return wxNullIcon; -////@end WinEDA_bodytext_PropertiesFrame icon retrieval -} -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK - */ - -void WinEDA_bodytext_PropertiesFrame::OnOkClick( wxCommandEvent& event ) -{ - bodytext_PropertiesAccept(event); - Close(); -} - -/*! - * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL - */ - -void WinEDA_bodytext_PropertiesFrame::OnCancelClick( wxCommandEvent& event ) -{ -////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_bodytext_PropertiesFrame. - // Before editing this code, remove the block markers. - event.Skip(); -////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_bodytext_PropertiesFrame. -} - - -/***************************************************************************/ -void WinEDA_bodytext_PropertiesFrame::bodytext_PropertiesAccept(wxCommandEvent& event) -/***************************************************************************/ -/* Met a jour les differents parametres pour le composant en cours d'edition -*/ -{ -LibDrawText* Text = (LibDrawText*) CurrentDrawItem; -wxString Line; - - Line = m_NewText->GetValue(); - g_LastTextOrient = m_Orient->GetValue() ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ; - wxString msg = m_Size->GetValue(); - g_LastTextSize = ReturnValueFromString(g_UnitMetric, msg, m_Parent->m_InternalUnits); - g_FlDrawSpecificConvert = m_CommonConvert->GetValue() ? FALSE : TRUE; - g_FlDrawSpecificUnit = m_CommonUnit->GetValue() ? FALSE : TRUE; - - if ( Text ) // Set Pin Name & Num - { - if ( ! Line.IsEmpty() ) Text->m_Text = Line; - else Text->m_Text = wxT("[null]"); // **** A REVOIR *** - Text->m_Size.x = Text->m_Size.y = g_LastTextSize; - Text->m_Horiz = g_LastTextOrient; - if( g_FlDrawSpecificUnit ) Text->m_Unit = CurrentUnit; - else Text->m_Unit = 0; - if( g_FlDrawSpecificConvert ) Text->m_Convert = CurrentConvert; - else Text->m_Convert = 0; - } - Close(); - - if ( CurrentDrawItem ) - CurrentDrawItem->Display_Infos_DrawEntry(m_Parent); -} - - - -/*******************************************************/ -void WinEDA_LibeditFrame::EditSymbolText(wxDC * DC, - LibEDA_BaseStruct * DrawItem) -/*******************************************************/ -{ -int DrawMode = g_XorMode; - - if ( DrawItem == NULL ) return; - if ( DrawItem->Type() != COMPONENT_GRAPHIC_TEXT_DRAW_TYPE ) return; - - /* Effacement ancien texte */ - if( ((LibDrawText*)DrawItem)->m_Text && DC) - DrawLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry, wxPoint(0, 0), - DrawItem, DrawMode); - - - WinEDA_bodytext_PropertiesFrame * frame = - new WinEDA_bodytext_PropertiesFrame(this); - frame->ShowModal(); frame->Destroy(); - - GetScreen()->SetModify(); - - /* Affichage nouveau texte */ - if( ((LibDrawText*)DrawItem)->m_Text && DC) - { - if ( (DrawItem->m_Flags & IS_MOVED) == 0 ) - DrawMode = GR_DEFAULT_DRAWMODE; - DrawLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry, wxPoint(0, 0), - DrawItem, DrawMode); - } -} - - -/****************************************************/ -void WinEDA_LibeditFrame::RotateSymbolText(wxDC * DC) -/****************************************************/ -/* - 90 deg Graphic text Rotation . -*/ -{ -LibDrawText * DrawItem = (LibDrawText *) CurrentDrawItem; - - if(DrawItem == NULL) return; - - /* Erase drawing (can be within a move command) */ - if ( DrawPanel->ManageCurseur == NULL) - DrawLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry, wxPoint(0, 0), - DrawItem, g_XorMode); - else DrawPanel->ManageCurseur(DrawPanel, DC, FALSE); - - if( DrawItem->m_Horiz == TEXT_ORIENT_HORIZ) - DrawItem->m_Horiz = TEXT_ORIENT_VERT; - else DrawItem->m_Horiz = TEXT_ORIENT_HORIZ; - - GetScreen()->SetModify(); - - /* Redraw item with new orient */ - if ( DrawPanel->ManageCurseur == NULL) - DrawLibraryDrawStruct(DrawPanel, DC, CurrentLibEntry, wxPoint(0, 0), - DrawItem, GR_DEFAULT_DRAWMODE); - else DrawPanel->ManageCurseur(DrawPanel, DC, FALSE); - -} - - diff --git a/eeschema/symbtext.h b/eeschema/symbtext.h deleted file mode 100644 index 6b944dda5f..0000000000 --- a/eeschema/symbtext.h +++ /dev/null @@ -1,118 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: symbtext.h -// Purpose: -// Author: jean-pierre Charras -// Modified by: -// Created: 12/02/2006 14:04:59 -// RCS-ID: -// Copyright: License GNU -// Licence: -///////////////////////////////////////////////////////////////////////////// - -// Generated by DialogBlocks (unregistered), 12/02/2006 14:04:59 - -#ifndef _SYMBTEXT_H_ -#define _SYMBTEXT_H_ - -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "symbtext.h" -#endif - -/*! - * Includes - */ - -////@begin includes -////@end includes - -/*! - * Forward declarations - */ - -////@begin forward declarations -////@end forward declarations - -/*! - * Control identifiers - */ - -////@begin control identifiers -#define ID_DIALOG 10000 -#define ID_TEXTCTRL 10001 -#define ID_TEXTCTRL1 10002 -#define ID_CHECKBOX 10003 -#define ID_CHECKBOX1 10004 -#define ID_CHECKBOX2 10005 -#define SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER -#define SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_TITLE _("Graphic text properties") -#define SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_IDNAME ID_DIALOG -#define SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_SIZE wxSize(400, 300) -#define SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_POSITION wxDefaultPosition -////@end control identifiers - -/*! - * Compatibility - */ - -#ifndef wxCLOSE_BOX -#define wxCLOSE_BOX 0x1000 -#endif - -/*! - * WinEDA_bodytext_PropertiesFrame class declaration - */ - -class WinEDA_bodytext_PropertiesFrame: public wxDialog -{ - DECLARE_DYNAMIC_CLASS( WinEDA_bodytext_PropertiesFrame ) - DECLARE_EVENT_TABLE() - -public: - /// Constructors - WinEDA_bodytext_PropertiesFrame( ); - WinEDA_bodytext_PropertiesFrame( WinEDA_LibeditFrame* parent, wxWindowID id = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_SIZE, long style = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_STYLE ); - - /// Creation - bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_SIZE, long style = SYMBOL_WINEDA_BODYTEXT_PROPERTIESFRAME_STYLE ); - - /// Creates the controls and sizers - void CreateControls(); - -////@begin WinEDA_bodytext_PropertiesFrame event handler declarations - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK - void OnOkClick( wxCommandEvent& event ); - - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL - void OnCancelClick( wxCommandEvent& event ); - -////@end WinEDA_bodytext_PropertiesFrame event handler declarations - -////@begin WinEDA_bodytext_PropertiesFrame member function declarations - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end WinEDA_bodytext_PropertiesFrame member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - void bodytext_PropertiesAccept(wxCommandEvent& event); - -////@begin WinEDA_bodytext_PropertiesFrame member variables - wxTextCtrl* m_NewText; - wxStaticText* m_SizeText; - wxTextCtrl* m_Size; - wxCheckBox* m_CommonUnit; - wxCheckBox* m_CommonConvert; - wxCheckBox* m_Orient; - wxButton* m_btClose; -////@end WinEDA_bodytext_PropertiesFrame member variables - - WinEDA_LibeditFrame * m_Parent; -}; - -#endif - // _SYMBTEXT_H_ diff --git a/eeschema/symbtext.pjd b/eeschema/symbtext.pjd deleted file mode 100644 index b608c7cd83..0000000000 --- a/eeschema/symbtext.pjd +++ /dev/null @@ -1,1144 +0,0 @@ - - -
- 0 - "" - "" - "" - "" - "" - 0 - 0 - 0 - 1 - 1 - 1 - 1 - 0 - "jean-pierre Charras" - "License GNU" - "" - 0 - 0 - "<All platforms>" - "<Any>" - "///////////////////////////////////////////////////////////////////////////// -// Name: %HEADER-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SOURCE-FILENAME% -// Purpose: -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "///////////////////////////////////////////////////////////////////////////// -// Name: %SYMBOLS-FILENAME% -// Purpose: Symbols file -// Author: %AUTHOR% -// Modified by: -// Created: %DATE% -// RCS-ID: -// Copyright: %COPYRIGHT% -// Licence: -///////////////////////////////////////////////////////////////////////////// - -" - "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "%HEADER-FILENAME%" -#endif - -" - "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "%HEADER-FILENAME%" -#endif - -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - -#ifndef WX_PRECOMP -#include "wx/wx.h" -#endif - -" - " /// %BODY% -" - " -/*! - * %BODY% - */ - -" - "app_resources.h" - "app_resources.cpp" - "AppResources" - "app.h" - "app.cpp" - "Application" - 0 - "" - "<None>" - "<System>" - "utf-8" - "<System>" - "" - 0 - 0 - 4 - " " - "" - 0 - 0 - 1 - 0 - 1 - 1 - 0 - 1 - 0 -
- - - "" - "data-document" - "" - "" - 0 - 1 - 0 - 0 - - "Configurations" - "config-data-document" - "" - "" - 0 - 1 - 0 - 0 - "" - 1 - 0 - "" - "Debug" - "ANSI" - "Static" - "Modular" - "GUI" - "wxMSW" - "Dynamic" - "Yes" - "No" - "No" - "%WXVERSION%" - "%EXECUTABLE%" - "" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - "%AUTO%" - 0 - 1 - - - - - - - "Projects" - "root-document" - "" - "project" - 1 - 1 - 0 - 1 - - "Windows" - "html-document" - "" - "dialogsfolder" - 1 - 1 - 0 - 1 - - "Graphic text properties" - "dialog-document" - "" - "dialog" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbDialogProxy" - 10000 - 0 - "" - 0 - "" - 0 - 0 - "ID_DIALOG" - 10000 - "WinEDA_bodytext_PropertiesFrame" - "wxDialog" - "wxDialog" - "symbtext.cpp" - "symbtext.h" - "" - "Graphic text properties" - 1 - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "Tiled" - 0 - 1 - 0 - 1 - 0 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - "MAYBE_RESIZE_BORDER" - 0 - 1 - -1 - -1 - 400 - 300 - 0 - "" - - "wxBoxSizer H" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "wbBoxSizerProxy" - "Horizontal" - "" - 0 - 0 - 0 - "<Any platform>" - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - " Text : " - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxBoxSizer H" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbBoxSizerProxy" - "Horizontal" - "" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "" - "Name:" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL" - 10001 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_NewText" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - 250 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxStaticText: wxID_STATIC" - "dialog-control-document" - "" - "statictext" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbStaticTextProxy" - "wxID_STATIC" - 5105 - "" - "wxStaticText" - "wxStaticText" - 1 - 0 - "" - "" - "m_SizeText" - "Size:" - -1 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 0 - 0 - 1 - 0 - "" - "" - - - "wxTextCtrl: ID_TEXTCTRL1" - "dialog-control-document" - "" - "textctrl" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbTextCtrlProxy" - "ID_TEXTCTRL1" - 10002 - "" - "wxTextCtrl" - "wxTextCtrl" - 1 - 0 - "" - "" - "m_Size" - "" - 0 - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - "" - "" - "" - "" - "" - "" - "" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - 0 - - - - - "wxStaticBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbStaticBoxSizerProxy" - "wxID_ANY" - -1 - " Text Options : " - "" - "" - "" - "" - 0 - 1 - "wxStaticBox" - "Vertical" - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxCheckBox: ID_CHECKBOX" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX" - 10003 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_CommonUnit" - "Common to Units" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX1" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX1" - 10004 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_CommonConvert" - "Common to convert" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxCheckBox: ID_CHECKBOX2" - "dialog-control-document" - "" - "checkbox" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbCheckBoxProxy" - "ID_CHECKBOX2" - 10005 - "" - "wxCheckBox" - "wxCheckBox" - 1 - 0 - "" - "" - "m_Orient" - "Vertical" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - 0 - 1 - "<Any platform>" - 0 - 1 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Left" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - "wxBoxSizer V" - "dialog-control-document" - "" - "sizer" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbBoxSizerProxy" - "Vertical" - "" - "Centre" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "<Any platform>" - - "wxButton: wxID_OK" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick|||WinEDA_bodytext_PropertiesFrame" - "wxID_OK" - 5100 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "" - "&OK" - 1 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "CE0000" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - "wxButton: wxID_CANCEL" - "dialog-control-document" - "" - "dialogcontrol" - 0 - 1 - 0 - 0 - "12/5/2006" - "wbButtonProxy" - "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick" - "wxID_CANCEL" - 5101 - "" - "wxButton" - "wxButton" - 1 - 0 - "" - "" - "m_btClose" - "&Cancel" - 0 - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "0000FF" - "" - 0 - 1 - "<Any platform>" - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - "" - -1 - -1 - -1 - -1 - "Expand" - "Centre" - 0 - 5 - 1 - 1 - 1 - 1 - 0 - 0 - 0 - "" - "" - - - - - - - "Sources" - "html-document" - "" - "sourcesfolder" - 1 - 1 - 0 - 1 - - "symbtext.rc" - "source-editor-document" - "symbtext.rc" - "source-editor" - 0 - 0 - 1 - 0 - "12/5/2006" - "" - - - - "Images" - "html-document" - "" - "bitmapsfolder" - 1 - 1 - 0 - 1 - - - - -
diff --git a/eeschema/symbtext.rc b/eeschema/symbtext.rc deleted file mode 100644 index b86c4e2265..0000000000 --- a/eeschema/symbtext.rc +++ /dev/null @@ -1 +0,0 @@ -#include "wx/msw/wx.rc"