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