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