android: Update app-specific/MIME type icons
[LibreOffice.git] / sw / source / core / access / accfrmobjslist.hxx
blob9df293d71e2f02e9327379f799e5b3e1cd79291a
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_SW_SOURCE_CORE_ACCESS_ACCFRMOBJSLIST_HXX
21 #define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRMOBJSLIST_HXX
23 #include "accfrmobj.hxx"
24 #include <swrect.hxx>
26 class SwAccessibleMap;
27 class SwAccessibleChildSList;
29 class SwAccessibleChildSList_const_iterator
31 private:
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 )
39 : m_rList( rLst )
40 , m_nNextObj( 0 )
43 SwAccessibleChildSList_const_iterator( const SwAccessibleChildSList& rLst,
44 SwAccessibleMap& rAccMap );
46 SwAccessibleChildSList_const_iterator& next();
47 SwAccessibleChildSList_const_iterator& next_visible();
49 public:
50 bool operator==( const SwAccessibleChildSList_const_iterator& r ) const
52 return m_aCurr == r.m_aCurr;
55 bool operator!=(
56 const SwAccessibleChildSList_const_iterator& r ) const
58 return !(*this == r);
61 SwAccessibleChildSList_const_iterator& operator++();
63 const sw::access::SwAccessibleChild& operator*() const
65 return m_aCurr;
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;
77 public:
78 typedef SwAccessibleChildSList_const_iterator const_iterator;
80 SwAccessibleChildSList( const SwFrame& rFrame,
81 SwAccessibleMap& rAccMap )
82 : maVisArea()
83 , mrFrame( rFrame )
84 , mbVisibleChildrenOnly( false )
85 , mrAccMap( rAccMap )
88 SwAccessibleChildSList( const SwRect& rVisArea,
89 const SwFrame& rFrame,
90 SwAccessibleMap& rAccMap )
91 : maVisArea( rVisArea )
92 , mrFrame( rFrame )
93 , mbVisibleChildrenOnly( sw::access::SwAccessibleChild( &rFrame ).IsVisibleChildrenOnly() )
94 , mrAccMap( rAccMap )
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
110 return mrFrame;
113 bool IsVisibleChildrenOnly() const
115 return mbVisibleChildrenOnly;
118 const SwRect& GetVisArea() const
120 return maVisArea;
123 SwAccessibleMap& GetAccMap() const
125 return mrAccMap;
129 #endif
131 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */