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 */
static const char * add_zone_xpm[] = {
"16 16 3 1",
" c None",
". c #007D00",
"+ c #007E00",
"................",
".... ........",
"... .......",
".. ++ .....",
". .... ...",
". +. ..... ..",
". +. ...... ..",
". .... .. .",
".. ++ .. ",
"... .. ... ",
".... .... ...",
"............ ..",
"............. .",
".............. .",
"............... ",
"............... "};
/* XPM */
#ifndef XPMMAIN
extern const char *add_zone_xpm[];
#else
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
Please add newer entries at the top, list the date and your name with
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>
================================================================================
+pcbnew:
......
......@@ -73,9 +73,9 @@ wxString title;
m_Parent = parent;
m_DoUpdate = TRUE;
Create(parent, id, caption, pos, size, style);
title = _("from ") + g_EDA_Appl->m_CurrentOptionFile;
SetTitle(title);
Create(parent, id, caption, pos, size, style);
}
/*!
......
......@@ -34,6 +34,9 @@
#include "../bitmaps/plot_PS.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_Line.xpm"
#include "../bitmaps/Add_Arc.xpm"
......
......@@ -5,7 +5,7 @@
COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE
(wxT("(2007-12-22)"))
(wxT("(2008-01-01)"))
#endif
;
......
......@@ -558,6 +558,9 @@ enum main_id {
ID_POPUP_PCB_FILL_ZONE,
ID_POPUP_PCB_DELETE_ZONE_CONTAINER,
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_UNUSED3,
ID_POPUP_ZONE_UNUSED4,
......
......@@ -129,16 +129,16 @@ enum Track_Shapes {
S_POLYGON /* polygon shape */
};
/* Forward declaration */
class MODULE;
class EQUIPOT;
class MARKER;
class TRACK;
class D_PAD;
struct CHEVELU;
class Ki_PageDescr;
class DrawBlockStruct;
//class Ki_PageDescr;
//class DrawBlockStruct;
/* main window classes : */
#include "wxPcbStruct.h"
/* Class to handle a board */
#include "class_board.h"
......
This diff is collapsed.
This diff is collapsed.
......@@ -14,7 +14,6 @@
#include "bitmaps.h"
#include "add_cotation.xpm"
#include "Add_Mires.xpm"
#include "Add_Zone.xpm"
/********************************************************/
......
......@@ -449,6 +449,14 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
Edit_Zone_Params( &dc, (ZONE_CONTAINER*) GetCurItem() );
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:
{
DrawPanel->MouseToCursorSchema();
......
This diff is collapsed.
......@@ -36,7 +36,6 @@
#include "mw_Add_Gap.xpm"
#include "mw_toolbar.xpm"
#include "Add_Tracks.xpm"
#include "Add_Zone.xpm"
#include "Show_Zone.xpm"
#include "net_hightlight.xpm"
#include "PcbOffset.xpm"
......
......@@ -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 filling starts from starting points like pads, tracks.
* @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
* @return error level (0 = no error)
*/
......@@ -40,12 +40,10 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose )
int save_isol = g_DesignSettings.m_TrackClearence;
wxPoint ZoneStartFill;
wxString msg;
PCB_SCREEN* Screen = frame->GetScreen();
BOARD* Pcb = frame->m_Pcb;
g_DesignSettings.m_TrackClearence = g_DesignSettings.m_ZoneClearence;
g_HightLigth_NetCode = m_NetCode;
// Screen->m_Active_Layer = m_Layer;
g_HightLigth_NetCode = m_NetCode;
s_TimeStamp = m_TimeStamp;
......@@ -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 );
/* 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 )
if( m_PadOption == THERMAL_PAD )
PlaceCells( Pcb, g_HightLigth_NetCode, FORCE_PADS );
if( Zone_Debug )
if( Zone_Debug && DC )
DisplayBoard( frame->DrawPanel, DC );
/* 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
* 1 - From left to right and create horizontal zone segments
* 2 - From top to bottom, and create vertical zone segments
* @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
* 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
pt_track->m_TimeStamp = s_TimeStamp;
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++;
}
}
......@@ -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->Insert( frame->m_Pcb, NULL );
pt_track->Draw( frame->DrawPanel, DC, GR_OR );
if( DC )
pt_track->Draw( frame->DrawPanel, DC, GR_OR );
nbsegm++;
}
}
......@@ -654,7 +654,8 @@ bool WinEDA_PcbFrame::Genere_Pad_Connexion( wxDC* DC, int layer )
}
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 )
*/
{
int nb_segm = 0;
bool modify = FALSE;
bool modify = false;
unsigned long TimeStamp;
if( aZone == NULL )
......@@ -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 )
/*****************************************************************************/
/* 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
*/
{
......@@ -441,7 +441,7 @@ void WinEDA_PcbFrame::End_Zone( wxDC* DC )
if( net )
polygon->m_Netname = net->m_Netname;
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,
s_Zone_Hatching );
edge = edge->Next();
......@@ -585,13 +585,13 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v
/* Show the Net */
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;
if( !g_HightLigt_Status )
if( !g_HightLigt_Status && DC)
Hight_Light( DC );
if( g_HightLigth_NetCode > 0 )
......@@ -613,7 +613,7 @@ int WinEDA_PcbFrame::Fill_Zone( wxDC* DC, ZONE_CONTAINER* zone_container, bool v
msg = _( "No Net" );
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_ZoneClearance = g_DesignSettings.m_ZoneClearence;
zone_container->m_GridFillValue = g_GridRoutingSize;
......@@ -641,13 +641,22 @@ int WinEDA_PcbFrame::Fill_All_Zones( wxDC* DC, bool verbose )
ZONE_CONTAINER* zone_container;
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++ )
{
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 )
break;
}
DrawPanel->Refresh(true);
return error_level;
}
......@@ -38,6 +38,7 @@ CPolyLine::CPolyLine()
m_dlist = NULL;
m_HatchStyle = 0;
m_sel_box = 0;
utility = 0;
m_gpc_poly = new gpc_polygon;
m_gpc_poly->num_contours = 0;
m_php_poly = new polygon;
......
......@@ -158,14 +158,15 @@ private:
int m_layer; // layer to draw on
int m_Width; // line width
int m_sel_box; // corner selection box width/2
public:
int utility;
protected:
std::vector <CPolyPt> corner; // array of points for corners
std::vector <int> side_style; // array of styles for sides
private:
std::vector <dl_element*> dl_side; // graphic elements
std::vector <dl_element*> dl_side_sel;
std::vector <dl_element*> dl_corner_sel;
public:
protected:
int m_HatchStyle; // hatch style, see enum above
std::vector <CSegment> m_HatchLines; // hatch lines
private:
......
......@@ -16,23 +16,23 @@ extern wxString g_Main_Title;
// Local
#ifdef GERBVIEW
static wxString MsgInfos(wxT("** GERBVIEW (jul 2001 .. 2007) **"));
static wxString MsgInfos(wxT("** GERBVIEW (jul 2001 .. 2008) **"));
#else
#ifdef PCBNEW
static wxString MsgInfos(wxT("** PCBNEW (sept 1992 .. 2007) **"));
static wxString MsgInfos(wxT("** PCBNEW (sept 1992 .. 2008) **"));
#endif
#endif
#ifdef CVPCB
static wxString MsgInfos(wxT("** CVPCB (sept 1992 .. 2007) **"));
static wxString MsgInfos(wxT("** CVPCB (sept 1992 .. 2008) **"));
#endif
#ifdef KICAD
static wxString MsgInfos(wxT("** KICAD (jul 2000 .. 2007) **"));
static wxString MsgInfos(wxT("** KICAD (jul 2000 .. 2008) **"));
#endif
#ifdef EESCHEMA
static wxString MsgInfos(wxT("** EESCHEMA (sept 1994 .. 2007) **"));
static wxString MsgInfos(wxT("** EESCHEMA (sept 1994 .. 2008) **"));
#endif
// 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