KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCB_FOOTPRINT_FIELD_PROPERTY Class Reference
Inheritance diagram for PCB_FOOTPRINT_FIELD_PROPERTY:
PROPERTY_BASE

Public Member Functions

 PCB_FOOTPRINT_FIELD_PROPERTY (const wxString &aName)
 
size_t OwnerHash () const override
 Return type-id of the Owner class.
 
size_t BaseHash () const override
 Return type-id of the Base class.
 
size_t TypeHash () const override
 Return type-id of the property type.
 
void setter (void *obj, wxAny &v) override
 
wxAny getter (const void *obj) const override
 
const wxString & Name () const
 
const wxString & HelpString () const
 
PROPERTY_BASE & SetHelpString (const wxString &aHelpString)
 Set untranslated help text, marked with _HKI for translation extraction.
 
virtual const wxPGChoices & Choices () const
 Return a limited set of possible values (e.g.
 
virtual void TranslateChoices ()
 
virtual void SetChoices (const wxPGChoices &aChoices)
 Set the possible values for for the property.
 
virtual bool HasChoices () const
 Return true if this PROPERTY has a limited set of possible values.
 
bool Available (INSPECTABLE *aObject) const
 Return true if aObject offers this PROPERTY.
 
PROPERTY_BASE & SetAvailableFunc (std::function< bool(INSPECTABLE *)> aFunc)
 Set a callback function to determine whether an object provides this property.
 
wxPGChoices GetChoices (INSPECTABLE *aObject) const
 
PROPERTY_BASE & SetChoicesFunc (std::function< wxPGChoices(INSPECTABLE *)> aFunc)
 
virtual bool IgnoreValue () const
 
virtual bool Writeable (INSPECTABLE *aObject) const
 
PROPERTY_BASE & SetWriteableFunc (std::function< bool(INSPECTABLE *)> aFunc)
 
bool IsIndeterminate (INSPECTABLE *aObject) const
 Return true if aObject holds several values for this property, so it has no single value to show.
 
PROPERTY_BASE & SetIndeterminateFunc (std::function< bool(INSPECTABLE *)> aFunc)
 Set a callback function to determine whether an object's value for this property is mixed.
 
PROPERTY_DISPLAY Display () const
 
PROPERTY_BASE & SetDisplay (PROPERTY_DISPLAY aDisplay)
 
ORIGIN_TRANSFORMS::COORD_TYPES_T CoordType () const
 
PROPERTY_BASE & SetCoordType (ORIGIN_TRANSFORMS::COORD_TYPES_T aType)
 
bool IsHiddenFromPropertiesManager () const
 
PROPERTY_BASE & SetIsHiddenFromPropertiesManager (bool aHide=true)
 
bool IsHiddenFromRulesEditor () const
 
PROPERTY_BASE & SetIsHiddenFromRulesEditor (bool aHide=true)
 
bool IsHiddenFromLibraryEditors () const
 
PROPERTY_BASE & SetIsHiddenFromLibraryEditors (bool aIsHidden=true)
 
bool IsHiddenFromDesignEditors () const
 
PROPERTY_BASE & SetIsHiddenFromDesignEditors (bool aIsHidden=true)
 
bool IsCopyable () const
 True for a property that says how an item looks, not what or where it is.
 
PROPERTY_BASE & SetIsCopyable (bool aIsCopyable=true)
 
wxString Group () const
 
PROPERTY_BASE & SetGroup (const wxString &aGroup)
 
PROPERTY_BASE & SetValidator (PROPERTY_VALIDATOR_FN &&aValidator)
 
VALIDATOR_RESULT Validate (const wxAny &&aValue, EDA_ITEM *aItem)
 

Static Public Member Functions

static VALIDATOR_RESULT NullValidator (const wxAny &&aValue, EDA_ITEM *aItem)
 

Protected Member Functions

template<typename T>
void set (void *aObject, T aValue)
 
template<typename T>
T get (const void *aObject) const
 

Private Attributes

wxString m_name
 
wxString m_helpString
 Optional help text, translated when the property grid control is created.
 
PROPERTY_DISPLAY m_display
 The display style controls how properties are edited in the properties manager GUI.
 
ORIGIN_TRANSFORMS::COORD_TYPES_T m_coordType
 The coordinate type controls how distances are mapped to the user coordinate system.
 
bool m_hideFromPropertiesManager
 
bool m_hideFromLibraryEditors
 
bool m_hideFromDesignEditors
 
bool m_hideFromRulesEditor
 
bool m_copyable
 
wxString m_group
 Optional group identifier.
 
std::function< bool(INSPECTABLE *)> m_availFunc
 Eval to determine if prop is available.
 
std::function< bool(INSPECTABLE *)> m_writeableFunc
 Eval to determine if prop is read-only.
 
std::function< wxPGChoices(INSPECTABLE *)> m_choicesFunc
 
std::function< bool(INSPECTABLE *)> m_indeterminateFunc
 Eval to determine if the value is mixed.
 
PROPERTY_VALIDATOR_FN m_validator
 

Detailed Description

Definition at line 85 of file footprint.cpp.

Constructor & Destructor Documentation

◆ PCB_FOOTPRINT_FIELD_PROPERTY()

PCB_FOOTPRINT_FIELD_PROPERTY::PCB_FOOTPRINT_FIELD_PROPERTY ( const wxString & aName)
inline

Definition at line 88 of file footprint.cpp.

References _HKI, m_name, PROPERTY_BASE::PROPERTY_BASE(), and PROPERTY_BASE::SetGroup().

Member Function Documentation

◆ Available()

bool PROPERTY_BASE::Available ( INSPECTABLE * aObject) const
inlineinherited

Return true if aObject offers this PROPERTY.

Definition at line 267 of file property.h.

References INSPECTABLE, and m_availFunc.

Referenced by BOOST_AUTO_TEST_CASE(), and PROPERTY_MANAGER::IsAvailableFor().

◆ BaseHash()

size_t PCB_FOOTPRINT_FIELD_PROPERTY::BaseHash ( ) const
inlineoverridevirtual

Return type-id of the Base class.

Implements PROPERTY_BASE.

Definition at line 96 of file footprint.cpp.

References TYPE_HASH.

◆ Choices()

virtual const wxPGChoices & PROPERTY_BASE::Choices ( ) const
inlinevirtualinherited

Return a limited set of possible values (e.g.

enum). Check with HasChoices() if a particular PROPERTY provides such set.

Reimplemented in PROPERTY_ENUM< Owner, T, Base >.

Definition at line 239 of file property.h.

References empty().

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), PCB_PROPERTIES_PANEL::createPGProperty(), PGPropertyFactory(), and KICAD_DIFF::WxAnyToDiffValue().

◆ CoordType()

ORIGIN_TRANSFORMS::COORD_TYPES_T PROPERTY_BASE::CoordType ( ) const
inlineinherited

Definition at line 346 of file property.h.

References m_coordType.

Referenced by PGPropertyFactory().

◆ Display()

PROPERTY_DISPLAY PROPERTY_BASE::Display ( ) const
inlineinherited

Definition at line 343 of file property.h.

References m_display.

Referenced by DIALOG_FIND_BY_PROPERTIES::formatValueForExpression(), and PGPropertyFactory().

◆ get()

template<typename T>
T PROPERTY_BASE::get ( const void * aObject) const
inlineprotectedinherited

Definition at line 459 of file property.h.

References getter(), and T.

Referenced by INSPECTABLE::Get(), and INSPECTABLE::Get().

◆ GetChoices()

wxPGChoices PROPERTY_BASE::GetChoices ( INSPECTABLE * aObject) const
inlineinherited

◆ getter()

wxAny PCB_FOOTPRINT_FIELD_PROPERTY::getter ( const void * obj) const
inlineoverridevirtual

◆ Group()

wxString PROPERTY_BASE::Group ( ) const
inlineinherited

◆ HasChoices()

◆ HelpString()

const wxString & PROPERTY_BASE::HelpString ( ) const
inlineinherited

Definition at line 223 of file property.h.

References m_helpString.

Referenced by PL_PROPERTIES_PANEL::createPGProperty(), and PGPropertyFactory().

◆ IgnoreValue()

virtual bool PROPERTY_BASE::IgnoreValue ( ) const
inlinevirtualinherited

Reimplemented in DUMMY_PROPERTY< Owner, T, Base >.

Definition at line 295 of file property.h.

◆ IsCopyable()

bool PROPERTY_BASE::IsCopyable ( ) const
inlineinherited

True for a property that says how an item looks, not what or where it is.

Opt-in. The safe answer for anything unexamined is no. Identity, position, size and connectivity stay off. Copying those between items would move or rewire them.

Definition at line 387 of file property.h.

References m_copyable.

Referenced by plan().

◆ IsHiddenFromDesignEditors()

bool PROPERTY_BASE::IsHiddenFromDesignEditors ( ) const
inlineinherited

Definition at line 374 of file property.h.

References m_hideFromDesignEditors.

◆ IsHiddenFromLibraryEditors()

bool PROPERTY_BASE::IsHiddenFromLibraryEditors ( ) const
inlineinherited

Definition at line 367 of file property.h.

References m_hideFromLibraryEditors.

◆ IsHiddenFromPropertiesManager()

bool PROPERTY_BASE::IsHiddenFromPropertiesManager ( ) const
inlineinherited

Definition at line 353 of file property.h.

References m_hideFromPropertiesManager.

Referenced by plan().

◆ IsHiddenFromRulesEditor()

bool PROPERTY_BASE::IsHiddenFromRulesEditor ( ) const
inlineinherited

Definition at line 360 of file property.h.

References m_hideFromRulesEditor.

◆ IsIndeterminate()

bool PROPERTY_BASE::IsIndeterminate ( INSPECTABLE * aObject) const
inlineinherited

Return true if aObject holds several values for this property, so it has no single value to show.

Definition at line 314 of file property.h.

References INSPECTABLE, and m_indeterminateFunc.

Referenced by plan().

◆ Name()

◆ NullValidator()

static VALIDATOR_RESULT PROPERTY_BASE::NullValidator ( const wxAny && aValue,
EDA_ITEM * aItem )
inlinestaticinherited

Definition at line 408 of file property.h.

◆ OwnerHash()

size_t PCB_FOOTPRINT_FIELD_PROPERTY::OwnerHash ( ) const
inlineoverridevirtual

Return type-id of the Owner class.

Implements PROPERTY_BASE.

Definition at line 95 of file footprint.cpp.

References TYPE_HASH.

◆ set()

template<typename T>
void PROPERTY_BASE::set ( void * aObject,
T aValue )
inlineprotectedinherited

◆ SetAvailableFunc()

◆ SetChoices()

virtual void PROPERTY_BASE::SetChoices ( const wxPGChoices & aChoices)
inlinevirtualinherited

Set the possible values for for the property.

Reimplemented in PROPERTY_ENUM< Owner, T, Base >.

Definition at line 250 of file property.h.

Referenced by BOARD_CONNECTED_ITEM_DESC::BOARD_CONNECTED_ITEM_DESC(), FOOTPRINT_DESC::FOOTPRINT_DESC(), and PCB_TUNING_PATTERN_DESC::PCB_TUNING_PATTERN_DESC().

◆ SetChoicesFunc()

◆ SetCoordType()

PROPERTY_BASE & PROPERTY_BASE::SetCoordType ( ORIGIN_TRANSFORMS::COORD_TYPES_T aType)
inlineinherited

Definition at line 347 of file property.h.

References m_coordType, and PROPERTY_BASE().

◆ SetDisplay()

PROPERTY_BASE & PROPERTY_BASE::SetDisplay ( PROPERTY_DISPLAY aDisplay)
inlineinherited

Definition at line 344 of file property.h.

References m_display, and PROPERTY_BASE().

◆ SetGroup()

◆ SetHelpString()

PROPERTY_BASE & PROPERTY_BASE::SetHelpString ( const wxString & aHelpString)
inlineinherited

Set untranslated help text, marked with _HKI for translation extraction.

An empty string makes the property grid use the property name as its help text.

Definition at line 229 of file property.h.

References m_helpString, and PROPERTY_BASE().

Referenced by PL_PROPERTIES_DESC::PL_PROPERTIES_DESC().

◆ SetIndeterminateFunc()

PROPERTY_BASE & PROPERTY_BASE::SetIndeterminateFunc ( std::function< bool(INSPECTABLE *)> aFunc)
inlineinherited

Set a callback function to determine whether an object's value for this property is mixed.

Definition at line 322 of file property.h.

References INSPECTABLE, m_indeterminateFunc, and PROPERTY_BASE().

Referenced by PCB_GENERATED_TABLE_DESC::PCB_GENERATED_TABLE_DESC(), and PCB_TABLECELL_DESC::PCB_TABLECELL_DESC().

◆ SetIsCopyable()

◆ SetIsHiddenFromDesignEditors()

PROPERTY_BASE & PROPERTY_BASE::SetIsHiddenFromDesignEditors ( bool aIsHidden = true)
inlineinherited

Definition at line 375 of file property.h.

References m_hideFromDesignEditors, and PROPERTY_BASE().

Referenced by SCH_ITEM_DESC::SCH_ITEM_DESC().

◆ SetIsHiddenFromLibraryEditors()

◆ SetIsHiddenFromPropertiesManager()

PROPERTY_BASE & PROPERTY_BASE::SetIsHiddenFromPropertiesManager ( bool aHide = true)
inlineinherited

◆ SetIsHiddenFromRulesEditor()

◆ setter()

void PCB_FOOTPRINT_FIELD_PROPERTY::setter ( void * obj,
wxAny & v )
inlineoverridevirtual

◆ SetValidator()

◆ SetWriteableFunc()

PROPERTY_BASE & PROPERTY_BASE::SetWriteableFunc ( std::function< bool(INSPECTABLE *)> aFunc)
inlineinherited

◆ TranslateChoices()

virtual void PROPERTY_BASE::TranslateChoices ( )
inlinevirtualinherited

Reimplemented in PROPERTY_ENUM< Owner, T, Base >.

Definition at line 245 of file property.h.

◆ TypeHash()

size_t PCB_FOOTPRINT_FIELD_PROPERTY::TypeHash ( ) const
inlineoverridevirtual

Return type-id of the property type.

Implements PROPERTY_BASE.

Definition at line 97 of file footprint.cpp.

References TYPE_HASH.

◆ Validate()

VALIDATOR_RESULT PROPERTY_BASE::Validate ( const wxAny && aValue,
EDA_ITEM * aItem )
inlineinherited

Definition at line 403 of file property.h.

References m_validator.

Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().

◆ Writeable()

Member Data Documentation

◆ m_availFunc

std::function<bool(INSPECTABLE*)> PROPERTY_BASE::m_availFunc
privateinherited

Eval to determine if prop is available.

Definition at line 510 of file property.h.

Referenced by Available(), PROPERTY_BASE(), and SetAvailableFunc().

◆ m_choicesFunc

std::function<wxPGChoices(INSPECTABLE*)> PROPERTY_BASE::m_choicesFunc
privateinherited

Definition at line 514 of file property.h.

Referenced by GetChoices(), HasChoices(), and SetChoicesFunc().

◆ m_coordType

ORIGIN_TRANSFORMS::COORD_TYPES_T PROPERTY_BASE::m_coordType
privateinherited

The coordinate type controls how distances are mapped to the user coordinate system.

Definition at line 497 of file property.h.

Referenced by CoordType(), PROPERTY_BASE(), and SetCoordType().

◆ m_copyable

bool PROPERTY_BASE::m_copyable
privateinherited

Definition at line 505 of file property.h.

Referenced by IsCopyable(), PROPERTY_BASE(), and SetIsCopyable().

◆ m_display

PROPERTY_DISPLAY PROPERTY_BASE::m_display
privateinherited

The display style controls how properties are edited in the properties manager GUI.

Definition at line 494 of file property.h.

Referenced by Display(), PROPERTY_BASE(), and SetDisplay().

◆ m_group

wxString PROPERTY_BASE::m_group
privateinherited

Optional group identifier.

Definition at line 508 of file property.h.

Referenced by Group(), and SetGroup().

◆ m_helpString

wxString PROPERTY_BASE::m_helpString
privateinherited

Optional help text, translated when the property grid control is created.

Definition at line 491 of file property.h.

Referenced by HelpString(), and SetHelpString().

◆ m_hideFromDesignEditors

bool PROPERTY_BASE::m_hideFromDesignEditors
privateinherited

◆ m_hideFromLibraryEditors

bool PROPERTY_BASE::m_hideFromLibraryEditors
privateinherited

◆ m_hideFromPropertiesManager

bool PROPERTY_BASE::m_hideFromPropertiesManager
privateinherited

◆ m_hideFromRulesEditor

bool PROPERTY_BASE::m_hideFromRulesEditor
privateinherited

Definition at line 504 of file property.h.

Referenced by IsHiddenFromRulesEditor(), PROPERTY_BASE(), and SetIsHiddenFromRulesEditor().

◆ m_indeterminateFunc

std::function<bool(INSPECTABLE*)> PROPERTY_BASE::m_indeterminateFunc
privateinherited

Eval to determine if the value is mixed.

Definition at line 516 of file property.h.

Referenced by IsIndeterminate(), and SetIndeterminateFunc().

◆ m_name

wxString PCB_FOOTPRINT_FIELD_PROPERTY::m_name
private

Definition at line 157 of file footprint.cpp.

Referenced by getter(), PCB_FOOTPRINT_FIELD_PROPERTY(), and setter().

◆ m_validator

PROPERTY_VALIDATOR_FN PROPERTY_BASE::m_validator
privateinherited

Definition at line 518 of file property.h.

Referenced by SetValidator(), and Validate().

◆ m_writeableFunc

std::function<bool(INSPECTABLE*)> PROPERTY_BASE::m_writeableFunc
privateinherited

Eval to determine if prop is read-only.

Definition at line 512 of file property.h.

Referenced by SetWriteableFunc(), and Writeable().


The documentation for this class was generated from the following file: