2000-08-08 15:36:25 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 2000 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORMREF_H
|
|
|
|
#define FORMREF_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "FormCommand.h"
|
|
|
|
struct FD_form_ref;
|
|
|
|
|
|
|
|
/** This class provides an XForms implementation of the FormRef Dialog.
|
|
|
|
*/
|
|
|
|
class FormRef : public FormCommand {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
FormRef(LyXView *, Dialogs *);
|
|
|
|
///
|
|
|
|
~FormRef();
|
|
|
|
private:
|
|
|
|
///
|
2000-08-14 15:31:16 +00:00
|
|
|
enum Type{
|
|
|
|
///
|
|
|
|
REF,
|
|
|
|
///
|
|
|
|
PAGEREF,
|
|
|
|
///
|
|
|
|
VREF,
|
|
|
|
///
|
|
|
|
VPAGEREF,
|
|
|
|
///
|
|
|
|
PRETTYREF
|
|
|
|
};
|
2000-08-08 15:36:25 +00:00
|
|
|
///
|
2000-08-14 15:31:16 +00:00
|
|
|
enum Goto{
|
|
|
|
///
|
|
|
|
GOREF,
|
|
|
|
///
|
|
|
|
GOBACK,
|
|
|
|
///
|
|
|
|
GOFIRST
|
|
|
|
};
|
2000-08-08 15:36:25 +00:00
|
|
|
|
|
|
|
/// Build the dialog
|
|
|
|
virtual void build();
|
|
|
|
/// Filter the input
|
2000-10-05 07:57:00 +00:00
|
|
|
virtual bool input( FL_OBJECT *, long );
|
2000-08-08 15:36:25 +00:00
|
|
|
/// Update dialog before showing it
|
|
|
|
virtual void update();
|
|
|
|
/// Not used but must be instantiated
|
|
|
|
virtual void apply();
|
|
|
|
/// delete derived class variables from hide()
|
|
|
|
virtual void clearStore();
|
|
|
|
/// Pointer to the actual instantiation of the xform's form
|
2000-10-03 05:53:25 +00:00
|
|
|
virtual FL_FORM * form() const;
|
2000-08-08 15:36:25 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
void updateBrowser( std::vector<string> ) const;
|
|
|
|
///
|
|
|
|
void showBrowser() const;
|
|
|
|
///
|
|
|
|
void hideBrowser() const;
|
|
|
|
///
|
|
|
|
void setSize( int, int, int ) const;
|
|
|
|
///
|
|
|
|
FD_form_ref * build_ref();
|
|
|
|
///
|
|
|
|
Type getType() const;
|
|
|
|
///
|
|
|
|
string getName( Type type ) const;
|
|
|
|
|
|
|
|
///
|
|
|
|
Goto toggle;
|
|
|
|
///
|
|
|
|
std::vector<string> refs;
|
2000-08-14 05:24:35 +00:00
|
|
|
|
|
|
|
/// Real GUI implementation.
|
|
|
|
FD_form_ref * dialog_;
|
2000-08-08 15:36:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|