]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormMathsBitmap.h
Add fl_set_input_return to input_paperoption.
[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, a.leeming@ic.ac.uk
10  */
11
12 #ifndef FORM_MATHSBITMAP_H
13 #define FORM_MATHSBITMAP_H
14
15 #include <vector>
16 //#include <boost/smart_ptr.hpp>
17 #include "support/smart_ptr.h"
18
19 #ifdef __GNUG__
20 #pragma interface
21 #endif
22
23 #include "LString.h"
24 #include "FormMathsPanel.h"
25
26 /** 
27  * This class provides an XForms implementation of a maths bitmap form.
28  */
29 class FormMathsBitmap : public FormMathsSub {
30         friend class FormMathsPanel;
31
32   public:
33         ///
34         typedef lyx::shared_c_ptr<FL_OBJECT> bm_ptr;
35         ///
36         FormMathsBitmap(LyXView *, Dialogs * d, FormMathsPanel const &,
37                         std::vector<string> const &);
38         ///
39         void addBitmap(int, int, int, int, int, unsigned char const *,
40                        bool = true);
41
42 private:
43         ///
44         int GetIndex(FL_OBJECT *);
45
46         /// Build the dialog
47         virtual void build();
48         /// apply the data
49         virtual void apply();
50         /// input handler
51         bool input(FL_OBJECT *, long);
52
53         /// Pointer to the actual instantiation of the xforms form
54         virtual FL_FORM * form() const;
55
56         /// The latex names associated with each symbol
57         std::vector<string> latex_;
58         /// The latex name chosen
59         string latex_chosen_;
60         /// Real GUI implementation
61         FL_FORM * form_;
62         /// The bitmap tables
63         std::vector<bm_ptr> bitmaps_;
64
65         /// Border width
66         int ww_;
67         ///
68         int x_;
69         ///
70         int y_;
71         ///
72         int w_;
73         ///
74         int h_;
75 };
76
77
78 #endif // FORM_MATHSBITMAP_H