]> git.lyx.org Git - lyx.git/blob - src/graphics/GraphicsSupport.h
partial framebox support
[lyx.git] / src / graphics / GraphicsSupport.h
1 // -*- C++ -*-
2 /**
3  *  \file GraphicsSupport.h
4  *  Copyright 2002 the LyX Team
5  *  Read the file COPYING
6  *
7  * \author Angus Leeming <leeming@lyx.org>
8  */
9
10 #ifndef GRAPHICSSUPPORT_H
11 #define GRAPHICSSUPPORT_H
12
13 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "support/types.h"
18 #include <list>
19
20 class BufferView;
21 class Inset;
22 class Paragraph;
23
24 /** A Paragraph * together with delimiters for the start and end positions
25     of visibility.
26  */
27 struct VisibleParagraph {
28         ///
29         VisibleParagraph() : par(0), start(0), end(0) {}
30         ///
31         VisibleParagraph(Paragraph * p, lyx::pos_type s, lyx::pos_type e)
32                 : par(p), start(s), end(e) {}
33         ///
34         Paragraph * par;
35         ///
36         lyx::pos_type start;
37         ///
38         lyx::pos_type end;
39 };
40
41
42 /// Returns a list of all Paragraphs currently visible in bv.
43 std::list<VisibleParagraph> const getVisibleParagraphs(BufferView const & bv);
44
45 /** Given this data, check whether inset lies within it and is, therefore,
46  *  visible.
47  */
48 bool isInsetVisible(Inset const & inset, std::list<VisibleParagraph> const &);
49
50 #endif // GRAPHICSSUPPORT_H