2000-08-11 14:42:20 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-03-11 17:00:41 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file FormDocument.h
|
|
|
|
|
* Copyright 2000-2002 the LyX Team
|
|
|
|
|
* Read the file COPYING
|
2000-08-18 14:36:12 +00:00
|
|
|
|
*
|
2002-03-11 17:00:41 +00:00
|
|
|
|
* \author J<EFBFBD>rgen Vigna, jug@sad.it
|
|
|
|
|
*/
|
2000-08-11 14:42:20 +00:00
|
|
|
|
|
|
|
|
|
#ifndef FORM_DOCUMENT_H
|
|
|
|
|
#define FORM_DOCUMENT_H
|
|
|
|
|
|
2002-04-23 08:16:27 +00:00
|
|
|
|
#ifdef __GNUG__
|
2000-08-11 14:42:20 +00:00
|
|
|
|
#pragma interface
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-03-16 12:08:14 +00:00
|
|
|
|
#include "FormBaseDeprecated.h"
|
|
|
|
|
|
2002-05-22 01:16:37 +00:00
|
|
|
|
#include <boost/scoped_ptr.hpp>
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2000-08-11 14:42:20 +00:00
|
|
|
|
class Combox;
|
2000-08-18 14:36:12 +00:00
|
|
|
|
class BufferParams;
|
2000-08-11 14:42:20 +00:00
|
|
|
|
|
2002-06-13 13:43:51 +00:00
|
|
|
|
struct FD_document;
|
|
|
|
|
struct FD_document_paper;
|
|
|
|
|
struct FD_document_class;
|
|
|
|
|
struct FD_document_language;
|
|
|
|
|
struct FD_document_options;
|
|
|
|
|
struct FD_document_bullet;
|
2000-08-11 14:42:20 +00:00
|
|
|
|
|
2001-04-03 14:30:58 +00:00
|
|
|
|
/** This class provides an XForms implementation of the FormDocument dialog.
|
2000-08-11 14:42:20 +00:00
|
|
|
|
The table-layout-form here changes values for latex-tabulars
|
|
|
|
|
*/
|
2000-10-13 05:57:05 +00:00
|
|
|
|
class FormDocument : public FormBaseBD {
|
2000-08-11 14:42:20 +00:00
|
|
|
|
public:
|
2002-08-15 16:34:48 +00:00
|
|
|
|
FormDocument(LyXView &, Dialogs &);
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
|
|
|
|
static void ComboInputCB(int, void *, Combox *);
|
2000-08-11 14:42:20 +00:00
|
|
|
|
private:
|
2001-03-15 13:37:04 +00:00
|
|
|
|
/// Pointer to the actual instantiation of the ButtonController.
|
|
|
|
|
virtual xformsBC & bc();
|
2000-11-10 17:29:47 +00:00
|
|
|
|
/** Redraw the form (on receipt of a Signal indicating, for example,
|
2001-03-05 19:02:40 +00:00
|
|
|
|
that the xforms colours have been re-mapped). */
|
2000-11-10 17:29:47 +00:00
|
|
|
|
virtual void redraw();
|
2000-10-05 07:57:00 +00:00
|
|
|
|
/// Build the dialog
|
|
|
|
|
virtual void build();
|
|
|
|
|
/// Filter the inputs
|
2002-02-16 15:59:55 +00:00
|
|
|
|
virtual bool input( FL_OBJECT *, long);
|
2001-04-03 14:30:58 +00:00
|
|
|
|
/// Update the dialog.
|
2000-10-24 13:13:59 +00:00
|
|
|
|
virtual void update();
|
2001-04-03 14:30:58 +00:00
|
|
|
|
/// Apply from dialog
|
2000-10-05 07:57:00 +00:00
|
|
|
|
virtual void apply();
|
2001-04-03 14:30:58 +00:00
|
|
|
|
/// Cancel from dialog
|
2000-10-05 07:57:00 +00:00
|
|
|
|
virtual void cancel();
|
2000-08-14 15:31:16 +00:00
|
|
|
|
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
|
|
|
|
virtual FL_FORM * form() const;
|
2000-08-11 14:42:20 +00:00
|
|
|
|
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
|
|
|
|
bool CheckDocumentInput(FL_OBJECT * ob, long);
|
|
|
|
|
///
|
|
|
|
|
void ChoiceBulletSize(FL_OBJECT * ob, long);
|
|
|
|
|
///
|
|
|
|
|
void InputBulletLaTeX(FL_OBJECT * ob, long);
|
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
|
void BulletDepth(FL_OBJECT * ob);
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
|
void BulletPanel(FL_OBJECT * ob);
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
|
|
|
|
void BulletBMTable(FL_OBJECT * ob, long);
|
|
|
|
|
///
|
|
|
|
|
void checkReadOnly();
|
|
|
|
|
///
|
|
|
|
|
void CheckChoiceClass(FL_OBJECT * ob, long);
|
|
|
|
|
///
|
|
|
|
|
void UpdateLayoutDocument(BufferParams const & params);
|
2002-04-10 14:06:14 +00:00
|
|
|
|
///
|
|
|
|
|
void UpdateClassParams(BufferParams const & params);
|
2000-08-11 14:42:20 +00:00
|
|
|
|
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
|
|
|
|
void paper_update(BufferParams const &);
|
|
|
|
|
///
|
|
|
|
|
void class_update(BufferParams const &);
|
|
|
|
|
///
|
|
|
|
|
void language_update(BufferParams const &);
|
|
|
|
|
///
|
|
|
|
|
void options_update(BufferParams const &);
|
|
|
|
|
///
|
|
|
|
|
void bullets_update(BufferParams const &);
|
|
|
|
|
|
2001-11-07 10:25:05 +00:00
|
|
|
|
///
|
|
|
|
|
void paper_apply(BufferParams &);
|
|
|
|
|
///
|
|
|
|
|
bool class_apply(BufferParams &);
|
|
|
|
|
///
|
|
|
|
|
bool language_apply(BufferParams &);
|
|
|
|
|
///
|
|
|
|
|
bool options_apply(BufferParams &);
|
|
|
|
|
///
|
|
|
|
|
void bullets_apply(BufferParams &);
|
|
|
|
|
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
|
|
|
|
void paper_apply();
|
|
|
|
|
///
|
|
|
|
|
bool class_apply();
|
|
|
|
|
///
|
|
|
|
|
bool language_apply();
|
|
|
|
|
///
|
|
|
|
|
bool options_apply();
|
|
|
|
|
///
|
|
|
|
|
void bullets_apply();
|
|
|
|
|
|
|
|
|
|
/// Real GUI implementation.
|
2002-06-13 13:43:51 +00:00
|
|
|
|
boost::scoped_ptr<FD_document> dialog_;
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
|
boost::scoped_ptr<FD_document_paper> paper_;
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
|
boost::scoped_ptr<FD_document_class> class_;
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
|
boost::scoped_ptr<FD_document_language> language_;
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
|
boost::scoped_ptr<FD_document_options> options_;
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
2002-06-13 13:43:51 +00:00
|
|
|
|
boost::scoped_ptr<FD_document_bullet> bullets_;
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
|
|
|
|
int ActCell;
|
|
|
|
|
///
|
|
|
|
|
int Confirmed;
|
|
|
|
|
///
|
|
|
|
|
int current_bullet_panel;
|
|
|
|
|
///
|
|
|
|
|
int current_bullet_depth;
|
|
|
|
|
///
|
|
|
|
|
FL_OBJECT * fbullet;
|
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
|
boost::scoped_ptr<Combox> combo_language;
|
2000-10-05 07:57:00 +00:00
|
|
|
|
///
|
2001-03-15 13:37:04 +00:00
|
|
|
|
boost::scoped_ptr<Combox> combo_doc_class;
|
|
|
|
|
/// The ButtonController
|
|
|
|
|
ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
|
2002-04-29 15:56:36 +00:00
|
|
|
|
///
|
|
|
|
|
std::vector<string> lang_;
|
2000-08-11 14:42:20 +00:00
|
|
|
|
};
|
|
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
|
|
|
|
|
|
inline
|
|
|
|
|
xformsBC & FormDocument::bc()
|
|
|
|
|
{
|
|
|
|
|
return bc_;
|
|
|
|
|
}
|
|
|
|
|
|
2000-08-11 14:42:20 +00:00
|
|
|
|
#endif
|