Commit 8b3ffe74 authored by dickelbeck's avatar dickelbeck

More layer setup/visibility/chooser work from Isaac and Dick

parent 459c31c4
......@@ -49,7 +49,13 @@ set(PCBNEW_SRCS
dialog_graphic_item_properties.cpp
dialog_graphic_item_properties_base.cpp
# dialog_initpcb.cpp
dialog_layers_setup.cpp
# Bear with us temporarily while we play with a couple of strategies, Dick.
# Eventually these filenames will get changed.
# dialog_layers_setup.cpp
dialog_layers_setup2.cpp
dialog_layers_setup_base2.cpp
dialog_netlist.cpp
dialog_netlist_fbp.cpp
dialog_pcb_text_properties.cpp
......
This diff is collapsed.
#ifndef __dialog_layers_setup2_h_
#define __dialog_layers_setup2_h_
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 1992-2009 Isaac Marino Bavaresco, isaacbavaresco@yahoo.com.br
* Copyright (C) 2009 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 1992-2009 Kicad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "dialog_layers_setup_base2.h"
class DIALOG_LAYERS_SETUP : public DIALOG_LAYERS_SETUP_BASE2
{
private:
static wxPoint s_LastPos;
static wxSize s_LastSize;
WinEDA_PcbFrame* m_Parent;
int m_ActivesLayersCount;
BOARD* m_Pcb;
LAYER_T m_LayersType[4];
wxString m_LayersTypeName[4];
wxTextCtrl* m_textCtrl1[NB_COPPER_LAYERS];
wxCheckBox* m_checkBox[NB_LAYERS];
wxChoice* m_choice5[NB_COPPER_LAYERS];
private:
void OnCancelButtonClick( wxCommandEvent& event );
void OnOkButtonClick( wxCommandEvent& event );
void OnLayerCountClick( wxCommandEvent& event );
// void OnLayerGridLeftClick( wxGridEvent& event ){ event.Skip(); }
// void OnLayerGridRighttClick( wxGridEvent& event ){ event.Skip(); }
void Init();
void SetRoutableLayerStatus( );
bool TestDataValidity();
public:
DIALOG_LAYERS_SETUP( WinEDA_PcbFrame* parent );
~DIALOG_LAYERS_SETUP( ) { };
};
#endif //__dialog_layers_setup2_h_
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 29 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_layers_setup_base2.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_LAYERS_SETUP_BASE2::DIALOG_LAYERS_SETUP_BASE2( 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* bChoicesSizer;
bChoicesSizer = new wxBoxSizer( wxHORIZONTAL );
wxStaticBoxSizer* sbPresetsSizer;
sbPresetsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Preset Layer Groupings") ), wxVERTICAL );
wxString m_PresetsChoiceChoices[] = { wxT("All Layers On"), wxT("Single Sided"), wxT("Single Sided, SMD on Back"), wxT("Two Layers, Parts on Front"), wxT("Two Layers, Parts on Both Faces"), wxT("Four Layers, Parts on Front"), wxT("Four Layers, Parts on Both Faces") };
int m_PresetsChoiceNChoices = sizeof( m_PresetsChoiceChoices ) / sizeof( wxString );
m_PresetsChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PresetsChoiceNChoices, m_PresetsChoiceChoices, 0 );
m_PresetsChoice->SetSelection( 0 );
sbPresetsSizer->Add( m_PresetsChoice, 0, wxEXPAND, 5 );
bChoicesSizer->Add( sbPresetsSizer, 2, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sbCopperLayersSizer;
sbCopperLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Copper Layers") ), wxVERTICAL );
wxString m_CopperLayersChoiceChoices[] = { wxT("1"), wxT("2"), wxT("4"), wxT("6"), wxT("8"), wxT("10"), wxT("12"), wxT("14"), wxT("16") };
int m_CopperLayersChoiceNChoices = sizeof( m_CopperLayersChoiceChoices ) / sizeof( wxString );
m_CopperLayersChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_CopperLayersChoiceNChoices, m_CopperLayersChoiceChoices, 0 );
m_CopperLayersChoice->SetSelection( 0 );
sbCopperLayersSizer->Add( m_CopperLayersChoice, 0, wxEXPAND, 5 );
bChoicesSizer->Add( sbCopperLayersSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( bChoicesSizer, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbLayersSizer;
sbLayersSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Layers") ), wxVERTICAL );
wxBoxSizer* bCaptionsSizer;
bCaptionsSizer = new wxBoxSizer( wxHORIZONTAL );
m_LayerNameCaption = new wxStaticText( this, wxID_ANY, wxT("Name"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE );
m_LayerNameCaption->Wrap( -1 );
m_LayerNameCaption->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bCaptionsSizer->Add( m_LayerNameCaption, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_LayerEnabledCaption = new wxStaticText( this, wxID_ANY, wxT("Enabled"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE );
m_LayerEnabledCaption->Wrap( -1 );
m_LayerEnabledCaption->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bCaptionsSizer->Add( m_LayerEnabledCaption, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_LayerTypeCaption = new wxStaticText( this, wxID_ANY, wxT("Type"), wxDefaultPosition, wxSize( -1,-1 ), wxALIGN_CENTRE );
m_LayerTypeCaption->Wrap( -1 );
m_LayerTypeCaption->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
bCaptionsSizer->Add( m_LayerTypeCaption, 0, wxALIGN_CENTER_VERTICAL, 5 );
sbLayersSizer->Add( bCaptionsSizer, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT, 5 );
m_LayersListPanel = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxALWAYS_SHOW_SB|wxRAISED_BORDER|wxTAB_TRAVERSAL|wxVSCROLL );
m_LayersListPanel->SetScrollRate( 0, 5 );
m_LayerListFlexGridSizer = new wxFlexGridSizer( 0, 3, 0, 0 );
m_LayerListFlexGridSizer->AddGrowableCol( 0 );
m_LayerListFlexGridSizer->AddGrowableCol( 1 );
m_LayerListFlexGridSizer->AddGrowableCol( 2 );
m_LayerListFlexGridSizer->SetFlexibleDirection( wxHORIZONTAL );
m_LayerListFlexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_junkStaticText = new wxStaticText( m_LayersListPanel, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
m_junkStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_junkStaticText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_junkCheckBox = new wxCheckBox( m_LayersListPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerListFlexGridSizer->Add( m_junkCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxArrayString m_junkChoiceChoices;
m_junkChoice = new wxChoice( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_junkChoiceChoices, 0 );
m_junkChoice->SetSelection( 0 );
m_LayerListFlexGridSizer->Add( m_junkChoice, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_LayersListPanel->SetSizer( m_LayerListFlexGridSizer );
m_LayersListPanel->Layout();
m_LayerListFlexGridSizer->Fit( m_LayersListPanel );
sbLayersSizer->Add( m_LayersListPanel, 1, wxALL|wxEXPAND, 5 );
bMainSizer->Add( sbLayersSizer, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_sdbSizer2 = new wxStdDialogButtonSizer();
m_sdbSizer2OK = new wxButton( this, wxID_OK );
m_sdbSizer2->AddButton( m_sdbSizer2OK );
m_sdbSizer2Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer2->AddButton( m_sdbSizer2Cancel );
m_sdbSizer2->Realize();
bMainSizer->Add( m_sdbSizer2, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout();
}
DIALOG_LAYERS_SETUP_BASE2::~DIALOG_LAYERS_SETUP_BASE2()
{
}
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 29 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_layers_setup_base2__
#define __dialog_layers_setup_base2__
#include <wx/string.h>
#include <wx/choice.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/checkbox.h>
#include <wx/scrolwin.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_LAYERS_SETUP_BASE2
///////////////////////////////////////////////////////////////////////////////
class DIALOG_LAYERS_SETUP_BASE2 : public wxDialog
{
private:
protected:
wxChoice* m_PresetsChoice;
wxChoice* m_CopperLayersChoice;
wxStaticText* m_LayerNameCaption;
wxStaticText* m_LayerEnabledCaption;
wxStaticText* m_LayerTypeCaption;
wxScrolledWindow* m_LayersListPanel;
wxFlexGridSizer* m_LayerListFlexGridSizer;
wxStaticText* m_junkStaticText;
wxCheckBox* m_junkCheckBox;
wxChoice* m_junkChoice;
wxStdDialogButtonSizer* m_sdbSizer2;
wxButton* m_sdbSizer2OK;
wxButton* m_sdbSizer2Cancel;
public:
DIALOG_LAYERS_SETUP_BASE2( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Layer Setup"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 700,600 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LAYERS_SETUP_BASE2();
};
#endif //__dialog_layers_setup_base2__
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