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