49 case 0:
return _(
"Move items on:" );
50 case 1:
return _(
"To layer:" );
51 default:
return wxEmptyString;
55 wxString
GetValue(
int row,
int col )
override {
return "undefined"; }
56 void SetValue(
int row,
int col,
const wxString& value )
override { }
73 m_layerDestinations( aArray )
77 m_grid->SetDefaultRowSize(
m_grid->GetDefaultRowSize() + 4 );
78 m_grid->SetCellHighlightROPenWidth( 0 );
99 if( enabledCopperLayers.test( layer ) )
101 auto attr =
new wxGridCellAttr;
103 attr->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
105 m_grid->SetAttr( row, 0, attr );
107 attr =
new wxGridCellAttr;
110 m_grid->SetAttr( row, 1, attr );
112 m_grid->GetTable()->SetValueAsLong( row, 0, (
long) layer );
113 m_grid->GetTable()->SetValueAsLong( row, 1, (
long) layer );
129 wxGridTableBase* table =
m_grid->GetTable();
134 if( enabledCopperLayers.test( layer ) )
147 aWidth -= (
m_grid->GetSize().x -
m_grid->GetClientSize().x );
149 m_grid->SetColSize( 0, aWidth / 2 );
150 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)
PCB_LAYER_ID
A quick note on layer IDs:
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.
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