]> git.lyx.org Git - lyx.git/blob - src/frontends/support/LyXImage_X.C
try this for distinguishing inner and outer tabs
[lyx.git] / src / frontends / support / LyXImage_X.C
1 // -*- C++ -*-
2 /* This file is part of
3  * =================================================
4  * 
5  *          LyX, The Document Processor
6  *          Copyright 1995 Matthias Ettrich.
7  *          Copyright 1995-2000 The LyX Team.
8  *
9  *          This file Copyright 2000 Baruch Even
10  * ================================================= */
11
12 #include <config.h>
13 #include "LyXImage.h"
14
15 #include FORMS_H_LOCATION
16
17 #include "support/LAssert.h"
18
19 LyXImage::LyXImage()
20         : pixmap_(0), pixmapInitialized(false), width_(0), height_(0)
21 {}
22
23 LyXImage::LyXImage(Pixmap pixmap, unsigned int width, unsigned int height)
24         : pixmap_(pixmap), pixmapInitialized(true), width_(width), height_(height)
25 {}
26
27 LyXImage::~LyXImage()
28 {
29         if (pixmapInitialized)
30                 XFreePixmap(fl_get_display(), pixmap_);
31 }
32
33 Pixmap
34 LyXImage::getPixmap() const
35 {
36         Assert(pixmapInitialized);
37                 
38         return pixmap_;
39 }