]> git.lyx.org Git - lyx.git/blob - src/frontends/support/LyXImage_X.h
* GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
[lyx.git] / src / frontends / support / LyXImage_X.h
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 #ifndef LYXIMAGE_X_H
13 #define LYXIMAGE_X_H
14
15 #include "frontends/support/LyXImage.h"
16 #include <X11/Xlib.h>
17
18 // This class actually acts as a base class when X Window is used.
19
20 class LyXImage {
21 public:
22         ///
23         LyXImage();
24         ///
25         LyXImage(Pixmap pixmap, unsigned int width, unsigned int height);
26         ///
27         ~LyXImage();
28
29         ///
30         Pixmap getPixmap() const;
31         
32         /// Get the image width
33         unsigned int getWidth() const { return width_; }
34         
35         /// Get the image height
36         unsigned int getHeight() const { return height_; }
37         
38 private:
39         /// The pixmap itself.
40         Pixmap pixmap_;
41         /// Is the pixmap initialized?
42         bool pixmapInitialized;
43         /// Width of the image
44         unsigned int width_;
45         /// Height of the image
46         unsigned int height_;
47 };
48
49 #endif