From 9a4b737c86d9a9eb65611a96b1a4c0562c994885 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Thu, 17 Jun 2010 18:28:42 +0200 Subject: [PATCH 1/4] unoawt2: allow creating dialogs with a parent window --- offapi/com/sun/star/awt/XDialogProvider2.idl | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/offapi/com/sun/star/awt/XDialogProvider2.idl b/offapi/com/sun/star/awt/XDialogProvider2.idl index 79e4594f65a8..9cd203b7796a 100644 --- a/offapi/com/sun/star/awt/XDialogProvider2.idl +++ b/offapi/com/sun/star/awt/XDialogProvider2.idl @@ -31,6 +31,9 @@ #ifndef __com_sun_star_awt_XDialogProvider_idl__ #include #endif +#ifndef __com_sun_star_beans_PropertyValue_idl__ +#include +#endif //============================================================================= @@ -107,6 +110,25 @@ interface XDialogProvider2 : ::com::sun::star::awt::XDialogProvider { com::sun::star::awt::XDialog createDialogWithHandler ( [in] string URL, [in] com::sun::star::uno::XInterface xHandler ) raises ( com::sun::star::lang::IllegalArgumentException ); + + /** creates a dialog for the given URL, accepting additional creation parameters + +

The arguments accepted so far are +

  • ParentWindow - must be a component supporting the XWindowPeer interface, + or a component supporting the XControl interfac, so an XWindowPeer can be + obtained from it. The given window will be used as parent window for the to-be-created dialog.
  • +
  • EventHandler - specifies a component handling events in the dialog. See + createDialogWithHandler for a detailed specification of dialog event handling.
  • +
+

+ */ + + XDialog createDialogWithArguments( + [in] string URL, + [in] sequence< ::com::sun::star::beans::PropertyValue > Arguments + ) + raises ( com::sun::star::lang::IllegalArgumentException + ); }; //============================================================================= From 16138df5b0c608144e8701bcb1bbb8775703042d Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 22 Jun 2010 01:36:43 +0200 Subject: [PATCH 2/4] unoawt2: createDialogWithArguments: use NamedValues instead of PropertyValues --- offapi/com/sun/star/awt/XDialogProvider2.idl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/offapi/com/sun/star/awt/XDialogProvider2.idl b/offapi/com/sun/star/awt/XDialogProvider2.idl index 9cd203b7796a..c08508a58bfe 100644 --- a/offapi/com/sun/star/awt/XDialogProvider2.idl +++ b/offapi/com/sun/star/awt/XDialogProvider2.idl @@ -31,8 +31,8 @@ #ifndef __com_sun_star_awt_XDialogProvider_idl__ #include #endif -#ifndef __com_sun_star_beans_PropertyValue_idl__ -#include +#ifndef __com_sun_star_beans_NamedValue_idl__ +#include #endif @@ -125,7 +125,7 @@ interface XDialogProvider2 : ::com::sun::star::awt::XDialogProvider { XDialog createDialogWithArguments( [in] string URL, - [in] sequence< ::com::sun::star::beans::PropertyValue > Arguments + [in] sequence< ::com::sun::star::beans::NamedValue > Arguments ) raises ( com::sun::star::lang::IllegalArgumentException ); From b03a30dd5a90ac9e24b405c6b83d1ef989b9b6f7 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 25 Jun 2010 15:09:38 +0200 Subject: [PATCH 3/4] unoawt2: #i112684# let UNO Controls implement the (newly introduced) XStyleSettingsSupplier, giving access to their style, in particular, to the HC flag --- .../com/sun/star/awt/XStyleChangeListener.idl | 54 ++++ offapi/com/sun/star/awt/XStyleSettings.idl | 238 ++++++++++++++++++ .../sun/star/awt/XStyleSettingsSupplier.idl | 53 ++++ offapi/com/sun/star/awt/makefile.mk | 5 +- offapi/com/sun/star/util/Color.idl | 8 +- 5 files changed, 353 insertions(+), 5 deletions(-) create mode 100644 offapi/com/sun/star/awt/XStyleChangeListener.idl create mode 100644 offapi/com/sun/star/awt/XStyleSettings.idl create mode 100644 offapi/com/sun/star/awt/XStyleSettingsSupplier.idl diff --git a/offapi/com/sun/star/awt/XStyleChangeListener.idl b/offapi/com/sun/star/awt/XStyleChangeListener.idl new file mode 100644 index 000000000000..819f211a737f --- /dev/null +++ b/offapi/com/sun/star/awt/XStyleChangeListener.idl @@ -0,0 +1,54 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_XStyleChangeListener_idl__ +#define __com_sun_star_awt_XStyleChangeListener_idl__ + +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { + +//================================================================================================================== + +/** to be implemented by components which wish to be notified about changes in the style of a component + + @see XStyleSettings + */ +interface XStyleChangeListener : ::com::sun::star::lang::XEventListener +{ + /// called when the style settings of the observed component changed + void styleSettingsChanged( [in] com::sun::star::lang::EventObject Event ); +}; + +//================================================================================================================== + +}; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/XStyleSettings.idl b/offapi/com/sun/star/awt/XStyleSettings.idl new file mode 100644 index 000000000000..48b8910e707e --- /dev/null +++ b/offapi/com/sun/star/awt/XStyleSettings.idl @@ -0,0 +1,238 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef __com_sun_star_awt_XStyleSettings_idl__ +#define __com_sun_star_awt_XStyleSettings_idl__ + +#include +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { + +interface XStyleChangeListener; + +//================================================================================================================== + +/** provides access to certain style settings within an OpenOffice.org component, such as a window, or + within OpenOffice.org as a whole. + +

Note that there are constraints for those settings. For instance, if controls are drawn with the + native widget framework, i.e. in the desktop theme's look, then they won't necessarily respect all + their style settings, because those have a lesser priority than the native look.

+ +

On the other hand, some settings are respected only when rendering the controls in the native + desktop/theme look. For instance, without native theming, buttons do not support a "roll over" mode, + i.e., they're painted the same way, no matter if they mouse hovers over them or not. But with native + theming, this changes, as here the general button look is drawn by the system's theming engine, + while the text is drawn by OpenOffice.org. In this case, the button respects the + ButtonRolloverTextColor when painting its text.

+ */ +interface XStyleSettings +{ + /// specifies the color of the border of active windows + [attribute] ::com::sun::star::util::Color ActiveBorderColor; + + /// + [attribute] ::com::sun::star::util::Color ActiveColor; + + /// specifies the color of the active tab of a tab control + [attribute] ::com::sun::star::util::Color ActiveTabColor; + + /// specifies the text color for active UI components + [attribute] ::com::sun::star::util::Color ActiveTextColor; + + /// specifies the color to use for text on buttons which are hovered with the mouse + [attribute] ::com::sun::star::util::Color ButtonRolloverTextColor; + + /// specifies the color to use for text on buttons + [attribute] ::com::sun::star::util::Color ButtonTextColor; + + /// + [attribute] ::com::sun::star::util::Color CheckedColor; + + /// specifies the dark portion of the shadow to use for UI elements + [attribute] ::com::sun::star::util::Color DarkShadowColor; + + /// specifies the color of the border of inactive windows + [attribute] ::com::sun::star::util::Color DeactiveBorderColor; + + /// + [attribute] ::com::sun::star::util::Color DeactiveColor; + + /// specifies the text color for inactive UI components + [attribute] ::com::sun::star::util::Color DeactiveTextColor; + + /// specifies the background color of dialogs + [attribute] ::com::sun::star::util::Color DialogColor; + + /// specifies the text color of dialogs + [attribute] ::com::sun::star::util::Color DialogTextColor; + + /// specifies the text color for disabled UI elements + [attribute] ::com::sun::star::util::Color DisableColor; + + /// + [attribute] ::com::sun::star::util::Color FaceColor; + + /// + [attribute, readonly] ::com::sun::star::util::Color FaceGradientColor; + + /// specifies the background color for dialog input controls + [attribute] ::com::sun::star::util::Color FieldColor; + + /// specifies the text color for dialog input controls which are hovered with the mouse + [attribute] ::com::sun::star::util::Color FieldRolloverTextColor; + + /// specifies the text color for dialog input controls + [attribute] ::com::sun::star::util::Color FieldTextColor; + + /// specifies the text color for dialog elements used for grouping other elements + [attribute] ::com::sun::star::util::Color GroupTextColor; + + /// specifies the background color for dialog elements displaying help content + [attribute] ::com::sun::star::util::Color HelpColor; + + /// specifies the text color for dialog elements displaying help content + [attribute] ::com::sun::star::util::Color HelpTextColor; + + /// specifies the background color for UI elements which are highlighted + [attribute] ::com::sun::star::util::Color HighlightColor; + + /// specifies the text color for UI elements which are highlighted + [attribute] ::com::sun::star::util::Color HighlightTextColor; + + /// specifies the color of inactive tabs of a tab control + [attribute] ::com::sun::star::util::Color InactiveTabColor; + + /// specifies the text color of dialog elements displaying some info text + [attribute] ::com::sun::star::util::Color InfoTextColor; + + /// specifies the text color of label elements in dialogs + [attribute] ::com::sun::star::util::Color LabelTextColor; + + /// + [attribute] ::com::sun::star::util::Color LightColor; + + /// specifies the background color of menu bars + [attribute] ::com::sun::star::util::Color MenuBarColor; + + /// specifies the text color of menu bars + [attribute] ::com::sun::star::util::Color MenuBarTextColor; + + /// specifies the border color of menus + [attribute] ::com::sun::star::util::Color MenuBorderColor; + + // specifies the background color of menus + [attribute] ::com::sun::star::util::Color MenuColor; + + /// specifies the background color of highlighted menu items + [attribute] ::com::sun::star::util::Color MenuHighlightColor; + + /// specifies the text color of highlighted menu items + [attribute] ::com::sun::star::util::Color MenuHighlightTextColor; + + // specifies the text color of menus + [attribute] ::com::sun::star::util::Color MenuTextColor; + + /// specifies the color to use for monochrome control elements such as flat borders of controls + [attribute] ::com::sun::star::util::Color MonoColor; + + /// specifies the text color of radio buttons and check boxes + [attribute] ::com::sun::star::util::Color RadioCheckTextColor; + + /// specifies the color of separators between UI elements + [attribute, readonly] ::com::sun::star::util::Color SeparatorColor; + + /// specifies the color to use for UI elements + [attribute] ::com::sun::star::util::Color ShadowColor; + + /// specifies the background color to use for non-dialog windows + [attribute] ::com::sun::star::util::Color WindowColor; + + /// specifies the text color to use for non-dialog windows + [attribute] ::com::sun::star::util::Color WindowTextColor; + + /// specifies the background color to use for document workspaces + [attribute] ::com::sun::star::util::Color WorkspaceColor; + + /** controls whether the an UI component should use a high-contrast mode + */ + [attribute] boolean HighContrastMode; + + /// specifies the application font + [attribute] FontDescriptor ApplicationFont; + + /// specifies the help font + [attribute] FontDescriptor HelpFont; + + /// specifies the font to use for window titles + [attribute] FontDescriptor TitleFont; + + /// specifies the font to use the title of floating windows + [attribute] FontDescriptor FloatTitleFont; + + /// specifies the font to use for menus + [attribute] FontDescriptor MenuFont; + + /// specifies the font to use for tool elements + [attribute] FontDescriptor ToolFont; + + /// specifies the font for dialog elements used for grouping other elements + [attribute] FontDescriptor GroupFont; + + /// specifies the font for label controls + [attribute] FontDescriptor LabelFont; + + /// specifies the font of dialog elements displaying some info text + [attribute] FontDescriptor InfoFont; + + /// specifies the font of radio buttons and check boxes + [attribute] FontDescriptor RadioCheckFont; + + /// specifies the font of push buttons + [attribute] FontDescriptor PushButtonFont; + + /// specifies the font for dialog input controls + [attribute] FontDescriptor FieldFont; + + /// registers a listener to be notified when the style settings change + void addStyleChangeListener( + [in] XStyleChangeListener Listener ); + + /// registers a listener to be notified when the style settings change + void removeStyleChangeListener( + [in] XStyleChangeListener Listener ); +}; + +//================================================================================================================== + +}; }; }; }; + +//================================================================================================================== + +#endif diff --git a/offapi/com/sun/star/awt/XStyleSettingsSupplier.idl b/offapi/com/sun/star/awt/XStyleSettingsSupplier.idl new file mode 100644 index 000000000000..cb60994ff894 --- /dev/null +++ b/offapi/com/sun/star/awt/XStyleSettingsSupplier.idl @@ -0,0 +1,53 @@ +/************************************************************************* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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 + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef __com_sun_star_awt_XStyleSettingsSupplier_idl__ +#define __com_sun_star_awt_XStyleSettingsSupplier_idl__ + +#include + +//================================================================================================================== + +module com { module sun { module star { module awt { + + interface XStyleSettings; + +//================================================================================================================== + +/** provides access to the style settings of a component + */ +interface XStyleSettingsSupplier +{ + [attribute, readonly] XStyleSettings StyleSettings; +}; + +//================================================================================================================== + +}; }; }; }; + +//================================================================================================================== + +#endif + diff --git a/offapi/com/sun/star/awt/makefile.mk b/offapi/com/sun/star/awt/makefile.mk index 55734fd75ca6..a6357703500c 100644 --- a/offapi/com/sun/star/awt/makefile.mk +++ b/offapi/com/sun/star/awt/makefile.mk @@ -278,10 +278,13 @@ IDLFILES=\ XRequestCallback.idl\ XReschedule.idl\ XScrollBar.idl\ - XSimpleTabController.idl\ + XSimpleTabController.idl\ XSpinField.idl\ XSpinListener.idl\ XSpinValue.idl\ + XStyleChangeListener.idl\ + XStyleSettings.idl\ + XStyleSettingsSupplier.idl\ XSystemChildFactory.idl\ XSystemDependentMenuPeer.idl\ XSystemDependentWindowPeer.idl\ diff --git a/offapi/com/sun/star/util/Color.idl b/offapi/com/sun/star/util/Color.idl index f6585e0e5723..572324a10715 100644 --- a/offapi/com/sun/star/util/Color.idl +++ b/offapi/com/sun/star/util/Color.idl @@ -37,10 +37,10 @@ module com { module sun { module star { module util {

The byte order is from high to low:

    alpha channel -
  1. red -
  2. green -
  3. blue -
+
  • red
  • +
  • green
  • +
  • blue
  • +

    */ published typedef long Color; From 414d7d423fa1edc68459e72c43e6d29f7e667ca2 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 25 Jun 2010 17:40:24 +0200 Subject: [PATCH 4/4] unoawt2: why the heck does the IDL compiler complain, but still build it? Fixed build breaker ... --- offapi/com/sun/star/awt/XStyleSettings.idl | 1 + 1 file changed, 1 insertion(+) diff --git a/offapi/com/sun/star/awt/XStyleSettings.idl b/offapi/com/sun/star/awt/XStyleSettings.idl index 48b8910e707e..67c3bba7d8f1 100644 --- a/offapi/com/sun/star/awt/XStyleSettings.idl +++ b/offapi/com/sun/star/awt/XStyleSettings.idl @@ -29,6 +29,7 @@ #include #include +#include //==================================================================================================================