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 .
20 #ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRMOBJSLIST_HXX
21 #define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRMOBJSLIST_HXX
23 #include "accfrmobj.hxx"
26 class SwAccessibleMap
;
27 class SwAccessibleChildSList
;
29 class SwAccessibleChildSList_const_iterator
32 friend class SwAccessibleChildSList
;
34 const SwAccessibleChildSList
& m_rList
; // The frame we are iterating over
35 sw::access::SwAccessibleChild m_aCurr
; // The current object
36 size_t m_nNextObj
; // The index of the current sdr object
38 SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList
& rLst
)
43 SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList
& rLst
,
44 SwAccessibleMap
& rAccMap
);
46 SwAccessibleChildSList_const_iterator
& next();
47 SwAccessibleChildSList_const_iterator
& next_visible();
50 bool operator==( const SwAccessibleChildSList_const_iterator
& r
) const
52 return m_aCurr
== r
.m_aCurr
;
56 const SwAccessibleChildSList_const_iterator
& r
) const
61 SwAccessibleChildSList_const_iterator
& operator++();
63 const sw::access::SwAccessibleChild
& operator*() const
69 // An iterator to iterate over a frame's child in any order
70 class SwAccessibleChildSList
72 const SwRect maVisArea
;
73 const SwFrame
& mrFrame
;
74 const bool mbVisibleChildrenOnly
;
75 SwAccessibleMap
& mrAccMap
;
78 typedef SwAccessibleChildSList_const_iterator const_iterator
;
80 SwAccessibleChildSList( const SwFrame
& rFrame
,
81 SwAccessibleMap
& rAccMap
)
84 , mbVisibleChildrenOnly( false )
88 SwAccessibleChildSList( const SwRect
& rVisArea
,
89 const SwFrame
& rFrame
,
90 SwAccessibleMap
& rAccMap
)
91 : maVisArea( rVisArea
)
93 , mbVisibleChildrenOnly( sw::access::SwAccessibleChild( &rFrame
).IsVisibleChildrenOnly() )
98 const_iterator
begin() const
100 return SwAccessibleChildSList_const_iterator( *this, mrAccMap
);
103 const_iterator
end() const
105 return SwAccessibleChildSList_const_iterator( *this );
108 const SwFrame
& GetFrame() const
113 bool IsVisibleChildrenOnly() const
115 return mbVisibleChildrenOnly
;
118 const SwRect
& GetVisArea() const
123 SwAccessibleMap
& GetAccMap() const
131 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */