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