fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / basctl / source / inc / baside3.hxx
blobeaeefdd64b7b74a434bf77aba639c33a4aa27085
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef BASCTL_BASIDE3_HXX
21 #define BASCTL_BASIDE3_HXX
23 #include "../basicide/layout.hxx"
24 #include "bastypes.hxx"
25 #include "propbrw.hxx"
27 #include <svl/undo.hxx>
28 #include <vcl/dialog.hxx>
29 #include <vcl/button.hxx>
30 #include <vcl/lstbox.hxx>
31 #include <vcl/fixed.hxx>
33 #include <com/sun/star/script/XLibraryContainer.hpp>
35 #include <boost/scoped_ptr.hpp>
37 class Printer;
38 class StarBASIC;
39 class SfxItemSet;
40 class SfxUndoManager;
42 namespace basctl
45 class DlgEditor;
46 class DlgEdModel;
47 class DlgEdPage;
48 class DlgEdView;
50 class DialogWindowLayout;
51 class ObjectCatalog;
53 class DialogWindow: public BaseWindow
55 private:
56 DialogWindowLayout& rLayout;
57 boost::scoped_ptr<DlgEditor> pEditor; // never nullptr
58 boost::scoped_ptr<SfxUndoManager> pUndoMgr; // never nullptr
59 Link aOldNotifyUndoActionHdl;
60 OUString aCurPath;
62 protected:
63 virtual void Paint( const Rectangle& );
64 virtual void Resize();
66 virtual void MouseButtonDown( const MouseEvent& rMEvt );
67 virtual void MouseButtonUp( const MouseEvent& rMEvt );
68 virtual void MouseMove( const MouseEvent& rMEvt );
69 virtual void KeyInput( const KeyEvent& rKEvt );
70 virtual void Command( const CommandEvent& rCEvt );
71 virtual void LoseFocus();
73 DECL_LINK( NotifyUndoActionHdl, SfxUndoAction * );
74 virtual void DoInit();
75 virtual void DoScroll( ScrollBar* pCurScrollBar );
76 virtual void DataChanged( const DataChangedEvent& rDCEvt );
77 void InitSettings(bool bFont, bool bForeground, bool bBackground);
79 public:
80 TYPEINFO();
81 DialogWindow (DialogWindowLayout* pParent, ScriptDocument const& rDocument, OUString aLibName, OUString aName, com::sun::star::uno::Reference<com::sun::star::container::XNameContainer> const& xDialogModel);
82 DialogWindow( DialogWindow* pCurView ); // never implemented
83 ~DialogWindow();
85 virtual void ExecuteCommand( SfxRequest& rReq );
86 virtual void GetState( SfxItemSet& );
87 DlgEditor& GetEditor() const { return *pEditor; }
88 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > GetDialog() const;
89 DlgEdModel& GetModel() const;
90 DlgEdPage& GetPage() const;
91 DlgEdView& GetView() const;
92 bool RenameDialog( const OUString& rNewName );
93 void DisableBrowser();
94 void UpdateBrowser();
95 bool SaveDialog();
96 bool ImportDialog();
98 virtual OUString GetTitle();
99 virtual EntryDescriptor CreateEntryDescriptor();
100 virtual void SetReadOnly (bool bReadOnly);
101 virtual bool IsReadOnly();
103 virtual void StoreData();
104 virtual bool IsModified();
105 virtual bool IsPasteAllowed();
107 virtual svl::IUndoManager* GetUndoManager();
108 // return number of pages to be printed
109 virtual sal_Int32 countPages( Printer* pPrinter );
110 // print page
111 virtual void printPage (sal_Int32 nPage, Printer*);
113 virtual void Activating ();
114 virtual void Deactivating ();
116 virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
118 virtual char const* GetHid () const;
119 virtual ItemType GetType () const;
123 // DialogWindowLayout
125 class DialogWindowLayout : public Layout
127 public:
128 DialogWindowLayout (Window* pParent, ObjectCatalog&);
129 ~DialogWindowLayout();
130 public:
131 void ShowPropertyBrowser ();
132 void UpdatePropertyBrowser ();
133 void DisablePropertyBrowser ();
134 public:
135 // Layout:
136 virtual void Activating (BaseWindow&);
137 virtual void Deactivating ();
138 virtual void ExecuteGlobal (SfxRequest&);
139 virtual void GetState (SfxItemSet&, unsigned nWhich);
140 virtual void UpdateDebug (bool){};
141 protected:
142 // Layout:
143 virtual void OnFirstSize (long nWidth, long nHeight);
145 private:
146 // child window
147 DialogWindow* pChild;
148 // dockable windows:
149 // object catalog (owned by Shell)
150 ObjectCatalog& rObjectCatalog;
151 // property browser (created by this, deleted by toolkit)
152 PropBrw* pPropertyBrowser;
154 private:
155 void AddPropertyBrowser ();
156 private:
157 friend class DialogWindow;
161 } // namespace basctl
163 #endif // BASCTL_BASIDE3_HXX
165 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */