45 m_currentText( aTextBox ),
46 m_textSize( aParent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits ),
47 m_borderWidth( aParent, m_borderWidthLabel, m_borderWidthCtrl, m_borderWidthUnits ),
48 m_scintillaTricks( nullptr ),
49 m_helpWindow( nullptr )
57 for(
const auto& [ lineStyle, lineStyleDesc ] :
lineTypeNames )
71 m_textCtrl->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE);
75 [
this]( wxKeyEvent& aEvent )
77 wxPostEvent(
this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
148 if( !wxDialog::TransferDataToWindow() )
207 wxFAIL_MSG(
"Line type not found in the type lookup map" );
229 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
239 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
249 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
257 if( !wxDialog::TransferDataFromWindow() )
264 text.Replace( wxS(
"\r" ), wxS(
"\n" ) );
265#elif defined( __WINDOWS__ )
268 text.Replace( wxS(
"\r" ), wxS(
"" ) );
constexpr EDA_IU_SCALE schIUScale
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Color settings are a bit different than most of the settings objects in that there can be more than o...
COLOR4D GetColor(int aLayer) const
void SetSwatchColor(const KIGFX::COLOR4D &aColor, bool aSendEvent)
Set the current swatch color directly.
KIGFX::COLOR4D GetSwatchColor() const
void SetDefaultColor(const KIGFX::COLOR4D &aColor)
Sets the color that will be chosen with the "Reset to Default" button in the chooser.
void SetSwatchBackground(const KIGFX::COLOR4D &aBackground)
Set the swatch background color.
Class DIALOG_LIB_TEXTBOX_PROPERTIES_BASE.
wxStyledTextCtrl * m_textCtrl
BITMAP_BUTTON * m_separator4
wxGridBagSizer * m_textEntrySizer
wxCheckBox * m_filledCtrl
BITMAP_BUTTON * m_vAlignCenter
BITMAP_BUTTON * m_hAlignCenter
wxStaticText * m_fillColorLabel
wxCheckBox * m_CommonUnit
BITMAP_BUTTON * m_horizontal
BITMAP_BUTTON * m_hAlignRight
BITMAP_BUTTON * m_hAlignLeft
BITMAP_BUTTON * m_vAlignBottom
BITMAP_BUTTON * m_vertical
wxStaticText * m_borderStyleLabel
COLOR_SWATCH * m_fillColorSwatch
wxBitmapComboBox * m_borderStyleCombo
BITMAP_BUTTON * m_vAlignTop
COLOR_SWATCH * m_borderColorSwatch
wxStaticText * m_borderColorLabel
BITMAP_BUTTON * m_separator1
BITMAP_BUTTON * m_separator3
COLOR_SWATCH * m_textColorSwatch
BITMAP_BUTTON * m_separator5
BITMAP_BUTTON * m_separator2
wxCheckBox * m_CommonConvert
wxCheckBox * m_borderCheckbox
wxCheckBox * m_privateCheckbox
LIB_TEXTBOX * m_currentText
DIALOG_LIB_TEXTBOX_PROPERTIES(SYMBOL_EDIT_FRAME *parent, LIB_TEXTBOX *aTextBox)
HTML_MESSAGE_BOX * m_helpWindow
SYMBOL_EDIT_FRAME * m_frame
void OnFormattingHelp(wxHyperlinkEvent &aEvent) override
void onBorderChecked(wxCommandEvent &event) override
void onVAlignButton(wxCommandEvent &aEvent)
bool TransferDataFromWindow() override
void onFillChecked(wxCommandEvent &event) override
UNIT_BINDER m_borderWidth
void onHAlignButton(wxCommandEvent &aEvent)
bool TransferDataToWindow() override
SCINTILLA_TRICKS * m_scintillaTricks
void onTextAngleButton(wxCommandEvent &aEvent)
void onMultiLineTCLostFocus(wxFocusEvent &event) override
~DIALOG_LIB_TEXTBOX_PROPERTIES()
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
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...
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
void SetFillColor(const COLOR4D &aColor)
COLOR4D GetFillColor() const
virtual int GetWidth() const
void SetFillMode(FILL_T aFill)
void SetTextColor(const COLOR4D &aColor)
COLOR4D GetTextColor() const
void SetTextSize(VECTOR2I aNewSize)
const EDA_ANGLE & GetTextAngle() const
virtual const wxString & GetText() const
Return the string associated with the text object.
KIFONT::FONT * GetFont() const
void SetVertJustify(GR_TEXT_V_ALIGN_T aType)
GR_TEXT_H_ALIGN_T GetHorizJustify() const
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
GR_TEXT_V_ALIGN_T GetVertJustify() const
virtual void SetText(const wxString &aText)
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
void SetItalic(bool aItalic)
void SetFont(KIFONT::FONT *aFont)
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
bool HaveFontSelection() const
void SetFontSelection(KIFONT::FONT *aFont)
KIFONT::FONT * GetFontSelection(bool aBold, bool aItalic) const
A color representation with 4 components: red, green, blue, alpha.
void SetPrivate(bool aPrivate)
LIB_SYMBOL * GetParent() const
void SetConvert(int aConvert)
STROKE_PARAMS GetStroke() const
void SetStroke(const STROKE_PARAMS &aStroke)
Define a library symbol object.
int GetUnitCount() const override
For items with units, return the number of units.
SYMBOL_EDITOR_SETTINGS * libeditconfig() const
static HTML_MESSAGE_BOX * ShowSyntaxHelp(wxWindow *aParentWindow)
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
void CancelAutocomplete()
Simple container to manage line stroke parameters.
void SetLineStyle(LINE_STYLE aLineStyle)
void SetWidth(int aWidth)
void SetColor(const KIGFX::COLOR4D &aColor)
LINE_STYLE GetLineStyle() const
KIGFX::COLOR4D GetColor() const
The symbol library editor main window.
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Returns a pointer to the active color theme settings.
virtual long long int GetValue()
Return the current value in Internal Units.
void Enable(bool aEnable)
Enable/disable the label, widget and units label.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
This file is part of the common library.
static constexpr EDA_ANGLE & ANGLE_HORIZONTAL
static constexpr EDA_ANGLE & ANGLE_VERTICAL
int GetPenSizeForBold(int aTextSize)
@ LAYER_SCHEMATIC_BACKGROUND
const std::map< LINE_STYLE, struct LINE_STYLE_DESC > lineTypeNames
constexpr int MilsToIU(int mils) const