48 case 0:
return _(
"Move items on:" );
49 case 1:
return _(
"To layer:" );
50 default:
return wxEmptyString;
54 wxString
GetValue(
int row,
int col )
override {
return "undefined"; }
55 void SetValue(
int row,
int col,
const wxString& value )
override { }
72 m_layerDestinations( aArray )
76 m_grid->SetDefaultRowSize(
m_grid->GetDefaultRowSize() + 4 );
77 m_grid->SetCellHighlightROPenWidth( 0 );
98 if( enabledCopperLayers.test( layer ) )
100 auto attr =
new wxGridCellAttr;
102 attr->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
104 m_grid->SetAttr( row, 0, attr );
106 attr =
new wxGridCellAttr;
109 m_grid->SetAttr( row, 1, attr );
111 m_grid->GetTable()->SetValueAsLong( row, 0, (
long) layer );
112 m_grid->GetTable()->SetValueAsLong( row, 1, (
long) layer );
128 wxGridTableBase* table =
m_grid->GetTable();
133 if( enabledCopperLayers.test( layer ) )
146 aWidth -= (
m_grid->GetSize().x -
m_grid->GetClientSize().x );
148 m_grid->SetColSize( 0, aWidth / 2 );
149 m_grid->SetColSize( 1, aWidth -
m_grid->GetColSize( 0 ) );
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
int GetNumberCols() override
PCB_LAYER_ID * m_layerDestinations
void SetValue(int row, int col, const wxString &value) override
wxString GetColLabelValue(int aCol) override
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
int m_layers[MAX_CU_LAYERS][2]
LAYER_GRID_TABLE(int layerCount)
~DIALOG_SWAP_LAYERS() override
void SetTable(wxGridTableBase *table, bool aTakeOwnership=false)
Hide wxGrid's SetTable() method with one which doesn't mess up the grid column widths when setting th...
wxString GetValue(int row, int col) override
int GetNumberRows() override
void DestroyTable(wxGridTableBase *aTable)
Work-around for a bug in wxGrid which crashes when deleting the table if the cell edit control was no...
long GetValueAsLong(int row, int col) override
void adjustGridColumns(int aWidth)
LSET is a set of PCB_LAYER_IDs.
Class DIALOG_SWAP_LAYERS_BASE.
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
DIALOG_SWAP_LAYERS(PCB_BASE_EDIT_FRAME *aParent, PCB_LAYER_ID *aArray)
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
Common, abstract interface for edit frames.
PCB_LAYER_ID
A quick note on layer IDs:
int GetCopperLayerCount() const
bool TransferDataFromWindow() override
void OnSize(wxSizeEvent &event) override
PCB_BASE_EDIT_FRAME * m_parent
bool TransferDataToWindow() override
LAYER_GRID_TABLE * m_gridTable
void SetValueAsLong(int row, int col, long value) override