1*1d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1d2dbeb0SAndrew Rist * distributed with this work for additional information 6*1d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 9*1d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10*1d2dbeb0SAndrew Rist * 11*1d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*1d2dbeb0SAndrew Rist * 13*1d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 15*1d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 17*1d2dbeb0SAndrew Rist * specific language governing permissions and limitations 18*1d2dbeb0SAndrew Rist * under the License. 19*1d2dbeb0SAndrew Rist * 20*1d2dbeb0SAndrew Rist *************************************************************/ 21*1d2dbeb0SAndrew Rist 22*1d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef _UNOTOOLS_HXX 24cdf0e10cSrcweir #define _UNOTOOLS_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <vcl/dialog.hxx> 28cdf0e10cSrcweir #include <vcl/fixed.hxx> 29cdf0e10cSrcweir #include <vcl/edit.hxx> 30cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX //autogen 31cdf0e10cSrcweir #include <vcl/button.hxx> 32cdf0e10cSrcweir #endif 33cdf0e10cSrcweir #include <actctrl.hxx> 34cdf0e10cSrcweir #include <com/sun/star/frame/XController.hpp> 35cdf0e10cSrcweir #include <com/sun/star/text/XTextCursor.hpp> 36cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp> 37cdf0e10cSrcweir #include <com/sun/star/awt/XControl.hpp> 38cdf0e10cSrcweir #include <com/sun/star/container/XNamed.hpp> 39cdf0e10cSrcweir #include <tools/resary.hxx> 40cdf0e10cSrcweir #include <swunodef.hxx> 41cdf0e10cSrcweir #include "swdllapi.h" 42cdf0e10cSrcweir 43cdf0e10cSrcweir /* -----------------------------15.12.99 09:55-------------------------------- 44cdf0e10cSrcweir 45cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 46cdf0e10cSrcweir class SwOneExampleFrame; 47cdf0e10cSrcweir class SwFrmCtrlWindow : public Window 48cdf0e10cSrcweir { 49cdf0e10cSrcweir SwOneExampleFrame* pExampleFrame; 50cdf0e10cSrcweir public: 51cdf0e10cSrcweir SwFrmCtrlWindow(Window* pParent, WinBits nBits, SwOneExampleFrame* pFrame); 52cdf0e10cSrcweir 53cdf0e10cSrcweir virtual void Command( const CommandEvent& rCEvt ); 54cdf0e10cSrcweir }; 55cdf0e10cSrcweir /* -----------------------------15.12.99 12:56-------------------------------- 56cdf0e10cSrcweir 57cdf0e10cSrcweir ---------------------------------------------------------------------------*/ 58cdf0e10cSrcweir class MenuResource : public Resource 59cdf0e10cSrcweir { 60cdf0e10cSrcweir ResStringArray aMenuArray; 61cdf0e10cSrcweir 62cdf0e10cSrcweir public: 63cdf0e10cSrcweir MenuResource(const ResId& rResId); 64cdf0e10cSrcweir GetMenuArray()65cdf0e10cSrcweir ResStringArray& GetMenuArray() {return aMenuArray;} 66cdf0e10cSrcweir }; 67cdf0e10cSrcweir /* -----------------27.07.99 15:20------------------- 68cdf0e10cSrcweir 69cdf0e10cSrcweir --------------------------------------------------*/ 70cdf0e10cSrcweir #define EX_SHOW_ONLINE_LAYOUT 0x001 71cdf0e10cSrcweir 72cdf0e10cSrcweir // hard zoom value 73cdf0e10cSrcweir #define EX_SHOW_BUSINESS_CARDS 0x02 74cdf0e10cSrcweir //don't modify page size 75cdf0e10cSrcweir #define EX_SHOW_DEFAULT_PAGE 0x04 76cdf0e10cSrcweir 77cdf0e10cSrcweir class SwView; 78cdf0e10cSrcweir class SW_DLLPUBLIC SwOneExampleFrame 79cdf0e10cSrcweir { 80cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > _xControl; 81cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > _xModel; 82cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > _xController; 83cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > _xCursor; 84cdf0e10cSrcweir 85cdf0e10cSrcweir SwFrmCtrlWindow aTopWindow; 86cdf0e10cSrcweir Window& rWindow; 87cdf0e10cSrcweir Timer aLoadedTimer; 88cdf0e10cSrcweir Link aInitializedLink; 89cdf0e10cSrcweir 90cdf0e10cSrcweir MenuResource aMenuRes; 91cdf0e10cSrcweir String sArgumentURL; 92cdf0e10cSrcweir 93cdf0e10cSrcweir SwView* pModuleView; 94cdf0e10cSrcweir 95cdf0e10cSrcweir sal_uInt32 nStyleFlags; 96cdf0e10cSrcweir 97cdf0e10cSrcweir sal_Bool bIsInitialized; 98cdf0e10cSrcweir sal_Bool bServiceAvailable; 99cdf0e10cSrcweir 100cdf0e10cSrcweir static sal_Bool bShowServiceNotAvailableMessage; 101cdf0e10cSrcweir 102cdf0e10cSrcweir SW_DLLPRIVATE DECL_LINK( TimeoutHdl, Timer* ); 103cdf0e10cSrcweir SW_DLLPRIVATE DECL_LINK( PopupHdl, Menu* ); 104cdf0e10cSrcweir 105cdf0e10cSrcweir SW_DLLPRIVATE void CreateControl(); 106cdf0e10cSrcweir SW_DLLPRIVATE void DisposeControl(); 107cdf0e10cSrcweir 108cdf0e10cSrcweir public: 109cdf0e10cSrcweir SwOneExampleFrame(Window& rWin, 110cdf0e10cSrcweir sal_uInt32 nStyleFlags = EX_SHOW_ONLINE_LAYOUT, 111cdf0e10cSrcweir const Link* pInitalizedLink = 0, 112cdf0e10cSrcweir String* pURL = 0); 113cdf0e10cSrcweir ~SwOneExampleFrame(); 114cdf0e10cSrcweir STAR_REFERENCE(awt::XControl)115cdf0e10cSrcweir STAR_REFERENCE( awt::XControl ) & GetControl() {return _xControl; } STAR_REFERENCE(frame::XModel)116cdf0e10cSrcweir STAR_REFERENCE( frame::XModel ) & GetModel() {return _xModel;} STAR_REFERENCE(frame::XController)117cdf0e10cSrcweir STAR_REFERENCE( frame::XController ) & GetController() {return _xController;} STAR_REFERENCE(text::XTextCursor)118cdf0e10cSrcweir STAR_REFERENCE( text::XTextCursor ) & GetTextCursor() {return _xCursor;} 119cdf0e10cSrcweir 120cdf0e10cSrcweir void ClearDocument( sal_Bool bStartTimer = sal_False ); 121cdf0e10cSrcweir IsInitialized() const122cdf0e10cSrcweir sal_Bool IsInitialized() const {return bIsInitialized;} IsServiceAvailable() const123cdf0e10cSrcweir sal_Bool IsServiceAvailable() const {return bServiceAvailable;} 124cdf0e10cSrcweir 125cdf0e10cSrcweir void CreatePopup(const Point& rPt); 126cdf0e10cSrcweir 127cdf0e10cSrcweir static void CreateErrorMessage(Window* pParent); 128cdf0e10cSrcweir }; 129cdf0e10cSrcweir 130cdf0e10cSrcweir #endif 131cdf0e10cSrcweir 132