tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / chart2 / source / controller / inc / ChartWindow.hxx
blob918805cb3a8a33398abfeeee170bb5b14a14ee9b
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 final : 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 void ForceInvalidate();
57 virtual void ImplInvalidate( const vcl::Region* rRegion, InvalidateFlags nFlags ) override;
58 /// Notify the LOK client about an invalidated area.
59 virtual void LogicInvalidate( const tools::Rectangle* pRectangle ) override;
61 virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
63 virtual FactoryFunction GetUITestFactory() const override;
65 ChartController* GetController();
67 virtual bool IsChart() const override { return true; }
68 vcl::Window* GetParentEditWin();
70 private:
71 // returns the chart bounding box in twips
72 tools::Rectangle GetBoundingBox();
74 private:
75 ChartController* m_pWindowController;
76 bool m_bInPaint;
77 VclPtr<vcl::Window> m_pViewShellWindow;
79 void adjustHighContrastMode();
82 } //namespace chart
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */