37 class wxFindReplaceData;
50 #define TEXT_ANGLE_HORIZ 0 51 #define TEXT_ANGLE_VERT 900 56 #define CTL_OMIT_HIDE (1 << 6) 80 #define DEFAULT_SIZE_TEXT 50 // default text height (in mils, i.e. 1/1000") 81 #define DIM_ANCRE_TEXTE 2 // Anchor size for text 108 void Bit(
int aBit,
bool aValue ) { aValue ?
bits |= (1<<aBit) :
bits &= ~(1<<aBit); }
109 bool Bit(
int aBit )
const {
return bits & (1<<aBit); }
122 EDA_TEXT(
const wxString& text = wxEmptyString );
160 virtual void SetText(
const wxString& aText );
240 bool Replace(
const wxFindReplaceData& aSearchData );
298 int aClearanceValue )
const;
309 virtual bool TextHitTest(
const wxPoint& aPoint,
int aAccuracy = 0 )
const;
319 virtual bool TextHitTest(
const EDA_RECT& aRect,
bool aContains,
int aAccuracy = 0 )
const;
327 int LenSize(
const wxString& aLine,
int aThickness )
const;
362 void GetLinePositions( std::vector<wxPoint>& aPositions,
int aLineCount )
const;
387 OUTLINE_MODE aFillMode,
const wxString& aText,
const wxPoint& aPos );
405 #endif // EDA_TEXT_H_ void SetMirrored(bool isMirrored)
EDA_TEXT(const wxString &text=wxEmptyString)
void Offset(const wxPoint &aOffset)
int GetInterline() const
Return the distance between two lines of text.
void SwapEffects(EDA_TEXT &aTradingPartner)
Swap the text effects of the two involved instances.
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void CopyText(const EDA_TEXT &aSrc)
std::vector< wxPoint > TransformToSegmentList() const
Convert the text shape to a list of segment.
void SetEffects(const EDA_TEXT &aSrc)
Set the text effects from another instance.
bool Replace(const wxFindReplaceData &aSearchData)
Helper function used in search and replace dialog.
void SetItalic(bool isItalic)
EDA_RECT GetTextBox(int aLine=-1, bool aInvertY=false) const
Useful in multiline texts to calculate the full text or a line area (for zones filling,...
void SetTextPos(const wxPoint &aPoint)
void SetVisible(bool aVisible)
double GetTextAngle() const
bool m_shown_text_has_text_var_refs
signed char vjustify
vertical justification
void SetTextSize(const wxSize &aNewSize)
virtual double GetDrawRotation() const
void TransformBoundingBoxWithClearanceToPolygon(SHAPE_POLY_SET *aCornerBuffer, int aClearanceValue) const
Convert the text bounding box to a rectangular polygon depending on the text orientation,...
int GetTextThickness() const
int GetEffectiveTextPenWidth(int aDefaultWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth.
int GetTextHeight() const
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
wxString GetTextStyleName() const
void Bit(int aBit, bool aValue)
int LenSize(const wxString &aLine, int aThickness) const
wxString GetShownText(bool *processTextVars) const
A version of GetShownText() which also indicates whether or not the text needs to be processed for te...
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
static EDA_TEXT_HJUSTIFY_T MapHorizJustify(int aHorizJustify)
virtual void SetText(const wxString &aText)
A container for text effects.
const wxSize & GetTextSize() const
void SetVertJustify(EDA_TEXT_VJUSTIFY_T aType)
wxString ShortenedShownText() const
Returns a shortened version (max 15 characters) of the shown text.
virtual void Format(OUTPUTFORMATTER *aFormatter, int aNestLevel, int aControlBits) const
Output the object to aFormatter in s-expression form.
bool IsDefaultFormatting() const
void SetMultilineAllowed(bool aAllow)
static EDA_TEXT_VJUSTIFY_T MapVertJustify(int aVertJustify)
bool IsMultilineAllowed() const
int bits
any set of booleans a client uses.
void SetTextWidth(int aWidth)
void printOneLineOfText(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, COLOR4D aColor, OUTLINE_MODE aFillMode, const wxString &aText, const wxPoint &aPos)
Print each line of this EDA_TEXT.
double GetTextAngleRadians() const
void SwapText(EDA_TEXT &aTradingPartner)
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, COLOR4D aColor, OUTLINE_MODE aDisplay_mode=FILLED)
Print this text object to the device context aDC.
double GetTextAngleDegrees() const
std::shared_ptr< SHAPE_COMPOUND > GetEffectiveTextShape() const
void SetHorizJustify(EDA_TEXT_HJUSTIFY_T aType)
TEXT_EFFECTS(int aSetOfBits=0)
Handle the component boundary box.
virtual bool TextHitTest(const wxPoint &aPoint, int aAccuracy=0) const
Test if aPoint is within the bounds of this object.
void SetTextHeight(int aHeight)
void GetLinePositions(std::vector< wxPoint > &aPositions, int aLineCount) const
Populate aPositions with the position of each line of a multiline text, according to the vertical jus...
double angle
now: 0.1 degrees; future: degrees
const wxPoint & GetTextPos() const
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
virtual void SetTextAngle(double aAngle)
signed char hjustify
horizontal justification
virtual const wxString & GetText() const
Return the string associated with the text object.
virtual wxString GetShownText(int aDepth=0) const
Return the string actually shown after processing of the base text.
A color representation with 4 components: red, green, blue, alpha.