]> git.lyx.org Git - lyx.git/blob - src/frontends/support/LyXImage_X.C
More preference work from Angus
[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 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include <config.h>
17 #include "LyXImage.h"
18
19 #include FORMS_H_LOCATION
20
21 #include "support/LAssert.h"
22
23 LyXImage::LyXImage()
24         : pixmap_(0), pixmapInitialized(false)
25 {}
26
27 LyXImage::LyXImage(Pixmap pixmap)
28         : pixmap_(pixmap), pixmapInitialized(true)
29 {}
30
31 LyXImage::~LyXImage()
32 {
33         if (pixmapInitialized)
34                 XFreePixmap(fl_get_display(), pixmap_);
35 }
36
37 Pixmap
38 LyXImage::getPixmap() const
39 {
40         Assert(pixmapInitialized);
41                 
42         return pixmap_;
43 }