2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2002-03-11 17:00:41 +00:00
|
|
|
/**
|
2001-03-28 13:11:08 +00:00
|
|
|
* \file FormGraphics.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-11 17:00:41 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Baruch Even
|
|
|
|
* \author Herbert Voss
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2000-07-31 12:30:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMGRAPHICS_H
|
|
|
|
#define FORMGRAPHICS_H
|
|
|
|
|
|
|
|
|
2001-03-28 13:11:08 +00:00
|
|
|
#include "FormBase.h"
|
2002-05-22 01:16:37 +00:00
|
|
|
|
|
|
|
#include <boost/scoped_ptr.hpp>
|
|
|
|
|
2002-05-01 09:25:51 +00:00
|
|
|
#include <vector>
|
2000-07-31 12:30:10 +00:00
|
|
|
|
2001-03-28 13:11:08 +00:00
|
|
|
class ControlGraphics;
|
2002-06-13 13:43:51 +00:00
|
|
|
struct FD_graphics;
|
|
|
|
struct FD_graphics_file;
|
|
|
|
struct FD_graphics_bbox;
|
2002-08-24 22:02:30 +00:00
|
|
|
struct FD_graphics_extra;
|
2000-07-31 12:30:10 +00:00
|
|
|
|
2001-03-28 13:11:08 +00:00
|
|
|
/** This class provides an XForms implementation of the Graphics Dialog.
|
2000-07-31 12:30:10 +00:00
|
|
|
*/
|
2002-06-13 13:43:51 +00:00
|
|
|
class FormGraphics : public FormCB<ControlGraphics, FormDB<FD_graphics> > {
|
2000-07-31 12:30:10 +00:00
|
|
|
public:
|
|
|
|
///
|
2002-08-12 14:28:43 +00:00
|
|
|
FormGraphics();
|
2000-07-31 12:30:10 +00:00
|
|
|
private:
|
2002-01-29 09:26:24 +00:00
|
|
|
|
|
|
|
/** Redraw the form (on receipt of a Signal indicating, for example,
|
|
|
|
that the xforms colours have been re-mapped). */
|
|
|
|
virtual void redraw();
|
2001-03-28 13:11:08 +00:00
|
|
|
/// Set the Params variable for the Controller.
|
|
|
|
virtual void apply();
|
|
|
|
/// Build the dialog.
|
|
|
|
virtual void build();
|
|
|
|
/// Update dialog before/whilst showing it.
|
|
|
|
virtual void update();
|
2002-04-04 14:49:54 +00:00
|
|
|
/// Update the BoundingBox info.
|
2002-05-22 01:16:37 +00:00
|
|
|
void updateBB(string const & filename, string const & bb_inset);
|
2001-03-28 13:11:08 +00:00
|
|
|
/// Filter the inputs on callback from xforms
|
|
|
|
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
|
|
|
|
|
2002-01-29 09:26:24 +00:00
|
|
|
/// Real GUI implementation.
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_graphics_file> file_;
|
2002-01-29 09:26:24 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_graphics_bbox> bbox_;
|
2002-01-30 14:55:27 +00:00
|
|
|
///
|
2002-08-24 22:02:30 +00:00
|
|
|
boost::scoped_ptr<FD_graphics_extra> extra_;
|
2002-05-01 09:25:51 +00:00
|
|
|
|
|
|
|
/// Store the LaTeX names for the rotation origins.
|
|
|
|
std::vector<string> origins_;
|
2002-01-29 09:26:24 +00:00
|
|
|
};
|
2001-03-15 13:37:04 +00:00
|
|
|
|
2001-03-28 13:11:08 +00:00
|
|
|
#endif // FORMGRAPHICS_H
|