nss: upgrade to release 3.73
[LibreOffice.git] / chart2 / source / controller / inc / ChartWindow.hxx
blobe7aa36d91cc8a15732e837fb3bef9b9a9352eebf
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 #pragma once
21 #include <vcl/window.hxx>
23 namespace chart
26 class ChartController;
28 /** The ChartWindow collects events from the window and forwards them the to the controller
29 thus the controller can perform appropriate actions
32 class ChartWindow : public vcl::Window
34 public:
35 ChartWindow( ChartController* pController, vcl::Window* pParent, WinBits nStyle );
36 virtual ~ChartWindow() override;
37 virtual void dispose() override;
39 //from base class Window:
40 virtual void PrePaint(vcl::RenderContext& rRenderContext) override;
41 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
42 virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
43 virtual void MouseMove( const MouseEvent& rMEvt ) override;
44 virtual void Tracking( const TrackingEvent& rTEvt ) override;
45 virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
46 virtual void Resize() override;
47 virtual void Activate() override;
48 virtual void Deactivate() override;
49 virtual void GetFocus() override;
50 virtual void LoseFocus() override;
51 virtual void Command( const CommandEvent& rCEvt ) override;
52 virtual void KeyInput( const KeyEvent& rKEvt ) override;
53 virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
54 virtual void RequestHelp( const HelpEvent& rHEvt ) override;
56 /// For LibreOfficeKit, we need to route these to the mouse events.
57 virtual void LogicMouseButtonDown(const MouseEvent&) override;
58 virtual void LogicMouseButtonUp(const MouseEvent&) override;
59 virtual void LogicMouseMove(const MouseEvent&) override;
61 void ForceInvalidate();
62 virtual void Invalidate( InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
63 virtual void Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
64 virtual void Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags = InvalidateFlags::NONE ) override;
65 /// Notify the LOK client about an invalidated area.
66 virtual void LogicInvalidate( const tools::Rectangle* pRectangle ) override;
68 virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
70 virtual FactoryFunction GetUITestFactory() const override;
72 ChartController* GetController();
74 virtual bool IsChart() const override { return true; }
75 vcl::Window* GetParentEditWin();
77 private:
78 // returns the chart bounding box in twips
79 tools::Rectangle GetBoundingBox();
81 private:
82 ChartController* m_pWindowController;
83 bool m_bInPaint;
84 VclPtr<vcl::Window> m_pViewShellWindow;
86 void adjustHighContrastMode();
89 } //namespace chart
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */