2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2001-03-19 15:38:22 +00:00
|
|
|
/**
|
|
|
|
* \file FormMathsBitmap.h
|
|
|
|
* Copyright 2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
|
|
|
* \author Alejandro Aguilar Sierra
|
|
|
|
* \author John Levon, moz@compsoc.man.ac.uk
|
2002-08-15 16:02:22 +00:00
|
|
|
* \author Angus Leeming <leeming@lyx.org>
|
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
|