mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fixed a missing class change question for defaults, using ButtonPolicy in
FormDocument, ifdef'ed out old code. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@978 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
28ae4652aa
commit
e445df8e4f
24
ChangeLog
24
ChangeLog
@ -1,3 +1,27 @@
|
||||
2000-08-18 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* src/lyx_cb.C: #ifdef'ed out layout stuff which is in the
|
||||
new document layout now.
|
||||
|
||||
* src/lyxfunc.C: ditto
|
||||
|
||||
* src/lyx_gui_misc.C: ditto
|
||||
|
||||
* src/lyx_gui.C: ditto
|
||||
|
||||
* lib/ui/default.ui: removed paper and quotes layout as they are now
|
||||
all in the document layout tabbed folder.
|
||||
|
||||
* src/frontends/xforms/forms/form_document.fd: added Restore
|
||||
button and callbacks for all inputs for Allan's ButtonPolicy.
|
||||
|
||||
* src/frontends/xforms/FormDocument.C (ChoiceClassCB): added.
|
||||
(CheckChoiceClass): added missing params setting on class change.
|
||||
(UpdateLayoutDocument): added for updating the layout on params.
|
||||
(build): forgot to RETURN_ALWAYS input_doc_spacing.
|
||||
(FormDocument): Implemented Allan's ButtonPolicy with the
|
||||
PreferencesPolicy.
|
||||
|
||||
2000-08-17 Allan Rae <rae@lyx.org>
|
||||
|
||||
* src/frontends/xforms/Dialogs.C (Dialogs): Make a temporary connection
|
||||
|
@ -145,11 +145,11 @@ Menuset
|
||||
Menu "layout"
|
||||
Item "Character...|C" "layout-character"
|
||||
Item "Paragraph...|P" "layout-paragraph"
|
||||
# Item "Paper...|a" "layout-paper"
|
||||
Item "Document...|D" "layout-document"
|
||||
Item "Table...|T" "layout-table"
|
||||
# Item "Paper...|a" "layout-paper"
|
||||
# Item "Quotes...|Q" "layout-quotes"
|
||||
OptItem "Tabular...|a" "layout-tabular"
|
||||
Item "Quotes...|Q" "layout-quotes"
|
||||
Item "Table...|T" "layout-table"
|
||||
Separator
|
||||
Item "Emphasize Style|E" "font-emph"
|
||||
Item "Noun Style|N" "font-noun"
|
||||
|
@ -1,6 +1,13 @@
|
||||
/* form_document.C
|
||||
* FormDocument Interface Class Implementation
|
||||
*/
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright (C) 2000 The LyX Team.
|
||||
*
|
||||
* @author Jürgen Vigna
|
||||
*
|
||||
*======================================================*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -31,6 +38,8 @@
|
||||
#include "buffer.h"
|
||||
#include "Liason.h"
|
||||
#include "CutAndPaste.h"
|
||||
#include "bufferview_funcs.h"
|
||||
#include "ButtonController.h"
|
||||
|
||||
#ifdef SIGC_CXX_NAMESPACES
|
||||
using SigC::slot;
|
||||
@ -45,11 +54,18 @@ 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)
|
||||
C_GENERICCB(FormDocument, InputBulletLaTeXCB)
|
||||
C_GENERICCB(FormDocument, ChoiceBulletSizeCB)
|
||||
|
||||
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)
|
||||
status(POPUP_UNMODIFIED) ,
|
||||
bc_(new ButtonController<PreferencesPolicy>(_("Cancel"), _("Close")))
|
||||
{
|
||||
// let the popup be shown
|
||||
// This is a permanent connection so we won't bother
|
||||
@ -62,6 +78,7 @@ FormDocument::FormDocument(LyXView * lv, Dialogs * d)
|
||||
FormDocument::~FormDocument()
|
||||
{
|
||||
free();
|
||||
delete bc_;
|
||||
}
|
||||
|
||||
void FormDocument::build()
|
||||
@ -71,6 +88,13 @@ void FormDocument::build()
|
||||
// the tabbed folder
|
||||
dialog_ = build_tabbed_document();
|
||||
|
||||
// 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();
|
||||
|
||||
// the document paper form
|
||||
paper_ = build_doc_paper();
|
||||
fl_addto_choice(paper_->choice_papersize2,
|
||||
@ -110,6 +134,7 @@ void FormDocument::build()
|
||||
fl_addto_choice(class_->choice_doc_skip,
|
||||
_(" Smallskip | Medskip | Bigskip | Length "));
|
||||
fl_set_input_return(class_->input_doc_skip, FL_RETURN_ALWAYS);
|
||||
fl_set_input_return(class_->input_doc_spacing, FL_RETURN_ALWAYS);
|
||||
|
||||
// the document language form
|
||||
language_ = build_doc_language();
|
||||
@ -483,19 +508,21 @@ void FormDocument::update()
|
||||
" No changes to layout permitted."));
|
||||
fl_show_object(dialog_->text_warning);
|
||||
}
|
||||
class_update();
|
||||
paper_update();
|
||||
language_update();
|
||||
options_update();
|
||||
bullets_update();
|
||||
|
||||
BufferParams
|
||||
const & params = lv_->buffer()->params;
|
||||
|
||||
class_update(params);
|
||||
paper_update(params);
|
||||
language_update(params);
|
||||
options_update(params);
|
||||
bullets_update(params);
|
||||
}
|
||||
|
||||
void FormDocument::class_update()
|
||||
void FormDocument::class_update(BufferParams const & params)
|
||||
{
|
||||
if (!class_)
|
||||
return;
|
||||
BufferParams
|
||||
const & params = lv_->buffer()->params;
|
||||
LyXTextClass
|
||||
const & tclass = textclasslist.TextClass(params.textclass);
|
||||
|
||||
@ -581,14 +608,11 @@ void FormDocument::class_update()
|
||||
fl_set_input(class_->input_doc_extra, "");
|
||||
}
|
||||
|
||||
void FormDocument::language_update()
|
||||
void FormDocument::language_update(BufferParams const & params)
|
||||
{
|
||||
if (!language_)
|
||||
return;
|
||||
|
||||
BufferParams
|
||||
¶ms = lv_->buffer()->params;
|
||||
|
||||
combo_language->select_text(params.language.c_str());
|
||||
fl_set_choice_text(language_->choice_inputenc, params.inputenc.c_str());
|
||||
fl_set_choice(language_->choice_quotes_language, params.quotes_language + 1);
|
||||
@ -600,14 +624,11 @@ void FormDocument::language_update()
|
||||
fl_set_button(language_->radio_double, 1);
|
||||
}
|
||||
|
||||
void FormDocument::options_update()
|
||||
void FormDocument::options_update(BufferParams const & params)
|
||||
{
|
||||
if (!options_)
|
||||
return;
|
||||
|
||||
BufferParams
|
||||
¶ms = lv_->buffer()->params;
|
||||
|
||||
fl_set_choice_text(options_->choice_postscript_driver,
|
||||
params.graphicsDriver.c_str());
|
||||
fl_set_button(options_->check_use_amsmath, params.use_amsmath);
|
||||
@ -620,12 +641,10 @@ void FormDocument::options_update()
|
||||
fl_set_input(options_->input_float_placement, "");
|
||||
}
|
||||
|
||||
void FormDocument::paper_update()
|
||||
void FormDocument::paper_update(BufferParams const & params)
|
||||
{
|
||||
if (!paper_)
|
||||
return;
|
||||
BufferParams
|
||||
¶ms = lv_->buffer()->params;
|
||||
|
||||
fl_set_choice(paper_->choice_papersize2, params.papersize2 + 1);
|
||||
fl_set_choice(paper_->choice_paperpackage, params.paperpackage + 1);
|
||||
@ -648,7 +667,7 @@ void FormDocument::paper_update()
|
||||
fl_set_focus_object(paper_->form, paper_->choice_papersize2);
|
||||
}
|
||||
|
||||
void FormDocument::bullets_update()
|
||||
void FormDocument::bullets_update(BufferParams const & params)
|
||||
{
|
||||
if (!bullets_ || ((XpmVersion<4) || (XpmVersion==4 && XpmRevision<7)))
|
||||
return;
|
||||
@ -671,9 +690,6 @@ void FormDocument::bullets_update()
|
||||
fl_activate_object (bullets_->input_bullet_latex);
|
||||
}
|
||||
|
||||
BufferParams
|
||||
¶ms = lv_->buffer()->params;
|
||||
|
||||
fl_set_button(bullets_->radio_bullet_depth_1, 1);
|
||||
fl_set_input(bullets_->input_bullet_latex,
|
||||
params.user_defined_bullets[0].c_str());
|
||||
@ -723,33 +739,51 @@ int FormDocument::WMHideCB(FL_FORM * form, void *)
|
||||
// window manager is used to close the popup.
|
||||
FormDocument * pre = (FormDocument*)form->u_vdata;
|
||||
pre->hide();
|
||||
pre->bc_->hide();
|
||||
return FL_CANCEL;
|
||||
}
|
||||
|
||||
void FormDocument::CancelCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormDocument * pre = (FormDocument*)ob->form->u_vdata;
|
||||
pre->cancel();
|
||||
pre->hide();
|
||||
}
|
||||
|
||||
void FormDocument::ApplyCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormDocument * pre = (FormDocument*)ob->form->u_vdata;
|
||||
pre->apply();
|
||||
}
|
||||
|
||||
void FormDocument::OKCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormDocument * pre = (FormDocument*)ob->form->u_vdata;
|
||||
pre->apply();
|
||||
pre->hide();
|
||||
pre->bc_->ok();
|
||||
}
|
||||
|
||||
void FormDocument::ApplyCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormDocument * pre = (FormDocument*)ob->form->u_vdata;
|
||||
pre->apply();
|
||||
pre->bc_->apply();
|
||||
}
|
||||
|
||||
void FormDocument::CancelCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormDocument * pre = (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 = (FormDocument*)ob->form->u_vdata;
|
||||
pre->CheckDocumentInput(ob,0);
|
||||
pre->bc_->valid(pre->CheckDocumentInput(ob,0));
|
||||
}
|
||||
|
||||
void FormDocument::ChoiceClassCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormDocument * pre = (FormDocument*)ob->form->u_vdata;
|
||||
pre->CheckChoiceClass(ob,0);
|
||||
pre->bc_->valid(pre->CheckDocumentInput(ob,0));
|
||||
}
|
||||
|
||||
void FormDocument::checkMarginValues()
|
||||
@ -769,14 +803,13 @@ void FormDocument::checkMarginValues()
|
||||
fl_set_button(paper_->push_use_geometry, 1);
|
||||
}
|
||||
|
||||
void FormDocument::CheckDocumentInput(FL_OBJECT * ob, long)
|
||||
bool FormDocument::CheckDocumentInput(FL_OBJECT * ob, long)
|
||||
{
|
||||
string str;
|
||||
char val;
|
||||
bool ok = true;
|
||||
char const * input;
|
||||
|
||||
ActivateDocumentButtons();
|
||||
checkMarginValues();
|
||||
if (ob == paper_->choice_papersize2) {
|
||||
val = fl_get_choice(paper_->choice_papersize2)-1;
|
||||
@ -851,19 +884,19 @@ void FormDocument::CheckDocumentInput(FL_OBJECT * ob, long)
|
||||
else if (fl_get_choice(class_->choice_doc_skip) != 4)
|
||||
fl_set_input (class_->input_doc_skip, "");
|
||||
|
||||
fprintf(stderr,"%d\n",fl_get_choice(class_->choice_doc_spacing));
|
||||
input = fl_get_input(class_->input_doc_spacing);
|
||||
if ((fl_get_choice(class_->choice_doc_spacing) == 4) && !*input)
|
||||
ok = false;
|
||||
else if (fl_get_choice(class_->choice_doc_spacing) != 4)
|
||||
fl_set_input (class_->input_doc_spacing, "");
|
||||
if (!ok)
|
||||
DeactivateDocumentButtons();
|
||||
return ok;
|
||||
}
|
||||
|
||||
void FormDocument::ChoiceBulletSizeCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormDocument * pre = (FormDocument*)ob->form->u_vdata;
|
||||
pre->ChoiceBulletSize(ob,0);
|
||||
pre->bc_->valid(pre->CheckDocumentInput(ob,0));
|
||||
}
|
||||
|
||||
void FormDocument::ChoiceBulletSize(FL_OBJECT * ob, long /*data*/ )
|
||||
@ -880,6 +913,7 @@ void FormDocument::InputBulletLaTeXCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormDocument * pre = (FormDocument*)ob->form->u_vdata;
|
||||
pre->InputBulletLaTeX(ob,0);
|
||||
pre->bc_->valid(pre->CheckDocumentInput(ob,0));
|
||||
}
|
||||
|
||||
void FormDocument::InputBulletLaTeX(FL_OBJECT *, long)
|
||||
@ -978,6 +1012,7 @@ void FormDocument::BulletBMTableCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
FormDocument * pre = (FormDocument*)ob->form->u_vdata;
|
||||
pre->BulletBMTable(ob,0);
|
||||
pre->bc_->valid(pre->CheckDocumentInput(ob,0));
|
||||
}
|
||||
|
||||
void FormDocument::BulletBMTable(FL_OBJECT * ob, long /*data*/ )
|
||||
@ -997,25 +1032,8 @@ void FormDocument::BulletBMTable(FL_OBJECT * ob, long /*data*/ )
|
||||
param.temp_bullets[current_bullet_depth].c_str());
|
||||
}
|
||||
|
||||
void FormDocument::DeactivateDocumentButtons()
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
void FormDocument::ActivateDocumentButtons()
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
void FormDocument::EnableDocumentLayout()
|
||||
{
|
||||
ActivateDocumentButtons ();
|
||||
fl_activate_object (class_->radio_doc_indent);
|
||||
fl_activate_object (class_->radio_doc_skip);
|
||||
fl_activate_object (class_->choice_doc_class);
|
||||
@ -1062,7 +1080,6 @@ void FormDocument::EnableDocumentLayout()
|
||||
|
||||
void FormDocument::DisableDocumentLayout()
|
||||
{
|
||||
DeactivateDocumentButtons ();
|
||||
fl_deactivate_object (class_->radio_doc_indent);
|
||||
fl_deactivate_object (class_->radio_doc_skip);
|
||||
fl_deactivate_object (class_->choice_doc_class);
|
||||
@ -1106,11 +1123,46 @@ void FormDocument::DisableDocumentLayout()
|
||||
fl_deactivate_object (paper_->input_foot_skip);
|
||||
}
|
||||
|
||||
void FormDocument::SetDocumentClassChoice(vector<string> const & choices)
|
||||
void FormDocument::CheckChoiceClass(FL_OBJECT * ob, long)
|
||||
{
|
||||
vector<string>::const_iterator cit = choices.begin();
|
||||
ProhibitInput(lv_->view());
|
||||
if (textclasslist.Load(fl_get_choice(ob)-1)) {
|
||||
if (AskQuestion(_("Should I set some parameters to"),
|
||||
fl_get_choice_text(ob),
|
||||
_("the defaults of this document class?"))) {
|
||||
BufferParams & params = lv_->buffer()->params;
|
||||
|
||||
fl_clear_choice(class_->choice_doc_class);
|
||||
for (; cit != choices.end(); ++cit)
|
||||
fl_addto_choice(class_->choice_doc_class,(*cit).c_str());
|
||||
params.textclass = fl_get_choice(ob)-1;
|
||||
params.useClassDefaults();
|
||||
UpdateLayoutDocument(params);
|
||||
}
|
||||
} else {
|
||||
// unable to load new style
|
||||
WriteAlert(_("Conversion Errors!"),
|
||||
_("Unable to switch to new document class."),
|
||||
_("Reverting to original document class."));
|
||||
fl_set_choice(class_->choice_doc_class,
|
||||
lv_->view()->buffer()->params.textclass + 1);
|
||||
}
|
||||
AllowInput(lv_->view());
|
||||
}
|
||||
|
||||
void FormDocument::UpdateLayoutDocument(BufferParams const & params)
|
||||
{
|
||||
if (!dialog_)
|
||||
return;
|
||||
fl_hide_object(dialog_->text_warning);
|
||||
EnableDocumentLayout();
|
||||
if (lv_->buffer()->isReadonly()) {
|
||||
DisableDocumentLayout();
|
||||
fl_set_object_label(dialog_->text_warning,
|
||||
_("Document is read-only."
|
||||
" No changes to layout permitted."));
|
||||
fl_show_object(dialog_->text_warning);
|
||||
}
|
||||
class_update(params);
|
||||
paper_update(params);
|
||||
language_update(params);
|
||||
options_update(params);
|
||||
bullets_update(params);
|
||||
}
|
||||
|
@ -1,7 +1,14 @@
|
||||
// -*- C++ -*-
|
||||
/* form_document.h
|
||||
* FormDocument Interface Class
|
||||
*/
|
||||
/* This file is part of
|
||||
* ======================================================
|
||||
*
|
||||
* LyX, The Document Processor
|
||||
*
|
||||
* Copyright (C) 2000 The LyX Team.
|
||||
*
|
||||
* @author Jürgen Vigna
|
||||
*
|
||||
*======================================================*/
|
||||
|
||||
#ifndef FORM_DOCUMENT_H
|
||||
#define FORM_DOCUMENT_H
|
||||
@ -17,6 +24,9 @@
|
||||
class LyXView;
|
||||
class Dialogs;
|
||||
class Combox;
|
||||
class BufferParams;
|
||||
class PreferencesPolicy;
|
||||
template <class x> class ButtonController;
|
||||
|
||||
struct FD_form_tabbed_document;
|
||||
struct FD_form_doc_paper;
|
||||
@ -39,18 +49,30 @@ public:
|
||||
///
|
||||
~FormDocument();
|
||||
///
|
||||
void SetDocumentClassChoice(vector<string> const & choices);
|
||||
///
|
||||
static int WMHideCB(FL_FORM *, void *);
|
||||
///
|
||||
static void OKCB(FL_OBJECT *, long);
|
||||
///
|
||||
static void CancelCB(FL_OBJECT *, long);
|
||||
///
|
||||
static void ApplyCB(FL_OBJECT *, long);
|
||||
///
|
||||
static void CancelCB(FL_OBJECT *, long);
|
||||
///
|
||||
static void RestoreCB(FL_OBJECT *, long);
|
||||
///
|
||||
static void InputCB(FL_OBJECT *, long);
|
||||
///
|
||||
static void ChoiceClassCB(FL_OBJECT *, long);
|
||||
///
|
||||
static void ChoiceBulletSizeCB(FL_OBJECT * ob, long);
|
||||
///
|
||||
static void InputBulletLaTeXCB(FL_OBJECT * ob, long);
|
||||
///
|
||||
static void BulletDepthCB(FL_OBJECT * ob, long);
|
||||
///
|
||||
static void BulletPanelCB(FL_OBJECT * ob, long);
|
||||
///
|
||||
static void BulletBMTableCB(FL_OBJECT * ob, long);
|
||||
///
|
||||
enum EnumPopupStatus {
|
||||
///
|
||||
POPUP_UNMODIFIED,
|
||||
@ -61,16 +83,12 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
///
|
||||
void DeactivateDocumentButtons();
|
||||
///
|
||||
void ActivateDocumentButtons();
|
||||
///
|
||||
void EnableDocumentLayout();
|
||||
///
|
||||
void DisableDocumentLayout();
|
||||
///
|
||||
void CheckDocumentInput(FL_OBJECT * ob, long);
|
||||
bool CheckDocumentInput(FL_OBJECT * ob, long);
|
||||
///
|
||||
void ChoiceBulletSize(FL_OBJECT * ob, long);
|
||||
///
|
||||
@ -84,17 +102,9 @@ private:
|
||||
///
|
||||
void checkMarginValues();
|
||||
///
|
||||
static void DocumentInputCB(FL_OBJECT * ob, long);
|
||||
void CheckChoiceClass(FL_OBJECT * ob, long);
|
||||
///
|
||||
static void ChoiceBulletSizeCB(FL_OBJECT * ob, long);
|
||||
///
|
||||
static void InputBulletLaTeXCB(FL_OBJECT * ob, long);
|
||||
///
|
||||
static void BulletDepthCB(FL_OBJECT * ob, long);
|
||||
///
|
||||
static void BulletPanelCB(FL_OBJECT * ob, long);
|
||||
///
|
||||
static void BulletBMTableCB(FL_OBJECT * ob, long);
|
||||
void UpdateLayoutDocument(BufferParams const & params);
|
||||
|
||||
/// Create the popup if necessary, update it and display it.
|
||||
void show();
|
||||
@ -103,15 +113,15 @@ private:
|
||||
/// Update the popup.
|
||||
void update();
|
||||
///
|
||||
void paper_update();
|
||||
void paper_update(BufferParams const &);
|
||||
///
|
||||
void class_update();
|
||||
void class_update(BufferParams const &);
|
||||
///
|
||||
void language_update();
|
||||
void language_update(BufferParams const &);
|
||||
///
|
||||
void options_update();
|
||||
void options_update(BufferParams const &);
|
||||
///
|
||||
void bullets_update();
|
||||
void bullets_update(BufferParams const &);
|
||||
/// Apply from popup
|
||||
void apply();
|
||||
///
|
||||
@ -178,6 +188,8 @@ private:
|
||||
FL_OBJECT * fbullet;
|
||||
///
|
||||
Combox * combo_language;
|
||||
///
|
||||
ButtonController<PreferencesPolicy> * bc_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -29,19 +29,23 @@ FD_form_tabbed_document * FormDocument::build_tabbed_document()
|
||||
obj = fl_add_box(FL_UP_BOX, 0, 0, 465, 450, "");
|
||||
fdui->tabbed_folder = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 20, 15, 435, 365, _("Tabbed folder"));
|
||||
fl_set_object_resize(obj, FL_RESIZE_ALL);
|
||||
obj = fl_add_button(FL_NORMAL_BUTTON, 355, 410, 100, 30, idex(_("Cancel|^[")));
|
||||
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, CancelCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentCancelCB, 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, ApplyCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentApplyCB, 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, OKCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentOKCB, 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_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
@ -72,7 +76,7 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
|
||||
fl_set_button_shortcut(obj, scex(_("Special:|#S")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 230, 205, 200, 130, "");
|
||||
fl_set_object_color(obj, FL_COL1, FL_COL1);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
|
||||
@ -103,16 +107,18 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
|
||||
fdui->radio_portrait = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 90, 120, 30, idex(_("Portrait|#o")));
|
||||
fl_set_button_shortcut(obj, scex(_("Portrait|#o")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->radio_landscape = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 20, 120, 120, 30, idex(_("Landscape|#L")));
|
||||
fl_set_button_shortcut(obj, scex(_("Landscape|#L")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fl_end_group();
|
||||
|
||||
fdui->choice_papersize2 = obj = fl_add_choice(FL_NORMAL_CHOICE, 70, 15, 160, 30, idex(_("Papersize:|#P")));
|
||||
fl_set_button_shortcut(obj, scex(_("Papersize:|#P")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 240, 75, 150, 20, _("Custom Papersize"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
@ -120,42 +126,43 @@ FD_form_doc_paper * FormDocument::build_doc_paper()
|
||||
fdui->push_use_geometry = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 45, 170, 30, idex(_("Use Geometry Package|#U")));
|
||||
fl_set_button_shortcut(obj, scex(_("Use Geometry Package|#U")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_custom_width = obj = fl_add_input(FL_NORMAL_INPUT, 330, 100, 90, 30, idex(_("Width:|#W")));
|
||||
fl_set_button_shortcut(obj, scex(_("Width:|#W")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_custom_height = obj = fl_add_input(FL_NORMAL_INPUT, 330, 140, 90, 30, idex(_("Height:|#H")));
|
||||
fl_set_button_shortcut(obj, scex(_("Height:|#H")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_top_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 175, 90, 30, idex(_("Top:|#T")));
|
||||
fl_set_button_shortcut(obj, scex(_("Top:|#T")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_bottom_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 215, 90, 30, idex(_("Bottom:|#B")));
|
||||
fl_set_button_shortcut(obj, scex(_("Bottom:|#B")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_left_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 255, 90, 30, idex(_("Left:|#e")));
|
||||
fl_set_button_shortcut(obj, scex(_("Left:|#e")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_right_margin = obj = fl_add_input(FL_NORMAL_INPUT, 100, 295, 90, 30, idex(_("Right:|#R")));
|
||||
fl_set_button_shortcut(obj, scex(_("Right:|#R")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_head_height = obj = fl_add_input(FL_NORMAL_INPUT, 330, 215, 90, 30, idex(_("Headheight:|#i")));
|
||||
fl_set_button_shortcut(obj, scex(_("Headheight:|#i")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_head_sep = obj = fl_add_input(FL_NORMAL_INPUT, 330, 255, 90, 30, idex(_("Headsep:|#d")));
|
||||
fl_set_button_shortcut(obj, scex(_("Headsep:|#d")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_foot_skip = obj = fl_add_input(FL_NORMAL_INPUT, 330, 295, 90, 30, idex(_("Footskip:|#F")));
|
||||
fl_set_button_shortcut(obj, scex(_("Footskip:|#F")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 10, 360, 420, 20, "");
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
|
||||
@ -196,43 +203,49 @@ FD_form_doc_class * FormDocument::build_doc_class()
|
||||
fl_set_button_shortcut(obj, scex(_("Fonts:|#F")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->choice_doc_fontsize = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 140, 160, 30, idex(_("Font Size:|#O")));
|
||||
fl_set_button_shortcut(obj, scex(_("Font Size:|#O")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->choice_doc_class = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 20, 160, 30, idex(_("Class:|#C")));
|
||||
fl_set_button_shortcut(obj, scex(_("Class:|#C")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentChoiceClassCB, 0);
|
||||
fdui->choice_doc_pagestyle = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 60, 160, 30, idex(_("Pagestyle:|#P")));
|
||||
fl_set_button_shortcut(obj, scex(_("Pagestyle:|#P")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->choice_doc_spacing = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 290, 160, 30, idex(_("Spacing|#g")));
|
||||
fl_set_button_shortcut(obj, scex(_("Spacing|#g")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_doc_extra = obj = fl_add_input(FL_NORMAL_INPUT, 120, 185, 160, 30, idex(_("Extra Options:|#X")));
|
||||
fl_set_button_shortcut(obj, scex(_("Extra Options:|#X")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->input_doc_skip = obj = fl_add_input(FL_NORMAL_INPUT, 220, 225, 60, 30, "");
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->choice_doc_skip = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 225, 90, 30, idex(_("Default Skip:|#u")));
|
||||
fl_set_button_shortcut(obj, scex(_("Default Skip:|#u")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
|
||||
fdui->group_doc_sides = fl_bgn_group();
|
||||
fdui->radio_doc_sides_one = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 300, 30, 120, 30, idex(_("One|#n")));
|
||||
fl_set_button_shortcut(obj, scex(_("One|#n")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->radio_doc_sides_two = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 300, 60, 120, 30, idex(_("Two|#T")));
|
||||
fl_set_button_shortcut(obj, scex(_("Two|#T")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fl_end_group();
|
||||
|
||||
|
||||
@ -240,9 +253,11 @@ FD_form_doc_class * FormDocument::build_doc_class()
|
||||
fdui->radio_doc_columns_one = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 300, 120, 110, 30, idex(_("One|#e")));
|
||||
fl_set_button_shortcut(obj, scex(_("One|#e")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->radio_doc_columns_two = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 300, 150, 110, 30, idex(_("Two|#w")));
|
||||
fl_set_button_shortcut(obj, scex(_("Two|#w")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fl_end_group();
|
||||
|
||||
|
||||
@ -250,15 +265,17 @@ FD_form_doc_class * FormDocument::build_doc_class()
|
||||
fdui->radio_doc_indent = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 300, 210, 110, 30, idex(_("Indent|#I")));
|
||||
fl_set_button_shortcut(obj, scex(_("Indent|#I")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->radio_doc_skip = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 300, 240, 110, 30, idex(_("Skip|#K")));
|
||||
fl_set_button_shortcut(obj, scex(_("Skip|#K")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fl_set_button(obj, 1);
|
||||
fl_end_group();
|
||||
|
||||
fdui->input_doc_spacing = obj = fl_add_input(FL_NORMAL_INPUT, 300, 290, 120, 30, "");
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, InputCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fl_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
@ -287,23 +304,28 @@ FD_form_doc_language * FormDocument::build_doc_language()
|
||||
fl_set_button_shortcut(obj, scex(_("Encoding:|#D")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->choice_quotes_language = obj = fl_add_choice(FL_NORMAL_CHOICE, 110, 140, 190, 30, idex(_("Type:|#T")));
|
||||
fl_set_button_shortcut(obj, scex(_("Type:|#T")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fl_bgn_group();
|
||||
fdui->radio_single = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 110, 180, 90, 30, idex(_("Single|#S")));
|
||||
fl_set_button_shortcut(obj, scex(_("Single|#S")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->radio_double = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 210, 180, 90, 30, idex(_("Double|#D")));
|
||||
fl_set_button_shortcut(obj, scex(_("Double|#D")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fl_end_group();
|
||||
|
||||
fdui->choice_language = obj = fl_add_choice(FL_NORMAL_CHOICE, 120, 35, 190, 30, idex(_("Language:|#L")));
|
||||
fl_set_button_shortcut(obj, scex(_("Language:|#L")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fl_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
@ -330,19 +352,24 @@ FD_form_doc_options * FormDocument::build_doc_options()
|
||||
fdui->input_float_placement = obj = fl_add_input(FL_NORMAL_INPUT, 155, 60, 120, 30, idex(_("Float Placement:|#L")));
|
||||
fl_set_button_shortcut(obj, scex(_("Float Placement:|#L")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->slider_secnumdepth = obj = fl_add_counter(FL_SIMPLE_COUNTER, 155, 110, 80, 30, _("Section number depth"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->slider_tocdepth = obj = fl_add_counter(FL_SIMPLE_COUNTER, 155, 150, 80, 30, _("Table of contents depth"));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->choice_postscript_driver = obj = fl_add_choice(FL_NORMAL_CHOICE, 155, 205, 190, 30, idex(_("PS Driver:|#S")));
|
||||
fl_set_button_shortcut(obj, scex(_("PS Driver:|#S")), 1);
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fdui->check_use_amsmath = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 140, 250, 200, 30, idex(_("Use AMS Math|#M")));
|
||||
fl_set_button_shortcut(obj, scex(_("Use AMS Math|#M")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputCB, 0);
|
||||
fl_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
@ -383,31 +410,31 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
|
||||
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lalign(obj, FL_ALIGN_TOP);
|
||||
fl_set_object_callback(obj, ChoiceBulletSizeCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentChoiceBulletSizeCB, 0);
|
||||
fdui->input_bullet_latex = obj = fl_add_input(FL_NORMAL_INPUT, 80, 300, 275, 30, idex(_("LaTeX|#L")));
|
||||
fl_set_button_shortcut(obj, scex(_("LaTeX|#L")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_FIXED_STYLE);
|
||||
fl_set_object_callback(obj, InputBulletLaTeXCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentInputBulletLaTeXCB, 0);
|
||||
|
||||
fdui->radio_bullet_depth = fl_bgn_group();
|
||||
fdui->radio_bullet_depth_1 = obj = fl_add_button(FL_RADIO_BUTTON, 105, 35, 55, 40, idex(_("1|#1")));
|
||||
fl_set_button_shortcut(obj, scex(_("1|#1")), 1);
|
||||
fl_set_object_lsize(obj, FL_LARGE_SIZE);
|
||||
fl_set_object_callback(obj, BulletDepthCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletDepthCB, 0);
|
||||
fl_set_button(obj, 1);
|
||||
fdui->radio_bullet_depth_2 = obj = fl_add_button(FL_RADIO_BUTTON, 165, 35, 55, 40, idex(_("2|#2")));
|
||||
fl_set_button_shortcut(obj, scex(_("2|#2")), 1);
|
||||
fl_set_object_lsize(obj, FL_LARGE_SIZE);
|
||||
fl_set_object_callback(obj, BulletDepthCB, 1);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletDepthCB, 1);
|
||||
fdui->radio_bullet_depth_3 = obj = fl_add_button(FL_RADIO_BUTTON, 225, 35, 55, 40, idex(_("3|#3")));
|
||||
fl_set_button_shortcut(obj, scex(_("3|#3")), 1);
|
||||
fl_set_object_lsize(obj, FL_LARGE_SIZE);
|
||||
fl_set_object_callback(obj, BulletDepthCB, 2);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletDepthCB, 2);
|
||||
fdui->radio_bullet_depth_4 = obj = fl_add_button(FL_RADIO_BUTTON, 285, 35, 55, 40, idex(_("4|#4")));
|
||||
fl_set_button_shortcut(obj, scex(_("4|#4")), 1);
|
||||
fl_set_object_lsize(obj, FL_LARGE_SIZE);
|
||||
fl_set_object_callback(obj, BulletDepthCB, 3);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletDepthCB, 3);
|
||||
fl_end_group();
|
||||
|
||||
obj = fl_add_text(FL_NORMAL_TEXT, 105, 10, 85, 20, _("Bullet Depth"));
|
||||
@ -419,33 +446,33 @@ FD_form_doc_bullet * FormDocument::build_doc_bullet()
|
||||
fl_set_button_shortcut(obj, scex(_("Standard|#S")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||
fl_set_object_callback(obj, BulletPanelCB, 0);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletPanelCB, 0);
|
||||
fl_set_button(obj, 1);
|
||||
fdui->radio_bullet_panel_maths = obj = fl_add_button(FL_RADIO_BUTTON, 15, 135, 65, 30, idex(_("Maths|#M")));
|
||||
fl_set_button_shortcut(obj, scex(_("Maths|#M")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||
fl_set_object_callback(obj, BulletPanelCB, 1);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletPanelCB, 1);
|
||||
fdui->radio_bullet_panel_ding2 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 195, 65, 30, idex(_("Ding 2|#i")));
|
||||
fl_set_button_shortcut(obj, scex(_("Ding 2|#i")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||
fl_set_object_callback(obj, BulletPanelCB, 3);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletPanelCB, 3);
|
||||
fdui->radio_bullet_panel_ding3 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 225, 65, 30, idex(_("Ding 3|#n")));
|
||||
fl_set_button_shortcut(obj, scex(_("Ding 3|#n")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||
fl_set_object_callback(obj, BulletPanelCB, 4);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletPanelCB, 4);
|
||||
fdui->radio_bullet_panel_ding4 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 255, 65, 30, idex(_("Ding 4|#g")));
|
||||
fl_set_button_shortcut(obj, scex(_("Ding 4|#g")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||
fl_set_object_callback(obj, BulletPanelCB, 5);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletPanelCB, 5);
|
||||
fdui->radio_bullet_panel_ding1 = obj = fl_add_button(FL_RADIO_BUTTON, 15, 165, 65, 30, idex(_("Ding 1|#D")));
|
||||
fl_set_button_shortcut(obj, scex(_("Ding 1|#D")), 1);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_resize(obj, FL_RESIZE_NONE);
|
||||
fl_set_object_callback(obj, BulletPanelCB, 2);
|
||||
fl_set_object_callback(obj, C_FormDocumentBulletPanelCB, 2);
|
||||
fl_end_group();
|
||||
|
||||
fl_end_form();
|
||||
|
@ -5,20 +5,24 @@
|
||||
#define FD_form_tabbed_document_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern "C" void CancelCB(FL_OBJECT *, long);
|
||||
extern "C" void ApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void OKCB(FL_OBJECT *, long);
|
||||
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 InputCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormDocumentInputCB(FL_OBJECT *, long);
|
||||
|
||||
extern "C" void InputCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormDocumentInputCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormDocumentChoiceClassCB(FL_OBJECT *, long);
|
||||
|
||||
extern "C" void C_FormDocumentInputCB(FL_OBJECT *, long);
|
||||
|
||||
extern "C" void C_FormDocumentInputCB(FL_OBJECT *, long);
|
||||
|
||||
extern "C" void ChoiceBulletSizeCB(FL_OBJECT *, long);
|
||||
extern "C" void InputBulletLaTeXCB(FL_OBJECT *, long);
|
||||
extern "C" void BulletDepthCB(FL_OBJECT *, long);
|
||||
extern "C" void BulletPanelCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormDocumentChoiceBulletSizeCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormDocumentInputBulletLaTeXCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormDocumentBulletDepthCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormDocumentBulletPanelCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
@ -27,9 +31,11 @@ struct FD_form_tabbed_document {
|
||||
|
||||
FL_FORM *form;
|
||||
FL_OBJECT *tabbed_folder;
|
||||
FL_OBJECT *button_cancel;
|
||||
FL_OBJECT *button_apply;
|
||||
FL_OBJECT *button_ok;
|
||||
FL_OBJECT *text_warning;
|
||||
FL_OBJECT *button_restore;
|
||||
};
|
||||
struct FD_form_doc_paper {
|
||||
~FD_form_doc_paper();
|
||||
|
@ -11,7 +11,7 @@ SnapGrid: 5
|
||||
Name: form_tabbed_document
|
||||
Width: 465
|
||||
Height: 450
|
||||
Number of Objects: 6
|
||||
Number of Objects: 7
|
||||
|
||||
--------------------
|
||||
class: FL_BOX
|
||||
@ -63,8 +63,8 @@ label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name:
|
||||
callback: CancelCB
|
||||
name: button_cancel
|
||||
callback: C_FormDocumentCancelCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -82,7 +82,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_apply
|
||||
callback: ApplyCB
|
||||
callback: C_FormDocumentApplyCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -100,7 +100,7 @@ shortcut: ^M
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_ok
|
||||
callback: OKCB
|
||||
callback: C_FormDocumentOKCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -121,6 +121,24 @@ name: text_warning
|
||||
callback:
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
class: FL_BUTTON
|
||||
type: NORMAL_BUTTON
|
||||
box: 10 410 100 30
|
||||
boxtype: FL_UP_BOX
|
||||
colors: FL_COL1 FL_COL1
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Restore|#R
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_restore
|
||||
callback: C_FormDocumentRestoreCB
|
||||
argument: 0
|
||||
|
||||
=============== FORM ===============
|
||||
Name: form_doc_paper
|
||||
Width: 440
|
||||
@ -178,7 +196,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_paperpackage
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -358,7 +376,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_portrait
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -376,7 +394,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_landscape
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -412,7 +430,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_papersize2
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -448,7 +466,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: push_use_geometry
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -466,7 +484,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_custom_width
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -484,7 +502,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_custom_height
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -502,7 +520,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_top_margin
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -520,7 +538,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_bottom_margin
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -538,7 +556,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_left_margin
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -556,7 +574,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_right_margin
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -574,7 +592,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_head_height
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -592,7 +610,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_head_sep
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -610,7 +628,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_foot_skip
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -724,7 +742,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_doc_fonts
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -742,7 +760,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_doc_fontsize
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -760,7 +778,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_doc_class
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentChoiceClassCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -778,7 +796,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_doc_pagestyle
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -796,7 +814,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_doc_spacing
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -814,7 +832,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_doc_extra
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -832,7 +850,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_doc_skip
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -850,7 +868,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_doc_skip
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -886,7 +904,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_doc_sides_one
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -904,7 +922,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_doc_sides_two
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -958,7 +976,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_doc_columns_one
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -976,7 +994,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_doc_columns_two
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1030,7 +1048,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_doc_indent
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1048,7 +1066,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_doc_skip
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
value: 1
|
||||
|
||||
@ -1085,7 +1103,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_doc_spacing
|
||||
callback: InputCB
|
||||
callback: C_FormDocumentInputCB
|
||||
argument: 0
|
||||
|
||||
=============== FORM ===============
|
||||
@ -1145,7 +1163,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_inputenc
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1163,7 +1181,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_quotes_language
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1199,7 +1217,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_single
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1217,7 +1235,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_double
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1253,7 +1271,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_language
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
=============== FORM ===============
|
||||
@ -1295,7 +1313,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_float_placement
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1313,7 +1331,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: slider_secnumdepth
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1331,7 +1349,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: slider_tocdepth
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1349,7 +1367,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_postscript_driver
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
@ -1367,7 +1385,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_use_amsmath
|
||||
callback:
|
||||
callback: C_FormDocumentInputCB
|
||||
argument:
|
||||
|
||||
=============== FORM ===============
|
||||
@ -1447,7 +1465,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_bullet_size
|
||||
callback: ChoiceBulletSizeCB
|
||||
callback: C_FormDocumentChoiceBulletSizeCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1465,7 +1483,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_bullet_latex
|
||||
callback: InputBulletLaTeXCB
|
||||
callback: C_FormDocumentInputBulletLaTeXCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1501,7 +1519,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_depth_1
|
||||
callback: BulletDepthCB
|
||||
callback: C_FormDocumentBulletDepthCB
|
||||
argument: 0
|
||||
value: 1
|
||||
|
||||
@ -1520,7 +1538,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_depth_2
|
||||
callback: BulletDepthCB
|
||||
callback: C_FormDocumentBulletDepthCB
|
||||
argument: 1
|
||||
|
||||
--------------------
|
||||
@ -1538,7 +1556,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_depth_3
|
||||
callback: BulletDepthCB
|
||||
callback: C_FormDocumentBulletDepthCB
|
||||
argument: 2
|
||||
|
||||
--------------------
|
||||
@ -1556,7 +1574,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_depth_4
|
||||
callback: BulletDepthCB
|
||||
callback: C_FormDocumentBulletDepthCB
|
||||
argument: 3
|
||||
|
||||
--------------------
|
||||
@ -1628,7 +1646,7 @@ shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_panel_standard
|
||||
callback: BulletPanelCB
|
||||
callback: C_FormDocumentBulletPanelCB
|
||||
argument: 0
|
||||
value: 1
|
||||
|
||||
@ -1647,7 +1665,7 @@ shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_panel_maths
|
||||
callback: BulletPanelCB
|
||||
callback: C_FormDocumentBulletPanelCB
|
||||
argument: 1
|
||||
|
||||
--------------------
|
||||
@ -1665,7 +1683,7 @@ shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_panel_ding2
|
||||
callback: BulletPanelCB
|
||||
callback: C_FormDocumentBulletPanelCB
|
||||
argument: 3
|
||||
|
||||
--------------------
|
||||
@ -1683,7 +1701,7 @@ shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_panel_ding3
|
||||
callback: BulletPanelCB
|
||||
callback: C_FormDocumentBulletPanelCB
|
||||
argument: 4
|
||||
|
||||
--------------------
|
||||
@ -1701,7 +1719,7 @@ shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_panel_ding4
|
||||
callback: BulletPanelCB
|
||||
callback: C_FormDocumentBulletPanelCB
|
||||
argument: 5
|
||||
|
||||
--------------------
|
||||
@ -1719,7 +1737,7 @@ shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bullet_panel_ding1
|
||||
callback: BulletPanelCB
|
||||
callback: C_FormDocumentBulletPanelCB
|
||||
argument: 2
|
||||
|
||||
--------------------
|
||||
|
20
src/lyx_cb.C
20
src/lyx_cb.C
@ -1562,7 +1562,7 @@ void MenuLayoutParagraph()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef USE_OLD_DOCUMENT_LAYOUT
|
||||
inline
|
||||
void DeactivateDocumentButtons ()
|
||||
{
|
||||
@ -1869,6 +1869,7 @@ void MenuLayoutQuotes()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
bool UpdateLayoutPreamble()
|
||||
@ -2219,8 +2220,8 @@ extern "C" void CharacterOKCB(FL_OBJECT *ob, long data)
|
||||
}
|
||||
|
||||
|
||||
#ifdef USE_OLD_DOCUMENT_LAYOUT
|
||||
/* callbacks for form form_document */
|
||||
|
||||
void UpdateDocumentButtons(BufferParams const & params)
|
||||
{
|
||||
fl_set_choice(fd_form_document->choice_pagestyle, 1);
|
||||
@ -2522,7 +2523,6 @@ extern "C" void DocumentBulletsCB(FL_OBJECT *, long)
|
||||
// bullet callbacks etc. in bullet_panel.C -- ARRae
|
||||
}
|
||||
|
||||
|
||||
/* callbacks for form form_quotes */
|
||||
|
||||
extern "C" void QuotesApplyCB(FL_OBJECT *, long)
|
||||
@ -2573,7 +2573,19 @@ extern "C" void QuotesOKCB(FL_OBJECT * ob, long data)
|
||||
QuotesApplyCB(ob, data);
|
||||
QuotesCancelCB(ob, data);
|
||||
}
|
||||
|
||||
#else
|
||||
// this is needed for now!
|
||||
extern "C" void ChoiceClassCB(FL_OBJECT *, long) {}
|
||||
extern "C" void DocumentDefskipCB(FL_OBJECT *, long) {}
|
||||
extern "C" void DocumentSpacingCB(FL_OBJECT *, long) {}
|
||||
extern "C" void DocumentApplyCB(FL_OBJECT *, long) {}
|
||||
extern "C" void DocumentCancelCB(FL_OBJECT *, long) {}
|
||||
extern "C" void DocumentOKCB(FL_OBJECT *, long) {}
|
||||
extern "C" void DocumentBulletsCB(FL_OBJECT *, long) {}
|
||||
extern "C" void QuotesApplyCB(FL_OBJECT *, long) {}
|
||||
extern "C" void QuotesCancelCB(FL_OBJECT *, long) {}
|
||||
extern "C" void QuotesOKCB(FL_OBJECT *, long) {}
|
||||
#endif
|
||||
|
||||
|
||||
/* callbacks for form form_preamble */
|
||||
|
@ -374,6 +374,7 @@ void LyXGUI::create_forms()
|
||||
fl_end_form();
|
||||
lyxerr[Debug::INIT] << "Initializing form_character...done" << endl;
|
||||
|
||||
#ifdef USE_OLD_DOCUMENT_LAYOUT
|
||||
// the document form
|
||||
fd_form_document = create_form_form_document();
|
||||
fl_set_form_atclose(fd_form_document->form_document,
|
||||
@ -463,7 +464,9 @@ void LyXGUI::create_forms()
|
||||
fl_set_input_return(fd_form_paper->input_foot_skip,
|
||||
FL_RETURN_ALWAYS);
|
||||
lyxerr[Debug::INIT] << "Initializing form_paper...done" << endl;
|
||||
#endif
|
||||
|
||||
#ifndef NEW_TABULAR
|
||||
// the table_options form
|
||||
fd_form_table_options = create_form_form_table_options();
|
||||
fl_set_form_atclose(fd_form_table_options->form_table_options,
|
||||
@ -480,7 +483,9 @@ void LyXGUI::create_forms()
|
||||
fl_set_input_return(fd_form_table_extra->input_special_multialign,
|
||||
FL_RETURN_ALWAYS);
|
||||
lyxerr[Debug::INIT] << "Initializing form_table_extra...done" << endl;
|
||||
#endif
|
||||
|
||||
#ifdef USE_OLD_DOCUMENT_LAYOUT
|
||||
// the quotes form
|
||||
fd_form_quotes = create_form_form_quotes();
|
||||
fl_set_form_atclose(fd_form_quotes->form_quotes,
|
||||
@ -489,6 +494,7 @@ void LyXGUI::create_forms()
|
||||
// Maybe if people use a font other than latin1... (JMarc)
|
||||
fl_addto_choice(fd_form_quotes->choice_quotes_language,
|
||||
_(" ``text'' | ''text'' | ,,text`` | ,,text'' | «text» | »text« "));
|
||||
#endif
|
||||
|
||||
// the preamble form
|
||||
fd_form_preamble = create_form_form_preamble();
|
||||
|
@ -179,24 +179,26 @@ void CloseAllBufferRelatedDialogs()
|
||||
// Again the Signal/Slot mechanism is tailor made for this task.
|
||||
void updateAllVisibleBufferRelatedDialogs()
|
||||
{
|
||||
#ifdef USE_OLD_DOCUMENT_LAYOUT
|
||||
if (fd_form_document->form_document->visible) {
|
||||
UpdateLayoutDocument();
|
||||
}
|
||||
if (fd_form_preamble->form_preamble->visible) {
|
||||
UpdateLayoutPreamble();
|
||||
}
|
||||
if (fd_form_quotes->form_quotes->visible) {
|
||||
UpdateLayoutQuotes();
|
||||
}
|
||||
if (fd_form_paper->form_paper->visible) {
|
||||
UpdateLayoutPaper();
|
||||
}
|
||||
#endif
|
||||
if (fd_form_preamble->form_preamble->visible) {
|
||||
UpdateLayoutPreamble();
|
||||
}
|
||||
if (fd_form_paragraph->form_paragraph->visible) {
|
||||
UpdateLayoutParagraph();
|
||||
}
|
||||
if (fd_form_paragraph_extra->form_paragraph_extra->visible) {
|
||||
UpdateParagraphExtra();
|
||||
}
|
||||
if (fd_form_paper->form_paper->visible) {
|
||||
UpdateLayoutPaper();
|
||||
}
|
||||
if (fd_form_table_options->form_table_options->visible) {
|
||||
UpdateLayoutTable(1); // just like a right mouse click
|
||||
}
|
||||
|
@ -1428,7 +1428,7 @@ string LyXFunc::Dispatch(int ac,
|
||||
break;
|
||||
|
||||
case LFUN_LAYOUT_DOCUMENT:
|
||||
#ifdef USE_OLD_LAYOUT
|
||||
#ifdef USE_OLD_DOCUMENT_LAYOUT
|
||||
MenuLayoutDocument();
|
||||
#else
|
||||
owner->getDialogs()->showLayoutDocument();
|
||||
@ -1467,11 +1467,15 @@ string LyXFunc::Dispatch(int ac,
|
||||
break;
|
||||
|
||||
case LFUN_LAYOUT_PAPER:
|
||||
#ifdef USE_OLD_DOCUMENT_LAYOUT
|
||||
MenuLayoutPaper();
|
||||
#endif
|
||||
break;
|
||||
|
||||
case LFUN_LAYOUT_QUOTES:
|
||||
#ifdef USE_OLD_DOCUMENT_LAYOUT
|
||||
MenuLayoutQuotes();
|
||||
#endif
|
||||
break;
|
||||
|
||||
case LFUN_LAYOUT_PREAMBLE:
|
||||
|
Loading…
Reference in New Issue
Block a user