LibreOffice Module sd (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sd::sidebar::PreviewValueSet Class Reference

Adapt the svtools valueset to the needs of the master page controls. More...

#include <PreviewValueSet.hxx>

Inheritance diagram for sd::sidebar::PreviewValueSet:
[legend]
Collaboration diagram for sd::sidebar::PreviewValueSet:
[legend]

Public Member Functions

 PreviewValueSet ()
 
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea) override
 
virtual ~PreviewValueSet () override
 
void SetContextMenuHandler (const Link< const Point *, void > &rLink)
 
virtual void Resize () override
 
virtual bool Command (const CommandEvent &rEvent) override
 
void SetPreviewSize (const Size &rSize)
 
sal_Int32 GetPreferredHeight (sal_Int32 nWidth)
 
void Rearrange ()
 Set the number of rows and columns according to the current number of items. More...
 
- Public Member Functions inherited from ValueSet
 ValueSet (std::unique_ptr< weld::ScrolledWindow > pScrolledWindow)
 
virtual ~ValueSet () override
 
virtual void SetDrawingArea (weld::DrawingArea *pDrawingArea) override
 
virtual bool MouseButtonDown (const MouseEvent &rMEvt) override
 
virtual bool MouseButtonUp (const MouseEvent &rMEvt) override
 
virtual bool MouseMove (const MouseEvent &rMEvt) override
 
virtual bool KeyInput (const KeyEvent &rKEvt) override
 
virtual void Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
 
virtual void GetFocus () override
 
virtual void LoseFocus () override
 
virtual void Resize () override
 
virtual void StyleUpdated () override
 
virtual void Show () override
 
virtual void Hide () override
 
virtual OUString RequestHelp (tools::Rectangle &rHelpRect) override
 
virtual void Select ()
 
virtual void UserDraw (const UserDrawEvent &rUDEvt)
 
OUString const & GetText () const
 
void SetText (const OUString &rText)
 
void SetStyle (WinBits nStyle)
 
WinBits GetStyle () const
 
void SetOptimalSize ()
 
void InsertItem (sal_uInt16 nItemId, const Image &rImage)
 
void InsertItem (sal_uInt16 nItemId, const Image &rImage, const OUString &rStr, size_t nPos=VALUESET_APPEND, bool bShowLegend=false)
 
void InsertItem (sal_uInt16 nItemId, const Color &rColor, const OUString &rStr)
 
void InsertItem (sal_uInt16 nItemId, size_t nPos=VALUESET_APPEND)
 
void InsertItem (sal_uInt16 nItemId, const OUString &rStr, size_t nPos)
 
void RemoveItem (sal_uInt16 nItemId)
 
void Clear ()
 
size_t GetItemCount () const
 
size_t GetItemPos (sal_uInt16 nItemId) const
 
sal_uInt16 GetItemId (size_t nPos) const
 
sal_uInt16 GetItemId (const Point &rPos) const
 
tools::Rectangle GetItemRect (sal_uInt16 nItemId) const
 
void EnableFullItemMode (bool bFullMode)
 
void SetColCount (sal_uInt16 nNewCols=1)
 
sal_uInt16 GetColCount () const
 
void SetLineCount (sal_uInt16 nNewLines=0)
 
sal_uInt16 GetLineCount () const
 
void SetItemWidth (tools::Long nItemWidth)
 
void SetItemHeight (tools::Long nLineHeight)
 
void SelectItem (sal_uInt16 nItemId)
 
sal_uInt16 GetSelectedItemId () const
 
size_t GetSelectItemPos () const
 
bool IsItemSelected (sal_uInt16 nItemId) const
 
void SetNoSelection ()
 
bool IsNoSelection () const
 
void RecalculateItemSizes ()
 
void SetItemImage (sal_uInt16 nItemId, const Image &rImage)
 
Image GetItemImage (sal_uInt16 nItemId) const
 
void SetItemColor (sal_uInt16 nItemId, const Color &rColor)
 
Color GetItemColor (sal_uInt16 nItemId) const
 
void SetItemData (sal_uInt16 nItemId, void *pData)
 
void * GetItemData (sal_uInt16 nItemId) const
 
void SetItemText (sal_uInt16 nItemId, const OUString &rStr)
 
OUString GetItemText (sal_uInt16 nItemId) const
 
void SetColor (const Color &rColor)
 
void SetColor ()
 
bool IsColor () const
 
void SetExtraSpacing (sal_uInt16 nNewSpacing)
 
void Format (vcl::RenderContext const &rRenderContext)
 
void SetFormat ()
 
Size CalcWindowSizePixel (const Size &rItemSize, sal_uInt16 nCalcCols=0, sal_uInt16 nCalcLines=0) const
 
Size CalcItemSizePixel (const Size &rSize) const
 
int GetScrollWidth () const
 
void SetSelectHdl (const Link< ValueSet *, void > &rLink)
 
void SetDoubleClickHdl (const Link< ValueSet *, void > &rLink)
 
bool GetEdgeBlending () const
 
void SetEdgeBlending (bool bNew)
 
void SaveValue ()
 
bool IsValueChangedFromSaved () const
 
virtual FactoryFunction GetUITestFactory () const override
 

Private Member Functions

sal_uInt16 CalculateColumnCount (int nWidth) const
 
sal_uInt16 CalculateRowCount (sal_uInt16 nColumnCount) const
 

Private Attributes

Link< const Point *, void > maContextMenuHandler
 
Size maPreviewSize
 

Additional Inherited Members

- Protected Member Functions inherited from ValueSet
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible () override
 
weld::ScrolledWindowGetScrollBar () const
 

Detailed Description

Adapt the svtools valueset to the needs of the master page controls.

Definition at line 28 of file PreviewValueSet.hxx.

Constructor & Destructor Documentation

◆ PreviewValueSet()

sd::sidebar::PreviewValueSet::PreviewValueSet ( )
explicit

Definition at line 28 of file PreviewValueSet.cxx.

References ValueSet::GetStyle(), ValueSet::SetStyle(), and WB_ITEMBORDER.

◆ ~PreviewValueSet()

sd::sidebar::PreviewValueSet::~PreviewValueSet ( )
overridevirtual

Definition at line 47 of file PreviewValueSet.cxx.

Member Function Documentation

◆ CalculateColumnCount()

sal_uInt16 sd::sidebar::PreviewValueSet::CalculateColumnCount ( int  nWidth) const
private

Definition at line 91 of file PreviewValueSet.cxx.

References sd::sidebar::gnBorderWidth(), maPreviewSize, and Size::Width().

Referenced by GetPreferredHeight(), and Rearrange().

◆ CalculateRowCount()

sal_uInt16 sd::sidebar::PreviewValueSet::CalculateRowCount ( sal_uInt16  nColumnCount) const
private

Definition at line 103 of file PreviewValueSet.cxx.

References ValueSet::GetItemCount().

Referenced by GetPreferredHeight(), and Rearrange().

◆ Command()

bool sd::sidebar::PreviewValueSet::Command ( const CommandEvent rEvent)
overridevirtual

◆ GetPreferredHeight()

sal_Int32 sd::sidebar::PreviewValueSet::GetPreferredHeight ( sal_Int32  nWidth)

◆ Rearrange()

void sd::sidebar::PreviewValueSet::Rearrange ( )

Set the number of rows and columns according to the current number of items.

Call this method when new items have been inserted.

Definition at line 80 of file PreviewValueSet.cxx.

References CalculateColumnCount(), CalculateRowCount(), ValueSet::SetColCount(), ValueSet::SetFormat(), ValueSet::SetLineCount(), and Width.

Referenced by Resize().

◆ Resize()

void sd::sidebar::PreviewValueSet::Resize ( )
overridevirtual

Reimplemented from ValueSet.

Definition at line 69 of file PreviewValueSet.cxx.

References Size::IsEmpty(), Rearrange(), and ValueSet::Resize().

◆ SetContextMenuHandler()

void sd::sidebar::PreviewValueSet::SetContextMenuHandler ( const Link< const Point *, void > &  rLink)

Definition at line 56 of file PreviewValueSet.cxx.

References maContextMenuHandler.

◆ SetDrawingArea()

void sd::sidebar::PreviewValueSet::SetDrawingArea ( weld::DrawingArea pDrawingArea)
overridevirtual

Reimplemented from ValueSet.

Definition at line 39 of file PreviewValueSet.cxx.

References ValueSet::SetColCount(), ValueSet::SetDrawingArea(), and ValueSet::SetExtraSpacing().

◆ SetPreviewSize()

void sd::sidebar::PreviewValueSet::SetPreviewSize ( const Size rSize)

Definition at line 51 of file PreviewValueSet.cxx.

References maPreviewSize.

Member Data Documentation

◆ maContextMenuHandler

Link<const Point*, void> sd::sidebar::PreviewValueSet::maContextMenuHandler
private

Definition at line 50 of file PreviewValueSet.hxx.

Referenced by Command(), and SetContextMenuHandler().

◆ maPreviewSize

Size sd::sidebar::PreviewValueSet::maPreviewSize
private

Definition at line 51 of file PreviewValueSet.hxx.

Referenced by CalculateColumnCount(), GetPreferredHeight(), and SetPreviewSize().


The documentation for this class was generated from the following files: