Commit cd535636 authored by dickelbeck's avatar dickelbeck

switch to wxAuiNotebook, maker smaller, remove non-visible technical layers

parent 9f062f37
...@@ -7,66 +7,82 @@ ...@@ -7,66 +7,82 @@
#include "layer_panel_base.h" #include "layer_panel_base.h"
#include <wx/settings.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
LAYER_PANEL_BASE::LAYER_PANEL_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) LAYER_PANEL_BASE::LAYER_PANEL_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{ {
wxBoxSizer* boxSizer; wxBoxSizer* boxSizer;
boxSizer = new wxBoxSizer( wxVERTICAL ); boxSizer = new wxBoxSizer( wxVERTICAL );
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); // m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_LayerPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizer3; m_notebook = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TOP );
bSizer3 = new wxBoxSizer( wxVERTICAL );
// wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
m_LayerScrolledWindow = new wxScrolledWindow( m_LayerPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER ); wxFont font = m_notebook->GetFont();
m_LayerScrolledWindow->SetScrollRate( 5, 5 ); font.SetPointSize( (font.GetPointSize() * 8) / 10 );
m_LayersFlexGridSizer = new wxFlexGridSizer( 0, 4, 1, 3 ); m_notebook->SetFont( font );
m_LayersFlexGridSizer->SetFlexibleDirection( wxHORIZONTAL ); m_notebook->SetNormalFont( font );
m_LayersFlexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_notebook->SetSelectedFont( font );
m_notebook->SetMeasuringFont( font );
m_LayerScrolledWindow->SetSizer( m_LayersFlexGridSizer );
m_LayerScrolledWindow->Layout();
m_LayersFlexGridSizer->Fit( m_LayerScrolledWindow ); m_LayerPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
bSizer3->Add( m_LayerScrolledWindow, 1, wxBOTTOM|wxEXPAND|wxTOP, 5 );
wxBoxSizer* bSizer3;
m_LayerPanel->SetSizer( bSizer3 ); bSizer3 = new wxBoxSizer( wxVERTICAL );
m_LayerPanel->Layout();
bSizer3->Fit( m_LayerPanel ); m_LayerScrolledWindow = new wxScrolledWindow( m_LayerPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER );
m_notebook->AddPage( m_LayerPanel, _("Layers"), true ); m_LayerScrolledWindow->SetScrollRate( 5, 5 );
m_RenderingPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_LayersFlexGridSizer = new wxFlexGridSizer( 0, 4, 0, 1 );
wxBoxSizer* bSizer4; m_LayersFlexGridSizer->SetFlexibleDirection( wxHORIZONTAL );
bSizer4 = new wxBoxSizer( wxVERTICAL ); m_LayersFlexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_RenderScrolledWindow = new wxScrolledWindow( m_RenderingPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER ); m_LayerScrolledWindow->SetSizer( m_LayersFlexGridSizer );
m_RenderScrolledWindow->SetScrollRate( 5, 5 ); m_LayerScrolledWindow->Layout();
m_RenderFlexGridSizer = new wxFlexGridSizer( 0, 2, 1, 3 ); m_LayersFlexGridSizer->Fit( m_LayerScrolledWindow );
m_RenderFlexGridSizer->SetFlexibleDirection( wxHORIZONTAL ); bSizer3->Add( m_LayerScrolledWindow, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 2 );
m_RenderFlexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
m_LayerPanel->SetSizer( bSizer3 );
m_RenderScrolledWindow->SetSizer( m_RenderFlexGridSizer ); m_LayerPanel->Layout();
m_RenderScrolledWindow->Layout(); bSizer3->Fit( m_LayerPanel );
m_RenderFlexGridSizer->Fit( m_RenderScrolledWindow ); m_notebook->AddPage( m_LayerPanel, _("Layer"), true );
bSizer4->Add( m_RenderScrolledWindow, 1, wxALL|wxEXPAND, 5 ); m_RenderingPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_RenderingPanel->SetSizer( bSizer4 ); wxBoxSizer* bSizer4;
m_RenderingPanel->Layout(); bSizer4 = new wxBoxSizer( wxVERTICAL );
bSizer4->Fit( m_RenderingPanel );
m_notebook->AddPage( m_RenderingPanel, _("Rendering"), false ); m_RenderScrolledWindow = new wxScrolledWindow( m_RenderingPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER );
m_RenderScrolledWindow->SetScrollRate( 5, 5 );
boxSizer->Add( m_notebook, 1, wxEXPAND | wxALL, 5 ); m_RenderFlexGridSizer = new wxFlexGridSizer( 0, 2, 0, 1 );
m_RenderFlexGridSizer->SetFlexibleDirection( wxHORIZONTAL );
this->SetSizer( boxSizer ); m_RenderFlexGridSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
this->Layout();
m_RenderScrolledWindow->SetSizer( m_RenderFlexGridSizer );
// Connect Events m_RenderScrolledWindow->Layout();
m_LayerScrolledWindow->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_PANEL_BASE::OnLeftDownLayers ), NULL, this ); m_RenderFlexGridSizer->Fit( m_RenderScrolledWindow );
m_LayerScrolledWindow->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( LAYER_PANEL_BASE::OnRightDownLayers ), NULL, this ); bSizer4->Add( m_RenderScrolledWindow, 1, wxALL|wxEXPAND, 5 );
m_RenderingPanel->SetSizer( bSizer4 );
m_RenderingPanel->Layout();
bSizer4->Fit( m_RenderingPanel );
m_notebook->AddPage( m_RenderingPanel, _("Render"), false );
boxSizer->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
this->SetSizer( boxSizer );
this->Layout();
// Connect Events
m_LayerScrolledWindow->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_PANEL_BASE::OnLeftDownLayers ), NULL, this );
m_LayerScrolledWindow->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( LAYER_PANEL_BASE::OnRightDownLayers ), NULL, this );
} }
LAYER_PANEL_BASE::~LAYER_PANEL_BASE() LAYER_PANEL_BASE::~LAYER_PANEL_BASE()
{ {
// Disconnect Events // Disconnect Events
m_LayerScrolledWindow->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_PANEL_BASE::OnLeftDownLayers ), NULL, this ); m_LayerScrolledWindow->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_PANEL_BASE::OnLeftDownLayers ), NULL, this );
m_LayerScrolledWindow->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( LAYER_PANEL_BASE::OnRightDownLayers ), NULL, this ); m_LayerScrolledWindow->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( LAYER_PANEL_BASE::OnRightDownLayers ), NULL, this );
} }
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
#include <wx/bitmap.h> #include <wx/bitmap.h>
#include <wx/image.h> #include <wx/image.h>
#include <wx/icon.h> #include <wx/icon.h>
#include <wx/notebook.h> //#include <wx/notebook.h>
#include <wx/aui/auibook.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
...@@ -29,28 +30,30 @@ ...@@ -29,28 +30,30 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class LAYER_PANEL_BASE /// Class LAYER_PANEL_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class LAYER_PANEL_BASE : public wxPanel class LAYER_PANEL_BASE : public wxPanel
{ {
private: private:
protected: protected:
wxNotebook* m_notebook; // wxNotebook* m_notebook;
wxPanel* m_LayerPanel; wxAuiNotebook* m_notebook;
wxScrolledWindow* m_LayerScrolledWindow;
wxFlexGridSizer* m_LayersFlexGridSizer; wxPanel* m_LayerPanel;
wxPanel* m_RenderingPanel; wxScrolledWindow* m_LayerScrolledWindow;
wxScrolledWindow* m_RenderScrolledWindow; wxFlexGridSizer* m_LayersFlexGridSizer;
wxFlexGridSizer* m_RenderFlexGridSizer; wxPanel* m_RenderingPanel;
wxScrolledWindow* m_RenderScrolledWindow;
// Virtual event handlers, overide them in your derived class wxFlexGridSizer* m_RenderFlexGridSizer;
virtual void OnLeftDownLayers( wxMouseEvent& event ){ event.Skip(); }
virtual void OnRightDownLayers( wxMouseEvent& event ){ event.Skip(); } // Virtual event handlers, overide them in your derived class
virtual void OnLeftDownLayers( wxMouseEvent& event ){ event.Skip(); }
virtual void OnRightDownLayers( wxMouseEvent& event ){ event.Skip(); }
public:
LAYER_PANEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 200,200 ), long style = wxTAB_TRAVERSAL );
~LAYER_PANEL_BASE(); public:
LAYER_PANEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 200,200 ), long style = wxTAB_TRAVERSAL );
~LAYER_PANEL_BASE();
}; };
#endif //__layer_panel_base__ #endif //__layer_panel_base__
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
#define LYR_COLUMN_COUNT 4 ///< Layer tab column count #define LYR_COLUMN_COUNT 4 ///< Layer tab column count
#define RND_COLUMN_COUNT 2 ///< Rendering tab column count #define RND_COLUMN_COUNT 2 ///< Rendering tab column count
#define BUTT_SIZE_X 32 #define BUTT_SIZE_X 20
#define BUTT_SIZE_Y 22 #define BUTT_SIZE_Y 18
#define BUTT_VOID 6 #define BUTT_VOID 4
#define ID_SHOW_ALL_COPPERS wxID_HIGHEST #define ID_SHOW_ALL_COPPERS wxID_HIGHEST
...@@ -60,46 +60,45 @@ ...@@ -60,46 +60,45 @@
/* XPM */ /* XPM */
static const char * clear_xpm[] = { static const char * clear_xpm[] = {
"28 14 1 1", "10 14 1 1",
" c None", " c None",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" "}; " "};
/* XPM */ /* XPM */
static const char * rightarrow_xpm[] = { static const char * rightarrow_xpm[] = {
"28 14 5 1", "10 14 5 1",
" c None", " c None",
". c white", ". c white",
"X c #8080ff", "X c #8080ff",
"o c BLUE", "o c BLUE",
"O c gray56", "O c gray56",
" .X ", " X ",
" .XX ", " XX ",
" .XXX ", " XXX ",
" .XXXX ", " XXXX ",
" ................XXXXX ", " XXXXX ",
" XXXXXXXXXXXXXXXXXXXXXX ", " XXXXXX ",
" XXXXXXXXXXXXXXXXXXXXXXX ", " XXXXXXX ",
" oooooooooooooooooooooooO", " oooooooO",
" ooooooooooooooooooooooO ", " ooooooO ",
" OOOOOOOOOOOOOOOoooooO ", " oooooO ",
" ooooO ", " ooooO ",
" oooO ", " oooO ",
" ooO ", " ooO ",
" oO "}; " oO "};
/** /**
* Function encodeId * Function encodeId
...@@ -139,6 +138,17 @@ static wxString makeColorTxt( int aColor ) ...@@ -139,6 +138,17 @@ static wxString makeColorTxt( int aColor )
} }
/**
* Function shrinkFont
* reduces the size of the wxFont associated with \a aControl
*/
static void shrinkFont( wxWindow* aControl )
{
wxFont font = aControl->GetFont();
font.SetPointSize( (font.GetPointSize() * 8) / 10 ); // go to 80% of original.
aControl->SetFont( font );
}
wxBitmap LAYER_WIDGET::makeBitmap( int aColor ) wxBitmap LAYER_WIDGET::makeBitmap( int aColor )
{ {
// the bitmap will be BUTT_VOID*2 pixels smaller than the button, leaving a // the bitmap will be BUTT_VOID*2 pixels smaller than the button, leaving a
...@@ -353,10 +363,10 @@ void LAYER_WIDGET::OnRenderCheckBox( wxCommandEvent& event ) ...@@ -353,10 +363,10 @@ void LAYER_WIDGET::OnRenderCheckBox( wxCommandEvent& event )
void LAYER_WIDGET::OnTabChange( wxNotebookEvent& event ) void LAYER_WIDGET::OnTabChange( wxNotebookEvent& event )
{ {
// printf("OnTabChange\n"); // wxFocusEvent event( wxEVT_SET_FOCUS );
// passOnFocus(); // this segfaults, cannot enable it. // m_FocusOwner->AddPendingEvent( event );
// maybe we need to find a way to call the stock tab change event handler
// first, then call passOnFocus() before we consider this event done. passOnFocus(); // does not work in this context, probably because we have receive control here too early.
} }
...@@ -411,6 +421,7 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec ) ...@@ -411,6 +421,7 @@ void LAYER_WIDGET::insertLayerRow( int aRow, const ROW& aSpec )
// column 2 // column 2
col = 2; col = 2;
wxStaticText* st = new wxStaticText( m_LayerScrolledWindow, encodeId( col, aSpec.id ), aSpec.rowName ); wxStaticText* st = new wxStaticText( m_LayerScrolledWindow, encodeId( col, aSpec.id ), aSpec.rowName );
shrinkFont( st );
st->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnLeftDownLayers ), NULL, this ); st->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnLeftDownLayers ), NULL, this );
st->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnRightDownLayers ), NULL, this ); st->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( LAYER_WIDGET::OnRightDownLayers ), NULL, this );
st->SetToolTip( aSpec.tooltip ); st->SetToolTip( aSpec.tooltip );
...@@ -456,6 +467,7 @@ void LAYER_WIDGET::insertRenderRow( int aRow, const ROW& aSpec ) ...@@ -456,6 +467,7 @@ void LAYER_WIDGET::insertRenderRow( int aRow, const ROW& aSpec )
col = 1; col = 1;
wxCheckBox* cb = new wxCheckBox( m_RenderScrolledWindow, encodeId( col, aSpec.id ), wxCheckBox* cb = new wxCheckBox( m_RenderScrolledWindow, encodeId( col, aSpec.id ),
aSpec.rowName, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT ); aSpec.rowName, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
shrinkFont( cb );
cb->SetValue( aSpec.state ); cb->SetValue( aSpec.state );
cb->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, cb->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED,
wxCommandEventHandler( LAYER_WIDGET::OnRenderCheckBox ), NULL, this ); wxCommandEventHandler( LAYER_WIDGET::OnRenderCheckBox ), NULL, this );
...@@ -496,12 +508,22 @@ LAYER_WIDGET::LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner ) : ...@@ -496,12 +508,22 @@ LAYER_WIDGET::LAYER_WIDGET( wxWindow* aParent, wxWindow* aFocusOwner ) :
// trap the tab changes so that we can call passOnFocus(). // trap the tab changes so that we can call passOnFocus().
m_notebook->Connect( -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->Connect( -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
wxNotebookEventHandler( LAYER_WIDGET::OnTabChange ) ); wxNotebookEventHandler( LAYER_WIDGET::OnTabChange ), NULL, this );
} }
wxSize LAYER_WIDGET::GetBestSize() const wxSize LAYER_WIDGET::GetBestSize() const
{ {
#if 0
wxSize layerz = m_LayersFlexGridSizer->GetMinSize();
wxSize renderz = m_RenderFlexGridSizer->GetMinSize();
wxSize clientz( max(renderz.x,layerz.x), max(renderz.y,layerz.y) );
return ClientToWindowSize( clientz );
#else
// size of m_LayerScrolledWindow -------------- // size of m_LayerScrolledWindow --------------
wxArrayInt widths = m_LayersFlexGridSizer->GetColWidths(); wxArrayInt widths = m_LayersFlexGridSizer->GetColWidths();
int totWidth = 0; int totWidth = 0;
...@@ -527,7 +549,6 @@ wxSize LAYER_WIDGET::GetBestSize() const ...@@ -527,7 +549,6 @@ wxSize LAYER_WIDGET::GetBestSize() const
totHeight += heights[i] + m_LayersFlexGridSizer->GetVGap(); totHeight += heights[i] + m_LayersFlexGridSizer->GetVGap();
// printf("heights[%d]:%d\n", i, heights[i] ); // printf("heights[%d]:%d\n", i, heights[i] );
} }
totHeight += 2 * heights[0]; // use 2 row heights to approximate tab height totHeight += 2 * heights[0]; // use 2 row heights to approximate tab height
} }
else else
...@@ -535,6 +556,8 @@ wxSize LAYER_WIDGET::GetBestSize() const ...@@ -535,6 +556,8 @@ wxSize LAYER_WIDGET::GetBestSize() const
wxSize layerz( totWidth, totHeight ); wxSize layerz( totWidth, totHeight );
layerz += m_LayerPanel->GetWindowBorderSize();
// size of m_RenderScrolledWindow -------------- // size of m_RenderScrolledWindow --------------
widths = m_RenderFlexGridSizer->GetColWidths(); widths = m_RenderFlexGridSizer->GetColWidths();
...@@ -568,7 +591,17 @@ wxSize LAYER_WIDGET::GetBestSize() const ...@@ -568,7 +591,17 @@ wxSize LAYER_WIDGET::GetBestSize() const
wxSize renderz( totWidth, totHeight ); wxSize renderz( totWidth, totHeight );
return wxSize( max(renderz.x,layerz.x), max(renderz.y,layerz.y) ); renderz += m_RenderingPanel->GetWindowBorderSize();
wxSize clientz( max(renderz.x,layerz.x), max(renderz.y,layerz.y) );
// wxSize diffz( GetSize() - GetClientSize() );
// clientz += diffz;
return clientz;
#endif
} }
...@@ -617,7 +650,7 @@ void LAYER_WIDGET::ClearRenderRows() ...@@ -617,7 +650,7 @@ void LAYER_WIDGET::ClearRenderRows()
void LAYER_WIDGET::SelectLayerRow( int aRow ) void LAYER_WIDGET::SelectLayerRow( int aRow )
{ {
// enable the layer tab at index 0 // enable the layer tab at index 0
m_notebook->ChangeSelection( 0 ); m_notebook->SetSelection( 0 );
int oldNdx = LYR_COLUMN_COUNT * m_CurrentRow; int oldNdx = LYR_COLUMN_COUNT * m_CurrentRow;
int newNdx = LYR_COLUMN_COUNT * aRow; int newNdx = LYR_COLUMN_COUNT * aRow;
...@@ -699,15 +732,12 @@ class MYFRAME : public wxFrame ...@@ -699,15 +732,12 @@ class MYFRAME : public wxFrame
// abstract methods. // abstract methods.
class MYLAYERS : public LAYER_WIDGET class MYLAYERS : public LAYER_WIDGET
{ {
MYFRAME* frame;
public: public:
// your constructor could take a BOARD argument. here I leave it // your constructor could take a BOARD argument. here I leave it
// out because this source module wants to know nothing of BOARDs // out because this source module wants to know nothing of BOARDs
// to maximize re-use. // to maximize re-use.
MYLAYERS( wxWindow* aParent, MYFRAME* aFrame ) : MYLAYERS( wxWindow* aParent ) :
LAYER_WIDGET( aParent ), LAYER_WIDGET( aParent, aParent )
frame( aFrame )
{ {
} }
...@@ -755,7 +785,7 @@ public: ...@@ -755,7 +785,7 @@ public:
// notify wxAUI which frame to use // notify wxAUI which frame to use
m_mgr.SetManagedWindow( this ); m_mgr.SetManagedWindow( this );
MYLAYERS* lw = new MYLAYERS( this, this ); MYLAYERS* lw = new MYLAYERS( this );
// add some layer rows // add some layer rows
static const LAYER_WIDGET::ROW layerRows[] = { static const LAYER_WIDGET::ROW layerRows[] = {
......
...@@ -117,14 +117,14 @@ ...@@ -117,14 +117,14 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="notebookpage" expanded="1"> <object class="notebookpage" expanded="1">
<property name="bitmap">layerbitmap; Load From File</property> <property name="bitmap">layerbitmap; Load From File</property>
<property name="label">Layers</property> <property name="label">Layer</property>
<property name="select">1</property> <property name="select">1</property>
<object class="wxPanel" expanded="1"> <object class="wxPanel" expanded="1">
<property name="bg"></property> <property name="bg"></property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font">,90,90,10,70,0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -167,8 +167,8 @@ ...@@ -167,8 +167,8 @@
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">2</property>
<property name="flag">wxBOTTOM|wxEXPAND|wxTOP</property> <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxScrolledWindow" expanded="1"> <object class="wxScrolledWindow" expanded="1">
<property name="bg"></property> <property name="bg"></property>
...@@ -219,13 +219,13 @@ ...@@ -219,13 +219,13 @@
<property name="flexible_direction">wxHORIZONTAL</property> <property name="flexible_direction">wxHORIZONTAL</property>
<property name="growablecols"></property> <property name="growablecols"></property>
<property name="growablerows"></property> <property name="growablerows"></property>
<property name="hgap">3</property> <property name="hgap">1</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_LayersFlexGridSizer</property> <property name="name">m_LayersFlexGridSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property> <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="rows">0</property> <property name="rows">0</property>
<property name="vgap">1</property> <property name="vgap">0</property>
</object> </object>
</object> </object>
</object> </object>
...@@ -234,14 +234,14 @@ ...@@ -234,14 +234,14 @@
</object> </object>
<object class="notebookpage" expanded="1"> <object class="notebookpage" expanded="1">
<property name="bitmap">; Load From File</property> <property name="bitmap">; Load From File</property>
<property name="label">Rendering</property> <property name="label">Render</property>
<property name="select">0</property> <property name="select">0</property>
<object class="wxPanel" expanded="1"> <object class="wxPanel" expanded="1">
<property name="bg"></property> <property name="bg"></property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font">,90,90,10,70,0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
...@@ -336,13 +336,13 @@ ...@@ -336,13 +336,13 @@
<property name="flexible_direction">wxHORIZONTAL</property> <property name="flexible_direction">wxHORIZONTAL</property>
<property name="growablecols"></property> <property name="growablecols"></property>
<property name="growablerows"></property> <property name="growablerows"></property>
<property name="hgap">3</property> <property name="hgap">1</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_RenderFlexGridSizer</property> <property name="name">m_RenderFlexGridSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_NONE</property> <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_NONE</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="rows">0</property> <property name="rows">0</property>
<property name="vgap">1</property> <property name="vgap">0</property>
</object> </object>
</object> </object>
</object> </object>
......
...@@ -327,7 +327,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -327,7 +327,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
lyrs.MinSize( m_Layers->GetBestSize() ); // updated in ReFillLayerWidget lyrs.MinSize( m_Layers->GetBestSize() ); // updated in ReFillLayerWidget
lyrs.BestSize( m_Layers->GetBestSize() ); lyrs.BestSize( m_Layers->GetBestSize() );
lyrs.CloseButton( false ); lyrs.CloseButton( false );
lyrs.Caption( wxT( "Layers" ) ); lyrs.Caption( _( "Visibles" ) );
lyrs.IsFloatable(); lyrs.IsFloatable();
...@@ -520,6 +520,8 @@ void WinEDA_PcbFrame::ReFillLayerWidget() ...@@ -520,6 +520,8 @@ void WinEDA_PcbFrame::ReFillLayerWidget()
int layerId; int layerId;
wxString tooltip; wxString tooltip;
} techLayerSeq[] = { } techLayerSeq[] = {
/* some layers are not visible nor editable, don't show them for now:
{ ADHESIVE_N_FRONT, _("Adhesive on board's front") }, { ADHESIVE_N_FRONT, _("Adhesive on board's front") },
{ ADHESIVE_N_BACK, _("Adhesive on board's back") }, { ADHESIVE_N_BACK, _("Adhesive on board's back") },
{ SOLDERPASTE_N_FRONT, _("Solder paste on board's front") }, { SOLDERPASTE_N_FRONT, _("Solder paste on board's front") },
...@@ -528,11 +530,12 @@ void WinEDA_PcbFrame::ReFillLayerWidget() ...@@ -528,11 +530,12 @@ void WinEDA_PcbFrame::ReFillLayerWidget()
{ SILKSCREEN_N_BACK, _("Silkscreen on board's back") }, { SILKSCREEN_N_BACK, _("Silkscreen on board's back") },
{ SOLDERMASK_N_FRONT, _("Solder mask on board's front") }, { SOLDERMASK_N_FRONT, _("Solder mask on board's front") },
{ SOLDERMASK_N_BACK, _("Solder mask on board's back") }, { SOLDERMASK_N_BACK, _("Solder mask on board's back") },
{ DRAW_N, _("Explanatory drawings") }, */
{ COMMENT_N, _("Explanatory comments") }, { DRAW_N, _( "Explanatory drawings" ) },
{ ECO1_N, _("TDB") }, { COMMENT_N, _( "Explanatory comments" ) },
{ ECO2_N, _("TBD") }, { ECO1_N, _( "TDB" ) },
{ EDGE_N, _("Board's perimeter definition") }, { ECO2_N, _( "TBD" ) },
{ EDGE_N, _( "Board's perimeter definition" ) },
}; };
for( unsigned i=0; i<DIM(techLayerSeq); ++i ) for( unsigned i=0; i<DIM(techLayerSeq); ++i )
......
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