3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
10 #ifndef FORMEXTERNAL_H
11 #define FORMEXTERNAL_H
14 #include "insets/insetexternal.h"
16 #include "form_external.h"
22 /// The class for editing External insets via a dialog
23 class FormExternal : public FormBaseBD {
25 FormExternal(LyXView *, Dialogs *);
29 /// Connect signals. Also perform any necessary initialisation.
30 virtual void connect();
32 /// Disconnect signals. Also perform any necessary housekeeping.
33 virtual void disconnect();
35 /// Slot launching dialog to an existing inset
36 void showInset(InsetExternal *);
38 /// bool indicates if a buffer switch took place
39 virtual void updateSlot(bool);
41 /// Callback function for the template drop-down
42 static void templateCB(FL_OBJECT *, long);
44 /// Callback function for the browse button
45 static void browseCB(FL_OBJECT *, long);
47 /// Callback function for the edit button
48 static void editCB(FL_OBJECT *, long);
50 /// Callback function for the view button
51 static void viewCB(FL_OBJECT *, long);
53 /// Callback function for the update production button
54 static void updateCB(FL_OBJECT *, long);
56 /// Pointer to the actual instantiation of the xform's form
57 virtual FL_FORM * form() const;
60 /// calculate the string to set the combo box
61 string const getTemplatesComboString() const;
63 /// get the position in the combo for a given name
64 int getTemplateComboNumber(string const & name) const;
66 /// get a template given its combo position
67 ExternalTemplate getTemplate(int i) const;
69 /// change widgets on change of chosen template
70 void updateComboChange();
75 /// the inset we're modifying
76 InsetExternal * inset_;
79 InsetExternal::InsetExternalParams params_;
87 bool input(FL_OBJECT * obj, long data);
89 /// inset::hide connection.
93 FD_form_external * build_external();
95 /// the dialog implementation
96 FD_form_external * dialog_;
99 #endif // FORMEXTERNAL_H