Commit 016eef39 authored by jean-pierre charras's avatar jean-pierre charras

Dialog layers setup: cosmetic enhancements (fix a very minor issue on...

Dialog layers setup: cosmetic enhancements (fix a very minor issue on Windows). Remove a not used and outdated file.
parent 6bd8fa1d
......@@ -86,6 +86,7 @@ public:
SCHLIB_FILTER()
{
m_filterPowerParts = false;
m_forceLoad = false;
}
/**
......
#ifndef __KICAD_DCSVG_H
#define __KICAD_DCSVG_H
#include <wx/dc.h>
#include <wx/wfstream.h>
#include <wx/string.h>
#define wxSVGVersion wxT( "v0101" )
#if wxCHECK_VERSION( 2, 9, 0 )
// We could do nothing, because wxWidgets 3 supports the SVG format
// (previously, it was a contribution library, not included in wxWidgets)
// However arcs are drawn as pies, and we must change it.
// Unfortunately most of functions are private, and we cannot derive
// our KicadSVGFileDCImpl from wxSVGFileDCImpl
// and just override the 2 incorrect functions
// Just wxWidget dcsvg is copied here and 2 functions are modified:
// KicadSVGFileDCImpl::DoDrawArc() and KicadSVGFileDCImpl::DoDrawEllipticArc()
// Also note: SetLogicalFunction() does not set an error in debug mode
class WXDLLIMPEXP_FWD_BASE wxFileOutputStream;
class WXDLLIMPEXP_FWD_CORE KicadSVGFileDC;
class WXDLLIMPEXP_CORE KicadSVGFileDCImpl : public wxDCImpl
{
public:
KicadSVGFileDCImpl( KicadSVGFileDC *owner, const wxString &aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi );
virtual ~KicadSVGFileDCImpl();
bool IsOk() const { return m_OK; }
virtual bool CanDrawBitmap() const { return true; }
virtual bool CanGetTextExtent() const { return true; }
virtual int GetDepth() const
{
wxFAIL_MSG(wxT("wxSVGFILEDC::GetDepth Call not implemented"));
return -1;
}
virtual void Clear()
{
wxFAIL_MSG(wxT("wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?"));
}
virtual void DestroyClippingRegion()
{
wxFAIL_MSG(wxT("wxSVGFILEDC::void Call not yet implemented"));
}
virtual wxCoord GetCharHeight() const;
virtual wxCoord GetCharWidth() const;
virtual void SetClippingRegion(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
wxCoord WXUNUSED(w), wxCoord WXUNUSED(h))
{
wxFAIL_MSG(wxT("wxSVGFILEDC::SetClippingRegion not implemented"));
}
virtual void SetPalette(const wxPalette& WXUNUSED(palette))
{
wxFAIL_MSG(wxT("wxSVGFILEDC::SetPalette not implemented"));
}
virtual void GetClippingBox(wxCoord *WXUNUSED(x), wxCoord *WXUNUSED(y),
wxCoord *WXUNUSED(w), wxCoord *WXUNUSED(h))
{
wxFAIL_MSG(wxT("wxSVGFILEDC::GetClippingBox not implemented"));
}
virtual void SetLogicalFunction(wxRasterOperationMode WXUNUSED(function))
{
// wxFAIL_MSG(wxT("KicadSVGFILEDC::SetLogicalFunction not implemented"));
}
virtual wxRasterOperationMode GetLogicalFunction() const
{
wxFAIL_MSG(wxT("wxSVGFILEDC::GetLogicalFunction() not implemented"));
return wxCOPY;
}
virtual void SetBackground( const wxBrush &brush );
virtual void SetBackgroundMode( int mode );
virtual void SetBrush(const wxBrush& brush);
virtual void SetFont(const wxFont& font);
virtual void SetPen(const wxPen& pen);
private:
virtual bool DoGetPixel(wxCoord, wxCoord, wxColour *) const
{
wxFAIL_MSG(wxT("wxSVGFILEDC::DoGetPixel Call not implemented"));
return true;
}
virtual bool DoBlit(wxCoord, wxCoord, wxCoord, wxCoord, wxDC *,
wxCoord, wxCoord, wxRasterOperationMode = wxCOPY,
bool = 0, int = -1, int = -1);
virtual void DoCrossHair(wxCoord, wxCoord)
{
wxFAIL_MSG(wxT("wxSVGFILEDC::CrossHair Call not implemented"));
}
virtual void DoDrawArc(wxCoord, wxCoord, wxCoord, wxCoord, wxCoord, wxCoord);
virtual void DoDrawBitmap(const wxBitmap &, wxCoord, wxCoord, bool = false);
virtual void DoDrawCheckMark(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
double sa, double ea);
virtual void DoDrawIcon(const wxIcon &, wxCoord, wxCoord);
virtual void DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
virtual void DoDrawLines(int n, wxPoint points[],
wxCoord xoffset = 0, wxCoord yoffset = 0);
virtual void DoDrawPoint(wxCoord, wxCoord);
virtual void DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxPolygonFillMode fillStyle);
virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
double angle);
virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
wxCoord w, wxCoord h,
double radius = 20) ;
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
virtual bool DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
const wxColour& WXUNUSED(col),
wxFloodFillStyle WXUNUSED(style) = wxFLOOD_SURFACE)
{
wxFAIL_MSG(wxT("wxSVGFILEDC::DoFloodFill Call not implemented"));
return false;
}
virtual void DoGetSize(int * x, int *y) const
{
if ( x )
*x = m_width;
if ( y )
*y = m_height;
}
virtual void DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h,
wxCoord *descent = NULL,
wxCoord *externalLeading = NULL,
const wxFont *font = NULL) const;
virtual void DoSetDeviceClippingRegion(const wxRegion& WXUNUSED(region))
{
wxFAIL_MSG(wxT("wxSVGFILEDC::DoSetDeviceClippingRegion not yet implemented"));
}
virtual void DoSetClippingRegion( int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height) )
{
wxFAIL_MSG(wxT("wxSVGFILEDC::DoSetClippingRegion not yet implemented"));
}
virtual void DoGetSizeMM( int *width, int *height ) const;
virtual wxSize GetPPI() const;
void Init (const wxString &aFilename, wxPoint aOrigin, wxSize aSize, double aDpi);
void NewGraphics();
void write( const wxString &s );
private:
wxFileOutputStream *m_outfile;
wxString m_filename;
int m_sub_images; // number of png format images we have
bool m_OK;
bool m_graphics_changed;
int m_width, m_height;
double m_dpi;
private:
DECLARE_ABSTRACT_CLASS(KicadSVGFileDCImpl)
};
class WXDLLIMPEXP_CORE KicadSVGFileDC : public wxDC
{
public:
KicadSVGFileDC(const wxString& aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi = 300.0)
: wxDC(new KicadSVGFileDCImpl(this, aFilename, aOrigin, aSize, aDpi))
{
}
};
#else
class wxSVGFileDC : public wxDC
{
private:
wxFileOutputStream* m_outfile;
wxString m_filename;
//holds number of png format images we have
int m_sub_images;
bool m_OK, m_graphics_changed;
int m_width, m_height;
double
m_logicalScaleX,
m_logicalScaleY,
m_userScaleX,
m_userScaleY,
m_scaleX,
m_scaleY,
m_OriginX,
m_OriginY,
m_mm_to_pix_x,
m_mm_to_pix_y;
bool
m_needComputeScaleX,
m_needComputeScaleY; // not yet used
bool DoGetPixel( wxCoord, wxCoord, class wxColour* ) const
{
wxASSERT_MSG( false, wxT( "wxSVGFILEDC::DoGetPixel Call not implemented" ) ); return true;
};
virtual bool DoBlit( wxCoord, wxCoord, wxCoord, wxCoord, class wxDC*,
wxCoord, wxCoord, int = wxCOPY, bool = 0, int = -1, int = -1 );
void DoCrossHair( wxCoord, wxCoord )
{
wxASSERT_MSG( false, wxT( "wxSVGFILEDC::CrossHair Call not implemented" ) ); return;
};
void DoDrawArc( wxCoord, wxCoord, wxCoord, wxCoord, wxCoord, wxCoord );
void DoDrawBitmap( const class wxBitmap&, wxCoord, wxCoord, bool = 0 );
void DoDrawCheckMark( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
void DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
void DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, double sa, double ea );
void DoDrawIcon( const class wxIcon&, wxCoord, wxCoord );
void DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 );
void DoDrawPoint( wxCoord, wxCoord );
void DoDrawPolygon( int n,
wxPoint points[],
wxCoord xoffset,
wxCoord yoffset,
int fillStyle );
void DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
void DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord y, double angle );
void DoDrawRoundedRectangle( wxCoord x,
wxCoord y,
wxCoord width,
wxCoord height,
double radius = 20 );
void DoDrawText( const wxString& text, wxCoord x, wxCoord y );
bool DoFloodFill( wxCoord WXUNUSED (x), wxCoord WXUNUSED (y), const wxColour& WXUNUSED (col),
int WXUNUSED (style) = wxFLOOD_SURFACE )
{
wxASSERT_MSG( false, wxT( "wxSVGFILEDC::DoFloodFill Call not implemented" ) );
return false;
};
void DoGetSize( int* x, int* y ) const
{
*x = m_width; *y = m_height; return;
};
void DoGetTextExtent( const wxString& string,
wxCoord* w,
wxCoord* h,
wxCoord* descent = NULL,
wxCoord* externalLeading = NULL,
wxFont* font = NULL ) const;
void DoSetClippingRegionAsRegion( const class wxRegion& )
{
wxASSERT_MSG( false,
wxT( "wxSVGFILEDC::DoSetClippingRegionAsRegion Call not yet implemented" ) ); return;
};
void Init( const wxString& aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi );
void NewGraphics();
#ifdef XDEV2LOG
#undef XDEV2LOG
#endif
wxCoord XDEV2LOG( wxCoord x ) const
{
wxCoord new_x = x - m_deviceOriginX;
if( new_x > 0 )
return (wxCoord) ( (double) (new_x) / m_scaleX + 0.5 ) * m_signX + m_logicalOriginX;
else
return (wxCoord) ( (double) (new_x) / m_scaleX - 0.5 ) * m_signX + m_logicalOriginX;
}
#ifdef XDEV2LOGREL
#undef XDEV2LOGREL
#endif
wxCoord XDEV2LOGREL( wxCoord x ) const
{
if( x > 0 )
return (wxCoord) ( (double) (x) / m_scaleX + 0.5 );
else
return (wxCoord) ( (double) (x) / m_scaleX - 0.5 );
}
#ifdef YDEV2LOG
#undef YDEV2LOG
#endif
wxCoord YDEV2LOG( wxCoord y ) const
{
wxCoord new_y = y - m_deviceOriginY;
if( new_y > 0 )
return (wxCoord) ( (double) (new_y) / m_scaleY + 0.5 ) * m_signY + m_logicalOriginY;
else
return (wxCoord) ( (double) (new_y) / m_scaleY - 0.5 ) * m_signY + m_logicalOriginY;
}
#ifdef YDEV2LOGREL
#undef YDEV2LOGREL
#endif
wxCoord YDEV2LOGREL( wxCoord y ) const
{
if( y > 0 )
return (wxCoord) ( (double) (y) / m_scaleY + 0.5 );
else
return (wxCoord) ( (double) (y) / m_scaleY - 0.5 );
}
#ifdef XLOG2DEV
#undef XLOG2DEV
#endif
wxCoord XLOG2DEV( wxCoord x ) const
{
wxCoord new_x = x - m_logicalOriginX;
if( new_x > 0 )
return (wxCoord) ( (double) (new_x) * m_scaleX + 0.5 ) * m_signX + m_deviceOriginX;
else
return (wxCoord) ( (double) (new_x) * m_scaleX - 0.5 ) * m_signX + m_deviceOriginX;
}
#ifdef XLOG2DEVREL
#undef XLOG2DEVREL
#endif
wxCoord XLOG2DEVREL( wxCoord x ) const
{
if( x > 0 )
return (wxCoord) ( (double) (x) * m_scaleX + 0.5 );
else
return (wxCoord) ( (double) (x) * m_scaleX - 0.5 );
}
#ifdef YLOG2DEV
#undef YLOG2DEV
#endif
wxCoord YLOG2DEV( wxCoord y ) const
{
wxCoord new_y = y - m_logicalOriginY;
if( new_y > 0 )
return (wxCoord) ( (double) (new_y) * m_scaleY + 0.5 ) * m_signY + m_deviceOriginY;
else
return (wxCoord) ( (double) (new_y) * m_scaleY - 0.5 ) * m_signY + m_deviceOriginY;
}
#ifdef YLOG2DEVREL
#undef YLOG2DEVREL
#endif
wxCoord YLOG2DEVREL( wxCoord y ) const
{
if( y > 0 )
return (wxCoord) ( (double) (y) * m_scaleY + 0.5 );
else
return (wxCoord) ( (double) (y) * m_scaleY - 0.5 );
}
void write( const wxString& s );
public:
wxSVGFileDC( const wxString& aFilename,
wxPoint aOrigin, wxSize aSize, double aDpi );
~wxSVGFileDC();
bool CanDrawBitmap() const
{
return true;
};
bool CanGetTextExtent() const
{
return true;
};
int GetDepth() const
{
wxASSERT_MSG( false, wxT( "wxSVGFILEDC::GetDepth Call not implemented" ) ); return -1;
};
void BeginDrawing()
{
return;
};
bool Blit( wxCoord xdest,
wxCoord ydest,
wxCoord width,
wxCoord height,
wxDC* source,
wxCoord xsrc,
wxCoord ysrc,
int logicalFunc = wxCOPY,
bool useMask = false )
{
return DoBlit( xdest, ydest, width, height, source, xsrc, ysrc, logicalFunc, useMask );
};
void Clear()
{
wxASSERT_MSG( false,
wxT( "wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?" ) );
return;
};
void CrossHair( wxCoord x, wxCoord y )
{
DoCrossHair( x, y ); return;
};
virtual void ComputeScaleAndOrigin();
void DestroyClippingRegion()
{
wxASSERT_MSG( false, wxT( "wxSVGFILEDC::void Call not yet implemented" ) ); return;
};
wxCoord DeviceToLogicalX( wxCoord x ) const;
wxCoord DeviceToLogicalXRel( wxCoord x ) const;
wxCoord DeviceToLogicalY( wxCoord y ) const;
wxCoord DeviceToLogicalYRel( wxCoord y ) const;
void DrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool transparent )
{
DoDrawBitmap( bitmap, x, y, transparent ); return;
};
void DrawIcon( const wxIcon& icon, wxCoord x, wxCoord y )
{
DoDrawIcon( icon, x, y ); return;
};
void DoDrawLines( int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0 );
void EndDoc()
{
return;
};
void EndDrawing()
{
return;
};
void EndPage()
{
return;
};
void FloodFill( wxCoord x, wxCoord y, wxColour* colour, int style = wxFLOOD_SURFACE )
{
DoFloodFill( x, y, *colour, style ); return;
};
wxCoord GetCharHeight() const;
wxCoord GetCharWidth() const;
void GetClippingBox( wxCoord* WXUNUSED (x), wxCoord* WXUNUSED (y), wxCoord* WXUNUSED (width),
wxCoord* WXUNUSED (height) )
{
wxASSERT_MSG( false, wxT( "wxSVGFILEDC::GetClippingBox Call not yet implemented" ) );
return;
};
int GetLogicalFunction()
{
wxASSERT_MSG( false, wxT( "wxSVGFILEDC::GetLogicalFunction() Call not implemented" ) );
return wxCOPY;
};
int GetMapMode();
bool GetPixel( wxCoord x, wxCoord y, wxColour* colour )
{
return DoGetPixel( x, y, colour );
};
void GetUserScale( double* x, double* y ) const;
wxCoord LogicalToDeviceX( wxCoord x ) const;
wxCoord LogicalToDeviceXRel( wxCoord x ) const;
wxCoord LogicalToDeviceY( wxCoord y ) const;
wxCoord LogicalToDeviceYRel( wxCoord y ) const;
bool Ok() const
{
return m_OK;
};
void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
void SetClippingRegion( wxCoord WXUNUSED (x), wxCoord WXUNUSED (y), wxCoord WXUNUSED (width),
wxCoord WXUNUSED (height) )
{
wxASSERT_MSG( false, wxT( "wxSVGFILEDC::SetClippingRegion Call not yet implemented" ) );
return;
};
void SetPalette( const wxPalette& WXUNUSED (palette) )
{
wxASSERT_MSG( false, wxT( "wxSVGFILEDC::SetPalette Call not yet implemented" ) ); return;
};
void SetBackground( const wxBrush& brush );
void SetBackgroundMode( int mode );
void SetBrush( const wxBrush& brush );
void SetFont( const wxFont& font );
void SetLogicalFunction( int WXUNUSED (function) )
{
//wxASSERT_MSG (false, wxT("wxSVGFILEDC::SetLogicalFunction not implemented"));
return;
};
void SetLogicalScale( double x, double y );
void SetLogicalOrigin( wxCoord x, wxCoord y );
void SetDeviceOrigin( wxCoord x, wxCoord y );
void SetMapMode( int anint );
void SetPen( const wxPen& pen );
void SetUserScale( double xScale, double yScale );
bool StartDoc( const wxString& WXUNUSED (message) )
{
return false;
};
void StartPage()
{
return;
};
};
typedef wxSVGFileDC KicadSVGFileDC;
#endif // wxCHECK_VERSION
#endif // __KICAD_DCSVG_H
......@@ -139,15 +139,15 @@ class DIALOG_LAYERS_SETUP : public DIALOG_LAYERS_SETUP_BASE
public:
DIALOG_LAYERS_SETUP( wxTopLevelWindow* aCaller, BOARD* aBoard );
protected:
int m_CopperLayerCount;
LSET m_EnabledLayers;
private:
int m_copperLayerCount;
LSET m_enabledLayers;
BOARD* m_Pcb;
BOARD* m_pcb;
wxStaticText* m_NameStaticText;
wxStaticText* m_EnabledStaticText;
wxStaticText* m_TypeStaticText;
wxStaticText* m_nameStaticText;
wxStaticText* m_enabledStaticText;
wxStaticText* m_typeStaticText;
void setLayerCheckBox( LAYER_NUM layer, bool isChecked );
void setCopperLayerCheckBoxes( int copperCount );
......@@ -202,30 +202,19 @@ protected:
int offset = 0;
wxSize txtz;
txtz = m_NameStaticText->GetSize();
m_NameStaticText->Move( offset + (widths[0] - txtz.x)/2, 5 );
txtz = m_nameStaticText->GetSize();
m_nameStaticText->Move( offset + (widths[0] - txtz.x)/2, 5 );
offset += widths[0];
txtz = m_EnabledStaticText->GetSize();
m_EnabledStaticText->Move( offset + (widths[1] - txtz.x)/2, 5 );
txtz = m_enabledStaticText->GetSize();
m_enabledStaticText->Move( offset + (widths[1] - txtz.x)/2, 5 );
offset += widths[1];
txtz = m_TypeStaticText->GetSize();
m_TypeStaticText->Move( offset + (widths[2] - txtz.x)/2, 5 );
txtz = m_typeStaticText->GetSize();
m_typeStaticText->Move( offset + (widths[2] - txtz.x)/2, 5 );
}
/**
* Function Layout
* overrides the standard Layout() function so that the column titles can
* be positioned using information in the flexgridsizer.
*/
bool Layout()
{
bool ret = DIALOG_LAYERS_SETUP_BASE::Layout();
moveTitles();
return ret;
}
void OnSize( wxSizeEvent& event );
};
......@@ -328,17 +317,17 @@ CTLs DIALOG_LAYERS_SETUP::getCTLs( LAYER_NUM aLayerNumber )
DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( wxTopLevelWindow* aParent, BOARD* aBoard ) :
DIALOG_LAYERS_SETUP_BASE( aParent )
{
m_Pcb = aBoard;
m_pcb = aBoard;
m_CopperLayerCount = m_Pcb->GetCopperLayerCount();
showCopperChoice( m_CopperLayerCount );
setCopperLayerCheckBoxes( m_CopperLayerCount );
m_copperLayerCount = m_pcb->GetCopperLayerCount();
showCopperChoice( m_copperLayerCount );
setCopperLayerCheckBoxes( m_copperLayerCount );
showBoardLayerNames();
m_EnabledLayers = m_Pcb->GetEnabledLayers();
showSelectedLayerCheckBoxes( m_EnabledLayers );
showPresets( m_EnabledLayers );
m_enabledLayers = m_pcb->GetEnabledLayers();
showSelectedLayerCheckBoxes( m_enabledLayers );
showPresets( m_enabledLayers );
showLayerTypes();
......@@ -347,11 +336,11 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( wxTopLevelWindow* aParent, BOARD* aBoa
// these 3 controls are handled outside wxformbuilder so that we can add
// them without a sizer. Then we position them manually based on the column
// widths from m_LayerListFlexGridSizer->GetColWidths()
m_NameStaticText = new wxStaticText( m_TitlePanel, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
m_nameStaticText = new wxStaticText( m_TitlePanel, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
m_EnabledStaticText = new wxStaticText( m_TitlePanel, wxID_ANY, _("Enabled"), wxDefaultPosition, wxDefaultSize, 0 );
m_enabledStaticText = new wxStaticText( m_TitlePanel, wxID_ANY, _("Enabled"), wxDefaultPosition, wxDefaultSize, 0 );
m_TypeStaticText = new wxStaticText( m_TitlePanel, wxID_ANY, _("Type"), wxDefaultPosition, wxDefaultSize, 0 );
m_typeStaticText = new wxStaticText( m_TitlePanel, wxID_ANY, _("Type"), wxDefaultPosition, wxDefaultSize, 0 );
// set the height of the title panel to be the size of any wxStaticText object
// plus 10 so we can have a border of 5 on both top and bottom.
......@@ -361,13 +350,19 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( wxTopLevelWindow* aParent, BOARD* aBoa
Layout();
Fit();
moveTitles();
Center();
m_sdbSizer2OK->SetFocus();
m_sdbSizer2OK->SetDefault();
m_sdbSizerOK->SetFocus();
m_sdbSizerOK->SetDefault();
}
void DIALOG_LAYERS_SETUP::OnSize( wxSizeEvent& event )
{
moveTitles();
event.Skip();
}
void DIALOG_LAYERS_SETUP::showCopperChoice( int copperCount )
{
......@@ -406,7 +401,7 @@ void DIALOG_LAYERS_SETUP::showBoardLayerNames()
if( ctl )
{
wxString lname = m_Pcb->GetLayerName( layer );
wxString lname = m_pcb->GetLayerName( layer );
//D(printf("layerName[%d]=%s\n", layer, TO_UTF8( lname ) );)
......@@ -455,7 +450,7 @@ void DIALOG_LAYERS_SETUP::showLayerTypes()
LAYER_ID cu_layer = *seq;
wxChoice* ctl = getChoice( cu_layer );
ctl->SetSelection( m_Pcb->GetLayerType( cu_layer ) );
ctl->SetSelection( m_pcb->GetLayerType( cu_layer ) );
}
}
......@@ -532,9 +527,9 @@ void DIALOG_LAYERS_SETUP::setCopperLayerCheckBoxes( int copperCount )
void DIALOG_LAYERS_SETUP::OnCheckBox( wxCommandEvent& event )
{
m_EnabledLayers = getUILayerMask();
m_enabledLayers = getUILayerMask();
showPresets( m_EnabledLayers );
showPresets( m_enabledLayers );
}
......@@ -546,7 +541,7 @@ void DIALOG_LAYERS_SETUP::DenyChangeCheckBox( wxCommandEvent& event )
// I tried to simply disable the copper CheckBoxes but they look like crap,
// so leave them enabled and reverse the user's attempt to toggle them.
setCopperLayerCheckBoxes( m_CopperLayerCount );
setCopperLayerCheckBoxes( m_copperLayerCount );
}
......@@ -559,32 +554,32 @@ void DIALOG_LAYERS_SETUP::OnPresetsChoice( wxCommandEvent& event )
if( presetNdx < DIM(presets) )
{
m_EnabledLayers = presets[ presetNdx ];
m_enabledLayers = presets[ presetNdx ];
LSET copperSet = m_EnabledLayers & LSET::AllCuMask();
LSET copperSet = m_enabledLayers & LSET::AllCuMask();
int copperCount = copperSet.count();
m_CopperLayerCount = copperCount;
m_copperLayerCount = copperCount;
showCopperChoice( m_CopperLayerCount );
showCopperChoice( m_copperLayerCount );
showSelectedLayerCheckBoxes( m_EnabledLayers );
showSelectedLayerCheckBoxes( m_enabledLayers );
setCopperLayerCheckBoxes( m_CopperLayerCount );
setCopperLayerCheckBoxes( m_copperLayerCount );
}
}
void DIALOG_LAYERS_SETUP::OnCopperLayersChoice( wxCommandEvent& event )
{
m_CopperLayerCount = m_CopperLayersChoice->GetCurrentSelection() * 2 + 2;
m_copperLayerCount = m_CopperLayersChoice->GetCurrentSelection() * 2 + 2;
setCopperLayerCheckBoxes( m_CopperLayerCount );
setCopperLayerCheckBoxes( m_copperLayerCount );
m_EnabledLayers = getUILayerMask();
m_enabledLayers = getUILayerMask();
showPresets( m_EnabledLayers );
showPresets( m_enabledLayers );
}
......@@ -600,28 +595,28 @@ void DIALOG_LAYERS_SETUP::OnOkButtonClick( wxCommandEvent& event )
{
wxString name;
m_EnabledLayers = getUILayerMask();
m_Pcb->SetEnabledLayers( m_EnabledLayers );
m_enabledLayers = getUILayerMask();
m_pcb->SetEnabledLayers( m_enabledLayers );
/* Ensure enabled layers are also visible
* This is mainly to avoid mistakes if some enabled
* layers are not visible when exiting this dialog
*/
m_Pcb->SetVisibleLayers( m_EnabledLayers );
m_pcb->SetVisibleLayers( m_enabledLayers );
for( LSEQ seq = LSET::AllCuMask().Seq(); seq; ++seq )
{
LAYER_ID layer = *seq;
if( m_EnabledLayers[layer] )
if( m_enabledLayers[layer] )
{
name = getLayerName( layer );
m_Pcb->SetLayerName( layer, name );
m_pcb->SetLayerName( layer, name );
LAYER_T t = (LAYER_T) getLayerTypeIndex( layer );
m_Pcb->SetLayerType( layer, t );
m_pcb->SetLayerType( layer, t );
}
}
......@@ -673,8 +668,8 @@ bool DIALOG_LAYERS_SETUP::testLayerNames()
{
LAYER_ID layer = *seq;
// we _can_ rely on m_EnabledLayers being current here:
if( !m_EnabledLayers[layer] )
// we _can_ rely on m_enabledLayers being current here:
if( !m_enabledLayers[layer] )
continue;
wxString name = getLayerName( layer );
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 5 2014)
// C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -45,7 +45,7 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
wxString m_CopperLayersChoiceChoices[] = { _("2"), _("4"), _("6"), _("8"), _("10"), _("12"), _("14"), _("16"), _("18"), _("20"), _("22"), _("24"), _("26"), _("28"), _("30"), _("32") };
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( 2 );
m_CopperLayersChoice->SetSelection( 0 );
bCopperLayersSizer->Add( m_CopperLayersChoice, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
......@@ -67,6 +67,7 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
m_TitlePanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL );
m_TitlePanel->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_CAPTIONTEXT ) );
m_TitlePanel->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVECAPTION ) );
m_TitlePanel->SetMinSize( wxSize( -1,15 ) );
bCaptionsSizer->Add( m_TitlePanel, 1, wxEXPAND, 5 );
......@@ -77,34 +78,39 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
m_LayersListPanel->SetScrollRate( 0, 5 );
m_LayerListFlexGridSizer = new wxFlexGridSizer( 0, 3, 0, 0 );
m_LayerListFlexGridSizer->AddGrowableCol( 0 );
m_LayerListFlexGridSizer->AddGrowableCol( 1 );
m_LayerListFlexGridSizer->SetFlexibleDirection( wxHORIZONTAL );
m_LayerListFlexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_CrtYdFrontName = new wxStaticText( m_LayersListPanel, ID_CRTYDFRONTNAME, _("CrtYd_Front_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_CrtYdFrontName->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_CrtYdFrontName, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_LayerListFlexGridSizer->Add( m_CrtYdFrontName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_CrtYdFrontPanel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_CrtYdFrontPanel = new wxPanel( m_LayersListPanel, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_CrtYdFrontPanel->SetBackgroundColour( wxColour( 255, 233, 236 ) );
wxBoxSizer* bSizer611;
bSizer611 = new wxBoxSizer( wxVERTICAL );
bSizer611 = new wxBoxSizer( wxHORIZONTAL );
m_CrtYdFrontCheckBox = new wxCheckBox( m_CrtYdFrontPanel, ID_CRTYDFRONTCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizer611->Add( 0, 0, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 15 );
m_CrtYdFrontCheckBox = new wxCheckBox( m_CrtYdFrontPanel, ID_CRTYDFRONTCHECKBOX, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_CrtYdFrontCheckBox->SetToolTip( _("If you want a courtyard layer for the front side of the board") );
bSizer611->Add( m_CrtYdFrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
bSizer611->Add( m_CrtYdFrontCheckBox, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
bSizer611->Add( 0, 0, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 15 );
m_CrtYdFrontPanel->SetSizer( bSizer611 );
m_CrtYdFrontPanel->Layout();
bSizer611->Fit( m_CrtYdFrontPanel );
m_LayerListFlexGridSizer->Add( m_CrtYdFrontPanel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_LayerListFlexGridSizer->Add( m_CrtYdFrontPanel, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_CrtYdFrontStaticText = new wxStaticText( m_LayersListPanel, ID_CRTYDFRONTCHOICE, _("Off-board, testing"), wxDefaultPosition, wxDefaultSize, 0 );
m_CrtYdFrontStaticText->Wrap( -1 );
m_LayerListFlexGridSizer->Add( m_CrtYdFrontStaticText, 0, wxALL, 5 );
m_LayerListFlexGridSizer->Add( m_CrtYdFrontStaticText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_FabFrontName = new wxStaticText( m_LayersListPanel, ID_FABFRONTNAME, _("Fab_Front_later"), wxDefaultPosition, wxDefaultSize, 0 );
m_FabFrontName->Wrap( -1 );
......@@ -125,7 +131,7 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
m_FabFrontPanel->SetSizer( bSizer61 );
m_FabFrontPanel->Layout();
bSizer61->Fit( m_FabFrontPanel );
m_LayerListFlexGridSizer->Add( m_FabFrontPanel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_LayerListFlexGridSizer->Add( m_FabFrontPanel, 1, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
m_FabFrontStaticText = new wxStaticText( m_LayersListPanel, ID_FABFRONTCHOICE, _("Off-board, manufacturing"), wxDefaultPosition, wxDefaultSize, 0 );
m_FabFrontStaticText->Wrap( -1 );
......@@ -244,6 +250,7 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bSizer9 = new wxBoxSizer( wxVERTICAL );
m_FrontCheckBox = new wxCheckBox( m_FrontPanel, ID_FRONTCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FrontCheckBox->Enable( false );
m_FrontCheckBox->SetToolTip( _("If you want a front copper layer") );
bSizer9->Add( m_FrontCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -273,6 +280,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn1Sizer = new wxBoxSizer( wxVERTICAL );
m_In1CheckBox = new wxCheckBox( m_In1Panel, ID_IN1CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In1CheckBox->Enable( false );
bIn1Sizer->Add( m_In1CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -300,6 +309,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn2Sizer = new wxBoxSizer( wxVERTICAL );
m_In2CheckBox = new wxCheckBox( m_In2Panel, ID_IN2CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In2CheckBox->Enable( false );
bIn2Sizer->Add( m_In2CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -327,6 +338,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn3Sizer = new wxBoxSizer( wxVERTICAL );
m_In3CheckBox = new wxCheckBox( m_In3Panel, ID_IN3CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In3CheckBox->Enable( false );
bIn3Sizer->Add( m_In3CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -354,6 +367,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn4Sizer = new wxBoxSizer( wxVERTICAL );
m_In4CheckBox = new wxCheckBox( m_In4Panel, ID_IN4CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In4CheckBox->Enable( false );
bIn4Sizer->Add( m_In4CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -381,6 +396,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn5Sizer = new wxBoxSizer( wxVERTICAL );
m_In5CheckBox = new wxCheckBox( m_In5Panel, ID_IN5CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In5CheckBox->Enable( false );
bIn5Sizer->Add( m_In5CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -408,6 +425,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn6Sizer = new wxBoxSizer( wxVERTICAL );
m_In6CheckBox = new wxCheckBox( m_In6Panel, ID_IN6CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In6CheckBox->Enable( false );
bIn6Sizer->Add( m_In6CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -435,6 +454,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn7Sizer = new wxBoxSizer( wxVERTICAL );
m_In7CheckBox = new wxCheckBox( m_In7Panel, ID_IN7CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In7CheckBox->Enable( false );
bIn7Sizer->Add( m_In7CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -462,6 +483,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn8Sizer = new wxBoxSizer( wxVERTICAL );
m_In8CheckBox = new wxCheckBox( m_In8Panel, ID_IN8CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In8CheckBox->Enable( false );
bIn8Sizer->Add( m_In8CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -489,6 +512,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn9Sizer = new wxBoxSizer( wxVERTICAL );
m_In9CheckBox = new wxCheckBox( m_In9Panel, ID_IN9CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In9CheckBox->Enable( false );
bIn9Sizer->Add( m_In9CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -516,6 +541,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn10Sizer = new wxBoxSizer( wxVERTICAL );
m_In10CheckBox = new wxCheckBox( m_In10Panel, ID_IN10CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In10CheckBox->Enable( false );
bIn10Sizer->Add( m_In10CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -543,6 +570,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn11Sizer = new wxBoxSizer( wxVERTICAL );
m_In11CheckBox = new wxCheckBox( m_In11Panel, ID_IN11CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In11CheckBox->Enable( false );
bIn11Sizer->Add( m_In11CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -570,6 +599,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn12Sizer = new wxBoxSizer( wxVERTICAL );
m_In12CheckBox = new wxCheckBox( m_In12Panel, ID_IN12CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In12CheckBox->Enable( false );
bIn12Sizer->Add( m_In12CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -597,6 +628,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn13Sizer = new wxBoxSizer( wxVERTICAL );
m_In13CheckBox = new wxCheckBox( m_In13Panel, ID_IN13CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In13CheckBox->Enable( false );
bIn13Sizer->Add( m_In13CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -624,6 +657,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn14Sizer = new wxBoxSizer( wxVERTICAL );
m_In14CheckBox = new wxCheckBox( m_In14Panel, ID_IN14CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In14CheckBox->Enable( false );
bIn14Sizer->Add( m_In14CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -651,6 +686,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn15Sizer = new wxBoxSizer( wxVERTICAL );
m_In15CheckBox = new wxCheckBox( m_In15Panel, ID_IN15CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In15CheckBox->Enable( false );
bIn15Sizer->Add( m_In15CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -678,6 +715,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn16Sizer = new wxBoxSizer( wxVERTICAL );
m_In16CheckBox = new wxCheckBox( m_In16Panel, ID_IN16CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In16CheckBox->Enable( false );
bIn16Sizer->Add( m_In16CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -705,6 +744,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn17Sizer = new wxBoxSizer( wxVERTICAL );
m_In17CheckBox = new wxCheckBox( m_In17Panel, ID_IN17CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In17CheckBox->Enable( false );
bIn17Sizer->Add( m_In17CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -732,6 +773,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn18Sizer = new wxBoxSizer( wxVERTICAL );
m_In18CheckBox = new wxCheckBox( m_In18Panel, ID_IN18CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In18CheckBox->Enable( false );
bIn18Sizer->Add( m_In18CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -759,6 +802,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn19Sizer = new wxBoxSizer( wxVERTICAL );
m_In19CheckBox = new wxCheckBox( m_In19Panel, ID_IN19CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In19CheckBox->Enable( false );
bIn19Sizer->Add( m_In19CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -786,6 +831,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn20Sizer = new wxBoxSizer( wxVERTICAL );
m_In20CheckBox = new wxCheckBox( m_In20Panel, ID_IN20CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In20CheckBox->Enable( false );
bIn20Sizer->Add( m_In20CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -813,6 +860,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn21Sizer = new wxBoxSizer( wxVERTICAL );
m_In21CheckBox = new wxCheckBox( m_In21Panel, ID_IN21CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In21CheckBox->Enable( false );
bIn21Sizer->Add( m_In21CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -840,6 +889,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn22Sizer = new wxBoxSizer( wxVERTICAL );
m_In22CheckBox = new wxCheckBox( m_In22Panel, ID_IN22CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In22CheckBox->Enable( false );
bIn22Sizer->Add( m_In22CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -867,6 +918,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn23Sizer = new wxBoxSizer( wxVERTICAL );
m_In23CheckBox = new wxCheckBox( m_In23Panel, ID_IN23CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In23CheckBox->Enable( false );
bIn23Sizer->Add( m_In23CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -894,6 +947,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn24Sizer = new wxBoxSizer( wxVERTICAL );
m_In24CheckBox = new wxCheckBox( m_In24Panel, ID_IN24CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In24CheckBox->Enable( false );
bIn24Sizer->Add( m_In24CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -921,6 +976,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn25Sizer = new wxBoxSizer( wxVERTICAL );
m_In25CheckBox = new wxCheckBox( m_In25Panel, ID_IN25CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In25CheckBox->Enable( false );
bIn25Sizer->Add( m_In25CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -948,6 +1005,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn26Sizer = new wxBoxSizer( wxVERTICAL );
m_In26CheckBox = new wxCheckBox( m_In26Panel, ID_IN26CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In26CheckBox->Enable( false );
bIn26Sizer->Add( m_In26CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -975,6 +1034,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn27Sizer = new wxBoxSizer( wxVERTICAL );
m_In27CheckBox = new wxCheckBox( m_In27Panel, ID_IN27CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In27CheckBox->Enable( false );
bIn27Sizer->Add( m_In27CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -1002,6 +1063,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn28Sizer = new wxBoxSizer( wxVERTICAL );
m_In28CheckBox = new wxCheckBox( m_In28Panel, ID_IN28CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In28CheckBox->Enable( false );
bIn28Sizer->Add( m_In28CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -1029,6 +1092,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn29Sizer = new wxBoxSizer( wxVERTICAL );
m_In29CheckBox = new wxCheckBox( m_In29Panel, ID_IN29CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In29CheckBox->Enable( false );
bIn29Sizer->Add( m_In29CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -1056,6 +1121,8 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bIn30Sizer = new wxBoxSizer( wxVERTICAL );
m_In30CheckBox = new wxCheckBox( m_In30Panel, ID_IN30CHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_In30CheckBox->Enable( false );
bIn30Sizer->Add( m_In30CheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -1085,6 +1152,7 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bBackSizer = new wxBoxSizer( wxVERTICAL );
m_BackCheckBox = new wxCheckBox( m_BackPanel, ID_BACKCHECKBOX, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_BackCheckBox->Enable( false );
m_BackCheckBox->SetToolTip( _("If you want a back copper layer") );
bBackSizer->Add( m_BackCheckBox, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
......@@ -1406,20 +1474,21 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
bMainSizer->Add( b_layersListSizer, 1, wxEXPAND, 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();
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
m_sdbSizer->AddButton( m_sdbSizerOK );
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
bMainSizer->Add( m_sdbSizer2, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout();
// Connect Events
this->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_LAYERS_SETUP_BASE::OnSize ) );
m_PresetsChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnPresetsChoice ), NULL, this );
m_CopperLayersChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCopperLayersChoice ), NULL, this );
m_CrtYdFrontCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this );
......@@ -1472,13 +1541,14 @@ DIALOG_LAYERS_SETUP_BASE::DIALOG_LAYERS_SETUP_BASE( wxWindow* parent, wxWindowID
m_Eco2CheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this );
m_CommentsCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this );
m_DrawingsCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this );
m_sdbSizer2Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer2OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnOkButtonClick ), NULL, this );
m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnOkButtonClick ), NULL, this );
}
DIALOG_LAYERS_SETUP_BASE::~DIALOG_LAYERS_SETUP_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_LAYERS_SETUP_BASE::OnSize ) );
m_PresetsChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnPresetsChoice ), NULL, this );
m_CopperLayersChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCopperLayersChoice ), NULL, this );
m_CrtYdFrontCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this );
......@@ -1531,7 +1601,7 @@ DIALOG_LAYERS_SETUP_BASE::~DIALOG_LAYERS_SETUP_BASE()
m_Eco2CheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this );
m_CommentsCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this );
m_DrawingsCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCheckBox ), NULL, this );
m_sdbSizer2Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer2OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnOkButtonClick ), NULL, this );
m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LAYERS_SETUP_BASE::OnOkButtonClick ), NULL, this );
}
This source diff could not be displayed because it is too large. You can view the blob instead.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 5 2014)
// C++ code generated with wxFormBuilder (version Jun 5 2014)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -396,11 +396,12 @@ class DIALOG_LAYERS_SETUP_BASE : public DIALOG_SHIM
wxPanel* m_DrawingsPanel;
wxCheckBox* m_DrawingsCheckBox;
wxStaticText* m_DrawingsStaticText;
wxStdDialogButtonSizer* m_sdbSizer2;
wxButton* m_sdbSizer2OK;
wxButton* m_sdbSizer2Cancel;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnSize( wxSizeEvent& event ) { event.Skip(); }
virtual void OnPresetsChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCopperLayersChoice( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCheckBox( wxCommandEvent& event ) { event.Skip(); }
......
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