96    m_bold->SetIsCheckButton();
 
  138    double rot_list[] = { 0.0, 90.0, -90.0, 180.0 };
 
  144            [&]( wxCommandEvent& evt )
 
  152    auto updateEventHandler =
 
  153            [&]( wxCommandEvent& evt )
 
  162    m_txtValue->Bind( wxEVT_TEXT, updateEventHandler );
 
  163    m_txtPrefix->Bind( wxEVT_TEXT, updateEventHandler );
 
  164    m_txtSuffix->Bind( wxEVT_TEXT, updateEventHandler );
 
  166    m_cbUnits->Bind( wxEVT_CHOICE, updateEventHandler );
 
  172            [&]( wxCommandEvent& aEvt )
 
  182            [&]( wxCommandEvent& aEvt )
 
 
  228        wxMessageBox( 
_( 
"This item was on a non-existing layer.\n" 
  229                         "It has been moved to the first defined layer." ) );
 
  290        m_cbTextFrame->SetSelection( 
static_cast<int>( leader->GetTextBorder() ) );
 
  292    return DIALOG_DIMENSION_PROPERTIES_BASE::TransferDataToWindow();
 
 
  298    if( !DIALOG_DIMENSION_PROPERTIES_BASE::TransferDataFromWindow() )
 
  306    bool pushCommit = ( 
m_dimension->GetEditFlags() == 0 );
 
  318        commit.
Push( 
_( 
"Edit Dimension Properties" ) );
 
 
  347    if( aEvent.IsChecked() )
 
 
  360        if( btn->IsChecked() && btn != aEvent.GetEventObject() )
 
 
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
 
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
 
Information pertinent to a Pcbnew printed circuit board.
 
wxString ConvertCrossReferencesToKIIDs(const wxString &aSource) const
Convert cross-references back and forth between ${refDes:field} and ${kiid:field}.
 
wxString ConvertKIIDsToCrossReferences(const wxString &aSource) const
 
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
 
wxStaticText * m_lblTextThickness
 
wxCheckBox * m_cbSuppressZeroes
 
wxTextCtrl * m_txtLineThickness
 
PCB_LAYER_BOX_SELECTOR * m_cbLeaderLayer
 
BITMAP_BUTTON * m_separator2
 
wxStaticBoxSizer * m_sizerCenter
 
BITMAP_BUTTON * m_alignCenter
 
wxComboBox * m_cbTextOrientation
 
PCB_LAYER_BOX_SELECTOR * m_cbCenterLayer
 
wxStaticText * m_lblTextPosXUnits
 
wxStaticText * m_lblTextPosYUnits
 
wxStaticText * m_lblTextThicknessUnits
 
wxStaticText * m_lblArrowLength
 
wxTextCtrl * m_txtTextPosX
 
wxStaticText * m_lblExtensionOvershootUnits
 
wxStaticText * m_lblTextPosX
 
wxTextCtrl * m_txtExtensionOffset
 
wxStaticText * m_staticTextPreview
 
wxChoice * m_cbUnitsFormat
 
wxStaticText * m_lblTextHeight
 
wxTextCtrl * m_txtArrowLength
 
wxStaticText * m_lblTextWidthUnits
 
wxStaticBoxSizer * m_sizerText
 
wxStaticText * m_lblTextPositionMode
 
BITMAP_BUTTON * m_alignRight
 
wxCheckBox * m_cbKeepAligned
 
BITMAP_BUTTON * m_mirrored
 
wxTextCtrl * m_txtTextPosY
 
wxStaticText * m_lblTextPosY
 
wxStaticText * m_lblTextWidth
 
wxChoice * m_cbTextPositionMode
 
wxTextCtrl * m_txtTextHeight
 
wxTextCtrl * m_txtTextThickness
 
DIALOG_DIMENSION_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Dimension Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSYSTEM_MENU)
 
wxTextCtrl * m_txtTextWidth
 
wxStaticBoxSizer * m_sizerLeader
 
wxStaticText * m_lblExtensionOffset
 
wxTextCtrl * m_txtLeaderValue
 
wxStaticText * m_lblExtensionOffsetUnits
 
wxStaticText * m_lblLineThickness
 
wxStaticText * m_lblArrowLengthUnits
 
wxStaticBoxSizer * m_sizerFormat
 
BITMAP_BUTTON * m_separator1
 
wxStaticText * m_lblExtensionOvershoot
 
BITMAP_BUTTON * m_alignLeft
 
BITMAP_BUTTON * m_separator0
 
wxCheckBox * m_cbOverrideValue
 
PCB_LAYER_BOX_SELECTOR * m_cbLayer
 
wxStaticText * m_lblLineThicknessUnits
 
BITMAP_BUTTON * m_separator3
 
wxStaticText * m_lblTextHeightUnits
 
wxChoice * m_cbArrowDirection
 
wxTextCtrl * m_txtExtensionOvershoot
 
wxStaticText * m_lblTextOrientation
 
UNIT_BINDER m_orientation
 
bool TransferDataFromWindow() override
 
void onFontSelected(wxCommandEvent &aEvent) override
 
PCB_BASE_EDIT_FRAME * m_frame
 
UNIT_BINDER m_textThickness
 
PCB_LAYER_BOX_SELECTOR * m_cbLayerActual
 
bool TransferDataToWindow() override
 
void onBoldToggle(wxCommandEvent &aEvent) override
 
PCB_DIMENSION_BASE * m_dimension
 
wxTextCtrl * m_txtValueActual
 
void updateDimensionFromDialog(PCB_DIMENSION_BASE *aTarget)
 
DIALOG_DIMENSION_PROPERTIES(PCB_BASE_EDIT_FRAME *aParent, BOARD_ITEM *aItem)
 
UNIT_BINDER m_extensionOvershoot
 
UNIT_BINDER m_lineThickness
 
~DIALOG_DIMENSION_PROPERTIES()
 
void onAlignButton(wxCommandEvent &aEvent) override
 
UNIT_BINDER m_extensionOffset
 
PCB_DIMENSION_BASE * m_previewDimension
 
void onThickness(wxCommandEvent &aEvent) override
 
UNIT_BINDER m_arrowLength
 
void SetupStandardButtons(std::map< int, wxString > aLabels={})
 
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
 
KICAD_T Type() const
Returns the type of object.
 
void SetTextPos(const VECTOR2I &aPoint)
 
void SetMirrored(bool isMirrored)
 
void SetTextWidth(int aWidth)
 
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
 
void SetTextHeight(int aHeight)
 
void SetBold(bool aBold)
Set the text to be bold - this will also update the font if needed.
 
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
 
void SetItalic(bool aItalic)
Set the text to be italic - this will also update the font if needed.
 
void SetFont(KIFONT::FONT *aFont)
 
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
 
virtual bool IsStroke() const
 
Common, abstract interface for edit frames.
 
void Update()
Update the dimension's cached text and geometry.
 
void SetUnitsFormat(const DIM_UNITS_FORMAT aFormat)
 
void SetPrefix(const wxString &aPrefix)
 
void SetExtensionOffset(int aOffset)
 
void SetSuppressZeroes(bool aSuppress)
 
void SetOverrideTextEnabled(bool aOverride)
 
void SetSuffix(const wxString &aSuffix)
 
void SetTextPositionMode(DIM_TEXT_POSITION aMode)
 
void SetLineThickness(int aWidth)
 
void SetArrowLength(int aLength)
 
void SetPrecision(DIM_PRECISION aPrecision)
 
void SetArrowDirection(const DIM_ARROW_DIRECTION &aDirection)
 
void SetOverrideText(const wxString &aValue)
 
void SetUnitsMode(DIM_UNITS_MODE aMode)
 
void SetKeepTextAligned(bool aKeepAligned)
 
For better understanding of the points that make a dimension:
 
A leader is a dimension-like object pointing to a specific point.
 
#define IN_EDIT
Item currently edited.
 
int GetPenSizeForBold(int aTextSize)
 
int GetPenSizeForNormal(int aTextSize)
 
PCB_LAYER_ID
A quick note on layer IDs:
 
DIM_TEXT_POSITION
Where to place the text on a dimension.
 
@ MANUAL
Text placement is manually set by the user.
 
DIM_UNITS_FORMAT
How to display the units in a dimension's text.
 
DIM_TEXT_BORDER
Frame to show around dimension text.
 
@ GR_TEXT_H_ALIGN_INDETERMINATE
 
constexpr KICAD_T BaseType(const KICAD_T aType)
Return the underlying type of the given type.
 
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
 
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
 
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type
 
VECTOR2< int32_t > VECTOR2I