+2000-10-01 Allan Rae <rae@lyx.org>
+
+ * src/PrinterParams.h: moved things around to avoid the "can't
+ inline call" warning.
+
+ * src/frontends/xforms/RadioButtonGroup.h: turned a comment
+ into doc++ documentation.
+
+ * src/frontends/xforms/FormCommand.[Ch]: support button policy
+
+ * src/frontends/xforms/FormRef.C: make use of button controller
+ * src/frontends/xforms/FormDocument.[Ch]: convert to use FormBase
+ cleaned up button controller usage.
+ * src/frontends/xforms/FormPreferences.[Ch]: convert to use FormBase
+ * src/frontends/xforms/FormPrint.[Ch]: convert to use FormBase and
+ use the button controller
+
+ * src/frontends/xforms/forms/*.fd: and associated generated files
+ updated to reflect changes to FormBase. Some other FormXxxx files
+ also got minor updates to reflect changes to FormBase.
+
+ * src/frontends/xforms/FormBase.[Ch]: (ok, cancel): new
+ (hide): made virtual.
+ (input): return a bool. true == valid input
+ (RestoreCB, restore): new
+ (CancelCB, OKCB): renamed from HideCB and ApplyHideCB.
+ Changes to allow derived dialogs to use a ButtonController and
+ make sense when doing so: OK button calls ok() and so on.
+
+ * src/frontends/xforms/ButtonController.h (class ButtonController):
+ Switch from template implementation to taking Policy parameter.
+ Allows FormBase to provide a ButtonController for any dialog.
+
+ * src/frontends/xforms/FormPrint.C (connect): setup sizing at show-time
+ Probably should rename connect and disconnect.
+ (apply): use the radio button groups
+ (form): needed by FormBase
+ (build): setup the radio button groups
+
2000-09-29 Lars Gullik Bjønnes <larsbj@lyx.org>
* several files: type canges to reduce the number of warnings and
// Override document settings for duplex.
// bool duplex;
+ /** Test that all the fields contain valid entries. It's unlikely
+ that the internal code will get this wrong (at least for the
+ xforms code anyway) however new ports and external scripts
+ might drive the wrong values in.
+ */
+ void testInvariant() const
+ {
+#ifdef ENABLE_ASSERTIONS
+ if (!from_page.empty()) {
+ // Assert(from_page == number or empty)
+ Assert(containsOnly(from_page, "1234567890"));
+ }
+ if (to_page) {
+ // Assert(to_page == empty
+ // or number iff from_page set)
+ Assert(!from_page.empty());
+ }
+ switch (target) {
+ case PRINTER:
+// Assert(!printer_name.empty());
+ break;
+ case FILE:
+ Assert(!file_name.empty());
+ break;
+ default:
+ Assert(false);
+ break;
+ }
+ switch (which_pages) {
+ case ALL:
+ case ODD:
+ case EVEN:
+ break;
+ default:
+ Assert(false);
+ break;
+ }
+#endif
+ }
+
///
PrinterParams(Target const & t = PRINTER,
string const & pname = lyxrc.printer,
// friend bool operator==(PrinterParams const &, PrinterParams const &);
// friend bool operator<(PrinterParams const &, PrinterParams const &);
- /** Test that all the fields contain valid entries. It's unlikely
- that the internal code will get this wrong (at least for the
- xforms code anyway) however new ports and external scripts
- might drive the wrong values in.
- */
- void testInvariant() const
- {
-#ifdef ENABLE_ASSERTIONS
- if (!from_page.empty()) {
- // Assert(from_page == number or empty)
- Assert(containsOnly(from_page, "1234567890"));
- }
- if (to_page) {
- // Assert(to_page == empty
- // or number iff from_page set)
- Assert(!from_page.empty());
- }
- switch (target) {
- case PRINTER:
-// Assert(!printer_name.empty());
- break;
- case FILE:
- Assert(!file_name.empty());
- break;
- default:
- Assert(false);
- break;
- }
- switch (which_pages) {
- case ALL:
- case ODD:
- case EVEN:
- break;
- default:
- Assert(false);
- break;
- }
-#endif
- }
};
#endif
the activation policy and which buttons correspond to which output of the
state machine.
@author Allan Rae <rae@lyx.org>
+ 20001001 Switch from template implementation to taking Policy parameter.
+ Allows FormBase to provide a ButtonController for any dialog.
*/
-template <class Policy>
class ButtonController : public noncopyable
{
public:
you can just assign "Cancel" to both labels. Or even reuse this
class for something completely different.
*/
- ButtonController(char const * cancel, char const * close)
- : bp_(), okay_(0), apply_(0), cancel_(0), undo_all_(0),
+ ButtonController(ButtonPolicy * bp, char const * cancel, char const * close)
+ : bp_(bp), okay_(0), apply_(0), cancel_(0), undo_all_(0),
read_only_(), cancel_label(cancel), close_label(close) {}
/// Somebody else owns the FL_OBJECTs we just manipulate them.
~ButtonController() {}
}
/* Action Functions */
- ///
- void input(ButtonPolicy::SMInput in) {
- bp_.input(in);
- refresh();
- }
- ///
- void ok() {
- input(ButtonPolicy::SMI_OKAY);
- }
- ///
- void apply() {
- input(ButtonPolicy::SMI_APPLY);
- }
- ///
- void cancel() {
- input(ButtonPolicy::SMI_CANCEL);
- }
- ///
- void undoAll() {
- input(ButtonPolicy::SMI_UNDO_ALL);
- }
- ///
- void hide() {
- input(ButtonPolicy::SMI_HIDE);
- }
- /// Passthrough function -- returns its input value
- bool readOnly(bool ro = true) {
- if (ro) {
- input(ButtonPolicy::SMI_READ_ONLY);
- } else {
- input(ButtonPolicy::SMI_READ_WRITE);
- }
- return ro;
- }
- ///
- void readWrite() {
- read_only(false);
- }
- /// Passthrough function -- returns its input value
- bool valid(bool v = true) {
- if (v) {
- input(ButtonPolicy::SMI_VALID);
- } else {
- input(ButtonPolicy::SMI_INVALID);
- }
- return v;
- }
- ///
- void invalid() {
- valid(false);
- }
/// force a refresh of the buttons
void refresh() {
if (okay_) {
- if (bp_.buttonStatus(ButtonPolicy::OKAY)) {
+ if (bp_->buttonStatus(ButtonPolicy::OKAY)) {
fl_activate_object(okay_);
fl_set_object_lcol(okay_, FL_BLACK);
} else {
}
}
if (apply_) {
- if (bp_.buttonStatus(ButtonPolicy::APPLY)) {
+ if (bp_->buttonStatus(ButtonPolicy::APPLY)) {
fl_activate_object(apply_);
fl_set_object_lcol(apply_, FL_BLACK);
} else {
}
}
if (undo_all_) {
- if (bp_.buttonStatus(ButtonPolicy::UNDO_ALL)) {
+ if (bp_->buttonStatus(ButtonPolicy::UNDO_ALL)) {
fl_activate_object(undo_all_);
fl_set_object_lcol(undo_all_, FL_BLACK);
} else {
}
}
if (cancel_) {
- if (bp_.buttonStatus(ButtonPolicy::CANCEL)) {
+ if (bp_->buttonStatus(ButtonPolicy::CANCEL)) {
fl_set_object_label(cancel_,
cancel_label);
} else {
}
}
if (!read_only_.empty()) {
- if (bp_.isReadOnly()) {
+ if (bp_->isReadOnly()) {
std::list<FL_OBJECT *>::iterator
end = read_only_.end();
for (std::list<FL_OBJECT *>::iterator
}
}
}
+ ///
+ void input(ButtonPolicy::SMInput in) {
+ bp_->input(in);
+ refresh();
+ }
+ ///
+ void ok() {
+ input(ButtonPolicy::SMI_OKAY);
+ }
+ ///
+ void apply() {
+ input(ButtonPolicy::SMI_APPLY);
+ }
+ ///
+ void cancel() {
+ input(ButtonPolicy::SMI_CANCEL);
+ }
+ ///
+ void undoAll() {
+ input(ButtonPolicy::SMI_UNDO_ALL);
+ }
+ ///
+ void hide() {
+ input(ButtonPolicy::SMI_HIDE);
+ }
+ /// Passthrough function -- returns its input value
+ bool readOnly(bool ro = true) {
+ if (ro) {
+ input(ButtonPolicy::SMI_READ_ONLY);
+ } else {
+ input(ButtonPolicy::SMI_READ_WRITE);
+ }
+ return ro;
+ }
+ ///
+ void readWrite() {
+ readOnly(false);
+ }
+ /// Passthrough function -- returns its input value
+ bool valid(bool v = true) {
+ if (v) {
+ input(ButtonPolicy::SMI_VALID);
+ } else {
+ input(ButtonPolicy::SMI_INVALID);
+ }
+ return v;
+ }
+ ///
+ void invalid() {
+ valid(false);
+ }
private:
///
- Policy bp_;
+ ButtonPolicy * bp_;
///
FL_OBJECT * okay_;
///
C_RETURNCB (FormBase, WMHideCB)
C_GENERICCB(FormBase, ApplyCB)
-C_GENERICCB(FormBase, ApplyHideCB)
-C_GENERICCB(FormBase, HideCB)
+C_GENERICCB(FormBase, OKCB)
+C_GENERICCB(FormBase, CancelCB)
C_GENERICCB(FormBase, InputCB)
+C_GENERICCB(FormBase, RestoreCB)
-FormBase::FormBase(LyXView * lv, Dialogs * d, BufferDependency bd, string const & t)
- : dialogIsOpen(false), lv_(lv), u_(0), h_(0), title(t)
+FormBase::FormBase(LyXView * lv, Dialogs * d, BufferDependency bd, string const & t,
+ ButtonPolicy * bp, char const * close, char const * cancel)
+ : dialogIsOpen(false), lv_(lv), bc_(bp, cancel, close),
+ u_(0), h_(0), title(t), bp_(bp)
{
switch( bd ) {
case BUFFER_DEPENDENT:
}
}
-
+
+FormBase::~FormBase()
+{
+ delete bp_;
+}
+
+
void FormBase::show()
{
if (!form()) {
// window manager is used to close the dialog.
FormBase * pre = static_cast<FormBase*>(form->u_vdata);
pre->hide();
+ pre->bc_.hide();
return FL_CANCEL;
}
{
FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
pre->apply();
+ pre->bc_.apply();
}
-void FormBase::ApplyHideCB(FL_OBJECT * ob, long)
+void FormBase::OKCB(FL_OBJECT * ob, long)
{
FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
- pre->apply();
- pre->hide();
+ pre->ok();
+ pre->bc_.ok();
}
-void FormBase::HideCB(FL_OBJECT * ob, long)
+void FormBase::CancelCB(FL_OBJECT * ob, long)
{
FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
- pre->hide();
+ pre->cancel();
+ pre->bc_.cancel();
+}
+
+
+void FormBase::InputCB(FL_OBJECT * ob, long data )
+{
+ FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
+ pre->bc_.valid( pre->input( data ) );
}
-void FormBase::InputCB(FL_OBJECT * ob, long data)
+void FormBase::RestoreCB(FL_OBJECT * ob, long)
{
FormBase * pre = static_cast<FormBase*>(ob->form->u_vdata);
- pre->input( data );
+ pre->restore();
+ pre->bc_.undoAll();
}
#include "LString.h"
#include "support/utility.hpp"
#include FORMS_H_LOCATION
+#include "ButtonController.h"
+#include "gettext.h"
class Dialogs;
class LyXView;
BUFFER_INDEPENDENT
};
- /// Constructor
- FormBase(LyXView *, Dialogs *, BufferDependency, string const &);
+ /** Constructor.
+ #FormBase(lv, d, BUFFER_DEPENDENT, _("DialogName"), new ButtonPolicy)#
+ */
+ FormBase(LyXView *, Dialogs *, BufferDependency, string const &,
+ ButtonPolicy * bp = new OkApplyCancelReadOnlyPolicy,
+ char const * close = N_("Close"),
+ char const * cancel = N_("Cancel"));
+ ///
+ virtual ~FormBase();
/// Callback functions
static int WMHideCB(FL_FORM *, void *);
///
static void ApplyCB(FL_OBJECT *, long);
///
- static void ApplyHideCB(FL_OBJECT *, long);
+ static void OKCB(FL_OBJECT *, long);
///
- static void HideCB(FL_OBJECT *, long);
+ static void CancelCB(FL_OBJECT *, long);
///
static void InputCB(FL_OBJECT *, long);
+ ///
+ static void RestoreCB(FL_OBJECT *, long);
protected:
/// Create the dialog if necessary, update it and display it.
void show();
/// Hide the dialog.
- void hide();
+ virtual void hide();
/// Connect signals
virtual void connect();
/// Disconnect signals
virtual void disconnect();
/// Build the dialog
virtual void build() = 0;
- /// Filter the inputs on callback from xforms
- virtual void input( long ) {}
+ /** Filter the inputs on callback from xforms
+ Return true if inputs are valid.
+ */
+ virtual bool input( long ) {
+ return true;
+ }
/// Update dialog before showing it
virtual void update() {}
/// Apply from dialog (modify or create inset)
virtual void apply() {}
+ /// OK from dialog
+ virtual void ok() {
+ apply();
+ hide();
+ }
+ /// Cancel from dialog
+ virtual void cancel() {
+ hide();
+ }
+ /// Restore from dialog
+ virtual void restore() {}
/// delete derived class variables when hide()ing
virtual void clearStore() {}
/// Pointer to the actual instantiation of xform's form
save a couple of bytes per dialog.
*/
LyXView * lv_;
+ /// Useable even in derived-class's const functions
+ mutable ButtonController bc_;
private:
/// Hide signal
Connection h_;
/// dialog title, displayed by WM.
string title;
+ ///
+ ButtonPolicy * bp_;
};
#endif
#endif
-#include "gettext.h"
#include "Dialogs.h"
#include "FormCitation.h"
#include "LyXView.h"
FormCitation::FormCitation(LyXView * lv, Dialogs * d)
: FormCommand(lv, d, _("Citation")), dialog_(0)
{
- dialog_ = 0;
// let the dialog be shown
// These are permanent connections so we won't bother
// storing a copy because we won't be disconnecting.
}
-void FormCitation::input(long data)
+#ifdef WITH_WARNINGS
+#warning convert this to use the buttoncontroller
+#endif
+bool FormCitation::input( long data )
{
State cb = static_cast<FormCitation::State>( data );
default:
break;
}
+ return true;
}
/// Build the dialog
virtual void build();
/// Filter the inputs
- virtual void input(long);
+ virtual bool input( long );
/// Update dialog before showing it
virtual void update();
/// Apply from dialog (modify or create inset)
#include "Dialogs.h"
#include "FormCommand.h"
-FormCommand::FormCommand( LyXView * lv, Dialogs * d, string const & t )
- : FormBase( lv, d, BUFFER_DEPENDENT, t ),
+FormCommand::FormCommand( LyXView * lv, Dialogs * d, string const & t,
+ ButtonPolicy * bp )
+ : FormBase( lv, d, BUFFER_DEPENDENT, t, bp ),
inset_(0), ih_(0)
{}
void FormCommand::showInset( InsetCommand * const inset )
{
- if( dialogIsOpen || inset == 0 ) return;
+ if ( dialogIsOpen || inset == 0 ) return;
inset_ = inset;
ih_ = inset_->hide.connect(slot(this, &FormCommand::hide));
void FormCommand::createInset( string const & arg )
{
- if( dialogIsOpen ) return;
+ if ( dialogIsOpen ) return;
params.setFromString( arg );
show();
class FormCommand : public FormBase {
public:
/// Constructor
- FormCommand( LyXView *, Dialogs *, string const & );
+ FormCommand( LyXView *, Dialogs *, string const &,
+ ButtonPolicy * bp = new OkCancelReadOnlyPolicy );
protected:
/// Slot launching dialog to (possibly) create a new inset
#include "Dialogs.h"
#include "LyXView.h"
-#include "gettext.h"
#include "form_copyright.h"
#include "FormCopyright.h"
FL_FORM * const FormCopyright::form() const
{
- if( dialog_ ) // no need to test for dialog_->form
- return dialog_->form;
- else
- return 0;
+ if ( dialog_ ) return dialog_->form;
+ return 0;
}
#define FORMCOPYRIGHT_H
#include "FormBase.h"
-#include "form_copyright.h"
#ifdef __GNUG__
#pragma interface
private:
/// Build the dialog
- void build();
+ virtual void build();
/// Pointer to the actual instantiation of the xform's form
- FL_FORM * const form() const;
+ virtual FL_FORM * const form() const;
/// Fdesign generated method
FD_form_copyright * build_copyright();
#endif
#include "lyx_gui_misc.h"
-#include "gettext.h"
#include FORMS_H_LOCATION
#include XPM_H_LOCATION
#include "Liason.h"
#include "CutAndPaste.h"
#include "bufferview_funcs.h"
-#include "ButtonController.h"
#ifdef SIGC_CXX_NAMESPACES
using SigC::slot;
#define USE_CLASS_COMBO 1
-C_RETURNCB(FormDocument, WMHideCB)
C_GENERICCB(FormDocument, InputCB)
-C_GENERICCB(FormDocument, OKCB)
-C_GENERICCB(FormDocument, ApplyCB)
-C_GENERICCB(FormDocument, CancelCB)
-C_GENERICCB(FormDocument, RestoreCB)
C_GENERICCB(FormDocument, ChoiceClassCB)
C_GENERICCB(FormDocument, BulletPanelCB)
C_GENERICCB(FormDocument, BulletDepthCB)
FormDocument::FormDocument(LyXView * lv, Dialogs * d)
- : dialog_(0), paper_(0), class_(0), language_(0), options_(0),
- bullets_(0), lv_(lv), d_(d), u_(0), h_(0),
- status(POPUP_UNMODIFIED) ,
- bc_(new ButtonController<NoRepeatedApplyReadOnlyPolicy>(_("Cancel"),
- _("Close")))
+ : FormBase(lv, d, BUFFER_DEPENDENT, _("Document Layout"),
+ new NoRepeatedApplyReadOnlyPolicy),
+ dialog_(0), paper_(0), class_(0), language_(0), options_(0),
+ bullets_(0)
{
// let the popup be shown
// This is a permanent connection so we won't bother
FormDocument::~FormDocument()
{
- free();
- delete bc_;
+#ifdef USE_CLASS_COMBO
+ delete combo_doc_class;
+#endif
+ delete class_;
+ delete paper_;
+ delete combo_language;
+ delete language_;
+ delete options_;
+ delete bullets_;
+ delete dialog_;
+}
+
+
+FL_FORM * const FormDocument::form() const
+{
+ if (dialog_) return dialog_->form;
+ return 0;
}
dialog_ = build_tabbed_document();
// manage the restore, ok, apply and cancel/close buttons
- bc_->setOK(dialog_->button_ok);
- bc_->setApply(dialog_->button_apply);
- bc_->setCancel(dialog_->button_cancel);
- bc_->setUndoAll(dialog_->button_restore);
- bc_->refresh();
+ bc_.setOK(dialog_->button_ok);
+ bc_.setApply(dialog_->button_apply);
+ bc_.setCancel(dialog_->button_cancel);
+ bc_.setUndoAll(dialog_->button_restore);
+ bc_.refresh();
// the document paper form
paper_ = build_doc_paper();
fl_set_input_return(paper_->input_head_sep, FL_RETURN_ALWAYS);
fl_set_input_return(paper_->input_foot_skip, FL_RETURN_ALWAYS);
- bc_->addReadOnly (paper_->choice_paperpackage);
- bc_->addReadOnly (paper_->greoup_radio_orientation);
- bc_->addReadOnly (paper_->radio_portrait);
- bc_->addReadOnly (paper_->radio_landscape);
- bc_->addReadOnly (paper_->choice_papersize2);
- bc_->addReadOnly (paper_->push_use_geometry);
- bc_->addReadOnly (paper_->input_custom_width);
- bc_->addReadOnly (paper_->input_custom_height);
- bc_->addReadOnly (paper_->input_top_margin);
- bc_->addReadOnly (paper_->input_bottom_margin);
- bc_->addReadOnly (paper_->input_left_margin);
- bc_->addReadOnly (paper_->input_right_margin);
- bc_->addReadOnly (paper_->input_head_height);
- bc_->addReadOnly (paper_->input_head_sep);
- bc_->addReadOnly (paper_->input_foot_skip);
+ bc_.addReadOnly (paper_->choice_paperpackage);
+ bc_.addReadOnly (paper_->greoup_radio_orientation);
+ bc_.addReadOnly (paper_->radio_portrait);
+ bc_.addReadOnly (paper_->radio_landscape);
+ bc_.addReadOnly (paper_->choice_papersize2);
+ bc_.addReadOnly (paper_->push_use_geometry);
+ bc_.addReadOnly (paper_->input_custom_width);
+ bc_.addReadOnly (paper_->input_custom_height);
+ bc_.addReadOnly (paper_->input_top_margin);
+ bc_.addReadOnly (paper_->input_bottom_margin);
+ bc_.addReadOnly (paper_->input_left_margin);
+ bc_.addReadOnly (paper_->input_right_margin);
+ bc_.addReadOnly (paper_->input_head_height);
+ bc_.addReadOnly (paper_->input_head_sep);
+ bc_.addReadOnly (paper_->input_foot_skip);
// the document class form
class_ = build_doc_class();
fl_set_input_return(class_->input_doc_skip, FL_RETURN_ALWAYS);
fl_set_input_return(class_->input_doc_spacing, FL_RETURN_ALWAYS);
- bc_->addReadOnly (class_->radio_doc_indent);
- bc_->addReadOnly (class_->radio_doc_skip);
+ bc_.addReadOnly (class_->radio_doc_indent);
+ bc_.addReadOnly (class_->radio_doc_skip);
#ifndef USE_CLASS_COMBO
- bc_->addReadOnly (class_->choice_doc_class);
+ bc_.addReadOnly (class_->choice_doc_class);
#endif
- bc_->addReadOnly (class_->choice_doc_pagestyle);
- bc_->addReadOnly (class_->choice_doc_fonts);
- bc_->addReadOnly (class_->choice_doc_fontsize);
- bc_->addReadOnly (class_->radio_doc_sides_one);
- bc_->addReadOnly (class_->radio_doc_sides_two);
- bc_->addReadOnly (class_->radio_doc_columns_one);
- bc_->addReadOnly (class_->radio_doc_columns_two);
- bc_->addReadOnly (class_->input_doc_extra);
- bc_->addReadOnly (class_->input_doc_skip);
- bc_->addReadOnly (class_->choice_doc_skip);
- bc_->addReadOnly (class_->choice_doc_spacing);
- bc_->addReadOnly (class_->input_doc_spacing);
+ bc_.addReadOnly (class_->choice_doc_pagestyle);
+ bc_.addReadOnly (class_->choice_doc_fonts);
+ bc_.addReadOnly (class_->choice_doc_fontsize);
+ bc_.addReadOnly (class_->radio_doc_sides_one);
+ bc_.addReadOnly (class_->radio_doc_sides_two);
+ bc_.addReadOnly (class_->radio_doc_columns_one);
+ bc_.addReadOnly (class_->radio_doc_columns_two);
+ bc_.addReadOnly (class_->input_doc_extra);
+ bc_.addReadOnly (class_->input_doc_skip);
+ bc_.addReadOnly (class_->choice_doc_skip);
+ bc_.addReadOnly (class_->choice_doc_spacing);
+ bc_.addReadOnly (class_->input_doc_spacing);
// the document language form
language_ = build_doc_language();
_(" ``text'' | ''text'' | ,,text`` | ,,text'' |"
" «text» | »text« "));
- bc_->addReadOnly (language_->choice_language);
- bc_->addReadOnly (language_->choice_inputenc);
+ bc_.addReadOnly (language_->choice_language);
+ bc_.addReadOnly (language_->choice_inputenc);
// the document options form
options_ = build_doc_options();
fl_addto_choice(options_->choice_postscript_driver, tex_graphics[n]);
}
- bc_->addReadOnly (options_->slider_secnumdepth);
- bc_->addReadOnly (options_->slider_tocdepth);
- bc_->addReadOnly (options_->check_use_amsmath);
- bc_->addReadOnly (options_->input_float_placement);
- bc_->addReadOnly (options_->choice_postscript_driver);
+ bc_.addReadOnly (options_->slider_secnumdepth);
+ bc_.addReadOnly (options_->slider_tocdepth);
+ bc_.addReadOnly (options_->check_use_amsmath);
+ bc_.addReadOnly (options_->input_float_placement);
+ bc_.addReadOnly (options_->choice_postscript_driver);
// the document bullets form
bullets_ = build_doc_bullet();
fl_set_input_return(bullets_->input_bullet_latex, FL_RETURN_CHANGED);
fl_set_input_maxchars(bullets_->input_bullet_latex, 80);
- fl_set_form_atclose(dialog_->form,
- C_FormDocumentWMHideCB, 0);
+ bc_.addReadOnly (bullets_->bmtable_bullet_panel);
+ bc_.addReadOnly (bullets_->choice_bullet_size);
+ bc_.addReadOnly (bullets_->input_bullet_latex);
+
fl_addto_tabfolder(dialog_->tabbed_folder,_("Document"),
class_->form);
fl_addto_tabfolder(dialog_->tabbed_folder,_("Paper"),
}
-void FormDocument::show()
-{
- if (!dialog_)
- build();
-
- update(); // make sure its up-to-date
- if (dialog_->form->visible) {
- fl_raise_form(dialog_->form);
- } else {
- fl_show_form(dialog_->form,
- FL_PLACE_MOUSE | FL_FREE_SIZE,
- FL_TRANSIENT, _("Document Layout"));
- u_ = d_->updateBufferDependent.connect(
- slot(this, &FormDocument::update));
- h_ = d_->hideBufferDependent.connect(
- slot(this, &FormDocument::hide));
- }
-}
-
-
-void FormDocument::hide()
-{
- if (dialog_->form->visible) {
- fl_hide_form(dialog_->form);
- u_.disconnect();
- h_.disconnect();
- }
-}
-
-
void FormDocument::apply()
{
if (!lv_->view()->available() || !dialog_)
param.temp_bullets[1] = param.user_defined_bullets[1];
param.temp_bullets[2] = param.user_defined_bullets[2];
param.temp_bullets[3] = param.user_defined_bullets[3];
+ hide();
}
fl_activate_object(fbullet);
fl_set_object_lcol(fbullet, FL_BLACK);
}
- if (lv_->buffer()->isReadonly()) {
- fl_deactivate_object (bullets_->bmtable_bullet_panel);
- fl_deactivate_object (bullets_->choice_bullet_size);
- fl_deactivate_object (bullets_->input_bullet_latex);
- } else {
- fl_activate_object (bullets_->bmtable_bullet_panel);
- fl_activate_object (bullets_->choice_bullet_size);
- fl_activate_object (bullets_->input_bullet_latex);
- }
fl_set_button(bullets_->radio_bullet_depth_1, 1);
fl_set_input(bullets_->input_bullet_latex,
}
-void FormDocument::free()
-{
- if (dialog_) {
- hide();
- if (class_) {
-#ifdef USE_CLASS_COMBO
- delete combo_doc_class;
-#endif
- fl_free_form(class_->form);
- delete class_;
- class_ = 0;
- }
- if (paper_) {
- fl_free_form(paper_->form);
- delete paper_;
- paper_ = 0;
- }
- if (language_) {
- delete combo_language;
- fl_free_form(language_->form);
- delete language_;
- language_ = 0;
- }
- if (options_) {
- fl_free_form(options_->form);
- delete options_;
- options_ = 0;
- }
- if (bullets_) {
- fl_free_form(bullets_->form);
- delete bullets_;
- bullets_ = 0;
- }
- fl_free_form(dialog_->form);
- delete dialog_;
- dialog_ = 0;
- }
-}
-
-
-int FormDocument::WMHideCB(FL_FORM * form, void *)
-{
- // Ensure that the signals (u and h) are disconnected even if the
- // window manager is used to close the popup.
- FormDocument * pre = static_cast<FormDocument*>(form->u_vdata);
- pre->hide();
- pre->bc_->hide();
- return FL_CANCEL;
-}
-
-
-void FormDocument::OKCB(FL_OBJECT * ob, long)
-{
- FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
- pre->apply();
- pre->hide();
- pre->bc_->ok();
-}
-
-
-void FormDocument::ApplyCB(FL_OBJECT * ob, long)
-{
- FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
- pre->apply();
- pre->bc_->apply();
-}
-
-
-void FormDocument::CancelCB(FL_OBJECT * ob, long)
-{
- FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
- pre->cancel();
- pre->hide();
- pre->bc_->cancel();
-}
-
-
-void FormDocument::RestoreCB(FL_OBJECT * ob, long)
-{
- FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
- pre->update();
- pre->bc_->undoAll();
-}
-
-
void FormDocument::InputCB(FL_OBJECT * ob, long)
{
FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
- pre->bc_->valid(pre->CheckDocumentInput(ob,0));
+ pre->bc_.valid(pre->CheckDocumentInput(ob,0));
}
FormDocument * pre = static_cast<FormDocument*>(v);
if (combox == pre->combo_doc_class)
pre->CheckChoiceClass(0, 0);
- pre->bc_->valid(pre->CheckDocumentInput(0,0));
+ pre->bc_.valid(pre->CheckDocumentInput(0,0));
}
{
FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
pre->CheckChoiceClass(ob,0);
- pre->bc_->valid(pre->CheckDocumentInput(ob,0));
+ pre->bc_.valid(pre->CheckDocumentInput(ob,0));
}
void FormDocument::checkReadOnly()
{
- if (bc_->readOnly(lv_->buffer()->isReadonly())) {
+ if (bc_.readOnly(lv_->buffer()->isReadonly())) {
combo_doc_class->deactivate();
combo_language->deactivate();
fl_set_object_label(dialog_->text_warning,
{
FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
pre->ChoiceBulletSize(ob,0);
- pre->bc_->valid(pre->CheckDocumentInput(ob,0));
+ pre->bc_.valid(pre->CheckDocumentInput(ob,0));
}
{
FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
pre->InputBulletLaTeX(ob,0);
- pre->bc_->valid(pre->CheckDocumentInput(ob,0));
+ pre->bc_.valid(pre->CheckDocumentInput(ob,0));
}
}
-void FormDocument::BulletDepthCB(FL_OBJECT * ob, long)
+void FormDocument::BulletDepthCB(FL_OBJECT * ob, long data)
{
FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
- pre->BulletDepth(ob,0);
+ pre->BulletDepth(ob, data);
}
{
FormDocument * pre = static_cast<FormDocument*>(ob->form->u_vdata);
pre->BulletBMTable(ob,0);
- pre->bc_->valid(pre->CheckDocumentInput(ob,0));
+ pre->bc_.valid(pre->CheckDocumentInput(ob,0));
}
#ifndef FORM_DOCUMENT_H
#define FORM_DOCUMENT_H
-#include "DialogBase.h"
-#include "support/utility.hpp"
+#include "FormBase.h"
#include <vector>
#ifdef __GNUG_
class Dialogs;
class Combox;
class BufferParams;
-class NoRepeatedApplyReadOnlyPolicy;
-template <class x> class ButtonController;
struct FD_form_tabbed_document;
struct FD_form_doc_paper;
struct FD_form_doc_options;
struct FD_form_doc_bullet;
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
-#endif
-
/** This class provides an XForms implementation of the FormDocument Popup.
The table-layout-form here changes values for latex-tabulars
*/
-class FormDocument : public DialogBase, public noncopyable {
+class FormDocument : public FormBase {
public:
/// #FormDocument x(Communicator ..., Popups ...);#
FormDocument(LyXView *, Dialogs *);
///
~FormDocument();
- ///
- static int WMHideCB(FL_FORM *, void *);
- ///
- static void OKCB(FL_OBJECT *, long);
- ///
- static void ApplyCB(FL_OBJECT *, long);
- ///
- static void CancelCB(FL_OBJECT *, long);
- ///
- static void RestoreCB(FL_OBJECT *, long);
- ///
+ /// this operates very differently to FormBase::InputCB
static void InputCB(FL_OBJECT *, long);
///
static void ComboInputCB(int, void *, Combox *);
static void BulletPanelCB(FL_OBJECT * ob, long);
///
static void BulletBMTableCB(FL_OBJECT * ob, long);
- ///
- enum EnumPopupStatus {
- ///
- POPUP_UNMODIFIED,
- ///
- POPUP_MODIFIED,
- ///
- POPUP_READONLY
- };
private:
///
///
void UpdateLayoutDocument(BufferParams const & params);
- /// Create the popup if necessary, update it and display it.
- void show();
- /// Hide the popup.
- void hide();
/// Update the popup.
- void update();
+ virtual void update();
///
void paper_update(BufferParams const &);
///
///
void bullets_update(BufferParams const &);
/// Apply from popup
- void apply();
+ virtual void apply();
///
void paper_apply();
///
///
void bullets_apply();
/// Cancel from popup
- void cancel();
+ virtual void cancel();
+ ///
+ virtual void restore() {
+ update();
+ }
/// Build the popup
- void build();
- /// Explicitly free the popup.
- void free();
+ virtual void build();
+ ///
+ virtual FL_FORM * const FormDocument::form() const;
/// Typedefinitions from the fdesign produced Header file
FD_form_tabbed_document * build_tabbed_document();
FD_form_doc_options * options_;
///
FD_form_doc_bullet * bullets_;
- /// Which LyXView do we belong to?
- LyXView * lv_;
- ///
- Dialogs * d_;
- /// Update connection.
- Connection u_;
- /// Hide connection.
- Connection h_;
- /// has form contents changed? Used to control OK/Apply
- EnumPopupStatus status;
///
int ActCell;
///
Combox * combo_language;
///
Combox * combo_doc_class;
- ///
- ButtonController<NoRepeatedApplyReadOnlyPolicy> * bc_;
};
#endif
/// Slot launching dialog to an existing inset
void showInset( InsetError * const );
/// Update dialog before showing it
- void update();
+ virtual void update();
/// Build the dialog
- void build();
+ virtual void build();
/// Reset data when hide() is called
- void clearStore();
+ virtual void clearStore();
/// Pointer to the actual instantiation of the xform's form
- FL_FORM * const form() const;
+ virtual FL_FORM * const form() const;
/// Fdesign generated method
FD_form_error * build_error();
#endif
-#include "gettext.h"
#include "Dialogs.h"
#include "FormIndex.h"
#include "LyXView.h"
private:
/// Build the dialog
virtual void build();
- /// Not used but must be instantiated
- virtual void input(long) {}
/// Update dialog before showing it
virtual void update();
/// Apply from dialog (modify or create inset)
FormParagraph::FormParagraph(LyXView * lv, Dialogs * d)
: dialog_(0), general_(0), extra_(0),
lv_(lv), d_(d), u_(0), h_(0),
- status(POPUP_UNMODIFIED) ,
- bc_(new ButtonController<NoRepeatedApplyReadOnlyPolicy>(_("Cancel"),
- _("Close")))
+ status(POPUP_UNMODIFIED),
+// this will leak till converted to use FormBase
+ bc_(new ButtonController(new NoRepeatedApplyReadOnlyPolicy,
+ _("Cancel"),
+ _("Close")))
{
// let the popup be shown
// This is a permanent connection so we won't bother
class LyXView;
class Dialogs;
class NoRepeatedApplyReadOnlyPolicy;
-template <class x> class ButtonController;
+//template <class x> class ButtonController;
+class ButtonController;
struct FD_form_tabbed_paragraph;
struct FD_form_paragraph_general;
/// has form contents changed? Used to control OK/Apply
EnumPopupStatus status;
///
- ButtonController<NoRepeatedApplyReadOnlyPolicy> * bc_;
+ ButtonController/*<NoRepeatedApplyReadOnlyPolicy>*/ * bc_;
};
#endif
#include "FormPreferences.h"
#include "form_preferences.h"
-#include "xform_macros.h"
#include "input_validators.h"
#include "LyXView.h"
#include "lyxfunc.h"
#include "support/FileInfo.h"
#include "support/filetools.h"
#include "lyx_gui_misc.h"
-#include "gettext.h"
-#include "ButtonController.h"
#ifdef SIGC_CXX_NAMESPACES
using SigC::slot;
#endif
-C_RETURNCB(FormPreferences, WMHideCB)
-C_GENERICCB(FormPreferences, OKCB)
-C_GENERICCB(FormPreferences, ApplyCB)
-C_GENERICCB(FormPreferences, CancelCB)
-C_GENERICCB(FormPreferences, InputCB)
-C_GENERICCB(FormPreferences, RestoreCB)
-
FormPreferences::FormPreferences(LyXView * lv, Dialogs * d)
- : dialog_(0), bind_(0), misc_(0), screen_fonts_(0), interface_fonts_(0),
- printer_(0), paths_(0), lv_(lv), d_(d), u_(0), h_(0),
- minw_(0), minh_(0),
- bc_(new ButtonController<PreferencesPolicy>(_("Cancel"), _("Close")))
+ : FormBase(lv, d, BUFFER_INDEPENDENT, _("Preferences"), new PreferencesPolicy),
+ dialog_(0), bind_(0), misc_(0), screen_fonts_(0), interface_fonts_(0),
+ printer_(0), paths_(0), minw_(0), minh_(0)
{
// let the dialog be shown
// This is a permanent connection so we won't bother
FormPreferences::~FormPreferences()
{
delete dialog_;
- delete bc_;
+ delete bind_;
+ delete misc_;
+ delete screen_fonts_;
+ delete interface_fonts_;
+ delete printer_;
+ delete paths_;
}
dialog_ = build_preferences();
// manage the restore, save, apply and cancel/close buttons
- bc_->setOK(dialog_->button_ok);
- bc_->setApply(dialog_->button_apply);
- bc_->setCancel(dialog_->button_cancel);
- bc_->setUndoAll(dialog_->button_restore);
- bc_->refresh();
+ bc_.setOK(dialog_->button_ok);
+ bc_.setApply(dialog_->button_apply);
+ bc_.setCancel(dialog_->button_cancel);
+ bc_.setUndoAll(dialog_->button_restore);
+ bc_.refresh();
// Workaround dumb xforms sizing bug
minw_ = dialog_->form->w;
_("Paths"),
paths_->form);
- fl_set_form_atclose(dialog_->form,
- C_FormPreferencesWMHideCB, 0);
-
// deactivate the various browse buttons because they
// currently aren't implemented
fl_deactivate_object(bind_->button_bind_file_browse);
}
-void FormPreferences::show()
+FL_FORM * const FormPreferences::form() const
{
- if (!dialog_) {
- build();
- }
- update(); // make sure its up-to-date
-
- if (dialog_->form->visible) {
- fl_raise_form(dialog_->form);
- } else {
- fl_set_form_minsize(dialog_->form,
- minw_,
- minh_);
- fl_show_form(dialog_->form,
- FL_PLACE_MOUSE | FL_FREE_SIZE,
- FL_TRANSIENT,
- _("Preferences"));
- }
+ if (dialog_) return dialog_->form;
+ return 0;
}
-void FormPreferences::hide()
+void FormPreferences::connect()
{
- if (dialog_
- && dialog_->form
- && dialog_->form->visible) {
- fl_hide_form(dialog_->form);
- }
+ FormBase::connect();
+ fl_set_form_minsize(dialog_->form,
+ minw_,
+ minh_);
}
}
-bool FormPreferences::input()
+bool FormPreferences::input(long)
{
bool activate = true;
//
}
-int FormPreferences::WMHideCB(FL_FORM * form, void *)
-{
- // Ensure that the signals (u and h) are disconnected even if the
- // window manager is used to close the dialog.
- FormPreferences * pre = static_cast<FormPreferences*>(form->u_vdata);
- pre->hide();
- pre->bc_->hide();
- return FL_CANCEL;
-}
-
-
-void FormPreferences::OKCB(FL_OBJECT * ob, long)
-{
- FormPreferences * pre = static_cast<FormPreferences*>(ob->form->u_vdata);
- pre->apply();
- pre->hide();
- pre->bc_->ok();
- pre->lv_->getLyXFunc()->Dispatch(LFUN_SAVEPREFERENCES);
-}
-
-
-void FormPreferences::ApplyCB(FL_OBJECT * ob, long)
-{
- FormPreferences * pre = static_cast<FormPreferences*>(ob->form->u_vdata);
- pre->apply();
- pre->bc_->apply();
-}
-
-
-void FormPreferences::CancelCB(FL_OBJECT * ob, long)
-{
- FormPreferences * pre = static_cast<FormPreferences*>(ob->form->u_vdata);
- pre->hide();
- pre->bc_->cancel();
-}
-
-
-void FormPreferences::InputCB(FL_OBJECT * ob, long)
-{
- FormPreferences * pre = static_cast<FormPreferences*>(ob->form->u_vdata);
- pre->bc_->valid(pre->input());
-}
-
-
-void FormPreferences::RestoreCB(FL_OBJECT * ob, long)
+void FormPreferences::ok()
{
- FormPreferences * pre = static_cast<FormPreferences*>(ob->form->u_vdata);
- pre->update();
- pre->input();
- pre->bc_->undoAll();
+ FormBase::ok();
+ lv_->getLyXFunc()->Dispatch(LFUN_SAVEPREFERENCES);
}
#ifndef FORMPREFERENCES_H
#define FORMPREFERENCES_H
-#include "DialogBase.h"
-#include "support/utility.hpp"
+#include "FormBase.h"
#ifdef __GNUG_
#pragma interface
class LyXView;
class Dialogs;
-class PreferencesPolicy;
-template <class x> class ButtonController;
struct FD_form_preferences;
struct FD_form_bind;
struct FD_form_printer;
struct FD_form_paths;
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
-#endif
-
/** This class provides an XForms implementation of the FormPreferences Dialog.
The preferences dialog allows users to set/save their preferences.
*/
-class FormPreferences : public DialogBase, public noncopyable {
+class FormPreferences : public FormBase {
public:
/// #FormPreferences x(LyXFunc ..., Dialogs ...);#
FormPreferences(LyXView *, Dialogs *);
///
~FormPreferences();
-
- ///
- static int WMHideCB(FL_FORM *, void *);
- ///
- static void OKCB(FL_OBJECT *, long);
- ///
- static void ApplyCB(FL_OBJECT *, long);
- ///
- static void CancelCB(FL_OBJECT *, long);
- ///
- static void InputCB(FL_OBJECT *, long);
- ///
- static void RestoreCB(FL_OBJECT *, long);
private:
- /// Create the dialog if necessary, update it and display it.
- void show();
- /// Hide the dialog.
- void hide();
+ ///
+ virtual void connect();
/// Update the dialog.
- void update();
-
+ virtual void update();
+ /// OK from dialog
+ virtual void ok();
/// Apply from dialog
- void apply();
+ virtual void apply();
/// Filter the inputs -- return true if entries are valid
- bool input();
+ virtual bool input(long);
/// Build the dialog
- void build();
+ virtual void build();
+ ///
+ virtual FL_FORM * const form() const;
///
FD_form_preferences * build_preferences();
///
FD_form_printer * printer_;
///
FD_form_paths * paths_;
- /// Which LyXView do we belong to?
- LyXView * lv_;
- ///
- Dialogs * d_;
- /// Update connection.
- Connection u_;
- /// Hide connection.
- Connection h_;
/// Overcome a dumb xforms sizing bug
int minw_;
///
int minh_;
- ///
- ButtonController<PreferencesPolicy> * bc_;
};
#endif
#include "FormPrint.h"
#include "form_print.h"
-#include "xform_macros.h"
#include "input_validators.h"
#include "LyXView.h"
#include "Dialogs.h"
#include "Liason.h"
#include "debug.h"
#include "BufferView.h"
-#include "lyx_gui_misc.h"
-#include "gettext.h"
-
+#include "lyx_gui_misc.h" // WriteAlert
#ifdef SIGC_CXX_NAMESPACES
using SigC::slot;
using Liason::getPrinterParams;
#endif
-C_RETURNCB(FormPrint, WMHideCB)
-C_GENERICCB(FormPrint, OKCB)
-C_GENERICCB(FormPrint, ApplyCB)
-C_GENERICCB(FormPrint, CancelCB)
-C_GENERICCB(FormPrint, InputCB)
-
FormPrint::FormPrint(LyXView * lv, Dialogs * d)
- : dialog_(0), lv_(lv), d_(d), u_(0), h_(0)
+ : FormBase(lv, d, BUFFER_DEPENDENT, _("Print"), new OkApplyCancelPolicy),
+ dialog_(0), target_(2), order_(2), which_(3)
{
// let the dialog be shown
// This is a permanent connection so we won't bother
{
dialog_ = build_print();
+ // manage the ok, apply and cancel/close buttons
+ bc_.setOK(dialog_->button_ok);
+ bc_.setApply(dialog_->button_apply);
+ bc_.setCancel(dialog_->button_cancel);
+ bc_.refresh();
+
// allow controlling of input and ok/apply (de)activation
fl_set_input_return(dialog_->input_printer,
FL_RETURN_CHANGED);
fl_set_input_maxchars(dialog_->input_to_page, 4); // 9999
fl_set_input_maxchars(dialog_->input_count, 4); // 9999
- fl_set_form_atclose(dialog_->form,
- C_FormPrintWMHideCB, 0);
+ target_.reset();
+ target_.registerRadioButton(dialog_->radio_printer,
+ PrinterParams::PRINTER);
+ target_.registerRadioButton(dialog_->radio_file,
+ PrinterParams::FILE);
+ order_.reset();
+ order_.registerRadioButton(dialog_->radio_order_reverse,
+ true);
+ order_.registerRadioButton(dialog_->radio_order_normal,
+ false);
+ which_.reset();
+ which_.registerRadioButton(dialog_->radio_odd_pages,
+ PrinterParams::ODD);
+ which_.registerRadioButton(dialog_->radio_even_pages,
+ PrinterParams::EVEN);
+ which_.registerRadioButton(dialog_->radio_all_pages,
+ PrinterParams::ALL);
}
-void FormPrint::show()
+void FormPrint::connect()
{
- if (!dialog_) {
- build();
- }
-
- update(); // make sure its up-to-date
-
- if (dialog_->form->visible) {
- fl_raise_form(dialog_->form);
- } else {
- fl_show_form(dialog_->form,
- FL_PLACE_MOUSE | FL_FREE_SIZE,
- FL_TRANSIENT,
- _("Print"));
- fl_set_form_minsize(dialog_->form,
- dialog_->form->w,
- dialog_->form->h);
- u_ = d_->updateBufferDependent.connect(slot(this,
- &FormPrint::update));
- h_ = d_->hideBufferDependent.connect(slot(this,
- &FormPrint::hide));
- }
+ FormBase::connect();
+ fl_set_form_minsize(dialog_->form,
+ dialog_->form->w,
+ dialog_->form->h);
}
-void FormPrint::hide()
+FL_FORM * const FormPrint::form() const
{
- if (dialog_
- && dialog_->form
- && dialog_->form->visible) {
- fl_hide_form(dialog_->form);
- u_.disconnect();
- h_.disconnect();
- }
+ if (dialog_) return dialog_->form;
+ return 0;
}
return;
}
- PrinterParams::WhichPages wp(PrinterParams::ALL);
- if (fl_get_button(dialog_->radio_even_pages)) {
- wp = PrinterParams::EVEN;
- } else if (fl_get_button(dialog_->radio_odd_pages)) {
- wp = PrinterParams::ODD;
- }
+ PrinterParams::WhichPages
+ wp(static_cast<PrinterParams::WhichPages>(which_.getButton()));
string from;
int to(0);
} // else we only print one page.
}
- PrinterParams::Target t(PrinterParams::PRINTER);
- if (fl_get_button(dialog_->radio_file)) {
- t = PrinterParams::FILE;
- }
+ PrinterParams::Target
+ t(static_cast<PrinterParams::Target>(target_.getButton()));
// we really should use the return value here I think.
if (!printBuffer(lv_->buffer(),
string(fl_get_input(dialog_->input_printer)),
string(fl_get_input(dialog_->input_file)),
wp, from, to,
- static_cast<bool>(fl_get_button(dialog_->
- radio_order_reverse)),
+ static_cast<bool>(order_.getButton()),
static_cast<bool>(fl_get_button(dialog_->
radio_unsorted)),
strToInt(fl_get_input(dialog_->input_count))))) {
fl_set_input(dialog_->input_printer, pp.printer_name.c_str());
fl_set_input(dialog_->input_file, pp.file_name.c_str());
- switch (pp.target) {
- case PrinterParams::FILE:
- fl_set_button(dialog_->radio_printer, 0);
- fl_set_button(dialog_->radio_file, 1);
- break;
-
- case PrinterParams::PRINTER:
- default:
- fl_set_button(dialog_->radio_printer, 1);
- fl_set_button(dialog_->radio_file, 0);
- break;
- }
-
- switch (pp.reverse_order) {
- case true:
- fl_set_button(dialog_->radio_order_normal, 0);
- fl_set_button(dialog_->radio_order_reverse, 1);
- break;
-
- case false:
- default:
- fl_set_button(dialog_->radio_order_normal, 1);
- fl_set_button(dialog_->radio_order_reverse, 0);
- break;
- }
-// should be able to remove the various set_button 0 and rely on radio button
-// action. Provided xforms is smart enough :D
- fl_set_button(dialog_->radio_all_pages, 0);
- fl_set_button(dialog_->radio_odd_pages, 0);
- fl_set_button(dialog_->radio_even_pages, 0);
- switch (pp.which_pages) {
- case PrinterParams::ODD:
- fl_set_button(dialog_->radio_odd_pages, 1);
- break;
-
- case PrinterParams::EVEN:
- fl_set_button(dialog_->radio_even_pages, 1);
- break;
-
- case PrinterParams::ALL:
- default:
- fl_set_button(dialog_->radio_all_pages, 1);
- break;
- }
+ target_.setButton(pp.target);
+ order_.setButton(pp.reverse_order);
+ which_.setButton(pp.which_pages);
// hmmm... maybe a bit weird but maybe not
// we might just be remembering the last
fl_set_input(dialog_->input_count,
tostr(pp.count_copies).c_str());
-
- // Even readonly docs can be printed
- // these 4 activations are probably superfluous but I'm
- // being explicit for a reason.
- // They can probably be removed soon along with a few more
- // of the de/activations above once input() is a bit smarter.
- fl_activate_object(dialog_->input_count);
- fl_activate_object(dialog_->input_file);
- fl_activate_object(dialog_->input_from_page);
- fl_activate_object(dialog_->input_printer);
- // and we should always be in a working state upon exit
- input();
}
}
// It would be nice if we checked for cases like:
// Print only-odd-pages and from_page == an even number
//
-void FormPrint::input()
+bool FormPrint::input(long)
{
bool activate = true;
// && !strlen(fl_get_input(dialog_->input_printer))) {
// activate = false;
// }
-
- if (activate) {
- fl_activate_object(dialog_->button_ok);
- fl_activate_object(dialog_->button_apply);
- fl_set_object_lcol(dialog_->button_ok, FL_BLACK);
- fl_set_object_lcol(dialog_->button_apply, FL_BLACK);
- } else {
- fl_deactivate_object(dialog_->button_ok);
- fl_deactivate_object(dialog_->button_apply);
- fl_set_object_lcol(dialog_->button_ok, FL_INACTIVE);
- fl_set_object_lcol(dialog_->button_apply, FL_INACTIVE);
- }
-}
-
-
-int FormPrint::WMHideCB(FL_FORM * form, void *)
-{
- // Ensure that the signals (u and h) are disconnected even if the
- // window manager is used to close the dialog.
- FormPrint * pre = static_cast<FormPrint*>(form->u_vdata);
- pre->hide();
- return FL_CANCEL;
-}
-
-
-void FormPrint::OKCB(FL_OBJECT * ob, long)
-{
- FormPrint * pre = static_cast<FormPrint*>(ob->form->u_vdata);
- pre->apply();
- pre->hide();
-}
-
-
-void FormPrint::ApplyCB(FL_OBJECT * ob, long)
-{
- FormPrint * pre = static_cast<FormPrint*>(ob->form->u_vdata);
- pre->apply();
-}
-
-
-void FormPrint::CancelCB(FL_OBJECT * ob, long)
-{
- FormPrint * pre = static_cast<FormPrint*>(ob->form->u_vdata);
- pre->hide();
-}
-
-
-void FormPrint::InputCB(FL_OBJECT * ob, long)
-{
- FormPrint * pre = static_cast<FormPrint*>(ob->form->u_vdata);
- pre->input();
+ return activate;
}
#ifndef FORMPRINT_H
#define FORMPRINT_H
-#include "DialogBase.h"
-#include "support/utility.hpp"
+#include "FormBase.h"
+#include "RadioButtonGroup.h"
#ifdef __GNUG__
#pragma interface
class Dialogs;
struct FD_form_print;
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
-#endif
-
/** This class provides an XForms implementation of the FormPrint Dialog.
The print dialog allows users to print their documents.
*/
-class FormPrint : public DialogBase, public noncopyable {
+class FormPrint : public FormBase {
public:
- /// #FormPrint x(LyXFunc ..., Dialogs ...);#
+ /// #FormPrint x(LyXView ..., Dialogs ...);#
FormPrint(LyXView *, Dialogs *);
///
~FormPrint();
- ///
- static int WMHideCB(FL_FORM *, void *);
- ///
- static void OKCB(FL_OBJECT *, long);
- ///
- static void ApplyCB(FL_OBJECT *, long);
- ///
- static void CancelCB(FL_OBJECT *, long);
- ///
- static void InputCB(FL_OBJECT *, long);
private:
- /// Create the dialog if necessary, update it and display it.
- void show();
- /// Hide the dialog.
- void hide();
/// Update the dialog.
- void update();
-
+ virtual void update();
/// Apply from dialog
- void apply();
+ virtual void apply();
/// Filter the inputs
- void input();
+ virtual bool input(long);
+ ///
+ virtual void connect();
+ /// Pointer to the actual instantiation of the xform's form
+ virtual FL_FORM * const form() const;
/// Build the dialog
- void build();
+ virtual void build();
+
///
FD_form_print * build_print();
-
+
/// Real GUI implementation.
FD_form_print * dialog_;
- /// Which LyXView do we belong to?
- LyXView * lv_;
- ///
- Dialogs * d_;
- /// Update connection.
- Connection u_;
- /// Hide connection.
- Connection h_;
+ /// print target
+ RadioButtonGroup target_;
+ /// page order
+ RadioButtonGroup order_;
+ /// which pages
+ RadioButtonGroup which_;
};
#endif
#endif
-#include "gettext.h"
#include "Dialogs.h"
#include "FormRef.h"
#include "LyXView.h"
// Can change reference only through browser
fl_deactivate_object( dialog_->ref );
- if( lv_->buffer()->isReadonly() ) {
- fl_deactivate_object( dialog_->type );
- fl_deactivate_object( dialog_->ok );
- fl_set_object_lcol( dialog_->ok, FL_INACTIVE );
- } else {
- fl_activate_object( dialog_->type );
- fl_activate_object( dialog_->ok );
- fl_set_object_lcol( dialog_->ok, FL_BLACK );
- }
+ bc_.setOK( dialog_->ok );
+ bc_.setCancel( dialog_->cancel );
+ bc_.addReadOnly( dialog_->type );
+ bc_.refresh();
}
refs = lv_->buffer()->getLabelList();
updateBrowser( refs );
showBrowser();
- } else
+ } else {
hideBrowser();
+ }
+ bc_.readOnly( lv_->buffer()->isReadonly() );
}
fl_set_object_lcol( dialog_->type, FL_INACTIVE );
fl_deactivate_object( dialog_->go );
fl_set_object_lcol( dialog_->go, FL_INACTIVE );
- fl_deactivate_object( dialog_->ok );
- fl_set_object_lcol( dialog_->ok, FL_INACTIVE );
fl_set_object_lcol( dialog_->ref, FL_INACTIVE );
+ bc_.valid(false);
}
fl_set_object_lcol( dialog_->type, FL_BLACK );
fl_activate_object( dialog_->go );
fl_set_object_lcol( dialog_->go, FL_BLACK );
- fl_deactivate_object( dialog_->ok );
- fl_set_object_lcol( dialog_->ok, FL_INACTIVE );
fl_set_object_lcol( dialog_->ref, FL_BLACK );
+ bc_.invalid();
}
}
-void FormRef::input(long data)
+#ifdef WITH_WARNINGS
+#warning check use of buttoncontroller
+// Seems okay except that goref and goback shouldn't
+// affect the status of ok.
+#endif
+bool FormRef::input( long data )
{
+ bool activate( true );
switch( data ) {
// goto reference / go back
case 1:
fl_set_object_lcol( dialog_->type, FL_BLACK );
fl_activate_object( dialog_->go );
fl_set_object_lcol( dialog_->go, FL_BLACK );
- fl_activate_object( dialog_->ok );
- fl_set_object_lcol( dialog_->ok, FL_BLACK );
fl_set_object_lcol( dialog_->ref, FL_BLACK );
}
break;
case 4:
{
Type type = static_cast<Type>( fl_get_choice(dialog_->type)-1 );
- if( params.getCmdName() != getName( type ) ) {
- fl_activate_object( dialog_->ok );
- fl_set_object_lcol( dialog_->ok, FL_BLACK );
- } else if( inset_ != 0 ) {
- fl_deactivate_object( dialog_->ok );
- fl_set_object_lcol( dialog_->ok, FL_INACTIVE );
+ if( params.getCmdName() == getName( type )
+ && inset_ ) {
+ activate = false;
}
}
break;
default:
break;
}
+ return activate;
}
/// Build the dialog
virtual void build();
/// Filter the input
- virtual void input(long);
+ virtual bool input( long );
/// Update dialog before showing it
virtual void update();
/// Not used but must be instantiated
#endif
-#include "gettext.h"
#include "Dialogs.h"
#include "FormToc.h"
#include "LyXView.h"
private:
/// Build the dialog
virtual void build();
- /// Not used but must be instantiated
- virtual void input(long) {}
/// Update dialog before showing it
virtual void update();
/// Apply from dialog (modify or create inset)
#endif
-#include "gettext.h"
#include "Dialogs.h"
#include "FormUrl.h"
#include "LyXView.h"
private:
/// Build the dialog
virtual void build();
- /// Not used but must be instantiated
- virtual void input(long) {}
/// Update dialog before showing it
virtual void update();
/// Apply from dialog (modify or create inset)
* This file Copyright 2000 Baruch Even
* ================================================= */
-/*
- * This class simplifies the work with a group of radio buttons,
- * the idea is that you register a bunch of radio buttons with the accompanying
- * value for each radio button and then you get to query or set the active
- * button in a single function call.
- */
#ifndef RADIOBUTTONGROUP_H
#define RADIOBUTTONGROUP_H
#include FORMS_H_LOCATION
-///
+/** This class simplifies the work with a group of radio buttons,
+ * the idea is that you register a bunch of radio buttons with the accompanying
+ * value for each radio button and then you get to query or set the active
+ * button in a single function call.
+ * @author Baruch Even
+ */
class RadioButtonGroup {
public:
/// Constructor. Allocate space for 'n' items in the group.
fl_set_object_resize(obj, FL_RESIZE_X);
fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON, 230, 630, 90, 30, _("OK"));
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_FormBaseApplyHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseOKCB, 0);
fdui->cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 330, 630, 90, 30, _("Cancel"));
fl_set_button_shortcut(obj, _("^["), 1);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_FormBaseHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
/** Callbacks, globals and object handlers **/
extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern "C" void C_FormBaseApplyHideCB(FL_OBJECT *, long);
-extern "C" void C_FormBaseHideCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
/**** Forms and Objects ****/
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_South, FL_South);
fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, C_FormBaseHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
obj = fl_add_text(FL_NORMAL_TEXT, 10, 190, 430, 190, _("LyX is distributed in the hope that it will\nbe useful, but WITHOUT ANY WARRANTY;\nwithout even the implied warranty of MERCHANTABILITY\nor FITNESS FOR A PARTICULAR PURPOSE.\nSee the GNU General Public License for more details.\nYou should have received a copy of\nthe GNU General Public License\nalong with this program; if not, write to\nthe Free Software Foundation, Inc., \n675 Mass Ave, Cambridge, MA 02139, USA."));
fl_set_object_boxtype(obj, FL_FRAME_BOX);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
#define FD_form_copyright_h_
/** Callbacks, globals and object handlers **/
-extern "C" void C_FormBaseHideCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
/**** Forms and Objects ****/
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 355, 410, 100, 30, idex(_("Cancel|^[")));
fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormDocumentCancelCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 245, 410, 100, 30, idex(_("Apply|#A")));
fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormDocumentApplyCB, 0);
+ fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 135, 410, 100, 30, _("OK"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormDocumentOKCB, 0);
+ fl_set_object_callback(obj, C_FormBaseOKCB, 0);
fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 20, 380, 435, 30, "");
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 410, 100, 30, idex(_("Restore|#R")));
fl_set_button_shortcut(obj, scex(_("Restore|#R")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormDocumentRestoreCB, 0);
+ fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
#define FD_form_tabbed_document_h_
/** Callbacks, globals and object handlers **/
-extern "C" void C_FormDocumentCancelCB(FL_OBJECT *, long);
-extern "C" void C_FormDocumentApplyCB(FL_OBJECT *, long);
-extern "C" void C_FormDocumentOKCB(FL_OBJECT *, long);
-extern "C" void C_FormDocumentRestoreCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
extern "C" void C_FormDocumentInputCB(FL_OBJECT *, long);
obj = fl_add_button(FL_RETURN_BUTTON, 135, 200, 130, 30, _("Close"));
fl_set_object_gravity(obj, FL_South, FL_South);
fl_set_object_resize(obj, FL_RESIZE_NONE);
- fl_set_object_callback(obj, C_FormBaseHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
#define FD_form_error_h_
/** Callbacks, globals and object handlers **/
-extern "C" void C_FormBaseHideCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
/**** Forms and Objects ****/
fl_set_button_shortcut(obj, _("^["), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_FormBaseHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON, 300, 60, 100, 30, _("OK"));
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_FormBaseApplyHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseOKCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
#define FD_form_index_h_
/** Callbacks, globals and object handlers **/
-extern "C" void C_FormBaseHideCB(FL_OBJECT *, long);
-extern "C" void C_FormBaseApplyHideCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
/**** Forms and Objects ****/
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, "");
fdui->input_bind = obj = fl_add_input(FL_NORMAL_INPUT, 145, 80, 190, 30, _("Bind file"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->button_bind_file_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 335, 80, 80, 30, _("Browse..."));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_end_form();
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, "");
fdui->check_banner = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 30, 240, 30, _("Show banner"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_button(obj, 1);
fdui->check_auto_region_delete = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 60, 240, 30, _("Auto region delete"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_button(obj, 1);
fdui->check_exit_confirm = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 90, 240, 30, _("Exit confirmation"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_button(obj, 1);
fdui->check_display_shortcuts = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 120, 240, 30, _("Display keyboard shortcuts"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_button(obj, 1);
fdui->counter_autosave = obj = fl_add_counter(FL_NORMAL_COUNTER, 240, 255, 170, 30, _("Autosave interval"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_counter_precision(obj, 0);
fl_set_counter_bounds(obj, 0, 1200);
fl_set_counter_value(obj, 300);
fdui->counter_line_len = obj = fl_add_counter(FL_NORMAL_COUNTER, 240, 225, 170, 30, _("Ascii line length"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_counter_precision(obj, 0);
fl_set_counter_bounds(obj, 0, 120);
fl_set_counter_value(obj, 75);
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, "");
fdui->input_roman = obj = fl_add_input(FL_NORMAL_INPUT, 210, 5, 200, 30, _("Roman"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_sans = obj = fl_add_input(FL_NORMAL_INPUT, 210, 35, 200, 30, _("Sans Serif"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_typewriter = obj = fl_add_input(FL_NORMAL_INPUT, 210, 65, 200, 30, _("Typewriter"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->counter_zoom = obj = fl_add_counter(FL_NORMAL_COUNTER, 210, 125, 200, 30, _("%"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_counter_precision(obj, 0);
fl_set_counter_bounds(obj, 0, 999);
fl_set_counter_value(obj, 150);
fl_set_counter_step(obj, 1, 1);
fdui->check_scalable = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 50, 125, 160, 30, _("Allow scaling"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_button(obj, 1);
fdui->input_screen_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 210, 95, 200, 30, _("Encoding"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_tiny = obj = fl_add_input(FL_FLOAT_INPUT, 140, 165, 70, 30, _("tiny"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_script = obj = fl_add_input(FL_FLOAT_INPUT, 340, 165, 70, 30, _("script"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_footnote = obj = fl_add_input(FL_FLOAT_INPUT, 140, 195, 70, 30, _("footnote"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_small = obj = fl_add_input(FL_FLOAT_INPUT, 340, 195, 70, 30, _("small"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_large = obj = fl_add_input(FL_FLOAT_INPUT, 340, 225, 70, 30, _("large"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_larger = obj = fl_add_input(FL_FLOAT_INPUT, 140, 255, 70, 30, _("larger"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_largest = obj = fl_add_input(FL_FLOAT_INPUT, 340, 255, 70, 30, _("largest"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_normal = obj = fl_add_input(FL_FLOAT_INPUT, 140, 225, 70, 30, _("normal"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_huge = obj = fl_add_input(FL_FLOAT_INPUT, 140, 285, 70, 30, _("huge"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_huger = obj = fl_add_input(FL_FLOAT_INPUT, 340, 285, 70, 30, _("huger"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, "");
fdui->input_popup_font = obj = fl_add_input(FL_NORMAL_INPUT, 215, 50, 200, 30, _("Popup"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_menu_font = obj = fl_add_input(FL_NORMAL_INPUT, 215, 80, 200, 30, _("Menu"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_popup_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 215, 110, 200, 30, _("Encoding"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, "");
fdui->input_command = obj = fl_add_input(FL_NORMAL_INPUT, 130, 60, 80, 30, _("command"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_page_range = obj = fl_add_input(FL_NORMAL_INPUT, 130, 90, 80, 30, _("page range"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_copies = obj = fl_add_input(FL_NORMAL_INPUT, 130, 120, 80, 30, _("copies"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_reverse = obj = fl_add_input(FL_NORMAL_INPUT, 130, 150, 80, 30, _("reverse"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_to_printer = obj = fl_add_input(FL_NORMAL_INPUT, 130, 180, 80, 30, _("to printer"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_file_extension = obj = fl_add_input(FL_NORMAL_INPUT, 130, 210, 80, 30, _("file extension"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_spool_command = obj = fl_add_input(FL_NORMAL_INPUT, 130, 240, 80, 30, _("spool command"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_paper_type = obj = fl_add_input(FL_NORMAL_INPUT, 130, 270, 80, 30, _("paper type"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_even_pages = obj = fl_add_input(FL_NORMAL_INPUT, 360, 60, 80, 30, _("even pages"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_odd_pages = obj = fl_add_input(FL_NORMAL_INPUT, 360, 90, 80, 30, _("odd pages"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_collated = obj = fl_add_input(FL_NORMAL_INPUT, 360, 120, 80, 30, _("collated"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_landscape = obj = fl_add_input(FL_NORMAL_INPUT, 360, 150, 80, 30, _("landscape"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_to_file = obj = fl_add_input(FL_NORMAL_INPUT, 360, 180, 80, 30, _("to file"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_extra_options = obj = fl_add_input(FL_NORMAL_INPUT, 360, 210, 80, 30, _("extra options"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_spool_prefix = obj = fl_add_input(FL_NORMAL_INPUT, 360, 240, 80, 30, _("spool printer prefix"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_paper_size = obj = fl_add_input(FL_NORMAL_INPUT, 360, 270, 80, 30, _("paper size"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_name = obj = fl_add_input(FL_NORMAL_INPUT, 130, 10, 80, 30, _("name"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->check_adapt_output = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 240, 10, 120, 30, _("adapt output"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, "");
fdui->input_default_path = obj = fl_add_input(FL_NORMAL_INPUT, 170, 10, 170, 30, _("Default path"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->button_document_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 10, 90, 30, _("Browse..."));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fdui->counter_lastfiles = obj = fl_add_counter(FL_NORMAL_COUNTER, 170, 130, 110, 30, _("Last file count"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_counter_precision(obj, 0);
fl_set_counter_bounds(obj, 0, 9);
fl_set_counter_value(obj, 4);
fl_set_counter_step(obj, 1, 1);
fdui->input_template_path = obj = fl_add_input(FL_NORMAL_INPUT, 170, 40, 170, 30, _("Template path"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->button_template_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 40, 90, 30, _("Browse..."));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fdui->check_last_files = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 290, 130, 140, 30, _("Check last files"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_button(obj, 1);
fdui->input_temp_dir = obj = fl_add_input(FL_NORMAL_INPUT, 170, 70, 170, 30, _("Temp dir"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->button_temp_dir_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 70, 90, 30, _("Browse..."));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fdui->input_lastfiles = obj = fl_add_input(FL_NORMAL_INPUT, 170, 100, 170, 30, _("Lastfiles"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->button_lastfiles_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 100, 90, 30, _("Browse..."));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fdui->check_use_temp_dir = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 35, 70, 50, 30, "");
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_button(obj, 1);
fdui->check_make_backups = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 170, 40, 30, "");
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_button(obj, 1);
fdui->input_backup_path = obj = fl_add_input(FL_NORMAL_INPUT, 170, 170, 170, 30, _("Backup path"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->button_backup_path_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 170, 90, 30, _("Browse..."));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_end_form();
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 275, 395, 90, 30, idex(_("Apply|#A")));
fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesApplyCB, 0);
+ fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 375, 395, 90, 30, idex(_("Cancel|^[")));
fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesCancelCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 175, 395, 90, 30, _("Save"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesOKCB, 0);
+ fl_set_object_callback(obj, C_FormBaseOKCB, 0);
fdui->tabfolder_prefs = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 5, 5, 585, 385, "");
fl_set_object_boxtype(obj, FL_FLAT_BOX);
fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 395, 90, 30, idex(_("Restore|#R")));
fl_set_button_shortcut(obj, scex(_("Restore|#R")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPreferencesRestoreCB, 0);
+ fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
#define FD_form_bind_h_
/** Callbacks, globals and object handlers **/
-extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern "C" void C_FormPreferencesInputCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern "C" void C_FormPreferencesApplyCB(FL_OBJECT *, long);
-extern "C" void C_FormPreferencesCancelCB(FL_OBJECT *, long);
-extern "C" void C_FormPreferencesOKCB(FL_OBJECT *, long);
-extern "C" void C_FormPreferencesRestoreCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
/**** Forms and Objects ****/
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
fdui->input_printer = obj = fl_add_input(FL_NORMAL_INPUT, 90, 225, 230, 30, "");
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_file = obj = fl_add_input(FL_NORMAL_INPUT, 90, 265, 230, 30, "");
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->group_radio_printto = fl_bgn_group();
fdui->radio_printer = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 225, 80, 30, idex(_("Printer|#P")));
fl_set_button_shortcut(obj, scex(_("Printer|#P")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->radio_file = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 265, 80, 30, idex(_("File|#F")));
fl_set_button_shortcut(obj, scex(_("File|#F")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_end_group();
obj = fl_add_frame(FL_ENGRAVED_FRAME, 180, 20, 150, 70, "");
fl_set_object_color(obj, FL_COL1, FL_COL1);
fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 315, 100, 30, _("OK"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintOKCB, 0);
+ fl_set_object_callback(obj, C_FormBaseOKCB, 0);
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 120, 315, 100, 30, idex(_("Apply|#A")));
fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintApplyCB, 0);
+ fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 230, 315, 100, 30, idex(_("Cancel|^[")));
fl_set_button_shortcut(obj, scex(_("Cancel|^[")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintCancelCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fdui->group_radio_pages = fl_bgn_group();
fdui->radio_all_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 30, 160, 30, idex(_("All Pages|#G")));
fl_set_button_shortcut(obj, scex(_("All Pages|#G")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->radio_odd_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 60, 160, 30, idex(_("Only Odd Pages|#O")));
fl_set_button_shortcut(obj, scex(_("Only Odd Pages|#O")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->radio_even_pages = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 10, 90, 160, 30, idex(_("Only Even Pages|#E")));
fl_set_button_shortcut(obj, scex(_("Only Even Pages|#E")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_end_group();
fdui->radio_order_normal = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 180, 30, 150, 30, idex(_("Normal Order|#N")));
fl_set_button_shortcut(obj, scex(_("Normal Order|#N")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->radio_order_reverse = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 180, 60, 150, 30, idex(_("Reverse Order|#R")));
fl_set_button_shortcut(obj, scex(_("Reverse Order|#R")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_end_group();
obj = fl_add_text(FL_NORMAL_TEXT, 200, 10, 60, 20, _("Order"));
fdui->input_from_page = obj = fl_add_input(FL_INT_INPUT, 20, 160, 50, 30, _("Pages:"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
obj = fl_add_frame(FL_ENGRAVED_FRAME, 180, 110, 150, 90, "");
fl_set_object_color(obj, FL_COL1, FL_COL1);
obj = fl_add_text(FL_NORMAL_TEXT, 200, 95, 50, 20, _("Copies"));
fdui->input_count = obj = fl_add_input(FL_INT_INPUT, 190, 160, 130, 30, _("Count:"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->radio_unsorted = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 180, 115, 140, 30, idex(_("Unsorted|#U")));
fl_set_button_shortcut(obj, scex(_("Unsorted|#U")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fdui->input_to_page = obj = fl_add_input(FL_INT_INPUT, 110, 160, 50, 30, _("to"));
- fl_set_object_callback(obj, C_FormPrintInputCB, 0);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
#define FD_form_print_h_
/** Callbacks, globals and object handlers **/
-extern "C" void C_FormPrintInputCB(FL_OBJECT *, long);
-extern "C" void C_FormPrintOKCB(FL_OBJECT *, long);
-extern "C" void C_FormPrintApplyCB(FL_OBJECT *, long);
-extern "C" void C_FormPrintCancelCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
/**** Forms and Objects ****/
fl_set_object_callback(obj, C_FormBaseInputCB, 1);
fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON, 330, 300, 90, 30, _("OK"));
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_FormBaseApplyHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseOKCB, 0);
fdui->cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 430, 300, 90, 30, _("Cancel"));
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_FormBaseHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
/** Callbacks, globals and object handlers **/
extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
-extern "C" void C_FormBaseApplyHideCB(FL_OBJECT *, long);
-extern "C" void C_FormBaseHideCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
/**** Forms and Objects ****/
obj = fl_add_button(FL_RETURN_BUTTON, 310, 300, 100, 30, _("Close"));
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_FormBaseHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
obj = fl_add_button(FL_NORMAL_BUTTON, 200, 300, 100, 30, _("Update"));
fl_set_button_shortcut(obj, scex(_("Update|#U#u")), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
/** Callbacks, globals and object handlers **/
extern "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
-extern "C" void C_FormBaseHideCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
/**** Forms and Objects ****/
fl_set_button_shortcut(obj, _("^["), 1);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_FormBaseHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
fdui->ok = obj = fl_add_button(FL_RETURN_BUTTON, 300, 100, 100, 30, _("OK"));
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, C_FormBaseApplyHideCB, 0);
+ fl_set_object_callback(obj, C_FormBaseOKCB, 0);
fl_end_form();
fdui->form->fdui = fdui;
#define FD_form_url_h_
/** Callbacks, globals and object handlers **/
-extern "C" void C_FormBaseHideCB(FL_OBJECT *, long);
-extern "C" void C_FormBaseApplyHideCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
/**** Forms and Objects ****/
resize: FL_RESIZE_ALL
gravity: FL_SouthEast FL_SouthEast
name: ok
-callback: C_FormBaseApplyHideCB
+callback: C_FormBaseOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_SouthEast FL_SouthEast
name: cancel
-callback: C_FormBaseHideCB
+callback: C_FormBaseCancelCB
argument: 0
==============================
resize: FL_RESIZE_NONE
gravity: FL_South FL_South
name: button_ok
-callback: C_FormBaseHideCB
+callback: C_FormBaseCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormDocumentCancelCB
+callback: C_FormBaseCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormDocumentApplyCB
+callback: C_FormBaseApplyCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormDocumentOKCB
+callback: C_FormBaseOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_restore
-callback: C_FormDocumentRestoreCB
+callback: C_FormBaseRestoreCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_NONE
gravity: FL_South FL_South
name:
-callback: C_FormBaseHideCB
+callback: C_FormBaseCancelCB
argument: 0
==============================
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: cancel
-callback: C_FormBaseHideCB
+callback: C_FormBaseCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_SouthEast FL_SouthEast
name: ok
-callback: C_FormBaseApplyHideCB
+callback: C_FormBaseOKCB
argument: 0
==============================
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_bind
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_banner
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_auto_region_delete
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_exit_confirm
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_display_shortcuts
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: counter_autosave
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
bounds: 0 1200
precision: 0
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: counter_line_len
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
bounds: 0 120
precision: 0
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_roman
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_sans
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_typewriter
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: counter_zoom
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
bounds: 0 999
precision: 0
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_scalable
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_screen_encoding
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_tiny
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_script
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_footnote
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_small
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_large
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_larger
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_largest
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_normal
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_huge
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_huger
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_popup_font
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_menu_font
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_popup_encoding
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_command
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_page_range
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_copies
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_reverse
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_to_printer
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_file_extension
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_spool_command
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_paper_type
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_even_pages
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_odd_pages
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_collated
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_landscape
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_to_file
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_extra_options
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_spool_prefix
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_paper_size
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_name
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_adapt_output
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_default_path
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: counter_lastfiles
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
bounds: 0 9
precision: 0
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_template_path
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_last_files
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_temp_dir
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_lastfiles
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_use_temp_dir
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_make_backups
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
value: 1
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_backup_path
-callback: C_FormPreferencesInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormPreferencesApplyCB
+callback: C_FormBaseApplyCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormPreferencesCancelCB
+callback: C_FormBaseCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormPreferencesOKCB
+callback: C_FormBaseOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_restore
-callback: C_FormPreferencesRestoreCB
+callback: C_FormBaseRestoreCB
argument: 0
==============================
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_printer
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_file
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_printer
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_file
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormPrintOKCB
+callback: C_FormBaseOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormPrintApplyCB
+callback: C_FormBaseApplyCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormPrintCancelCB
+callback: C_FormBaseCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_all_pages
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_odd_pages
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_even_pages
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_order_normal
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_order_reverse
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_from_page
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_count
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_unsorted
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_to_page
-callback: C_FormPrintInputCB
+callback: C_FormBaseInputCB
argument: 0
==============================
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: ok
-callback: C_FormBaseApplyHideCB
+callback: C_FormBaseOKCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: cancel
-callback: C_FormBaseHideCB
+callback: C_FormBaseCancelCB
argument: 0
==============================
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name:
-callback: C_FormBaseHideCB
+callback: C_FormBaseCancelCB
argument: 0
--------------------
resize: FL_RESIZE_NONE
gravity: FL_SouthEast FL_SouthEast
name: cancel
-callback: C_FormBaseHideCB
+callback: C_FormBaseCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_SouthEast FL_SouthEast
name: ok
-callback: C_FormBaseApplyHideCB
+callback: C_FormBaseOKCB
argument: 0
==============================