30 #define FIXEDLINE_TEXT_BORDER 4
48 const Size& rObjSize,
const Size& rWinSize )
67 Point aPos( nX+rPos.X(), nY+rPos.Y() );
97 , m_nMaxWidthChars(-1)
98 , m_nMinWidthChars(-1)
99 , m_pMnemonicWindow(nullptr)
136 const Point& rPos,
const Size& rSize,
137 bool bFillLayout)
const
164 bFillLayout ? &
mpControlData->mpLayoutData->m_aUnicodeBoundRects :
nullptr,
165 bFillLayout ? &
mpControlData->mpLayoutData->m_aDisplayText :
nullptr);
173 bool bEnableTransparent =
true;
186 bEnableTransparent =
false;
189 if (bEnableTransparent)
223 if ( bBorder || bBackground )
237 ImplDraw( pDev, nFlags, aPos, aSize );
318 if ( aSize.
Width() < 0 )
320 if ( aSize.
Height() <= 0 )
333 sal_Int32 nMaxAvailWidth = 0x7fffffff;
339 aBuf.makeStringAndClear(), 0x7fffffff).
Width();
347 aBuf.makeStringAndClear(), 0x7fffffff);
380 if (rKey ==
"max-width-chars")
382 else if (rKey ==
"width-chars")
384 else if (rKey ==
"ellipsize")
388 if (rValue !=
"none")
390 SAL_WARN_IF(rValue !=
"end",
"vcl.layout",
"Only endellipsis support for now");
436 :
Edit(pParent, nStyle)
515 aStartPt.AdjustY( -((aOutSize.
Height() - nWidth) / 2) );
516 Point aTextPt(aStartPt);
518 rRenderContext.
DrawText(aTextPt, aText, 0, aText.getLength());
519 rRenderContext.
Pop();
542 aRect =
DrawControlText(*
this, aRect, aText, nStyle,
nullptr,
nullptr);
544 tools::Long nTop = aRect.Top() + ((aRect.GetHeight() - 1) / 2);
663 rJsonWriter.
put(
"type",
"separator");
822 const Point& rPos,
const Size& rSize )
834 pDev->
DrawImage( rPos, rSize, *pImage, nStyle );
838 pDev->
DrawImage( aPos, *pImage, nStyle );
963 if (rKey ==
"icon-size")
virtual const Color & GetCanonicalTextColor(const StyleSettings &_rStyle) const override
Size GetSizePixel() const
const Color & GetTextColor() const
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
bool IsControlBackground() const
SAL_DLLPRIVATE void ImplDraw(OutputDevice *pDev, DrawFlags nDrawFlags, const Point &rPos, const Size &rSize, bool bFillLayout=false) const
void set_mnemonic_widget(vcl::Window *pWindow)
const Wallpaper & GetBackground() const
void remove_mnemonic_label(FixedText *pLabel)
static Image loadThemeImage(const OUString &rFileName)
void DrawImage(const Point &rPos, const Image &rImage, DrawImageFlags nStyle=DrawImageFlags::NONE)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setWidth(tools::Long nWidth)
virtual void Draw(OutputDevice *pDev, const Point &rPos, DrawFlags nFlags) override
SAL_DLLPRIVATE void ImplDrawFrame(OutputDevice *pDev, tools::Rectangle &rRect)
draws a frame around the give rectangle, onto the given device
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static SAL_DLLPRIVATE WinBits ImplInitStyle(WinBits nStyle)
bool IsBackground() const
constexpr auto FIXEDIMAGE_VIEW_STYLE
FixedLine(vcl::Window *pParent, WinBits nStyle=WB_HORZ)
const StyleSettings & GetStyleSettings() const
virtual void ApplySettings(vcl::RenderContext &) override
virtual void Resize() override
virtual void StateChanged(StateChangedType nStateChange) override
void DrawFrame(const tools::Rectangle &rRect, const Color &rLeftTopColor, const Color &rRightBottomColor)
SAL_DLLPRIVATE void ImplDraw(OutputDevice *pDev, const Point &rPos, const Size &rSize)
const Color & GetGroupTextColor() const
virtual Size GetSizePixel() const
virtual void SetSizePixel(const Size &rNewSize)
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
void CompatStateChanged(StateChangedType nStateChange)
void SetBitmap(const BitmapEx &rBitmap)
void SetParentClipMode(ParentClipMode nMode=ParentClipMode::NONE)
WinBits GetPrevStyle() const
virtual bool set_property(const OString &rKey, const OUString &rValue) override
DataChangedEventType GetType() const
static SAL_DLLPRIVATE WinBits ImplInitStyle(WinBits nStyle)
void IntersectClipRegion(const tools::Rectangle &rRect)
FixedText(vcl::Window *pParent, WinBits nStyle=0)
const Color & GetLabelTextColor() const
virtual void StateChanged(StateChangedType nType) override
const Color & GetControlBackground() const
virtual void StateChanged(StateChangedType nType) override
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
tools::Rectangle GetTextRect(const tools::Rectangle &rRect, const OUString &rStr, DrawTextFlags nStyle=DrawTextFlags::WordBreak, TextRectInfo *pInfo=nullptr, const vcl::ITextLayout *_pTextLayout=nullptr) const
virtual Size GetOptimalSize() const override
virtual void DumpAsPropertyTree(tools::JsonWriter &)
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
const vcl::Font & GetLabelFont() const
const vcl::Font & GetFont() const
virtual void StateChanged(StateChangedType nType) override
virtual Size GetOptimalSize() const override
AllSettingsFlags GetFlags() const
static SAL_DLLPRIVATE WinBits ImplInitStyle(WinBits nStyle)
virtual const Color & GetCanonicalTextColor(const StyleSettings &_rStyle) const override
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
void SetBorderStyle(WindowBorderStyle nBorderStyle)
const sal_Int16 FIXEDLINE
void SetModeImage(const Image &rImage)
virtual OUString GetText() const
virtual const vcl::Font & GetCanonicalFont(const StyleSettings &_rStyle) const override
SAL_DLLPRIVATE void ImplDraw(OutputDevice *pDev, const Point &rPos, const Size &rSize)
virtual void ApplySettings(vcl::RenderContext &rRenderContext) override
WinBits const WB_HYPHENATION
virtual void StateChanged(StateChangedType nType) override
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
bool IsChildTransparentModeEnabled() const
tools::Rectangle DrawControlText(OutputDevice &_rTargetDevice, const tools::Rectangle &_rRect, const OUString &_rStr, DrawTextFlags _nStyle, MetricVector *_pVector, OUString *_pDisplayText, const Size *i_pDeviceSize=nullptr) const
draws the given text onto the given device
void DrawRect(const tools::Rectangle &rRect)
#define FIXEDLINE_TEXT_BORDER
sal_Int32 m_nMinWidthChars
virtual void Resize() override
static Size getTextDimensions(Control const *pControl, const OUString &rTxt, tools::Long nMaxWidth)
Size CalcWindowSize(const Size &rOutSz) const
constexpr auto FIXEDTEXT_VIEW_STYLE
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
constexpr auto FIXEDBITMAP_VIEW_STYLE
const vcl::Font & GetGroupFont() const
void add_mnemonic_label(FixedText *pLabel)
virtual vcl::Window * getAccessibleRelationLabelFor() const
void setMaxWidthChars(sal_Int32 nWidth)
void SetControlBackground()
void SetOrientation(Degree10 nLineOrientation)
virtual void SetReadOnly(bool bReadOnly=true)
virtual void ApplySettings(vcl::RenderContext &) override
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
bool IsUpdateMode() const
tools::Long Width() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
virtual void ApplySettings(vcl::RenderContext &) override
void SetTextColor(const Color &rColor)
WinBits const WB_SMALLSTYLE
VclPtr< vcl::Window > m_pMnemonicWindow
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
const AllSettings & GetSettings() const
void SetPaintTransparent(bool bTransparent)
Size GetOutputSizePixel() const
void SetImage(const Image &rImage)
virtual bool set_property(const OString &rKey, const OUString &rValue)
vcl::Window * GetParent() const
WinBits const WB_PATHELLIPSIS
void SetStyle(WinBits nStyle)
void DrawSeparator(const Point &rStart, const Point &rStop, bool bVertical=true)
static Size CalcMinimumTextSize(Control const *pControl, tools::Long nMaxWidth=0x7fffffff)
StyleSettingsOptions GetOptions() const
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
Point LogicToPixel(const Point &rLogicPt) const
SelectableFixedText(vcl::Window *pParent, WinBits nStyle)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle, SystemParentData *pSystemParentData)
constexpr auto FIXEDLINE_VIEW_STYLE
FixedBitmap(vcl::Window *pParent, WinBits nStyle=0)
static SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle(WinBits nWinBits)
virtual void Resize() override
sal_Int32 m_nMaxWidthChars
virtual void DumpAsPropertyTree(tools::JsonWriter &rJsonWriter) override
Dumps itself and potentially its children to a property tree, to be written easily to JSON...
#define SAL_WARN_IF(condition, area, stream)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
void SetFont(const vcl::Font &rNewFont)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual vcl::Window * getAccessibleRelationLabelFor() const override
std::unique_ptr< vcl::ImplControlData > mpControlData
tools::Long GetTextHeight() const
Height where any character of the current font fits; in logic coordinates.
virtual void LoseFocus() override
vcl::Font GetDrawPixelFont(::OutputDevice const *pDev) const
void EnableChildTransparentMode(bool bEnable=true)
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
tools::Long AdjustWidth(tools::Long n)
virtual void Draw(OutputDevice *pDev, const Point &rPos, DrawFlags nFlags) override
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
Width of the text.
tools::Long Height() const
vcl::Window * get_mnemonic_widget() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
virtual Size GetOptimalSize() const override
WinBits const WB_NOMULTILINE
static Point ImplCalcPos(WinBits nStyle, const Point &rPos, const Size &rObjSize, const Size &rWinSize)
void setHeight(tools::Long nHeight)
virtual void FillLayoutData() const override
virtual void ApplySettings(vcl::RenderContext &) override
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
SAL_DLLPRIVATE void ImplDraw(vcl::RenderContext &rRenderContext)
static SAL_DLLPRIVATE WinBits ImplInitStyle(WinBits nStyle)
virtual void Resize() override
virtual void LoseFocus() override
virtual void Draw(OutputDevice *pDev, const Point &rPos, DrawFlags nFlags) override
Size CalcMinimumSize(tools::Long nMaxWidth=0x7fffffff) const
bool IsReallyVisible() const
const Size & GetSizePixel() const
void setMinWidthChars(sal_Int32 nWidth)
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual const vcl::Font & GetCanonicalFont(const StyleSettings &_rStyle) const override
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
virtual bool set_property(const OString &rKey, const OUString &rValue) override
WinBits const WB_EXTRAOFFSET
void Push(PushFlags nFlags=PushFlags::ALL)
WinBits const WB_WORDBREAK
virtual ~FixedText() override
virtual void Resize() override
virtual void Draw(OutputDevice *pDev, const Point &rPos, DrawFlags nFlags) override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
FixedImage(vcl::Window *pParent, WinBits nStyle=0)
virtual void DataChanged(const DataChangedEvent &rDCEvt)
virtual void FillLayoutData() const override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
OStringBuffer & padToLength(OStringBuffer &rBuffer, sal_Int32 nLength, char cFill= '\0')