lyx_mirror/src/frontends/xforms/FormInclude.h

91 lines
2.0 KiB
C
Raw Normal View History

// -*- C++ -*-
/**
* \file FormInclude.h
* Copyright 2001 the LyX Team
* See the file COPYING
*
* \author Alejandro Aguilar Sierra
* \author John Levon
*/
#ifndef FORMINCLUDE_H
#define FORMINCLUDE_H
#include <boost/smart_ptr.hpp>
#ifdef __GNUG__
#pragma interface
#endif
#include "FormBaseDeprecated.h"
#include "insets/insetinclude.h"
struct FD_form_include;
/** This class provides an XForms implementation of the FormInclude Dialog.
*/
class FormInclude : public FormBaseBD {
public:
///
FormInclude(LyXView *, Dialogs *);
private:
///
enum State {
/// the browse button
BROWSE = 0,
/// the load file button
LOAD = 5,
/// the verbatim radio choice
VERBATIM = 10,
/// the input and include radio choices
INPUTINCLUDE = 11
};
/// Pointer to the actual instantiation of the ButtonController.
virtual xformsBC & bc();
/// Slot launching dialog to an existing inset
void showInclude(InsetInclude *);
/// Connect signals. Also perform any necessary initialisation.
virtual void connect();
/// Disconnect signals. Also perform any necessary housekeeping.
virtual void disconnect();
/// Build the dialog
virtual void build();
/// Filter the inputs
virtual bool input( FL_OBJECT *, long );
/// Update dialog before showing it
virtual void update();
/// Apply from dialog (modify or create inset)
virtual void apply();
/// Pointer to the actual instantiation of the xforms form
virtual FL_FORM * form() const;
/// bool indicates if a buffer switch took place
virtual void updateSlot(bool);
/// Type definition from the fdesign produced header file.
FD_form_include * build_include();
/// Real GUI implementation.
boost::scoped_ptr<FD_form_include> dialog_;
/// The ButtonController
ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
/// inset::hide connection.
SigC::Connection ih_;
/// pointer to the inset passed through showInset
InsetInclude * inset_;
/// the nitty-gritty. What is modified and passed back
InsetInclude::InsetIncludeParams params;
};
inline
xformsBC & FormInclude::bc()
{
return bc_;
}
#endif