Implemented controller-view split for Graphics and Index popups.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1845 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2001-03-28 13:11:08 +00:00
parent 5e88370300
commit 015412da02
16 changed files with 212 additions and 316 deletions

View File

@ -1,3 +1,18 @@
2001-03-28 Angus Leeming <a.leeming@ic.ac.uk>
* FormGraphics.C:
* forms/form_graphics.fd:
* FormIndex.C:
* forms/form_index.fd: implemented controller-view split.
* Dialogs.C: associated changes.
* FormCharacter.[Ch]: changes associated with ControlCharacter cleanup.
* FormCitation.C: changes associated with ControlCitation cleanup.
* FormMinipage.h: cleaned-up forward declarations.
2001-03-27 Angus Leeming <a.leeming@ic.ac.uk> 2001-03-27 Angus Leeming <a.leeming@ic.ac.uk>
* FormMinipage.[Ch]: * FormMinipage.[Ch]:

View File

@ -26,7 +26,9 @@
#include "ControlCopyright.h" #include "ControlCopyright.h"
#include "ControlCredits.h" #include "ControlCredits.h"
#include "ControlError.h" #include "ControlError.h"
#include "ControlGraphics.h"
#include "ControlInclude.h" #include "ControlInclude.h"
#include "ControlIndex.h"
#include "ControlLog.h" #include "ControlLog.h"
#include "ControlMinipage.h" #include "ControlMinipage.h"
#include "ControlPreamble.h" #include "ControlPreamble.h"
@ -49,7 +51,9 @@
#include "form_copyright.h" #include "form_copyright.h"
#include "form_credits.h" #include "form_credits.h"
#include "form_error.h" #include "form_error.h"
#include "form_graphics.h"
#include "form_include.h" #include "form_include.h"
#include "form_index.h"
#include "form_minipage.h" #include "form_minipage.h"
#include "form_preamble.h" #include "form_preamble.h"
#include "form_print.h" #include "form_print.h"
@ -66,7 +70,9 @@
#include "FormCopyright.h" #include "FormCopyright.h"
#include "FormCredits.h" #include "FormCredits.h"
#include "FormError.h" #include "FormError.h"
#include "FormGraphics.h"
#include "FormInclude.h" #include "FormInclude.h"
#include "FormIndex.h"
#include "FormLog.h" #include "FormLog.h"
#include "FormMinipage.h" #include "FormMinipage.h"
#include "FormPreamble.h" #include "FormPreamble.h"
@ -80,8 +86,6 @@
#include "FormDocument.h" #include "FormDocument.h"
#include "FormExternal.h" #include "FormExternal.h"
#include "FormGraphics.h"
#include "FormIndex.h"
#include "FormMathsPanel.h" #include "FormMathsPanel.h"
#include "FormParagraph.h" #include "FormParagraph.h"
#include "FormPreferences.h" #include "FormPreferences.h"
@ -103,7 +107,9 @@ Dialogs::Dialogs(LyXView * lv)
add(new GUICopyright<FormCopyright, xformsBC>(*lv, *this)); add(new GUICopyright<FormCopyright, xformsBC>(*lv, *this));
add(new GUICredits<FormCredits, xformsBC>(*lv, *this)); add(new GUICredits<FormCredits, xformsBC>(*lv, *this));
add(new GUIError<FormError, xformsBC>(*lv, *this)); add(new GUIError<FormError, xformsBC>(*lv, *this));
add(new GUIGraphics<FormGraphics, xformsBC>(*lv, *this));
add(new GUIInclude<FormInclude, xformsBC>(*lv, *this)); add(new GUIInclude<FormInclude, xformsBC>(*lv, *this));
add(new GUIIndex<FormIndex, xformsBC>(*lv, *this));
add(new GUILog<FormLog, xformsBC>(*lv, *this)); add(new GUILog<FormLog, xformsBC>(*lv, *this));
add(new GUIMinipage<FormMinipage, xformsBC>(*lv, *this)); add(new GUIMinipage<FormMinipage, xformsBC>(*lv, *this));
add(new GUIPreamble<FormPreamble, xformsBC>(*lv, *this)); add(new GUIPreamble<FormPreamble, xformsBC>(*lv, *this));
@ -116,8 +122,6 @@ Dialogs::Dialogs(LyXView * lv)
add(new FormDocument(lv, this)); add(new FormDocument(lv, this));
add(new FormExternal(lv, this)); add(new FormExternal(lv, this));
add(new FormGraphics(lv, this));
add(new FormIndex(lv, this));
add(new FormMathsPanel(lv, this)); add(new FormMathsPanel(lv, this));
add(new FormParagraph(lv, this)); add(new FormParagraph(lv, this));
add(new FormPreferences(lv, this)); add(new FormPreferences(lv, this));

View File

@ -26,6 +26,7 @@
using std::vector; using std::vector;
using std::back_inserter; using std::back_inserter;
using std::transform; using std::transform;
using namespace character;
typedef FormCB<ControlCharacter, FormDB<FD_form_character> > base_class; typedef FormCB<ControlCharacter, FormDB<FD_form_character> > base_class;
@ -44,12 +45,12 @@ void FormCharacter::build()
{ {
dialog_.reset(build_character()); dialog_.reset(build_character());
vector<ControlCharacter::FamilyPair> const family = getFamilyData(); vector<FamilyPair> const family = getFamilyData();
vector<ControlCharacter::SeriesPair> const series = getSeriesData(); vector<SeriesPair> const series = getSeriesData();
vector<ControlCharacter::ShapePair> const shape = getShapeData(); vector<ShapePair> const shape = getShapeData();
vector<ControlCharacter::SizePair> const size = getSizeData(); vector<SizePair> const size = getSizeData();
vector<ControlCharacter::BarPair> const bar = getBarData(); vector<BarPair> const bar = getBarData();
vector<ControlCharacter::ColorPair> const color = getColorData(); vector<ColorPair> const color = getColorData();
vector<string> const language = getLanguageData(); vector<string> const language = getLanguageData();
// Store the enums for later // Store the enums for later

View File

@ -20,6 +20,7 @@
#include "lyxfont.h" // for LyXFont enums #include "lyxfont.h" // for LyXFont enums
#include "ControlCharacter.h" // for ControlCharacter enum #include "ControlCharacter.h" // for ControlCharacter enum
#include "LColor.h" // for LColor enum #include "LColor.h" // for LColor enum
#include "character.h" // for FONT_STATE enum
class Combox; class Combox;
struct FD_form_character; struct FD_form_character;
@ -55,17 +56,17 @@ private:
/// ///
boost::scoped_ptr<Combox> combo_language2_; boost::scoped_ptr<Combox> combo_language2_;
/// ///
std::vector<LyXFont::FONT_FAMILY> family_; std::vector<LyXFont::FONT_FAMILY> family_;
/// ///
std::vector<LyXFont::FONT_SERIES> series_; std::vector<LyXFont::FONT_SERIES> series_;
/// ///
std::vector<LyXFont::FONT_SHAPE> shape_; std::vector<LyXFont::FONT_SHAPE> shape_;
/// ///
std::vector<LyXFont::FONT_SIZE> size_; std::vector<LyXFont::FONT_SIZE> size_;
/// ///
std::vector<ControlCharacter::FONT_STATE> bar_; std::vector<character::FONT_STATE> bar_;
/// ///
std::vector<LColor::color> color_; std::vector<LColor::color> color_;
}; };
#endif #endif

View File

@ -11,21 +11,22 @@
* \author Angus Leeming <a.leeming@ic.ac.uk> * \author Angus Leeming <a.leeming@ic.ac.uk>
*/ */
#include <config.h>
#include <algorithm> #include <algorithm>
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation #pragma implementation
#endif #endif
#include <config.h> #include "xformsBC.h"
#include "ControlCitation.h" #include "ControlCitation.h"
#include "FormCitation.h" #include "FormCitation.h"
#include "form_citation.h" #include "form_citation.h"
#include "gettext.h" #include "gettext.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "xforms_helpers.h" #include "biblio.h"
#include "xformsBC.h"
#include "helper_funcs.h" #include "helper_funcs.h"
#include "xforms_helpers.h"
using std::find; using std::find;
using std::max; using std::max;
@ -92,6 +93,8 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
{ {
ButtonPolicy::SMInput activate = ButtonPolicy::SMI_NOOP; ButtonPolicy::SMInput activate = ButtonPolicy::SMI_NOOP;
biblio::InfoMap const & theMap = controller().bibkeysInfo();
if (ob == dialog_->browser_bib) { if (ob == dialog_->browser_bib) {
fl_deselect_browser(dialog_->browser_cite); fl_deselect_browser(dialog_->browser_cite);
@ -102,8 +105,9 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
// Put into browser_info the additional info associated with // Put into browser_info the additional info associated with
// the selected browser_bib key // the selected browser_bib key
fl_clear_browser(dialog_->browser_info); fl_clear_browser(dialog_->browser_info);
string const tmp = formatted( controller().
getBibkeyInfo(bibkeys[sel-1]), string const tmp = formatted(biblio::getInfo(theMap,
bibkeys[sel-1]),
dialog_->browser_info->w-10 ); dialog_->browser_info->w-10 );
fl_add_browser_line(dialog_->browser_info, tmp.c_str()); fl_add_browser_line(dialog_->browser_info, tmp.c_str());
@ -151,9 +155,9 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
// with the selected browser_cite key // with the selected browser_cite key
fl_clear_browser(dialog_->browser_info); fl_clear_browser(dialog_->browser_info);
string const tmp = string const tmp =
formatted( controller(). formatted(biblio::getInfo(theMap,
getBibkeyInfo(bibkeys[n]), bibkeys[sel-1]),
dialog_->browser_info->w-10 ); dialog_->browser_info->w-10);
fl_add_browser_line(dialog_->browser_info, tmp.c_str()); fl_add_browser_line(dialog_->browser_info, tmp.c_str());
} }
@ -237,13 +241,13 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
string const str = fl_get_input(dialog_->input_search); string const str = fl_get_input(dialog_->input_search);
ControlCitation::Direction const dir = biblio::Direction const dir =
(ob == dialog_->button_previous) ? (ob == dialog_->button_previous) ?
ControlCitation::BACKWARD : ControlCitation::FORWARD; biblio::BACKWARD : biblio::FORWARD;
ControlCitation::Search const type = biblio::Search const type =
fl_get_button(dialog_->button_search_type) ? fl_get_button(dialog_->button_search_type) ?
ControlCitation::REGEX : ControlCitation::SIMPLE; biblio::REGEX : biblio::SIMPLE;
vector<string>::const_iterator start = bibkeys.begin(); vector<string>::const_iterator start = bibkeys.begin();
int const sel = fl_get_browser(dialog_->browser_bib); int const sel = fl_get_browser(dialog_->browser_bib);
@ -251,14 +255,14 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
start += sel-1; start += sel-1;
// Find the NEXT instance... // Find the NEXT instance...
if (dir == ControlCitation::FORWARD) if (dir == biblio::FORWARD)
start += 1; start += 1;
else else
start -= 1; start -= 1;
vector<string>::const_iterator const cit = vector<string>::const_iterator const cit =
searchKeys(controller(), bibkeys, str, start, biblio::searchKeys(theMap, bibkeys, str,
type, dir); start, type, dir);
if (cit == bibkeys.end()) if (cit == bibkeys.end())
return ButtonPolicy::SMI_NOOP; return ButtonPolicy::SMI_NOOP;
@ -286,7 +290,7 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
void FormCitation::update() void FormCitation::update()
{ {
// Make the list of all available bibliography keys // Make the list of all available bibliography keys
bibkeys = controller().getBibkeys(); bibkeys = biblio::getKeys(controller().bibkeysInfo());
updateBrowser(dialog_->browser_bib, bibkeys); updateBrowser(dialog_->browser_bib, bibkeys);
// Ditto for the keys cited in this inset // Ditto for the keys cited in this inset

View File

@ -1,5 +1,14 @@
/* FormGraphics.C /* This file is part of
* FormGraphics Interface Class Implementation * ======================================================
*
* LyX, The Document Processor
*
* Copyright 2000-2001 The LyX Team.
*
* ======================================================
*
* \file FormGraphics.C
* \author Baruch Even, baruch.even@writeme.com
*/ */
#include <config.h> #include <config.h>
@ -8,52 +17,42 @@
#pragma implementation #pragma implementation
#endif #endif
#include "lyx_gui_misc.h" #include "xformsBC.h"
#include "input_validators.h" #include "ControlGraphics.h"
#include "FormGraphics.h" #include "FormGraphics.h"
#include "form_graphics.h" #include "form_graphics.h"
#include "Dialogs.h"
#include "LyXView.h"
#include "BufferView.h"
//#include "lyx_gui_misc.h"
#include "input_validators.h"
#include "debug.h" // for lyxerr #include "debug.h" // for lyxerr
#include "support/lstrings.h" // for strToDbl & tostr #include "support/lstrings.h" // for strToDbl & tostr
#include "support/FileInfo.h" // for FileInfo #include "support/FileInfo.h" // for FileInfo
#include "xforms_helpers.h" // for browseFile #include "xforms_helpers.h" // for browseFile
#include "support/filetools.h" // for AddName #include "support/filetools.h" // for AddName
#include "insets/insetgraphics.h"
#include "insets/insetgraphicsParams.h" #include "insets/insetgraphicsParams.h"
#include "RadioButtonGroup.h"
#include "support/LAssert.h"
using std::endl; using std::endl;
using std::make_pair; using std::make_pair;
using SigC::slot;
FormGraphics::FormGraphics(LyXView * lv, Dialogs * d) typedef FormCB<ControlGraphics, FormDB<FD_form_graphics> > base_class;
: FormInset(lv, d, _("Graphics")),
inset_(0), FormGraphics::FormGraphics(ControlGraphics & c)
: base_class(c, _("Graphics")),
// The buttons c-tor values are the number of buttons we use // The buttons c-tor values are the number of buttons we use
// This is only to reduce memory waste. // This is only to reduce memory waste.
widthButtons(5), heightButtons(4), displayButtons(4), widthButtons(5), heightButtons(4), displayButtons(4),
last_image_path(".") last_image_path(".")
{ {}
// let the dialog be shown
// This is a permanent connection so we won't bother
// storing a copy because we won't be disconnecting.
d->showGraphics.connect(slot(this, &FormGraphics::showDialog));
}
FormGraphics::~FormGraphics() void FormGraphics::hide()
{ {
// Remove all associations for the radio buttons // Remove all associations for the radio buttons
widthButtons.reset(); widthButtons.reset();
heightButtons.reset(); heightButtons.reset();
displayButtons.reset(); displayButtons.reset();
FormBase::hide();
} }
@ -145,42 +144,10 @@ void FormGraphics::build()
} }
FL_FORM * FormGraphics::form() const
{
if (dialog_.get())
return dialog_->form;
return 0;
}
void FormGraphics::disconnect()
{
inset_ = 0;
FormInset::disconnect();
}
void FormGraphics::showDialog(InsetGraphics * inset)
{
// If we are connected to another inset, disconnect.
if (inset_)
ih_.disconnect();
inset_ = inset;
ih_ = inset_->hideDialog.connect(slot(this, &FormGraphics::hide));
show();
}
void FormGraphics::apply() void FormGraphics::apply()
{ {
Assert(inset_ != 0);
// Take all dialog details and insert them to the inset.
// Create the parameters structure and fill the data from the dialog. // Create the parameters structure and fill the data from the dialog.
InsetGraphicsParams igp; InsetGraphicsParams & igp = controller().params();
igp.filename = fl_get_input(dialog_->input_filename); igp.filename = fl_get_input(dialog_->input_filename);
@ -207,22 +174,13 @@ void FormGraphics::apply()
igp.inlineFigure = fl_get_button(dialog_->check_inline); igp.inlineFigure = fl_get_button(dialog_->check_inline);
igp.testInvariant(); igp.testInvariant();
// Set the parameters in the inset, it also returns true if the new
// parameters are different from what was in the inset already.
bool changed = inset_->setParams(igp);
// Tell LyX we've got a change, and mark the document dirty, if it changed.
lv_->view()->updateInset(inset_, changed);
} }
void FormGraphics::update() void FormGraphics::update()
{ {
Assert(inset_ != 0);
// Update dialog with details from inset // Update dialog with details from inset
InsetGraphicsParams igp = inset_->getParams(); InsetGraphicsParams & igp = controller().params();
// Update the filename input field // Update the filename input field
fl_set_input(dialog_->input_filename, fl_set_input(dialog_->input_filename,
@ -255,23 +213,20 @@ void FormGraphics::update()
fl_set_button(dialog_->check_inline, fl_set_button(dialog_->check_inline,
igp.inlineFigure); igp.inlineFigure);
// update the dialog's read only / read-write status
bc().readOnly(lv_->buffer()->isReadonly());
// Now make sure that the buttons are set correctly. // Now make sure that the buttons are set correctly.
input(0, 0); input(0, 0);
} }
bool FormGraphics::input(FL_OBJECT *, long data ) ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT *, long data)
{ {
State cb = static_cast<State>( data ); State cb = static_cast<State>( data );
bool inputOK = true; ButtonPolicy::SMInput activate = ButtonPolicy::SMI_NOOP;
switch (cb) { switch (cb) {
case CHECKINPUT: case CHECKINPUT:
inputOK = checkInput(); activate = checkInput();
break; break;
case BROWSE: case BROWSE:
browse(); browse();
@ -285,18 +240,17 @@ bool FormGraphics::input(FL_OBJECT *, long data )
break; break;
} }
return inputOK; return activate;
} }
bool FormGraphics::checkInput() ButtonPolicy::SMInput FormGraphics::checkInput()
{ {
// Put verifications that the dialog shows some sane values, // Put verifications that the dialog shows some sane values,
// if not disallow clicking on ok/apply. // if not disallow clicking on ok/apply.
// Possibly use a label in the bottom of the dialog to give the reason. // Possibly use a label in the bottom of the dialog to give the reason.
// Is all input boxes convey a valid meaning? ButtonPolicy::SMInput activate = ButtonPolicy::SMI_VALID;
bool inputOK = true;
// Things that we check (meaning they are incorrect states): // Things that we check (meaning they are incorrect states):
// 1. No filename specified. // 1. No filename specified.
@ -317,23 +271,23 @@ bool FormGraphics::checkInput()
|| !file.isRegular() || !file.isRegular()
|| !file.readable() || !file.readable()
) )
inputOK = false; activate = ButtonPolicy::SMI_NOOP;
// Width radio button not default and no number. // Width radio button not default and no number.
if (!fl_get_button(dialog_->radio_width_default) if (!fl_get_button(dialog_->radio_width_default)
&& strToDbl(fl_get_input(dialog_->input_width)) <= 0.0) { && strToDbl(fl_get_input(dialog_->input_width)) <= 0.0) {
inputOK = false; activate = ButtonPolicy::SMI_NOOP;
} }
// Height radio button not default and no number. // Height radio button not default and no number.
if (!fl_get_button(dialog_->radio_height_default) if (!fl_get_button(dialog_->radio_height_default)
&& strToDbl(fl_get_input(dialog_->input_height)) <= 0.0) { && strToDbl(fl_get_input(dialog_->input_height)) <= 0.0) {
inputOK = false; activate = ButtonPolicy::SMI_NOOP;
} }
return inputOK; return activate;
} }
@ -360,7 +314,7 @@ void FormGraphics::browse()
// Show the file browser dialog // Show the file browser dialog
string const new_filename = string const new_filename =
browseFile(lv_, filename, title, pattern, dir1, browseFile(controller().lv(), filename, title, pattern, dir1,
make_pair(string(), string())); make_pair(string(), string()));
// Save the filename to the dialog // Save the filename to the dialog

View File

@ -1,48 +1,48 @@
// -*- C++ -*- /* This file is part of
/* FormGraphics.h
* FormGraphics Interface Class
*
* This file is part of
* ====================================================== * ======================================================
* *
* LyX, The Document Processor * LyX, The Document Processor
* *
* Copyright 1995 Matthias Ettrich * Copyright 2000-2001 The LyX Team.
* Copyright 1995-2000 The LyX Team.
* *
* ====================================================== * ======================================================
*
* \file FormGraphics.h
* \author Baruch Even, baruch.even@writeme.com
*/ */
#ifndef FORMGRAPHICS_H #ifndef FORMGRAPHICS_H
#define FORMGRAPHICS_H #define FORMGRAPHICS_H
#include <boost/smart_ptr.hpp>
#ifdef __GNUG__ #ifdef __GNUG__
#pragma interface #pragma interface
#endif #endif
#include "LString.h" #include "FormBase.h"
#include "RadioButtonGroup.h" #include "RadioButtonGroup.h"
#include "FormInset.h"
// Forward declarations for classes we use only as pointers.
class InsetGraphics;
class ControlGraphics;
struct FD_form_graphics; struct FD_form_graphics;
/** This class provides an XForms implementation of the FormGraphics Dialog. /** This class provides an XForms implementation of the Graphics Dialog.
*
* @Author Baruch Even <baruch.even@writeme.com>
*/ */
class FormGraphics : public FormInset { class FormGraphics : public FormCB<ControlGraphics, FormDB<FD_form_graphics> > {
public: public:
/// #FormGraphics x(LyXFunc ..., Dialogs ...);#
FormGraphics(LyXView *, Dialogs *);
/// ///
~FormGraphics(); FormGraphics(ControlGraphics &);
private: private:
/// Set the Params variable for the Controller.
virtual void apply();
/// Build the dialog.
virtual void build();
/// Hide the dialog.
virtual void hide();
/// Update dialog before/whilst showing it.
virtual void update();
/// Filter the inputs on callback from xforms
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
/// The maximum digits for the image width (cm, inch, percent) /// The maximum digits for the image width (cm, inch, percent)
enum { enum {
/// ///
@ -73,38 +73,14 @@ private:
ADVANCEDINPUT ADVANCEDINPUT
}; };
/// Pointer to the actual instantiation of the ButtonController.
virtual xformsBC & bc();
/// Build the dialog
virtual void build();
/// Filter the inputs
virtual bool input( FL_OBJECT *, long );
/// Update the popup.
virtual void update();
/// Apply from popup
virtual void apply();
/// Disconnect signals. Also perform any necessary housekeeping.
virtual void disconnect();
/// Save the active inset and show the dialog.
void showDialog(InsetGraphics *);
/// Verify that the input is correct. If not disable ok/apply buttons. /// Verify that the input is correct. If not disable ok/apply buttons.
bool checkInput(); ButtonPolicy::SMInput checkInput();
/// Open the file browse dialog to select an image file. /// Open the file browse dialog to select an image file.
void browse(); void browse();
/// Pointer to the actual instantiation of the xforms form
virtual FL_FORM * form() const;
/// Fdesign generated method /// Fdesign generated method
FD_form_graphics * build_graphics(); FD_form_graphics * build_graphics();
/// Real GUI implementation.
boost::scoped_ptr<FD_form_graphics> dialog_;
/** Which Inset do we belong to?
Used to set and update data to/from the inset.
*/
InsetGraphics * inset_;
/// The radio buttons groups /// The radio buttons groups
RadioButtonGroup widthButtons; RadioButtonGroup widthButtons;
/// ///
@ -113,14 +89,7 @@ private:
RadioButtonGroup displayButtons; RadioButtonGroup displayButtons;
/// Last used figure path /// Last used figure path
string last_image_path; string last_image_path;
/// The ButtonController
ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
}; };
inline #endif // FORMGRAPHICS_H
xformsBC & FormGraphics::bc()
{
return bc_;
}
#endif

View File

@ -1,57 +1,35 @@
// -*- C++ -*-
/* This file is part of /* This file is part of
* ====================================================== * ======================================================
* *
* LyX, The Document Processor * LyX, The Document Processor
* *
* Copyright 2000 The LyX Team. * Copyright 2000-2001 The LyX Team.
* *
* ====================================================== * ======================================================
*
* \file FormIndex.C
* \author Angus Leeming, a.leeming@ic.ac.uk
*/ */
#include <config.h> #include <config.h>
#include FORMS_H_LOCATION
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation #pragma implementation
#endif #endif
#include "xformsBC.h"
#include "Dialogs.h" #include "ControlIndex.h"
#include "FormIndex.h" #include "FormIndex.h"
#include "LyXView.h" #include "LyXView.h"
#include "buffer.h"
#include "form_index.h" #include "form_index.h"
#include "lyxfunc.h"
using SigC::slot; typedef FormCB<ControlIndex, FormDB<FD_form_index> > base_class;
FormIndex::FormIndex(LyXView * lv, Dialogs * d) FormIndex::FormIndex(ControlIndex & c)
: FormCommand(lv, d, _("Index")) : base_class(c, _("Index"))
{ {}
// let the dialog be shown
// These are permanent connections so we won't bother
// storing a copy because we won't be disconnecting.
d->showIndex.connect(slot(this, &FormIndex::showInset));
d->createIndex.connect(slot(this, &FormIndex::createInset));
}
FL_FORM * FormIndex::form() const
{
if (dialog_.get()) return dialog_->form;
return 0;
}
void FormIndex::connect()
{
fl_set_form_maxsize(form(), 2 * minw_, minh_);
FormCommand::connect();
}
void FormIndex::build() void FormIndex::build()
{ {
dialog_.reset(build_index()); dialog_.reset(build_index());
@ -63,36 +41,21 @@ void FormIndex::build()
bc().setApply(dialog_->button_apply); bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel); bc().setCancel(dialog_->button_cancel);
bc().setUndoAll(dialog_->button_restore); bc().setUndoAll(dialog_->button_restore);
bc().refresh();
bc().addReadOnly(dialog_->input_key); bc().addReadOnly(dialog_->input_key);
bc().refresh();
} }
void FormIndex::update() void FormIndex::update()
{ {
fl_set_input(dialog_->input_key, params.getContents().c_str()); fl_set_input(dialog_->input_key,
// Surely, this should reset the buttons to their original state? controller().params().getContents().c_str());
// It doesn't. Instead "Restore" becomes a "Close"
//bc().refresh();
bc().readOnly(lv_->buffer()->isReadonly());
} }
void FormIndex::apply() void FormIndex::apply()
{ {
if (lv_->buffer()->isReadonly()) return; controller().params().setContents(fl_get_input(dialog_->input_key));
params.setContents(fl_get_input(dialog_->input_key));
if (inset_ != 0) {
// Only update if contents have changed
if (params != inset_->params()) {
inset_->setParams(params);
lv_->view()->updateInset(inset_, true);
}
} else {
lv_->getLyXFunc()->Dispatch(LFUN_INDEX_INSERT,
params.getAsString());
}
} }

View File

@ -1,58 +1,45 @@
// -*- C++ -*-
/* This file is part of /* This file is part of
* ====================================================== * ======================================================
* *
* LyX, The Document Processor * LyX, The Document Processor
* *
* Copyright 2000 The LyX Team. * Copyright 2000-2001 The LyX Team.
* *
* ====================================================== * ======================================================
*
* \file FormIndex.h
* \author Angus Leeming, a.leeming@ic.ac.uk
*/ */
#ifndef FORMINDEX_H #ifndef FORMINDEX_H
#define FORMINDEX_H #define FORMINDEX_H
#include <boost/smart_ptr.hpp>
#ifdef __GNUG__ #ifdef __GNUG__
#pragma interface #pragma interface
#endif #endif
#include "FormInset.h" #include "FormBase.h"
class ControlIndex;
struct FD_form_index; struct FD_form_index;
/** This class provides an XForms implementation of the FormIndex Dialog. /** This class provides an XForms implementation of the Index Dialog.
*/ */
class FormIndex : public FormCommand { class FormIndex : public FormCB<ControlIndex, FormDB<FD_form_index> > {
public: public:
/// ///
FormIndex(LyXView *, Dialogs *); FormIndex(ControlIndex &);
private: private:
/// Pointer to the actual instantiation of the ButtonController. /// Set the Params variable for the Controller.
virtual xformsBC & bc();
/// Connect signals etc. Set form's max size.
virtual void connect();
/// Build the dialog
virtual void build();
/// Update dialog before showing it
virtual void update();
/// Apply from dialog (modify or create inset)
virtual void apply(); virtual void apply();
/// Pointer to the actual instantiation of the xforms form /// Build the dialog.
virtual FL_FORM * form() const; virtual void build();
/// /// Update dialog before/whilst showing it.
virtual void update();
/// Fdesign generated method
FD_form_index * build_index(); FD_form_index * build_index();
/// Real GUI implementation.
boost::scoped_ptr<FD_form_index> dialog_;
/// The ButtonController
ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
}; };
#endif // FORMINDEX_H
inline
xformsBC & FormIndex::bc()
{
return bc_;
}
#endif

View File

@ -20,9 +20,7 @@
#include "FormBase.h" #include "FormBase.h"
class LyXView; class ControlMinipage;
class Dialogs;
class InsetMinipage;
struct FD_form_minipage; struct FD_form_minipage;
/** This class provides an XForms implementation of the Minipage /** This class provides an XForms implementation of the Minipage

View File

@ -34,53 +34,53 @@ FD_form_graphics * FormGraphics::build_graphics()
fdui->input_filename = obj = fl_add_input(FL_NORMAL_INPUT, 150, 20, 210, 30, idex(_(dummy))); fdui->input_filename = obj = fl_add_input(FL_NORMAL_INPUT, 150, 20, 210, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1); fl_set_button_shortcut(obj, scex(_(dummy)), 1);
} }
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
{ {
char const * const dummy = N_("Browse|#B"); char const * const dummy = N_("Browse|#B");
fdui->button_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 370, 20, 90, 30, idex(_(dummy))); fdui->button_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 370, 20, 90, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1); fl_set_button_shortcut(obj, scex(_(dummy)), 1);
} }
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, BROWSE); fl_set_object_callback(obj, C_FormBaseInputCB, BROWSE);
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 70, 240, 160, _("Width")); obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 70, 240, 160, _("Width"));
fl_set_object_lalign(obj, FL_ALIGN_CENTER); fl_set_object_lalign(obj, FL_ALIGN_CENTER);
obj = fl_add_text(FL_NORMAL_TEXT, 164, 60, 60, 20, _("Height")); obj = fl_add_text(FL_NORMAL_TEXT, 164, 60, 60, 20, _("Height"));
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
fdui->input_width = obj = fl_add_input(FL_NORMAL_INPUT, 32, 190, 108, 30, ""); fdui->input_width = obj = fl_add_input(FL_NORMAL_INPUT, 32, 190, 108, 30, "");
fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fdui->input_height = obj = fl_add_input(FL_NORMAL_INPUT, 152, 190, 96, 30, ""); fdui->input_height = obj = fl_add_input(FL_NORMAL_INPUT, 152, 190, 96, 30, "");
fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 270, 70, 210, 160, _("Display")); obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 270, 70, 210, 160, _("Display"));
fl_set_object_lalign(obj, FL_ALIGN_CENTER); fl_set_object_lalign(obj, FL_ALIGN_CENTER);
fdui->radio_button_group_width = fl_bgn_group(); fdui->radio_button_group_width = fl_bgn_group();
// xgettext:no-c-format // xgettext:no-c-format
fdui->radio_width_percent_page = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 140, 80, 30, _("% of Page")); fdui->radio_width_percent_page = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 140, 80, 30, _("% of Page"));
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fdui->radio_width_default = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 80, 80, 30, _("Default")); fdui->radio_width_default = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 80, 80, 30, _("Default"));
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fl_set_button(obj, 1); fl_set_button(obj, 1);
fdui->radio_width_cm = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 100, 80, 30, _("cm")); fdui->radio_width_cm = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 100, 80, 30, _("cm"));
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fdui->radio_width_inch = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 120, 80, 30, _("Inch")); fdui->radio_width_inch = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 120, 80, 30, _("Inch"));
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
// xgettext:no-c-format // xgettext:no-c-format
fdui->radio_width_percent_column = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 160, 96, 30, _("% of Column")); fdui->radio_width_percent_column = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 160, 96, 30, _("% of Column"));
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fl_end_group(); fl_end_group();
fdui->radio_button_group_height = fl_bgn_group(); fdui->radio_button_group_height = fl_bgn_group();
// xgettext:no-c-format // xgettext:no-c-format
fdui->radio_height_percent_page = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 140, 96, 30, _("% of Page")); fdui->radio_height_percent_page = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 140, 96, 30, _("% of Page"));
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fdui->radio_height_inch = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 120, 96, 30, _("Inch")); fdui->radio_height_inch = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 120, 96, 30, _("Inch"));
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fdui->radio_height_cm = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 100, 80, 30, _("cm")); fdui->radio_height_cm = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 100, 80, 30, _("cm"));
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fdui->radio_height_default = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 80, 96, 30, _("Default")); fdui->radio_height_default = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 140, 80, 96, 30, _("Default"));
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fl_set_button(obj, 1); fl_set_button(obj, 1);
fl_end_group(); fl_end_group();
@ -115,43 +115,43 @@ FD_form_graphics * FormGraphics::build_graphics()
fdui->input_rotate_angle = obj = fl_add_input(FL_INT_INPUT, 91, 260, 94, 30, idex(_(dummy))); fdui->input_rotate_angle = obj = fl_add_input(FL_INT_INPUT, 91, 260, 94, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1); fl_set_button_shortcut(obj, scex(_(dummy)), 1);
} }
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
{ {
char const * const dummy = N_("Inline Figure|#I"); char const * const dummy = N_("Inline Figure|#I");
fdui->check_inline = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 279, 260, 201, 30, idex(_(dummy))); fdui->check_inline = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 279, 260, 201, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1); fl_set_button_shortcut(obj, scex(_(dummy)), 1);
} }
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
fdui->input_subcaption = obj = fl_add_input(FL_NORMAL_INPUT, 158, 310, 322, 30, ""); fdui->input_subcaption = obj = fl_add_input(FL_NORMAL_INPUT, 158, 310, 322, 30, "");
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
{ {
char const * const dummy = N_("Subcaption|#S"); char const * const dummy = N_("Subcaption|#S");
fdui->check_subcaption = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 120, 310, 30, 30, idex(_(dummy))); fdui->check_subcaption = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 120, 310, 30, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1); fl_set_button_shortcut(obj, scex(_(dummy)), 1);
} }
fl_set_object_lalign(obj, FL_ALIGN_LEFT); fl_set_object_lalign(obj, FL_ALIGN_LEFT);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, CHECKINPUT); fl_set_object_callback(obj, C_FormBaseInputCB, CHECKINPUT);
{ {
char const * const dummy = N_("Update|#U"); char const * const dummy = N_("Update|#U");
fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 20, 350, 90, 30, idex(_(dummy))); fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 20, 350, 90, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1); fl_set_button_shortcut(obj, scex(_(dummy)), 1);
} }
fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest); fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, 0); fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 190, 350, 90, 30, _("Ok")); fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 190, 350, 90, 30, _("Ok"));
fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0); fl_set_object_callback(obj, C_FormBaseOKCB, 0);
{ {
char const * const dummy = N_("Apply|#A"); char const * const dummy = N_("Apply|#A");
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 290, 350, 90, 30, idex(_(dummy))); fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 290, 350, 90, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1); fl_set_button_shortcut(obj, scex(_(dummy)), 1);
} }
fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0); fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
{ {
char const * const dummy = N_("Cancel|^["); char const * const dummy = N_("Cancel|^[");
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 390, 350, 90, 30, idex(_(dummy))); fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 390, 350, 90, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1); fl_set_button_shortcut(obj, scex(_(dummy)), 1);
} }
fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0); fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fl_end_form(); fl_end_form();
fdui->form->fdui = fdui; fdui->form->fdui = fdui;

View File

@ -5,11 +5,11 @@
#define FD_form_graphics_h_ #define FD_form_graphics_h_
/** Callbacks, globals and object handlers **/ /** Callbacks, globals and object handlers **/
extern "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long); extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
extern "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long); extern "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
extern "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long); extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
extern "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long); extern "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
extern "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long); extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
/**** Forms and Objects ****/ /**** Forms and Objects ****/

View File

@ -32,7 +32,7 @@ FD_form_index * FormIndex::build_index()
} }
fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_resize(obj, FL_RESIZE_X); fl_set_object_resize(obj, FL_RESIZE_X);
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0); fl_set_object_callback(obj, C_FormBaseInputCB, 0);
{ {
char const * const dummy = N_("Restore|#R"); char const * const dummy = N_("Restore|#R");
fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 60, 100, 30, idex(_(dummy))); fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 60, 100, 30, idex(_(dummy)));
@ -40,10 +40,10 @@ FD_form_index * FormIndex::build_index()
} }
fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest); fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest);
fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, 0); fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 190, 60, 100, 30, _("OK")); fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 190, 60, 100, 30, _("OK"));
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0); fl_set_object_callback(obj, C_FormBaseOKCB, 0);
{ {
char const * const dummy = N_("Apply|#A"); char const * const dummy = N_("Apply|#A");
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 300, 60, 100, 30, idex(_(dummy))); fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 300, 60, 100, 30, idex(_(dummy)));
@ -51,7 +51,7 @@ FD_form_index * FormIndex::build_index()
} }
fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0); fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
{ {
char const * const dummy = N_("Cancel|^["); char const * const dummy = N_("Cancel|^[");
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 410, 60, 100, 30, idex(_(dummy))); fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 410, 60, 100, 30, idex(_(dummy)));
@ -59,7 +59,7 @@ FD_form_index * FormIndex::build_index()
} }
fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0); fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fl_end_form(); fl_end_form();
fdui->form->fdui = fdui; fdui->form->fdui = fdui;

View File

@ -5,11 +5,11 @@
#define FD_form_index_h_ #define FD_form_index_h_
/** Callbacks, globals and object handlers **/ /** Callbacks, globals and object handlers **/
extern "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long); extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
extern "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long); extern "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
extern "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long); extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
extern "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long); extern "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
extern "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long); extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
/**** Forms and Objects ****/ /**** Forms and Objects ****/

View File

@ -81,7 +81,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: input_filename name: input_filename
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -99,7 +99,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: button_browse name: button_browse
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: BROWSE argument: BROWSE
-------------------- --------------------
@ -153,7 +153,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: input_width name: input_width
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -171,7 +171,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: input_height name: input_height
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -225,7 +225,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: radio_width_percent_page name: radio_width_percent_page
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -243,7 +243,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: radio_width_default name: radio_width_default
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
value: 1 value: 1
@ -262,7 +262,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: radio_width_cm name: radio_width_cm
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -280,7 +280,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: radio_width_inch name: radio_width_inch
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -298,7 +298,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: radio_width_percent_column name: radio_width_percent_column
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -352,7 +352,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: radio_height_percent_page name: radio_height_percent_page
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -370,7 +370,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: radio_height_inch name: radio_height_inch
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -388,7 +388,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: radio_height_cm name: radio_height_cm
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -406,7 +406,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: radio_height_default name: radio_height_default
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
value: 1 value: 1
@ -570,7 +570,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: input_rotate_angle name: input_rotate_angle
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -588,7 +588,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: check_inline name: check_inline
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -606,7 +606,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: input_subcaption name: input_subcaption
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -624,7 +624,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: check_subcaption name: check_subcaption
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: CHECKINPUT argument: CHECKINPUT
-------------------- --------------------
@ -642,7 +642,7 @@ shortcut:
resize: FL_RESIZE_NONE resize: FL_RESIZE_NONE
gravity: FL_SouthWest FL_SouthWest gravity: FL_SouthWest FL_SouthWest
name: button_restore name: button_restore
callback: C_FormBaseDeprecatedRestoreCB callback: C_FormBaseRestoreCB
argument: 0 argument: 0
-------------------- --------------------
@ -660,7 +660,7 @@ shortcut: ^M
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: button_ok name: button_ok
callback: C_FormBaseDeprecatedOKCB callback: C_FormBaseOKCB
argument: 0 argument: 0
-------------------- --------------------
@ -678,7 +678,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: button_apply name: button_apply
callback: C_FormBaseDeprecatedApplyCB callback: C_FormBaseApplyCB
argument: 0 argument: 0
-------------------- --------------------
@ -696,7 +696,7 @@ shortcut:
resize: FL_RESIZE_ALL resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: button_cancel name: button_cancel
callback: C_FormBaseDeprecatedCancelCB callback: C_FormBaseCancelCB
argument: 0 argument: 0
============================== ==============================

View File

@ -45,7 +45,7 @@ shortcut:
resize: FL_RESIZE_X resize: FL_RESIZE_X
gravity: FL_NoGravity FL_NoGravity gravity: FL_NoGravity FL_NoGravity
name: input_key name: input_key
callback: C_FormBaseDeprecatedInputCB callback: C_FormBaseInputCB
argument: 0 argument: 0
-------------------- --------------------
@ -63,7 +63,7 @@ shortcut:
resize: FL_RESIZE_NONE resize: FL_RESIZE_NONE
gravity: FL_SouthWest FL_SouthWest gravity: FL_SouthWest FL_SouthWest
name: button_restore name: button_restore
callback: C_FormBaseDeprecatedRestoreCB callback: C_FormBaseRestoreCB
argument: 0 argument: 0
-------------------- --------------------
@ -81,7 +81,7 @@ shortcut: ^M
resize: FL_RESIZE_NONE resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast gravity: FL_SouthEast FL_SouthEast
name: button_ok name: button_ok
callback: C_FormBaseDeprecatedOKCB callback: C_FormBaseOKCB
argument: 0 argument: 0
-------------------- --------------------
@ -99,7 +99,7 @@ shortcut:
resize: FL_RESIZE_NONE resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast gravity: FL_SouthEast FL_SouthEast
name: button_apply name: button_apply
callback: C_FormBaseDeprecatedApplyCB callback: C_FormBaseApplyCB
argument: 0 argument: 0
-------------------- --------------------
@ -117,7 +117,7 @@ shortcut:
resize: FL_RESIZE_NONE resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast gravity: FL_SouthEast FL_SouthEast
name: button_cancel name: button_cancel
callback: C_FormBaseDeprecatedCancelCB callback: C_FormBaseCancelCB
argument: 0 argument: 0
============================== ==============================