LibreOffice Module svx (master) 1
AccessibleTextEventQueue.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
20#ifndef INCLUDED_SVX_SOURCE_ACCESSIBILITY_ACCESSIBLETEXTEVENTQUEUE_HXX
21#define INCLUDED_SVX_SOURCE_ACCESSIBILITY_ACCESSIBLETEXTEVENTQUEUE_HXX
22
23#include <memory>
24#include <deque>
25#include <algorithm>
26
27class SfxHint;
28class SdrHint;
29class TextHint;
32
33namespace accessibility
34{
42 {
43 public:
44 typedef ::std::deque< SfxHint* > EventQueue;
45
48
50 void Append( const SdrHint& rHint );
52 void Append( const TextHint& rHint );
54 void Append( const SvxViewChangedHint& rHint );
56 void Append( const SvxEditSourceHint& rHint );
57
62 ::std::unique_ptr< SfxHint > PopFront();
63
70 template < typename Functor > void ForEach( Functor& rFunctor ) const
71 {
72 // #109864# Make sure results are put back into rFunctor
73 rFunctor = ::std::for_each( maEventQueue.begin(), maEventQueue.end(), rFunctor );
74 }
75
77 bool IsEmpty() const;
78
80 void Clear();
81
82 private:
84 };
85
86} // end of namespace accessibility
87
88#endif // INCLUDED_SVX_SOURCE_ACCESSIBILITY_ACCESSIBLETEXTEVENTQUEUE_HXX
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class handles the notification events for the AccessibleTextHelper class.
void Append(const SdrHint &rHint)
Append event to end of queue.
::std::unique_ptr< SfxHint > PopFront()
Pop first queue element.
bool IsEmpty() const
Query whether queue is empty.
void ForEach(Functor &rFunctor) const
Apply functor to every queue member.