Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #ifndef BASCTL_BASIDE3_HXX
21 : : #define BASCTL_BASIDE3_HXX
22 : :
23 : : #include "../basicide/layout.hxx"
24 : : #include <bastypes.hxx>
25 : : #include <svl/undo.hxx>
26 : : #include <vcl/dialog.hxx>
27 : : #include <vcl/button.hxx>
28 : : #include <vcl/lstbox.hxx>
29 : : #include <vcl/fixed.hxx>
30 : :
31 : : #include <com/sun/star/script/XLibraryContainer.hpp>
32 : :
33 : : class Printer;
34 : : class StarBASIC;
35 : : class SfxItemSet;
36 : : class DlgEditor;
37 : : class DlgEdModel;
38 : : class DlgEdPage;
39 : : class DlgEdView;
40 : : class SfxUndoManager;
41 : :
42 : : namespace basctl
43 : : {
44 : :
45 : : class DialogWindowLayout;
46 : : class ObjectCatalog;
47 : :
48 : : class DialogWindow: public IDEBaseWindow
49 : : {
50 : : private:
51 : : DialogWindowLayout& rLayout;
52 : : DlgEditor* pEditor;
53 : : SfxUndoManager* pUndoMgr;
54 : : Link aOldNotifyUndoActionHdl;
55 : : ::rtl::OUString aCurPath;
56 : :
57 : : protected:
58 : : virtual void Paint( const Rectangle& );
59 : : virtual void Resize();
60 : :
61 : : virtual void MouseButtonDown( const MouseEvent& rMEvt );
62 : : virtual void MouseButtonUp( const MouseEvent& rMEvt );
63 : : virtual void MouseMove( const MouseEvent& rMEvt );
64 : : virtual void KeyInput( const KeyEvent& rKEvt );
65 : : virtual void Command( const CommandEvent& rCEvt );
66 : : virtual void LoseFocus();
67 : :
68 : : DECL_LINK( NotifyUndoActionHdl, SfxUndoAction * );
69 : : virtual void DoInit();
70 : : virtual void DoScroll( ScrollBar* pCurScrollBar );
71 : : virtual void DataChanged( const DataChangedEvent& rDCEvt );
72 : : void InitSettings(bool bFont, bool bForeground, bool bBackground);
73 : :
74 : : public:
75 : : TYPEINFO();
76 : : DialogWindow (DialogWindowLayout* pParent, ScriptDocument const& rDocument, rtl::OUString aLibName, rtl::OUString aName, com::sun::star::uno::Reference<com::sun::star::container::XNameContainer> const& xDialogModel);
77 : : DialogWindow( DialogWindow* pCurView ); // never implemented
78 : : ~DialogWindow();
79 : :
80 : : virtual void ExecuteCommand( SfxRequest& rReq );
81 : : virtual void GetState( SfxItemSet& );
82 : 0 : DlgEditor* GetEditor() const { return pEditor; }
83 : : ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > GetDialog() const;
84 : : DlgEdModel* GetModel() const;
85 : : DlgEdPage* GetPage() const;
86 : : DlgEdView* GetView() const;
87 : : bool RenameDialog( const ::rtl::OUString& rNewName );
88 : : void DisableBrowser();
89 : : void UpdateBrowser();
90 : : bool SaveDialog();
91 : : bool ImportDialog();
92 : :
93 : : virtual ::rtl::OUString GetTitle();
94 : : virtual BasicEntryDescriptor CreateEntryDescriptor();
95 : : virtual void SetReadOnly (bool bReadOnly);
96 : : virtual bool IsReadOnly();
97 : :
98 : : virtual void StoreData();
99 : : virtual bool IsModified();
100 : : virtual bool IsPasteAllowed();
101 : :
102 : : virtual ::svl::IUndoManager*
103 : : GetUndoManager();
104 : : // return number of pages to be printed
105 : : virtual sal_Int32 countPages( Printer* pPrinter );
106 : : // print page
107 : : virtual void printPage (sal_Int32 nPage, Printer*);
108 : :
109 : : virtual void Activating ();
110 : : virtual void Deactivating ();
111 : :
112 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
113 : :
114 : : virtual char const* GetHid () const;
115 : : virtual BasicIDEType GetType () const;
116 : : };
117 : :
118 : : //
119 : : // DialogWindowLayout
120 : : //
121 : 0 : class DialogWindowLayout : public Layout
122 : : {
123 : : public:
124 : : DialogWindowLayout (Window* pParent, ObjectCatalog&);
125 : : public:
126 : : // Layout:
127 : : virtual void Activating (IDEBaseWindow&);
128 : : virtual void Deactivating ();
129 : : virtual void GetState (SfxItemSet&, unsigned nWhich);
130 : 0 : virtual void UpdateDebug (bool){};
131 : : protected:
132 : : // Layout:
133 : : virtual void OnFirstSize (int nWidth, int nHeight);
134 : :
135 : : private:
136 : : // child window
137 : : DialogWindow* pChild;
138 : : // dockable windows
139 : : ObjectCatalog& rObjectCatalog;
140 : : // TODO property browser
141 : : };
142 : :
143 : :
144 : : } // namespace basctl
145 : :
146 : : #endif // BASCTL_BASIDE3_HXX
147 : :
148 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|