xref: /trunk/main/basctl/source/inc/baside3.hxx (revision 96821c26)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _BASIDE3_HXX
25 #define _BASIDE3_HXX
26 
27 #ifndef _SVHEADER_HXX
28 //#include <svheader.hxx>
29 #endif
30 
31 #include <bastypes.hxx>
32 #include <svl/undo.hxx>
33 #include <vcl/dialog.hxx>
34 #include <vcl/button.hxx>
35 #include <vcl/lstbox.hxx>
36 #include <vcl/fixed.hxx>
37 
38 #ifndef _COM_SUN_STAR_SCRIPT_XLIBRYARYCONTAINER_HPP_
39 #include <com/sun/star/script/XLibraryContainer.hpp>
40 #endif
41 
42 class Printer;
43 class StarBASIC;
44 class SfxItemSet;
45 class DlgEditor;
46 class DlgEdModel;
47 class DlgEdPage;
48 class DlgEdView;
49 class SfxUndoManager;
50 
51 class DialogWindow: public IDEBaseWindow
52 {
53 private:
54 	DlgEditor*			pEditor;
55 	SfxUndoManager*		pUndoMgr;
56 	Link				aOldNotifyUndoActionHdl;
57 	String				aCurPath;
58 
59 protected:
60 	virtual void 		Paint( const Rectangle& );
61 	virtual void 		Resize();
62 
63 	virtual void 		MouseButtonDown( const MouseEvent& rMEvt );
64 	virtual void 		MouseButtonUp( const MouseEvent& rMEvt );
65 	virtual void 		MouseMove( const MouseEvent& rMEvt );
66 	virtual void 		KeyInput( const KeyEvent& rKEvt );
67 	virtual void		Command( const CommandEvent& rCEvt );
68 	virtual void		LoseFocus();
69 
70 	DECL_LINK( NotifyUndoActionHdl, SfxUndoAction * );
71 	virtual	void		DoInit();
72 	virtual void		DoScroll( ScrollBar* pCurScrollBar );
73 	virtual void 		DataChanged( const DataChangedEvent& rDCEvt );
74 	void 				InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground);
75 
76 public:
77 						TYPEINFO();
78 						DialogWindow( Window* pParent, const ScriptDocument& rDocument, String aLibName, String aName,
79 							const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xDialogModel );
80 						DialogWindow( DialogWindow* pCurView ); // never implemented
81 						~DialogWindow();
82 
83 	virtual void		ExecuteCommand( SfxRequest& rReq );
84 	virtual void		GetState( SfxItemSet& );
GetEditor() const85 	DlgEditor*			GetEditor() const 	{ return pEditor; }
86 	::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >	GetDialog() const;
87 	DlgEdModel*			GetModel() const;
88 	DlgEdPage*			GetPage() const;
89 	DlgEdView*			GetView() const;
90 	sal_Bool				RenameDialog( const String& rNewName );
91 	void				DisableBrowser();
92 	void				UpdateBrowser();
93 	sal_Bool				SaveDialog();
94 	sal_Bool				ImportDialog();
95 
96 	virtual String		GetTitle();
97     virtual BasicEntryDescriptor CreateEntryDescriptor();
98 	virtual void	    SetReadOnly( sal_Bool bReadOnly );
99     virtual sal_Bool        IsReadOnly();
100 
101 	virtual void		StoreData();
102 	virtual sal_Bool		IsModified();
103     virtual sal_Bool        IsPasteAllowed();
104 
105     virtual ::svl::IUndoManager*
106                         GetUndoManager();
107     // return number of pages to be printed
108     virtual sal_Int32 countPages( Printer* pPrinter );
109     // print page
110     virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
111 	virtual void		Deactivating();
112 
113     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
114 };
115 
116 #endif	// _BASIDE3_HXX
117