135 colorProp->SetBackgroundColor( bg );
148 wxCHECK_MSG( firstItem,
nullptr,
149 wxT(
"getPropertyFromEvent for a property with nothing selected!") );
152 aEvent.GetPropertyName() );
153 wxCHECK_MSG( property,
nullptr,
154 wxT(
"getPropertyFromEvent for a property not found on the selected item!" ) );
167 wxCHECK( property, );
170 wxVariant newValue = aEvent.GetPropertyValue();
172 if(
VALIDATOR_RESULT validationFailure = property->Validate( newValue.GetAny(), item ) )
174 wxString errorMsg = wxString::Format( wxS(
"%s: %s" ), wxGetTranslation( property->Name() ),
175 validationFailure->get()->Format(
m_frame ) );
189 wxCHECK( property, );
191 wxVariant newValue = aEvent.GetPropertyValue();
195 for(
EDA_ITEM* edaItem : selection )
198 changes.
Modify( item, screen );
199 item->
Set( property, newValue );
202 changes.
Push(
_(
"Change property" ) );
215 std::vector<std::string> fontNames;
216 Fontconfig()->ListFonts( fontNames, std::string(
Pgm().GetLanguageTag().utf8_str() ) );
218 fonts.Add(
_(
"Default Font" ), -1 );
221 for(
int ii = 0; ii < (int) fontNames.size(); ++ii )
222 fonts.Add( wxString( fontNames[ii] ), ii );
COLOR4D GetColor(int aLayer) const
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false, WX_INFOBAR::MESSAGE_TYPE aType=WX_INFOBAR::MESSAGE_TYPE::GENERIC)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...
A base class for most all the KiCad significant classes used in schematics and boards.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
bool Set(PROPERTY_BASE *aProperty, wxAny &aValue)
A color representation with 4 components: red, green, blue, alpha.
static const wxString EDITOR_NAME
static const wxString EDITOR_NAME
void UpdateFrame(EDA_DRAW_FRAME *aFrame)
When restarting an editor, the instance of PG_UNIT_EDITOR may be the same but the referenced frame is...
static wxString BuildEditorName(EDA_DRAW_FRAME *aFrame)
virtual void rebuildProperties(const SELECTION &aSelection)
Generates the property grid for a given selection of items.
virtual void SetChoices(const wxPGChoices &aChoices)
Set the possible values for for the property.
Provide class metadata.Helper macro to map type hashes to names.
void Rebuild()
Rebuild the list of all registered properties.
PROPERTY_BASE * GetProperty(TYPE_ID aType, const wxString &aProperty) const
Return a property for a specific type.
Holds all the data relating to one schematic.
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Returns a pointer to the active color theme settings.
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
Schematic editor (Eeschema) main window.
Base class for any item which can be embedded within the SCHEMATIC container class,...
void updateLists(const SCHEMATIC &aSchematic)
wxPGProperty * createPGProperty(const PROPERTY_BASE *aProperty) const override
PROPERTY_MANAGER & m_propMgr
PG_CHECKBOX_EDITOR * m_checkboxEditorInstance
void UpdateData() override
void valueChanging(wxPropertyGridEvent &aEvent) override
PG_UNIT_EDITOR * m_unitEditorInstance
void AfterCommit() override
void valueChanged(wxPropertyGridEvent &aEvent) override
Regenerates caches of list properties.
SCH_PROPERTIES_PANEL(wxWindow *aParent, SCH_BASE_FRAME *aFrame)
PG_COLOR_EDITOR * m_colorEditorInstance
PROPERTY_BASE * getPropertyFromEvent(const wxPropertyGridEvent &aEvent) const
virtual ~SCH_PROPERTIES_PANEL()
FONTCONFIG * Fontconfig()
@ LAYER_SCHEMATIC_BACKGROUND
wxPGProperty * PGPropertyFactory(const PROPERTY_BASE *aProperty, EDA_DRAW_FRAME *aFrame)
Customized abstract wxPGProperty class to handle coordinate/size units.
APIIMPORT wxPGGlobalVarsClass * wxPGGlobalVars
std::optional< std::unique_ptr< VALIDATION_ERROR > > VALIDATOR_RESULT
Null optional means validation succeeded.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.