summaryrefslogtreecommitdiff
path: root/sd/source/ui/inc
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2009-12-02 10:19:06 +0100
committerChristian Lippka <cl@openoffice.org>2009-12-02 10:19:06 +0100
commit5e3ff24a76d5819f2074716b7fc9a90eac51280b (patch)
tree190f5f502fdac6968c56bb8168b6af72b1497862 /sd/source/ui/inc
parentd78e19009f4cc8af969da61b3e35ac6c6527231d (diff)
#i107213# added ViewOverlayManager
Diffstat (limited to 'sd/source/ui/inc')
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx2
-rw-r--r--sd/source/ui/inc/smarttag.hxx9
-rw-r--r--sd/source/ui/inc/strings.hrc38
-rw-r--r--sd/source/ui/inc/view/viewoverlaymanager.hxx82
4 files changed, 107 insertions, 24 deletions
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index b9a3e062955b..2b9ee36a2cc6 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -60,6 +60,7 @@ class LayerTabBar;
class Ruler;
class SdUnoDrawView;
class AnnotationManager;
+class ViewOverlayManager;
#define CHECK_RANGE(nMin, nValue, nMax) ((nValue >= nMin) && (nValue <= nMax))
@@ -499,6 +500,7 @@ private:
using ViewShell::Notify;
::std::auto_ptr< AnnotationManager > mpAnnotationManager;
+ ::std::auto_ptr< ViewOverlayManager > mpViewOverlayManager;
};
diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx
index feaa0fa27fd8..561d2e495ebd 100644
--- a/sd/source/ui/inc/smarttag.hxx
+++ b/sd/source/ui/inc/smarttag.hxx
@@ -76,6 +76,12 @@ public:
/** returns true if this smart tag is currently selected */
bool isSelected() const;
+ /** is called once if the mouse enters this tag */
+ virtual void onMouseEnter(SmartHdl& rHdl);
+
+ /** is called once if the mouse leaves this tag */
+ virtual void onMouseLeave();
+
::sd::View& getView() const { return mrView; }
protected:
@@ -141,6 +147,8 @@ public:
a special context, returned in rContext. */
bool getContext( SdrViewContext& rContext ) const;
+ void MouseMove(const MouseEvent& rMEvt);
+
// support point editing
BOOL HasMarkablePoints() const;
ULONG GetMarkablePointCount() const;
@@ -166,6 +174,7 @@ private:
::sd::View& mrView;
SmartTagReference mxSelectedTag;
+ SmartTagReference mxMouseOverTag;
};
/** a derivation from this handle is the visual representation for a smart tag.
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index b04582046502..c29b8bc5f8fb 100644
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -171,26 +171,20 @@
#define STR_DRAW_MEDIA_TOOLBOX RID_DRAW_MEDIA_TOOLBOX
// IDs fuer Praesentationsfolien
-#define STR_AUTOLAYOUT_NONE (RID_APP_START+210)
-#define STR_AUTOLAYOUT_ONLY_TITLE (RID_APP_START+211)
-#define STR_AUTOLAYOUT_TITLE (RID_APP_START+212)
-#define STR_AUTOLAYOUT_OBJ (RID_APP_START+213)
-#define STR_AUTOLAYOUT_ENUM (RID_APP_START+214)
-#define STR_AUTOLAYOUT_CHART (RID_APP_START+215)
-#define STR_AUTOLAYOUT_TAB (RID_APP_START+217)
-#define STR_AUTOLAYOUT_CLIPTEXT (RID_APP_START+218)
-#define STR_AUTOLAYOUT_2TEXT (RID_APP_START+219)
-#define STR_AUTOLAYOUT_TEXTCHART (RID_APP_START+220)
-#define STR_AUTOLAYOUT_TEXTCLIP (RID_APP_START+221)
-#define STR_AUTOLAYOUT_CHARTTEXT (RID_APP_START+222)
-#define STR_AUTOLAYOUT_TEXTOBJ (RID_APP_START+223)
-#define STR_AUTOLAYOUT_TEXT2OBJ (RID_APP_START+224)
-#define STR_AUTOLAYOUT_OBJTEXT (RID_APP_START+225)
-#define STR_AUTOLAYOUT_OBJOVERTEXT (RID_APP_START+226)
-#define STR_AUTOLAYOUT_2OBJTEXT (RID_APP_START+227)
-#define STR_AUTOLAYOUT_2OBJOVERTEXT (RID_APP_START+228)
-#define STR_AUTOLAYOUT_TEXTOVEROBJ (RID_APP_START+229)
-#define STR_AUTOLAYOUT_4OBJ (RID_APP_START+230)
+#define STR_AUTOLAYOUT_NONE (RID_APP_START+210)
+#define STR_AUTOLAYOUT_ONLY_TITLE (RID_APP_START+211)
+#define STR_AUTOLAYOUT_ONLY_TEXT (RID_APP_START+212)
+#define STR_AUTOLAYOUT_TITLE (RID_APP_START+213)
+#define STR_AUTOLAYOUT_CONTENT (RID_APP_START+214)
+#define STR_AUTOLAYOUT_2CONTENT (RID_APP_START+215)
+#define STR_AUTOLAYOUT_CONTENT_2CONTENT (RID_APP_START+217)
+#define STR_AUTOLAYOUT_2CONTENT_CONTENT (RID_APP_START+218)
+#define STR_AUTOLAYOUT_CONTENT_OVER_2CONTENT (RID_APP_START+219)
+#define STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT (RID_APP_START+220)
+#define STR_AUTOLAYOUT_CONTENT_OVER_CONTENT (RID_APP_START+221)
+#define STR_AUTOLAYOUT_4CONTENT (RID_APP_START+222)
+#define STR_AUTOLAYOUT_6CONTENT (RID_APP_START+223)
+
#define STR_AUTOLAYOUT_HANDOUT1 (RID_APP_START+231)
#define STR_AUTOLAYOUT_HANDOUT2 (RID_APP_START+232)
#define STR_AUTOLAYOUT_HANDOUT3 (RID_APP_START+233)
@@ -198,13 +192,9 @@
#define STR_AUTOLAYOUT_HANDOUT6 (RID_APP_START+235)
#define STR_AUTOLAYOUT_NOTES (RID_APP_START+236)
#define STR_AUTOLAYOUT_HANDOUT9 (RID_APP_START+237)
-#define STR_AUTOLAYOUT_ONLY_TEXT (RID_APP_START+238)
-#define STR_AUTOLAYOUT_4CLIPART (RID_APP_START+239)
#define STR_TRANSFORM (RID_APP_START+240)
-#define STR_AUTOLAYOUT_6CLIPART (RID_APP_START+241)
-
#define STR_EXPORT_HTML_NAME (RID_APP_START+244)
#define STR_EXPORT_HTML_FILTER (RID_APP_START+245)
#define STR_EXPORT_DIALOG_TITLE (RID_APP_START+261)
diff --git a/sd/source/ui/inc/view/viewoverlaymanager.hxx b/sd/source/ui/inc/view/viewoverlaymanager.hxx
new file mode 100644
index 000000000000..54164c08c138
--- /dev/null
+++ b/sd/source/ui/inc/view/viewoverlaymanager.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SD_VIEWOVERLAYMANAGER_HXX
+#define _SD_VIEWOVERLAYMANAGER_HXX
+
+//#include <com/sun/star/drawing/XDrawView.hpp>
+
+#include <vcl/image.hxx>
+#include <svtools/lstner.hxx>
+#include "EventMultiplexer.hxx"
+#include "ViewShellBase.hxx"
+
+namespace sd
+{
+
+typedef std::vector< rtl::Reference< SmartTag > > ViewTagVector;
+
+class ViewOverlayManager : public SfxListener
+{
+public:
+ ViewOverlayManager( ViewShellBase& rViewShellBase );
+ virtual ~ViewOverlayManager();
+
+ void onZoomChanged();
+ void UpdateTags();
+
+ DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
+ DECL_LINK(UpdateTagsHdl, void *);
+
+ bool CreateTags();
+ bool DisposeTags();
+
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
+
+ static const int ButtonCount = 4;
+ static Image maLargeButtonImages[ButtonCount];
+ static Image maSmallButtonImages[ButtonCount];
+ static USHORT mnButtonSlots[ButtonCount];
+
+private:
+ void UpdateImages();
+
+ ViewShellBase& mrBase;
+ ULONG mnUpdateTagsEvent;
+
+ ViewTagVector maTagVector;
+
+// ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawView > mxView;
+// ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotationAccess > mxCurrentPage;
+};
+
+}
+
+#endif // _SD_VIEWOVERLAYMANAGER_HXX