LibreOffice Module sfx2 (master) 1
|
#include <thumbnailviewitem.hxx>
Public Member Functions | |
ThumbnailViewItem (ThumbnailView &rView, sal_uInt16 nId) | |
virtual | ~ThumbnailViewItem () |
bool | isVisible () const |
void | show (bool bVisible) |
bool | isSelected () const |
void | setSelection (bool state) |
bool | isHighlighted () const |
void | setHighlight (bool state) |
bool | isPinned () const |
virtual tools::Rectangle | updateHighlight (bool bVisible, const Point &rPoint) |
Updates own highlight status based on the aPoint position. More... | |
void | setHelpText (const OUString &sText) |
Text to be used for the tooltip. More... | |
virtual OUString | getHelpText () const |
OUString const & | getTitle () const |
void | setTitle (const OUString &rTitle) |
css::uno::Reference< css::accessibility::XAccessible > const & | GetAccessible (bool bIsTransientChildrenDisabled) |
void | setDrawArea (const tools::Rectangle &area) |
const tools::Rectangle & | getDrawArea () const |
void | calculateItemsPosition (const tools::Long nThumbnailHeight, const tools::Long nPadding, sal_uInt32 nMaxTextLength, const ThumbnailItemAttributes *pAttrs) |
virtual void | Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, const ThumbnailItemAttributes *pAttrs) |
void | addTextPrimitives (const OUString &rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DContainer &rSeq) |
virtual void | MouseButtonUp (const MouseEvent &) |
Static Public Member Functions | |
static rtl::Reference< drawinglayer::primitive2d::PolygonHairlinePrimitive2D > | createBorderLine (const basegfx::B2DPolygon &rPolygon) |
Public Attributes | |
ThumbnailView & | mrParent |
sal_uInt16 | mnId |
bool | mbVisible |
bool | mbBorder |
bool | mbSelected |
bool | mbHover |
bool | mbPinned |
BitmapEx | maPreview1 |
OUString | maTitle |
OUString | maHelpText |
css::uno::Reference< css::accessibility::XAccessible > | mxAcc |
bool | mbPinnedDocumentHighlighted |
BitmapEx | maPinnedDocumentBitmap |
BitmapEx | maPinnedDocumentBitmapHiglighted |
Protected Attributes | |
Point | maTextPos |
Point | maPrev1Pos |
Point | maPinPos |
tools::Rectangle | maDrawArea |
Definition at line 65 of file thumbnailviewitem.hxx.
ThumbnailViewItem::ThumbnailViewItem | ( | ThumbnailView & | rView, |
sal_uInt16 | nId | ||
) |
|
virtual |
Definition at line 66 of file thumbnailviewitem.cxx.
References mxAcc.
void ThumbnailViewItem::addTextPrimitives | ( | const OUString & | rText, |
const ThumbnailItemAttributes * | pAttrs, | ||
Point | aPos, | ||
drawinglayer::primitive2d::Primitive2DContainer & | rSeq | ||
) |
Definition at line 243 of file thumbnailviewitem.cxx.
References ThumbnailItemAttributes::aFontAttr, ThumbnailItemAttributes::aFontSize, ThumbnailItemAttributes::aHighlightTextColor, basegfx::B2DPolygon::append(), ThumbnailItemAttributes::aSelectHighlightTextColor, ThumbnailItemAttributes::aTextColor, tools::Rectangle::Bottom(), createScaleTranslateB2DHomMatrix(), TextEngine::GetCharHeight(), TextEngine::GetLineCount(), TextEngine::GetLineLen(), tools::Rectangle::getOpenWidth(), drawinglayer::primitive2d::TextLayouterDevice::getTextArray(), drawinglayer::primitive2d::TextLayouterDevice::getTextHeight(), drawinglayer::primitive2d::TextLayouterDevice::getTextWidth(), drawinglayer::primitive2d::TextLayouterDevice::getUnderlineHeight(), drawinglayer::primitive2d::TextLayouterDevice::getUnderlineOffset(), getVclFontFromFontAttribute(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), Point::getY(), i, ThumbnailView::isDrawMnemonic(), tools::Rectangle::Left(), maDrawArea, mbHover, mbSelected, mrParent, nLength, nLineWidth, nPos, removeMnemonicFromString(), TextEngine::SetFont(), drawinglayer::primitive2d::TextLayouterDevice::setFontAttribute(), TextEngine::SetMaxTextWidth(), TextEngine::SetText(), Point::setY(), and Point::Y().
Referenced by Paint(), and TemplateViewItem::Paint().
void ThumbnailViewItem::calculateItemsPosition | ( | const tools::Long | nThumbnailHeight, |
const tools::Long | nPadding, | ||
sal_uInt32 | nMaxTextLength, | ||
const ThumbnailItemAttributes * | pAttrs | ||
) |
Definition at line 145 of file thumbnailviewitem.cxx.
References ThumbnailItemAttributes::aFontAttr, ThumbnailItemAttributes::aFontSize, BitmapEx::GetSizePixel(), drawinglayer::primitive2d::TextLayouterDevice::getTextWidth(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), Size::Height(), maDrawArea, maPinPos, maPrev1Pos, maPreview1, maTextPos, maTitle, drawinglayer::primitive2d::TextLayouterDevice::setFontAttribute(), tools::Rectangle::TopCenter(), tools::Rectangle::TopLeft(), and Size::Width().
Referenced by ThumbnailView::CalculateItemPositions().
|
static |
Definition at line 352 of file thumbnailviewitem.cxx.
Referenced by Paint(), and TemplateViewItem::Paint().
uno::Reference< accessibility::XAccessible > const & ThumbnailViewItem::GetAccessible | ( | bool | bIsTransientChildrenDisabled | ) |
Definition at line 132 of file thumbnailviewitem.cxx.
References mxAcc.
Referenced by ThumbnailView::CalculateItemPositions(), ThumbnailView::filterItems(), ThumbnailViewAcc::getAccessibleAtPoint(), ThumbnailViewAcc::getAccessibleChild(), ThumbnailViewItemAcc::getAccessibleIndexInParent(), ThumbnailViewAcc::getSelectedAccessibleChild(), ThumbnailView::ImplDeleteItems(), and ThumbnailView::SelectItem().
|
inline |
Definition at line 123 of file thumbnailviewitem.hxx.
Referenced by ThumbnailView::DrawItem(), ThumbnailViewItemAcc::getBounds(), TemplateViewItem::getDefaultIconArea(), ThumbnailViewItemAcc::getLocationOnScreen(), RecentDocsViewItem::getRemoveIconArea(), ThumbnailView::RequestHelp(), and updateHighlight().
|
inlinevirtual |
Reimplemented in RecentDocsViewItem.
Definition at line 113 of file thumbnailviewitem.hxx.
Referenced by ThumbnailView::RequestHelp().
|
inline |
Definition at line 114 of file thumbnailviewitem.hxx.
References maTitle.
Referenced by TemplateDlgLocalView::ContextMenuSelectHdl(), and TemplateLocalView::ContextMenuSelectHdl().
|
inline |
Definition at line 97 of file thumbnailviewitem.hxx.
Referenced by ThumbnailView::MouseButtonDown(), RecentDocsViewItem::Paint(), and updateHighlight().
|
inline |
Definition at line 101 of file thumbnailviewitem.hxx.
Referenced by ThumbnailView::CalculateItemPositions(), and RecentDocsViewItem::RecentDocsViewItem().
|
inline |
Definition at line 93 of file thumbnailviewitem.hxx.
Referenced by TemplateLocalView::Command(), ThumbnailViewItemAcc::getAccessibleStateSet(), ThumbnailView::ImplDeleteItems(), ThumbnailView::IsItemSelected(), ThumbnailView::KeyInput(), ThumbnailView::MouseButtonDown(), SfxTemplateManagerDlg::OnTemplateState(), and ThumbnailView::SelectItem().
|
inline |
Definition at line 89 of file thumbnailviewitem.hxx.
References mbVisible.
Referenced by ThumbnailView::CalculateItemPositions(), ThumbnailView::DrawItem(), ThumbnailView::filterItems(), ThumbnailView::ImplDeleteItems(), ThumbnailView::ImplGetVisibleItem(), and ThumbnailView::Paint().
|
inlinevirtual |
Reimplemented in RecentDocsViewItem.
Definition at line 136 of file thumbnailviewitem.hxx.
Referenced by sfx2::RecentDocsView::MouseButtonUp().
|
virtual |
Reimplemented in TemplateViewItem, and RecentDocsViewItem.
Definition at line 167 of file thumbnailviewitem.cxx.
References addTextPrimitives(), ThumbnailItemAttributes::aFillColor, ThumbnailItemAttributes::aHighlightColor, basegfx::B2DPolygon::append(), ThumbnailItemAttributes::aSelectHighlightColor, aSeq, createBorderLine(), createTranslateB2DHomMatrix(), ThumbnailItemAttributes::fHighlightTransparence, BitmapEx::GetSizePixel(), Point::getX(), Point::getY(), Size::Height(), maDrawArea, maPinnedDocumentBitmap, maPinnedDocumentBitmapHiglighted, maPinPos, maPrev1Pos, maPreview1, maTextPos, maTitle, mbBorder, mbHover, mbPinned, mbSelected, drawinglayer::processor2d::BaseProcessor2D::process(), basegfx::B2DPolygon::setClosed(), THUMBNAILVIEW_ITEM_CORNER, Size::Width(), Point::X(), and Point::Y().
Referenced by RecentDocsViewItem::Paint(), and ThumbnailView::Paint().
void ThumbnailViewItem::setDrawArea | ( | const tools::Rectangle & | area | ) |
Definition at line 140 of file thumbnailviewitem.cxx.
References maDrawArea.
Referenced by ThumbnailView::CalculateItemPositions().
|
inline |
Text to be used for the tooltip.
Definition at line 111 of file thumbnailviewitem.hxx.
Referenced by TemplateLocalView::renameItem().
void ThumbnailViewItem::setHighlight | ( | bool | state | ) |
Definition at line 84 of file thumbnailviewitem.cxx.
References mbHover.
Referenced by sfx2::RecentDocsView::MouseButtonUp(), and updateHighlight().
void ThumbnailViewItem::setSelection | ( | bool | state | ) |
Definition at line 79 of file thumbnailviewitem.cxx.
References mbSelected.
Referenced by TemplateLocalView::Command(), TemplateDefaultView::createContextMenu(), ThumbnailView::filterItems(), ThumbnailView::ImplDeleteItems(), ThumbnailView::KeyInput(), ThumbnailView::MouseButtonDown(), and ThumbnailView::SelectItem().
void ThumbnailViewItem::setTitle | ( | const OUString & | rTitle | ) |
Definition at line 126 of file thumbnailviewitem.cxx.
References maTitle, mrParent, and ThumbnailView::renameItem().
Referenced by TemplateDlgLocalView::ContextMenuSelectHdl(), and TemplateLocalView::ContextMenuSelectHdl().
void ThumbnailViewItem::show | ( | bool | bVisible | ) |
Definition at line 74 of file thumbnailviewitem.cxx.
References bVisible, and mbVisible.
Referenced by ThumbnailView::CalculateItemPositions(), and ThumbnailView::filterItems().
|
virtual |
Updates own highlight status based on the aPoint position.
Returns rectangle that needs to be invalidated.
Reimplemented in RecentDocsViewItem.
Definition at line 89 of file thumbnailviewitem.cxx.
References bVisible, getDrawArea(), BitmapEx::GetSizePixel(), isHighlighted(), maPinnedDocumentBitmap, maPinPos, mbPinnedDocumentHighlighted, and setHighlight().
Referenced by ThumbnailView::MouseMove(), and RecentDocsViewItem::updateHighlight().
|
protected |
Definition at line 143 of file thumbnailviewitem.hxx.
Referenced by addTextPrimitives(), calculateItemsPosition(), Paint(), TemplateViewItem::Paint(), and setDrawArea().
OUString ThumbnailViewItem::maHelpText |
Definition at line 78 of file thumbnailviewitem.hxx.
Referenced by TemplateLocalView::moveTemplates().
BitmapEx ThumbnailViewItem::maPinnedDocumentBitmap |
Definition at line 82 of file thumbnailviewitem.hxx.
Referenced by RecentDocsViewItem::MouseButtonUp(), Paint(), and updateHighlight().
BitmapEx ThumbnailViewItem::maPinnedDocumentBitmapHiglighted |
Definition at line 83 of file thumbnailviewitem.hxx.
Referenced by Paint().
|
protected |
Definition at line 142 of file thumbnailviewitem.hxx.
Referenced by calculateItemsPosition(), RecentDocsViewItem::MouseButtonUp(), Paint(), and updateHighlight().
|
protected |
Definition at line 141 of file thumbnailviewitem.hxx.
Referenced by calculateItemsPosition(), Paint(), and TemplateViewItem::Paint().
BitmapEx ThumbnailViewItem::maPreview1 |
Definition at line 76 of file thumbnailviewitem.hxx.
Referenced by calculateItemsPosition(), TemplateLocalView::moveTemplates(), Paint(), TemplateViewItem::Paint(), and RecentDocsViewItem::RecentDocsViewItem().
|
protected |
Definition at line 140 of file thumbnailviewitem.hxx.
Referenced by calculateItemsPosition(), Paint(), and TemplateViewItem::Paint().
OUString ThumbnailViewItem::maTitle |
Definition at line 77 of file thumbnailviewitem.hxx.
Referenced by calculateItemsPosition(), TemplateDlgLocalView::ContextMenuSelectHdl(), ThumbnailViewItemAcc::getAccessibleName(), IMPL_LINK_NOARG(), TemplateLocalView::moveTemplates(), SfxTemplateManagerDlg::OnTemplateExport(), Paint(), TemplateViewItem::Paint(), RecentDocsViewItem::RecentDocsViewItem(), TemplateLocalView::renameItem(), and setTitle().
bool ThumbnailViewItem::mbBorder |
Definition at line 72 of file thumbnailviewitem.hxx.
Referenced by Paint().
bool ThumbnailViewItem::mbHover |
Definition at line 74 of file thumbnailviewitem.hxx.
Referenced by addTextPrimitives(), Paint(), TemplateViewItem::Paint(), and setHighlight().
bool ThumbnailViewItem::mbPinned |
Definition at line 75 of file thumbnailviewitem.hxx.
Referenced by Paint(), and RecentDocsViewItem::RecentDocsViewItem().
bool ThumbnailViewItem::mbPinnedDocumentHighlighted |
Definition at line 81 of file thumbnailviewitem.hxx.
Referenced by updateHighlight().
bool ThumbnailViewItem::mbSelected |
Definition at line 73 of file thumbnailviewitem.hxx.
Referenced by addTextPrimitives(), Paint(), TemplateViewItem::Paint(), and setSelection().
bool ThumbnailViewItem::mbVisible |
Definition at line 71 of file thumbnailviewitem.hxx.
Referenced by ThumbnailView::MouseMove(), ThumbnailView::RequestHelp(), and show().
sal_uInt16 ThumbnailViewItem::mnId |
Definition at line 70 of file thumbnailviewitem.hxx.
Referenced by cmpSelectionItems(), TemplateDlgLocalView::ContextMenuSelectHdl(), ThumbnailViewItemAcc::getAccessibleName(), ThumbnailView::GetFocus(), ThumbnailViewAcc::getSelectedAccessibleChild(), ThumbnailViewAcc::getSelectedAccessibleChildCount(), TemplateDlgLocalView::insertFilteredItems(), ThumbnailViewAcc::isAccessibleChildSelected(), ThumbnailView::KeyInput(), ThumbnailView::MakeItemVisible(), and ThumbnailViewAcc::selectAccessibleChild().
ThumbnailView& ThumbnailViewItem::mrParent |
Definition at line 69 of file thumbnailviewitem.hxx.
Referenced by addTextPrimitives(), ThumbnailViewItemAcc::getAccessibleIndexInParent(), ThumbnailViewItemAcc::getAccessibleParent(), ThumbnailViewItemAcc::getAccessibleStateSet(), ThumbnailViewItemAcc::getLocationOnScreen(), RecentDocsViewItem::MouseButtonUp(), and setTitle().
css::uno::Reference< css::accessibility::XAccessible > ThumbnailViewItem::mxAcc |
Definition at line 79 of file thumbnailviewitem.hxx.
Referenced by GetAccessible(), ThumbnailViewItemAcc::getAccessibleIndexInParent(), and ~ThumbnailViewItem().