21#include <core_resource.hxx>
23#include <bitmaps.hlst>
31#include <callbacks.hxx>
43 : DropTargetHelper(rControl.GetDrawingArea()->get_drop_target())
61 , m_pActionListener(nullptr)
72 static const struct CategoryDescriptor
76 rtl::OUStringConstExpr aImageResId;
77 } aCategories[] = { { RID_STR_TABLES_CONTAINER,
E_TABLE, BMP_TABLEFOLDER_TREE_L },
78 { RID_STR_QUERIES_CONTAINER,
E_QUERY, BMP_QUERYFOLDER_TREE_L },
79 { RID_STR_FORMS_CONTAINER,
E_FORM, BMP_FORMFOLDER_TREE_L },
80 { RID_STR_REPORTS_CONTAINER,
E_REPORT, BMP_REPORTFOLDER_TREE_L } };
82 for (
const CategoryDescriptor& aCategorie : aCategories)
85 std::unique_ptr<ThumbnailViewItem> xItem(
87 xItem->mbBorder =
false;
88 xItem->maPreview1 =
BitmapEx(aCategorie.aImageResId);
89 const Size& rSize = xItem->maPreview1.GetSizePixel();
92 xItem->maTitle =
DBA_RES(aCategorie.pLabelResId);
97 const int nMargin = 12;
98 const int nWidthRequest =
m_nMaxWidth + 2 * nMargin;
99 set_size_request(nWidthRequest, -1);
107 if (!rItem->mbSelected)
const vcl::I18nHelper & GetUILocaleI18nHelper() const
static const AllSettings & GetSettings()
sal_Unicode GetCharCode() const
const vcl::KeyCode & GetKeyCode() const
void RegisterMnemonic(const OUString &rKey)
OUString CreateMnemonic(const OUString &rKey)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const tools::Rectangle & getDrawArea() const
sal_uInt16 GetItemId(size_t nPos) const
virtual bool KeyInput(const KeyEvent &rKEvt) override
virtual void Resize() override
void AppendItem(std::unique_ptr< ThumbnailViewItem > pItem)
void setItemDimensions(tools::Long ItemWidth, tools::Long ThumbnailHeight, tools::Long DisplayHeight, int itemPadding)
virtual void LoseFocus() override
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
virtual void GetFocus() override
void DrawMnemonics(bool bDrawMnemonics)
void SelectItem(sal_uInt16 nItemId)
std::vector< std::unique_ptr< ThumbnailViewItem > > mItemList
ThumbnailValueItemList mFilteredItemList
virtual sal_Int8 queryDrop(const AcceptDropEvent &_rEvt, const DataFlavorExVector &_rFlavors)=0
check whether or not a drop request should be accepted
virtual sal_Int8 executeDrop(const ExecuteDropEvent &_rEvt)=0
execute a drop request
OApplicationIconControl & m_rControl
OApplicationIconControlDropTarget(OApplicationIconControl &rControl)
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
std::unique_ptr< OApplicationIconControlDropTarget > m_xDropTarget
IControlActionListener * m_pActionListener
virtual void LoseFocus() override
ElementType GetSelectedItem() const
bool DoKeyShortCut(const KeyEvent &rKEvt)
virtual void GetFocus() override
void createIconAutoMnemonics(MnemonicGenerator &rMnemonics)
OApplicationIconControl(std::unique_ptr< weld::ScrolledWindow > xScroll)
sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt)
virtual tools::Rectangle GetFocusRect() override
virtual void Resize() override
virtual ~OApplicationIconControl() override
sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt)
virtual bool KeyInput(const KeyEvent &rKEvt) override
bool IsMnemonicChar(sal_Unicode cChar, ElementType &rType) const
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
bool MatchMnemonic(std::u16string_view rString, sal_Unicode cMnemonicChar) const
const int THUMBNAILVIEW_ITEM_CORNER