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-03-11 17:00:41 +00:00
|
|
|
* Copyright 2000-2001 the LyX Team
|
|
|
|
* Read the file COPYING
|
|
|
|
*
|
2001-03-28 13:11:08 +00:00
|
|
|
* \author Baruch Even, baruch.even@writeme.com
|
2002-01-29 09:26:24 +00:00
|
|
|
* \author Herbert Voss, voss@lyx.org
|
2000-07-31 12:30:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMGRAPHICS_H
|
|
|
|
#define FORMGRAPHICS_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
2002-03-21 21:21:28 +00:00
|
|
|
#endif
|
2000-07-31 12:30:10 +00:00
|
|
|
|
2001-03-28 13:11:08 +00:00
|
|
|
#include "FormBase.h"
|
2001-03-15 13:37:04 +00:00
|
|
|
#include "RadioButtonGroup.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_lyxview;
|
|
|
|
struct FD_graphics_size;
|
|
|
|
struct FD_graphics_bbox;
|
|
|
|
struct FD_graphics_special;
|
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:
|
|
|
|
///
|
2001-03-28 13:11:08 +00:00
|
|
|
FormGraphics(ControlGraphics &);
|
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_lyxview> lyxview_;
|
2002-02-04 15:36:45 +00:00
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_graphics_size> size_;
|
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-06-13 13:43:51 +00:00
|
|
|
boost::scoped_ptr<FD_graphics_special> special_;
|
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
|