nss: upgrade to release 3.73
[LibreOffice.git] / include / dbaccess / dataview.hxx
blobe6f47a351a6f7261c39cdbfd6491a83c7dbed986
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 .
19 #ifndef INCLUDED_DBACCESS_DATAVIEW_HXX
20 #define INCLUDED_DBACCESS_DATAVIEW_HXX
22 #include <memory>
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <dbaccess/dbaccessdllapi.h>
26 #include <rtl/ref.hxx>
27 #include <tools/wintypes.hxx>
28 #include <vcl/outdev.hxx>
29 #include <vcl/vclptr.hxx>
30 #include <vcl/window.hxx>
32 namespace com::sun::star {
33 namespace frame { class XFrame; }
34 namespace uno { class XComponentContext; }
37 namespace svt {
38 class AcceleratorExecute;
41 class NotifyEvent;
42 namespace tools { class Rectangle; }
44 namespace dbaui
46 class IController;
47 class DBACCESS_DLLPUBLIC ODataView : public vcl::Window
49 css::uno::Reference< css::uno::XComponentContext > m_xContext; // the service factory to work with
51 protected:
52 rtl::Reference<IController> m_xController; // the controller where we reside in
53 ::std::unique_ptr< ::svt::AcceleratorExecute> m_pAccel;
55 public:
56 ODataView( vcl::Window* pParent,
57 IController& _rController,
58 const css::uno::Reference< css::uno::XComponentContext >& ,
59 WinBits nStyle = 0 );
60 virtual ~ODataView() override;
61 virtual void dispose() override;
63 /// late construction
64 virtual void Construct();
65 // initialize will be called when after the controller finished his initialize method
66 virtual void initialize(){}
67 // window overridables
68 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
69 virtual void StateChanged( StateChangedType nStateChange ) override;
71 IController& getCommandController() const { return *m_xController; }
73 const css::uno::Reference< css::uno::XComponentContext >& getORB() const { return m_xContext;}
75 // the default implementation simply calls resizeAll( GetSizePixel() )
76 virtual void Resize() override;
78 void attachFrame(const css::uno::Reference< css::frame::XFrame >& _xFrame);
79 protected:
80 // window overridables
81 virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect ) override;
83 /// re-arrange all controls, including the toolbox, it's separator, and the "real view"
84 virtual void resizeAll( const tools::Rectangle& _rPlayground );
86 // re-arrange the controls belonging to the document itself
87 virtual void resizeDocumentView( tools::Rectangle& _rPlayground );
90 #endif // INCLUDED_DBACCESS_DATAVIEW_HXX
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */