More about italic and bold texts options in fields and graphic texts + code cleanup

This commit is contained in:
charras 2008-12-28 18:00:37 +00:00
parent f08585f96a
commit 348cfa79b0
28 changed files with 1275 additions and 1741 deletions

View File

@ -6,6 +6,12 @@ Please add newer entries at the top, list the date and your name with
email address. email address.
2008-Dec-28 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
++Eeschema:
More about italic and bold texts options in fields and graphic texts
2008-Dec-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2008-Dec-22 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
++Pcbnew: ++Pcbnew:

View File

@ -32,6 +32,7 @@ set(EESCHEMA_SRCS
delete.cpp delete.cpp
delsheet.cpp delsheet.cpp
# dialog_backanno.cpp # dialog_backanno.cpp
dialog_bodygraphictext_properties_base.cpp
dialog_build_BOM.cpp dialog_build_BOM.cpp
# dialog_cmp_graphic_properties.cpp # dialog_cmp_graphic_properties.cpp
dialog_create_component.cpp dialog_create_component.cpp
@ -94,7 +95,7 @@ set(EESCHEMA_SRCS
sheetlab.cpp sheetlab.cpp
symbdraw.cpp symbdraw.cpp
symbedit.cpp symbedit.cpp
symbtext.cpp edit_graphic_bodyitem_text.cpp
tool_lib.cpp tool_lib.cpp
tool_sch.cpp tool_sch.cpp
tool_viewlib.cpp tool_viewlib.cpp

View File

@ -126,6 +126,7 @@ void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame )
*/ */
{ {
wxString msg; wxString msg;
int thickness = 0;
frame->MsgPanel->EraseMsgBox(); frame->MsgPanel->EraseMsgBox();
@ -135,21 +136,27 @@ void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame )
switch( Type() ) switch( Type() )
{ {
case COMPONENT_ARC_DRAW_TYPE: case COMPONENT_ARC_DRAW_TYPE:
thickness = ( (LibDrawArc*) this )->m_Width;
msg = wxT( "Arc" ); break; msg = wxT( "Arc" ); break;
case COMPONENT_CIRCLE_DRAW_TYPE: case COMPONENT_CIRCLE_DRAW_TYPE:
thickness = ( (LibDrawCircle*) this )->m_Width;
msg = wxT( "Circle" ); break; msg = wxT( "Circle" ); break;
case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE: case COMPONENT_GRAPHIC_TEXT_DRAW_TYPE:
thickness = ( (LibDrawText*) this )->m_Width;
msg = wxT( "Text" ); break; msg = wxT( "Text" ); break;
case COMPONENT_RECT_DRAW_TYPE: case COMPONENT_RECT_DRAW_TYPE:
thickness = ( (LibDrawSquare*) this )->m_Width;
msg = wxT( "Rect" ); break; msg = wxT( "Rect" ); break;
case COMPONENT_POLYLINE_DRAW_TYPE: case COMPONENT_POLYLINE_DRAW_TYPE:
thickness = ( (LibDrawPolyline*) this )->m_Width;
msg = wxT( "PolyLine" ); break; msg = wxT( "PolyLine" ); break;
case COMPONENT_LINE_DRAW_TYPE: case COMPONENT_LINE_DRAW_TYPE:
thickness = ( (LibDrawSegment*) this )->m_Width;
msg = wxT( "Segment" ); break; msg = wxT( "Segment" ); break;
case COMPONENT_PIN_DRAW_TYPE: case COMPONENT_PIN_DRAW_TYPE:
@ -181,9 +188,9 @@ void LibEDA_BaseStruct::Display_Infos_DrawEntry( WinEDA_DrawFrame* frame )
msg = wxT( "?" ); msg = wxT( "?" );
Affiche_1_Parametre( frame, 14, _( "Convert" ), msg, BROWN ); Affiche_1_Parametre( frame, 14, _( "Convert" ), msg, BROWN );
if( m_Width ) if( thickness )
msg = ReturnStringFromValue( g_UnitMetric, m_Width, EESCHEMA_INTERNAL_UNIT, true ); msg = ReturnStringFromValue( g_UnitMetric, thickness, EESCHEMA_INTERNAL_UNIT, true );
else else
msg = _( "default" ); msg = _( "default" );
Affiche_1_Parametre( frame, 20, _( "Width" ), msg, BLUE ); Affiche_1_Parametre( frame, 20, _( "Thickness" ), msg, BLUE );
} }

View File

@ -12,11 +12,6 @@
#include "protos.h" #include "protos.h"
/*******************************************************/
/* Methodes relatives a la manipulation des librairies */
/*******************************************************/
/***************************************************************************************/ /***************************************************************************************/
LibraryStruct::LibraryStruct( int type, const wxString& name, const wxString& fullname ) 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 ) if( m_FieldId >= NUMBER_OF_FIELDS )
m_FieldId = NUMBER_OF_FIELDS - 1; m_FieldId = NUMBER_OF_FIELDS - 1;
m_Size.x = m_Size.y = DEFAULT_SIZE_TEXT; 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_Name = m_Name;
Target->m_HJustify = m_HJustify; Target->m_HJustify = m_HJustify;
Target->m_VJustify = m_VJustify; 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_Size = wxSize( 50, 50 );
m_Type = 0;
m_Width = 0;
} }
@ -511,14 +500,17 @@ LibDrawText* LibDrawText::GenCopy()
LibDrawText* newitem = new LibDrawText(); LibDrawText* newitem = new LibDrawText();
newitem->m_Pos = m_Pos; newitem->m_Pos = m_Pos;
newitem->m_Horiz = m_Horiz; newitem->m_Orient = m_Orient;
newitem->m_Size = m_Size; newitem->m_Size = m_Size;
newitem->m_Type = m_Type; newitem->m_Attributs = m_Attributs;
newitem->m_Unit = m_Unit; newitem->m_Unit = m_Unit;
newitem->m_Convert = m_Convert; newitem->m_Convert = m_Convert;
newitem->m_Flags = m_Flags; newitem->m_Flags = m_Flags;
newitem->m_Text = m_Text; newitem->m_Text = m_Text;
newitem->m_Width = m_Width; newitem->m_Width = m_Width;
newitem->m_Italic = m_Italic;
newitem->m_HJustify = m_HJustify;
newitem->m_VJustify = m_VJustify;
return newitem; return newitem;
} }
@ -589,7 +581,6 @@ LibDrawPolyline* LibDrawPolyline::GenCopy()
newitem->m_PolyList = (int*) MyMalloc( size ); newitem->m_PolyList = (int*) MyMalloc( size );
memcpy( newitem->m_PolyList, m_PolyList, size ); memcpy( newitem->m_PolyList, m_PolyList, size );
} }
newitem->m_Pos = m_Pos;
newitem->m_Width = m_Width; newitem->m_Width = m_Width;
newitem->m_Unit = m_Unit; newitem->m_Unit = m_Unit;
newitem->m_Convert = m_Convert; newitem->m_Convert = m_Convert;

View File

@ -198,14 +198,16 @@ bool SCH_CMP_FIELD::Save( FILE* aFile ) const
else if( m_VJustify == GR_TEXT_VJUSTIFY_TOP ) else if( m_VJustify == GR_TEXT_VJUSTIFY_TOP )
vjustify = 'T'; 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, m_FieldId,
CONV_TO_UTF8( m_Text ), CONV_TO_UTF8( m_Text ),
m_Orient == TEXT_ORIENT_HORIZ ? 'H' : 'V', m_Orient == TEXT_ORIENT_HORIZ ? 'H' : 'V',
m_Pos.x, m_Pos.y, m_Pos.x, m_Pos.y,
m_Size.x, m_Size.x,
m_Attributs, m_Attributs,
hjustify, vjustify ) == EOF ) hjustify, vjustify,
m_Italic ? 'I' : 'N',
m_Width > 1 ? 'B' : 'N' ) == EOF )
{ {
return false; return false;
} }

View File

@ -23,9 +23,7 @@ LibEDA_BaseStruct::LibEDA_BaseStruct( KICAD_T struct_type ) :
* 0 if the item is common to all units */ * 0 if the item is common to all units */
m_Convert = 0; /* Shape identification (for parts which have a convert shape) m_Convert = 0; /* Shape identification (for parts which have a convert shape)
* 0 if the item is common to all shapes */ * 0 if the item is common to all shapes */
m_Width = 0; /* Default value to draw lines or arc ... */ m_Fill = NO_FILL;
m_Fill = NO_FILL; /* NO_FILL, FILLED_SHAPE or FILLED_WITH_BG_BODYCOLOR.
* has meaning only for some items */
} }
@ -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 /* The text orientation may need to be flipped if the
* transformation matrix causes xy axes to be flipped. */ * 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, DrawGraphicText( aPanel, aDC, pos1, (EDA_Colors) color, m_Text,
t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT, t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT,
m_Size, 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] ) 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; wxPoint text_pos;
@ -340,7 +338,7 @@ void LibDrawField::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOf
(EDA_Colors) color, text->GetData(), (EDA_Colors) color, text->GetData(),
m_Orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ, m_Orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ,
m_Size, m_Size,
m_HJustify, m_VJustify, linewidth ); m_HJustify, m_VJustify, linewidth, m_Italic );
} }

View File

@ -130,8 +130,6 @@ public:
* 0 if the item is common to all units */ * 0 if the item is common to all units */
int m_Convert; /* Shape identification (for parts which have a convert shape) int m_Convert; /* Shape identification (for parts which have a convert shape)
* 0 if the item is common to all shapes */ * 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 */ FILL_T m_Fill; /* NO_FILL, FILLED_SHAPE or FILLED_WITH_BG_BODYCOLOR. has meaning only for some items */
public: public:
@ -189,6 +187,8 @@ public:
int m_PinNumSize, m_PinNameSize; /* Pin num and Pin name sizes */ 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 */ // 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: public:
LibDrawPin(); LibDrawPin();
@ -246,6 +246,8 @@ public:
int m_Rayon; int m_Rayon;
int t1, t2; /* position des 2 extremites de l'arc en 0.1 degres */ 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_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: public:
LibDrawArc(); LibDrawArc();
@ -278,6 +280,8 @@ class LibDrawCircle : public LibEDA_BaseStruct
{ {
public: public:
int m_Rayon; int m_Rayon;
wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point (segments) */
int m_Width; /* Tickness */
public: public:
LibDrawCircle(); LibDrawCircle();
@ -311,12 +315,8 @@ public:
/* they are a separate class */ /* they are a separate class */
/*********************************************/ /*********************************************/
class LibDrawText : public LibEDA_BaseStruct class LibDrawText : public LibEDA_BaseStruct
, public EDA_TextStruct
{ {
public:
int m_Horiz;
wxSize m_Size;
int m_Type;
wxString m_Text;
public: public:
LibDrawText(); LibDrawText();
@ -350,6 +350,8 @@ class LibDrawSquare : public LibEDA_BaseStruct
{ {
public: public:
wxPoint m_End; wxPoint m_End;
wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point (segments) */
int m_Width; /* Tickness */
public: public:
LibDrawSquare(); LibDrawSquare();
@ -382,6 +384,8 @@ class LibDrawSegment : public LibEDA_BaseStruct
{ {
public: public:
wxPoint m_End; wxPoint m_End;
wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point (segments) */
int m_Width; /* Tickness */
public: public:
LibDrawSegment(); LibDrawSegment();
@ -415,6 +419,7 @@ class LibDrawPolyline : public LibEDA_BaseStruct
public: public:
int m_CornersCount; int m_CornersCount;
int* m_PolyList; int* m_PolyList;
int m_Width; /* Tickness */
public: public:
LibDrawPolyline(); LibDrawPolyline();
@ -458,6 +463,7 @@ public:
* Name (74LS00..) used to find the component in libraries, and give the default value in schematic * Name (74LS00..) used to find the component in libraries, and give the default value in schematic
*/ */
class LibDrawField : public LibEDA_BaseStruct class LibDrawField : public LibEDA_BaseStruct
, public EDA_TextStruct
{ {
public: public:
int m_FieldId; /* 0 a 11 int m_FieldId; /* 0 a 11
@ -465,13 +471,7 @@ public:
* 2 = Default footprint, 3 = subsheet (not used, reserved) * 2 = Default footprint, 3 = subsheet (not used, reserved)
* .. 11 other fields * .. 11 other fields
*/ */
wxSize m_Size; wxString m_Name; /* Field Name (not the fielsd text itself, that is .m_Text) */
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 */
public: public:

View File

@ -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 );
}

View File

@ -0,0 +1,654 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="9" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_bodygraphictext_properties_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="internationalize">1</property>
<property name="name">Dialog_BodyGraphicText_Properties_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="bg"></property>
<property name="center"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">Dialog_BodyGraphicText_Properties_base</property>
<property name="pos"></property>
<property name="size">360,180</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Graphic text properties:</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnActivate"></event>
<event name="OnActivateApp"></event>
<event name="OnChar"></event>
<event name="OnClose"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog">OnInitDialog</event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bMainSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bLeftSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Text:</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticText1</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size">200,-1</property>
<property name="name">m_TextValue</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label"> Text Options : </property>
<property name="minimum_size"></property>
<property name="name">sOptionsSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Common to Units</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_CommonUnit</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Common to convert</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_CommonConvert</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Vertical</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_Orient</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bRightSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Size:</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_TextSizeText</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="minimum_size"></property>
<property name="name">m_TextSize</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnText"></event>
<event name="OnTextEnter"></event>
<event name="OnTextMaxLen"></event>
<event name="OnTextURL"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Normal&quot; &quot;Italic&quot; &quot;Bold&quot; &quot;Bold Italic&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Text Shape:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_TextShapeOpt</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">3</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizer4</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_OK</property>
<property name="label">OK</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_buttonOK</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnOkClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
<property name="label">Cancel</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_buttonCANCEL</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnCancelClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>

View File

@ -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 <wx/intl.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/radiobox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// 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__

View File

@ -435,6 +435,13 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel()
rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT ); 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 ); fieldNameTextCtrl->SetValue( field.m_Name );
// if fieldNdx == REFERENCE, VALUE, FOOTPRINT, or DATASHEET, then disable editing // 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 ); rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT );
field.m_Name = fieldNameTextCtrl->GetValue(); field.m_Name = fieldNameTextCtrl->GetValue();
field.m_Text = fieldValueTextCtrl->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.x = WinEDA_GraphicTextCtrl::ParseSize( textSizeTextCtrl->GetValue(), EESCHEMA_INTERNAL_UNIT, g_UnitMetric );
field.m_Size.y = field.m_Size.x; 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; double value;
posXTextCtrl->GetValue().ToDouble( &value ); posXTextCtrl->GetValue().ToDouble( &value );

View File

@ -727,9 +727,9 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="0"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Visibility</property> <property name="label">Visibility</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -739,84 +739,148 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxCheckBox" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">showCheckBox</property> <property name="name">bShowRotateSizer</property>
<property name="permission">protected</property> <property name="orient">wxVERTICAL</property>
<property name="pos"></property> <property name="permission">none</property>
<property name="size"></property> <object class="sizeritem" expanded="1">
<property name="style"></property> <property name="border">5</property>
<property name="subclass"></property> <property name="flag">wxALL</property>
<property name="tooltip">Check if you want this field visible</property> <property name="proportion">0</property>
<property name="window_extra_style"></property> <object class="wxCheckBox" expanded="1">
<property name="window_name"></property> <property name="bg"></property>
<property name="window_style"></property> <property name="checked">0</property>
<event name="OnChar"></event> <property name="context_help"></property>
<event name="OnCheckBox"></event> <property name="enabled">1</property>
<event name="OnEnterWindow"></event> <property name="fg"></property>
<event name="OnEraseBackground"></event> <property name="font"></property>
<event name="OnKeyDown"></event> <property name="hidden">0</property>
<event name="OnKeyUp"></event> <property name="id">wxID_ANY</property>
<event name="OnKillFocus"></event> <property name="label">Show</property>
<event name="OnLeaveWindow"></event> <property name="maximum_size"></property>
<event name="OnLeftDClick"></event> <property name="minimum_size"></property>
<event name="OnLeftDown"></event> <property name="name">showCheckBox</property>
<event name="OnLeftUp"></event> <property name="permission">protected</property>
<event name="OnMiddleDClick"></event> <property name="pos"></property>
<event name="OnMiddleDown"></event> <property name="size"></property>
<event name="OnMiddleUp"></event> <property name="style"></property>
<event name="OnMotion"></event> <property name="subclass"></property>
<event name="OnMouseEvents"></event> <property name="tooltip">Check if you want this field visible</property>
<event name="OnMouseWheel"></event> <property name="window_extra_style"></property>
<event name="OnPaint"></event> <property name="window_name"></property>
<event name="OnRightDClick"></event> <property name="window_style"></property>
<event name="OnRightDown"></event> <event name="OnChar"></event>
<event name="OnRightUp"></event> <event name="OnCheckBox"></event>
<event name="OnSetFocus"></event> <event name="OnEnterWindow"></event>
<event name="OnSize"></event> <event name="OnEraseBackground"></event>
<event name="OnUpdateUI"></event> <event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Rotate</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">rotateCheckBox</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip">Check if you want this field&apos;s text rotated 90 degrees</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxCheckBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="bg"></property> <property name="bg"></property>
<property name="checked">0</property> <property name="choices">&quot;Normal&quot; &quot;Italic&quot; &quot;Bold&quot; &quot;Bold Italic&quot;</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Rotate</property> <property name="label">Style:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">rotateCheckBox</property> <property name="name">m_StyleRadioBox</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip">Check if you want this field&apos;s text rotated 90 degrees</property> <property name="tooltip"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
<event name="OnChar"></event> <event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event> <event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event> <event name="OnKeyDown"></event>
@ -833,6 +897,7 @@
<event name="OnMouseEvents"></event> <event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event> <event name="OnMouseWheel"></event>
<event name="OnPaint"></event> <event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event> <event name="OnRightDClick"></event>
<event name="OnRightDown"></event> <event name="OnRightDown"></event>
<event name="OnRightUp"></event> <event name="OnRightUp"></event>

View File

@ -114,19 +114,30 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(
wxStaticBoxSizer* visibilitySizer; wxStaticBoxSizer* visibilitySizer;
visibilitySizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Visibility") ), wxHORIZONTAL ); 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 = new wxCheckBox( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 );
showCheckBox->SetToolTip( _("Check if you want this field visible") ); 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 = new wxCheckBox( this, wxID_ANY, _("Rotate"), wxDefaultPosition, wxDefaultSize, 0 );
rotateCheckBox->SetToolTip( _("Check if you want this field's text rotated 90 degrees") ); 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; wxBoxSizer* fieldNameBoxSizer;
fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL ); fieldNameBoxSizer = new wxBoxSizer( wxVERTICAL );

View File

@ -49,6 +49,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public wxDialog
wxButton* moveUpButton; wxButton* moveUpButton;
wxCheckBox* showCheckBox; wxCheckBox* showCheckBox;
wxCheckBox* rotateCheckBox; wxCheckBox* rotateCheckBox;
wxRadioBox* m_StyleRadioBox;
wxStaticText* fieldNameLabel; wxStaticText* fieldNameLabel;
wxTextCtrl* fieldNameTextCtrl; wxTextCtrl* fieldNameTextCtrl;
wxStaticText* fieldValueLabel; wxStaticText* fieldValueLabel;

View File

@ -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);
}

View File

@ -59,7 +59,7 @@ void DialogLabelEditor::TextPropertiesAccept( wxCommandEvent& event )
m_CurrentText->m_Italic = 0; m_CurrentText->m_Italic = 0;
if ( ( style & 2 ) ) if ( ( style & 2 ) )
m_CurrentText->m_Width = m_CurrentText->m_Size.x / 5; m_CurrentText->m_Width = m_CurrentText->m_Size.x / 4;
else else
m_CurrentText->m_Width = 0; m_CurrentText->m_Width = 0;

View File

@ -350,7 +350,7 @@ void SCH_CMP_FIELD::Draw( WinEDA_DrawPanel* panel,
DrawGraphicText( panel, DC, pos, color, m_Text, DrawGraphicText( panel, DC, pos, color, m_Text,
orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ, orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ,
m_Size, 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 ) 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, DrawGraphicText( panel, DC, pos, color, fulltext,
orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ, orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ,
m_Size, m_Size,
hjustify, vjustify, LineWidth ); hjustify, vjustify, LineWidth, m_Italic );
} }
} }

View File

@ -610,14 +610,21 @@ LibEDA_BaseStruct* GetDrawEntry (WinEDA_DrawFrame* frame,
New = Text; New = Text;
Buffer[0] = 0; Buffer[0] = 0;
Error = sscanf( &Line[2], "%d %d %d %d %d %d %d %s", chartmp[0] = 0; // For italic option, Not in old versions
&Text->m_Horiz, 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_Pos.x, &Text->m_Pos.y,
&Text->m_Size.x, &Text->m_Type, &Text->m_Size.x, &Text->m_Attributs,
&Unit, &Convert, Buffer ) != 8; &Unit, &Convert, Buffer, chartmp, &thickness ) < 8;
Text->m_Unit = Unit; Text->m_Convert = Convert; Text->m_Unit = Unit; Text->m_Convert = Convert;
Text->m_Size.y = Text->m_Size.x; Text->m_Size.y = Text->m_Size.x;
if ( strnicmp(chartmp, "Italic", 6) == 0 )
Text->m_Italic = true;
Text->m_Width = thickness;
if( !Error ) if( !Error )
{ /* Convert '~' to spaces. */ { /* Convert '~' to spaces. */
Text->m_Text = CONV_FROM_UTF8( Buffer ); Text->m_Text = CONV_FROM_UTF8( Buffer );
@ -909,8 +916,8 @@ GetLibEntryField (EDA_LibComponentStruct* LibEntry,
line++; line++;
FieldUserName[0] = 0; FieldUserName[0] = 0;
memset( Char4, 0, sizeof(Char4));
nbparam = sscanf( line, " %d %d %d %c %c %c %c", nbparam = sscanf( line, " %d %d %d %c %c %c %s",
&posx, &posy, &size, Char1, Char2, Char3, Char4 ); &posx, &posy, &size, Char1, Char2, Char3, Char4 );
orient = TEXT_ORIENT_HORIZ; orient = TEXT_ORIENT_HORIZ;
@ -928,10 +935,15 @@ GetLibEntryField (EDA_LibComponentStruct* LibEntry,
hjustify = GR_TEXT_HJUSTIFY_LEFT; hjustify = GR_TEXT_HJUSTIFY_LEFT;
else if( *Char3 == 'R' ) else if( *Char3 == 'R' )
hjustify = GR_TEXT_HJUSTIFY_RIGHT; hjustify = GR_TEXT_HJUSTIFY_RIGHT;
if( *Char4 == 'B' ) if( Char4[0] == 'B' )
vjustify = GR_TEXT_VJUSTIFY_BOTTOM; vjustify = GR_TEXT_VJUSTIFY_BOTTOM;
else if( *Char4 == 'T' ) else if( Char4[0] == 'T' )
vjustify = GR_TEXT_VJUSTIFY_TOP; 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 ) switch( NumOfField )

View File

@ -913,7 +913,7 @@ LibEDA_BaseStruct* LocateDrawItem( SCH_SCREEN* Screen,
ii = 2; ii = 2;
dx = (Text->m_Size.x * ii) / 2; dx = (Text->m_Size.x * ii) / 2;
dy = Text->m_Size.y / 2; dy = Text->m_Size.y / 2;
if( Text->m_Horiz == TEXT_ORIENT_VERT ) if( Text->m_Orient == TEXT_ORIENT_VERT )
{ {
EXCHG( dx, dy ); EXCHG( dx, dy );
} }

View File

@ -56,6 +56,7 @@ OBJECTS = eeschema.o\
edit_component_in_schematic.o\ edit_component_in_schematic.o\
dialog_edit_component_in_schematic_fbp.o \ dialog_edit_component_in_schematic_fbp.o \
dialog_edit_component_in_schematic.o \ dialog_edit_component_in_schematic.o \
dialog_bodygraphictext_properties_base.o\
locate.o \ locate.o \
save_schemas.o sheet.o \ save_schemas.o sheet.o \
read_from_file_schematic_items_descriptions.o\ read_from_file_schematic_items_descriptions.o\
@ -67,7 +68,8 @@ OBJECTS = eeschema.o\
libfield.o \ libfield.o \
edit_component_in_lib.o \ edit_component_in_lib.o \
menubar.o \ menubar.o \
savelib.o symbtext.o \ savelib.o\
edit_graphic_bodyitem_text.o \
symbdraw.o \ symbdraw.o \
hierarch.o files-io.o \ hierarch.o files-io.o \
annotate.o\ annotate.o\

View File

@ -249,7 +249,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
/* The text orientation may need to be flipped if the /* The text orientation may need to be flipped if the
* transformation matrix causes xy axes to be flipped. */ * 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; pos = TransformCoordinate( TransMat, Text->m_Pos ) + DrawLibItem->m_Pos;
SetCurrentLineWidth( -1 ); SetCurrentLineWidth( -1 );
int thickness = Text->m_Width; int thickness = Text->m_Width;

View File

@ -695,8 +695,8 @@ int ReadPartDescr( wxWindow* frame, char* Line, FILE* f,
{ {
int newNdx = component->GetFieldCount(); int newNdx = component->GetFieldCount();
SCH_CMP_FIELD f( wxPoint( 0, 0 ), newNdx, component, fieldName ); SCH_CMP_FIELD field( wxPoint( 0, 0 ), newNdx, component, fieldName );
component->AddField( f ); component->AddField( field );
} }
} }
else else
@ -705,7 +705,7 @@ int ReadPartDescr( wxWindow* frame, char* Line, FILE* f,
} }
component->GetField( fieldNdx )->m_Text = CONV_FROM_UTF8( Name1 ); 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, if( ( ii = sscanf( ptcar, "%s %d %d %d %X %s %s", Char1,
&component->GetField( fieldNdx )->m_Pos.x, &component->GetField( fieldNdx )->m_Pos.x,
&component->GetField( fieldNdx )->m_Pos.y, &component->GetField( fieldNdx )->m_Pos.y,
@ -735,10 +735,18 @@ int ReadPartDescr( wxWindow* frame, char* Line, FILE* f,
hjustify = GR_TEXT_HJUSTIFY_LEFT; hjustify = GR_TEXT_HJUSTIFY_LEFT;
else if( *Char2 == 'R' ) else if( *Char2 == 'R' )
hjustify = GR_TEXT_HJUSTIFY_RIGHT; hjustify = GR_TEXT_HJUSTIFY_RIGHT;
if( *Char3 == 'B' ) if( Char3[0] == 'B' )
vjustify = GR_TEXT_VJUSTIFY_BOTTOM; vjustify = GR_TEXT_VJUSTIFY_BOTTOM;
else if( *Char3 == 'T' ) else if( Char3[0] == 'T' )
vjustify = GR_TEXT_VJUSTIFY_TOP; 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_HJustify = hjustify;
component->GetField( fieldNdx )->m_VJustify = vjustify; component->GetField( fieldNdx )->m_VJustify = vjustify;

View File

@ -68,15 +68,19 @@ bool LibDrawText::Save( FILE* ExportFile ) const
/************************************************/ /************************************************/
{ {
wxString text = m_Text; 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 ",
m_Orient,
fprintf( ExportFile, "T %d %d %d %d %d %d %d %s\n",
m_Horiz,
m_Pos.x, m_Pos.y, m_Pos.x, m_Pos.y,
m_Size.x, m_Type, m_Size.x, m_Attributs,
m_Unit, m_Convert, 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; return true;
} }
@ -200,13 +204,15 @@ bool LibDrawField::Save( FILE* ExportFile ) const
vjustify = 'T'; vjustify = 'T';
if( text.IsEmpty() ) if( text.IsEmpty() )
text = wxT( "~" ); 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_FieldId, CONV_TO_UTF8( text ),
m_Pos.x, m_Pos.y, m_Pos.x, m_Pos.y,
m_Size.x, m_Size.x,
m_Orient == 0 ? 'H' : 'V', m_Orient == 0 ? 'H' : 'V',
(m_Attributs & TEXT_NO_VISIBLE ) ? 'I' : '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 // Save field name, if necessary
if( m_FieldId >= FIELD1 && !m_Name.IsEmpty() ) if( m_FieldId >= FIELD1 && !m_Name.IsEmpty() )
@ -222,7 +228,8 @@ LibEDA_BaseStruct* CopyDrawEntryStruct( wxWindow* frame,
LibEDA_BaseStruct* DrawItem ) 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 * the new item is only created, it is not put in the current component linked list
* @param DrawEntry = DrawLibItem * item to duplicate * @param DrawEntry = DrawLibItem * item to duplicate
* @return a pointer to the new item * @return a pointer to the new item

View File

@ -304,7 +304,7 @@ LibEDA_BaseStruct* WinEDA_LibeditFrame::CreateGraphicItem( wxDC* DC )
CurrentDrawItem = Text; CurrentDrawItem = Text;
Text->m_Size.x = Text->m_Size.y = g_LastTextSize; 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.x = GetScreen()->m_Curseur.x;
Text->m_Pos.y = -( GetScreen()->m_Curseur.y ); Text->m_Pos.y = -( GetScreen()->m_Curseur.y );
EditSymbolText( NULL, Text ); EditSymbolText( NULL, Text );

View File

@ -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);
}

View File

@ -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_

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
#include "wx/msw/wx.rc"