parent
b07d43a24a
commit
1cd5827078
|
@ -1176,7 +1176,7 @@ static struct EDA_TEXT_DESC
|
|||
&EDA_TEXT::SetTextAngleDegrees, &EDA_TEXT::GetTextAngleDegrees,
|
||||
PROPERTY_DISPLAY::PT_DEGREE ) );
|
||||
|
||||
const wxString textProps = _( "Text Properties" );
|
||||
const wxString textProps = _HKI( "Text Properties" );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<EDA_TEXT, wxString>( _HKI( "Text" ),
|
||||
&EDA_TEXT::SetText, &EDA_TEXT::GetText ),
|
||||
|
|
|
@ -537,3 +537,33 @@ void LIB_TEXTBOX::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
aLayers[1] = IsPrivate() ? LAYER_NOTES_BACKGROUND : LAYER_DEVICE_BACKGROUND;
|
||||
aLayers[2] = LAYER_SELECTION_SHADOWS;
|
||||
}
|
||||
|
||||
|
||||
static struct LIB_TEXTBOX_DESC
|
||||
{
|
||||
LIB_TEXTBOX_DESC()
|
||||
{
|
||||
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
||||
REGISTER_TYPE( LIB_TEXTBOX );
|
||||
|
||||
propMgr.AddTypeCast( new TYPE_CAST<LIB_TEXTBOX, LIB_SHAPE> );
|
||||
propMgr.AddTypeCast( new TYPE_CAST<LIB_TEXTBOX, EDA_SHAPE> );
|
||||
propMgr.AddTypeCast( new TYPE_CAST<LIB_TEXTBOX, EDA_TEXT> );
|
||||
propMgr.InheritsAfter( TYPE_HASH( LIB_TEXTBOX ), TYPE_HASH( LIB_SHAPE ) );
|
||||
propMgr.InheritsAfter( TYPE_HASH( LIB_TEXTBOX ), TYPE_HASH( EDA_SHAPE ) );
|
||||
propMgr.InheritsAfter( TYPE_HASH( LIB_TEXTBOX ), TYPE_HASH( EDA_TEXT ) );
|
||||
|
||||
propMgr.Mask( TYPE_HASH( LIB_TEXTBOX ), TYPE_HASH( EDA_SHAPE ), _HKI( "Shape" ) );
|
||||
|
||||
propMgr.Mask( TYPE_HASH( LIB_TEXTBOX ), TYPE_HASH( EDA_TEXT ), _HKI( "Visible" ) );
|
||||
propMgr.Mask( TYPE_HASH( LIB_TEXTBOX ), TYPE_HASH( EDA_TEXT ), _HKI( "Width" ) );
|
||||
propMgr.Mask( TYPE_HASH( LIB_TEXTBOX ), TYPE_HASH( EDA_TEXT ), _HKI( "Height" ) );
|
||||
propMgr.Mask( TYPE_HASH( LIB_TEXTBOX ), TYPE_HASH( EDA_TEXT ), _HKI( "Thickness" ) );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<LIB_TEXTBOX, int>( _HKI( "Text Size" ),
|
||||
&LIB_TEXTBOX::SetLibTextSize, &LIB_TEXTBOX::GetLibTextSize, PROPERTY_DISPLAY::PT_SIZE ),
|
||||
_HKI( "Text Properties" ) );
|
||||
|
||||
propMgr.Mask( TYPE_HASH( LIB_TEXTBOX ), TYPE_HASH( EDA_TEXT ), _HKI( "Orientation" ) );
|
||||
}
|
||||
} _LIB_TEXTBOX_DESC;
|
||||
|
|
|
@ -53,6 +53,9 @@ public:
|
|||
|
||||
int GetTextMargin() const;
|
||||
|
||||
int GetLibTextSize() const { return GetTextWidth(); }
|
||||
void SetLibTextSize( int aSize ) { SetTextSize( VECTOR2I( aSize, aSize ) ); }
|
||||
|
||||
VECTOR2I GetDrawPos() const override;
|
||||
|
||||
wxString GetShownText( bool aAllowExtraText, int aDepth = 0 ) const override;
|
||||
|
|
|
@ -1402,7 +1402,7 @@ static struct SCH_FIELD_DESC
|
|||
|
||||
propMgr.AddProperty( new PROPERTY<SCH_FIELD, int>( _HKI( "Text Size" ),
|
||||
&SCH_FIELD::SetSchTextSize, &SCH_FIELD::GetSchTextSize, PROPERTY_DISPLAY::PT_SIZE ),
|
||||
_( "Text Properties" ) );
|
||||
_HKI( "Text Properties" ) );
|
||||
|
||||
propMgr.Mask( TYPE_HASH( SCH_FIELD ), TYPE_HASH( EDA_TEXT ), _HKI( "Orientation" ) );
|
||||
|
||||
|
|
|
@ -498,7 +498,7 @@ static struct SCH_TEXT_DESC
|
|||
|
||||
propMgr.AddProperty( new PROPERTY<SCH_TEXT, int>( _HKI( "Text Size" ),
|
||||
&SCH_TEXT::SetSchTextSize, &SCH_TEXT::GetSchTextSize, PROPERTY_DISPLAY::PT_SIZE ),
|
||||
_( "Text Properties" ) );
|
||||
_HKI( "Text Properties" ) );
|
||||
|
||||
// Orientation is exposed differently in schematic; mask the base for now
|
||||
propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Orientation" ) );
|
||||
|
|
|
@ -519,8 +519,9 @@ static struct SCH_TEXTBOX_DESC
|
|||
propMgr.Mask( TYPE_HASH( SCH_TEXTBOX ), TYPE_HASH( EDA_TEXT ), _HKI( "Thickness" ) );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<SCH_TEXTBOX, int>( _HKI( "Text Size" ),
|
||||
&SCH_TEXTBOX::SetSchTextSize, &SCH_TEXTBOX::GetSchTextSize, PROPERTY_DISPLAY::PT_SIZE ),
|
||||
_( "Text Properties" ) );
|
||||
&SCH_TEXTBOX::SetSchTextSize, &SCH_TEXTBOX::GetSchTextSize,
|
||||
PROPERTY_DISPLAY::PT_SIZE ),
|
||||
_HKI( "Text Properties" ) );
|
||||
|
||||
propMgr.Mask( TYPE_HASH( SCH_TEXTBOX ), TYPE_HASH( EDA_TEXT ), _HKI( "Orientation" ) );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue