diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-03-05 16:23:44 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-03-05 16:23:44 +0000 |
commit | 1cafa1052d7f80469ff83901d6e301f8cf45c090 (patch) | |
tree | a44983ec9c120bb48f52fc53aabab0250ce5a245 /framework | |
parent | 72cb21b2339250f21b1fb340ef4d8cbd84e61091 (diff) |
INTEGRATION: CWS aquavcl05_DEV300 (1.1.2); FILE ADDED
2008/02/19 17:29:36 pl 1.1.2.4: #i85963# add two buttons, layout columns independently
2008/02/18 18:20:57 pl 1.1.2.3: #i85963# add backing window graphics parts
2008/02/15 13:33:05 pl 1.1.2.2: #i85963# add extension button
2008/02/14 21:37:17 pl 1.1.2.1: #i85963# implement StartCenter
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/backingwindow.hxx | 165 | ||||
-rw-r--r-- | framework/source/services/fwk_services.src | 138 |
2 files changed, 303 insertions, 0 deletions
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx new file mode 100644 index 000000000000..5efe88eb6e6c --- /dev/null +++ b/framework/source/services/backingwindow.hxx @@ -0,0 +1,165 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: backingwindow.hxx,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: kz $ $Date: 2008-03-05 17:23:33 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef FRAMEWORK_BACKINGWINDOW_HXX +#define FRAMEWORK_BACKINGWINDOW_HXX + +#include "rtl/ustring.hxx" + +#include "vcl/button.hxx" +#include "vcl/fixed.hxx" +#include "vcl/bitmapex.hxx" +#include "vcl/toolbox.hxx" + +#include "svtools/moduleoptions.hxx" + +#include "com/sun/star/frame/XDispatchProvider.hpp" +#include "com/sun/star/frame/XDesktop.hpp" +#include "com/sun/star/frame/XTerminateListener.hpp" +#include "com/sun/star/document/XEventListener.hpp" +#include "com/sun/star/document/XEventBroadcaster.hpp" +#include "com/sun/star/util/XURLTransformer.hpp" +#include "com/sun/star/ui/dialogs/XFilePicker.hpp" +#include "com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp" +#include "com/sun/star/ui/dialogs/XFilterManager.hpp" +#include "com/sun/star/ui/dialogs/XFolderPicker.hpp" +#include "com/sun/star/ui/dialogs/TemplateDescription.hpp" +#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp" + +#include <set> + + +namespace framework +{ + // To get the transparent mouse-over look, the closer is actually a toolbox + // overload DataChange to handle style changes correctly + class DecoToolBox : public ToolBox + { + Size maMinSize; + + using Window::ImplInit; + public: + DecoToolBox( Window* pParent, WinBits nStyle = 0 ); + DecoToolBox( Window* pParent, const ResId& rResId ); + + void DataChanged( const DataChangedEvent& rDCEvt ); + + void calcMinSize(); + Size getMinSize(); + }; + + class BackingWindow : public Window + { + com::sun::star::uno::Reference<com::sun::star::frame::XDesktop> mxDesktop; + com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider > mxDesktopDispatchProvider; + com::sun::star::uno::Reference<com::sun::star::document::XEventBroadcaster> mxBroadcaster; + + FixedText maWelcome; + Size maWelcomeSize; + FixedText maProduct; + Size maProductSize; + FixedText maWriterText; + ImageButton maWriterButton; + FixedText maCalcText; + ImageButton maCalcButton; + FixedText maImpressText; + ImageButton maImpressButton; + FixedText maDrawText; + ImageButton maDrawButton; + FixedText maDBText; + ImageButton maDBButton; + FixedText maOpenText; + ImageButton maOpenButton; + FixedText maTemplateText; + ImageButton maTemplateButton; + + DecoToolBox maToolbox; + + BitmapEx maBackgroundLeft; + BitmapEx maBackgroundMiddle; + BitmapEx maBackgroundRight; + + String maWelcomeString; + String maProductString; + String maCreateString; + String maOpenString; + String maTemplateString; + + Font maTextFont; + Rectangle maControlRect; + + long mnColumnWidth[2]; + Color maLabelTextColor; + Color maWelcomeTextColor; + + Size maButtonImageSize; + + static const long nBtnPos = 240; + static const int nItemId_Extensions = 1; + static const int nItemId_Reg = 2; + static const int nItemId_Info = 3; + static const int nShadowTop = 32; + static const int nShadowLeft = 35; + static const int nShadowRight = 45; + static const int nShadowBottom = 50; + + void loadImage( const ResId& i_rId, ImageButton& i_rButton ); + + void layoutButtonAndText( const char* i_pURL, int nColumn, const std::set<rtl::OUString>& i_rURLS, + SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod, + ImageButton& i_rBtn, FixedText& i_rText, + const String& i_rStr = String() + ); + + bool executeFileOpen(); + void dispatchURL( const rtl::OUString& i_rURL, + const rtl::OUString& i_rTarget = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ), + const com::sun::star::uno::Reference< com::sun::star::frame::XDispatchProvider >& i_xProv = com::sun::star::uno::Reference< com::sun::star::frame::XDispatchProvider >(), + const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& = com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >() + ); + + DECL_LINK( ClickHdl, Button* ); + DECL_LINK( ToolboxHdl, void* ); + public: + BackingWindow( Window* pParent ); + ~BackingWindow(); + + virtual void Paint( const Rectangle& rRect ); + virtual void Resize(); + }; + +} + +#endif diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src new file mode 100644 index 000000000000..8236828e59d5 --- /dev/null +++ b/framework/source/services/fwk_services.src @@ -0,0 +1,138 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: fwk_services.src,v $ + * + * $Revision: 1.2 $ + * + * last change: $Author: kz $ $Date: 2008-03-05 17:23:44 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#include "framework.hrc" + +Window DLG_BACKING +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Border = TRUE; + + String STR_BACKING_WELCOME + { + Text [ en-US ] = "Welcome to"; + }; + String STR_BACKING_WELCOMEPRODUCT + { + Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION"; + }; + String STR_BACKING_CREATE + { + Text [ en-US ] = "New %s"; + }; + String STR_BACKING_TEMPLATE + { + Text [ en-US ] = "~New document from template"; + }; + String STR_BACKING_FILE + { + Text [ en-US ] = "~Open an existing document"; + }; + Bitmap BMP_BACKING_BACKGROUND_LEFT + { + File = "backing.png"; + }; + Bitmap BMP_BACKING_BACKGROUND_MIDDLE + { + File = "backing_space.png"; + }; + Bitmap BMP_BACKING_BACKGROUND_RIGHT + { + File = "backing_right.png"; + }; + Bitmap BMP_BACKING_BACKGROUND_RTL_LEFT + { + File = "backing_rtl_left.png"; + }; + Bitmap BMP_BACKING_BACKGROUND_RTL_RIGHT + { + File = "backing_rtl_right.png"; + }; + Bitmap BMP_BACKING_WRITER + { + File = "odt_32.png"; + }; + Bitmap BMP_BACKING_CALC + { + File = "ods_32.png"; + }; + Bitmap BMP_BACKING_IMPRESS + { + File = "odp_32.png"; + }; + Bitmap BMP_BACKING_DRAW + { + File = "odg_32.png"; + }; + Bitmap BMP_BACKING_DATABASE + { + File = "odb_32.png"; + }; + Bitmap BMP_BACKING_OPENFILE + { + File = "open_32.png"; + }; + Bitmap BMP_BACKING_OPENTEMPLATE + { + File = "template_32.png"; + }; + Bitmap BMP_BACKING_EXT + { + File = "extension_plus_26.png"; + }; + String STR_BACKING_EXTHELP + { + Text [ en-US ] = "Add new features to %PRODUCTNAME"; + }; + Bitmap BMP_BACKING_REG + { + File = "register_32.png"; + }; + String STR_BACKING_REGHELP + { + Text [ en-US ] = "Register your %PRODUCTNAME"; + }; + Bitmap BMP_BACKING_INFO + { + File = "info_26.png"; + }; + String STR_BACKING_INFOHELP + { + Text [ en-US ] = "Get more information about %PRODUCTNAME"; + }; +}; + + |