mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Edwin's Para MVC. Sorry for the delay !
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4365 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3b1a9a5fc2
commit
760e4f4ce6
@ -1,3 +1,9 @@
|
||||
2002-06-11 Edwin Leuven <leuven@fee.uva.nl>
|
||||
|
||||
* ControlParagraph.[Ch]: new paragraph controller
|
||||
* GUI.h: add new controller
|
||||
* Makefile.am: ditto
|
||||
|
||||
2002-06-10 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* GUI.h: do not include ButtonController.tmpl
|
||||
|
112
src/frontends/controllers/ControlParagraph.C
Normal file
112
src/frontends/controllers/ControlParagraph.C
Normal file
@ -0,0 +1,112 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file ControlParagraph.C
|
||||
* Copyright 2002 The LyX Team.
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author Edwin Leuven <leuven@fee.uva.nl>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "ViewBase.h"
|
||||
#include "ButtonControllerBase.h"
|
||||
#include "ControlParagraph.h"
|
||||
#include "Dialogs.h"
|
||||
#include "Liason.h"
|
||||
#include "LyXView.h"
|
||||
#include "BufferView.h"
|
||||
#include "gettext.h"
|
||||
#include "buffer.h"
|
||||
#include "lyxtext.h"
|
||||
#include "lyxtextclasslist.h"
|
||||
#include "support/LAssert.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using Liason::setMinibuffer;
|
||||
|
||||
|
||||
ControlParagraph::ControlParagraph(LyXView & lv, Dialogs & d)
|
||||
: ControlDialogBD(lv, d), pp_(0), ininset_(false)
|
||||
{
|
||||
d_.showParagraph = boost::bind(&ControlParagraph::show, this);
|
||||
}
|
||||
|
||||
ParagraphParameters & ControlParagraph::params()
|
||||
{
|
||||
lyx::Assert(pp_.get());
|
||||
return *pp_;
|
||||
}
|
||||
|
||||
bool ControlParagraph::inInset() const
|
||||
{
|
||||
return ininset_;
|
||||
}
|
||||
|
||||
LyXAlignment ControlParagraph::alignPossible() const
|
||||
{
|
||||
return alignpos_;
|
||||
}
|
||||
|
||||
void ControlParagraph::apply()
|
||||
{
|
||||
if (!lv_.view()->available())
|
||||
return;
|
||||
|
||||
view().apply();
|
||||
|
||||
LyXText * text(lv_.view()->getLyXText());
|
||||
text->setParagraph(lv_.view(),
|
||||
pp_->lineTop(),
|
||||
pp_->lineBottom(),
|
||||
pp_->pagebreakTop(),
|
||||
pp_->pagebreakBottom(),
|
||||
pp_->spaceTop(),
|
||||
pp_->spaceBottom(),
|
||||
pp_->spacing(),
|
||||
pp_->align(),
|
||||
pp_->labelWidthString(),
|
||||
pp_->noindent());
|
||||
|
||||
// Actually apply these settings
|
||||
lv_.view()->update(text,
|
||||
BufferView::SELECT |
|
||||
BufferView::FITCUR |
|
||||
BufferView::CHANGE);
|
||||
|
||||
lv_.buffer()->markDirty();
|
||||
|
||||
setMinibuffer(&lv_, _("Paragraph layout set"));
|
||||
}
|
||||
|
||||
void ControlParagraph::setParams()
|
||||
{
|
||||
if (!pp_.get())
|
||||
pp_.reset(new ParagraphParameters());
|
||||
|
||||
/// get paragraph
|
||||
Paragraph const * par_ = lv_.view()->getLyXText()->cursor.par();
|
||||
|
||||
/// Set the paragraph parameters
|
||||
*pp_ = par_->params();
|
||||
|
||||
/// this needs to be done separately
|
||||
pp_->labelWidthString(par_->getLabelWidthString());
|
||||
|
||||
/// alignment
|
||||
LyXTextClass const & tclass =
|
||||
textclasslist[lv_.view()->buffer()->params.textclass];
|
||||
if (pp_->align() == LYX_ALIGN_LAYOUT)
|
||||
pp_->align(tclass[par_->layout()].align);
|
||||
|
||||
/// is alignment possible
|
||||
alignpos_ = tclass[par_->layout()].alignpossible;
|
||||
|
||||
/// is paragraph in inset
|
||||
ininset_ = par_->inInset();
|
||||
}
|
52
src/frontends/controllers/ControlParagraph.h
Normal file
52
src/frontends/controllers/ControlParagraph.h
Normal file
@ -0,0 +1,52 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file ControlParagraph.h
|
||||
* Copyright 2002 The LyX Team.
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author Edwin Leuven <leuven@fee.uva.nl>
|
||||
*/
|
||||
|
||||
#ifndef CONTROLPARAGRAPH_H
|
||||
#define CONTROLPARAGRAPH_H
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "ControlDialog_impl.h"
|
||||
#include "ParagraphParameters.h"
|
||||
|
||||
/** A controller for Paragraph dialogs.
|
||||
*/
|
||||
class ControlParagraph : public ControlDialogBD
|
||||
{
|
||||
public:
|
||||
///
|
||||
ControlParagraph(LyXView &, Dialogs &);
|
||||
|
||||
///
|
||||
ParagraphParameters & params();
|
||||
///
|
||||
bool inInset() const;
|
||||
///
|
||||
LyXAlignment alignPossible() const;
|
||||
|
||||
private:
|
||||
/// Get changed parameters and Dispatch them to the kernel.
|
||||
virtual void apply();
|
||||
/// set the params before show or update.
|
||||
virtual void setParams();
|
||||
|
||||
///
|
||||
boost::scoped_ptr<ParagraphParameters> pp_;
|
||||
///
|
||||
bool ininset_;
|
||||
///
|
||||
LyXAlignment alignpos_;
|
||||
};
|
||||
|
||||
#endif // CONTROLPARAGRAPH_H
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "ControlIndex.h"
|
||||
#include "ControlLog.h"
|
||||
#include "ControlMinipage.h"
|
||||
#include "ControlParagraph.h"
|
||||
#include "ControlPreamble.h"
|
||||
#include "ControlPrint.h"
|
||||
#include "ControlRef.h"
|
||||
@ -245,6 +246,18 @@ public:
|
||||
: GUI<ControlFloat, GUIview, NoRepeatedApplyReadOnlyPolicy, GUIbc>(lv, d) {}
|
||||
};
|
||||
|
||||
/** Specialization for Paragraph dialog
|
||||
*/
|
||||
template <class GUIview, class GUIbc>
|
||||
class GUIParagraph : public GUI<ControlParagraph, GUIview,
|
||||
OkApplyCancelReadOnlyPolicy, GUIbc>
|
||||
{
|
||||
public:
|
||||
///
|
||||
GUIParagraph(LyXView & lv, Dialogs & d)
|
||||
: GUI<ControlParagraph, GUIview,
|
||||
OkApplyCancelReadOnlyPolicy, GUIbc>(lv, d) {}
|
||||
};
|
||||
|
||||
/** Specialization for Preamble dialog
|
||||
*/
|
||||
|
@ -60,6 +60,8 @@ libcontrollers_la_SOURCES= \
|
||||
ControlLog.h \
|
||||
ControlMinipage.C \
|
||||
ControlMinipage.h \
|
||||
ControlParagraph.C \
|
||||
ControlParagraph.h \
|
||||
ControlPreamble.C \
|
||||
ControlPreamble.h \
|
||||
ControlPrint.C \
|
||||
|
@ -1,3 +1,10 @@
|
||||
2002-06-11 Edwin Leuven <leuven@fee.uva.nl>
|
||||
|
||||
* FormParagraph.[Ch]: moved to mvc
|
||||
* form_paragraph.[Ch]: idem
|
||||
* forms/form_paragraph.fd: idem
|
||||
* Dialogs.C: idem
|
||||
|
||||
2002-06-06 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* GUIRunTime.C (initialiseGraphics): condition the choice of
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "form_include.h"
|
||||
#include "form_index.h"
|
||||
#include "form_minipage.h"
|
||||
#include "form_paragraph.h"
|
||||
#include "form_preamble.h"
|
||||
#include "form_print.h"
|
||||
#include "form_ref.h"
|
||||
@ -61,6 +62,7 @@
|
||||
#include "FormIndex.h"
|
||||
#include "FormLog.h"
|
||||
#include "FormMinipage.h"
|
||||
#include "FormParagraph.h"
|
||||
#include "FormPreamble.h"
|
||||
#include "FormPrint.h"
|
||||
#include "FormRef.h"
|
||||
@ -77,7 +79,6 @@
|
||||
|
||||
#include "FormDocument.h"
|
||||
#include "FormMathsPanel.h"
|
||||
#include "FormParagraph.h"
|
||||
#include "FormPreferences.h"
|
||||
#include "FormTabular.h"
|
||||
|
||||
@ -122,6 +123,8 @@ Dialogs::Dialogs(LyXView * lv)
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
|
||||
add(new GUI<ControlFloat, FormFloat,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
|
||||
add(new GUI<ControlParagraph, FormParagraph,
|
||||
OkApplyCancelReadOnlyPolicy, xformsBC>(*lv, *this));
|
||||
add(new GUI<ControlPreamble, FormPreamble,
|
||||
NoRepeatedApplyReadOnlyPolicy, xformsBC>(*lv, *this));
|
||||
add(new GUI<ControlPrint, FormPrint,
|
||||
@ -153,7 +156,6 @@ Dialogs::Dialogs(LyXView * lv)
|
||||
|
||||
add(new FormDocument(lv, this));
|
||||
add(new FormMathsPanel(lv, this));
|
||||
add(new FormParagraph(lv, this));
|
||||
add(new FormPreferences(lv, this));
|
||||
add(new FormTabular(lv, this));
|
||||
|
||||
|
@ -16,100 +16,29 @@
|
||||
|
||||
#include "FormParagraph.h"
|
||||
#include "form_paragraph.h"
|
||||
#include "Dialogs.h"
|
||||
#include "Liason.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
#include "lyxtext.h"
|
||||
#include "ControlParagraph.h"
|
||||
#include "xforms_helpers.h"
|
||||
#include "lyxrc.h" // to set the deafult length values
|
||||
#include "BufferView.h"
|
||||
#include "lyxtextclasslist.h"
|
||||
#include "Spacing.h"
|
||||
#include "ParagraphParameters.h"
|
||||
#include "input_validators.h"
|
||||
#include "helper_funcs.h"
|
||||
#include "gettext.h"
|
||||
#include "xformsBC.h"
|
||||
#include "layout.h" // LyXAlignment
|
||||
|
||||
#include "support/lstrings.h"
|
||||
#include "support/LAssert.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <functional>
|
||||
|
||||
using Liason::setMinibuffer;
|
||||
using std::vector;
|
||||
using std::bind2nd;
|
||||
using std::remove_if;
|
||||
|
||||
typedef FormCB<ControlParagraph, FormDB<FD_form_paragraph> > base_class;
|
||||
|
||||
FormParagraph::FormParagraph(LyXView * lv, Dialogs * d)
|
||||
: FormBaseBD(lv, d, _("Paragraph Layout")), par_(0)
|
||||
{
|
||||
// let the dialog be shown
|
||||
// This is a permanent connection so we won't bother
|
||||
// storing a copy because we won't be disconnecting.
|
||||
d->showParagraph = boost::bind(&FormParagraph::show, this);
|
||||
}
|
||||
|
||||
|
||||
void FormParagraph::connect()
|
||||
{
|
||||
cp_ = d_->updateParagraph
|
||||
.connect(boost::bind(&FormParagraph::changedParagraph, this));
|
||||
FormBaseBD::connect();
|
||||
}
|
||||
|
||||
|
||||
void FormParagraph::disconnect()
|
||||
{
|
||||
cp_.disconnect();
|
||||
FormBaseBD::disconnect();
|
||||
}
|
||||
|
||||
|
||||
Paragraph const * FormParagraph::getCurrentParagraph() const
|
||||
{
|
||||
return lv_->view()->getLyXText()->cursor.par();
|
||||
}
|
||||
|
||||
|
||||
void FormParagraph::changedParagraph()
|
||||
{
|
||||
/// Record the paragraph
|
||||
Paragraph const * const p = getCurrentParagraph();
|
||||
if (p == 0) // this is wrong as we don't set par_ here! /* || p == par_) */
|
||||
return;
|
||||
|
||||
// For now, don't bother checking if the params are different.
|
||||
|
||||
// Will the underlying paragraph accept our changes?
|
||||
Inset * const inset = p->inInset();
|
||||
bool const accept = !(inset && inset->forceDefaultParagraphs(inset));
|
||||
bc().valid(accept);
|
||||
|
||||
if (!accept) {
|
||||
postWarning(_("Cannot apply paragraph settings to this inset!"));
|
||||
} else {
|
||||
clearMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FormParagraph::redraw()
|
||||
{
|
||||
if (form() && form()->visible)
|
||||
fl_redraw_form(form());
|
||||
}
|
||||
|
||||
|
||||
FL_FORM * FormParagraph::form() const
|
||||
{
|
||||
if (dialog_.get())
|
||||
return dialog_->form;
|
||||
return 0;
|
||||
}
|
||||
|
||||
FormParagraph::FormParagraph(ControlParagraph & c)
|
||||
: base_class(c, _("Paragraph Layout"), false)
|
||||
{}
|
||||
|
||||
void FormParagraph::build()
|
||||
{
|
||||
@ -163,32 +92,31 @@ void FormParagraph::build()
|
||||
fl_addto_choice(dialog_->choice_value_space_below, units.c_str());
|
||||
|
||||
// Manage the ok, apply, restore and cancel/close buttons
|
||||
bc_.setOK(dialog_->button_ok);
|
||||
bc_.setApply(dialog_->button_apply);
|
||||
bc_.setCancel(dialog_->button_close);
|
||||
bc_.setRestore(dialog_->button_restore);
|
||||
bc().setOK(dialog_->button_ok);
|
||||
bc().setApply(dialog_->button_apply);
|
||||
bc().setCancel(dialog_->button_close);
|
||||
bc().setRestore(dialog_->button_restore);
|
||||
|
||||
bc_.addReadOnly(dialog_->radio_align_right);
|
||||
bc_.addReadOnly(dialog_->radio_align_left);
|
||||
bc_.addReadOnly(dialog_->radio_align_block);
|
||||
bc_.addReadOnly(dialog_->radio_align_center);
|
||||
bc_.addReadOnly(dialog_->check_lines_top);
|
||||
bc_.addReadOnly(dialog_->check_lines_bottom);
|
||||
bc_.addReadOnly(dialog_->check_pagebreaks_top);
|
||||
bc_.addReadOnly(dialog_->check_pagebreaks_bottom);
|
||||
bc_.addReadOnly(dialog_->choice_space_above);
|
||||
bc_.addReadOnly(dialog_->input_space_above);
|
||||
bc_.addReadOnly(dialog_->check_space_above);
|
||||
bc_.addReadOnly(dialog_->choice_space_below);
|
||||
bc_.addReadOnly(dialog_->input_space_below);
|
||||
bc_.addReadOnly(dialog_->check_space_below);
|
||||
bc_.addReadOnly(dialog_->choice_linespacing);
|
||||
bc_.addReadOnly(dialog_->input_linespacing);
|
||||
bc_.addReadOnly(dialog_->check_noindent);
|
||||
bc_.addReadOnly(dialog_->input_labelwidth);
|
||||
bc().addReadOnly(dialog_->radio_align_right);
|
||||
bc().addReadOnly(dialog_->radio_align_left);
|
||||
bc().addReadOnly(dialog_->radio_align_block);
|
||||
bc().addReadOnly(dialog_->radio_align_center);
|
||||
bc().addReadOnly(dialog_->check_lines_top);
|
||||
bc().addReadOnly(dialog_->check_lines_bottom);
|
||||
bc().addReadOnly(dialog_->check_pagebreaks_top);
|
||||
bc().addReadOnly(dialog_->check_pagebreaks_bottom);
|
||||
bc().addReadOnly(dialog_->choice_space_above);
|
||||
bc().addReadOnly(dialog_->input_space_above);
|
||||
bc().addReadOnly(dialog_->check_space_above);
|
||||
bc().addReadOnly(dialog_->choice_space_below);
|
||||
bc().addReadOnly(dialog_->input_space_below);
|
||||
bc().addReadOnly(dialog_->check_space_below);
|
||||
bc().addReadOnly(dialog_->choice_linespacing);
|
||||
bc().addReadOnly(dialog_->input_linespacing);
|
||||
bc().addReadOnly(dialog_->check_noindent);
|
||||
bc().addReadOnly(dialog_->input_labelwidth);
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
VSpace setVSpaceFromWidgets(FL_OBJECT * choice_type,
|
||||
@ -238,7 +166,6 @@ VSpace setVSpaceFromWidgets(FL_OBJECT * choice_type,
|
||||
return space;
|
||||
}
|
||||
|
||||
|
||||
void validateVSpaceWidgets(FL_OBJECT * choice_type, FL_OBJECT * input_length)
|
||||
{
|
||||
// Paranoia check!
|
||||
@ -257,23 +184,15 @@ void validateVSpaceWidgets(FL_OBJECT * choice_type, FL_OBJECT * input_length)
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void FormParagraph::apply()
|
||||
{
|
||||
if (!lv_->view()->available() || !dialog_.get())
|
||||
return;
|
||||
if (!form()) return;
|
||||
|
||||
/* spacing */
|
||||
// If a vspace kind is "Length" but there's no text in
|
||||
// the input field, reset the kind to "None".
|
||||
validateVSpaceWidgets(dialog_->choice_space_above,
|
||||
dialog_->input_space_above);
|
||||
validateVSpaceWidgets(dialog_->choice_space_below,
|
||||
dialog_->input_space_below);
|
||||
|
||||
bool const line_top = fl_get_button(dialog_->check_lines_top);
|
||||
bool const line_bottom = fl_get_button(dialog_->check_lines_bottom);
|
||||
bool const pagebreak_top = fl_get_button(dialog_->check_pagebreaks_top);
|
||||
bool const pagebreak_bottom = fl_get_button(dialog_->check_pagebreaks_bottom);
|
||||
|
||||
VSpace const space_top =
|
||||
setVSpaceFromWidgets(dialog_->choice_space_above,
|
||||
@ -281,12 +200,34 @@ void FormParagraph::apply()
|
||||
dialog_->choice_value_space_above,
|
||||
dialog_->check_space_above);
|
||||
|
||||
controller().params().spaceTop(space_top);
|
||||
|
||||
validateVSpaceWidgets(dialog_->choice_space_below,
|
||||
dialog_->input_space_below);
|
||||
|
||||
VSpace const space_bottom =
|
||||
setVSpaceFromWidgets(dialog_->choice_space_below,
|
||||
dialog_->input_space_below,
|
||||
dialog_->choice_value_space_below,
|
||||
dialog_->check_space_below);
|
||||
|
||||
controller().params().spaceBottom(space_bottom);
|
||||
|
||||
/* lines and pagebreaks */
|
||||
bool const line_top = fl_get_button(dialog_->check_lines_top);
|
||||
controller().params().lineTop(line_top);
|
||||
|
||||
bool const line_bottom = fl_get_button(dialog_->check_lines_bottom);
|
||||
controller().params().lineBottom(line_bottom);
|
||||
|
||||
bool const pagebreak_top = fl_get_button(dialog_->check_pagebreaks_top);
|
||||
controller().params().pagebreakTop(pagebreak_top);
|
||||
|
||||
bool const pagebreak_bottom = fl_get_button(dialog_->check_pagebreaks_bottom);
|
||||
controller().params().pagebreakBottom(pagebreak_bottom);
|
||||
|
||||
|
||||
/* alignment */
|
||||
LyXAlignment align;
|
||||
if (fl_get_button(dialog_->radio_align_left))
|
||||
align = LYX_ALIGN_LEFT;
|
||||
@ -296,12 +237,18 @@ void FormParagraph::apply()
|
||||
align = LYX_ALIGN_CENTER;
|
||||
else
|
||||
align = LYX_ALIGN_BLOCK;
|
||||
controller().params().align(align);
|
||||
|
||||
/* label width */
|
||||
string const labelwidthstring =
|
||||
getStringFromInput(dialog_->input_labelwidth);
|
||||
controller().params().labelWidthString(labelwidthstring);
|
||||
|
||||
/* indendation */
|
||||
bool const noindent = fl_get_button(dialog_->check_noindent);
|
||||
controller().params().noindent(noindent);
|
||||
|
||||
/* get spacing */
|
||||
Spacing::Space linespacing = Spacing::Default;
|
||||
string other;
|
||||
switch (fl_get_choice(dialog_->choice_linespacing)) {
|
||||
@ -324,20 +271,10 @@ void FormParagraph::apply()
|
||||
}
|
||||
|
||||
Spacing const spacing(linespacing, other);
|
||||
controller().params().spacing(spacing);
|
||||
|
||||
LyXText * text(lv_->view()->getLyXText());
|
||||
text->setParagraph(lv_->view(), line_top, line_bottom, pagebreak_top,
|
||||
pagebreak_bottom, space_top, space_bottom, spacing,
|
||||
align, labelwidthstring, noindent);
|
||||
|
||||
// Actually apply these settings
|
||||
lv_->view()->update(text,
|
||||
BufferView::SELECT | BufferView::FITCUR | BufferView::CHANGE);
|
||||
lv_->buffer()->markDirty();
|
||||
setMinibuffer(lv_, _("Paragraph layout set"));
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
void setWidgetsFromVSpace(VSpace const & space,
|
||||
@ -397,34 +334,24 @@ void setWidgetsFromVSpace(VSpace const & space,
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void FormParagraph::update()
|
||||
{
|
||||
if (!dialog_.get())
|
||||
return;
|
||||
|
||||
// Do this first; some objects may be de/activated subsequently.
|
||||
bc_.readOnly(lv_->buffer()->isReadonly());
|
||||
|
||||
/// Record the paragraph
|
||||
par_ = getCurrentParagraph();
|
||||
|
||||
fl_set_input(dialog_->input_labelwidth,
|
||||
par_->getLabelWidthString().c_str());
|
||||
/* label width */
|
||||
string labelwidth = controller().params().labelWidthString();
|
||||
fl_set_input(dialog_->input_labelwidth, labelwidth.c_str());
|
||||
setEnabled(dialog_->input_labelwidth,
|
||||
(par_->getLabelWidthString() != _("Senseless with this layout!")));
|
||||
labelwidth != _("Senseless with this layout!"));
|
||||
|
||||
/* alignment */
|
||||
fl_set_button(dialog_->radio_align_right, 0);
|
||||
fl_set_button(dialog_->radio_align_left, 0);
|
||||
fl_set_button(dialog_->radio_align_center, 0);
|
||||
fl_set_button(dialog_->radio_align_block, 0);
|
||||
|
||||
LyXTextClass const & tclass =
|
||||
textclasslist[lv_->view()->buffer()->params.textclass];
|
||||
|
||||
int align = par_->getAlign();
|
||||
if (align == LYX_ALIGN_LAYOUT)
|
||||
align = tclass[par_->layout()].align;
|
||||
LyXAlignment align = controller().params().align();
|
||||
|
||||
switch (align) {
|
||||
case LYX_ALIGN_RIGHT:
|
||||
@ -441,7 +368,7 @@ void FormParagraph::update()
|
||||
break;
|
||||
}
|
||||
|
||||
LyXAlignment alignpos = tclass[par_->layout()].alignpossible;
|
||||
LyXAlignment alignpos = controller().alignPossible();
|
||||
|
||||
setEnabled(dialog_->radio_align_block, bool(alignpos & LYX_ALIGN_BLOCK));
|
||||
setEnabled(dialog_->radio_align_center, bool(alignpos & LYX_ALIGN_CENTER));
|
||||
@ -449,22 +376,25 @@ void FormParagraph::update()
|
||||
setEnabled(dialog_->radio_align_right, bool(alignpos & LYX_ALIGN_RIGHT));
|
||||
|
||||
// no inset-text-owned paragraph may have pagebreaks
|
||||
setEnabled(dialog_->check_pagebreaks_top, !par_->inInset());
|
||||
setEnabled(dialog_->check_pagebreaks_bottom, !par_->inInset());
|
||||
bool ininset = controller().inInset();
|
||||
setEnabled(dialog_->check_pagebreaks_top, !ininset);
|
||||
setEnabled(dialog_->check_pagebreaks_bottom, !ininset);
|
||||
|
||||
/* lines, pagebreaks and indent */
|
||||
fl_set_button(dialog_->check_lines_top,
|
||||
par_->params().lineTop());
|
||||
controller().params().lineTop());
|
||||
fl_set_button(dialog_->check_lines_bottom,
|
||||
par_->params().lineBottom());
|
||||
controller().params().lineBottom());
|
||||
fl_set_button(dialog_->check_pagebreaks_top,
|
||||
par_->params().pagebreakTop());
|
||||
controller().params().pagebreakTop());
|
||||
fl_set_button(dialog_->check_pagebreaks_bottom,
|
||||
par_->params().pagebreakBottom());
|
||||
controller().params().pagebreakBottom());
|
||||
fl_set_button(dialog_->check_noindent,
|
||||
par_->params().noindent());
|
||||
controller().params().noindent());
|
||||
|
||||
/* linespacing */
|
||||
int linespacing;
|
||||
Spacing const space = par_->params().spacing();
|
||||
Spacing const space = controller().params().spacing();
|
||||
|
||||
switch (space.getSpace()) {
|
||||
default: linespacing = 1; break;
|
||||
@ -484,29 +414,30 @@ void FormParagraph::update()
|
||||
setEnabled(dialog_->input_linespacing, false);
|
||||
}
|
||||
|
||||
setWidgetsFromVSpace(par_->params().spaceTop(),
|
||||
/* vspace top */
|
||||
setWidgetsFromVSpace(controller().params().spaceTop(),
|
||||
dialog_->choice_space_above,
|
||||
dialog_->input_space_above,
|
||||
dialog_->choice_value_space_above,
|
||||
dialog_->check_space_above);
|
||||
|
||||
setWidgetsFromVSpace(par_->params().spaceBottom(),
|
||||
/* vspace bottom */
|
||||
setWidgetsFromVSpace(controller().params().spaceBottom(),
|
||||
dialog_->choice_space_below,
|
||||
dialog_->input_space_below,
|
||||
dialog_->choice_value_space_below,
|
||||
dialog_->check_space_below);
|
||||
|
||||
/* no indent */
|
||||
fl_set_button(dialog_->check_noindent,
|
||||
par_->params().noindent());
|
||||
controller().params().noindent());
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
void synchronizeSpaceWidgets(FL_OBJECT * choice_type,
|
||||
FL_OBJECT * input_length,
|
||||
FL_OBJECT * choice_length,
|
||||
bool readonly)
|
||||
FL_OBJECT * choice_length)
|
||||
{
|
||||
// Paranoia check!
|
||||
lyx::Assert(choice_type && choice_type->objclass == FL_CHOICE &&
|
||||
@ -519,8 +450,8 @@ void synchronizeSpaceWidgets(FL_OBJECT * choice_type,
|
||||
setEnabled(choice_length, false);
|
||||
|
||||
} else {
|
||||
setEnabled(input_length, !readonly);
|
||||
setEnabled(choice_length, !readonly);
|
||||
setEnabled(input_length, true);
|
||||
setEnabled(choice_length, true);
|
||||
|
||||
string const length = getStringFromInput(input_length);
|
||||
|
||||
@ -550,8 +481,7 @@ bool validSpaceWidgets(FL_OBJECT * choice_type, FL_OBJECT * input_length)
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
bool FormParagraph::input(FL_OBJECT * ob, long)
|
||||
ButtonPolicy::SMInput FormParagraph::input(FL_OBJECT * ob, long)
|
||||
{
|
||||
clearMessage();
|
||||
|
||||
@ -560,19 +490,16 @@ bool FormParagraph::input(FL_OBJECT * ob, long)
|
||||
//
|
||||
// "Synchronize" the choices and input fields, making it
|
||||
// impossible to commit senseless data.
|
||||
|
||||
if (ob == dialog_->choice_space_above) {
|
||||
synchronizeSpaceWidgets(dialog_->choice_space_above,
|
||||
dialog_->input_space_above,
|
||||
dialog_->choice_value_space_above,
|
||||
lv_->buffer()->isReadonly());
|
||||
dialog_->choice_value_space_above);
|
||||
}
|
||||
|
||||
if (ob == dialog_->choice_space_below) {
|
||||
synchronizeSpaceWidgets(dialog_->choice_space_below,
|
||||
dialog_->input_space_below,
|
||||
dialog_->choice_value_space_below,
|
||||
lv_->buffer()->isReadonly());
|
||||
dialog_->choice_value_space_below);
|
||||
}
|
||||
|
||||
// Display a warning if the input is senseless
|
||||
@ -600,5 +527,7 @@ bool FormParagraph::input(FL_OBJECT * ob, long)
|
||||
if (choice_spacing == 5 && int(spacing) == 0)
|
||||
valid = false;
|
||||
|
||||
return valid;
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file Tooltips.h
|
||||
* Copyright 2000-2001 the LyX Team
|
||||
* Read the file COPYING
|
||||
* \file FormParagraph.h
|
||||
* Copyright 2001 The LyX Team.
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author Jürgen Vigna, jug@sad.it
|
||||
*/
|
||||
@ -14,65 +14,31 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "FormBaseDeprecated.h"
|
||||
#include "FormBase.h"
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/signals/connection.hpp>
|
||||
|
||||
class Paragraph;
|
||||
struct FD_form_paragraph;
|
||||
class ControlParagraph;
|
||||
|
||||
/** This class provides an XForms implementation of the FormParagraph dialog.
|
||||
*/
|
||||
class FormParagraph : public FormBaseBD {
|
||||
class FormParagraph
|
||||
: public FormCB<ControlParagraph, FormDB<FD_form_paragraph> > {
|
||||
public:
|
||||
///
|
||||
FormParagraph(LyXView *, Dialogs *);
|
||||
FormParagraph(ControlParagraph &);
|
||||
private:
|
||||
/// Pointer to the actual instantiation of the ButtonController.
|
||||
virtual xformsBC & bc();
|
||||
/** Redraw the form (on receipt of a Signal indicating, for example,
|
||||
that the xforms colours have been re-mapped). */
|
||||
virtual void redraw();
|
||||
/// Build the dialog
|
||||
virtual void build();
|
||||
/// Apply from dialog
|
||||
virtual void apply();
|
||||
/// Update the dialog
|
||||
virtual void update();
|
||||
|
||||
/// Filter the inputs on callback from xforms
|
||||
virtual bool input(FL_OBJECT * ob, long);
|
||||
/// Connect signals
|
||||
virtual void connect();
|
||||
/// Disconnect signals
|
||||
virtual void disconnect();
|
||||
///
|
||||
void changedParagraph();
|
||||
///
|
||||
Paragraph const * getCurrentParagraph() const;
|
||||
///
|
||||
virtual FL_FORM * form() const;
|
||||
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
|
||||
|
||||
/// Fdesign generated method
|
||||
FD_form_paragraph * build_paragraph();
|
||||
|
||||
/// Real GUI implementation.
|
||||
boost::scoped_ptr<FD_form_paragraph> dialog_;
|
||||
|
||||
/// The ButtonController
|
||||
ButtonController<NoRepeatedApplyReadOnlyPolicy, xformsBC> bc_;
|
||||
|
||||
/// Changed Paragraph connection.
|
||||
boost::signals::connection cp_;
|
||||
|
||||
/// The current Paragraph
|
||||
Paragraph const * par_;
|
||||
};
|
||||
|
||||
|
||||
inline
|
||||
xformsBC & FormParagraph::bc()
|
||||
{
|
||||
return bc_;
|
||||
}
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
}
|
||||
fl_set_object_color(obj, FL_COL1, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Left|#f");
|
||||
fdui->radio_align_left = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 15, 60, 80, 30, idex(_(dummy)));
|
||||
@ -44,7 +44,7 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
}
|
||||
fl_set_object_color(obj, FL_COL1, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Block|#c");
|
||||
fdui->radio_align_block = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 115, 30, 80, 30, idex(_(dummy)));
|
||||
@ -52,7 +52,7 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
}
|
||||
fl_set_object_color(obj, FL_COL1, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Center|#n");
|
||||
fdui->radio_align_center = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 115, 60, 80, 30, idex(_(dummy)));
|
||||
@ -60,7 +60,7 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
}
|
||||
fl_set_object_color(obj, FL_COL1, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fl_end_group();
|
||||
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 240, 20, 120, 75, _("Lines"));
|
||||
@ -72,14 +72,14 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Below|#E");
|
||||
fdui->check_lines_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 245, 60, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 370, 20, 120, 75, _("Page breaks"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
@ -89,14 +89,14 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Below|#l");
|
||||
fdui->check_pagebreaks_bottom = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 375, 60, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 110, 480, 105, _("Vertical spaces"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
@ -107,17 +107,17 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
}
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->input_space_above = obj = fl_add_input(FL_NORMAL_INPUT, 190, 130, 90, 30, "");
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Keep|#K");
|
||||
fdui->check_space_above = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 375, 130, 40, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Below:|#w");
|
||||
fdui->choice_space_below = obj = fl_add_choice(FL_NORMAL_CHOICE, 80, 170, 100, 30, idex(_(dummy)));
|
||||
@ -125,17 +125,17 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
}
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->input_space_below = obj = fl_add_input(FL_NORMAL_INPUT, 190, 170, 90, 30, "");
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Keep|#p");
|
||||
fdui->check_space_below = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 375, 170, 40, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 230, 345, 55, _("Line spacing"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
@ -146,9 +146,9 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
}
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->input_linespacing = obj = fl_add_input(FL_NORMAL_INPUT, 190, 245, 155, 30, "");
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 300, 480, 50, _("Label Width"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
@ -160,7 +160,7 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_gravity(obj, FL_West, FL_East);
|
||||
fl_set_object_resize(obj, FL_RESIZE_X);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 365, 230, 125, 55, _("Indent"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
@ -170,31 +170,31 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Restore|#R");
|
||||
fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 360, 100, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedRestoreCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseRestoreCB, 0);
|
||||
fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 200, 360, 90, 30, _("OK"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseOKCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Apply|#A");
|
||||
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 300, 360, 90, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_close = obj = fl_add_button(FL_NORMAL_BUTTON, 400, 360, 90, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 395, 480, 1, "");
|
||||
fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 10, 405, 480, 35, "");
|
||||
fl_set_object_boxtype(obj, FL_NO_BOX);
|
||||
@ -203,10 +203,10 @@ FD_form_paragraph * FormParagraph::build_paragraph()
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
fdui->choice_value_space_above = obj = fl_add_choice(FL_NORMAL_CHOICE, 290, 130, 65, 30, "");
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fdui->choice_value_space_below = obj = fl_add_choice(FL_NORMAL_CHOICE, 290, 170, 65, 30, "");
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||
fl_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
|
@ -5,11 +5,11 @@
|
||||
#define FD_form_paragraph_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseDeprecatedRestoreCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseRestoreCB(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 ****/
|
||||
|
@ -82,7 +82,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_right
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -100,7 +100,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_left
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -118,7 +118,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_block
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -136,7 +136,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_center
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -190,7 +190,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lines_top
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -208,7 +208,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lines_bottom
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -244,7 +244,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_pagebreaks_top
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -262,7 +262,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_pagebreaks_bottom
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -298,7 +298,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_space_above
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -316,7 +316,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_space_above
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -334,7 +334,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_space_above
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -352,7 +352,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_space_below
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -370,7 +370,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_space_below
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -388,7 +388,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_space_below
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -424,7 +424,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_linespacing
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -442,7 +442,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_linespacing
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -478,7 +478,7 @@ shortcut:
|
||||
resize: FL_RESIZE_X
|
||||
gravity: FL_West FL_East
|
||||
name: input_labelwidth
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -514,7 +514,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_noindent
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -532,7 +532,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_restore
|
||||
callback: C_FormBaseDeprecatedRestoreCB
|
||||
callback: C_FormBaseRestoreCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -550,7 +550,7 @@ shortcut: ^M
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_ok
|
||||
callback: C_FormBaseDeprecatedOKCB
|
||||
callback: C_FormBaseOKCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -568,7 +568,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_apply
|
||||
callback: C_FormBaseDeprecatedApplyCB
|
||||
callback: C_FormBaseApplyCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -586,7 +586,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_close
|
||||
callback: C_FormBaseDeprecatedCancelCB
|
||||
callback: C_FormBaseCancelCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -640,7 +640,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_value_space_above
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -658,7 +658,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_value_space_below
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
==============================
|
||||
|
Loading…
Reference in New Issue
Block a user