summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2012-12-23 11:29:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-23 21:16:14 +0100
commit9052caae53ef6ec7eeab20f1ac56bd6310b4451b (patch)
treee3fa07a8a4bee383d9d17ae7e75500fdf88ac2da /offapi
parent1a07be5dbcd6010cd5f9a4b71c2a7648974bd6ba (diff)
Resolves: #i121542# Unify the Menu API
(cherry picked from commit 399946b82f5efec19cd82d1c320d5aa9295d235d) Conflicts: chart2/source/controller/main/ChartController_Window.cxx framework/source/uielement/langselectionmenucontroller.cxx framework/source/uielement/popupmenucontroller.cxx framework/source/uielement/recentfilesmenucontroller.cxx framework/source/uielement/toolbarsmenucontroller.cxx odk/examples/DevelopersGuide/GUI/UnoMenu.java odk/examples/DevelopersGuide/GUI/UnoMenu2.java odk/examples/cpp/StatusbarController/SelectionModeStatusbarController/SelectionModeStatusbarController.cxx offapi/com/sun/star/awt/MenuBar.idl offapi/com/sun/star/awt/MenuEvent.idl offapi/com/sun/star/awt/MenuItemStyle.idl offapi/com/sun/star/awt/MenuItemType.idl offapi/com/sun/star/awt/MenuLogo.idl offapi/com/sun/star/awt/PopupMenu.idl offapi/com/sun/star/awt/PopupMenuDirection.idl offapi/com/sun/star/awt/XMenu.idl offapi/com/sun/star/awt/XMenuBar.idl offapi/com/sun/star/awt/XMenuBarExtended.idl offapi/com/sun/star/awt/XMenuExtended.idl offapi/com/sun/star/awt/XMenuExtended2.idl offapi/com/sun/star/awt/XMenuListener.idl offapi/com/sun/star/awt/XPopupMenu.idl offapi/com/sun/star/awt/XPopupMenuExtended.idl offapi/com/sun/star/awt/makefile.mk offapi/type_reference/types.rdb svtools/inc/svtools/popupmenucontrollerbase.hxx svtools/source/uno/popupmenucontrollerbase.cxx svx/source/tbxctrls/extrusioncontrols.cxx toolkit/inc/pch/precompiled_toolkit.hxx toolkit/inc/toolkit/awt/vclxmenu.hxx toolkit/inc/toolkit/helper/listenermultiplexer.hxx toolkit/source/awt/vclxmenu.cxx Change-Id: I3d9a1e109b9ff35901a3075b44a4c27e7c12b5c7 Related: #i121542# css::awt::XPopupMenu::execute() needs a Rectangle (cherry picked from commit c01a6f4f370b72f0751cf4f5c11310682e2b3248) Conflicts: odk/examples/DevelopersGuide/GUI/UnoMenu2.java offapi/type_reference/types.rdb toolkit/inc/toolkit/awt/vclxmenu.hxx Change-Id: I2cccc95086fe3d1522d03346e3c577fb2f21f621
Diffstat (limited to 'offapi')
-rw-r--r--offapi/UnoApi_offapi.mk5
-rw-r--r--offapi/com/sun/star/awt/MenuBar.idl4
-rw-r--r--offapi/com/sun/star/awt/MenuEvent.idl9
-rw-r--r--offapi/com/sun/star/awt/MenuItemStyle.idl15
-rw-r--r--offapi/com/sun/star/awt/MenuItemType.idl10
-rw-r--r--offapi/com/sun/star/awt/MenuLogo.idl54
-rw-r--r--offapi/com/sun/star/awt/PopupMenu.idl10
-rw-r--r--offapi/com/sun/star/awt/PopupMenuDirection.idl22
-rw-r--r--offapi/com/sun/star/awt/XMenu.idl238
-rw-r--r--offapi/com/sun/star/awt/XMenuBar.idl8
-rw-r--r--offapi/com/sun/star/awt/XMenuBarExtended.idl49
-rw-r--r--offapi/com/sun/star/awt/XMenuExtended.idl71
-rw-r--r--offapi/com/sun/star/awt/XMenuExtended2.idl93
-rw-r--r--offapi/com/sun/star/awt/XMenuListener.idl19
-rw-r--r--offapi/com/sun/star/awt/XPopupMenu.idl143
-rw-r--r--offapi/com/sun/star/awt/XPopupMenuExtended.idl327
-rw-r--r--offapi/type_reference/offapi.rdbbin6832128 -> 6833664 bytes
17 files changed, 355 insertions, 722 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 929fe9ff9fcd..a96bcd49e7f5 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1746,7 +1746,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/awt,\
MenuEvent \
MenuItemStyle \
MenuItemType \
- MenuLogo \
MessageBoxButtons \
MessageBoxCommand \
MouseButton \
@@ -1831,9 +1830,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/awt,\
XListBox \
XMenu \
XMenuBar \
- XMenuBarExtended \
- XMenuExtended \
- XMenuExtended2 \
XMenuListener \
XMessageBox \
XMessageBoxFactory \
@@ -1847,7 +1843,6 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/awt,\
XPatternField \
XPointer \
XPopupMenu \
- XPopupMenuExtended \
XPrinter \
XPrinterPropertySet \
XPrinterServer \
diff --git a/offapi/com/sun/star/awt/MenuBar.idl b/offapi/com/sun/star/awt/MenuBar.idl
index 791a5f8e0c3c..ce28b1a7589f 100644
--- a/offapi/com/sun/star/awt/MenuBar.idl
+++ b/offapi/com/sun/star/awt/MenuBar.idl
@@ -21,12 +21,9 @@
#include <com/sun/star/awt/XMenuBar.idl>
-
module com { module sun { module star { module awt {
-
/** describes a menu for top-level windows.
-
<p>A menu bar can only be used by top-level windows. They support
the interface com::sun::star::awt::XTopWindow
to set an menu bar object.
@@ -34,7 +31,6 @@ module com { module sun { module star { module awt {
*/
published service MenuBar : XMenuBar;
-
}; }; }; };
#endif
diff --git a/offapi/com/sun/star/awt/MenuEvent.idl b/offapi/com/sun/star/awt/MenuEvent.idl
index b1a2b43bba71..16820242b8e8 100644
--- a/offapi/com/sun/star/awt/MenuEvent.idl
+++ b/offapi/com/sun/star/awt/MenuEvent.idl
@@ -21,23 +21,18 @@
#include <com/sun/star/lang/EventObject.idl>
-
-
- module com { module sun { module star { module awt {
-
+module com { module sun { module star { module awt {
/** specifies a menu event.
*/
published struct MenuEvent: com::sun::star::lang::EventObject
{
-
- /** contains the item id.
+ /** contains the item ID.
*/
short MenuId;
};
-
}; }; }; };
#endif
diff --git a/offapi/com/sun/star/awt/MenuItemStyle.idl b/offapi/com/sun/star/awt/MenuItemStyle.idl
index b0c6fef17539..194a732ae38c 100644
--- a/offapi/com/sun/star/awt/MenuItemStyle.idl
+++ b/offapi/com/sun/star/awt/MenuItemStyle.idl
@@ -19,36 +19,27 @@
#ifndef __com_sun_star_awt_MenuItemStyle_idl__
#define __com_sun_star_awt_MenuItemStyle_idl__
-
-
- module com { module sun { module star { module awt {
-
+module com { module sun { module star { module awt {
/** These values are used to specify the properties of a menu item.
-
- <p>They may be expanded in future versions.</p>
*/
-published constants MenuItemStyle
+constants MenuItemStyle
{
-
/** specifies an item which can be checked independently.
*/
const short CHECKABLE = 1;
-
- /** specifies an item which can be checked dependent on the neighboring
+ /** specifies an item which can be checked dependent on the neighbouring
items.
*/
const short RADIOCHECK = 2;
-
/** specifies to check this item automatically on select.
*/
const short AUTOCHECK = 4;
};
-
}; }; }; };
#endif
diff --git a/offapi/com/sun/star/awt/MenuItemType.idl b/offapi/com/sun/star/awt/MenuItemType.idl
index 714d34be593d..cd538a39c38b 100644
--- a/offapi/com/sun/star/awt/MenuItemType.idl
+++ b/offapi/com/sun/star/awt/MenuItemType.idl
@@ -19,15 +19,12 @@
#ifndef __com_sun_star_awt_MenuItemType_idl__
#define __com_sun_star_awt_MenuItemType_idl__
-
-
- module com { module sun { module star { module awt {
-
+module com { module sun { module star { module awt {
/** specifies the type of a menu item, as returned by
- com::sun::star::awt::XMenuExtended2::getItemType().
+ com::sun::star::awt::XMenu::getItemType().
*/
-enum MenuItemType
+published enum MenuItemType
{
/** specifies that the menu item type is unknown.
*/
@@ -51,7 +48,6 @@ enum MenuItemType
};
-
}; }; }; };
#endif
diff --git a/offapi/com/sun/star/awt/MenuLogo.idl b/offapi/com/sun/star/awt/MenuLogo.idl
deleted file mode 100644
index 167f32fa2f6a..000000000000
--- a/offapi/com/sun/star/awt/MenuLogo.idl
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * 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 .
- */
-#ifndef __com_sun_star_awt_MenuLogo_idl__
-#define __com_sun_star_awt_MenuLogo_idl__
-
-#include <com/sun/star/graphic/XGraphic.idl>
-#include <com/sun/star/util/Color.idl>
-
-
- module com { module sun { module star { module awt {
-
-
-/** specifies a logo to be displayed on a menu, with a background gradient.
- */
-struct MenuLogo
-{
- /** specifies the logo image.
- */
- ::com::sun::star::graphic::XGraphic Graphic;
-
-
- /** specifies the color at the start point of the gradient.
- */
- ::com::sun::star::util::Color StartColor;
-
-
- /** specifies the color at the end point of the gradient.
- */
- ::com::sun::star::util::Color EndColor;
-
-};
-
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/PopupMenu.idl b/offapi/com/sun/star/awt/PopupMenu.idl
index 3edce5f6a242..5040da5d880f 100644
--- a/offapi/com/sun/star/awt/PopupMenu.idl
+++ b/offapi/com/sun/star/awt/PopupMenu.idl
@@ -21,19 +21,15 @@
#include <com/sun/star/awt/XPopupMenu.idl>
-
module com { module sun { module star { module awt {
-
-/** describes a pop-up menu which is a recursive container for commands
-
- <p>A pop-up menu can be used as a standalone object to display a context
- menu. It's also possible to use a pop-up menu to integrate it into
+/** describes a popup menu which is a recursive container for commands
+ <p>A popup menu can be used as a standalone object to display a context
+ menu. It's also possible to use a popup menu to integrate it into
another menu.</p>
*/
published service PopupMenu : XPopupMenu;
-
}; }; }; };
#endif
diff --git a/offapi/com/sun/star/awt/PopupMenuDirection.idl b/offapi/com/sun/star/awt/PopupMenuDirection.idl
index 5ecb2e3f6b58..021ab5cf7a74 100644
--- a/offapi/com/sun/star/awt/PopupMenuDirection.idl
+++ b/offapi/com/sun/star/awt/PopupMenuDirection.idl
@@ -19,10 +19,7 @@
#ifndef __com_sun_star_awt_PopupMenuDirection_idl__
#define __com_sun_star_awt_PopupMenuDirection_idl__
-
-
- module com { module sun { module star { module awt {
-
+module com { module sun { module star { module awt {
/** These values are used to specify the direction in which
a pop-up menu will grow.
@@ -31,44 +28,27 @@
*/
published constants PopupMenuDirection
{
-
- /** @deprecated
- */
- const short DEFAULT = 0;
-
-
- /** @deprecated
- */
- const short DOWN = 1;
-
-
/** opens on execute in a default direction.
*/
const short EXECUTE_DEFAULT = 0;
-
/** opens on execute downwards.
*/
const short EXECUTE_DOWN = 1;
-
/** opens on execute upwards.
*/
const short EXECUTE_UP = 2;
-
/** opens on execute to the left.
*/
const short EXECUTE_LEFT = 4;
-
/** opens on execute to the right.
*/
const short EXECUTE_RIGHT = 8;
-
};
-
}; }; }; };
#endif
diff --git a/offapi/com/sun/star/awt/XMenu.idl b/offapi/com/sun/star/awt/XMenu.idl
index ba8fedc50434..6caa38125c43 100644
--- a/offapi/com/sun/star/awt/XMenu.idl
+++ b/offapi/com/sun/star/awt/XMenu.idl
@@ -20,98 +20,278 @@
#define __com_sun_star_awt_XMenu_idl__
#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/awt/MenuItemType.idl>
+module com { module sun { module star { module awt {
-
- module com { module sun { module star { module awt {
-
- published interface XPopupMenu;
- published interface XMenuListener;
-
+published interface XPopupMenu;
+published interface XMenuListener;
/** specifies a simple menu.
*/
published interface XMenu: com::sun::star::uno::XInterface
{
-
/** adds the specified menu listener to receive events from this menu.
+
+ @param xListener
+ the XMenuListener to be added.
*/
void addMenuListener( [in] XMenuListener xListener );
-
/** removes the specified menu listener so that it no longer
receives events from this menu.
+
+ @param xListener
+ the XMenuListener to be removed.
*/
void removeMenuListener( [in] XMenuListener xListener );
-
/** inserts an item into the menu.
-
<p>The item is appended if the position is greater than or equal to
- <code>getItemCount()</code> or if it is negative.</p>
+ <member>getItemCount()</member> or if it is negative.</p>
+
+ @param nItemId
+ specifies the ID of the menu item to be insterted.
+
+ @param aText
+ specifies the label of the menu item.
+
+ @param nItemStyle
+ specifies the style of the menu item, as defined in
+ MenuItemStyle.
+
+ @param nItemPos
+ specifies the position where the menu item will be insterted.
*/
void insertItem( [in] short nItemId,
- [in] string aText,
- [in] short nItemStyle,
- [in] short nPos );
-
+ [in] string aText,
+ [in] short nItemStyle,
+ [in] short nItemPos );
/** removes one or more items from the menu.
+
+ @param nItemPos
+ specifies the position of the (first) menu item to be removed.
+
+ @param nCount
+ specifies the number of menu items to remove.
*/
- void removeItem( [in] short nPos,
- [in] short nCount );
+ void removeItem( [in] short nItemPos,
+ [in] short nCount );
+ /** removes all items from the menu.
+ */
+ void clear();
/** returns the number of items in the menu.
+
+ @return
+ the number of items in this XMenu.
*/
short getItemCount();
+ /** returns the ID of the item at the specified position.
- /** returns the id of the item at the specified position.
+ @param nItemPos
+ specifies the position of the menu item for which the item ID is queried.
+
+ @return
+ the ID of the menu item at the given position.
*/
- short getItemId( [in] short nPos );
+ short getItemId( [in] short nItemPos );
+
+ /** returns the position of the item with the specified ID.
+ @param nItemId
+ specifies the ID of the menu item for which the item position is queried.
- /** returns the position of the item with the specified id.
+ @return
+ the position of the menu item with the specified ID.
*/
- short getItemPos( [in] short nId );
+ short getItemPos( [in] short nItemId );
+ /** retrieves the type of the menu item.
+
+ @param nItemPos
+ specifies the position of the menu item for which the item type is queried.
+
+ @return
+ a MenuItemType indicating the item type.
+ */
+ ::com::sun::star::awt::MenuItemType getItemType( [in] short nItemPos );
/** enables or disables the menu item.
+
+ @param nItemId
+ specifies the menu item ID.
+
+ @param bEnable
+ specifies whether the menu item should be enabled (`TRUE`) or
+ disabled (`FALSE`).
*/
void enableItem( [in] short nItemId,
- [in] boolean bEnable );
-
+ [in] boolean bEnable );
/** returns the state of the menu item.
+
+ @param nItemId
+ specifies the menu item ID.
+
+ @return
+ `TRUE` if the item is enabled, `FALSE` otherwise.
*/
boolean isItemEnabled( [in] short nItemId );
+ /** specifies whether disabled menu entries should be hidden, or not.
+
+ @param bHide
+ if `TRUE`, disabled menu entries are hidden.
+ */
+ void hideDisabledEntries( [in] boolean bHide );
+
+ /** specifies whether mnemonics are automatically assigned to menu items, or not.
+
+ @param bEnable
+ if `TRUE`, mnemonics are automatically assigned to menu items.
+ */
+ void enableAutoMnemonics( [in] boolean bEnable );
/** sets the text for the menu item.
+
+ @param nItemId
+ specifies the ID of the menu item.
+
+ @param aText
+ specifies the label of the menu item.
*/
void setItemText( [in] short nItemId,
- [in] string aText );
-
+ [in] string aText );
/** returns the string for the given item id.
+
+ @param nItemId
+ specifies the ID of the menu item.
+
+ @return
+ the label of the menu item.
*/
string getItemText( [in] short nItemId );
+ /** sets the command string for the menu item.
+
+ @param nItemId
+ specifies the menu item ID for which the command should be set.
+
+ @param aCommand
+ specifies the command for the menu item.
+ */
+ void setCommand( [in] short nItemId,
+ [in] string aCommand );
+
+ /** retrieves the command string for the menu item.
+
+ @param nItemId
+ specifies the menu item ID for which the command URL should be set.
+
+ @return
+ the command of the menu item.
+ */
+ string getCommand( [in] short nItemId );
+
+ /** sets the help command string for the menu item.
+
+ @param nItemId
+ specifies the menu item ID for which the help command URL be set.
+
+ @param aCommand
+ specifies the help command for the menu item.
+ */
+ void setHelpCommand( [in] short nItemId,
+ [in] string aCommand );
+
+ /** retrieves the help command string for the menu item.
+
+ @param nItemId
+ specifies the menu item ID for which the help command should be set.
+
+ @return
+ the help command of the menu item.
+ */
+ string getHelpCommand( [in] short nItemId );
+
+ /** sets the help text for the menu item.
+
+ @param nItemId
+ specifies the menu item identifier for which the help text should be set.
- /** sets the pop-up menu for a specified menu item.
+ @param sHelpText
+ specifies the help text for the menu item.
+ */
+ void setHelpText( [in] short nItemId,
+ [in] string sHelpText );
+
+ /** retrieves the help text for the menu item.
+
+ @param nItemId
+ specifies the menu item identifier for which the help text should be retrieved.
+
+ @return
+ a string with the help text.
+ */
+ string getHelpText( [in] short nItemId );
+
+ /** sets the tip help text for the menu item.
+
+ @param nItemId
+ specifies the menu item identifier for which the tip help text should be set.
+
+ @param sTipHelpText
+ specifies the tip help text for the menu item.
+ */
+ void setTipHelpText( [in] short nItemId,
+ [in] string sTipHelpText );
+
+ /** retrieves the tip help text for the menu item.
+
+ @param nItemId
+ specifies the menu item identifier for which the tip help text should be retrieved.
+
+ @return
+ a string with the tip help text.
+ */
+ string getTipHelpText( [in] short nItemId );
+
+ /** checks whether an XMenu is an XPopupMenu.
+
+ @return
+ `TRUE` if the menu is a PopupMenu,
+ `FALSE` if it is a MenuBar.
+ */
+ boolean isPopupMenu();
+
+ /** sets the popup menu for a specified menu item.
+
+ @param nItemId
+ specifies the menu item ID for which the XPopupMenu should be set.
+
+ @param aPopupMenu
+ specifies a XPopupMenu.
*/
void setPopupMenu( [in] short nItemId,
- [in] XPopupMenu aPopupMenu );
+ [in] XPopupMenu aPopupMenu );
+ /** returns the popup menu from the menu item.
- /** returns the pop-up menu from the menu item.
+ @param nItemId
+ specifies the menu item ID for which the XPopupMenu should be retrieved.
+
+ @return
+ a XPopupMenu.
*/
XPopupMenu getPopupMenu( [in] short nItemId );
};
-
}; }; }; };
#endif
diff --git a/offapi/com/sun/star/awt/XMenuBar.idl b/offapi/com/sun/star/awt/XMenuBar.idl
index f0d9c172656c..0bd07d942fbb 100644
--- a/offapi/com/sun/star/awt/XMenuBar.idl
+++ b/offapi/com/sun/star/awt/XMenuBar.idl
@@ -21,18 +21,14 @@
#include <com/sun/star/awt/XMenu.idl>
-
-
- module com { module sun { module star { module awt {
-
+module com { module sun { module star { module awt {
/** identifies a menu bar.
*/
-published interface XMenuBar: com::sun::star::awt::XMenu
+published interface XMenuBar: XMenu
{
};
-
}; }; }; };
#endif
diff --git a/offapi/com/sun/star/awt/XMenuBarExtended.idl b/offapi/com/sun/star/awt/XMenuBarExtended.idl
deleted file mode 100644
index 9e2bde637ebb..000000000000
--- a/offapi/com/sun/star/awt/XMenuBarExtended.idl
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * 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 .
- */
-#ifndef __com_sun_star_awt_XMenuBarExtended_idl__
-#define __com_sun_star_awt_XMenuBarExtended_idl__
-
-#include <com/sun/star/awt/XMenuBar.idl>
-#include <com/sun/star/awt/XMenuExtended2.idl>
-#include <com/sun/star/graphic/XGraphic.idl>
-#include <com/sun/star/awt/Rectangle.idl>
-
-
- module com { module sun { module star { module awt {
-
- interface XMenuBarButtonListener;
-
-
-/** multiple-inheritance interface designed to ease the use of all functions
- available for a com::sun::star::awt::MenuBar.
-
- @since OOo 3.1
- */
- interface XMenuBarExtended
-{
- interface com::sun::star::awt::XMenuExtended2;
- interface com::sun::star::awt::XMenuBar;
-};
-
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/XMenuExtended.idl b/offapi/com/sun/star/awt/XMenuExtended.idl
deleted file mode 100644
index f5d2703b026f..000000000000
--- a/offapi/com/sun/star/awt/XMenuExtended.idl
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * 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 .
- */
-#ifndef __com_sun_star_awt_XMenuExtended_idl__
-#define __com_sun_star_awt_XMenuExtended_idl__
-
-#include <com/sun/star/uno/XInterface.idl>
-
-
-module com { module sun { module star { module awt {
-
-/** specifies extended menu functions.
- */
-
-interface XMenuExtended: com::sun::star::uno::XInterface
-{
- /** sets the command string for the menu item.
-
- @param nItemId
- specifies the menu item ID for which the command should be set.
-
- @param aCommand
- specifies the command for the menu item.
- */
- void setCommand( [in] short nItemId, [in] string aCommand );
-
- /** retrieves the command string for the menu item.
-
- @param nItemId
- specifies the menu item ID for which the command URL should be set.
- */
- string getCommand( [in] short nItemId );
-
- /** sets the help command string for the menu item.
-
- @param nItemId
- specifies the menu item ID for which the help command URL be set.
-
- @param HelpCommand
- specifies the help command for the menu item.
- */
- void setHelpCommand( [in] short nItemId, [in] string HelpCommand );
-
- /** retrieves the help command string for the menu item.
-
- @param nItemId
- specifies the menu item ID for which the help command should be set.
- */
- string getHelpCommand( [in] short nItemId );
-};
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/XMenuExtended2.idl b/offapi/com/sun/star/awt/XMenuExtended2.idl
deleted file mode 100644
index 4a0cd6b4876e..000000000000
--- a/offapi/com/sun/star/awt/XMenuExtended2.idl
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * 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 .
- */
-#ifndef __com_sun_star_awt_XMenuExtended2_idl__
-#define __com_sun_star_awt_XMenuExtended2_idl__
-
-#include <com/sun/star/awt/XMenu.idl>
-#include <com/sun/star/awt/XMenuExtended.idl>
-#include <com/sun/star/awt/MenuItemType.idl>
-#include <com/sun/star/container/NoSuchElementException.idl>
-
-
-module com { module sun { module star { module awt {
-
-/** specifies extended menu functions.
- */
-
-interface XMenuExtended2
-{
- /** specifies some extended menu functions, like setting a command URL and a help command for a menu item.<br>
- These functions are available for both menu bar and pop-up menu.
- */
- interface com::sun::star::awt::XMenuExtended;
-
- /** specifies basic menu functions.
- */
- interface com::sun::star::awt::XMenu;
-
-
-
- /** checks whether an XMenu is an XPopupMenu.
-
- @return
- `TRUE` if the menu is a PopupMenu, `FALSE` if it is a MenuBar.
- */
- boolean isPopupMenu();
-
- //.........................................................................
-
- /** removes all items from the menu.
- */
- void clear();
-
- //.........................................................................
-
- /** retrieves the type of the menu item.
-
- @param nItemPos
- specifies the position of the menu item for which the item type is queried.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item in the position specified in <var>nItemPos</var>.
-
- @see MenuItemType
- */
- ::com::sun::star::awt::MenuItemType getItemType( [in] short nItemPos )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
- //.........................................................................
-
- /** specifies whether disabled menu entries should be hidden, or not.
-
- @param bHide
- if `TRUE`, disabled menu entries are hidden.
-
- @see
- com::sun::star::awt::XMenu::enableItem()
- */
- void hideDisabledEntries( [in] boolean bHide );
-
-
-};
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/awt/XMenuListener.idl b/offapi/com/sun/star/awt/XMenuListener.idl
index 1a6f9a0df65d..ea9fc8b56495 100644
--- a/offapi/com/sun/star/awt/XMenuListener.idl
+++ b/offapi/com/sun/star/awt/XMenuListener.idl
@@ -20,41 +20,32 @@
#define __com_sun_star_awt_XMenuListener_idl__
#include <com/sun/star/lang/XEventListener.idl>
-
#include <com/sun/star/awt/MenuEvent.idl>
-
-
- module com { module sun { module star { module awt {
-
+module com { module sun { module star { module awt {
/** makes it possible to receive menu events on a window.
*/
published interface XMenuListener: com::sun::star::lang::XEventListener
{
-
/** is invoked when a menu item is highlighted.
*/
- void highlight( [in] com::sun::star::awt::MenuEvent rEvent );
-
+ void itemHighlighted( [in] MenuEvent aEvent );
/** is invoked when a menu item is selected.
*/
- void select( [in] com::sun::star::awt::MenuEvent rEvent );
-
+ void itemSelected( [in] MenuEvent aEvent );
/** is invoked when a menu is activated.
*/
- void activate( [in] com::sun::star::awt::MenuEvent rEvent );
-
+ void itemActivated( [in] MenuEvent aEvent );
/** is invoked when a menu is deactivated.
*/
- void deactivate( [in] com::sun::star::awt::MenuEvent rEvent );
+ void itemDeactivated( [in] MenuEvent aEvent );
};
-
}; }; }; };
#endif
diff --git a/offapi/com/sun/star/awt/XPopupMenu.idl b/offapi/com/sun/star/awt/XPopupMenu.idl
index 1e0ef33cf111..e39a1f2a25e0 100644
--- a/offapi/com/sun/star/awt/XPopupMenu.idl
+++ b/offapi/com/sun/star/awt/XPopupMenu.idl
@@ -19,56 +19,167 @@
#ifndef __com_sun_star_awt_XPopupMenu_idl__
#define __com_sun_star_awt_XPopupMenu_idl__
-#include <com/sun/star/awt/XMenu.idl>
-
+#include <com/sun/star/awt/KeyEvent.idl>
#include <com/sun/star/awt/Rectangle.idl>
+#include <com/sun/star/awt/XMenu.idl>
+#include <com/sun/star/graphic/XGraphic.idl>
+#include <com/sun/star/awt/XMenu.idl>
- module com { module sun { module star { module awt {
+#include <com/sun/star/awt/Rectangle.idl>
- published interface XWindowPeer;
+module com { module sun { module star { module awt {
+published interface XWindowPeer;
/** controls a pop-up menu.
*/
published interface XPopupMenu: XMenu
{
-
/** inserts a separator at the specified position.
- */
- void insertSeparator( [in] short nPos );
+ @param nItemPos
+ specifies the position where the menu separator will be insterted.
+ */
+ void insertSeparator( [in] short nItemPos );
/** sets the menu default item.
+
+ @param nItemId
+ specifies the menu item identifier.
*/
void setDefaultItem( [in] short nItemId );
-
/** returns the menu default item.
+
+ @return
+ the ID of the default item.
*/
short getDefaultItem();
-
/** sets the state of the item to be checked or unchecked.
+
+ @param nItemId
+ specifies the menu item identifier.
+
+ @param bCheck
+ specifies if the item is checked (`TRUE`) or unchecked (`FALSE`).
*/
void checkItem( [in] short nItemId,
- [in] boolean bCheck );
-
+ [in] boolean bCheck );
/** returns whether the item is checked or unchecked.
+
+ @param nItemId
+ specifies the menu item identifier.
+
+ @return
+ `TRUE` if the item is checked, `FALSE` otherwise.
*/
boolean isItemChecked( [in] short nItemId );
+ /** executes the popup menu and returns the selected item
+ or <code>0</code>, if cancelled.
+
+ @param Parent
+ the parent window.
+
+ @param Position
+ a <type>Rectangle</type> representing the coordinates system
+ where the popup menu should be executed.
- /** executes the pop-up menu and returns the selected item
- or <code>0</code>, if canceled.
+ @param Direction
+ the direction in which a popup menu will grow, as specified
+ by one of the PopupMenuDirection constants.
+
+ @return
+ returns the selected item or <code>0</code>, if cancelled.
*/
short execute( [in] XWindowPeer Parent,
- [in] Rectangle Area,
- [in] short Direction );
+ [in] Rectangle Position,
+ [in] short Direction );
-};
+ /** queries if the PopupMenu is being.
+ <p>Returns `TRUE` only if the PopupMenu is being executed
+ as a result of invoking <member >XPopupMenu::execute()</member>; that is,
+ for a PopupMenu activated by a MenuBar item,
+ this methods returns `FALSE`.</p>
+
+ @return
+ `TRUE` if the PopupMenu is being executed,
+ `FALSE` otherwise.
+
+ @see <member >XPopupMenu::execute()</member>
+ */
+ boolean isInExecute();
+
+ /** ends the execution of the PopupMenu.
+ <p><member scope="com::sun::star::awt">XPopupMenu::execute()</member>
+ will then return 0.</p>
+
+ @see <member scope="com::sun::star::awt">XPopupMenu::execute()</member>
+ */
+ void endExecute();
+
+ /** sets the KeyEvent for the menu item.
+
+ <p>The KeyEvent is <b>only</b> used as a container to transport
+ the shortcut information, this methods only draws the text corresponding to
+ this keyboard shortcut. The client code is responsible for listening to
+ keyboard events (typicaly done via XUserInputInterception),
+ and dispatch the respective command.</p>
+
+ @param nItemId
+ specifies the menu item identifier for which the KeyEvent should be set.
+
+ @param aKeyEvent
+ specifies the KeyEvent for the menu item.
+ */
+ void setAcceleratorKeyEvent( [in] short nItemId,
+ [in] KeyEvent aKeyEvent );
+
+ /** retrieves the KeyEvent for the menu item.
+
+ <p>The KeyEvent is <b>only</b> used as a container to transport
+ the shortcut information, so that in this case
+ <member scope="::com::sun::star::lang::">EventObject::Source</member> is <NULL/>.</p>
+
+ @param nItemId
+ specifies the menu item identifier for which the KeyEvent should be retrieved.
+
+ @return
+ the KeyEvent struct assigned to the requested menu item.
+ */
+ KeyEvent getAcceleratorKeyEvent( [in] short nItemId );
+
+ /** sets the image for the menu item.
+
+ @param nItemId
+ specifies the menu item identifier for which the image should be set.
+
+ @param xGraphic
+ specifies the image for the menu item.
+
+ @param bScale
+ if `TRUE`, the image will be scaled to the standard size used internally by
+ the implementation.
+ */
+ void setItemImage( [in] short nItemId,
+ [in] ::com::sun::star::graphic::XGraphic xGraphic,
+ [in] boolean bScale );
+
+ /** retrieves the image for the menu item.
+
+ @param nItemId
+ specifies the menu item identifier for which the image should be retrieved.
+
+ @return
+ a XGraphic reference to the current image for the requested menu item.
+ */
+ ::com::sun::star::graphic::XGraphic getItemImage( [in] short nItemId );
+
+};
}; }; }; };
diff --git a/offapi/com/sun/star/awt/XPopupMenuExtended.idl b/offapi/com/sun/star/awt/XPopupMenuExtended.idl
deleted file mode 100644
index 4508b59543f9..000000000000
--- a/offapi/com/sun/star/awt/XPopupMenuExtended.idl
+++ /dev/null
@@ -1,327 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * 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 .
- */
-#ifndef __com_sun_star_awt_XPopupMenuExtended_idl__
-#define __com_sun_star_awt_XPopupMenuExtended_idl__
-
-#include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/awt/XPopupMenu.idl>
-#include <com/sun/star/awt/XMenuExtended2.idl>
-#include <com/sun/star/awt/MenuLogo.idl>
-#include <com/sun/star/container/NoSuchElementException.idl>
-#include <com/sun/star/awt/KeyEvent.idl>
-#include <com/sun/star/graphic/XGraphic.idl>
-
-
-module com { module sun { module star { module awt {
-
-/** specifies extended functions for a com::sun::star::awt::PopupMenu.
-
- @since OOo 3.1
- */
-interface XPopupMenuExtended
-{
- /** specifies basic functions for a pop-up menu.
- */
- interface ::com::sun::star::awt::XPopupMenu;
-
- /** specifies extended menu functions, available for both
- com::sun::star::awt::MenuBar and
- com::sun::star::awt::PopupMenu.
- */
- interface ::com::sun::star::awt::XMenuExtended2;
-
-
- /** queries if the com::sun::star::awt::PopupMenu
- is being executed as a result of invoking
- com::sun::star::awt::XPopupMenu::execute(); that is,
- for a PopupMenu activated by a MenuBar item,
- this methods returns `FALSE`.
-
- @return
- `TRUE` if the com::sun::star::awt::PopupMenu
- is being executed, `FALSE` otherwise.
-
- @see com::sun::star::awt::XPopupMenu::execute()
-
- @since OOo 3.1
- */
- boolean isInExecute();
-
- /** ends the execution of the com::sun::star::awt::PopupMenu.
- com::sun::star::awt::XPopupMenu::execute() will then return 0.
-
- @see com::sun::star::awt::XPopupMenu::execute()
-
- @since OOo 3.1
- */
- void endExecute();
-
-
- /** sets the MenuLogo for this PopupMenu.
-
- @param aMenuLogo
- the MenuLogo.
-
- @since OOo 3.1
- */
- void setLogo( [in] ::com::sun::star::awt::MenuLogo aMenuLogo );
-
- /** retrieves the MenuLogo for this PopupMenu.
-
- @return
- the MenuLogo.
-
- @since OOo 3.1
- */
- ::com::sun::star::awt::MenuLogo getLogo();
-
-
-
-
- /** specifies whether mnemonics are automatically assigned to menu items, or not.
-
- @param bEnable
- if `TRUE`, mnemonics are automatically assigned to menu items.
- */
- void enableAutoMnemonics( [in] boolean bEnable );
-
-
-
- /** sets the KeyEvent for the menu item.
-
- <p>The KeyEvent is <b>only</b> used as a container to transport
- the shortcut information, this method only draws the text corresponding to
- this keyboard shortcut. The client code is responsible for listening to
- keyboard events (typically done via XUserInputInterception),
- and dispatch the respective command.</p>
-
- @param nItemId
- specifies the menu item identifier for which the KeyEvent should be set.
-
- @param aKeyEvent
- specifies the KeyEvent for the menu item.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- void setAcceleratorKeyEvent( [in] short nItemId, [in] ::com::sun::star::awt::KeyEvent aKeyEvent )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
- /** retrieves the KeyEvent for the menu item.
-
- <p>The KeyEvent is <b>only</b> used as a container to transport
- the shortcut information, so that in this case
- ::com::sun::star::lang::::EventObject::Source is `NULL`.</p>
-
- @param nItemId
- specifies the menu item identifier for which the KeyEvent should be retrieved.
-
- @return
- the KeyEvent struct assigned to the requested menu item.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- ::com::sun::star::awt::KeyEvent getAcceleratorKeyEvent( [in] short nItemId )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
-
- /** sets the help text for the menu item.
-
- @param nItemId
- specifies the menu item identifier for which the help text should be set.
-
- @param sHelpText
- specifies the help text for the menu item.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- void setHelpText( [in] short nItemId, [in] string sHelpText )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
- /** retrieves the help text for the menu item.
-
- @param nItemId
- specifies the menu item identifier for which the help text should be retrieved.
-
- @return
- a string with the help text.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- string getHelpText( [in] short nItemId )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
-
- /** sets the tip help text for the menu item.
-
- @param nItemId
- specifies the menu item identifier for which the tip help text should be set.
-
- @param sTipHelpText
- specifies the tip help text for the menu item.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- void setTipHelpText( [in] short nItemId, [in] string sTipHelpText )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
- /** retrieves the tip help text for the menu item.
-
- @param nItemId
- specifies the menu item identifier for which the tip help text should be retrieved.
-
- @return
- a string with the tip help text.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- string getTipHelpText( [in] short nItemId )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
-
- /** sets the image for the menu item.
-
- @param nItemId
- specifies the menu item identifier for which the image should be set.
-
- @param xGraphic
- specifies the image for the menu item.
-
- @param bScale
- if `TRUE`, the image will be scaled to the standard size used internally by
- the implementation.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- void setItemImage( [in] short nItemId,
- [in] ::com::sun::star::graphic::XGraphic xGraphic,
- [in] boolean bScale )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
- /** retrieves the image for the menu item.
-
- @param nItemId
- specifies the menu item identifier for which the image should be retrieved.
-
- @return
- a ::com::sun::star::graphic::::XGraphic reference
- to the current image for the requested menu item.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- ::com::sun::star::graphic::XGraphic getItemImage( [in] short nItemId )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
- //.............................................................................
-
-
- /** sets the rotation angle of a menu item image.
-
- @param nItemId
- specifies the menu item identifier for which the image angle should be set.
-
- @param nAngle
- specifies the rotation angle for the menu item image.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- void setItemImageAngle( [in] short nItemId, [in] long nAngle )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
- /** retrieves the rotation angle of a menu item image.
-
- @param nItemId
- specifies the menu item identifier for which the rotation angle should be retrieved.
-
- @return the rotation angle of the menu item image, or 0 if it has no rotation.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- long getItemImageAngle( [in] short nItemId )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
- //.............................................................................
-
- /** sets the mirror mode of a menu item image.
-
- @param nItemId
- specifies the menu item identifier for which the mirror mode should be set.
-
- @param bMirror
- if `TRUE`, the item image is mirrored.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- void setItemImageMirrorMode( [in] short nItemId, [in] boolean bMirror )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
- /** indicates whether the menu item image is mirrored.
-
- @param nItemId
- specifies the menu item identifier for which the image mirror mode should be checked.
-
- @return `TRUE` if the item image is mirrored, `FALSE` otherwise.
-
- @throws com::sun::star::container::NoSuchElementException
- if there is no menu item with the identifier specified in <var>nItemId</var>.
-
- @since OOo 3.1
- */
- boolean isItemImageInMirrorMode( [in] short nItemId )
- raises ( ::com::sun::star::container::NoSuchElementException );
-
-};
-
-}; }; }; };
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/type_reference/offapi.rdb b/offapi/type_reference/offapi.rdb
index 33c46854a483..9bba5b01ef32 100644
--- a/offapi/type_reference/offapi.rdb
+++ b/offapi/type_reference/offapi.rdb
Binary files differ