1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _BASIDE3_HXX 29 #define _BASIDE3_HXX 30 31 #ifndef _SVHEADER_HXX 32 //#include <svheader.hxx> 33 #endif 34 35 #include <bastypes.hxx> 36 #include <svl/undo.hxx> 37 #include <vcl/dialog.hxx> 38 #include <vcl/button.hxx> 39 #include <vcl/lstbox.hxx> 40 #include <vcl/fixed.hxx> 41 42 #ifndef _COM_SUN_STAR_SCRIPT_XLIBRYARYCONTAINER_HPP_ 43 #include <com/sun/star/script/XLibraryContainer.hpp> 44 #endif 45 46 class Printer; 47 class StarBASIC; 48 class SfxItemSet; 49 class DlgEditor; 50 class DlgEdModel; 51 class DlgEdPage; 52 class DlgEdView; 53 class SfxUndoManager; 54 55 class DialogWindow: public IDEBaseWindow 56 { 57 private: 58 DlgEditor* pEditor; 59 SfxUndoManager* pUndoMgr; 60 Link aOldNotifyUndoActionHdl; 61 String aCurPath; 62 63 protected: 64 virtual void Paint( const Rectangle& ); 65 virtual void Resize(); 66 67 virtual void MouseButtonDown( const MouseEvent& rMEvt ); 68 virtual void MouseButtonUp( const MouseEvent& rMEvt ); 69 virtual void MouseMove( const MouseEvent& rMEvt ); 70 virtual void KeyInput( const KeyEvent& rKEvt ); 71 virtual void Command( const CommandEvent& rCEvt ); 72 virtual void LoseFocus(); 73 74 DECL_LINK( NotifyUndoActionHdl, SfxUndoAction * ); 75 virtual void DoInit(); 76 virtual void DoScroll( ScrollBar* pCurScrollBar ); 77 virtual void DataChanged( const DataChangedEvent& rDCEvt ); 78 void InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground); 79 80 public: 81 TYPEINFO(); 82 DialogWindow( Window* pParent, const ScriptDocument& rDocument, String aLibName, String aName, 83 const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xDialogModel ); 84 DialogWindow( DialogWindow* pCurView ); // never implemented 85 ~DialogWindow(); 86 87 virtual void ExecuteCommand( SfxRequest& rReq ); 88 virtual void GetState( SfxItemSet& ); 89 DlgEditor* GetEditor() const { return pEditor; } 90 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > GetDialog() const; 91 DlgEdModel* GetModel() const; 92 DlgEdPage* GetPage() const; 93 DlgEdView* GetView() const; 94 sal_Bool RenameDialog( const String& rNewName ); 95 void DisableBrowser(); 96 void UpdateBrowser(); 97 sal_Bool SaveDialog(); 98 sal_Bool ImportDialog(); 99 100 virtual String GetTitle(); 101 virtual BasicEntryDescriptor CreateEntryDescriptor(); 102 virtual void SetReadOnly( sal_Bool bReadOnly ); 103 virtual sal_Bool IsReadOnly(); 104 105 virtual void StoreData(); 106 virtual sal_Bool IsModified(); 107 virtual sal_Bool IsPasteAllowed(); 108 109 virtual ::svl::IUndoManager* 110 GetUndoManager(); 111 // return number of pages to be printed 112 virtual sal_Int32 countPages( Printer* pPrinter ); 113 // print page 114 virtual void printPage( sal_Int32 nPage, Printer* pPrinter ); 115 virtual void Deactivating(); 116 117 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); 118 }; 119 120 #endif // _BASIDE3_HXX 121