37 class wxFindReplaceData;
71 #define TEXT_ANGLE_HORIZ 0 72 #define TEXT_ANGLE_VERT 900 77 #define CTL_OMIT_HIDE (1 << 6) 101 #define DEFAULT_SIZE_TEXT 50 // default text height (in mils, i.e. 1/1000") 102 #define DIM_ANCRE_TEXTE 2 // Anchor size for text 129 void Bit(
int aBit,
bool aValue ) { aValue ?
bits |= (1<<aBit) :
bits &= ~(1<<aBit); }
130 bool Bit(
int aBit )
const {
return bits & (1<<aBit); }
174 virtual void SetText(
const wxString& aText );
254 bool Replace(
const wxFindReplaceData& aSearchData );
312 int aClearanceValue )
const;
323 virtual bool TextHitTest(
const wxPoint& aPoint,
int aAccuracy = 0 )
const;
333 virtual bool TextHitTest(
const EDA_RECT& aRect,
bool aContains,
int aAccuracy = 0 )
const;
341 int LenSize(
const wxString& aLine,
int aThickness )
const;
376 void GetLinePositions( std::vector<wxPoint>& aPositions,
int aLineCount )
const;
409 const wxPoint& aPos );
427 #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
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)
virtual double GetDrawRotation() const
void printOneLineOfText(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, const COLOR4D &aColor, OUTLINE_MODE aFillMode, const wxString &aText, const wxPoint &aPos)
Print each line of this EDA_TEXT.
std::vector< wxPoint > TransformToSegmentList() const
Convert the text shape to a list of segment.
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, const COLOR4D &aColor, OUTLINE_MODE aDisplay_mode=FILLED)
Print this text object to the device context aDC.
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)
SHAPE_POLY_SET * m_cornerBuffer
double GetTextAngle() const
bool m_shown_text_has_text_var_refs
signed char vjustify
vertical justification
A helper for the text to polygon callback function.
void SetTextSize(const wxSize &aNewSize)
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,...
virtual void SetVisible(bool aVisible)
wxString GetTextStyleName() const
void Bit(int aBit, bool aValue)
int LenSize(const wxString &aLine, int aThickness) const
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.
Represent a set of closed polygons.
virtual bool IsVisible() const
bool HasTextVars() const
Indicates the ShownText has text var references which need to be processed.
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
virtual EDA_TEXT_VJUSTIFY_T GetDrawVertJustify() 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)
double GetTextAngleRadians() const
void SwapText(EDA_TEXT &aTradingPartner)
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.
int Compare(const EDA_TEXT *aOther) const
virtual void SetTextAngle(double aAngle)
virtual EDA_TEXT_HJUSTIFY_T GetDrawHorizJustify() const
signed char hjustify
horizontal justification
virtual const wxString & GetText() const
Return the string associated with the text object.
virtual wxPoint GetDrawPos() const
virtual wxString GetShownText(int aDepth=0) const
Return the string actually shown after processing of the base text.
void addTextSegmToPoly(int x0, int y0, int xf, int yf, void *aData)
Callback function used to convert text segments to polygons.
A color representation with 4 components: red, green, blue, alpha.