31 #include <wx/treebook.h> 61 m_arrowLength( aFrame, m_lblArrowLength, m_dimensionArrowLength, m_arrowLengthUnits ),
62 m_extensionOffset( aFrame, m_lblExtensionOffset, m_dimensionExtensionOffset,
63 m_dimensionExtensionOffsetUnits )
69 m_grid->SetDefaultRowSize(
m_grid->GetDefaultRowSize() + 4 );
79 int min_best_width =
m_grid->GetTextExtent( wxT(
"555,555555 mils" ) ).x;
81 for(
int i = 0; i <
m_grid->GetNumberCols(); ++i )
87 m_grid->SetColMinimalWidth( i, min_width );
90 m_grid->SetColSize( i, std::max( min_width, min_best_width ) );
102 m_grid->PopEventHandler(
true );
126 wxColour disabledColour = wxSystemSettings::GetColour( wxSYS_COLOUR_BACKGROUND );
128 #define SET_MILS_CELL( row, col, val ) \ 129 m_grid->SetCellValue( row, col, StringFromValue( m_Frame->GetUserUnits(), val, true ) ) 131 #define DISABLE_CELL( row, col ) \ 132 m_grid->SetReadOnly( row, col ); m_grid->SetCellBackgroundColour( row, col, disabledColour ); 154 auto attr =
new wxGridCellAttr;
155 attr->SetRenderer(
new wxGridCellBoolRenderer() );
157 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
160 attr =
new wxGridCellAttr;
161 attr->SetRenderer(
new wxGridCellBoolRenderer() );
163 attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
169 for(
int col = 0; col <
m_grid->GetNumberCols(); col++ )
177 wxT(
"Unhandled dimension precision!" ) );
bool m_DimensionSuppressZeroes
Implementation of conversion functions that require both schematic and board internal units.
Class PANEL_SETUP_TEXT_AND_GRAPHICS_BASE.
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
int m_DimensionPrecision
Number of digits after the decimal.
wxChoice * m_dimensionUnits
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
DIM_TEXT_POSITION m_DimensionTextPosition
DIM_UNITS_MODE m_DimensionUnitsMode
int GetVisibleWidth(int aCol, bool aHeader=true, bool aContents=false, bool aKeep=true)
Calculates the specified column based on the actual size of the text on screen.
wxSize m_TextSize[LAYER_CLASS_COUNT]
wxChoice * m_dimensionPrecision
int m_TextThickness[LAYER_CLASS_COUNT]
long long int ValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application.
wxChoice * m_dimensionUnitsFormat
#define DISABLE_CELL(row, col)
bool TransferDataFromWindow() override
bool m_TextItalic[LAYER_CLASS_COUNT]
wxCheckBox * m_dimensionSuppressZeroes
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
PANEL_SETUP_TEXT_AND_GRAPHICS(PAGED_DIALOG *aParent, PCB_EDIT_FRAME *aFrame)
int m_LineThickness[LAYER_CLASS_COUNT]
~PANEL_SETUP_TEXT_AND_GRAPHICS() override
void ImportSettingsFrom(BOARD *aBoard)
int m_DimensionArrowLength
int getGridValue(int aRow, int aCol)
wxChoice * m_dimensionTextPositionMode
Information pertinent to a Pcbnew printed circuit board.
wxCheckBox * m_dimensionTextKeepAligned
The main frame for Pcbnew.
bool TransferDataToWindow() override
UNIT_BINDER m_arrowLength
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
virtual long long int GetValue()
Return the current value in Internal Units.
DIM_UNITS_FORMAT m_DimensionUnitsFormat
#define SET_MILS_CELL(row, col, val)
UNIT_BINDER m_extensionOffset
int m_DimensionExtensionOffset
void onUnitsChanged(wxCommandEvent &aEvent)
bool m_DimensionKeepTextAligned
BOARD_DESIGN_SETTINGS * m_BrdSettings
bool m_TextUpright[LAYER_CLASS_COUNT]
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
Container for design settings for a BOARD object.