1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_CHART2_SOURCE_CONTROLLER_MAIN_CHARTWINDOW_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_CHARTWINDOW_HXX
22 #include <vcl/window.hxx>
27 class ChartController
;
29 /** The ChartWindow collects events from the window and forwards them the to the controller
30 thus the controller can perform appropriate actions
33 class ChartWindow
: public vcl::Window
36 ChartWindow( ChartController
* pController
, vcl::Window
* pParent
, WinBits nStyle
);
37 virtual ~ChartWindow() override
;
38 virtual void dispose() override
;
40 //from base class Window:
41 virtual void PrePaint(vcl::RenderContext
& rRenderContext
) override
;
42 virtual void Paint(vcl::RenderContext
& rRenderContext
, const tools::Rectangle
& rRect
) override
;
43 virtual void MouseButtonDown( const MouseEvent
& rMEvt
) override
;
44 virtual void MouseMove( const MouseEvent
& rMEvt
) override
;
45 virtual void Tracking( const TrackingEvent
& rTEvt
) override
;
46 virtual void MouseButtonUp( const MouseEvent
& rMEvt
) override
;
47 virtual void Resize() override
;
48 virtual void Activate() override
;
49 virtual void Deactivate() override
;
50 virtual void GetFocus() override
;
51 virtual void LoseFocus() override
;
52 virtual void Command( const CommandEvent
& rCEvt
) override
;
53 virtual void KeyInput( const KeyEvent
& rKEvt
) override
;
54 virtual void DataChanged( const DataChangedEvent
& rDCEvt
) override
;
55 virtual void RequestHelp( const HelpEvent
& rHEvt
) override
;
57 /// For LibreOfficeKit, we need to route these to the mouse events.
58 virtual void LogicMouseButtonDown(const MouseEvent
&) override
;
59 virtual void LogicMouseButtonUp(const MouseEvent
&) override
;
60 virtual void LogicMouseMove(const MouseEvent
&) override
;
62 void ForceInvalidate();
63 virtual void Invalidate( InvalidateFlags nFlags
= InvalidateFlags::NONE
) override
;
64 virtual void Invalidate( const tools::Rectangle
& rRect
, InvalidateFlags nFlags
= InvalidateFlags::NONE
) override
;
65 virtual void Invalidate( const vcl::Region
& rRegion
, InvalidateFlags nFlags
= InvalidateFlags::NONE
) override
;
66 /// Notify the LOK client about an invalidated area.
67 virtual void LogicInvalidate( const tools::Rectangle
* pRectangle
) override
;
69 virtual css::uno::Reference
< css::accessibility::XAccessible
> CreateAccessible() override
;
71 virtual FactoryFunction
GetUITestFactory() const override
;
73 ChartController
* GetController();
75 virtual bool IsChart() const override
{ return true; }
76 vcl::Window
* GetParentEditWin();
79 // returns the chart bounding box in twips
80 tools::Rectangle
GetBoundingBox();
83 ChartController
* m_pWindowController
;
85 VclPtr
<vcl::Window
> m_pViewShellWindow
;
87 void adjustHighContrastMode();
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */