summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2013-04-10 08:20:16 +0000
committerOliver-Rainer Wittmann <orw@apache.org>2013-04-10 08:20:16 +0000
commit0a0a9b32aa5bf1ce2554ad37cbba3c7a105db2b5 (patch)
treef5c258d25d3719c8f719a944043b5220377e9f9c /offapi
parentbcfee75544246db6788715d98efd6d33c12f933d (diff)
121420: merge sidebar feature from branch into trunk
Notes
Diffstat (limited to 'offapi')
-rw-r--r--offapi/com/sun/star/ui/ContextChangeEventMultiplexer.idl40
-rw-r--r--offapi/com/sun/star/ui/ContextChangeEventObject.idl53
-rw-r--r--offapi/com/sun/star/ui/LayoutSize.idl50
-rw-r--r--offapi/com/sun/star/ui/XContextChangeEventListener.idl47
-rw-r--r--offapi/com/sun/star/ui/XContextChangeEventMultiplexer.idl131
-rw-r--r--offapi/com/sun/star/ui/XContextChangeListener.idl51
-rw-r--r--offapi/com/sun/star/ui/XSidebar.idl46
-rw-r--r--offapi/com/sun/star/ui/XSidebarPanel.idl64
-rw-r--r--offapi/com/sun/star/ui/makefile.mk7
-rw-r--r--offapi/com/sun/star/util/EventMultiplexer.idl40
10 files changed, 529 insertions, 0 deletions
diff --git a/offapi/com/sun/star/ui/ContextChangeEventMultiplexer.idl b/offapi/com/sun/star/ui/ContextChangeEventMultiplexer.idl
new file mode 100644
index 000000000000..e695184c391f
--- /dev/null
+++ b/offapi/com/sun/star/ui/ContextChangeEventMultiplexer.idl
@@ -0,0 +1,40 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+#ifndef __com_sun_star_ui_ContextChangeEventMultiplexer_idl__
+#define __com_sun_star_ui_ContextChangeEventMultiplexer_idl__
+
+#ifndef __com_sun_star_ui_XContextChangeEventMultiplexer_idl__
+#include <com/sun/star/ui/XContextChangeEventMultiplexer.idl>
+#endif
+
+module com { module sun { module star { module ui {
+
+/** Multiplex events for context changes.
+
+ A typical listener for context changes is the sidebar.
+*/
+singleton ContextChangeEventMultiplexer : com::sun::star::ui::XContextChangeEventMultiplexer;
+
+}; }; }; }; // com.sun.star.ui
+
+#endif
diff --git a/offapi/com/sun/star/ui/ContextChangeEventObject.idl b/offapi/com/sun/star/ui/ContextChangeEventObject.idl
new file mode 100644
index 000000000000..7ab6bddd0b5e
--- /dev/null
+++ b/offapi/com/sun/star/ui/ContextChangeEventObject.idl
@@ -0,0 +1,53 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+
+#ifndef __com_sun_star_ui_ContextChangeEventObject_idl__
+#define __com_sun_star_ui_ContextChangeEventObject_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_lang_EventObject_idl__
+#include <com/sun/star/lang/EventObject.idl>
+#endif
+
+
+module com { module sun { module star { module ui {
+
+struct ContextChangeEventObject : com::sun::star::lang::EventObject
+{
+ /** Return the name of the application.
+ */
+ string ApplicationName;
+
+ /** Return the application specific context name.
+ */
+ string ContextName;
+};
+
+}; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/ui/LayoutSize.idl b/offapi/com/sun/star/ui/LayoutSize.idl
new file mode 100644
index 000000000000..7c8fad8ac9ce
--- /dev/null
+++ b/offapi/com/sun/star/ui/LayoutSize.idl
@@ -0,0 +1,50 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_ui_LayoutSize_idl__
+#define __com_sun_star_ui_LayoutSize_idl__
+
+module com { module sun { module star { module ui {
+
+/** Size used for layouting windows.
+ It specifies a range of valid values and a preferred value.
+ The values must not violate the relation 0 <= Minimum <= Preferred <= Maximum.
+
+ @param Minimum
+ Zero or positive. The value itself is included in the valid
+ range.
+ @param Maximum
+ A value larger than or equal to Minimum.
+ The special value -1 means that there is no upper bound. Every value larger than or
+ equal to Minimum is valid.
+ @param Preferred
+ The preferred size inside the valid range.
+*/
+struct LayoutSize
+{
+ long Minimum;
+ long Maximum;
+ long Preferred;
+};
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/ui/XContextChangeEventListener.idl b/offapi/com/sun/star/ui/XContextChangeEventListener.idl
new file mode 100644
index 000000000000..000e3deec82a
--- /dev/null
+++ b/offapi/com/sun/star/ui/XContextChangeEventListener.idl
@@ -0,0 +1,47 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef __com_sun_star_ui_XContextChangeEventListener_idl__
+#define __com_sun_star_ui_XContextChangeEventListener_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_lang_XEventListener_idl__
+#include <com/sun/star/lang/XEventListener.idl>
+#endif
+
+#ifndef __com_sun_star_ui_ContextChangeEventObject_idl__
+#include <com/sun/star/ui/ContextChangeEventObject.idl>
+#endif
+
+module com { module sun { module star { module ui {
+
+interface XContextChangeEventListener : ::com::sun::star::lang::XEventListener
+{
+ [oneway] void notifyContextChangeEvent (
+ [in] com::sun::star::ui::ContextChangeEventObject event);
+} ;
+
+} ; } ; } ; } ;
+
+#endif
diff --git a/offapi/com/sun/star/ui/XContextChangeEventMultiplexer.idl b/offapi/com/sun/star/ui/XContextChangeEventMultiplexer.idl
new file mode 100644
index 000000000000..e9e7238d1e7d
--- /dev/null
+++ b/offapi/com/sun/star/ui/XContextChangeEventMultiplexer.idl
@@ -0,0 +1,131 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+
+#ifndef __com_sun_star_ui_XContextChangeEventMultiplexer_idl__
+#define __com_sun_star_ui_XContextChangeEventMultiplexer_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_ui_XContextChangeEventListener_idl__
+#include <com/sun/star/ui/XContextChangeEventListener.idl>
+#endif
+
+#ifndef __com_sun_star_ui_ContextChangeEventObject_idl__
+#include <com/sun/star/ui/ContextChangeEventObject.idl>
+#endif
+
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+
+module com { module sun { module star { module ui {
+
+/** Provide a central access point for a group of events.
+
+ Listeners can be added with a simple restriction on the event source.
+ They are only called for events that originate at the specified source.
+
+ Event providers can broadcast an event to all interested listeners.
+
+ The XEventMultiplexer interface is typically implemented as a singleton
+*/
+interface XContextChangeEventMultiplexer : ::com::sun::star::uno::XInterface
+{
+ /** Add an event listener that is called only when events are broadcast for the specified
+ event focus.
+
+ @param xListener
+ An empty reference results in an InvalidArgumentException.
+
+ One listener may be added more than once for different
+ event foci. Adding a listener a second time for the same
+ event focus results in an InvalidArgumentException.
+
+ @param xEventFocus
+ An empty reference is a valid value. In this case the
+ registered listener will be called for every event
+ broadcast, regardless of its event focus.
+
+ The event focus may or may not be the source of the event.
+
+ A typical example for an event focus is the XController of
+ a view. Using an XController restricts events passed to
+ a listener to events that belong to one view.
+
+ @throws com::sun::star::lang::IllegalArgumentException
+
+ */
+ void addContextChangeEventListener (
+ [in] com::sun::star::ui::XContextChangeEventListener xListener,
+ [in] com::sun::star::uno::XInterface xEventFocus)
+ raises (com::sun::star::lang::IllegalArgumentException);
+
+ /** Remove an event listener for the specified event focus.
+
+ When the same listener was added for other event foci then
+ these associations remain unmodified.
+
+ @param xListener
+ An empty reference results in an InvalidArgumentException.
+
+ When the listener is not registered for the given event
+ focus then an InvalidArgumentException is thrown.
+
+ @param xEventFocus
+ The listener is only removed for this event focus.
+ An empty reference is a valid value.
+
+ @throws com::sun::star::lang::IllegalArgumentException
+ */
+ void removeContextChangeEventListener (
+ [in] com::sun::star::ui::XContextChangeEventListener xListener,
+ [in] com::sun::star::uno::XInterface xEventFocus)
+ raises (com::sun::star::lang::IllegalArgumentException);
+
+ /** Remove an event listener for all event foci.
+
+ @param xListener
+ An empty reference results in an InvalidArgumentException.
+
+ It is not an error when the listener is not registered for any event focus.
+
+ @throws com::sun::star::lang::IllegalArgumentException
+ */
+ void removeAllContextChangeEventListeners (
+ [in] com::sun::star::ui::XContextChangeEventListener xListener)
+ raises (com::sun::star::lang::IllegalArgumentException);
+
+
+ /** Call all event listeners that where added for the specified event focus.
+ */
+ [oneway] void broadcastContextChangeEvent (
+ [in] com::sun::star::ui::ContextChangeEventObject aEvent,
+ [in] com::sun::star::uno::XInterface xEventFocus);
+} ;
+
+} ; } ; } ; } ;
+
+#endif
diff --git a/offapi/com/sun/star/ui/XContextChangeListener.idl b/offapi/com/sun/star/ui/XContextChangeListener.idl
new file mode 100644
index 000000000000..f7741133a0a3
--- /dev/null
+++ b/offapi/com/sun/star/ui/XContextChangeListener.idl
@@ -0,0 +1,51 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+
+#ifndef __com_sun_star_util_XEventListener_idl__
+#define __com_sun_star_util_XEventListener_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_lang_XEventListener_idl__
+#include <com/sun/star/lang/XEventListener.idl>
+#endif
+
+#ifndef __com_sun_star_lang_EventObject_idl__
+#include <com/sun/star/lang/EventObject.idl>
+#endif
+
+module com { module sun { module star { module util {
+
+/** Generic event listener.
+*/
+interface XEventListener : ::com::sun::star::lang::XEventListener
+{
+ [oneway] void notifyEvent (
+ [in] com::sun::star::lang::EventObject event);
+} ;
+
+} ; } ; } ; } ;
+
+#endif
diff --git a/offapi/com/sun/star/ui/XSidebar.idl b/offapi/com/sun/star/ui/XSidebar.idl
new file mode 100644
index 000000000000..e0992591687b
--- /dev/null
+++ b/offapi/com/sun/star/ui/XSidebar.idl
@@ -0,0 +1,46 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+
+#ifndef __com_sun_star_ui_XSidebar_idl__
+#define __com_sun_star_ui_XSidebar_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+module com { module sun { module star { module ui {
+
+/** Interface of the sidebar that allows its elements like panels to eg request layouts.
+*/
+interface XSidebar
+{
+ /** Request layout of the sidebar.
+ Call this method when one of the panels wants to change its size due to
+ late initilization or different content after a context change.
+ */
+ void requestLayout ();
+} ;
+
+} ; } ; } ; } ;
+
+#endif
diff --git a/offapi/com/sun/star/ui/XSidebarPanel.idl b/offapi/com/sun/star/ui/XSidebarPanel.idl
new file mode 100644
index 000000000000..837dcf9dc73a
--- /dev/null
+++ b/offapi/com/sun/star/ui/XSidebarPanel.idl
@@ -0,0 +1,64 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+
+#ifndef __com_sun_star_ui_XSidebarPanel_idl__
+#define __com_sun_star_ui_XSidebarPanel_idl__
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_rendering_XCanvas_idl__
+#include <com/sun/star/rendering/XCanvas.idl>
+#endif
+
+#ifndef __com_sun_star_awt_Point_idl__
+#include <com/sun/star/awt/Point.idl>
+#endif
+
+#ifndef __com_sun_star_beans_XPropertySet_idl__
+#include <com/sun/star/beans/XPropertySet.idl>
+#endif
+#ifndef __com_sun_star_ui_LayoutSize_idl__
+#include <com/sun/star/ui/LayoutSize.idl>
+#endif
+
+module com { module sun { module star { module ui {
+
+/** Optional interface of sidebar panels.
+*/
+interface XSidebarPanel
+{
+ /** For a given width of the container the layouter asks every ui element for its
+ optimal height.
+
+ The height to which a ui element is set may differ from the returned value.
+
+ The height is set via the XWindow interface.
+ */
+ LayoutSize getHeightForWidth ( [in] long nWidth);
+} ;
+
+} ; } ; } ; } ;
+
+#endif
diff --git a/offapi/com/sun/star/ui/makefile.mk b/offapi/com/sun/star/ui/makefile.mk
index a93e6d0e6bca..5e7a5f7feb6b 100644
--- a/offapi/com/sun/star/ui/makefile.mk
+++ b/offapi/com/sun/star/ui/makefile.mk
@@ -40,6 +40,8 @@ IDLFILES=\
ActionTriggerSeparatorType.idl \
ConfigurableUIElement.idl \
ConfigurationEvent.idl \
+ ContextChangeEventMultiplexer.idl \
+ ContextChangeEventObject.idl \
ContextMenuExecuteEvent.idl \
ContextMenuInterceptorAction.idl \
DockingArea.idl \
@@ -48,6 +50,7 @@ IDLFILES=\
ItemDescriptor.idl \
ItemStyle.idl \
ItemType.idl \
+ LayoutSize.idl \
ModuleUICategoryDescription.idl \
ModuleUICommandDescription.idl \
ModuleUIConfigurationManager.idl \
@@ -66,10 +69,14 @@ IDLFILES=\
XAcceleratorConfiguration.idl \
XContextMenuInterception.idl \
XContextMenuInterceptor.idl \
+ XContextChangeEventListener.idl \
+ XContextChangeEventMultiplexer.idl \
XDockingAreaAcceptor.idl \
XImageManager.idl \
XModuleUIConfigurationManager.idl \
XModuleUIConfigurationManagerSupplier.idl \
+ XSidebar.idl \
+ XSidebarPanel.idl \
XStatusbarItem.idl \
XUIConfiguration.idl \
XUIConfigurationListener.idl \
diff --git a/offapi/com/sun/star/util/EventMultiplexer.idl b/offapi/com/sun/star/util/EventMultiplexer.idl
new file mode 100644
index 000000000000..80cf505999d0
--- /dev/null
+++ b/offapi/com/sun/star/util/EventMultiplexer.idl
@@ -0,0 +1,40 @@
+/**************************************************************
+ *
+ * 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
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+#ifndef __com_sun_star_util_EventMultiplexer_idl__
+#define __com_sun_star_util_EventMultiplexer_idl__
+
+#ifndef __com_sun_star_util_XEventMultiplexer_idl__
+#include <com/sun/star/util/XEventMultiplexer.idl>
+#endif
+
+module com { module sun { module star { module util {
+
+/** Multiplex generic events.
+*/
+service EventMultiplexer : com::sun::star::util::XEventMultiplexer
+{
+};
+
+}; }; }; }; // com.sun.star.util
+
+#endif