2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2001-03-19 15:38:22 +00:00
|
|
|
/**
|
|
|
|
* \file FormMathsBitmap.h
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
|
|
|
* \author Alejandro Aguilar Sierra
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author John Levon
|
|
|
|
* \author Angus Leeming
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2001-03-19 15:38:22 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORM_MATHSBITMAP_H
|
|
|
|
#define FORM_MATHSBITMAP_H
|
|
|
|
|
2002-05-24 10:39:34 +00:00
|
|
|
#include "LString.h"
|
|
|
|
#include "FormMathsPanel.h"
|
|
|
|
|
2002-08-20 20:43:10 +00:00
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
/**
|
2001-03-19 15:38:22 +00:00
|
|
|
* This class provides an XForms implementation of a maths bitmap form.
|
|
|
|
*/
|
|
|
|
class FormMathsBitmap : public FormMathsSub {
|
2001-09-09 23:00:05 +00:00
|
|
|
///
|
2001-03-19 15:38:22 +00:00
|
|
|
friend class FormMathsPanel;
|
|
|
|
|
2001-09-09 23:00:05 +00:00
|
|
|
public:
|
2001-03-19 15:38:22 +00:00
|
|
|
///
|
2002-08-20 20:43:10 +00:00
|
|
|
typedef boost::shared_ptr<FL_OBJECT> bm_ptr;
|
2001-09-09 23:00:05 +00:00
|
|
|
///
|
2002-08-20 20:43:10 +00:00
|
|
|
typedef boost::shared_ptr<FL_FORM> fl_ptr;
|
2002-03-21 21:21:28 +00:00
|
|
|
|
2001-03-19 15:38:22 +00:00
|
|
|
///
|
2002-08-15 16:02:22 +00:00
|
|
|
FormMathsBitmap(LyXView &, Dialogs & d, FormMathsPanel const &,
|
2002-03-01 09:52:49 +00:00
|
|
|
string const &, std::vector<string> const &);
|
2001-03-19 15:38:22 +00:00
|
|
|
///
|
2001-09-13 11:44:07 +00:00
|
|
|
~FormMathsBitmap();
|
|
|
|
///
|
2001-03-19 15:38:22 +00:00
|
|
|
void addBitmap(int, int, int, int, int, unsigned char const *,
|
|
|
|
bool = true);
|
|
|
|
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
int GetIndex(FL_OBJECT *);
|
|
|
|
|
2001-04-03 14:30:58 +00:00
|
|
|
/// Build the dialog
|
2001-03-19 15:38:22 +00:00
|
|
|
virtual void build();
|
|
|
|
/// apply the data
|
|
|
|
virtual void apply();
|
|
|
|
/// input handler
|
|
|
|
bool input(FL_OBJECT *, long);
|
|
|
|
|
|
|
|
/// Pointer to the actual instantiation of the xforms form
|
|
|
|
virtual FL_FORM * form() const;
|
|
|
|
|
|
|
|
/// The latex names associated with each symbol
|
|
|
|
std::vector<string> latex_;
|
|
|
|
/// The latex name chosen
|
|
|
|
string latex_chosen_;
|
|
|
|
/// Real GUI implementation
|
2001-09-09 23:00:05 +00:00
|
|
|
fl_ptr form_;
|
2001-03-19 15:38:22 +00:00
|
|
|
/// The bitmap tables
|
|
|
|
std::vector<bm_ptr> bitmaps_;
|
|
|
|
|
|
|
|
/// Border width
|
|
|
|
int ww_;
|
|
|
|
///
|
|
|
|
int x_;
|
|
|
|
///
|
|
|
|
int y_;
|
|
|
|
///
|
|
|
|
int w_;
|
|
|
|
///
|
|
|
|
int h_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // FORM_MATHSBITMAP_H
|