41#include <bitmaps.hlst>
60 , mbPinnedDocumentHighlighted(false)
61 , maPinnedDocumentBitmap(BMP_PIN_DOC)
62 , maPinnedDocumentBitmapHiglighted(BMP_PIN_DOC_HIGHLIGHTED)
91 bool bNeedsPaint =
false;
107 if (
bVisible && aPinPosRectangle.Contains(rPoint))
123 return ::tools::Rectangle();
146 const tools::Long nPadding, sal_uInt32 nMaxTextLength,
152 css::lang::Locale() );
172 double fTransparence = 0.0;
184 sal_uInt32 nPrimitive = 0;
222 float fWidth = aImageSize.
Width() - 1;
223 float fHeight = aImageSize.
Height() - 1;
251 css::lang::Locale());
255 sal_Int32 nMnemonicPos = -1;
261 css::lang::Locale()));
263 aTextEngine.
SetText(aOrigText);
265 sal_Int32 nPrimitives = rSeq.size();
266 sal_Int32 nFinalPrimCount = nPrimitives + aTextEngine.
GetLineCount(0);
267 rSeq.resize(nFinalPrimCount);
270 sal_Int32 nLineStart = 0;
271 OUString aText(aOrigText);
274 sal_Int32 nLineLength = aTextEngine.
GetLineLen(0,
i);
278 if (bTooLong && (nLineLength + nLineStart) < aOrigText.getLength())
283 sal_Int32
nLength = nLineLength - 1;
289 aText = OUString::Concat(aText.subView(0, nLineStart+
nLength)) +
"...";
297 nLineX,
double( aPos.
Y() ) ) );
311 aText, nLineStart, nLineLength,
312 std::vector<double>(),
318 if (nMnemonicPos != -1 && nMnemonicPos >= nLineStart && nMnemonicPos < nLineStart + nLineLength)
320 rSeq.resize(nFinalPrimCount + 1);
322 auto aTextArray = aTextDev.
getTextArray(aText, nLineStart, nLineLength,
true);
324 auto nPos = nMnemonicPos - nLineStart;
325 auto lc_x1 =
nPos ? aTextArray[
nPos - 1] : 0;
326 auto lc_x2 = aTextArray[
nPos];
327 auto fMnemonicWidth = std::abs(lc_x1 - lc_x2);
330 auto fPosX = nLineX + std::min(lc_x1, lc_x2);
343 nLineStart += nLineLength;
BaseContainerNodeSharedPtr & mrParent
const Size & GetSizePixel() const
constexpr tools::Long Y() const
void setY(tools::Long nY)
constexpr tools::Long X() const
constexpr tools::Long getX() const
constexpr tools::Long getY() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
sal_uInt16 GetLineCount(sal_uInt32 nParagraph) const
sal_Int32 GetLineLen(sal_uInt32 nParagraph, sal_uInt16 nLine) const
void SetMaxTextWidth(tools::Long nWidth)
tools::Long GetCharHeight() const
void SetText(const OUString &rStr)
void SetFont(const vcl::Font &rFont)
static rtl::Reference< drawinglayer::primitive2d::PolygonHairlinePrimitive2D > createBorderLine(const basegfx::B2DPolygon &rPolygon)
void setHighlight(bool state)
bool isHighlighted() const
css::uno::Reference< css::accessibility::XAccessible > const & GetAccessible(bool bIsTransientChildrenDisabled)
css::uno::Reference< css::accessibility::XAccessible > mxAcc
virtual ~ThumbnailViewItem()
void calculateItemsPosition(const tools::Long nThumbnailHeight, const tools::Long nPadding, sal_uInt32 nMaxTextLength, const ThumbnailItemAttributes *pAttrs)
ThumbnailViewItem(ThumbnailView &rView, sal_uInt16 nId)
BitmapEx maPinnedDocumentBitmapHiglighted
virtual tools::Rectangle updateHighlight(bool bVisible, const Point &rPoint)
Updates own highlight status based on the aPoint position.
void setSelection(bool state)
bool mbPinnedDocumentHighlighted
tools::Rectangle maDrawArea
BitmapEx maPinnedDocumentBitmap
void addTextPrimitives(const OUString &rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DContainer &rSeq)
const tools::Rectangle & getDrawArea() const
virtual void Paint(drawinglayer::processor2d::BaseProcessor2D *pProcessor, const ThumbnailItemAttributes *pAttrs)
void setDrawArea(const tools::Rectangle &area)
void setTitle(const OUString &rTitle)
Class to display thumbnails with their names below their respective icons.
virtual bool renameItem(ThumbnailViewItem *pItem, const OUString &sNewTitle)
bool isDrawMnemonic() const
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
void setClosed(bool bNew)
void setFontAttribute(const attribute::FontAttribute &rFontAttribute, double fFontScaleX, double fFontScaleY, const css::lang::Locale &rLocale)
double getTextWidth(const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength) const
double getUnderlineHeight() const
double getUnderlineOffset() const
double getTextHeight() const
::std::vector< double > getTextArray(const OUString &rText, sal_uInt32 nIndex, sal_uInt32 nLength, bool bCaret=false) const
void process(const primitive2d::Primitive2DContainer &rSource)
Sequence< sal_Int8 > aSeq
VCL_DLLPUBLIC OUString removeMnemonicFromString(OUString const &rStr, sal_Int32 &rMnemonicPos)
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
rtl::Reference< BasePrimitive2D > Primitive2DReference
vcl::Font getVclFontFromFontAttribute(const attribute::FontAttribute &rFontAttribute, double fFontScaleX, double fFontScaleY, double fFontRotation, const css::lang::Locale &rLocale)
basegfx::BColor aSelectHighlightColor
basegfx::BColor aFillColor
basegfx::BColor aSelectHighlightTextColor
basegfx::BColor aTextColor
basegfx::B2DVector aFontSize
basegfx::BColor aHighlightTextColor
basegfx::BColor aHighlightColor
double fHighlightTransparence
drawinglayer::attribute::FontAttribute aFontAttr
const int THUMBNAILVIEW_ITEM_CORNER