2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
2007-04-11 17:00:17 +00:00
|
|
|
*
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2007-04-11 17:00:17 +00:00
|
|
|
*
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
* This file incorporates work covered by the following license notice:
|
2007-04-11 17:00:17 +00:00
|
|
|
*
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2013-10-23 19:10:20 +02:00
|
|
|
#ifndef INCLUDED_VCL_MENU_HXX
|
|
|
|
#define INCLUDED_VCL_MENU_HXX
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2014-08-23 22:22:32 +03:00
|
|
|
#include <rsc/rsc-vcl-shared-types.hxx>
|
|
|
|
#include <tools/color.hxx>
|
2007-04-11 17:00:17 +00:00
|
|
|
#include <tools/rc.hxx>
|
|
|
|
#include <tools/resid.hxx>
|
2014-08-23 22:22:32 +03:00
|
|
|
#include <tools/solar.h>
|
|
|
|
#include <vcl/dllapi.h>
|
2007-04-11 17:00:17 +00:00
|
|
|
#include <vcl/bitmapex.hxx>
|
2014-08-23 22:22:32 +03:00
|
|
|
#include <vcl/keycod.hxx>
|
2016-06-20 15:56:35 +02:00
|
|
|
#include <vcl/vclreferencebase.hxx>
|
2007-04-11 17:00:17 +00:00
|
|
|
#include <vcl/vclevent.hxx>
|
2014-09-22 11:45:37 +02:00
|
|
|
#include <com/sun/star/frame/XFrame.hpp>
|
2007-04-11 17:00:17 +00:00
|
|
|
#include <com/sun/star/uno/Reference.hxx>
|
2015-05-14 14:33:10 +02:00
|
|
|
#include <o3tl/typed_flags_set.hxx>
|
2016-03-30 22:29:16 +02:00
|
|
|
#include <list>
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2014-05-07 11:49:46 +02:00
|
|
|
struct ImplSVEvent;
|
2007-04-11 17:00:17 +00:00
|
|
|
struct MenuItemData;
|
|
|
|
class Point;
|
|
|
|
class Size;
|
|
|
|
class Rectangle;
|
2010-06-03 22:57:46 +02:00
|
|
|
class Menu;
|
2007-04-11 17:00:17 +00:00
|
|
|
class MenuItemList;
|
|
|
|
class HelpEvent;
|
|
|
|
class Image;
|
|
|
|
class PopupMenu;
|
|
|
|
class KeyEvent;
|
2015-07-08 18:02:50 +01:00
|
|
|
class CommandEvent;
|
2007-04-11 17:00:17 +00:00
|
|
|
class MenuFloatingWindow;
|
2014-09-23 11:20:40 +02:00
|
|
|
namespace vcl { class Window; }
|
2007-04-11 17:00:17 +00:00
|
|
|
class SalMenu;
|
2015-08-27 08:44:25 +02:00
|
|
|
class MenuBarWindow;
|
2007-04-11 17:00:17 +00:00
|
|
|
struct SystemMenuData;
|
2015-05-12 15:30:22 +02:00
|
|
|
enum class FloatWinPopupFlags;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
namespace com { namespace sun { namespace star { namespace accessibility {
|
2007-04-11 17:00:17 +00:00
|
|
|
class XAccessible;
|
|
|
|
}}}}
|
|
|
|
|
|
|
|
namespace vcl { struct MenuLayoutData; }
|
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
#define MENU_APPEND (sal_uInt16(0xFFFF))
|
|
|
|
#define MENU_ITEM_NOTFOUND (sal_uInt16(0xFFFF))
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-14 14:33:10 +02:00
|
|
|
// Must match the definitions in css::awt::PopupMenuDirection.idl
|
|
|
|
enum class PopupMenuFlags
|
|
|
|
{
|
|
|
|
NONE = 0x0000,
|
|
|
|
ExecuteDown = 0x0001,
|
|
|
|
ExecuteUp = 0x0002,
|
|
|
|
ExecuteLeft = 0x0004,
|
|
|
|
ExecuteRight = 0x0008,
|
|
|
|
NoMouseUpClose = 0x0010,
|
2013-10-29 16:10:18 +00:00
|
|
|
//If there isn't enough space to put the menu where it wants
|
|
|
|
//to go, then they will be autoplaced. Toggle this bit
|
|
|
|
//on to force menus to be placed either above or below
|
|
|
|
//the starting rectangle and shrunk to fit and then scroll rather than place
|
|
|
|
//the menu beside that rectangle
|
2015-05-14 14:33:10 +02:00
|
|
|
NoHorzPlacement = 0x0020,
|
|
|
|
};
|
2015-05-15 21:58:07 +09:00
|
|
|
|
2015-05-14 14:33:10 +02:00
|
|
|
namespace o3tl
|
|
|
|
{
|
|
|
|
template<> struct typed_flags<PopupMenuFlags> : is_typed_flags<PopupMenuFlags, 0x003f> {};
|
|
|
|
}
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-14 15:28:57 +02:00
|
|
|
enum class MenuFlags
|
|
|
|
{
|
|
|
|
NONE = 0x0000,
|
|
|
|
NoAutoMnemonics = 0x0001,
|
|
|
|
HideDisabledEntries = 0x0002,
|
|
|
|
// overrides default hiding of disabled entries in popup menus
|
|
|
|
AlwaysShowDisabledEntries = 0x0004,
|
|
|
|
};
|
2015-05-15 21:58:07 +09:00
|
|
|
|
2015-05-14 15:28:57 +02:00
|
|
|
namespace o3tl
|
|
|
|
{
|
|
|
|
template<> struct typed_flags<MenuFlags> : is_typed_flags<MenuFlags, 0x0007> {};
|
|
|
|
}
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2014-09-07 12:14:30 +02:00
|
|
|
/// Invalid menu item id
|
2015-05-15 21:58:07 +09:00
|
|
|
#define ITEMPOS_INVALID 0xFFFF
|
2014-09-07 12:14:30 +02:00
|
|
|
|
2010-06-03 22:57:46 +02:00
|
|
|
struct ImplMenuDelData
|
|
|
|
{
|
|
|
|
ImplMenuDelData* mpNext;
|
2016-06-20 15:56:35 +02:00
|
|
|
VclPtr<const Menu> mpMenu;
|
2010-06-03 22:57:46 +02:00
|
|
|
|
2013-01-14 14:08:03 +00:00
|
|
|
explicit ImplMenuDelData( const Menu* );
|
2010-06-03 22:57:46 +02:00
|
|
|
~ImplMenuDelData();
|
|
|
|
|
2015-11-10 10:28:29 +01:00
|
|
|
bool isDeleted() const { return mpMenu == nullptr; }
|
2010-06-03 22:57:46 +02:00
|
|
|
};
|
|
|
|
|
2007-04-11 17:00:17 +00:00
|
|
|
struct MenuLogo
|
|
|
|
{
|
2015-05-15 21:58:07 +09:00
|
|
|
BitmapEx aBitmap;
|
|
|
|
Color aStartColor;
|
|
|
|
Color aEndColor;
|
2007-04-11 17:00:17 +00:00
|
|
|
};
|
|
|
|
|
2015-02-04 14:02:41 +00:00
|
|
|
typedef void (*MenuUserDataReleaseFunction)(sal_uLong);
|
|
|
|
|
2016-06-20 15:56:35 +02:00
|
|
|
class VCL_DLLPUBLIC Menu : public Resource, public VclReferenceBase
|
2007-04-11 17:00:17 +00:00
|
|
|
{
|
|
|
|
friend class MenuBar;
|
|
|
|
friend class MenuBarWindow;
|
2012-10-04 11:19:15 +01:00
|
|
|
friend class MenuButton;
|
2007-04-11 17:00:17 +00:00
|
|
|
friend class MenuFloatingWindow;
|
|
|
|
friend class PopupMenu;
|
|
|
|
friend class SystemWindow;
|
2010-06-03 22:57:46 +02:00
|
|
|
friend struct ImplMenuDelData;
|
2007-04-11 17:00:17 +00:00
|
|
|
private:
|
2015-05-15 21:58:07 +09:00
|
|
|
ImplMenuDelData* mpFirstDel;
|
|
|
|
MenuItemList* pItemList; // Liste mit den MenuItems
|
|
|
|
MenuLogo* pLogo;
|
2016-06-20 15:56:35 +02:00
|
|
|
VclPtr<Menu> pStartedFrom;
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<vcl::Window> pWindow;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
Link<Menu*, bool> aActivateHdl; // Active-Handler
|
|
|
|
Link<Menu*, bool> aDeactivateHdl; // Deactivate-Handler
|
2016-09-01 10:19:04 +03:00
|
|
|
Link<Menu*, bool> aSelectHdl; // Select-Handler
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-09-10 16:44:12 +02:00
|
|
|
std::list<Link<VclMenuEvent&,void> > maEventListeners;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
OUString aTitleText; // PopupMenu text
|
|
|
|
sal_uInt16 nTitleHeight;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
ImplSVEvent* nEventId;
|
|
|
|
sal_uInt16 mnHighlightedItemPos; // for native menus: keeps track of the highlighted item
|
|
|
|
MenuFlags nMenuFlags;
|
|
|
|
sal_uInt16 nSelectedId;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2012-07-01 09:39:59 +02:00
|
|
|
// for output:
|
2015-05-15 21:58:07 +09:00
|
|
|
sal_uInt16 nImgOrChkPos;
|
|
|
|
sal_uInt16 nTextPos;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
bool bCanceled : 1; ///< Terminated during a callback
|
|
|
|
bool bInCallback : 1; ///< In Activate/Deactivate
|
|
|
|
bool bKilled : 1; ///< Killed
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
css::uno::Reference<css::accessibility::XAccessible > mxAccessible;
|
2007-04-11 17:00:17 +00:00
|
|
|
mutable vcl::MenuLayoutData* mpLayoutData;
|
2015-05-15 21:58:07 +09:00
|
|
|
SalMenu* mpSalMenu;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
protected:
|
2015-05-15 21:58:07 +09:00
|
|
|
SAL_DLLPRIVATE Menu* ImplGetStartMenu();
|
|
|
|
SAL_DLLPRIVATE Menu* ImplFindSelectMenu();
|
|
|
|
SAL_DLLPRIVATE Menu* ImplFindMenu( sal_uInt16 nId );
|
|
|
|
SAL_DLLPRIVATE Size ImplCalcSize( vcl::Window* pWin );
|
|
|
|
SAL_DLLPRIVATE bool ImplIsVisible( sal_uInt16 nPos ) const;
|
|
|
|
SAL_DLLPRIVATE bool ImplIsSelectable( sal_uInt16 nPos ) const;
|
|
|
|
SAL_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const;
|
|
|
|
SAL_DLLPRIVATE sal_uInt16 ImplGetFirstVisible() const;
|
|
|
|
SAL_DLLPRIVATE sal_uInt16 ImplGetPrevVisible( sal_uInt16 nPos ) const;
|
|
|
|
SAL_DLLPRIVATE sal_uInt16 ImplGetNextVisible( sal_uInt16 nPos ) const;
|
|
|
|
SAL_DLLPRIVATE void ImplPaint(vcl::RenderContext& rRenderContext,
|
2015-11-10 10:28:29 +01:00
|
|
|
sal_uInt16 nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = nullptr,
|
2015-05-15 21:58:07 +09:00
|
|
|
bool bHighlighted = false, bool bLayout = false, bool bRollover = false ) const;
|
|
|
|
SAL_DLLPRIVATE void ImplPaintMenuTitle(vcl::RenderContext&, const Rectangle& rRect) const;
|
|
|
|
SAL_DLLPRIVATE void ImplSelect();
|
|
|
|
SAL_DLLPRIVATE void ImplCallHighlight( sal_uInt16 nHighlightItem );
|
2016-12-06 13:26:09 +02:00
|
|
|
SAL_DLLPRIVATE void ImplCallEventListeners( VclEventId nEvent, sal_uInt16 nPos );
|
2016-10-05 07:56:12 +02:00
|
|
|
DECL_DLLPRIVATE_LINK(ImplCallSelect, void*, void );
|
2015-05-15 21:58:07 +09:00
|
|
|
|
|
|
|
SAL_DLLPRIVATE void ImplFillLayoutData() const;
|
|
|
|
SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; }
|
|
|
|
SAL_DLLPRIVATE void ImplSetSalMenu( SalMenu *pMenu );
|
|
|
|
SAL_DLLPRIVATE OUString ImplGetHelpText( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2012-06-02 17:05:06 +01:00
|
|
|
// returns native check and option menu symbol height in rCheckHeight and rRadioHeight
|
|
|
|
// return value is maximum width and height of checkboxes and radiobuttons
|
2015-05-15 21:58:07 +09:00
|
|
|
SAL_DLLPRIVATE Size ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, long& rCheckHeight, long& rRadioHeight) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2011-05-05 09:13:37 +02:00
|
|
|
// returns native submenu arrow size and spacing from right border
|
|
|
|
// return value is whether it's supported natively
|
2016-10-07 11:57:50 +02:00
|
|
|
SAL_DLLPRIVATE static bool ImplGetNativeSubmenuArrowSize(vcl::RenderContext& rRenderContext, Size& rArrowSize, long& rArrowSpacing);
|
2011-05-05 09:13:37 +02:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
SAL_DLLPRIVATE void ImplAddDel( ImplMenuDelData &rDel );
|
|
|
|
SAL_DLLPRIVATE void ImplRemoveDel( ImplMenuDelData &rDel );
|
2014-09-07 12:14:30 +02:00
|
|
|
|
2015-02-02 16:18:08 +00:00
|
|
|
SAL_DLLPRIVATE MenuItemData* NbcInsertItem(sal_uInt16 nId, MenuItemBits nBits,
|
|
|
|
const OUString& rStr, Menu* pMenu,
|
|
|
|
size_t nPos, const OString &rIdent);
|
|
|
|
|
2014-09-07 12:14:30 +02:00
|
|
|
/// Close the 'pStartedFrom' menu window.
|
2014-09-15 20:13:54 +02:00
|
|
|
virtual void ClosePopup(Menu* pMenu) = 0;
|
2014-09-07 12:14:30 +02:00
|
|
|
|
|
|
|
/// Forward the KeyInput call to the MenuBar.
|
2014-09-15 15:23:03 +02:00
|
|
|
virtual void MenuBarKeyInput(const KeyEvent& rEvent);
|
2014-09-07 12:14:30 +02:00
|
|
|
|
2007-04-11 17:00:17 +00:00
|
|
|
public:
|
2015-05-15 21:58:07 +09:00
|
|
|
SAL_DLLPRIVATE void ImplKillLayoutData() const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
SAL_DLLPRIVATE vcl::Window* ImplGetWindow() const { return pWindow; }
|
2015-07-08 10:25:58 +02:00
|
|
|
#if defined(MACOSX)
|
2015-11-10 16:20:12 +01:00
|
|
|
void ImplSelectWithStart( Menu* pStartMenu = nullptr );
|
2015-07-08 10:25:58 +02:00
|
|
|
#endif
|
2012-08-09 15:58:03 +01:00
|
|
|
|
2014-09-09 10:10:53 +02:00
|
|
|
protected:
|
|
|
|
|
|
|
|
/** The Menu constructor is protected.
|
|
|
|
|
|
|
|
The callers are supposed to instantiate either PopupMenu or MenuBar, but
|
|
|
|
not a Menu directly.
|
|
|
|
*/
|
|
|
|
Menu();
|
|
|
|
|
2014-09-08 13:18:17 +02:00
|
|
|
public:
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~Menu() override;
|
2016-06-20 15:56:35 +02:00
|
|
|
virtual void dispose() override;
|
2015-05-15 21:58:07 +09:00
|
|
|
|
|
|
|
void Activate();
|
|
|
|
void Deactivate();
|
|
|
|
virtual void Select();
|
|
|
|
|
|
|
|
void InsertItem(sal_uInt16 nItemId, const OUString& rStr,
|
|
|
|
MenuItemBits nItemBits = MenuItemBits::NONE,
|
|
|
|
const OString &rIdent = OString(),
|
|
|
|
sal_uInt16 nPos = MENU_APPEND);
|
|
|
|
void InsertItem(sal_uInt16 nItemId, const Image& rImage,
|
|
|
|
MenuItemBits nItemBits = MenuItemBits::NONE,
|
|
|
|
const OString &rIdent = OString(),
|
|
|
|
sal_uInt16 nPos = MENU_APPEND);
|
|
|
|
void InsertItem(sal_uInt16 nItemId,
|
|
|
|
const OUString& rString, const Image& rImage,
|
|
|
|
MenuItemBits nItemBits = MenuItemBits::NONE,
|
|
|
|
const OString &rIdent = OString(),
|
|
|
|
sal_uInt16 nPos = MENU_APPEND);
|
2016-02-26 09:36:26 +02:00
|
|
|
void InsertItem(const ResId& rResId);
|
2015-11-19 13:37:22 +01:00
|
|
|
void InsertItem(const OUString& rCommand,
|
2016-03-04 14:51:52 +02:00
|
|
|
const css::uno::Reference<css::frame::XFrame>& rFrame);
|
2015-05-15 21:58:07 +09:00
|
|
|
void InsertSeparator(const OString &rIdent = OString(), sal_uInt16 nPos = MENU_APPEND);
|
|
|
|
void RemoveItem( sal_uInt16 nPos );
|
2016-02-26 09:36:26 +02:00
|
|
|
void CopyItem(const Menu& rMenu, sal_uInt16 nPos );
|
2015-05-15 21:58:07 +09:00
|
|
|
void Clear();
|
|
|
|
|
|
|
|
void CreateAutoMnemonics();
|
|
|
|
|
|
|
|
void SetMenuFlags( MenuFlags nFlags ) { nMenuFlags = nFlags; }
|
|
|
|
MenuFlags GetMenuFlags() const { return nMenuFlags; }
|
|
|
|
|
|
|
|
sal_uInt16 GetItemCount() const;
|
|
|
|
sal_uInt16 GetItemId(sal_uInt16 nPos) const;
|
|
|
|
sal_uInt16 GetItemId(const OString &rIdent) const;
|
|
|
|
sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
|
|
|
|
OString GetItemIdent(sal_uInt16 nItemId) const;
|
|
|
|
MenuItemType GetItemType( sal_uInt16 nPos ) const;
|
|
|
|
sal_uInt16 GetCurItemId() const { return nSelectedId;}
|
|
|
|
OString GetCurItemIdent() const;
|
|
|
|
|
|
|
|
void SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits );
|
|
|
|
MenuItemBits GetItemBits( sal_uInt16 nItemId ) const;
|
|
|
|
|
2015-11-10 10:28:29 +01:00
|
|
|
void SetUserValue(sal_uInt16 nItemId, sal_uLong nValue, MenuUserDataReleaseFunction aFunc=nullptr);
|
2015-05-15 21:58:07 +09:00
|
|
|
sal_uLong GetUserValue(sal_uInt16 nItemId) const;
|
|
|
|
|
|
|
|
void SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu );
|
|
|
|
PopupMenu* GetPopupMenu( sal_uInt16 nItemId ) const;
|
|
|
|
|
|
|
|
void SetAccelKey( sal_uInt16 nItemId, const vcl::KeyCode& rKeyCode );
|
|
|
|
vcl::KeyCode GetAccelKey( sal_uInt16 nItemId ) const;
|
|
|
|
|
|
|
|
void CheckItem( sal_uInt16 nItemId, bool bCheck = true );
|
|
|
|
bool IsItemChecked( sal_uInt16 nItemId ) const;
|
|
|
|
|
|
|
|
virtual void SelectItem(sal_uInt16 nItemId) = 0;
|
|
|
|
|
|
|
|
void EnableItem( sal_uInt16 nItemId, bool bEnable = true );
|
|
|
|
void EnableItem(const OString &rIdent, bool bEnable = true)
|
2013-01-08 09:29:44 +00:00
|
|
|
{
|
|
|
|
EnableItem(GetItemId(rIdent), bEnable);
|
|
|
|
}
|
2015-05-15 21:58:07 +09:00
|
|
|
bool IsItemEnabled( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void ShowItem( sal_uInt16 nItemId, bool bVisible = true );
|
|
|
|
void HideItem( sal_uInt16 nItemId ) { ShowItem( nItemId, false ); }
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
bool IsItemPosVisible( sal_uInt16 nItemPos ) const;
|
|
|
|
bool IsMenuVisible() const;
|
|
|
|
virtual bool IsMenuBar() const = 0;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void RemoveDisabledEntries( bool bCheckPopups = true, bool bRemoveEmptyPopups = false );
|
2016-02-26 09:36:26 +02:00
|
|
|
bool HasValidEntries();
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2016-02-07 17:53:40 +02:00
|
|
|
void UpdateNativeMenu();
|
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetItemText( sal_uInt16 nItemId, const OUString& rStr );
|
|
|
|
OUString GetItemText( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
|
|
|
|
Image GetItemImage( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand );
|
|
|
|
OUString GetItemCommand( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetHelpText( sal_uInt16 nItemId, const OUString& rString );
|
|
|
|
OUString GetHelpText( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetTipHelpText( sal_uInt16 nItemId, const OUString& rString );
|
|
|
|
OUString GetTipHelpText( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetHelpCommand( sal_uInt16 nItemId, const OUString& rString );
|
|
|
|
OUString GetHelpCommand( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetHelpId( sal_uInt16 nItemId, const OString& rHelpId );
|
|
|
|
OString GetHelpId( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetActivateHdl( const Link<Menu *, bool>& rLink )
|
|
|
|
{
|
|
|
|
aActivateHdl = rLink;
|
|
|
|
}
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetDeactivateHdl( const Link<Menu *, bool>& rLink )
|
|
|
|
{
|
|
|
|
aDeactivateHdl = rLink;
|
|
|
|
}
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-09-06 12:05:08 +02:00
|
|
|
void SetSelectHdl( const Link<Menu*,bool>& rLink )
|
2015-05-15 21:58:07 +09:00
|
|
|
{
|
|
|
|
aSelectHdl = rLink;
|
|
|
|
}
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
sal_uInt16 GetTitleHeight()
|
|
|
|
{
|
|
|
|
return nTitleHeight;
|
|
|
|
}
|
2015-05-13 15:59:40 +02:00
|
|
|
|
2015-09-10 16:44:12 +02:00
|
|
|
void AddEventListener( const Link<VclMenuEvent&,void>& rEventListener );
|
|
|
|
void RemoveEventListener( const Link<VclMenuEvent&,void>& rEventListener );
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
Menu& operator =( const Menu& rMenu );
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
// Fuer Menu-'Funktionen'
|
2015-05-15 21:58:07 +09:00
|
|
|
MenuItemList* GetItemList() const
|
|
|
|
{
|
|
|
|
return pItemList;
|
|
|
|
}
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2011-12-06 23:04:19 -08:00
|
|
|
// returns the system's menu handle if native menus are supported
|
2007-04-11 17:00:17 +00:00
|
|
|
// pData must point to a SystemMenuData structure
|
2015-05-15 21:58:07 +09:00
|
|
|
bool GetSystemMenuData( SystemMenuData* pData ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
// accessibility helpers
|
|
|
|
|
|
|
|
// returns the bounding box for the character at index nIndex
|
|
|
|
// where nIndex is relative to the starting index of the item
|
|
|
|
// with id nItemId (in coordinates of the displaying window)
|
2010-09-29 15:46:40 +08:00
|
|
|
Rectangle GetCharacterBounds( sal_uInt16 nItemId, long nIndex ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
// -1 is returned if no character is at that point
|
|
|
|
// if an index is found the corresponding item id is filled in (else 0)
|
2010-09-29 15:46:40 +08:00
|
|
|
long GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
// returns the bounding rectangle for an item at pos nItemPos
|
2010-09-29 15:46:40 +08:00
|
|
|
Rectangle GetBoundingRectangle( sal_uInt16 nItemPos ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
css::uno::Reference<css::accessibility::XAccessible> GetAccessible();
|
|
|
|
void SetAccessible(const css::uno::Reference<css::accessibility::XAccessible >& rxAccessible);
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
// gets the activation key of the specified item
|
2015-05-15 21:58:07 +09:00
|
|
|
KeyEvent GetActivationKey( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
vcl::Window* GetWindow() const { return pWindow; }
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
OUString GetAccessibleName( sal_uInt16 nItemId ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
// returns whether the item a position nItemPos is highlighted or not.
|
2015-05-15 21:58:07 +09:00
|
|
|
bool IsHighlighted( sal_uInt16 nItemPos ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void HighlightItem( sal_uInt16 nItemPos );
|
|
|
|
void DeHighlight() { HighlightItem( 0xFFFF ); } // MENUITEMPOS_INVALID
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2016-02-22 20:57:52 +00:00
|
|
|
bool HandleMenuCommandEvent(Menu *pMenu, sal_uInt16 nEventId) const;
|
|
|
|
bool HandleMenuActivateEvent(Menu *pMenu) const;
|
|
|
|
bool HandleMenuDeActivateEvent(Menu *pMenu) const;
|
|
|
|
};
|
2014-02-25 19:06:16 +01:00
|
|
|
|
2007-04-11 17:00:17 +00:00
|
|
|
class VCL_DLLPUBLIC MenuBar : public Menu
|
|
|
|
{
|
2015-08-27 13:08:02 +02:00
|
|
|
Link<void*,void> maCloseHdl;
|
2015-05-15 21:58:07 +09:00
|
|
|
bool mbCloseBtnVisible : 1;
|
|
|
|
bool mbFloatBtnVisible : 1;
|
|
|
|
bool mbHideBtnVisible : 1;
|
|
|
|
bool mbDisplayable : 1;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
friend class Application;
|
|
|
|
friend class Menu;
|
|
|
|
friend class MenuBarWindow;
|
|
|
|
friend class MenuFloatingWindow;
|
|
|
|
friend class SystemWindow;
|
|
|
|
|
2016-11-25 16:23:17 +02:00
|
|
|
SAL_DLLPRIVATE static VclPtr<vcl::Window> ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, MenuBar* pMenu);
|
2015-05-15 21:58:07 +09:00
|
|
|
SAL_DLLPRIVATE static void ImplDestroy(MenuBar* pMenu, bool bDelete);
|
2016-03-16 08:49:35 +02:00
|
|
|
SAL_DLLPRIVATE bool ImplHandleKeyEvent(const KeyEvent& rKEvent);
|
2015-07-08 18:02:50 +01:00
|
|
|
SAL_DLLPRIVATE bool ImplHandleCmdEvent(const CommandEvent& rCEvent);
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2014-09-16 06:43:27 +02:00
|
|
|
protected:
|
|
|
|
|
2015-08-27 08:44:25 +02:00
|
|
|
/// Return the MenuBarWindow.
|
|
|
|
MenuBarWindow* getMenuBarWindow();
|
2014-09-16 06:43:27 +02:00
|
|
|
|
2007-04-11 17:00:17 +00:00
|
|
|
public:
|
2016-04-06 16:18:13 +01:00
|
|
|
MenuBar();
|
2015-05-15 21:58:07 +09:00
|
|
|
MenuBar( const MenuBar& rMenu );
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~MenuBar() override;
|
2016-06-20 15:56:35 +02:00
|
|
|
virtual void dispose() override;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
MenuBar& operator =( const MenuBar& rMenu );
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool IsMenuBar() const override { return true; }
|
2014-09-08 13:18:17 +02:00
|
|
|
|
2014-09-15 10:22:49 +02:00
|
|
|
/// Close the 'pStartedFrom' menu window.
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void ClosePopup(Menu* pMenu) override;
|
2014-09-15 10:22:49 +02:00
|
|
|
|
2014-09-15 15:23:03 +02:00
|
|
|
/// Forward the KeyInput call to the MenuBar.
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void MenuBarKeyInput(const KeyEvent& rEvent) override;
|
2014-09-15 15:23:03 +02:00
|
|
|
|
2016-08-30 15:34:35 +02:00
|
|
|
void ShowCloseButton( bool bShow );
|
2015-05-15 21:58:07 +09:00
|
|
|
bool HasCloseButton() const { return mbCloseBtnVisible; }
|
|
|
|
bool HasFloatButton() const { return mbFloatBtnVisible; }
|
|
|
|
bool HasHideButton() const { return mbHideBtnVisible; }
|
|
|
|
void ShowButtons( bool bClose, bool bFloat, bool bHide );
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SelectItem(sal_uInt16 nId) override;
|
2015-05-15 21:58:07 +09:00
|
|
|
bool HandleMenuHighlightEvent(Menu *pMenu, sal_uInt16 nEventId) const;
|
|
|
|
bool HandleMenuButtonEvent(Menu *pMenu, sal_uInt16 nEventId);
|
|
|
|
|
2015-08-27 13:08:02 +02:00
|
|
|
void SetCloseButtonClickHdl( const Link<void*,void>& rLink ) { maCloseHdl = rLink; }
|
|
|
|
const Link<void*,void>& GetCloseButtonClickHdl() const { return maCloseHdl; }
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
// - by default a menubar is displayable
|
|
|
|
// - if a menubar is not displayable, its MenuBarWindow will never be shown
|
|
|
|
// and it will be hidden if it was visible before
|
|
|
|
// - note: if a menubar is diplayable, this does not necessarily mean that it is currently visible
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetDisplayable( bool bDisplayable );
|
|
|
|
bool IsDisplayable() const { return mbDisplayable; }
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
struct MenuBarButtonCallbackArg
|
|
|
|
{
|
2015-05-15 21:58:07 +09:00
|
|
|
sal_uInt16 nId; // Id of the button
|
|
|
|
bool bHighlight; // highlight on/off
|
2016-06-20 15:56:35 +02:00
|
|
|
VclPtr<MenuBar> pMenuBar; // menubar the button belongs to
|
2007-04-11 17:00:17 +00:00
|
|
|
};
|
|
|
|
// add an arbitrary button to the menubar (will appear next to closer)
|
2008-08-18 12:30:01 +00:00
|
|
|
// passed link will be call with a MenuBarButtonCallbackArg on press
|
|
|
|
// passed string will be set as tooltip
|
2015-09-15 10:47:17 +02:00
|
|
|
sal_uInt16 AddMenuBarButton( const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString& );
|
2007-04-11 17:00:17 +00:00
|
|
|
// set the highlight link for additional button with ID nId
|
|
|
|
// highlight link will be called with a MenuBarButtonHighlightArg
|
|
|
|
// the bHighlight member of that struct shall contain the new state
|
2015-09-15 10:50:45 +02:00
|
|
|
void SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>& );
|
2007-04-11 17:00:17 +00:00
|
|
|
// returns the rectangle occupied by the additional button named nId
|
|
|
|
// coordinates are relative to the systemwindiow the menubar is attached to
|
|
|
|
// if the menubar is unattached an empty rectangle is returned
|
2015-05-15 21:58:07 +09:00
|
|
|
Rectangle GetMenuBarButtonRectPixel( sal_uInt16 nId );
|
|
|
|
void RemoveMenuBarButton( sal_uInt16 nId );
|
2007-04-11 17:00:17 +00:00
|
|
|
};
|
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
inline MenuBar& MenuBar::operator=( const MenuBar& rMenu )
|
2007-04-11 17:00:17 +00:00
|
|
|
{
|
2015-05-15 21:58:07 +09:00
|
|
|
Menu::operator=(rMenu);
|
2007-04-11 17:00:17 +00:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
class VCL_DLLPUBLIC PopupMenu : public Menu
|
|
|
|
{
|
|
|
|
friend class Menu;
|
|
|
|
friend class MenuFloatingWindow;
|
|
|
|
friend class MenuBarWindow;
|
|
|
|
friend struct MenuItemData;
|
|
|
|
|
|
|
|
private:
|
2016-06-20 15:56:35 +02:00
|
|
|
VclPtr<Menu>* pRefAutoSubMenu; // keeps track if a pointer to this Menu is stored in the MenuItemData
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2014-12-04 23:37:38 +01:00
|
|
|
SAL_DLLPRIVATE MenuFloatingWindow * ImplGetFloatingWindow() const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 09:56:21 +01:00
|
|
|
SAL_DLLPRIVATE sal_uInt16 ImplExecute( const VclPtr<vcl::Window>& pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst );
|
2016-02-23 14:42:29 +00:00
|
|
|
SAL_DLLPRIVATE void ImplFlushPendingSelect();
|
2015-05-15 21:58:07 +09:00
|
|
|
SAL_DLLPRIVATE long ImplCalcHeight( sal_uInt16 nEntries ) const;
|
2016-08-30 15:34:35 +02:00
|
|
|
SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry, sal_uInt16* pLastVisible = nullptr ) const;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
public:
|
2015-05-15 21:58:07 +09:00
|
|
|
PopupMenu();
|
|
|
|
PopupMenu( const PopupMenu& rMenu );
|
|
|
|
explicit PopupMenu( const ResId& );
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~PopupMenu() override;
|
2016-06-20 15:56:35 +02:00
|
|
|
virtual void dispose() override;
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool IsMenuBar() const override { return false; }
|
2014-09-12 06:18:06 +02:00
|
|
|
|
2014-09-15 10:22:49 +02:00
|
|
|
/// Close the 'pStartedFrom' menu window.
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void ClosePopup(Menu* pMenu) override;
|
2014-09-15 10:22:49 +02:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetText( const OUString& rTitle )
|
|
|
|
{
|
|
|
|
aTitleText = rTitle;
|
|
|
|
}
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
sal_uInt16 Execute( vcl::Window* pWindow, const Point& rPopupPos );
|
|
|
|
sal_uInt16 Execute( vcl::Window* pWindow, const Rectangle& rRect, PopupMenuFlags nFlags = PopupMenuFlags::NONE );
|
2007-04-11 17:00:17 +00:00
|
|
|
|
|
|
|
// Fuer das TestTool
|
2016-02-26 09:36:26 +02:00
|
|
|
void EndExecute();
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SelectItem(sal_uInt16 nId) override;
|
2015-05-15 21:58:07 +09:00
|
|
|
void SetSelectedEntry( sal_uInt16 nId ); // for use by native submenu only
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
static bool IsInExecute();
|
|
|
|
static PopupMenu* GetActivePopupMenu();
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
PopupMenu& operator=( const PopupMenu& rMenu );
|
2007-04-11 17:00:17 +00:00
|
|
|
};
|
|
|
|
|
2015-05-15 21:58:07 +09:00
|
|
|
inline PopupMenu& PopupMenu::operator=( const PopupMenu& rMenu )
|
2007-04-11 17:00:17 +00:00
|
|
|
{
|
2015-05-15 21:58:07 +09:00
|
|
|
Menu::operator=( rMenu );
|
2007-04-11 17:00:17 +00:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2013-10-23 19:10:20 +02:00
|
|
|
#endif // INCLUDED_VCL_MENU_HXX
|
2007-04-11 17:00:17 +00:00
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|