]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormMathsBitmap.h
utilize the 3rd arg of the boost smart pointers, remove own adaptation of boost smart...
[lyx.git] / src / frontends / xforms / FormMathsBitmap.h
1 // -*- C++ -*-
2 /**
3  * \file FormMathsBitmap.h
4  * Copyright 2001 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author John Levon, moz@compsoc.man.ac.uk
9  * \author Angus Leeming <leeming@lyx.org>
10  */
11
12 #ifndef FORM_MATHSBITMAP_H
13 #define FORM_MATHSBITMAP_H
14
15 #include "LString.h"
16 #include "FormMathsPanel.h"
17
18 #include <boost/shared_ptr.hpp>
19
20 #include <vector>
21
22 #ifdef __GNUG__
23 #pragma interface
24 #endif
25
26 /**
27  * This class provides an XForms implementation of a maths bitmap form.
28  */
29 class FormMathsBitmap : public FormMathsSub {
30         ///
31         friend class FormMathsPanel;
32
33 public:
34         ///
35         typedef boost::shared_ptr<FL_OBJECT> bm_ptr;
36         ///
37         typedef boost::shared_ptr<FL_FORM> fl_ptr;
38
39         ///
40         FormMathsBitmap(LyXView &, Dialogs & d, FormMathsPanel const &,
41                         string const &, std::vector<string> const &);
42         ///
43         ~FormMathsBitmap();
44         ///
45         void addBitmap(int, int, int, int, int, unsigned char const *,
46                        bool = true);
47
48 private:
49         ///
50         int GetIndex(FL_OBJECT *);
51
52         /// Build the dialog
53         virtual void build();
54         /// apply the data
55         virtual void apply();
56         /// input handler
57         bool input(FL_OBJECT *, long);
58
59         /// Pointer to the actual instantiation of the xforms form
60         virtual FL_FORM * form() const;
61
62         /// The latex names associated with each symbol
63         std::vector<string> latex_;
64         /// The latex name chosen
65         string latex_chosen_;
66         /// Real GUI implementation
67         fl_ptr form_;
68         /// The bitmap tables
69         std::vector<bm_ptr> bitmaps_;
70
71         /// Border width
72         int ww_;
73         ///
74         int x_;
75         ///
76         int y_;
77         ///
78         int w_;
79         ///
80         int h_;
81 };
82
83
84 #endif // FORM_MATHSBITMAP_H