50 if (rEvent.
GetCommand() != CommandEventId::ContextMenu)
51 return CustomWidgetController::Command(rEvent);
55 std::unique_ptr<weld::Builder> xBuilder(
57 std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu(
"menu"));
71template <
typename ListType,
typename EntryType>
78 aBitmap = pList.GetBitmapForPreview(
nIndex, aSize);
86 FillPresetListBoxImpl<XGradientList, XGradientEntry>(pList, nStartIndex);
91 FillPresetListBoxImpl<XHatchList, XHatchEntry>(pList, nStartIndex);
96 FillPresetListBoxImpl<XBitmapList, XBitmapEntry>(pList, nStartIndex);
101 FillPresetListBoxImpl<XPatternList, XBitmapEntry>(pList, nStartIndex);
106 if (rIdent ==
u"rename")
108 else if (rIdent ==
u"delete")
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
Size const & GetIconSize() const
virtual void Resize() override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
void FillPresetListBox(XGradientList &pList, sal_uInt32 nStartIndex=1)
virtual bool Command(const CommandEvent &rEvent) override
SvxPresetListBox(std::unique_ptr< weld::ScrolledWindow > pWindow)
Link< SvxPresetListBox *, void > maRenameHdl
static constexpr sal_uInt32 nColCount
void OnMenuItemSelected(std::u16string_view rIdent)
void FillPresetListBoxImpl(ListType &pList, sal_uInt32 nStartIndex)
Link< SvxPresetListBox *, void > maDeleteHdl
void InsertItem(sal_uInt16 nItemId, const Image &rImage)
void SetEdgeBlending(bool bNew)
void SetStyle(WinBits nStyle)
sal_uInt16 GetSelectedItemId() const
void SetLineCount(sal_uInt16 nNewLines=0)
void SetColCount(sal_uInt16 nNewCols=1)
virtual void Resize() override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override