Commit 62a28440 authored by CHARRAS's avatar CHARRAS

wxstruct modified and wxPcbStuct.h added. some minor other changes

parent 0aaf01e9
/* XPM */
#ifndef XPMMAIN
extern const char *Add_Corner_xpm[];
#else
const char * Add_Corner_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 7 1",
" c None",
"X c #808080",
". c #008000",
"+ c #FFFF00",
"@ c #800000",
"o c #C0C0C0",
"O c #808000",
/* pixels */
" .XX ",
" .XX ",
" XooO ",
" ooX ",
"..X ooooX ..... ",
"X.XoooooX XXXXXX",
"XX ooo++O XXXXXX",
" X OOO@ X ",
" X X ",
" X.XX ",
" .XX ",
" .XX ",
" .XX ",
" .XX ",
" .XX ",
" XX "
};
#endif
/* XPM */ /* XPM */
static const char * add_zone_xpm[] = { #ifndef XPMMAIN
"16 16 3 1", extern const char *add_zone_xpm[];
" c None",
". c #007D00", #else
"+ c #007E00", const char * add_zone_xpm[] = {
"................", "16 16 3 1",
".... ........", " c None",
"... .......", ". c #007D00",
".. ++ .....", "+ c #007E00",
". .... ...", "................",
". +. ..... ..", ".... ........",
". +. ...... ..", "... .......",
". .... .. .", ".. ++ .....",
".. ++ .. ", ". .... ...",
"... .. ... ", ". +. ..... ..",
".... .... ...", ". +. ...... ..",
"............ ..", ". .... .. .",
"............. .", ".. ++ .. ",
".............. .", "... .. ... ",
"............... ", ".... .... ...",
"............... "}; "............ ..",
"............. .",
".............. .",
"............... ",
"............... "};
#endif
/* XPM */
#ifndef XPMMAIN
extern const char *add_zone_cutout[];
#else
const char * add_zone_cutout[] = {
"16 16 3 1",
" c None",
". c #007D00",
"+ c #900000",
" ..............",
".... ........",
"... ++++ .......",
".. + + .....",
". + + ...",
". + + ..",
". + + ..",
". + + .",
".. + + ..",
"... +++++++ ... ",
".... .... ",
"............ ",
"............. ",
".............. ",
" ............. ",
" ............ "};
#endif
...@@ -4,6 +4,13 @@ Started 2007-June-11 ...@@ -4,6 +4,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2008-jan-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+all
wxstruct modified and wxPcbStuct.h added:
classes relatives to pcbnew, cvpcb and gerbview are moved in wxPcbStuct.h
2007-Dec-29 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-Dec-29 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
+pcbnew: +pcbnew:
......
...@@ -73,9 +73,9 @@ wxString title; ...@@ -73,9 +73,9 @@ wxString title;
m_Parent = parent; m_Parent = parent;
m_DoUpdate = TRUE; m_DoUpdate = TRUE;
Create(parent, id, caption, pos, size, style);
title = _("from ") + g_EDA_Appl->m_CurrentOptionFile; title = _("from ") + g_EDA_Appl->m_CurrentOptionFile;
SetTitle(title); SetTitle(title);
Create(parent, id, caption, pos, size, style);
} }
/*! /*!
......
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
#include "../bitmaps/plot_PS.xpm" #include "../bitmaps/plot_PS.xpm"
#include "../bitmaps/plot_HPG.xpm" #include "../bitmaps/plot_HPG.xpm"
#include "../bitmaps/Add_Zone.xpm"
#include "../bitmaps/Add_Zone_Cutout.xpm"
#include "../bitmaps/Add_Corner.xpm"
#include "../bitmaps/Add_Circle.xpm" #include "../bitmaps/Add_Circle.xpm"
#include "../bitmaps/Add_Line.xpm" #include "../bitmaps/Add_Line.xpm"
#include "../bitmaps/Add_Arc.xpm" #include "../bitmaps/Add_Arc.xpm"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE #ifdef EDA_BASE
(wxT("(2007-12-22)")) (wxT("(2008-01-01)"))
#endif #endif
; ;
......
...@@ -558,6 +558,9 @@ enum main_id { ...@@ -558,6 +558,9 @@ enum main_id {
ID_POPUP_PCB_FILL_ZONE, ID_POPUP_PCB_FILL_ZONE,
ID_POPUP_PCB_DELETE_ZONE_CONTAINER, ID_POPUP_PCB_DELETE_ZONE_CONTAINER,
ID_POPUP_PCB_PLACE_ZONE_CORNER, ID_POPUP_PCB_PLACE_ZONE_CORNER,
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE,
ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE,
ID_POPUP_ZONE_UNUSED1,
ID_POPUP_ZONE_UNUSED2, ID_POPUP_ZONE_UNUSED2,
ID_POPUP_ZONE_UNUSED3, ID_POPUP_ZONE_UNUSED3,
ID_POPUP_ZONE_UNUSED4, ID_POPUP_ZONE_UNUSED4,
......
...@@ -129,16 +129,16 @@ enum Track_Shapes { ...@@ -129,16 +129,16 @@ enum Track_Shapes {
S_POLYGON /* polygon shape */ S_POLYGON /* polygon shape */
}; };
/* Forward declaration */ /* Forward declaration */
class MODULE;
class EQUIPOT; class EQUIPOT;
class MARKER; class MARKER;
class TRACK;
class D_PAD;
struct CHEVELU; struct CHEVELU;
class Ki_PageDescr; //class Ki_PageDescr;
class DrawBlockStruct; //class DrawBlockStruct;
/* main window classes : */
#include "wxPcbStruct.h"
/* Class to handle a board */ /* Class to handle a board */
#include "class_board.h" #include "class_board.h"
......
This diff is collapsed.
This diff is collapsed.
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "bitmaps.h" #include "bitmaps.h"
#include "add_cotation.xpm" #include "add_cotation.xpm"
#include "Add_Mires.xpm" #include "Add_Mires.xpm"
#include "Add_Zone.xpm"
/********************************************************/ /********************************************************/
......
...@@ -449,6 +449,14 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -449,6 +449,14 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
Edit_Zone_Params( &dc, (ZONE_CONTAINER*) GetCurItem() ); Edit_Zone_Params( &dc, (ZONE_CONTAINER*) GetCurItem() );
break; break;
case ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE:
wxMessageBox(wxT("ToDo"));
break;
case ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE:
wxMessageBox(wxT("ToDo"));
break;
case ID_POPUP_PCB_DELETE_ZONE_CONTAINER: case ID_POPUP_PCB_DELETE_ZONE_CONTAINER:
{ {
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
......
This diff is collapsed.
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "mw_Add_Gap.xpm" #include "mw_Add_Gap.xpm"
#include "mw_toolbar.xpm" #include "mw_toolbar.xpm"
#include "Add_Tracks.xpm" #include "Add_Tracks.xpm"
#include "Add_Zone.xpm"
#include "Show_Zone.xpm" #include "Show_Zone.xpm"
#include "net_hightlight.xpm" #include "net_hightlight.xpm"
#include "PcbOffset.xpm" #include "PcbOffset.xpm"
......
...@@ -29,7 +29,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose ) ...@@ -29,7 +29,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose )
* The zone outline is a frontier, and can be complex (with holes) * The zone outline is a frontier, and can be complex (with holes)
* The filling starts from starting points like pads, tracks. * The filling starts from starting points like pads, tracks.
* @param frame = reference to the main frame * @param frame = reference to the main frame
* @param DC = current Device Context * @param DC = current Device Context (can be NULL)
* @param verbose = true to show error messages * @param verbose = true to show error messages
* @return error level (0 = no error) * @return error level (0 = no error)
*/ */
...@@ -40,12 +40,10 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose ) ...@@ -40,12 +40,10 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose )
int save_isol = g_DesignSettings.m_TrackClearence; int save_isol = g_DesignSettings.m_TrackClearence;
wxPoint ZoneStartFill; wxPoint ZoneStartFill;
wxString msg; wxString msg;
PCB_SCREEN* Screen = frame->GetScreen();
BOARD* Pcb = frame->m_Pcb; BOARD* Pcb = frame->m_Pcb;
g_DesignSettings.m_TrackClearence = g_DesignSettings.m_ZoneClearence; g_DesignSettings.m_TrackClearence = g_DesignSettings.m_ZoneClearence;
g_HightLigth_NetCode = m_NetCode; g_HightLigth_NetCode = m_NetCode;
// Screen->m_Active_Layer = m_Layer;
s_TimeStamp = m_TimeStamp; s_TimeStamp = m_TimeStamp;
...@@ -234,7 +232,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose ) ...@@ -234,7 +232,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose )
} }
} }
if( Zone_Debug ) if( Zone_Debug && DC )
DisplayBoard( frame->DrawPanel, DC ); DisplayBoard( frame->DrawPanel, DC );
/* Filling the cells of the matrix (this is the zone building)*/ /* Filling the cells of the matrix (this is the zone building)*/
...@@ -250,7 +248,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose ) ...@@ -250,7 +248,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose )
if( m_PadOption == THERMAL_PAD ) if( m_PadOption == THERMAL_PAD )
PlaceCells( Pcb, g_HightLigth_NetCode, FORCE_PADS ); PlaceCells( Pcb, g_HightLigth_NetCode, FORCE_PADS );
if( Zone_Debug ) if( Zone_Debug && DC )
DisplayBoard( frame->DrawPanel, DC ); DisplayBoard( frame->DrawPanel, DC );
/* Convert the matrix information (cells) to segments which are actually the zone */ /* Convert the matrix information (cells) to segments which are actually the zone */
...@@ -291,7 +289,7 @@ static void Genere_Segments_Zone( WinEDA_PcbFrame* frame, wxDC* DC, int net_code ...@@ -291,7 +289,7 @@ static void Genere_Segments_Zone( WinEDA_PcbFrame* frame, wxDC* DC, int net_code
* 1 - From left to right and create horizontal zone segments * 1 - From left to right and create horizontal zone segments
* 2 - From top to bottom, and create vertical zone segments * 2 - From top to bottom, and create vertical zone segments
* @param net_code = net_code common to all segment zone created * @param net_code = net_code common to all segment zone created
* @param DC = current device context * @param DC = current device context ( can be NULL )
* @param frame = current WinEDA_PcbFrame * @param frame = current WinEDA_PcbFrame
* global: parameter TimeStamp: time stamp common to all segment zone created * global: parameter TimeStamp: time stamp common to all segment zone created
*/ */
...@@ -341,7 +339,8 @@ static void Genere_Segments_Zone( WinEDA_PcbFrame* frame, wxDC* DC, int net_code ...@@ -341,7 +339,8 @@ static void Genere_Segments_Zone( WinEDA_PcbFrame* frame, wxDC* DC, int net_code
pt_track->m_TimeStamp = s_TimeStamp; pt_track->m_TimeStamp = s_TimeStamp;
pt_track->Insert( frame->m_Pcb, NULL ); pt_track->Insert( frame->m_Pcb, NULL );
pt_track->Draw( frame->DrawPanel, DC, GR_OR ); if ( DC )
pt_track->Draw( frame->DrawPanel, DC, GR_OR );
nbsegm++; nbsegm++;
} }
} }
...@@ -385,7 +384,8 @@ static void Genere_Segments_Zone( WinEDA_PcbFrame* frame, wxDC* DC, int net_code ...@@ -385,7 +384,8 @@ static void Genere_Segments_Zone( WinEDA_PcbFrame* frame, wxDC* DC, int net_code
pt_track->m_TimeStamp = s_TimeStamp; pt_track->m_TimeStamp = s_TimeStamp;
pt_track->Insert( frame->m_Pcb, NULL ); pt_track->Insert( frame->m_Pcb, NULL );
pt_track->Draw( frame->DrawPanel, DC, GR_OR ); if( DC )
pt_track->Draw( frame->DrawPanel, DC, GR_OR );
nbsegm++; nbsegm++;
} }
} }
...@@ -654,7 +654,8 @@ bool WinEDA_PcbFrame::Genere_Pad_Connexion( wxDC* DC, int layer ) ...@@ -654,7 +654,8 @@ bool WinEDA_PcbFrame::Genere_Pad_Connexion( wxDC* DC, int layer )
} }
pt_track->Insert( m_Pcb, NULL ); pt_track->Insert( m_Pcb, NULL );
pt_track->Draw( DrawPanel, DC, GR_OR ); if( DC )
pt_track->Draw( DrawPanel, DC, GR_OR );
} }
} }
......
...@@ -77,7 +77,7 @@ void WinEDA_PcbFrame::Delete_Zone( wxDC* DC, SEGZONE* aZone, long aTimestamp ) ...@@ -77,7 +77,7 @@ void WinEDA_PcbFrame::Delete_Zone( wxDC* DC, SEGZONE* aZone, long aTimestamp )
*/ */
{ {
int nb_segm = 0; int nb_segm = 0;
bool modify = FALSE; bool modify = false;
unsigned long TimeStamp; unsigned long TimeStamp;
if( aZone == NULL ) if( aZone == NULL )
...@@ -113,7 +113,7 @@ void WinEDA_PcbFrame::Delete_Zone( wxDC* DC, SEGZONE* aZone, long aTimestamp ) ...@@ -113,7 +113,7 @@ void WinEDA_PcbFrame::Delete_Zone( wxDC* DC, SEGZONE* aZone, long aTimestamp )
EDGE_ZONE* WinEDA_PcbFrame::Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone ) EDGE_ZONE* WinEDA_PcbFrame::Del_SegmEdgeZone( wxDC* DC, EDGE_ZONE* edge_zone )
/*****************************************************************************/ /*****************************************************************************/
/* Used only while creating a new zonz outline /* Used only while creating a new zone outline
* Remove and delete the current outline segment in progress * Remove and delete the current outline segment in progress
*/ */
{ {
...@@ -441,7 +441,7 @@ void WinEDA_PcbFrame::End_Zone( wxDC* DC ) ...@@ -441,7 +441,7 @@ void WinEDA_PcbFrame::End_Zone( wxDC* DC )
if( net ) if( net )
polygon->m_Netname = net->m_Netname; polygon->m_Netname = net->m_Netname;
edge = m_Pcb->m_CurrentLimitZone; edge = m_Pcb->m_CurrentLimitZone;
polygon->Start( GetScreen()->m_Active_Layer, 0, NULL, polygon->Start( GetScreen()->m_Active_Layer, 0, 0,
edge->m_Start.x, edge->m_Start.y, edge->m_Start.x, edge->m_Start.y,
s_Zone_Hatching ); s_Zone_Hatching );
edge = edge->Next(); edge = edge->Next();
...@@ -585,13 +585,13 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v ...@@ -585,13 +585,13 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v
/* Show the Net */ /* Show the Net */
s_NetcodeSelection = zone_container->GetNet(); s_NetcodeSelection = zone_container->GetNet();
if( (g_HightLigth_NetCode > 0) && (g_HightLigth_NetCode != s_NetcodeSelection) ) if( (g_HightLigth_NetCode > 0) && (g_HightLigth_NetCode != s_NetcodeSelection) && DC )
{ {
Hight_Light( DC ); // Remove old hightlight selection Hight_Light( DC ); // Remove old hightlight selection
} }
g_HightLigth_NetCode = s_NetcodeSelection; g_HightLigth_NetCode = s_NetcodeSelection;
if( !g_HightLigt_Status ) if( !g_HightLigt_Status && DC)
Hight_Light( DC ); Hight_Light( DC );
if( g_HightLigth_NetCode > 0 ) if( g_HightLigth_NetCode > 0 )
...@@ -613,7 +613,7 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v ...@@ -613,7 +613,7 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v
msg = _( "No Net" ); msg = _( "No Net" );
Affiche_1_Parametre( this, 22, _( "NetName" ), msg, RED ); Affiche_1_Parametre( this, 22, _( "NetName" ), msg, RED );
wxBusyCursor dummy; // Shows an hourglass cursor (removed by its destructor)
zone_container->m_PadOption = s_Zone_Pad_Options; zone_container->m_PadOption = s_Zone_Pad_Options;
zone_container->m_ZoneClearance = g_DesignSettings.m_ZoneClearence; zone_container->m_ZoneClearance = g_DesignSettings.m_ZoneClearence;
zone_container->m_GridFillValue = g_GridRoutingSize; zone_container->m_GridFillValue = g_GridRoutingSize;
...@@ -641,13 +641,22 @@ int WinEDA_PcbFrame::Fill_All_Zones( wxDC* DC, bool verbose ) ...@@ -641,13 +641,22 @@ int WinEDA_PcbFrame::Fill_All_Zones( wxDC* DC, bool verbose )
ZONE_CONTAINER* zone_container; ZONE_CONTAINER* zone_container;
int error_level = 0; int error_level = 0;
// Remove all zones :
if ( m_Pcb->m_Zone )
{
m_Pcb->m_Zone->DeleteStructList();
m_Pcb->m_Zone = NULL;
m_Pcb->m_NbSegmZone = 0;
}
for( unsigned ii = 0; ii < m_Pcb->m_ZoneDescriptorList.size(); ii++ ) for( unsigned ii = 0; ii < m_Pcb->m_ZoneDescriptorList.size(); ii++ )
{ {
zone_container = m_Pcb->m_ZoneDescriptorList[ii]; zone_container = m_Pcb->m_ZoneDescriptorList[ii];
error_level = Fill_Zone( DC, zone_container, verbose ); error_level = Fill_Zone( NULL, zone_container, verbose );
if( error_level && ! verbose ) if( error_level && ! verbose )
break; break;
} }
DrawPanel->Refresh(true);
return error_level; return error_level;
} }
...@@ -38,6 +38,7 @@ CPolyLine::CPolyLine() ...@@ -38,6 +38,7 @@ CPolyLine::CPolyLine()
m_dlist = NULL; m_dlist = NULL;
m_HatchStyle = 0; m_HatchStyle = 0;
m_sel_box = 0; m_sel_box = 0;
utility = 0;
m_gpc_poly = new gpc_polygon; m_gpc_poly = new gpc_polygon;
m_gpc_poly->num_contours = 0; m_gpc_poly->num_contours = 0;
m_php_poly = new polygon; m_php_poly = new polygon;
......
...@@ -158,14 +158,15 @@ private: ...@@ -158,14 +158,15 @@ private:
int m_layer; // layer to draw on int m_layer; // layer to draw on
int m_Width; // line width int m_Width; // line width
int m_sel_box; // corner selection box width/2 int m_sel_box; // corner selection box width/2
public: int utility;
protected:
std::vector <CPolyPt> corner; // array of points for corners std::vector <CPolyPt> corner; // array of points for corners
std::vector <int> side_style; // array of styles for sides std::vector <int> side_style; // array of styles for sides
private: private:
std::vector <dl_element*> dl_side; // graphic elements std::vector <dl_element*> dl_side; // graphic elements
std::vector <dl_element*> dl_side_sel; std::vector <dl_element*> dl_side_sel;
std::vector <dl_element*> dl_corner_sel; std::vector <dl_element*> dl_corner_sel;
public: protected:
int m_HatchStyle; // hatch style, see enum above int m_HatchStyle; // hatch style, see enum above
std::vector <CSegment> m_HatchLines; // hatch lines std::vector <CSegment> m_HatchLines; // hatch lines
private: private:
......
...@@ -16,23 +16,23 @@ extern wxString g_Main_Title; ...@@ -16,23 +16,23 @@ extern wxString g_Main_Title;
// Local // Local
#ifdef GERBVIEW #ifdef GERBVIEW
static wxString MsgInfos(wxT("** GERBVIEW (jul 2001 .. 2007) **")); static wxString MsgInfos(wxT("** GERBVIEW (jul 2001 .. 2008) **"));
#else #else
#ifdef PCBNEW #ifdef PCBNEW
static wxString MsgInfos(wxT("** PCBNEW (sept 1992 .. 2007) **")); static wxString MsgInfos(wxT("** PCBNEW (sept 1992 .. 2008) **"));
#endif #endif
#endif #endif
#ifdef CVPCB #ifdef CVPCB
static wxString MsgInfos(wxT("** CVPCB (sept 1992 .. 2007) **")); static wxString MsgInfos(wxT("** CVPCB (sept 1992 .. 2008) **"));
#endif #endif
#ifdef KICAD #ifdef KICAD
static wxString MsgInfos(wxT("** KICAD (jul 2000 .. 2007) **")); static wxString MsgInfos(wxT("** KICAD (jul 2000 .. 2008) **"));
#endif #endif
#ifdef EESCHEMA #ifdef EESCHEMA
static wxString MsgInfos(wxT("** EESCHEMA (sept 1994 .. 2007) **")); static wxString MsgInfos(wxT("** EESCHEMA (sept 1994 .. 2008) **"));
#endif #endif
// Routines Locales // Routines Locales
......
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