summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-08 10:00:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-27 07:36:31 +0100
commitc5ac80d90ebcc1c3fad18ece8784ac2b36f52045 (patch)
treecdcfde0d319e864389ae42a43d7366807965d4a3
parent57ac2fcdda9fdc9f1c2840796c24783add08e38c (diff)
make cursor images part of the theme
This first step only affects GTK3, later we will extend the support to other platforms. Note that these images are derived from the OSX PNG files, not the header-file encoded data we currently use for gtk/gtk3. Also rename the files to more useful names. Change-Id: Ia13a3f2ac35b06672aff724f4cf5bdcd823f6342 Reviewed-on: https://gerrit.libreoffice.org/67528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_e.svg (renamed from vcl/osx/res/cursors/ase.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_n.svg (renamed from vcl/osx/res/cursors/asn.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_ne.svg (renamed from vcl/osx/res/cursors/asne.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_ns.svg (renamed from vcl/osx/res/cursors/asns.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_nswe.svg (renamed from vcl/osx/res/cursors/asnswe.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_nw.svg (renamed from vcl/osx/res/cursors/asnw.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_s.svg (renamed from vcl/osx/res/cursors/ass.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_se.svg (renamed from vcl/osx/res/cursors/asse.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_sw.svg (renamed from vcl/osx/res/cursors/assw.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_w.svg (renamed from vcl/osx/res/cursors/asw.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/autoscroll_we.svg (renamed from vcl/osx/res/cursors/aswe.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/chain.svg (renamed from vcl/osx/res/cursors/chain.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/chain_not_allowed.svg (renamed from vcl/osx/res/cursors/chainnot.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/chart.svg (renamed from vcl/osx/res/cursors/chart.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/copy_data.svg (renamed from vcl/osx/res/cursors/copydata.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/copy_data_link.svg (renamed from vcl/osx/res/cursors/copydlnk.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/copy_file.svg (renamed from vcl/osx/res/cursors/copyf.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/copy_file_link.svg (renamed from vcl/osx/res/cursors/copyflnk.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/copy_files.svg (renamed from vcl/osx/res/cursors/copyf2.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/crook.svg (renamed from vcl/osx/res/cursors/crook.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/crop.svg (renamed from vcl/osx/res/cursors/crop.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/detective.svg (renamed from vcl/osx/res/cursors/detectiv.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_arc.svg (renamed from vcl/osx/res/cursors/darc.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_bezier.svg (renamed from vcl/osx/res/cursors/dbezier.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_caption.svg (renamed from vcl/osx/res/cursors/dcapt.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_circle_cut.svg (renamed from vcl/osx/res/cursors/dcirccut.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_connect.svg (renamed from vcl/osx/res/cursors/dconnect.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_ellipse.svg (renamed from vcl/osx/res/cursors/dellipse.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_freehand.svg (renamed from vcl/osx/res/cursors/dfree.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_line.svg (renamed from vcl/osx/res/cursors/dline.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_pie.svg (renamed from vcl/osx/res/cursors/dpie.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_polygon.svg (renamed from vcl/osx/res/cursors/dpolygon.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_rect.svg (renamed from vcl/osx/res/cursors/drect.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/draw_text.svg (renamed from vcl/osx/res/cursors/dtext.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/fill.svg (renamed from vcl/osx/res/cursors/fill.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/h_shear.svg (renamed from vcl/osx/res/cursors/hshear.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/help.svg (renamed from vcl/osx/res/cursors/help.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/hide_whitespace.svg (renamed from vcl/osx/res/cursors/wshide.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/hourglass.svg (renamed from vcl/osx/res/cursors/hourglass.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/link_data.svg (renamed from vcl/osx/res/cursors/linkdata.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/link_file.svg (renamed from vcl/osx/res/cursors/linkf.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/magnify.svg (renamed from vcl/osx/res/cursors/magnify.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/mirror.svg (renamed from vcl/osx/res/cursors/mirror.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/move_bezier_weight.svg (renamed from vcl/osx/res/cursors/movebw.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/move_data.svg (renamed from vcl/osx/res/cursors/movedata.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/move_data_link.svg (renamed from vcl/osx/res/cursors/movedlnk.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/move_file.svg (renamed from vcl/osx/res/cursors/movef.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/move_file_link.svg (renamed from vcl/osx/res/cursors/moveflnk.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/move_files.svg (renamed from vcl/osx/res/cursors/movef2.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/move_point.svg (renamed from vcl/osx/res/cursors/movept.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/neswsize.svg (renamed from vcl/osx/res/cursors/neswsize.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/not_allowed.svg (renamed from vcl/osx/res/cursors/notallow.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/null.svg (renamed from vcl/osx/res/cursors/nullptr.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/nwsesize.svg (renamed from vcl/osx/res/cursors/nwsesize.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/pen.svg (renamed from vcl/osx/res/cursors/pen.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/pivot_column.svg (renamed from vcl/osx/res/cursors/pivotcol.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/pivot_delete.svg (renamed from vcl/osx/res/cursors/pivotdel.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/pivot_field.svg (renamed from vcl/osx/res/cursors/pivotfld.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/pivot_row.svg (renamed from vcl/osx/res/cursors/pivotrow.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/rotate.svg (renamed from vcl/osx/res/cursors/rotate.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/show_whitespace.svg (renamed from vcl/osx/res/cursors/wsshow.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/tab_select_e.svg (renamed from vcl/osx/res/cursors/tblsele.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/tab_select_s.svg (renamed from vcl/osx/res/cursors/tblsels.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/tab_select_se.svg (renamed from vcl/osx/res/cursors/tblselse.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/tab_select_sw.svg (renamed from vcl/osx/res/cursors/tblselsw.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/tab_select_w.svg (renamed from vcl/osx/res/cursors/tblselw.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/text_vertical.svg (renamed from vcl/osx/res/cursors/vtext.svg)0
-rw-r--r--icon-themes/colibre/vcl/cursors/v_shear.svg (renamed from vcl/osx/res/cursors/vshear.svg)0
-rw-r--r--vcl/inc/bitmaps.hlst70
-rw-r--r--vcl/inc/unx/gtk/gtkdata.hxx1
-rw-r--r--vcl/inc/unx/gtk/gtkinst.hxx2
-rw-r--r--vcl/source/image/ImplImageTree.cxx58
-rw-r--r--vcl/unx/gtk3/gtk3gtkdata.cxx362
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx15
-rw-r--r--vcl/workben/vcldemo.cxx118
75 files changed, 469 insertions, 157 deletions
diff --git a/vcl/osx/res/cursors/ase.svg b/icon-themes/colibre/vcl/cursors/autoscroll_e.svg
index 721783ed8c52..721783ed8c52 100644
--- a/vcl/osx/res/cursors/ase.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_e.svg
diff --git a/vcl/osx/res/cursors/asn.svg b/icon-themes/colibre/vcl/cursors/autoscroll_n.svg
index 6e0cc273767c..6e0cc273767c 100644
--- a/vcl/osx/res/cursors/asn.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_n.svg
diff --git a/vcl/osx/res/cursors/asne.svg b/icon-themes/colibre/vcl/cursors/autoscroll_ne.svg
index 1568d32c9790..1568d32c9790 100644
--- a/vcl/osx/res/cursors/asne.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_ne.svg
diff --git a/vcl/osx/res/cursors/asns.svg b/icon-themes/colibre/vcl/cursors/autoscroll_ns.svg
index 92385d729a02..92385d729a02 100644
--- a/vcl/osx/res/cursors/asns.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_ns.svg
diff --git a/vcl/osx/res/cursors/asnswe.svg b/icon-themes/colibre/vcl/cursors/autoscroll_nswe.svg
index 3e7f3260872a..3e7f3260872a 100644
--- a/vcl/osx/res/cursors/asnswe.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_nswe.svg
diff --git a/vcl/osx/res/cursors/asnw.svg b/icon-themes/colibre/vcl/cursors/autoscroll_nw.svg
index 8a635d2cf28b..8a635d2cf28b 100644
--- a/vcl/osx/res/cursors/asnw.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_nw.svg
diff --git a/vcl/osx/res/cursors/ass.svg b/icon-themes/colibre/vcl/cursors/autoscroll_s.svg
index 0652dc98c9e9..0652dc98c9e9 100644
--- a/vcl/osx/res/cursors/ass.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_s.svg
diff --git a/vcl/osx/res/cursors/asse.svg b/icon-themes/colibre/vcl/cursors/autoscroll_se.svg
index beb02ae52a4e..beb02ae52a4e 100644
--- a/vcl/osx/res/cursors/asse.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_se.svg
diff --git a/vcl/osx/res/cursors/assw.svg b/icon-themes/colibre/vcl/cursors/autoscroll_sw.svg
index 104b6c545277..104b6c545277 100644
--- a/vcl/osx/res/cursors/assw.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_sw.svg
diff --git a/vcl/osx/res/cursors/asw.svg b/icon-themes/colibre/vcl/cursors/autoscroll_w.svg
index 46c33fd381b9..46c33fd381b9 100644
--- a/vcl/osx/res/cursors/asw.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_w.svg
diff --git a/vcl/osx/res/cursors/aswe.svg b/icon-themes/colibre/vcl/cursors/autoscroll_we.svg
index 8b0b5795d885..8b0b5795d885 100644
--- a/vcl/osx/res/cursors/aswe.svg
+++ b/icon-themes/colibre/vcl/cursors/autoscroll_we.svg
diff --git a/vcl/osx/res/cursors/chain.svg b/icon-themes/colibre/vcl/cursors/chain.svg
index c47870a868af..c47870a868af 100644
--- a/vcl/osx/res/cursors/chain.svg
+++ b/icon-themes/colibre/vcl/cursors/chain.svg
diff --git a/vcl/osx/res/cursors/chainnot.svg b/icon-themes/colibre/vcl/cursors/chain_not_allowed.svg
index c7b1e7e855f6..c7b1e7e855f6 100644
--- a/vcl/osx/res/cursors/chainnot.svg
+++ b/icon-themes/colibre/vcl/cursors/chain_not_allowed.svg
diff --git a/vcl/osx/res/cursors/chart.svg b/icon-themes/colibre/vcl/cursors/chart.svg
index 8570ee9c322c..8570ee9c322c 100644
--- a/vcl/osx/res/cursors/chart.svg
+++ b/icon-themes/colibre/vcl/cursors/chart.svg
diff --git a/vcl/osx/res/cursors/copydata.svg b/icon-themes/colibre/vcl/cursors/copy_data.svg
index d90cac89e9d3..d90cac89e9d3 100644
--- a/vcl/osx/res/cursors/copydata.svg
+++ b/icon-themes/colibre/vcl/cursors/copy_data.svg
diff --git a/vcl/osx/res/cursors/copydlnk.svg b/icon-themes/colibre/vcl/cursors/copy_data_link.svg
index f28ec7d6c7fc..f28ec7d6c7fc 100644
--- a/vcl/osx/res/cursors/copydlnk.svg
+++ b/icon-themes/colibre/vcl/cursors/copy_data_link.svg
diff --git a/vcl/osx/res/cursors/copyf.svg b/icon-themes/colibre/vcl/cursors/copy_file.svg
index 8f8fc167e98b..8f8fc167e98b 100644
--- a/vcl/osx/res/cursors/copyf.svg
+++ b/icon-themes/colibre/vcl/cursors/copy_file.svg
diff --git a/vcl/osx/res/cursors/copyflnk.svg b/icon-themes/colibre/vcl/cursors/copy_file_link.svg
index aaadfd84bb14..aaadfd84bb14 100644
--- a/vcl/osx/res/cursors/copyflnk.svg
+++ b/icon-themes/colibre/vcl/cursors/copy_file_link.svg
diff --git a/vcl/osx/res/cursors/copyf2.svg b/icon-themes/colibre/vcl/cursors/copy_files.svg
index 78db651fcc68..78db651fcc68 100644
--- a/vcl/osx/res/cursors/copyf2.svg
+++ b/icon-themes/colibre/vcl/cursors/copy_files.svg
diff --git a/vcl/osx/res/cursors/crook.svg b/icon-themes/colibre/vcl/cursors/crook.svg
index b60fe154e113..b60fe154e113 100644
--- a/vcl/osx/res/cursors/crook.svg
+++ b/icon-themes/colibre/vcl/cursors/crook.svg
diff --git a/vcl/osx/res/cursors/crop.svg b/icon-themes/colibre/vcl/cursors/crop.svg
index bf3745173212..bf3745173212 100644
--- a/vcl/osx/res/cursors/crop.svg
+++ b/icon-themes/colibre/vcl/cursors/crop.svg
diff --git a/vcl/osx/res/cursors/detectiv.svg b/icon-themes/colibre/vcl/cursors/detective.svg
index cbd8353989f6..cbd8353989f6 100644
--- a/vcl/osx/res/cursors/detectiv.svg
+++ b/icon-themes/colibre/vcl/cursors/detective.svg
diff --git a/vcl/osx/res/cursors/darc.svg b/icon-themes/colibre/vcl/cursors/draw_arc.svg
index c341b8cca870..c341b8cca870 100644
--- a/vcl/osx/res/cursors/darc.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_arc.svg
diff --git a/vcl/osx/res/cursors/dbezier.svg b/icon-themes/colibre/vcl/cursors/draw_bezier.svg
index 36b433329409..36b433329409 100644
--- a/vcl/osx/res/cursors/dbezier.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_bezier.svg
diff --git a/vcl/osx/res/cursors/dcapt.svg b/icon-themes/colibre/vcl/cursors/draw_caption.svg
index 60bc92aea4ed..60bc92aea4ed 100644
--- a/vcl/osx/res/cursors/dcapt.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_caption.svg
diff --git a/vcl/osx/res/cursors/dcirccut.svg b/icon-themes/colibre/vcl/cursors/draw_circle_cut.svg
index 2d27755c9dc7..2d27755c9dc7 100644
--- a/vcl/osx/res/cursors/dcirccut.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_circle_cut.svg
diff --git a/vcl/osx/res/cursors/dconnect.svg b/icon-themes/colibre/vcl/cursors/draw_connect.svg
index 7b44fd1adc93..7b44fd1adc93 100644
--- a/vcl/osx/res/cursors/dconnect.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_connect.svg
diff --git a/vcl/osx/res/cursors/dellipse.svg b/icon-themes/colibre/vcl/cursors/draw_ellipse.svg
index db24649cf1b6..db24649cf1b6 100644
--- a/vcl/osx/res/cursors/dellipse.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_ellipse.svg
diff --git a/vcl/osx/res/cursors/dfree.svg b/icon-themes/colibre/vcl/cursors/draw_freehand.svg
index 28096c236bd5..28096c236bd5 100644
--- a/vcl/osx/res/cursors/dfree.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_freehand.svg
diff --git a/vcl/osx/res/cursors/dline.svg b/icon-themes/colibre/vcl/cursors/draw_line.svg
index 15176fb2dca3..15176fb2dca3 100644
--- a/vcl/osx/res/cursors/dline.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_line.svg
diff --git a/vcl/osx/res/cursors/dpie.svg b/icon-themes/colibre/vcl/cursors/draw_pie.svg
index 4ed1fb3d420c..4ed1fb3d420c 100644
--- a/vcl/osx/res/cursors/dpie.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_pie.svg
diff --git a/vcl/osx/res/cursors/dpolygon.svg b/icon-themes/colibre/vcl/cursors/draw_polygon.svg
index 87fd7083b055..87fd7083b055 100644
--- a/vcl/osx/res/cursors/dpolygon.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_polygon.svg
diff --git a/vcl/osx/res/cursors/drect.svg b/icon-themes/colibre/vcl/cursors/draw_rect.svg
index 07e6ee10ec2c..07e6ee10ec2c 100644
--- a/vcl/osx/res/cursors/drect.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_rect.svg
diff --git a/vcl/osx/res/cursors/dtext.svg b/icon-themes/colibre/vcl/cursors/draw_text.svg
index 3df47f26f552..3df47f26f552 100644
--- a/vcl/osx/res/cursors/dtext.svg
+++ b/icon-themes/colibre/vcl/cursors/draw_text.svg
diff --git a/vcl/osx/res/cursors/fill.svg b/icon-themes/colibre/vcl/cursors/fill.svg
index 4babee32a871..4babee32a871 100644
--- a/vcl/osx/res/cursors/fill.svg
+++ b/icon-themes/colibre/vcl/cursors/fill.svg
diff --git a/vcl/osx/res/cursors/hshear.svg b/icon-themes/colibre/vcl/cursors/h_shear.svg
index d148deb09298..d148deb09298 100644
--- a/vcl/osx/res/cursors/hshear.svg
+++ b/icon-themes/colibre/vcl/cursors/h_shear.svg
diff --git a/vcl/osx/res/cursors/help.svg b/icon-themes/colibre/vcl/cursors/help.svg
index 488a6ec1a09a..488a6ec1a09a 100644
--- a/vcl/osx/res/cursors/help.svg
+++ b/icon-themes/colibre/vcl/cursors/help.svg
diff --git a/vcl/osx/res/cursors/wshide.svg b/icon-themes/colibre/vcl/cursors/hide_whitespace.svg
index 0986740f69dc..0986740f69dc 100644
--- a/vcl/osx/res/cursors/wshide.svg
+++ b/icon-themes/colibre/vcl/cursors/hide_whitespace.svg
diff --git a/vcl/osx/res/cursors/hourglass.svg b/icon-themes/colibre/vcl/cursors/hourglass.svg
index e74f850f23de..e74f850f23de 100644
--- a/vcl/osx/res/cursors/hourglass.svg
+++ b/icon-themes/colibre/vcl/cursors/hourglass.svg
diff --git a/vcl/osx/res/cursors/linkdata.svg b/icon-themes/colibre/vcl/cursors/link_data.svg
index 9309564bdb36..9309564bdb36 100644
--- a/vcl/osx/res/cursors/linkdata.svg
+++ b/icon-themes/colibre/vcl/cursors/link_data.svg
diff --git a/vcl/osx/res/cursors/linkf.svg b/icon-themes/colibre/vcl/cursors/link_file.svg
index 28b1eb33f839..28b1eb33f839 100644
--- a/vcl/osx/res/cursors/linkf.svg
+++ b/icon-themes/colibre/vcl/cursors/link_file.svg
diff --git a/vcl/osx/res/cursors/magnify.svg b/icon-themes/colibre/vcl/cursors/magnify.svg
index 7b43ee8434a7..7b43ee8434a7 100644
--- a/vcl/osx/res/cursors/magnify.svg
+++ b/icon-themes/colibre/vcl/cursors/magnify.svg
diff --git a/vcl/osx/res/cursors/mirror.svg b/icon-themes/colibre/vcl/cursors/mirror.svg
index 3de27a167440..3de27a167440 100644
--- a/vcl/osx/res/cursors/mirror.svg
+++ b/icon-themes/colibre/vcl/cursors/mirror.svg
diff --git a/vcl/osx/res/cursors/movebw.svg b/icon-themes/colibre/vcl/cursors/move_bezier_weight.svg
index c0c5d5a91c8f..c0c5d5a91c8f 100644
--- a/vcl/osx/res/cursors/movebw.svg
+++ b/icon-themes/colibre/vcl/cursors/move_bezier_weight.svg
diff --git a/vcl/osx/res/cursors/movedata.svg b/icon-themes/colibre/vcl/cursors/move_data.svg
index c74fd69ab3ae..c74fd69ab3ae 100644
--- a/vcl/osx/res/cursors/movedata.svg
+++ b/icon-themes/colibre/vcl/cursors/move_data.svg
diff --git a/vcl/osx/res/cursors/movedlnk.svg b/icon-themes/colibre/vcl/cursors/move_data_link.svg
index 5b29e322fdbc..5b29e322fdbc 100644
--- a/vcl/osx/res/cursors/movedlnk.svg
+++ b/icon-themes/colibre/vcl/cursors/move_data_link.svg
diff --git a/vcl/osx/res/cursors/movef.svg b/icon-themes/colibre/vcl/cursors/move_file.svg
index 9672a5f2108f..9672a5f2108f 100644
--- a/vcl/osx/res/cursors/movef.svg
+++ b/icon-themes/colibre/vcl/cursors/move_file.svg
diff --git a/vcl/osx/res/cursors/moveflnk.svg b/icon-themes/colibre/vcl/cursors/move_file_link.svg
index 52f0ab1ee52f..52f0ab1ee52f 100644
--- a/vcl/osx/res/cursors/moveflnk.svg
+++ b/icon-themes/colibre/vcl/cursors/move_file_link.svg
diff --git a/vcl/osx/res/cursors/movef2.svg b/icon-themes/colibre/vcl/cursors/move_files.svg
index f00c6a8c5f2b..f00c6a8c5f2b 100644
--- a/vcl/osx/res/cursors/movef2.svg
+++ b/icon-themes/colibre/vcl/cursors/move_files.svg
diff --git a/vcl/osx/res/cursors/movept.svg b/icon-themes/colibre/vcl/cursors/move_point.svg
index 723f7ae9a0e7..723f7ae9a0e7 100644
--- a/vcl/osx/res/cursors/movept.svg
+++ b/icon-themes/colibre/vcl/cursors/move_point.svg
diff --git a/vcl/osx/res/cursors/neswsize.svg b/icon-themes/colibre/vcl/cursors/neswsize.svg
index 81f8ce3de3b9..81f8ce3de3b9 100644
--- a/vcl/osx/res/cursors/neswsize.svg
+++ b/icon-themes/colibre/vcl/cursors/neswsize.svg
diff --git a/vcl/osx/res/cursors/notallow.svg b/icon-themes/colibre/vcl/cursors/not_allowed.svg
index 25c573b04498..25c573b04498 100644
--- a/vcl/osx/res/cursors/notallow.svg
+++ b/icon-themes/colibre/vcl/cursors/not_allowed.svg
diff --git a/vcl/osx/res/cursors/nullptr.svg b/icon-themes/colibre/vcl/cursors/null.svg
index 2fe3c5a10a45..2fe3c5a10a45 100644
--- a/vcl/osx/res/cursors/nullptr.svg
+++ b/icon-themes/colibre/vcl/cursors/null.svg
diff --git a/vcl/osx/res/cursors/nwsesize.svg b/icon-themes/colibre/vcl/cursors/nwsesize.svg
index 1ce4d03dd2a5..1ce4d03dd2a5 100644
--- a/vcl/osx/res/cursors/nwsesize.svg
+++ b/icon-themes/colibre/vcl/cursors/nwsesize.svg
diff --git a/vcl/osx/res/cursors/pen.svg b/icon-themes/colibre/vcl/cursors/pen.svg
index e93e66fdcc4e..e93e66fdcc4e 100644
--- a/vcl/osx/res/cursors/pen.svg
+++ b/icon-themes/colibre/vcl/cursors/pen.svg
diff --git a/vcl/osx/res/cursors/pivotcol.svg b/icon-themes/colibre/vcl/cursors/pivot_column.svg
index 075f2dd7a12b..075f2dd7a12b 100644
--- a/vcl/osx/res/cursors/pivotcol.svg
+++ b/icon-themes/colibre/vcl/cursors/pivot_column.svg
diff --git a/vcl/osx/res/cursors/pivotdel.svg b/icon-themes/colibre/vcl/cursors/pivot_delete.svg
index edab4cfdaf84..edab4cfdaf84 100644
--- a/vcl/osx/res/cursors/pivotdel.svg
+++ b/icon-themes/colibre/vcl/cursors/pivot_delete.svg
diff --git a/vcl/osx/res/cursors/pivotfld.svg b/icon-themes/colibre/vcl/cursors/pivot_field.svg
index f0ea0d0a2205..f0ea0d0a2205 100644
--- a/vcl/osx/res/cursors/pivotfld.svg
+++ b/icon-themes/colibre/vcl/cursors/pivot_field.svg
diff --git a/vcl/osx/res/cursors/pivotrow.svg b/icon-themes/colibre/vcl/cursors/pivot_row.svg
index 15c59e04f3f5..15c59e04f3f5 100644
--- a/vcl/osx/res/cursors/pivotrow.svg
+++ b/icon-themes/colibre/vcl/cursors/pivot_row.svg
diff --git a/vcl/osx/res/cursors/rotate.svg b/icon-themes/colibre/vcl/cursors/rotate.svg
index 0cca73e7d472..0cca73e7d472 100644
--- a/vcl/osx/res/cursors/rotate.svg
+++ b/icon-themes/colibre/vcl/cursors/rotate.svg
diff --git a/vcl/osx/res/cursors/wsshow.svg b/icon-themes/colibre/vcl/cursors/show_whitespace.svg
index cbb18cf07f14..cbb18cf07f14 100644
--- a/vcl/osx/res/cursors/wsshow.svg
+++ b/icon-themes/colibre/vcl/cursors/show_whitespace.svg
diff --git a/vcl/osx/res/cursors/tblsele.svg b/icon-themes/colibre/vcl/cursors/tab_select_e.svg
index da21cf39eb48..da21cf39eb48 100644
--- a/vcl/osx/res/cursors/tblsele.svg
+++ b/icon-themes/colibre/vcl/cursors/tab_select_e.svg
diff --git a/vcl/osx/res/cursors/tblsels.svg b/icon-themes/colibre/vcl/cursors/tab_select_s.svg
index be4f27ad8386..be4f27ad8386 100644
--- a/vcl/osx/res/cursors/tblsels.svg
+++ b/icon-themes/colibre/vcl/cursors/tab_select_s.svg
diff --git a/vcl/osx/res/cursors/tblselse.svg b/icon-themes/colibre/vcl/cursors/tab_select_se.svg
index fa26e95d6eb6..fa26e95d6eb6 100644
--- a/vcl/osx/res/cursors/tblselse.svg
+++ b/icon-themes/colibre/vcl/cursors/tab_select_se.svg
diff --git a/vcl/osx/res/cursors/tblselsw.svg b/icon-themes/colibre/vcl/cursors/tab_select_sw.svg
index 683a3d8d8fb4..683a3d8d8fb4 100644
--- a/vcl/osx/res/cursors/tblselsw.svg
+++ b/icon-themes/colibre/vcl/cursors/tab_select_sw.svg
diff --git a/vcl/osx/res/cursors/tblselw.svg b/icon-themes/colibre/vcl/cursors/tab_select_w.svg
index 43ceb200154e..43ceb200154e 100644
--- a/vcl/osx/res/cursors/tblselw.svg
+++ b/icon-themes/colibre/vcl/cursors/tab_select_w.svg
diff --git a/vcl/osx/res/cursors/vtext.svg b/icon-themes/colibre/vcl/cursors/text_vertical.svg
index bfe88201b2a0..bfe88201b2a0 100644
--- a/vcl/osx/res/cursors/vtext.svg
+++ b/icon-themes/colibre/vcl/cursors/text_vertical.svg
diff --git a/vcl/osx/res/cursors/vshear.svg b/icon-themes/colibre/vcl/cursors/v_shear.svg
index 5fbb977d71f3..5fbb977d71f3 100644
--- a/vcl/osx/res/cursors/vshear.svg
+++ b/icon-themes/colibre/vcl/cursors/v_shear.svg
diff --git a/vcl/inc/bitmaps.hlst b/vcl/inc/bitmaps.hlst
index a45f8019b69f..eea1ea30786e 100644
--- a/vcl/inc/bitmaps.hlst
+++ b/vcl/inc/bitmaps.hlst
@@ -146,6 +146,76 @@
#define RID_BMP_TREENODE_COLLAPSED "res/plus.png"
#define RID_BMP_TREENODE_EXPANDED "res/minus.png"
+
+#define RID_CURSOR_AUTOSCROLL_E "vcl/cursors/autoscroll_e.png"
+#define RID_CURSOR_AUTOSCROLL_N "vcl/cursors/autoscroll_n.png"
+#define RID_CURSOR_AUTOSCROLL_NE "vcl/cursors/autoscroll_ne.png"
+#define RID_CURSOR_AUTOSCROLL_NS "vcl/cursors/autoscroll_ns.png"
+#define RID_CURSOR_AUTOSCROLL_NSWE "vcl/cursors/autoscroll_nswe.png"
+#define RID_CURSOR_AUTOSCROLL_NW "vcl/cursors/autoscroll_nw.png"
+#define RID_CURSOR_AUTOSCROLL_S "vcl/cursors/autoscroll_s.png"
+#define RID_CURSOR_AUTOSCROLL_SE "vcl/cursors/autoscroll_se.png"
+#define RID_CURSOR_AUTOSCROLL_SW "vcl/cursors/autoscroll_sw.png"
+#define RID_CURSOR_AUTOSCROLL_W "vcl/cursors/autoscroll_w.png"
+#define RID_CURSOR_AUTOSCROLL_WE "vcl/cursors/autoscroll_we.png"
+#define RID_CURSOR_CHAIN "vcl/cursors/chain.png"
+#define RID_CURSOR_CHAIN_NOT_ALLOWED "vcl/cursors/chain_not_allowed.png"
+#define RID_CURSOR_CHART "vcl/cursors/chart.png"
+#define RID_CURSOR_COPY_DATA "vcl/cursors/copy_data.png"
+#define RID_CURSOR_COPY_DATA_LINK "vcl/cursors/copy_data_link.png"
+#define RID_CURSOR_COPY_FILE "vcl/cursors/copy_file.png"
+#define RID_CURSOR_COPY_FILES "vcl/cursors/copy_files.png"
+#define RID_CURSOR_COPY_FILE_LINK "vcl/cursors/copy_file_link.png"
+#define RID_CURSOR_CROOK "vcl/cursors/crook.png"
+#define RID_CURSOR_CROP "vcl/cursors/crop.png"
+#define RID_CURSOR_DRAW_ARC "vcl/cursors/draw_arc.png"
+#define RID_CURSOR_DRAW_BEZIER "vcl/cursors/draw_bezier.png"
+#define RID_CURSOR_DRAW_CAPTION "vcl/cursors/draw_caption.png"
+#define RID_CURSOR_DRAW_CIRCLE_CUT "vcl/cursors/draw_circle_cut.png"
+#define RID_CURSOR_DRAW_CONNECT "vcl/cursors/draw_connect.png"
+#define RID_CURSOR_DRAW_ELLIPSE "vcl/cursors/draw_ellipse.png"
+#define RID_CURSOR_DETECTIVE "vcl/cursors/detective.png"
+#define RID_CURSOR_DRAW_FREEHAND "vcl/cursors/draw_freehand.png"
+#define RID_CURSOR_DRAW_LINE "vcl/cursors/draw_line.png"
+#define RID_CURSOR_DRAW_PIE "vcl/cursors/draw_pie.png"
+#define RID_CURSOR_DRAW_POLYGON "vcl/cursors/draw_polygon.png"
+#define RID_CURSOR_DRAW_RECT "vcl/cursors/draw_rect.png"
+#define RID_CURSOR_DRAW_TEXT "vcl/cursors/draw_text.png"
+#define RID_CURSOR_FILL "vcl/cursors/fill.png"
+#define RID_CURSOR_HELP "vcl/cursors/help.png"
+#define RID_CURSOR_HOURGLASS "vcl/cursors/hourglass.png"
+#define RID_CURSOR_H_SHEAR "vcl/cursors/h_shear.png"
+#define RID_CURSOR_LINK_DATA "vcl/cursors/link_data.png"
+#define RID_CURSOR_LINK_FILE "vcl/cursors/link_file.png"
+#define RID_CURSOR_MAGNIFY "vcl/cursors/magnify.png"
+#define RID_CURSOR_MIRROR "vcl/cursors/mirror.png"
+#define RID_CURSOR_MOVE_BEZIER_WEIGHT "vcl/cursors/move_bezier_weight.png"
+#define RID_CURSOR_MOVE_DATA "vcl/cursors/move_data.png"
+#define RID_CURSOR_MOVE_DATA_LINK "vcl/cursors/move_data_link.png"
+#define RID_CURSOR_MOVE_FILE "vcl/cursors/move_file.png"
+#define RID_CURSOR_MOVE_FILES "vcl/cursors/move_files.png"
+#define RID_CURSOR_MOVE_FILE_LINK "vcl/cursors/move_file_link.png"
+#define RID_CURSOR_MOVE_POINT "vcl/cursors/move_point.png"
+#define RID_CURSOR_NESWSIZE "vcl/cursors/neswsize.png"
+#define RID_CURSOR_NOT_ALLOWED "vcl/cursors/not_allowed.png"
+#define RID_CURSOR_NULL "vcl/cursors/null.png"
+#define RID_CURSOR_NWSESIZE "vcl/cursors/nwsesize.png"
+#define RID_CURSOR_PEN "vcl/cursors/pen.png"
+#define RID_CURSOR_PIVOT_COLUMN "vcl/cursors/pivot_column.png"
+#define RID_CURSOR_PIVOT_DELETE "vcl/cursors/pivot_delete.png"
+#define RID_CURSOR_PIVOT_FIELD "vcl/cursors/pivot_field.png"
+#define RID_CURSOR_PIVOT_ROW "vcl/cursors/pivot_row.png"
+#define RID_CURSOR_ROTATE "vcl/cursors/rotate.png"
+#define RID_CURSOR_TAB_SELECT_E "vcl/cursors/tab_select_e.png"
+#define RID_CURSOR_TAB_SELECT_S "vcl/cursors/tab_select_s.png"
+#define RID_CURSOR_TAB_SELECT_SE "vcl/cursors/tab_select_se.png"
+#define RID_CURSOR_TAB_SELECT_SW "vcl/cursors/tab_select_sw.png"
+#define RID_CURSOR_TAB_SELECT_W "vcl/cursors/tab_select_w.png"
+#define RID_CURSOR_V_SHEAR "vcl/cursors/v_shear.png"
+#define RID_CURSOR_TEXT_VERTICAL "vcl/cursors/text_vertical.png"
+#define RID_CURSOR_HIDE_WHITESPACE "vcl/cursors/hide_whitespace.png"
+#define RID_CURSOR_SHOW_WHITESPACE "vcl/cursors/show_whitespace.png"
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index fc226a0a00d5..d71fb3d04aac 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -146,6 +146,7 @@ class GtkSalDisplay : public SalDisplay
GdkCursor* getFromXBM( const unsigned char *pBitmap, const unsigned char *pMask,
int nWidth, int nHeight, int nXHot, int nYHot );
+ GdkCursor* getFromSvg( OUString const & name, int nXHot, int nYHot );
public:
GtkSalDisplay( GdkDisplay* pDisplay );
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index a0c54523fdf6..83e56184ddb1 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -373,6 +373,8 @@ public:
}
};
+GdkPixbuf* load_icon_by_name(const OUString& rIconName);
+
#endif // INCLUDED_VCL_INC_UNX_GTK_GTKINST_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index 9b9cfab2fc16..075408df88c8 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -29,12 +29,15 @@
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/implbase.hxx>
#include <osl/file.hxx>
#include <osl/diagnose.h>
+#include <osl/process.h>
#include <rtl/bootstrap.hxx>
#include <rtl/uri.hxx>
@@ -443,6 +446,16 @@ void ImplImageTree::setStyle(OUString const & style)
}
}
+/**
+ * The vcldemo app doesn't set up all the config stuff that the main app does, so we need another
+ * way of finding the cursor images.
+ */
+static bool isVclDemo()
+{
+ static const bool bVclDemoOverride = std::getenv("LIBO_VCL_DEMO") != nullptr;
+ return bVclDemoOverride;
+}
+
void ImplImageTree::createStyle()
{
if (maIconSets.find(maCurrentStyle) != maIconSets.end())
@@ -450,7 +463,18 @@ void ImplImageTree::createStyle()
OUString sThemeUrl;
- if (maCurrentStyle != "default")
+ if (isVclDemo())
+ {
+ static OUString s_workingDir;
+ if (!s_workingDir.getLength())
+ osl_getProcessWorkingDir( &s_workingDir.pData );
+
+ if (maCurrentStyle == "default")
+ sThemeUrl = s_workingDir + "/icon-themes/colibre-svg";
+ else
+ sThemeUrl = s_workingDir + "/icon-themes/" + maCurrentStyle;
+ }
+ else if (maCurrentStyle != "default")
{
OUString paths = vcl::IconThemeScanner::GetStandardIconThemePath();
std::deque<OUString> aPaths;
@@ -614,6 +638,33 @@ OUString const & ImplImageTree::getRealImageName(OUString const & rIconName)
return rIconName;
}
+class FolderFileAccess : public ::cppu::WeakImplHelper<css::container::XNameAccess>
+{
+public:
+ uno::Reference< uno::XComponentContext > mxContext;
+ OUString maURL;
+ FolderFileAccess(uno::Reference< uno::XComponentContext > const & context, OUString const & url)
+ : mxContext(context), maURL(url) {}
+ // XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType() override { return cppu::UnoType<io::XInputStream>::get(); }
+ virtual sal_Bool SAL_CALL hasElements() override { return true; }
+ // XNameAccess
+ virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override
+ {
+ uno::Reference< io::XInputStream > xInputStream = ucb::SimpleFileAccess::create(mxContext)->openFileRead( maURL + "/" + aName );
+ return css::uno::Any(xInputStream);
+ }
+ virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
+ {
+ return {};
+ }
+ virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override
+ {
+ osl::File aBaseFile(maURL + "/" + aName);
+ return osl::File::E_None == aBaseFile.open(osl_File_OpenFlag_Read);
+ }
+};
+
bool ImplImageTree::checkPathAccess()
{
IconSet& rIconSet = getCurrentIconSet();
@@ -623,7 +674,10 @@ bool ImplImageTree::checkPathAccess()
try
{
- rNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getProcessComponentContext(), rIconSet.maURL);
+ if (isVclDemo())
+ rNameAccess = new FolderFileAccess(comphelper::getProcessComponentContext(), rIconSet.maURL);
+ else
+ rNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getProcessComponentContext(), rIconSet.maURL);
}
catch (const uno::RuntimeException &)
{
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index c17303585f6a..40aee7217ea7 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -37,6 +37,7 @@
#include <unx/gtk/gtksalmenu.hxx>
#include <unx/salobj.h>
#include <unx/geninst.h>
+#include <bitmaps.hlst>
#include <osl/thread.h>
#include <osl/process.h>
@@ -44,9 +45,8 @@
#include <unx/i18n_xkb.hxx>
#include <unx/wmadaptor.hxx>
-#include <unx/x11_cursors/salcursors.h>
-
#include <vcl/svapp.hxx>
+#include <vcl/BitmapTools.hxx>
#include <sal/log.hxx>
#ifdef GDK_WINDOWING_X11
@@ -56,6 +56,138 @@
#include <cppuhelper/exc_hlp.hxx>
#include <chrono>
+
+#define nodrop_curs_x_hot 9
+#define nodrop_curs_y_hot 9
+#define magnify_curs_x_hot 12
+#define magnify_curs_y_hot 13
+#define rotate_curs_x_hot 15
+#define rotate_curs_y_hot 15
+#define hshear_curs_x_hot 15
+#define hshear_curs_y_hot 15
+#define vshear_curs_x_hot 15
+#define vshear_curs_y_hot 15
+#define drawline_curs_x_hot 7
+#define drawline_curs_y_hot 7
+#define drawrect_curs_x_hot 7
+#define drawrect_curs_y_hot 7
+#define drawpolygon_curs_x_hot 7
+#define drawpolygon_curs_y_hot 7
+#define drawbezier_curs_x_hot 7
+#define drawbezier_curs_y_hot 7
+#define drawarc_curs_x_hot 7
+#define drawarc_curs_y_hot 7
+#define drawpie_curs_x_hot 7
+#define drawpie_curs_y_hot 7
+#define drawcirclecut_curs_x_hot 7
+#define drawcirclecut_curs_y_hot 7
+#define drawellipse_curs_x_hot 7
+#define drawellipse_curs_y_hot 7
+#define drawconnect_curs_x_hot 7
+#define drawconnect_curs_y_hot 7
+#define drawtext_curs_x_hot 8
+#define drawtext_curs_y_hot 8
+#define mirror_curs_x_hot 14
+#define mirror_curs_y_hot 12
+#define crook_curs_x_hot 15
+#define crook_curs_y_hot 14
+#define crop_curs_x_hot 9
+#define crop_curs_y_hot 9
+#define movepoint_curs_x_hot 0
+#define movepoint_curs_y_hot 0
+#define movebezierweight_curs_x_hot 0
+#define movebezierweight_curs_y_hot 0
+#define drawfreehand_curs_x_hot 8
+#define drawfreehand_curs_y_hot 8
+#define drawcaption_curs_x_hot 8
+#define drawcaption_curs_y_hot 8
+#define movedata_curs_x_hot 1
+#define movedata_curs_y_hot 1
+#define copydata_curs_x_hot 1
+#define copydata_curs_y_hot 1
+#define linkdata_curs_x_hot 1
+#define linkdata_curs_y_hot 1
+#define movedlnk_curs_x_hot 1
+#define movedlnk_curs_y_hot 1
+#define copydlnk_curs_x_hot 1
+#define copydlnk_curs_y_hot 1
+#define movefile_curs_x_hot 9
+#define movefile_curs_y_hot 9
+#define copyfile_curs_x_hot 9
+#define copyfile_curs_y_hot 9
+#define linkfile_curs_x_hot 9
+#define linkfile_curs_y_hot 9
+#define moveflnk_curs_x_hot 9
+#define moveflnk_curs_y_hot 9
+#define copyflnk_curs_x_hot 9
+#define copyflnk_curs_y_hot 9
+#define movefiles_curs_x_hot 8
+#define movefiles_curs_y_hot 9
+#define copyfiles_curs_x_hot 8
+#define copyfiles_curs_y_hot 9
+
+#define chart_curs_x_hot 15
+#define chart_curs_y_hot 16
+#define detective_curs_x_hot 12
+#define detective_curs_y_hot 13
+#define pivotcol_curs_x_hot 7
+#define pivotcol_curs_y_hot 5
+#define pivotfld_curs_x_hot 8
+#define pivotfld_curs_y_hot 7
+#define pivotrow_curs_x_hot 8
+#define pivotrow_curs_y_hot 7
+#define pivotdel_curs_x_hot 9
+#define pivotdel_curs_y_hot 8
+
+#define chain_curs_x_hot 0
+#define chain_curs_y_hot 2
+#define chainnot_curs_x_hot 2
+#define chainnot_curs_y_hot 2
+
+#define ase_curs_x_hot 19
+#define ase_curs_y_hot 16
+#define asn_curs_x_hot 16
+#define asn_curs_y_hot 12
+#define asne_curs_x_hot 21
+#define asne_curs_y_hot 10
+#define asns_curs_x_hot 15
+#define asns_curs_y_hot 15
+#define asnswe_curs_x_hot 15
+#define asnswe_curs_y_hot 15
+#define asnw_curs_x_hot 10
+#define asnw_curs_y_hot 10
+#define ass_curs_x_hot 15
+#define ass_curs_y_hot 19
+#define asse_curs_x_hot 21
+#define asse_curs_y_hot 21
+#define assw_curs_x_hot 10
+#define assw_curs_y_hot 21
+#define asw_curs_x_hot 12
+#define asw_curs_y_hot 15
+#define aswe_curs_x_hot 15
+#define aswe_curs_y_hot 15
+#define nullcurs_x_hot 2
+#define nullcurs_y_hot 2
+
+#define fill_curs_x_hot 10
+#define fill_curs_y_hot 22
+#define vertcurs_curs_x_hot 8
+#define vertcurs_curs_y_hot 8
+#define tblsele_curs_x_hot 14
+#define tblsele_curs_y_hot 8
+#define tblsels_curs_x_hot 7
+#define tblsels_curs_y_hot 14
+#define tblselse_curs_x_hot 14
+#define tblselse_curs_y_hot 14
+#define tblselw_curs_x_hot 1
+#define tblselw_curs_y_hot 8
+#define tblselsw_curs_x_hot 1
+#define tblselsw_curs_y_hot 14
+#define hidewhitespace_curs_x_hot 0
+#define hidewhitespace_curs_y_hot 10
+#define showwhitespace_curs_x_hot 0
+#define showwhitespace_curs_y_hot 10
+
using namespace vcl_sal;
/***************************************************************
@@ -139,95 +271,27 @@ void GtkSalDisplay::monitorsChanged( GdkScreen const * pScreen )
emitDisplayChanged();
}
-namespace
+GdkCursor* GtkSalDisplay::getFromSvg(OUString const & name, int nXHot, int nYHot)
{
- //cairo annoyingly won't take raw xbm data unless it fits
- //the required cairo stride
- unsigned char* ensurePaddedForCairo(const unsigned char *pXBM,
- int nWidth, int nHeight, int nStride)
- {
- unsigned char *pPaddedXBM = const_cast<unsigned char*>(pXBM);
-
- int bytes_per_row = (nWidth + 7) / 8;
-
- if (nStride != bytes_per_row)
- {
- pPaddedXBM = new unsigned char[nStride * nHeight];
- for (int row = 0; row < nHeight; ++row)
- {
- memcpy(pPaddedXBM + (nStride * row),
- pXBM + (bytes_per_row * row), bytes_per_row);
- memset(pPaddedXBM + (nStride * row) + bytes_per_row,
- 0, nStride - bytes_per_row);
- }
- }
-
- return pPaddedXBM;
- }
+ guint nDefaultCursorSize = gdk_display_get_default_cursor_size( m_pGdkDisplay );
+ //BitmapEx aBitmapEx = vcl::bitmap::loadFromName(name, ImageLoadFlags::IgnoreScalingFactor);
+ GdkPixbuf* pPixBuf = load_icon_by_name(name);
+ if (!pPixBuf)
+ return nullptr;
+ GdkPixbuf* pScaledPixBuf = gdk_pixbuf_scale_simple(pPixBuf, nDefaultCursorSize, nDefaultCursorSize, GDK_INTERP_HYPER);
+ g_object_unref(pPixBuf);
+ GdkCursor* pCursor = gdk_cursor_new_from_pixbuf( m_pGdkDisplay, pScaledPixBuf, nXHot, nYHot);
+ return pCursor;
}
-GdkCursor* GtkSalDisplay::getFromXBM( const unsigned char *pBitmap,
- const unsigned char *pMask,
- int nWidth, int nHeight,
- int nXHot, int nYHot )
-{
- cairo_surface_t *source = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, nWidth, nHeight);
- cairo_t *cr = cairo_create(source);
- cairo_set_source_rgba(cr, 1, 1, 1, 1);
- cairo_paint(cr);
-
- const int cairo_stride = cairo_format_stride_for_width(CAIRO_FORMAT_A1, nWidth);
-
- unsigned char *pPaddedXBM = ensurePaddedForCairo(pBitmap, nWidth, nHeight, cairo_stride);
- cairo_surface_t *xbm = cairo_image_surface_create_for_data(
- pPaddedXBM,
- CAIRO_FORMAT_A1, nWidth, nHeight,
- cairo_stride);
- cairo_set_source_rgba(cr, 0, 0, 0, 1);
- cairo_mask_surface(cr, xbm, 0, 0);
- cairo_surface_destroy(xbm);
- cairo_destroy(cr);
-
- unsigned char *pPaddedMaskXBM = ensurePaddedForCairo(pMask, nWidth, nHeight, cairo_stride);
- cairo_surface_t *mask = cairo_image_surface_create_for_data(
- pPaddedMaskXBM,
- CAIRO_FORMAT_A1, nWidth, nHeight,
- cairo_stride);
-
- cairo_surface_t *s = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, nWidth, nHeight);
- cr = cairo_create(s);
- cairo_set_source_surface(cr, source, 0, 0);
- cairo_mask_surface(cr, mask, 0, 0);
- cairo_surface_destroy(mask);
- cairo_surface_destroy(source);
- cairo_destroy(cr);
-
- GdkCursor *cursor = gdk_cursor_new_from_surface(m_pGdkDisplay, s, nXHot, nYHot);
-
- cairo_surface_destroy(s);
-
- if (pPaddedMaskXBM != pMask)
- delete [] pPaddedMaskXBM;
-
- if (pPaddedXBM != pBitmap)
- delete [] pPaddedXBM;
-
- return cursor;
-}
-
-static unsigned char nullmask_bits[] = { 0x00, 0x00, 0x00, 0x00 };
-static unsigned char nullcurs_bits[] = { 0x00, 0x00, 0x00, 0x00 };
-
-#define MAKE_CURSOR( vcl_name, name ) \
+#define MAKE_CURSOR( vcl_name, name, name2 ) \
case vcl_name: \
- pCursor = getFromXBM( name##curs##_bits, name##mask##_bits, \
- name##curs_width, name##curs_height, \
- name##curs_x_hot, name##curs_y_hot ); \
+ pCursor = getFromSvg(name2, name##curs_x_hot, name##curs_y_hot); \
break
#define MAP_BUILTIN( vcl_name, gdk_name ) \
- case vcl_name: \
- pCursor = gdk_cursor_new_for_display( m_pGdkDisplay, gdk_name ); \
- break
+ case vcl_name: \
+ pCursor = gdk_cursor_new_for_display( m_pGdkDisplay, gdk_name ); \
+ break
GdkCursor *GtkSalDisplay::getCursor( PointerStyle ePointerStyle )
{
@@ -275,72 +339,72 @@ GdkCursor *GtkSalDisplay::getCursor( PointerStyle ePointerStyle )
MAP_BUILTIN( PointerStyle::Move, GDK_FLEUR );
- MAKE_CURSOR( PointerStyle::Null, null );
- MAKE_CURSOR( PointerStyle::Magnify, magnify_ );
- MAKE_CURSOR( PointerStyle::Fill, fill_ );
- MAKE_CURSOR( PointerStyle::MoveData, movedata_ );
- MAKE_CURSOR( PointerStyle::CopyData, copydata_ );
- MAKE_CURSOR( PointerStyle::MoveFile, movefile_ );
- MAKE_CURSOR( PointerStyle::CopyFile, copyfile_ );
- MAKE_CURSOR( PointerStyle::MoveFiles, movefiles_ );
- MAKE_CURSOR( PointerStyle::CopyFiles, copyfiles_ );
- MAKE_CURSOR( PointerStyle::NotAllowed, nodrop_ );
- MAKE_CURSOR( PointerStyle::Rotate, rotate_ );
- MAKE_CURSOR( PointerStyle::HShear, hshear_ );
- MAKE_CURSOR( PointerStyle::VShear, vshear_ );
- MAKE_CURSOR( PointerStyle::DrawLine, drawline_ );
- MAKE_CURSOR( PointerStyle::DrawRect, drawrect_ );
- MAKE_CURSOR( PointerStyle::DrawPolygon, drawpolygon_ );
- MAKE_CURSOR( PointerStyle::DrawBezier, drawbezier_ );
- MAKE_CURSOR( PointerStyle::DrawArc, drawarc_ );
- MAKE_CURSOR( PointerStyle::DrawPie, drawpie_ );
- MAKE_CURSOR( PointerStyle::DrawCircleCut, drawcirclecut_ );
- MAKE_CURSOR( PointerStyle::DrawEllipse, drawellipse_ );
- MAKE_CURSOR( PointerStyle::DrawConnect, drawconnect_ );
- MAKE_CURSOR( PointerStyle::DrawText, drawtext_ );
- MAKE_CURSOR( PointerStyle::Mirror, mirror_ );
- MAKE_CURSOR( PointerStyle::Crook, crook_ );
- MAKE_CURSOR( PointerStyle::Crop, crop_ );
- MAKE_CURSOR( PointerStyle::MovePoint, movepoint_ );
- MAKE_CURSOR( PointerStyle::MoveBezierWeight, movebezierweight_ );
- MAKE_CURSOR( PointerStyle::DrawFreehand, drawfreehand_ );
- MAKE_CURSOR( PointerStyle::DrawCaption, drawcaption_ );
- MAKE_CURSOR( PointerStyle::LinkData, linkdata_ );
- MAKE_CURSOR( PointerStyle::MoveDataLink, movedlnk_ );
- MAKE_CURSOR( PointerStyle::CopyDataLink, copydlnk_ );
- MAKE_CURSOR( PointerStyle::LinkFile, linkfile_ );
- MAKE_CURSOR( PointerStyle::MoveFileLink, moveflnk_ );
- MAKE_CURSOR( PointerStyle::CopyFileLink, copyflnk_ );
- MAKE_CURSOR( PointerStyle::Chart, chart_ );
- MAKE_CURSOR( PointerStyle::Detective, detective_ );
- MAKE_CURSOR( PointerStyle::PivotCol, pivotcol_ );
- MAKE_CURSOR( PointerStyle::PivotRow, pivotrow_ );
- MAKE_CURSOR( PointerStyle::PivotField, pivotfld_ );
- MAKE_CURSOR( PointerStyle::PivotDelete, pivotdel_ );
- MAKE_CURSOR( PointerStyle::Chain, chain_ );
- MAKE_CURSOR( PointerStyle::ChainNotAllowed, chainnot_ );
- MAKE_CURSOR( PointerStyle::AutoScrollN, asn_ );
- MAKE_CURSOR( PointerStyle::AutoScrollS, ass_ );
- MAKE_CURSOR( PointerStyle::AutoScrollW, asw_ );
- MAKE_CURSOR( PointerStyle::AutoScrollE, ase_ );
- MAKE_CURSOR( PointerStyle::AutoScrollNW, asnw_ );
- MAKE_CURSOR( PointerStyle::AutoScrollNE, asne_ );
- MAKE_CURSOR( PointerStyle::AutoScrollSW, assw_ );
- MAKE_CURSOR( PointerStyle::AutoScrollSE, asse_ );
- MAKE_CURSOR( PointerStyle::AutoScrollNS, asns_ );
- MAKE_CURSOR( PointerStyle::AutoScrollWE, aswe_ );
- MAKE_CURSOR( PointerStyle::AutoScrollNSWE, asnswe_ );
- MAKE_CURSOR( PointerStyle::TextVertical, vertcurs_ );
+ MAKE_CURSOR( PointerStyle::Null, null, RID_CURSOR_NULL );
+ MAKE_CURSOR( PointerStyle::Magnify, magnify_, RID_CURSOR_MAGNIFY );
+ MAKE_CURSOR( PointerStyle::Fill, fill_, RID_CURSOR_FILL );
+ MAKE_CURSOR( PointerStyle::MoveData, movedata_, RID_CURSOR_MOVE_DATA );
+ MAKE_CURSOR( PointerStyle::CopyData, copydata_, RID_CURSOR_COPY_DATA );
+ MAKE_CURSOR( PointerStyle::MoveFile, movefile_, RID_CURSOR_MOVE_FILE );
+ MAKE_CURSOR( PointerStyle::CopyFile, copyfile_, RID_CURSOR_COPY_FILE );
+ MAKE_CURSOR( PointerStyle::MoveFiles, movefiles_, RID_CURSOR_MOVE_FILES );
+ MAKE_CURSOR( PointerStyle::CopyFiles, copyfiles_, RID_CURSOR_COPY_FILES );
+ MAKE_CURSOR( PointerStyle::NotAllowed, nodrop_, RID_CURSOR_NOT_ALLOWED );
+ MAKE_CURSOR( PointerStyle::Rotate, rotate_, RID_CURSOR_ROTATE );
+ MAKE_CURSOR( PointerStyle::HShear, hshear_, RID_CURSOR_H_SHEAR );
+ MAKE_CURSOR( PointerStyle::VShear, vshear_, RID_CURSOR_V_SHEAR );
+ MAKE_CURSOR( PointerStyle::DrawLine, drawline_, RID_CURSOR_DRAW_LINE );
+ MAKE_CURSOR( PointerStyle::DrawRect, drawrect_, RID_CURSOR_DRAW_RECT );
+ MAKE_CURSOR( PointerStyle::DrawPolygon, drawpolygon_, RID_CURSOR_DRAW_POLYGON );
+ MAKE_CURSOR( PointerStyle::DrawBezier, drawbezier_, RID_CURSOR_DRAW_BEZIER );
+ MAKE_CURSOR( PointerStyle::DrawArc, drawarc_, RID_CURSOR_DRAW_ARC );
+ MAKE_CURSOR( PointerStyle::DrawPie, drawpie_, RID_CURSOR_DRAW_PIE );
+ MAKE_CURSOR( PointerStyle::DrawCircleCut, drawcirclecut_, RID_CURSOR_DRAW_CIRCLE_CUT );
+ MAKE_CURSOR( PointerStyle::DrawEllipse, drawellipse_, RID_CURSOR_DRAW_ELLIPSE );
+ MAKE_CURSOR( PointerStyle::DrawConnect, drawconnect_, RID_CURSOR_DRAW_CONNECT );
+ MAKE_CURSOR( PointerStyle::DrawText, drawtext_, RID_CURSOR_DRAW_TEXT );
+ MAKE_CURSOR( PointerStyle::Mirror, mirror_, RID_CURSOR_MIRROR );
+ MAKE_CURSOR( PointerStyle::Crook, crook_, RID_CURSOR_CROOK );
+ MAKE_CURSOR( PointerStyle::Crop, crop_, RID_CURSOR_CROP );
+ MAKE_CURSOR( PointerStyle::MovePoint, movepoint_, RID_CURSOR_MOVE_POINT );
+ MAKE_CURSOR( PointerStyle::MoveBezierWeight, movebezierweight_, RID_CURSOR_MOVE_BEZIER_WEIGHT );
+ MAKE_CURSOR( PointerStyle::DrawFreehand, drawfreehand_, RID_CURSOR_DRAW_FREEHAND );
+ MAKE_CURSOR( PointerStyle::DrawCaption, drawcaption_, RID_CURSOR_DRAW_CAPTION );
+ MAKE_CURSOR( PointerStyle::LinkData, linkdata_, RID_CURSOR_LINK_DATA );
+ MAKE_CURSOR( PointerStyle::MoveDataLink, movedlnk_, RID_CURSOR_MOVE_DATA_LINK );
+ MAKE_CURSOR( PointerStyle::CopyDataLink, copydlnk_, RID_CURSOR_COPY_DATA_LINK );
+ MAKE_CURSOR( PointerStyle::LinkFile, linkfile_, RID_CURSOR_LINK_FILE );
+ MAKE_CURSOR( PointerStyle::MoveFileLink, moveflnk_, RID_CURSOR_MOVE_FILE_LINK );
+ MAKE_CURSOR( PointerStyle::CopyFileLink, copyflnk_, RID_CURSOR_COPY_FILE_LINK );
+ MAKE_CURSOR( PointerStyle::Chart, chart_, RID_CURSOR_CHART );
+ MAKE_CURSOR( PointerStyle::Detective, detective_, RID_CURSOR_DETECTIVE );
+ MAKE_CURSOR( PointerStyle::PivotCol, pivotcol_, RID_CURSOR_PIVOT_COLUMN );
+ MAKE_CURSOR( PointerStyle::PivotRow, pivotrow_, RID_CURSOR_PIVOT_ROW );
+ MAKE_CURSOR( PointerStyle::PivotField, pivotfld_, RID_CURSOR_PIVOT_FIELD );
+ MAKE_CURSOR( PointerStyle::PivotDelete, pivotdel_, RID_CURSOR_PIVOT_DELETE );
+ MAKE_CURSOR( PointerStyle::Chain, chain_, RID_CURSOR_CHAIN );
+ MAKE_CURSOR( PointerStyle::ChainNotAllowed, chainnot_, RID_CURSOR_CHAIN_NOT_ALLOWED );
+ MAKE_CURSOR( PointerStyle::AutoScrollN, asn_, RID_CURSOR_AUTOSCROLL_N );
+ MAKE_CURSOR( PointerStyle::AutoScrollS, ass_, RID_CURSOR_AUTOSCROLL_S );
+ MAKE_CURSOR( PointerStyle::AutoScrollW, asw_, RID_CURSOR_AUTOSCROLL_W );
+ MAKE_CURSOR( PointerStyle::AutoScrollE, ase_, RID_CURSOR_AUTOSCROLL_E );
+ MAKE_CURSOR( PointerStyle::AutoScrollNW, asnw_, RID_CURSOR_AUTOSCROLL_NW );
+ MAKE_CURSOR( PointerStyle::AutoScrollNE, asne_, RID_CURSOR_AUTOSCROLL_NE );
+ MAKE_CURSOR( PointerStyle::AutoScrollSW, assw_, RID_CURSOR_AUTOSCROLL_SW );
+ MAKE_CURSOR( PointerStyle::AutoScrollSE, asse_, RID_CURSOR_AUTOSCROLL_SE );
+ MAKE_CURSOR( PointerStyle::AutoScrollNS, asns_, RID_CURSOR_AUTOSCROLL_NS );
+ MAKE_CURSOR( PointerStyle::AutoScrollWE, aswe_, RID_CURSOR_AUTOSCROLL_WE );
+ MAKE_CURSOR( PointerStyle::AutoScrollNSWE, asnswe_, RID_CURSOR_AUTOSCROLL_NSWE );
+ MAKE_CURSOR( PointerStyle::TextVertical, vertcurs_, RID_CURSOR_TEXT_VERTICAL );
// #i32329#
- MAKE_CURSOR( PointerStyle::TabSelectS, tblsels_ );
- MAKE_CURSOR( PointerStyle::TabSelectE, tblsele_ );
- MAKE_CURSOR( PointerStyle::TabSelectSE, tblselse_ );
- MAKE_CURSOR( PointerStyle::TabSelectW, tblselw_ );
- MAKE_CURSOR( PointerStyle::TabSelectSW, tblselsw_ );
-
- MAKE_CURSOR( PointerStyle::HideWhitespace, hidewhitespace_ );
- MAKE_CURSOR( PointerStyle::ShowWhitespace, showwhitespace_ );
+ MAKE_CURSOR( PointerStyle::TabSelectS, tblsels_, RID_CURSOR_TAB_SELECT_S );
+ MAKE_CURSOR( PointerStyle::TabSelectE, tblsele_, RID_CURSOR_TAB_SELECT_E );
+ MAKE_CURSOR( PointerStyle::TabSelectSE, tblselse_, RID_CURSOR_TAB_SELECT_SE );
+ MAKE_CURSOR( PointerStyle::TabSelectW, tblselw_, RID_CURSOR_TAB_SELECT_W );
+ MAKE_CURSOR( PointerStyle::TabSelectSW, tblselsw_, RID_CURSOR_TAB_SELECT_SW );
+
+ MAKE_CURSOR( PointerStyle::HideWhitespace, hidewhitespace_, RID_CURSOR_HIDE_WHITESPACE );
+ MAKE_CURSOR( PointerStyle::ShowWhitespace, showwhitespace_, RID_CURSOR_SHOW_WHITESPACE );
default:
SAL_WARN( "vcl.gtk", "pointer " << static_cast<int>(ePointerStyle) << "not implemented" );
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 8888bb4b36a1..2bfbd67f6ed1 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1771,14 +1771,17 @@ namespace
}
return pixbuf;
}
+}
- GdkPixbuf* load_icon_by_name(const OUString& rIconName)
- {
- OUString sIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme();
- OUString sUILang = Application::GetSettings().GetUILanguageTag().getBcp47();
- return load_icon_by_name(rIconName, sIconTheme, sUILang);
- }
+GdkPixbuf* load_icon_by_name(const OUString& rIconName)
+{
+ OUString sIconTheme = Application::GetSettings().GetStyleSettings().DetermineIconTheme();
+ OUString sUILang = Application::GetSettings().GetUILanguageTag().getBcp47();
+ return load_icon_by_name(rIconName, sIconTheme, sUILang);
+}
+namespace
+{
GdkPixbuf* load_icon_from_surface(const VirtualDevice& rDevice)
{
Size aSize(rDevice.GetOutputSizePixel());
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index f6b0c2338e33..4a0fe21efc11 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -28,6 +28,7 @@
#include <vcl/gradient.hxx>
#include <vcl/vclmain.hxx>
#include <vcl/layout.hxx>
+#include <vcl/ptrstyle.hxx>
#include <salhelper/thread.hxx>
#include <tools/urlobj.hxx>
@@ -1817,6 +1818,75 @@ public:
}
};
+struct PointerData {
+ PointerStyle eStyle;
+ const char * name;
+};
+static const PointerData gvPointerData [] = {
+ { PointerStyle::Null, "Null" },
+ { PointerStyle::Magnify, "Magnify" },
+ { PointerStyle::Fill, "Fill" },
+ { PointerStyle::MoveData, "MoveData" },
+ { PointerStyle::CopyData, "CopyData" },
+ { PointerStyle::MoveFile, "MoveFile" },
+ { PointerStyle::CopyFile, "CopyFile" },
+ { PointerStyle::MoveFiles, "MoveFiles" },
+ { PointerStyle::CopyFiles, "CopyFiles" },
+ { PointerStyle::NotAllowed, "NotAllowed" },
+ { PointerStyle::Rotate, "Rotate" },
+ { PointerStyle::HShear, "HShear" },
+ { PointerStyle::VShear, "VShear" },
+ { PointerStyle::DrawLine, "DrawLine" },
+ { PointerStyle::DrawRect, "DrawRect" },
+ { PointerStyle::DrawPolygon, "DrawPolygon" },
+ { PointerStyle::DrawBezier, "DrawBezier" },
+ { PointerStyle::DrawArc, "DrawArc" },
+ { PointerStyle::DrawPie, "DrawPie" },
+ { PointerStyle::DrawCircleCut, "DrawCircleCut" },
+ { PointerStyle::DrawEllipse, "DrawEllipse" },
+ { PointerStyle::DrawConnect, "DrawConnect" },
+ { PointerStyle::DrawText, "DrawText" },
+ { PointerStyle::Mirror, "Mirror" },
+ { PointerStyle::Crook, "Crook" },
+ { PointerStyle::Crop, "Crop" },
+ { PointerStyle::MovePoint, "MovePoint" },
+ { PointerStyle::MoveBezierWeight, "MoveBezierWeight" },
+ { PointerStyle::DrawFreehand, "DrawFreehand" },
+ { PointerStyle::DrawCaption, "DrawCaption" },
+ { PointerStyle::LinkData, "LinkData" },
+ { PointerStyle::MoveDataLink, "MoveDataLink" },
+ { PointerStyle::CopyDataLink, "CopyDataLink" },
+ { PointerStyle::LinkFile, "LinkFile" },
+ { PointerStyle::MoveFileLink, "MoveFileLink" },
+ { PointerStyle::CopyFileLink, "CopyFileLink" },
+ { PointerStyle::Chart, "Chart" },
+ { PointerStyle::Detective, "Detective" },
+ { PointerStyle::PivotCol, "PivotCol" },
+ { PointerStyle::PivotRow, "PivotRow" },
+ { PointerStyle::PivotField, "PivotField" },
+ { PointerStyle::PivotDelete, "PivotDelete" },
+ { PointerStyle::Chain, "Chain" },
+ { PointerStyle::ChainNotAllowed, "ChainNotAllowed" },
+ { PointerStyle::AutoScrollN, "AutoScrollN" },
+ { PointerStyle::AutoScrollS, "AutoScrollS" },
+ { PointerStyle::AutoScrollW, "AutoScrollW" },
+ { PointerStyle::AutoScrollE, "AutoScrollE" },
+ { PointerStyle::AutoScrollNW, "AutoScrollNW" },
+ { PointerStyle::AutoScrollNE, "AutoScrollNE" },
+ { PointerStyle::AutoScrollSW, "AutoScrollSW" },
+ { PointerStyle::AutoScrollSE, "AutoScrollSE" },
+ { PointerStyle::AutoScrollNS, "AutoScrollNS" },
+ { PointerStyle::AutoScrollWE, "AutoScrollWE" },
+ { PointerStyle::AutoScrollNSWE, "AutoScrollNSWE" },
+ { PointerStyle::TextVertical, "TextVertical" },
+ { PointerStyle::TabSelectS, "TabSelectS" },
+ { PointerStyle::TabSelectE, "TabSelectE" },
+ { PointerStyle::TabSelectSE, "TabSelectSE" },
+ { PointerStyle::TabSelectW, "TabSelectW" },
+ { PointerStyle::TabSelectSW, "TabSelectSW" },
+ { PointerStyle::HideWhitespace, "HideWhitespace" },
+ { PointerStyle::ShowWhitespace, "ShowWhitespace" },
+};
class DemoWidgets : public WorkWindow
{
VclPtr<MenuBar> mpBar;
@@ -1827,8 +1897,11 @@ class DemoWidgets : public WorkWindow
VclPtr<CheckBox> mpGLCheck;
VclPtr<ComboBox> mpGLCombo;
VclPtr<PushButton> mpGLButton;
+ std::vector<VclPtr<VclHBox>> mvCursorBoxes;
+ std::vector<VclPtr<PushButton>> mvCursorButtons;
DECL_LINK(GLTestClick, Button*, void);
+ DECL_LINK(CursorButtonClick, Button*, void);
public:
DemoWidgets() :
@@ -1872,6 +1945,25 @@ public:
mpGLButton->Show();
mpHBox->Show();
+ int i = 0;
+ VclHBox* pCurrentCursorHBox = nullptr;
+ constexpr int numButtonsPerRow = 9;
+ for (auto & rData : gvPointerData)
+ {
+ if (i % numButtonsPerRow == 0)
+ {
+ mvCursorBoxes.push_back(VclPtrInstance<VclHBox>(mpBox.get(), true, numButtonsPerRow));
+ pCurrentCursorHBox = mvCursorBoxes.back().get();
+ pCurrentCursorHBox->Show();
+ }
+ mvCursorButtons.emplace_back(VclPtrInstance<PushButton>(pCurrentCursorHBox));
+ PushButton& rButton = *mvCursorButtons.back();
+ rButton.SetText(OUString::createFromAscii(rData.name));
+ rButton.SetClickHdl(LINK(this,DemoWidgets,CursorButtonClick));
+ rButton.Show();
+ ++i;
+ }
+
mpBar = VclPtr<MenuBar>::Create();
mpBar->InsertItem(0,"File");
VclPtrInstance<PopupMenu> pPopup;
@@ -1888,6 +1980,12 @@ public:
mpGLCombo.disposeAndClear();
mpGLCheck.disposeAndClear();
mpHBox.disposeAndClear();
+ for (auto & p : mvCursorButtons)
+ p.disposeAndClear();
+ mvCursorButtons.clear();
+ for (auto & p : mvCursorBoxes)
+ p.disposeAndClear();
+ mvCursorBoxes.clear();
mpToolbox.disposeAndClear();
mpButton.disposeAndClear();
mpBox.disposeAndClear();
@@ -1957,6 +2055,19 @@ IMPL_LINK_NOARG(DemoWidgets, GLTestClick, Button*, void)
OpenGLZoneTest::leave();
}
+IMPL_LINK(DemoWidgets, CursorButtonClick, Button*, pButton, void)
+{
+ for (size_t i=0; i<SAL_N_ELEMENTS(gvPointerData); ++i)
+ {
+ if (mvCursorButtons[i].get() == pButton)
+ {
+ mpBox->SetPointer( gvPointerData[i].eStyle );
+ return;
+ }
+ }
+ assert(false);
+}
+
class DemoPopup : public FloatingWindow
{
public:
@@ -2176,8 +2287,10 @@ class DemoApp : public Application
OUStringToOString(aRenderers, RTL_TEXTENCODING_UTF8).getStr());
fprintf(stderr," --test <iterCount> - create benchmark data\n");
fprintf(stderr," --widgets - launch the widget test.\n");
+ fprintf(stderr," --popup - launch the popup test.\n");
fprintf(stderr," --threads - render from multiple threads.\n");
fprintf(stderr," --gltest - run openGL regression tests.\n");
+ fprintf(stderr," --font <fontname> - run the font render test.\n");
fprintf(stderr, "\n");
return 0;
}
@@ -2302,6 +2415,11 @@ protected:
void vclmain::createApplication()
{
+#ifdef _WIN32
+ _putenv_s("LIBO_VCL_DEMO", "1");
+#else
+ setenv("LIBO_VCL_DEMO", "1", 0);
+#endif
static DemoApp aApp;
}