Commit 997270d8 authored by charras's avatar charras

First work about net classes. This is a work in progress and a moving target

parent e7c9ae2b
......@@ -8,7 +8,7 @@ email address.
================================================================================
++pcbnew
First work about net classes. This is a work in progress and a moving target.
Manual routing and DRC do not used yet this feature
Manual routing and DRC do not use yet this feature
2009-Jul-13 UPDATE Dick Hollenbeck <dick@softplc.com>
......
This diff is collapsed.
......@@ -14,7 +14,6 @@ class DIALOG_DESIGN_RULES : public DIALOG_DESIGN_RULES_BASE
WinEDA_PcbFrame * m_Parent;
int m_ActivesLayersCount;
BOARD * m_Pcb;
int m_Changes;
LAYER_T m_LayersType[4];
wxString m_LayersTypeName[4];
std::vector<NETINFO_ITEM*> m_StockNets; // full list of nets on board
......@@ -36,6 +35,7 @@ class DIALOG_DESIGN_RULES : public DIALOG_DESIGN_RULES_BASE
void OnLeftToRightCopyButton( wxCommandEvent& event );
void OnLeftSelectAllButton( wxCommandEvent& event );
void OnRightSelectAllButton( wxCommandEvent& event );
bool TestDataValidity( );
void Init();
void InitRulesList();
void InitializeRulesSelectionBoxes();
......
......@@ -11,7 +11,7 @@
DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_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( wxSize( 600,450 ), wxDefaultSize );
this->SetSizeHints( wxSize( 600,520 ), wxDefaultSize );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
......@@ -124,7 +124,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
// Cell Defaults
m_gridNetClassesProperties->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
m_gridNetClassesProperties->SetMinSize( wxSize( -1,100 ) );
m_gridNetClassesProperties->SetMinSize( wxSize( -1,150 ) );
sbSizer1->Add( m_gridNetClassesProperties, 1, wxALL|wxEXPAND, 5 );
......@@ -139,7 +139,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
sbSizer1->Add( bSizerButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
bmainSizerNclasses->Add( sbSizer1, 1, wxEXPAND, 5 );
bmainSizerNclasses->Add( sbSizer1, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerNetSelect;
bSizerNetSelect = new wxBoxSizer( wxHORIZONTAL );
......@@ -194,15 +194,6 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
bmainSizerNclasses->Add( bSizerNetSelect, 1, wxEXPAND, 5 );
m_staticTextMsg = new wxStaticText( m_panelNetClasses, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextMsg->Wrap( -1 );
bmainSizerNclasses->Add( m_staticTextMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_MessagesList = new wxHtmlWindow( m_panelNetClasses, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER );
m_MessagesList->SetMinSize( wxSize( -1,100 ) );
bmainSizerNclasses->Add( m_MessagesList, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_panelNetClasses->SetSizer( bmainSizerNclasses );
m_panelNetClasses->Layout();
bmainSizerNclasses->Fit( m_panelNetClasses );
......@@ -210,6 +201,15 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
bMainSizer->Add( m_notebook, 1, wxALL|wxEXPAND, 5 );
m_staticTextMsg = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextMsg->Wrap( -1 );
bMainSizer->Add( m_staticTextMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_MessagesList = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxSUNKEN_BORDER );
m_MessagesList->SetMinSize( wxSize( -1,100 ) );
bMainSizer->Add( m_MessagesList, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
......
This diff is collapsed.
......@@ -26,9 +26,9 @@
#include <wx/statbox.h>
#include <wx/choice.h>
#include <wx/listbox.h>
#include <wx/notebook.h>
#include <wx/stattext.h>
#include <wx/html/htmlwin.h>
#include <wx/notebook.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
......@@ -91,7 +91,7 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
public:
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 684,486 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 684,568 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DESIGN_RULES_BASE();
};
......
......@@ -651,8 +651,8 @@ void WinEDA_PcbFrame::Show3D_Frame( wxCommandEvent& event )
void WinEDA_PcbFrame::ShowDesignRulesEditor( wxCommandEvent& event )
{
DIALOG_DESIGN_RULES dR_editor( this );
int change = dR_editor.ShowModal( );
if ( change )
int returncode = dR_editor.ShowModal( );
if ( returncode == wxID_OK ) // New rules, or others changes.
{
ReCreateLayerBox( NULL );
GetScreen()->SetModify();
......
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