lyx_mirror/src/graphics/GraphicsSupport.h
Angus Leeming 16b928088f Smart loading of image files for previews and for the graphics inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4638 a592a061-630c-0410-9148-cb99ea01b6c8
2002-07-15 11:08:46 +00:00

51 lines
1.0 KiB
C++

// -*- C++ -*-
/**
* \file GraphicsSupport.h
* Copyright 2002 the LyX Team
* Read the file COPYING
*
* \author Angus Leeming <leeming@lyx.org>
*/
#ifndef GRAPHICSSUPPORT_H
#define GRAPHICSSUPPORT_H
#ifdef __GNUG__
#pragma interface
#endif
#include "support/types.h"
#include <list>
class BufferView;
class Inset;
class Paragraph;
/** A Paragraph * together with delimiters for the start and end positions
of visibility.
*/
struct VisibleParagraph {
///
VisibleParagraph() : par(0), start(0), end(0) {}
///
VisibleParagraph(Paragraph * p, lyx::pos_type s, lyx::pos_type e)
: par(p), start(s), end(e) {}
///
Paragraph * par;
///
lyx::pos_type start;
///
lyx::pos_type end;
};
/// Returns a list of all Paragraphs currently visible in bv.
std::list<VisibleParagraph> const getVisibleParagraphs(BufferView const & bv);
/** Given this data, check whether inset lies within it and is, therefore,
* visible.
*/
bool isInsetVisible(Inset const & inset, std::list<VisibleParagraph> const &);
#endif // GRAPHICSSUPPORT_H