summaryrefslogtreecommitdiff
path: root/vcl/inc/iconview.hxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2024-06-27 11:11:13 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2024-07-09 07:50:31 +0200
commitfcad7309358bc66dd37f37b64d30be841bd61832 (patch)
treef2862c58c1d2771db7ddb0ca67759e1c4a406b5b /vcl/inc/iconview.hxx
parent2e25618fe7370e9f378da0b03bca8fac471f01f3 (diff)
jsdialog: support on demand rendering for icon view
- rename action: rendered_combobox_entry -> rendered_entry - change generic get json property callback to more specialized image getter as it wasn't used anywhere apart of that and we need image enceded as base64 only not JSON - add to the full update of icon view "ondemand" property to the entries with images so LOK client will know it has to download the render - it will be possible to support HiDPI renders in the future: added TODO Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I83a6e91133f8f9cb03e0bc794b51e1947435fa90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169622 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170160 Tested-by: Jenkins
Diffstat (limited to 'vcl/inc/iconview.hxx')
-rw-r--r--vcl/inc/iconview.hxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/vcl/inc/iconview.hxx b/vcl/inc/iconview.hxx
index 54c2681a9e79..438590b083ab 100644
--- a/vcl/inc/iconview.hxx
+++ b/vcl/inc/iconview.hxx
@@ -47,20 +47,22 @@ public:
virtual FactoryFunction GetUITestFactory() const override;
virtual void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override;
+ typedef std::tuple<OUString&, SvTreeListEntry*> encoded_image_query;
- typedef std::tuple<tools::JsonWriter&, SvTreeListEntry*, std::string_view> json_prop_query;
-
- void SetDumpElemToPropertyTreeHdl(const Link<const json_prop_query&, bool>& rLink)
+ void SetDumpImageHdl(const Link<const encoded_image_query&, bool>& rLink)
{
- maDumpElemToPropertyTreeHdl = rLink;
+ maDumpImageHdl = rLink;
}
+ /// returns string with encoded image for an entry
+ OUString renderEntry(int pos, int dpix, int dpiy) const;
+
protected:
virtual void CalcEntryHeight(SvTreeListEntry const* pEntry) override;
private:
Link<SvTreeListEntry*, OUString> maEntryAccessibleDescriptionHdl;
- Link<const json_prop_query&, bool> maDumpElemToPropertyTreeHdl;
+ Link<const encoded_image_query&, bool> maDumpImageHdl;
void DumpEntryAndSiblings(tools::JsonWriter& rJsonWriter, SvTreeListEntry* pEntry);
};