45 return text()->m_Orient;
93 if( !aValue.GetAs( &value ) )
94 return std::make_unique<VALIDATION_ERROR_MSG>(
_(
"Enter an integer value." ) );
99 return std::make_unique<VALIDATION_ERROR_TOO_SMALL<int>>( value, aMin, type );
102 return std::make_unique<VALIDATION_ERROR_TOO_LARGE<int>>( value, aMax, type );
131 if( hAlign.Choices().GetCount() == 0 )
140 if( vAlign.Choices().GetCount() == 0 )
177 _HKI(
"Position" ) );
181 _HKI(
"Position" ) );
186 _HKI(
"Position" ) );
190 _HKI(
"End Position" ) )
195 _HKI(
"End Position" ) )
201 _HKI(
"End Position" ) )
209 return !isBitmap( aItem );
222 if( !aValue.GetAs( &value ) || !std::isfinite( value ) )
223 return std::make_unique<VALIDATION_ERROR_MSG>(
_(
"Enter a finite angle." ) );
235 _HKI(
"Text Properties" ) )
238 _HKI(
"Text supports ${keyword} variables. Click the button to edit multiple lines." ) );
242 _HKI(
"Text Properties" ) )
248 std::vector<std::string> names;
249 Fontconfig()->ListFonts( names, std::string(
Pgm().GetLanguageTag().utf8_str() ) );
252 for(
const std::string&
name : names )
260 _HKI(
"Text Properties" ) )
268 _HKI(
"Text Properties" ) )
275 _HKI(
"Text Properties" ) )
280 _HKI(
"Text Properties" ) )
286 _HKI(
"Text Properties" ) )
292 _HKI(
"Text Properties" ) )
298 _HKI(
"Text Properties" ) )
304 _HKI(
"Text Properties" ) )
311 _HKI(
"Text Properties" ) )
constexpr EDA_IU_SCALE drawSheetIUScale
A base class for most all the KiCad significant classes used in schematics and boards.
ENUM_MAP & Map(T aValue, const wxString &aName)
static ENUM_MAP< T > & Instance()
Class that other classes need to inherit from, in order to be inspectable.
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false, const std::vector< wxString > *aEmbeddedFiles=nullptr, bool aForDrawingSheet=false)
const wxString & GetName() const
Exposes a drawing-sheet definition to the shared properties panel.
void SetTextHeight(int aValue)
void SetStartAnchor(CORNER_ANCHOR aValue)
void SetStartX(int aValue)
KIGFX::COLOR4D GetTextColor() const
void SetRotation(double aValue)
void SetLineWidth(int aValue)
void SetConstraintHeight(int aValue)
void SetLabelIncrement(int aValue)
GR_TEXT_H_ALIGN_T GetHAlign() const
void SetFont(wxString aValue)
int GetTextHeight() const
void SetComment(wxString aValue)
PAGE_OPTION GetPageOption() const
void SetStepY(int aValue)
int GetConstraintWidth() const
PL_ITEM_PROPERTIES(DS_DATA_ITEM *aItem)
void SetItalic(bool aValue)
void SetText(wxString aValue)
int GetConstraintHeight() const
void SetPageOption(PAGE_OPTION aValue)
CORNER_ANCHOR GetStartAnchor() const
void SetConstraintWidth(int aValue)
void SetStartY(int aValue)
GR_TEXT_V_ALIGN_T GetVAlign() const
DS_DATA_ITEM_TEXT * text() const
int GetRepeatCount() const
void SetEndAnchor(CORNER_ANCHOR aValue)
CORNER_ANCHOR GetEndAnchor() const
int GetLabelIncrement() const
void SetHAlign(GR_TEXT_H_ALIGN_T aValue)
void SetRepeatCount(int aValue)
void SetTextWidth(int aValue)
void SetVAlign(GR_TEXT_V_ALIGN_T aValue)
void SetStepX(int aValue)
void SetTextColor(KIGFX::COLOR4D aValue)
double GetRotation() const
wxString GetComment() const
void SetBold(bool aValue)
Drawing-sheet defaults and margins, shown when no item is selected.
int GetDefaultTextWidth() const
void SetRightMargin(int aValue)
void SetBottomMargin(int aValue)
int GetBottomMargin() const
int GetLeftMargin() const
void SetLeftMargin(int aValue)
int GetDefaultLineWidth() const
int GetDefaultTextHeight() const
void SetTopMargin(int aValue)
void SetDefaultLineWidth(int aValue)
void SetDefaultTextWidth(int aValue)
int GetDefaultTextThickness() const
void SetDefaultTextThickness(int aValue)
void SetDefaultTextHeight(int aValue)
int GetRightMargin() const
PROPERTY_BASE & SetChoicesFunc(std::function< wxPGChoices(INSPECTABLE *)> aFunc)
PROPERTY_BASE & SetAvailableFunc(std::function< bool(INSPECTABLE *)> aFunc)
Set a callback function to determine whether an object provides this property.
PROPERTY_BASE & SetHelpString(const wxString &aHelpString)
Set untranslated help text, marked with _HKI for translation extraction.
PROPERTY_BASE & SetValidator(PROPERTY_VALIDATOR_FN &&aValidator)
static PROPERTY_MANAGER & Instance()
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
CORNER_ANCHOR
A coordinate is relative to a page corner.
constexpr int DS_MAX_REPEAT_COUNT
Upper bound on DS_DATA_ITEM::m_RepeatCount.
EDA_DATA_TYPE
The type of unit.
FONTCONFIG * Fontconfig()
Some functions to handle hotkeys in KiCad.
PGM_BASE & Pgm()
The global program "get" accessor.
static struct PL_PROPERTIES_DESC s_propertiesDesc
static PROPERTY_VALIDATOR_FN rangeValidator(int aMin, int aMax, bool aDistance=true)
#define DECLARE_ENUM_TO_WXANY(type)
#define ENUM_TO_WXANY(type)
@ PT_DEGREE
Angle expressed in degrees.
@ PT_SIZE
Size expressed in distance units (mm/inch)
#define REGISTER_TYPE(x)
Helper macro to map type hashes to names.
std::function< VALIDATOR_RESULT(const wxAny &&, EDA_ITEM *aItem)> PROPERTY_VALIDATOR_FN
A property validator function takes in the data type of the owning property, and returns a VALIDATOR_...
std::optional< std::unique_ptr< VALIDATION_ERROR > > VALIDATOR_RESULT
Null optional means validation succeeded.
GR_TEXT_H_ALIGN_T
This is API surface mapped to common.types.HorizontalAlignment.
GR_TEXT_V_ALIGN_T
This is API surface mapped to common.types.VertialAlignment.