workaround segfault in compiler on macos-clang-intel
[LibreOffice.git] / include / dbaccess / dataview.hxx
blob702f785b0a52c9a892df849fad6427a3aa27c828
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 <vcl/wintypes.hxx>
28 #include <vcl/outdev.hxx>
29 #include <vcl/window.hxx>
31 namespace com::sun::star {
32 namespace frame { class XFrame; }
33 namespace uno { class XComponentContext; }
36 namespace svt {
37 class AcceleratorExecute;
40 class NotifyEvent;
41 namespace tools { class Rectangle; }
43 namespace dbaui
45 class IController;
46 class UNLESS_MERGELIBS_MORE(DBACCESS_DLLPUBLIC) ODataView : public vcl::Window
48 css::uno::Reference< css::uno::XComponentContext > m_xContext; // the service factory to work with
50 protected:
51 rtl::Reference<IController> m_xController; // the controller where we reside in
52 ::std::unique_ptr< ::svt::AcceleratorExecute> m_pAccel;
54 public:
55 ODataView( vcl::Window* pParent,
56 IController& _rController,
57 const css::uno::Reference< css::uno::XComponentContext >& ,
58 WinBits nStyle = 0 );
59 virtual ~ODataView() override;
60 virtual void dispose() override;
62 /// late construction
63 virtual void Construct();
64 // initialize will be called when after the controller finished his initialize method
65 virtual void initialize(){}
66 // window overridables
67 virtual bool PreNotify( NotifyEvent& rNEvt ) override;
68 virtual void StateChanged( StateChangedType nStateChange ) override;
70 IController& getCommandController() const { return *m_xController; }
72 const css::uno::Reference< css::uno::XComponentContext >& getORB() const { return m_xContext;}
74 // the default implementation simply calls resizeAll( GetSizePixel() )
75 virtual void Resize() override;
77 void attachFrame(const css::uno::Reference< css::frame::XFrame >& _xFrame);
78 protected:
79 // window overridables
80 virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& _rRect ) override;
82 /// re-arrange all controls, including the toolbox, it's separator, and the "real view"
83 virtual void resizeAll( const tools::Rectangle& _rPlayground );
85 // re-arrange the controls belonging to the document itself
86 virtual void resizeDocumentView( tools::Rectangle& _rPlayground );
89 #endif // INCLUDED_DBACCESS_DATAVIEW_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */