Commit 71ca194b authored by charras's avatar charras

overbar patch merged mainly in eechema/class_pin.cpp. Some cleanup and compil problem fixes.

parent c6501e7d
......@@ -493,6 +493,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawText( TEXTE_PCB* text )
text->m_Text, text->m_Orient, text->m_Size,
text->m_HJustify, text->m_VJustify,
text->m_Width, text->m_Italic,
true,
Draw3dTextSegm );
}
......
......@@ -4,7 +4,17 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.
2009-xxx-xx UPDATE Wayne Stambaugh <stambaughw@verizon.net>
2009-apr-06 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++common:
overbar patch merged in drawtxt.cpp and mainly in eechema/class_pin.cpp
some cleanup and some compiling problems fixed.
++eeschema:
changed dialog_eeschema_config.cpp to use wxFormBuilder to create
the corresponding equivalent dialog in dialog_eeschema_config_fbp.cpp
2009-apr-05 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
++All
* Removed all instances #ifdef eda_global, COMMON_GLOBL, and MAIN in order
......
......@@ -738,18 +738,19 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
for( ii = 0; ; ii++ )
{
xg = wxRound(ii * screen_grid_size.x);
if( xg > size.x )
break;
int xpos = org.x + xg;
xpos = GRMapX( xpos );
for( jj = 0; ; jj++ )
{
yg = wxRound(jj * screen_grid_size.y);
GRPutPixel( &m_ClipBox, DC, xpos, org.y + yg, color );
if( yg > size.y )
break;
int ypos = org.y + yg;
DC->DrawPoint( xpos, GRMapY( ypos ) );
}
if( xg > size.x )
break;
}
}
......
......@@ -20,6 +20,55 @@
#define EDA_DRAWBASE
#include "grfonte.h"
/** Function NegableTextLength
* Return the text length of a negable string, excluding the ~ markers */
int NegableTextLength(const wxString& aText)
{
int char_count = aText.length();
/* Fix the character count, removing the ~ found */
for (int i = char_count-1; i >= 0; i--) {
if (aText[i] == '~') {
char_count--;
}
}
return char_count;
}
/* Helper function for drawing character polygons */
static void DrawGraphicTextPline(
WinEDA_DrawPanel* aPanel,
wxDC* aDC,
EDA_Colors aColor,
int aWidth,
bool sketch_mode,
int point_count,
wxPoint *coord,
void (* aCallback) (int x0, int y0, int xf, int yf))
{
if ( aCallback )
{
for( int ik = 0; ik < (point_count - 1); ik ++ )
{
aCallback( coord[ik].x, coord[ik].y,
coord[ik+1].x, coord[ik+1].y );
}
}
else if( sketch_mode )
{
for( int ik = 0; ik < (point_count - 1); ik ++ )
GRCSegm( &aPanel->m_ClipBox, aDC, coord[ik].x, coord[ik].y,
coord[ik+1].x, coord[ik+1].y, aWidth, aColor );
}
else
GRPoly( &aPanel->m_ClipBox, aDC, point_count, coord, 0,
aWidth, aColor, aColor );
}
static int overbar_position(int size_v, int thickness)
{
return size_v*1.1+thickness;
}
/** Function DrawGraphicText
* Draw a graphic text (like module texts)
......@@ -35,6 +84,7 @@
* @param aWidth = line width (pen width) (default = 0)
* if width < 0 : draw segments in sketch mode, width = abs(width)
* @param aItalic = true to simulate an italic font
* @param aNegable = true to enable the ~ char for overbarring
* @param aCallback() = function called (if non null) to draw each segment.
* used to draw 3D texts or for plotting, NULL for normal drawings
*/
......@@ -50,10 +100,11 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
enum GRTextVertJustifyType aV_justify,
int aWidth,
bool aItalic,
bool aNegable,
void (* aCallback) (int x0, int y0, int xf, int yf))
/****************************************************************************************************/
{
int kk, char_count, AsciiCode;
int char_count, AsciiCode;
int x0, y0;
int size_h, size_v, pitch;
SH_CODE f_cod, plume = 'U';
......@@ -62,6 +113,8 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
int ux0, uy0, dx, dy; // Draw coordinate for segments to draw. also used in some other calculation
int cX, cY; // Texte center
int ox, oy; // Draw coordinates for the current char
int overbar_x, overbar_y; // Start point for the current overbar
int overbars; // Number of ~ seen
#define BUF_SIZE 100
wxPoint coord[BUF_SIZE+1]; // Buffer coordinate used to draw polylines (one char shape)
bool sketch_mode = false;
......@@ -79,18 +132,19 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
if ( aSize.x < 0 ) // text is mirrored using size.x < 0 (mirror / Y axis)
italic_reverse = true;
kk = 0;
ptr = 0; /* ptr = text index */
if (aNegable) {
char_count = NegableTextLength(aText);
} else {
char_count = aText.Len();
}
if( char_count == 0 )
return;
pitch = (10 * size_h ) / 9; // this is the pitch between chars
if ( pitch > 0 )
pitch += ABS(thickness);
pitch += thickness;
else
pitch -= ABS(thickness);
pitch -= thickness;
ox = cX = aPos.x;
oy = cY = aPos.y;
......@@ -220,17 +274,44 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
return;
}
while( kk++ < char_count )
overbars = 0;
ptr = 0; /* ptr = text index */
while( ptr < char_count )
{
x0 = 0; y0 = 0;
if (aNegable) {
if (aText[ptr+overbars] == '~') {
/* Found an overbar, adjust the pointers */
overbars++;
if (overbars % 2) {
/* Starting the overbar */
overbar_x = ox;
overbar_y = oy-overbar_position(size_v, thickness);
RotatePoint( &overbar_x, &overbar_y, cX, cY, aOrient );
} else {
/* Ending the overbar */
coord[0].x = overbar_x;
coord[0].y = overbar_y;
overbar_x = ox;
overbar_y = oy-overbar_position(size_v, thickness);
RotatePoint( &overbar_x, &overbar_y, cX, cY, aOrient );
coord[1].x = overbar_x;
coord[1].y = overbar_y;
/* Plot the overbar segment */
DrawGraphicTextPline(aPanel, aDC, aColor, aWidth,
sketch_mode, 2, coord, aCallback);
}
continue; /* Skip ~ processing */
}
}
#if defined(wxUSE_UNICODE) && defined(KICAD_CYRILLIC)
AsciiCode = aText.GetChar(ptr) & 0x7FF;
AsciiCode = aText.GetChar(ptr+overbars) & 0x7FF;
if ( AsciiCode > 0x40F && AsciiCode < 0x450 ) // big small Cyr
AsciiCode = utf8_to_ascii[AsciiCode - 0x410] & 0xFF;
else
AsciiCode = AsciiCode & 0xFF;
#else
AsciiCode = aText.GetChar( ptr ) & 0xFF;
AsciiCode = aText.GetChar(ptr+overbars) & 0xFF;
#endif
ptcar = graphic_fonte_shape[AsciiCode]; /* ptcar pointe la description
* du caractere a dessiner */
......@@ -253,24 +334,8 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
{
if( aWidth <= 1 )
aWidth = 0;
if ( aCallback )
{
for( int ik = 0; ik < (point_count - 1); ik ++ )
{
aCallback( coord[ik].x, coord[ik].y,
coord[ik+1].x, coord[ik+1].y );
}
}
else if( sketch_mode )
{
for( int ik = 0; ik < (point_count - 1); ik ++ )
GRCSegm( &aPanel->m_ClipBox, aDC, coord[ik].x, coord[ik].y,
coord[ik+1].x, coord[ik+1].y, aWidth, aColor );
}
else
GRPoly( &aPanel->m_ClipBox, aDC, point_count, coord, 0,
aWidth, aColor, aColor );
DrawGraphicTextPline(aPanel, aDC, aColor, aWidth,
sketch_mode, point_count, coord, aCallback);
}
plume = f_cod; point_count = 0;
break;
......@@ -311,6 +376,19 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
ptr++; ox += pitch;
}
if (overbars % 2) {
/* Close the last overbar */
coord[0].x = overbar_x;
coord[0].y = overbar_y;
overbar_x = ox;
overbar_y = oy-overbar_position(size_v, thickness);
RotatePoint( &overbar_x, &overbar_y, cX, cY, aOrient );
coord[1].x = overbar_x;
coord[1].y = overbar_y;
/* Plot the overbar segment */
DrawGraphicTextPline(aPanel, aDC, aColor, aWidth,
sketch_mode, 2, coord, aCallback);
}
}
......@@ -375,6 +453,7 @@ s_Callback_plot(int x0,
* @param aWidth = line width (pen width) (default = 0)
* if width < 0 : draw segments in sketch mode, width = abs(width)
* @param aItalic = true to simulate an italic font
* @param aNegable = true to enable the ~ char for overbarring
*/
/******************************************************************************************/
void PlotGraphicText( int aFormat_plot,
......@@ -386,7 +465,8 @@ void PlotGraphicText( int aFormat_plot,
enum GRTextHorizJustifyType aH_justify,
enum GRTextVertJustifyType aV_justify,
int aWidth,
bool aItalic )
bool aItalic,
bool aNegable)
/******************************************************************************************/
{
// Initialise the actual function used to plot lines:
......@@ -415,7 +495,7 @@ void PlotGraphicText( int aFormat_plot,
DrawGraphicText( NULL, NULL, aPos, aColor, aText,
aOrient, aSize,
aH_justify, aV_justify,
aWidth, aItalic,
aWidth, aItalic, aNegable,
s_Callback_plot);
/* end text : pen UP ,no move */
......
EXTRACPPFLAGS += -I$(SYSINCLUDE) -I./ -Ibitmaps -I../include -I../polygon
COMMON = ../include/colors.h
PCBINCL = -I../pcbnew -I../polygon -I../3d-viewer
PCBINCL = -I../pcbnew -I../polygon
OBJECTS= \
COMMON_OBJECTS= \
about_kicad.o\
base_screen.o\
base_struct.o\
basicframe.o\
drawframe.o\
confirm.o \
copy_to_clipboard.o\
block_commande.o\
class_drawpickedstruct.o\
common.o\
common_plot_functions.o\
common_plotGERBER_functions.o\
common_plotPS_functions.o\
common_plotHPGL_functions.o\
dlist.o \
hotkeys_basic.o\
drawtxt.o \
common_plotPS_functions.o\
common_plotGERBER_functions.o\
confirm.o\
copy_to_clipboard.o\
dcsvg.o\
displlst.o\
dlist.o\
drawframe.o\
drawpanel.o\
wxwineda.o \
string.o \
gr_basic.o\
gestfich.o\
trigo.o\
selcolor.o\
common.o\
eda_doc.o\
toolbars.o\
displlst.o \
drawtxt.o\
edaappl.o\
block_commande.o\
eda_dde.o\
eda_doc.o\
gestfich.o\
get_component_dialog.o\
gr_basic.o\
hotkeys_basic.o\
msgpanel.o\
projet_config.o\
get_component_dialog.o\
eda_dde.o\
selcolor.o\
string.o\
toolbars.o\
trigo.o\
worksheet.o\
base_screen.o\
dcsvg.o\
zoom.o\
wxwineda.o\
zoom.o
PCB_COMMON_OBJECTS =\
pcbcommon.o\
basepcbframe.o\
class_board.o\
class_board_connected_item.o\
class_board_item.o\
class_cotation.o\
class_drawsegment.o\
class_drc_item.o\
class_edge_mod.o\
class_equipot.o\
class_marker.o\
class_mire.o\
class_module.o\
class_pad.o\
class_pad_draw_functions.o\
class_pcb_text.o\
class_text_mod.o\
class_track.o\
class_zone.o\
class_zone_setting.o\
classpcb.o\
collectors.o\
sel_layer.o\
tracemod.o\
dialog_print_using_printer_base.o
ifdef KICAD_PYTHON
OBJECTS += pyhandler.o
pyhandler.o: pyhandler.cpp $(COMMON) ../include/pyhandler.h
COMMON_OBJECTS += pyhandler.o
pyhandler.o: pyhandler.cpp ../include/pyhandler.h
endif
pcbcommon.o: pcbcommon.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ $*.cpp
basepcbframe.o: ../pcbnew/basepcbframe.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board.o: ../pcbnew/class_board.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board_item.o: ../pcbnew/class_board_item.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_drawsegment.o: ../pcbnew/class_drawsegment.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_edge_mod.o: ../pcbnew/class_edge_mod.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_equipot.o: ../pcbnew/class_equipot.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_module.o: ../pcbnew/class_module.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_text_mod.o: ../pcbnew/class_text_mod.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_board_connected_item.o: ../pcbnew/class_board_connected_item.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
......@@ -94,6 +125,12 @@ class_pad_draw_functions.o: ../pcbnew/class_pad_draw_functions.cpp
class_pcb_text.o: ../pcbnew/class_pcb_text.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_track.o: ../pcbnew/class_track.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
tracemod.o: ../pcbnew/tracemod.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
class_zone.o: ../pcbnew/class_zone.cpp
$(CXX) $(PCBINCL) -c $(EDACPPFLAGS) -o $@ ../pcbnew/$*.cpp
......@@ -114,41 +151,41 @@ dialog_print_using_printer_base.o: ../pcbnew/dialog_print_using_printer_base.cpp
gr_basic.o: gr_basic.cpp ../include/gr_basic.h $(DEPEND)
confirm.o: confirm.cpp $(COMMON)
confirm.o: confirm.cpp
hotkeys_basic.o: hotkeys_basic.cpp ../include/hotkeys_basic.h $(COMMON)
hotkeys_basic.o: hotkeys_basic.cpp ../include/hotkeys_basic.h
worksheet.o: worksheet.cpp ../include/worksheet.h $(COMMON)
worksheet.o: worksheet.cpp ../include/worksheet.h
selcolor.o: selcolor.cpp ../include/colors.h $(COMMON)
selcolor.o: selcolor.cpp ../include/colors.h
get_component_dialog.o: get_component_dialog.cpp $(COMMON)
get_component_dialog.o: get_component_dialog.cpp
common_plotPS_functions.o: common_plotPS_functions.cpp ../include/plot_common.h $(COMMON)
common_plotPS_functions.o: common_plotPS_functions.cpp ../include/plot_common.h
common_plotHPGL_functions.o: common_plotPS_functions.cpp ../include/plot_common.h $(COMMON)
common_plotHPGL_functions.o: common_plotPS_functions.cpp ../include/plot_common.h
drawtxt.o: drawtxt.cpp ../include/grfonte.h $(COMMON)
drawtxt.o: drawtxt.cpp ../include/grfonte.h
gr_basic.o: gr_basic.cpp ../include/gr_basic.h $(COMMON) ../include/plot_common.h
gr_basic.o: gr_basic.cpp ../include/gr_basic.h ../include/plot_common.h
dcsvg.o: dcsvg.cpp $(COMMON) ../include/dcsvg.h
dcsvg.o: dcsvg.cpp ../include/dcsvg.h
projet_config.o: projet_config.cpp $(COMMON)
projet_config.o: projet_config.cpp
base_struct.o: base_struct.cpp $(COMMON)
base_struct.o: base_struct.cpp
eda_doc.o: eda_doc.cpp $(COMMON)
eda_doc.o: eda_doc.cpp
common.o: common.cpp $(COMMON)
common.o: common.cpp
gestfich.o: gestfich.cpp $(COMMON)
gestfich.o: gestfich.cpp
toolbars.o: toolbars.cpp $(COMMON)
toolbars.o: toolbars.cpp
msgpanel.o: msgpanel.cpp $(COMMON)
msgpanel.o: msgpanel.cpp
block_commande.o: block_commande.cpp $(COMMON)
block_commande.o: block_commande.cpp
string.o: string.cpp
......@@ -156,10 +193,10 @@ trigo.o: trigo.cpp ../include/trigo.h
bitmaps.o: bitmaps.cpp ../include/bitmaps.h
edaappl.o: edaappl.cpp $(COMMON) ../include/worksheet.h\
edaappl.o: edaappl.cpp ../include/worksheet.h\
../include/common.h ../include/gr_basic.h\
../include/build_version.h
eda_dde.o: eda_dde.cpp $(COMMON) ../include/eda_dde.h
eda_dde.o: eda_dde.cpp ../include/eda_dde.h
displlst.o: displlst.cpp $(COMMON)
displlst.o: displlst.cpp
......@@ -6,10 +6,18 @@ include ../libs.win
include makefile.include
common.a: $(OBJECTS) ../libs.win makefile.include
ar ruv $@ $(OBJECTS)
all: common.a pcbcommon.a
common.a: $(COMMON_OBJECTS) ../libs.win makefile.include
ar ruv $@ $(COMMON_OBJECTS)
ranlib $@
pcbcommon.a: $(PCB_COMMON_OBJECTS) ../libs.win makefile.include
ar ruv $@ $(PCB_COMMON_OBJECTS)
ranlib $@
clean:
rm -f *.bak
rm -f *.o
......
/****************************************************/
/* class_drawpickedstruct.cpp */
/****************************************************/
/************************/
/* sch_item_struct.cpp */
/************************/
#include "fctsys.h"
#include "common.h"
......
......@@ -35,7 +35,6 @@ MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName )
wxString tmp, msg;
wxFileName fn;
MODULE* Module = NULL;
FILE* file;
for( ii = 0; ii < g_LibName_List.GetCount(); ii++ )
{
......@@ -54,7 +53,7 @@ MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName )
continue;
}
file = wxFopen( tmp, wxT( "rt" ) );
FILE* file = wxFopen( tmp, wxT( "rt" ) );
if( file == NULL )
{
......@@ -131,12 +130,9 @@ MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName )
}
fclose( file );
file = 0;
file = NULL;
}
if( file )
fclose( file );
msg.Printf( _( "Module %s not found" ), CmpName.GetData() );
DisplayError( this, msg );
return NULL;
......
......@@ -4,7 +4,7 @@ OBJSUFF = o
EXTRACPPFLAGS += -DCVPCB -I../include -Ibitmaps\
-I../pcbnew -I../cvpcb -I../share -I../3d-viewer -I ../polygon
EXTRALIBS = ../common/common.a ../bitmaps/libbitmaps.a\
EXTRALIBS = ../common/common.a ../common/pcbcommon.a ../bitmaps/libbitmaps.a\
../polygon/lib_polygon.a\
../polygon/kbool/src/libkbool.a
......
......@@ -12,7 +12,7 @@ include ../libs.win
$(TARGET).exe: $(OBJECTS) $(TARGET)_resources.o\
$(EDALIBS) $(LIBVIEWER3D) makefile.g95
$(EDALIBS) $(LIBVIEWER3D) makefile.mingw
$(CXX) $(ALL_LDFLAGS) -o $(TARGET).exe\
$(OBJECTS) $(LIBVIEWER3D) $(TARGET)_resources.o $(EDALIBS) $(SYSWXLIB)
......
......@@ -48,6 +48,7 @@ set(EESCHEMA_SRCS
dialog_edit_libentry_fields_in_lib.cpp
dialog_edit_libentry_fields_in_lib_base.cpp
dialog_eeschema_config.cpp
dialog_eeschema_config_fbp.cpp
dialog_erc.cpp
# dialog_find.cpp
dialog_options.cpp
......
......@@ -98,7 +98,7 @@ void Hierarchical_PIN_Sheet_Struct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, con
}
DrawGraphicText( panel, DC, wxPoint( tposx, posy ), txtcolor,
m_Text, TEXT_ORIENT_HORIZ, size,
side, GR_TEXT_VJUSTIFY_CENTER, LineWidth );
side, GR_TEXT_VJUSTIFY_CENTER, LineWidth, false, true );
}
/* dessin du symbole de connexion */
......
This diff is collapsed.
......@@ -195,7 +195,7 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
wxPoint( m_Pos.x + offset.x, m_Pos.y - TXTMARGE + offset.y ),
color, m_Text, TEXT_ORIENT_HORIZ, m_Size,
GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic );
GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic, true );
break;
case 1: /* Vert Orientation UP */
......@@ -204,7 +204,7 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
m_Pos.y + offset.y ),
color, m_Text, TEXT_ORIENT_VERT, m_Size,
GR_TEXT_HJUSTIFY_RIGHT,
GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic );
GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic, true );
break;
case 2: /* Horiz Orientation - Right justified */
......@@ -213,7 +213,7 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
TXTMARGE + offset.y ),
color, m_Text, TEXT_ORIENT_HORIZ, m_Size,
GR_TEXT_HJUSTIFY_RIGHT,
GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic );
GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic, true );
break;
case 3: /* Vert Orientation BOTTOM */
......@@ -222,7 +222,7 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
m_Pos.y + offset.y ),
color, m_Text, TEXT_ORIENT_VERT, m_Size,
GR_TEXT_HJUSTIFY_RIGHT,
GR_TEXT_VJUSTIFY_TOP, width, m_Italic );
GR_TEXT_VJUSTIFY_TOP, width, m_Italic, true );
break;
}
......@@ -448,28 +448,28 @@ void SCH_HIERLABEL::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offs
DrawGraphicText( panel, DC,
wxPoint( AnchorPos.x - ii, AnchorPos.y ), color,
m_Text, TEXT_ORIENT_HORIZ, m_Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER, width, m_Italic );
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER, width, m_Italic, true );
break;
case 1: /* Orientation vert UP */
DrawGraphicText( panel, DC,
wxPoint( AnchorPos.x, AnchorPos.y + ii ), color,
m_Text, TEXT_ORIENT_VERT, m_Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, width, m_Italic );
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, width, m_Italic, true );
break;
case 2: /* Orientation horiz inverse */
DrawGraphicText( panel, DC,
wxPoint( AnchorPos.x + ii, AnchorPos.y ), color,
m_Text, TEXT_ORIENT_HORIZ, m_Size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width, m_Italic );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width, m_Italic, true );
break;
case 3: /* Orientation vert BOTTOM */
DrawGraphicText( panel, DC,
wxPoint( AnchorPos.x, AnchorPos.y - ii ), color,
m_Text, TEXT_ORIENT_VERT, m_Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic );
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic, true );
break;
}
......@@ -519,7 +519,7 @@ EDA_Rect SCH_HIERLABEL::GetBoundingBox()
int width = MAX( m_Width, g_DrawMinimunLineWidth );
height = m_Size.y + 2*TXTMARGE;
length = ( Pitch(width) * GetLength() ) + height + 2*DANGLING_SYMBOL_SIZE; // add height for triangular shapes
length = ( Pitch(width) * NegableTextLength(m_Text) ) + height + 2*DANGLING_SYMBOL_SIZE; // add height for triangular shapes
switch( m_Orient ) // respect orientation
{
......@@ -605,28 +605,28 @@ void SCH_GLOBALLABEL::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& dr
DrawGraphicText( panel, DC,
wxPoint( AnchorPos.x - offset, AnchorPos.y ), color,
m_Text, TEXT_ORIENT_HORIZ, m_Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER, width, m_Italic );
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER, width, m_Italic, true );
break;
case 1: /* Orientation vert UP */
DrawGraphicText( panel, DC,
wxPoint( AnchorPos.x, AnchorPos.y + offset ), color,
m_Text, TEXT_ORIENT_VERT, m_Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, width, m_Italic );
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, width, m_Italic, true );
break;
case 2: /* Orientation horiz inverse */
DrawGraphicText( panel, DC,
wxPoint( AnchorPos.x + offset, AnchorPos.y ), color,
m_Text, TEXT_ORIENT_HORIZ, m_Size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width, m_Italic );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width, m_Italic, true );
break;
case 3: /* Orientation vert BOTTOM */
DrawGraphicText( panel, DC,
wxPoint( AnchorPos.x, AnchorPos.y - offset ), color,
m_Text, TEXT_ORIENT_VERT, m_Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic );
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, width, m_Italic, true );
break;
}
......@@ -647,15 +647,15 @@ void SCH_GLOBALLABEL::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& dr
*/
void SCH_GLOBALLABEL::CreateGraphicShape( int* corner_list, const wxPoint& Pos )
{
int HalfSize = m_Size.x / 2;
int HalfSize = m_Size.y / 2;
int width = MAX( m_Width, g_DrawMinimunLineWidth );
*corner_list = 7; corner_list++; // 7 corners in list
int symb_len = ( Pitch(width) * GetLength() ) + (TXTMARGE * 2);
int symb_len = ( Pitch(width) * NegableTextLength(m_Text) ) + (TXTMARGE * 2);
// Create outline shape : 6 points
int x = symb_len + width + 3;
int y = HalfSize + width + 3;
int y = HalfSize*1.5 + width + 3; /* 50% more for negation bar */
corner_list[0] = 0; corner_list[1] = 0; // Starting point (anchor)
corner_list[2] = 0; corner_list[3] = -y; // Up
corner_list[4] = -x; corner_list[5] = -y; // left Up
......@@ -734,7 +734,7 @@ EDA_Rect SCH_GLOBALLABEL::GetBoundingBox()
int width = MAX( m_Width, g_DrawMinimunLineWidth );
height = m_Size.y + 2*TXTMARGE;
length = ( Pitch(width) * GetLength() ) + 2* height + 2*DANGLING_SYMBOL_SIZE; // add 2*height for triangular shapes (bidirectional)
length = ( Pitch(width) * NegableTextLength(m_Text) ) + 2* height + 2*DANGLING_SYMBOL_SIZE; // add 2*height for triangular shapes (bidirectional)
switch( m_Orient ) // respect orientation
{
......@@ -782,7 +782,7 @@ EDA_Rect SCH_TEXT::GetBoundingBox()
x = m_Pos.x;
y = m_Pos.y;
int width = MAX( m_Width, g_DrawMinimunLineWidth );
length = ( Pitch(width) * GetLength() );
length = ( Pitch(width) * NegableTextLength(m_Text) );
height = m_Size.y;
dx = dy = 0;
......
......@@ -203,8 +203,7 @@ void DIALOG_BUILD_BOM::OnCancelClick( wxCommandEvent& event )
void DIALOG_BUILD_BOM::SavePreferences()
/**************************************************/
{
wxConfig* config = wxGetApp().m_EDA_Config;
wxASSERT( config != NULL );
wxASSERT( m_Config != NULL );
// Determine current settings of "List items" and "Options" checkboxes
// (NOTE: These 6 settings are restored when the dialog box is next
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_eeschema_config.h
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 17/02/2006 21:14:46
// RCS-ID:
// Copyright: License GNU
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 17/02/2006 21:14:46
#ifndef _DIALOG_EESCHEMA_CONFIG_H_
#define _DIALOG_EESCHEMA_CONFIG_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "dialog_eeschema_config.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 SAVE_CFG 10001
#define FORMAT_NETLIST 10006
#define REMOVE_LIB 10009
#define ADD_LIB 10010
#define INSERT_LIB 10011
#define ID_LISTBOX 10012
#define ID_TEXTCTRL 10007
#define ID_LIB_PATH_SEL 10008
#define SYMBOL_KICONFIGEESCHEMAFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_KICONFIGEESCHEMAFRAME_TITLE _("Dialog")
#define SYMBOL_KICONFIGEESCHEMAFRAME_IDNAME ID_DIALOG
#define SYMBOL_KICONFIGEESCHEMAFRAME_SIZE wxSize(400, 300)
#define SYMBOL_KICONFIGEESCHEMAFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
* KiConfigEeschemaFrame class declaration
*/
class KiConfigEeschemaFrame: public wxDialog
{
DECLARE_DYNAMIC_CLASS( KiConfigEeschemaFrame )
DECLARE_EVENT_TABLE()
public:
/// Constructors
KiConfigEeschemaFrame( );
KiConfigEeschemaFrame( WinEDA_SchematicFrame* parent, wxWindowID id = SYMBOL_KICONFIGEESCHEMAFRAME_IDNAME, const wxString& caption = SYMBOL_KICONFIGEESCHEMAFRAME_TITLE, const wxPoint& pos = SYMBOL_KICONFIGEESCHEMAFRAME_POSITION, const wxSize& size = SYMBOL_KICONFIGEESCHEMAFRAME_SIZE, long style = SYMBOL_KICONFIGEESCHEMAFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_KICONFIGEESCHEMAFRAME_IDNAME, const wxString& caption = SYMBOL_KICONFIGEESCHEMAFRAME_TITLE, const wxPoint& pos = SYMBOL_KICONFIGEESCHEMAFRAME_POSITION, const wxSize& size = SYMBOL_KICONFIGEESCHEMAFRAME_SIZE, long style = SYMBOL_KICONFIGEESCHEMAFRAME_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin KiConfigEeschemaFrame event handler declarations
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
void OnCloseWindow( wxCloseEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for SAVE_CFG
void OnSaveCfgClick( wxCommandEvent& event );
/// wxEVT_COMMAND_LISTBOX_SELECTED event handler for FORMAT_NETLIST
void OnFormatNetlistSelected( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for REMOVE_LIB
void OnRemoveLibClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ADD_LIB
void OnAddLibClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for INSERT_LIB
void OnInsertLibClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_LIB_PATH_SEL
void OnLibPathSelClick( wxCommandEvent& event );
////@end KiConfigEeschemaFrame event handler declarations
////@begin KiConfigEeschemaFrame member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end KiConfigEeschemaFrame member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
void SetFormatsNetListes();
void LibDelFct(wxCommandEvent& event);
void AddOrInsertLibrary(wxCommandEvent& event);
void ChangeSetup();
////@begin KiConfigEeschemaFrame member variables
wxListBox* m_NetFormatBox;
wxStaticBoxSizer* m_FileExtList;
wxListBox* m_ListLibr;
wxTextCtrl* m_LibDirCtrl;
////@end KiConfigEeschemaFrame member variables
WinEDA_SchematicFrame * m_Parent;
bool m_LibListChanged;
};
#endif
// _DIALOG_EESCHEMA_CONFIG_H_
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_eeschema_config_fbp.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( 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( wxVERTICAL );
wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
m_staticTextNetListFormats = new wxStaticText( this, wxID_ANY, _("NetList Formats:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetListFormats->Wrap( -1 );
bLeftSizer->Add( m_staticTextNetListFormats, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_NetFormatBox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE );
bLeftSizer->Add( m_NetFormatBox, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bLeftSizer->Add( 0, 20, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sFileExtBox;
sFileExtBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Files ext:") ), wxVERTICAL );
m_InfoCmpFileExt = new wxStaticText( this, wxID_ANY, _("Cmp file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
m_InfoCmpFileExt->Wrap( -1 );
sFileExtBox->Add( m_InfoCmpFileExt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_InfoNetFileExt = new wxStaticText( this, wxID_ANY, _("Net file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
m_InfoNetFileExt->Wrap( -1 );
sFileExtBox->Add( m_InfoNetFileExt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_InfoLibFileExt = new wxStaticText( this, wxID_ANY, _("Library file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
m_InfoLibFileExt->Wrap( -1 );
sFileExtBox->Add( m_InfoLibFileExt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_InfoSymbFileExt = new wxStaticText( this, wxID_ANY, _("Symbol file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
m_InfoSymbFileExt->Wrap( -1 );
sFileExtBox->Add( m_InfoSymbFileExt, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_InfoSchFileExt = new wxStaticText( this, wxID_ANY, _("Schematic file Ext: "), wxDefaultPosition, wxDefaultSize, 0 );
m_InfoSchFileExt->Wrap( -1 );
sFileExtBox->Add( m_InfoSchFileExt, 0, wxALL, 5 );
bLeftSizer->Add( sFileExtBox, 0, wxEXPAND, 5 );
bUpperSizer->Add( bLeftSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbLibsChoiceSizer;
sbLibsChoiceSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Libraries") ), wxVERTICAL );
wxBoxSizer* bLibsButtonsSizer;
bLibsButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
sbLibsChoiceSizer->Add( bLibsButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
m_staticTextlibList = new wxStaticText( this, wxID_ANY, _("Active Libraries:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextlibList->Wrap( -1 );
sbLibsChoiceSizer->Add( m_staticTextlibList, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_ListLibr = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE );
m_ListLibr->SetToolTip( _("List of active library files.\nOnly library files in this list are loaded by Eeschema.\nThe order of this list is important:\nEeschema searchs for a given component using this list order priority.") );
m_ListLibr->SetMinSize( wxSize( 300,-1 ) );
sbLibsChoiceSizer->Add( m_ListLibr, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bUpperSizer->Add( sbLibsChoiceSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL );
m_buttonRemove = new wxButton( this, ID_REMOVE_LIB, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonRemove->SetForegroundColour( wxColour( 186, 1, 38 ) );
m_buttonRemove->SetToolTip( _("Unload the selected library") );
bRightSizer->Add( m_buttonRemove, 0, wxALL, 5 );
m_buttonAdd = new wxButton( this, ID_ADD_LIB, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonAdd->SetForegroundColour( wxColour( 13, 118, 1 ) );
m_buttonAdd->SetToolTip( _("Add a new library after the selected library, and load it") );
bRightSizer->Add( m_buttonAdd, 0, wxALL, 5 );
m_buttonIns = new wxButton( this, wxID_ANY, _("Ins"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonIns->SetForegroundColour( wxColour( 0, 65, 130 ) );
m_buttonIns->SetToolTip( _("Add a new library before the selected library, and load it") );
bRightSizer->Add( m_buttonIns, 0, wxALL, 5 );
bRightSizer->Add( 0, 20, 1, wxEXPAND, 5 );
m_buttonOk = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizer->Add( m_buttonOk, 0, wxALL, 5 );
m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonCancel->SetForegroundColour( wxColour( 14, 0, 179 ) );
bRightSizer->Add( m_buttonCancel, 0, wxALL, 5 );
m_buttonSave = new wxButton( this, ID_SAVE_CFG, _("Save Cfg"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonSave->SetToolTip( _("Accept and save current configuration setting in the local .pro file") );
bRightSizer->Add( m_buttonSave, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bUpperSizer->Add( bRightSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
bMainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
wxStaticBoxSizer* sbLibPathSizer;
sbLibPathSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Default library file path:") ), wxHORIZONTAL );
m_LibDirCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LibDirCtrl->SetToolTip( _("Default path to search libraries which have no absolute path in name,\nor a name which does not start by ./ or ../\nIf void, the default path is kicad/share/library") );
sbLibPathSizer->Add( m_LibDirCtrl, 1, wxALL, 5 );
m_buttonBrowse = new wxButton( this, ID_LIB_PATH_SEL, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
sbLibPathSizer->Add( m_buttonBrowse, 0, wxALL, 5 );
bMainSizer->Add( sbLibPathSizer, 0, wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout();
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCloseWindow ) );
m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveLibClick ), NULL, this );
m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
m_buttonIns->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
m_buttonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnOkClick ), NULL, this );
m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCancelClick ), NULL, this );
m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnSaveCfgClick ), NULL, this );
m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnLibPathSelClick ), NULL, this );
}
DIALOG_EESCHEMA_CONFIG_FBP::~DIALOG_EESCHEMA_CONFIG_FBP()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCloseWindow ) );
m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnRemoveLibClick ), NULL, this );
m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
m_buttonIns->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnAddOrInsertLibClick ), NULL, this );
m_buttonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnOkClick ), NULL, this );
m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnCancelClick ), NULL, this );
m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnSaveCfgClick ), NULL, this );
m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EESCHEMA_CONFIG_FBP::OnLibPathSelClick ), NULL, this );
}
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_eeschema_config_fbp__
#define __dialog_eeschema_config_fbp__
#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/listbox.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/button.h>
#include <wx/statline.h>
#include <wx/textctrl.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_EESCHEMA_CONFIG_FBP
///////////////////////////////////////////////////////////////////////////////
class DIALOG_EESCHEMA_CONFIG_FBP : public wxDialog
{
private:
protected:
enum
{
ID_REMOVE_LIB = 1000,
ID_ADD_LIB,
ID_SAVE_CFG,
ID_LIB_PATH_SEL,
};
wxStaticText* m_staticTextNetListFormats;
wxListBox* m_NetFormatBox;
wxStaticText* m_InfoCmpFileExt;
wxStaticText* m_InfoNetFileExt;
wxStaticText* m_InfoLibFileExt;
wxStaticText* m_InfoSymbFileExt;
wxStaticText* m_InfoSchFileExt;
wxStaticText* m_staticTextlibList;
wxListBox* m_ListLibr;
wxButton* m_buttonRemove;
wxButton* m_buttonAdd;
wxButton* m_buttonIns;
wxButton* m_buttonOk;
wxButton* m_buttonCancel;
wxButton* m_buttonSave;
wxStaticLine* m_staticline1;
wxTextCtrl* m_LibDirCtrl;
wxButton* m_buttonBrowse;
// Virtual event handlers, overide them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ){ event.Skip(); }
virtual void OnRemoveLibClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnAddOrInsertLibClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnSaveCfgClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnLibPathSelClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 593,400 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EESCHEMA_CONFIG_FBP();
};
#endif //__dialog_eeschema_config_fbp__
......@@ -40,6 +40,7 @@ OBJECTS = eeschema.o\
tool_sch.o\
tool_viewlib.o\
schframe.o\
sch_item_struct.o\
viewlib_frame.o\
dialog_print_using_printer_base.o\
dialog_print_using_printer.o\
......@@ -52,6 +53,7 @@ OBJECTS = eeschema.o\
block_libedit.o\
eeredraw.o\
dialog_eeschema_config.o\
dialog_eeschema_config_fbp.o\
eelayer.o \
priorque.o eeconfig.o \
getpart.o\
......@@ -191,8 +193,12 @@ onleftclick.o: onleftclick.cpp $(DEPEND)
eeredraw.o: eeredraw.cpp $(DEPEND)
dialog_eeschema_config.o: dialog_eeschema_config.cpp dialog_eeschema_config.h $(DEPEND)
dialog_eeschema_config.o: dialog_eeschema_config.cpp dialog_eeschema_config_fbp.h $(DEPEND)
dialog_eeschema_config_fbp.o: dialog_eeschema_config_fbp.cpp dialog_eeschema_config_fbp.h $(DEPEND)
libedit.o: libedit.cpp $(DEPEND)
sch_item_struct.o: ../common/sch_item_struct.cpp
$(CXX) -c $(EDACPPFLAGS) -o $@ ../common/$*.cpp
EXTRALIBS = ../common/common.a ../bitmaps/libbitmaps.a\
EXTRALIBS = ../common/common.a ../common/pcbcommon.a ../bitmaps/libbitmaps.a\
../polygon/lib_polygon.a ../polygon/kbool/src/libkbool.a
EXTRACPPFLAGS= -DGERBVIEW -DPCBNEW -fno-strict-aliasing\
......
......@@ -10,6 +10,11 @@
class WinEDA_DrawPanel;
/** Function NegableTextLength
* Return the text length of a negable string, excluding the ~ markers */
int NegableTextLength( const wxString& aText );
/** Function DrawGraphicText
* Draw a graphic text (like module texts)
* @param aPanel = the current DrawPanel. NULL if draw within a 3D GL Canvas
......@@ -24,21 +29,23 @@ class WinEDA_DrawPanel;
* @param aWidth = line width (pen width) (default = 0)
* if width < 0 : draw segments in sketch mode, width = abs(width)
* @param aItalic = true to simulate an italic font
* @param aNegable = true to enable the ~ char for overbarring
* @param aCallback() = function called (if non null) to draw each segment.
* used to draw 3D texts or for plotting, NULL for normal drawings
*/
void DrawGraphicText( WinEDA_DrawPanel* aPanel,
wxDC* aDC,
const wxPoint& aPos,
void DrawGraphicText( WinEDA_DrawPanel * aPanel,
wxDC * aDC,
const wxPoint &aPos,
enum EDA_Colors aColor,
const wxString& aText,
const wxString &aText,
int aOrient,
const wxSize& aSize,
const wxSize &aSize,
enum GRTextHorizJustifyType aH_justify,
enum GRTextVertJustifyType aV_justify,
int aWidth = 0,
bool aItalic = false,
void (*aCallback)(int x0, int y0, int xf, int yf) = NULL);
bool aNegable = false,
void (*aCallback)( int x0, int y0, int xf, int yf ) = NULL );
/** Function PlotGraphicText
* same as DrawGraphicText, but plot graphic text insteed of draw it
......@@ -53,6 +60,7 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
* @param aWidth = line width (pen width) (default = 0)
* if width < 0 : draw segments in sketch mode, width = abs(width)
* @param aItalic = true to simulate an italic font
* @param aNegable = true to enable the ~ char for overbarring
*/
void PlotGraphicText( int aFormat_plot,
const wxPoint& aPos,
......@@ -63,8 +71,8 @@ void PlotGraphicText( int aFormat_plot,
enum GRTextHorizJustifyType aH_justify,
enum GRTextVertJustifyType aV_justify,
int aWidth,
bool aItalic = false );
bool aItalic = false,
bool aNegable = false );
#endif /* __INCLUDE__DRAWTXT_H__ */
No preview for this file type
This diff is collapsed.
KICAD_SUBDIRS = common bitmaps 3d-viewer polygon polygon/kbool/src eeschema eeschema/plugins pcbnew kicad cvpcb gerbview
KICAD_SUBDIRS_BIN = eeschema eeschema/plugins pcbnew cvpcb kicad gerbview
# How to invoke make:
MAKE = make -k -f makefile.g95
MAKE_INSTALL = make -f makefile.g95 install
MAKE_CLEAN = make -f makefile.g95 clean
MAKE = make -k -f makefile.mingw
MAKE_INSTALL = make -f makefile.mingw install
MAKE_CLEAN = make -f makefile.mingw clean
all:
@for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE)); done
......
......@@ -70,11 +70,19 @@ void ZONE_CONTAINER::SetNet( int anet_code )
if( m_Parent )
{
EQUIPOT* net = ( (BOARD*) m_Parent )->FindNet( anet_code );
BOARD* board = (BOARD*) m_Parent;
EQUIPOT* net = board->FindNet( anet_code );
if( net )
m_Netname = net->GetNetname();
else
m_Netname.Empty();
// Set corresponding SEGZONE items if this zone uses fill areas by segments
for( SEGZONE* zseg = board->m_Zone; zseg; zseg = zseg->Next() )
{
if ( zseg->m_TimeStamp == m_TimeStamp )
zseg->SetNet(GetNet());
}
}
else
m_Netname.Empty();
......
......@@ -77,7 +77,7 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC )
if( file == NULL )
{
wxString msg;
msg.Printf( _( "File <%s> not found" ), dlg.GetPath() );
msg.Printf( _( "File <%s> not found" ), dlg.GetPath().GetData() );
DisplayError( this, msg );
return NULL;
}
......
EXTRALIBS = ../common/common.a ../bitmaps/libbitmaps.a\
EXTRALIBS = ../common/common.a ../common/pcbcommon.a ../bitmaps/libbitmaps.a\
../polygon/lib_polygon.a\
../polygon/kbool/src/libkbool.a
......@@ -49,14 +49,7 @@ OBJECTS= $(TARGET).o\
setpage.o \
tool_pcb.o \
pcbframe.o \
class_drawsegment.o \
class_track.o \
class_cotation.o\
class_equipot.o \
class_module.o \
class_edge_mod.o \
class_text_mod.o\
class_board_item.o\
track.o \
set_color.o \
set_grid.o \
......@@ -65,7 +58,6 @@ OBJECTS= $(TARGET).o\
affiche.o \
swap_layers.o \
tracepcb.o \
tracemod.o \
trpiste.o \
surbrill.o \
edit_pcb_text.o \
......@@ -154,16 +146,6 @@ export_gencad.o: export_gencad.cpp
print_board_functions.o: print_board_functions.cpp
class_track.o: class_track.cpp class_track.h
class_equipot.o: class_equipot.cpp
class_module.o: class_module.cpp
class_edge_mod.o: class_edge_mod.cpp
class_text_mod.o: class_text_mod.cpp
pcbnew.o: pcbnew.cpp pcbnew.h pcbplot.h drag.h \
autorout.h ../include/eda_dde.h
......@@ -179,8 +161,6 @@ swap_layers.o: swap_layers.cpp
tracepcb.o: tracepcb.cpp
tracemod.o: tracemod.cpp ../include/grfonte.h
trpiste.o: trpiste.cpp
surbrill.o: surbrill.cpp
......
......@@ -11,7 +11,7 @@ all: $(TARGET).exe
include makefile.include
$(TARGET).exe: $(OBJECTS) $(TARGET)_resources.o\
$(EDALIBS) $(LIBVIEWER3D) makefile.g95
$(EDALIBS) $(LIBVIEWER3D) makefile.mingw
$(CXX) $(ALL_LDFLAGS) -o $(TARGET).exe\
$(OBJECTS) $(LIBVIEWER3D) $(TARGET)_resources.o $(EDALIBS) $(SYSWXLIB)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment