Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sd / source / console / PresenterAccessibility.hxx
blob12015d0938d0fd0350aff6660310c0660c1d1cb8
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 .
20 #ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERACCESSIBILITY_HXX
21 #define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERACCESSIBILITY_HXX
23 #include "PresenterPaneContainer.hxx"
25 #include <com/sun/star/accessibility/XAccessible.hpp>
26 #include <com/sun/star/awt/XFocusListener.hpp>
27 #include <com/sun/star/drawing/framework/XPane.hpp>
28 #include <com/sun/star/drawing/framework/XPane2.hpp>
29 #include <com/sun/star/lang/XInitialization.hpp>
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include <cppuhelper/compbase.hxx>
32 #include <cppuhelper/basemutex.hxx>
33 #include <rtl/ref.hxx>
34 #include <memory>
37 namespace sdext::presenter {
39 class PresenterController;
40 class PresenterTextView;
42 typedef ::cppu::WeakComponentImplHelper <
43 css::accessibility::XAccessible,
44 css::lang::XInitialization,
45 css::awt::XFocusListener
46 > PresenterAccessibleInterfaceBase;
48 class PresenterAccessible
49 : public ::cppu::BaseMutex,
50 public PresenterAccessibleInterfaceBase
52 public:
53 PresenterAccessible (
54 css::uno::Reference<css::uno::XComponentContext> xContext,
55 ::rtl::Reference<PresenterController> xPresenterController,
56 const css::uno::Reference<css::drawing::framework::XPane>& rxMainPane);
57 virtual ~PresenterAccessible() override;
59 void UpdateAccessibilityHierarchy();
61 void NotifyCurrentSlideChange ();
63 virtual void SAL_CALL disposing() override;
65 //----- XAccessible -------------------------------------------------------
67 virtual css::uno::Reference<css::accessibility::XAccessibleContext> SAL_CALL
68 getAccessibleContext() override;
70 //----- XFocusListener ----------------------------------------------------
72 virtual void SAL_CALL focusGained (const css::awt::FocusEvent& rEvent) override;
74 virtual void SAL_CALL focusLost (const css::awt::FocusEvent& rEvent) override;
76 //----- XEventListener ----------------------------------------------------
78 virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent) override;
80 //----- XInitialization ---------------------------------------------------
82 virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments) override;
84 class AccessibleObject;
85 class AccessibleParagraph;
87 private:
88 const css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
89 ::rtl::Reference<PresenterController> mpPresenterController;
90 css::uno::Reference<css::drawing::framework::XPane2> mxMainPane;
91 css::uno::Reference<css::awt::XWindow> mxMainWindow;
92 css::uno::Reference<css::awt::XWindow> mxPreviewContentWindow;
93 css::uno::Reference<css::awt::XWindow> mxPreviewBorderWindow;
94 css::uno::Reference<css::awt::XWindow> mxNotesContentWindow;
95 css::uno::Reference<css::awt::XWindow> mxNotesBorderWindow;
96 ::rtl::Reference<AccessibleObject> mpAccessibleConsole;
97 ::rtl::Reference<AccessibleObject> mpAccessiblePreview;
98 ::rtl::Reference<AccessibleObject> mpAccessibleNotes;
99 css::uno::Reference<css::accessibility::XAccessible> mxAccessibleParent;
101 void UpdateAccessibilityHierarchy (
102 const css::uno::Reference<css::awt::XWindow>& rxPreviewContentWindow,
103 const css::uno::Reference<css::awt::XWindow>& rxPreviewBorderWindow,
104 const OUString& rsTitle,
105 const css::uno::Reference<css::awt::XWindow>& rxNotesContentWindow,
106 const css::uno::Reference<css::awt::XWindow>& rxNotesBorderWindow,
107 const std::shared_ptr<PresenterTextView>& rpNotesTextView);
108 PresenterPaneContainer::SharedPaneDescriptor GetPreviewPane() const;
111 } // end of namespace ::sd::presenter
113 #endif
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */