LibreOffice Module dbaccess (master) 1
dataview.hxx
Go to the documentation of this file.
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#ifndef INCLUDED_DBACCESS_DATAVIEW_HXX
20#define INCLUDED_DBACCESS_DATAVIEW_HXX
21
22#include <memory>
23
24#include <com/sun/star/uno/Reference.hxx>
26#include <rtl/ref.hxx>
27#include <vcl/wintypes.hxx>
28#include <vcl/outdev.hxx>
29#include <vcl/window.hxx>
30
31namespace com::sun::star {
32 namespace frame { class XFrame; }
33 namespace uno { class XComponentContext; }
34}
35
36namespace svt {
37 class AcceleratorExecute;
38}
39
40class NotifyEvent;
41namespace tools { class Rectangle; }
42
43namespace dbaui
44{
45 class IController;
47 {
48 css::uno::Reference< css::uno::XComponentContext > m_xContext; // the service factory to work with
49
50 protected:
51 rtl::Reference<IController> m_xController; // the controller where we reside in
52 ::std::unique_ptr< ::svt::AcceleratorExecute> m_pAccel;
53
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;
61
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;
69
70 IController& getCommandController() const { return *m_xController; }
71
72 const css::uno::Reference< css::uno::XComponentContext >& getORB() const { return m_xContext;}
73
74 // the default implementation simply calls resizeAll( GetSizePixel() )
75 virtual void Resize() override;
76
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;
81
83 virtual void resizeAll( const tools::Rectangle& _rPlayground );
84
85 // re-arrange the controls belonging to the document itself
86 virtual void resizeDocumentView( tools::Rectangle& _rPlayground );
87 };
88}
89#endif // INCLUDED_DBACCESS_DATAVIEW_HXX
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: dataview.hxx:48
const css::uno::Reference< css::uno::XComponentContext > & getORB() const
Definition: dataview.hxx:72
virtual void initialize()
Definition: dataview.hxx:65
::std::unique_ptr< ::svt::AcceleratorExecute > m_pAccel
Definition: dataview.hxx:52
IController & getCommandController() const
Definition: dataview.hxx:70
rtl::Reference< IController > m_xController
Definition: dataview.hxx:51
Reference< XComponentContext > m_xContext
#define DBACCESS_DLLPUBLIC
void dispose()
StateChangedType
sal_Int64 WinBits