+2001-02-26 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
+
+ * layout_forms.fd: delete
+ * layout_forms.h.patch: delete
+ * makefile: remove layout_forms.fd and layout_forms.h.patch
+
2001-02-20 Angus Leeming <a.leeming@ic.ac.uk>
* layout_forms.[fd,h.patch]: strip out preamble form.
+++ /dev/null
-Magic: 13000
-
-Internal Form Definition File
- (do not change)
-
-Number of forms: 1
-Unit of measure: FL_COORD_PIXEL
-SnapGrid: 5
-
-=============== FORM ===============
-Name: form_character
-Width: 300
-Height: 415
-Number of Objects: 14
-
---------------------
-class: FL_BOX
-type: UP_BOX
-box: 0 0 300 415
-boxtype: FL_UP_BOX
-colors: FL_COL1 FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_SouthEast
-name:
-callback:
-argument:
-
---------------------
-class: FL_FRAME
-type: ENGRAVED_FRAME
-box: 10 10 280 240
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name:
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 94 15 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Family:|#F
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_family
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 94 55 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Series:|#S
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_series
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 94 95 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Shape:|#H
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_shape
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 95 275 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Size:|#Z
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_size
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 95 335 190 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Misc:|#M
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_bar
-callback:
-argument:
-
---------------------
-class: FL_BUTTON
-type: NORMAL_BUTTON
-box: 60 375 80 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: Apply|#A
-shortcut:
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_apply
-callback: CharacterApplyCB
-argument: 0
-
---------------------
-class: FL_BUTTON
-type: RETURN_BUTTON
-box: 175 375 80 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: Close
-shortcut: ^M
-resize: FL_RESIZE_NONE
-gravity: FL_SouthEast FL_SouthEast
-name: button_close
-callback: CharacterCloseCB
-argument: 0
-
---------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 95 135 191 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Color:|#C
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_color
-callback:
-argument:
-
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 30 215 255 25
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_CENTER
-style: FL_NORMAL_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: Toggle on all these|#T
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: check_toggle_all
-callback:
-argument:
-
---------------------
-class: FL_CHOICE
-type: DROPLIST_CHOICE
-box: 95 175 190 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: Language:
-shortcut:
-resize: FL_RESIZE_X
-gravity: FL_NorthWest FL_NorthEast
-name: choice_language
-callback:
-argument:
-
---------------------
-class: FL_LABELFRAME
-type: ENGRAVED_FRAME
-box: 10 265 280 45
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_BOLD_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: These are never toggled
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_NorthEast
-name:
-callback:
-argument:
-
---------------------
-class: FL_LABELFRAME
-type: ENGRAVED_FRAME
-box: 10 325 280 45
-boxtype: FL_NO_BOX
-colors: FL_BLACK FL_COL1
-alignment: FL_ALIGN_TOP_LEFT
-style: FL_BOLD_STYLE
-size: FL_DEFAULT_SIZE
-lcol: FL_BLACK
-label: These are always toggled
-shortcut:
-resize: FL_RESIZE_ALL
-gravity: FL_NorthWest FL_NorthEast
-name:
-callback:
-argument:
-
-create_the_forms
+++ /dev/null
-7,8c7,8
-< extern void CharacterApplyCB(FL_OBJECT *, long);
-< extern void CharacterCloseCB(FL_OBJECT *, long);
----
-> extern "C" void CharacterApplyCB(FL_OBJECT *, long);
-> extern "C" void CharacterCloseCB(FL_OBJECT *, long);
FDESIGN = fdesign
SRCS = bibforms.fd credits_form.fd form1.fd include_form.fd \
- log_form.fd layout_forms.fd lyx.fd math_forms.fd \
+ log_form.fd lyx.fd math_forms.fd \
print_form.fd sp_form.fd
OBJS = bibforms.c credits_form.c form1.c include_form.c \
- log_form.c layout_forms.c lyx.c math_forms.c \
+ log_form.c lyx.c math_forms.c \
print_form.c sp_form.c
COBJS = bibforms.C credits_form.C form1.C include_form.C \
- log_form.C layout_forms.C lyx.C math_forms.C \
+ log_form.C lyx.C math_forms.C \
print_form.C sp_form.C
all:
src/frontends/xforms/form_bibtex.C
src/frontends/xforms/FormBibtex.C
src/frontends/xforms/form_browser.C
+src/frontends/xforms/form_character.C
+src/frontends/xforms/FormCharacter.C
src/frontends/xforms/form_citation.C
src/frontends/xforms/FormCitation.C
src/frontends/xforms/form_copyright.C
src/language.C
src/LaTeX.C
src/layout.C
-src/layout_forms.C
src/LColor.C
src/LyXAction.C
src/lyx.C
src/lyxfr0.C
src/lyxfr1.C
src/lyxfunc.C
-src/lyx_gui.C
src/lyx_gui_misc.C
src/lyx_main.C
src/lyxrc.C
break;
case LFUN_FREE:
- Free(bv_);
- setState();
- owner_->showState();
+ owner_->getDialogs()->setUserFreeFont();
break;
case LFUN_TEX:
+2001-02-23 Edwin Leuven <leuven@fee.uva.nl>
+
+ * layout_forms.[Ch]: removed
+ * lyx_cb.[Ch]: out character
+ * lyx_gui.C: out character
+ * lyx_gui_misc.C: out character
+ * bufferview_funcs.C: : out character,
+ added toggleall as parameter in ToggleAndShow
+
2001-02-26 Dekel Tsur <dekelts@tau.ac.il>
* lyxfunc.C (getStatus): Fix the LFUN_EXPORT case.
#include "minibuffer.h"
#include "lyxfunc.h"
#include "debug.h"
-#include "layout_forms.h"
#include "intl.h"
#include "lyxrc.h"
#include "support/filetools.h" // OnlyFilename()
lastfiles.h \
layout.C \
layout.h \
- layout_forms.C \
- layout_forms.h \
lyx.C \
lyx.h \
lyx_cb.C \
#include "buffer.h"
#include "support/lstrings.h"
#include "lyx_cb.h"
-#include "layout_forms.h"
-extern FD_form_character * fd_form_character;
#ifndef NEW_INSETS
void Foot(BufferView * bv)
}
-void Free(BufferView * bv)
-{
- ToggleAndShow(bv, UserFreeFont(bv->buffer()->params));
-}
-
-
// How should this actually work? Should it prohibit input in all BufferViews,
// or just in the current one? If "just the current one", then it should be
// placed in BufferView. If "all BufferViews" then LyXGUI (I think) should
XDefineCursor(fl_get_display(), bv->owner()->getForm()->window,
cursor);
- if (fd_form_character->form_character->visible)
- XDefineCursor(fl_get_display(),
- fd_form_character->form_character->window,
- cursor);
-
XFlush(fl_get_display());
fl_deactivate_all_forms();
}
XUndefineCursor(fl_get_display(), bv->owner()->getForm()->window);
- if (fd_form_character->form_character->visible)
- XUndefineCursor(fl_get_display(),
- fd_form_character->form_character->window);
-
XFlush(fl_get_display());
fl_activate_all_forms();
}
/* -------> Does the actual toggle job of the XxxCB() calls above.
* Also shows the current font state.
*/
-void ToggleAndShow(BufferView * bv, LyXFont const & font)
+void ToggleAndShow(BufferView * bv, LyXFont const & font, bool toggleall=true)
{
if (bv->available()) {
LyXText * text = bv->getLyXText();
///
extern void changeDepth(BufferView *, LyXText *, int);
///
-extern void Free(BufferView *);
-///
extern void ProhibitInput(BufferView *);
///
extern void AllowInput(BufferView *);
/// Returns the current font and depth as a message.
extern string const CurrentState(BufferView *);
///
-extern void ToggleAndShow(BufferView *, LyXFont const &);
+extern void ToggleAndShow(BufferView *, LyXFont const &, bool toggleall=true);
#endif
}
lyxerr.debug() << "Label: " << label << endl;
- if (label && label!= button) {
+ if (label && label != button) {
fl_delete_object(label);
fl_free_object(label);
}
+2001-02-23 Edwin Leuven <leuven@fee.uva.nl)
+
+ * Dialogs.h: setUserFreeFont, showLayoutCharacter
+
2001-02-19 Angus Leeming <a.leeming@ic.ac.uk>
* DialogBase.h: derived from noncopyable, rather than deriving
Signal0<void> showLayoutDocument;
///
Signal0<void> showLayoutParagraph;
+ ///
+ Signal0<void> showLayoutCharacter;
+ ///
+ Signal0<void> setUserFreeFont;
/// show the version control log
Signal0<void> showVCLogFile;
/// show the LaTeX log or build file
+2001-02-23 Edwin Leuven <leuven@fee.uva.nl>
+
+ * Dialogs.C: added layoutcharacter
+ * FormCharacter.C: added
+ * FormCharacter.h: added
+ * form_character.C: added
+ * form_character.h: added
+ * forms/form_character.fd: added
+
2001-02-23 Dekel Tsur <dekelts@tau.ac.il>
* FormPreferences.C: Handle lyxrc.language_use_babel and
#include "FormBibitem.h"
#include "FormBibtex.h"
#include "FormCitation.h"
+#include "FormCharacter.h"
#include "FormCopyright.h"
#include "FormDocument.h"
#include "FormError.h"
{
dialogs_.push_back(new FormBibitem(lv, this));
dialogs_.push_back(new FormBibtex(lv, this));
+ dialogs_.push_back(new FormCharacter(lv, this));
dialogs_.push_back(new FormCitation(lv, this));
dialogs_.push_back(new FormCopyright(lv, this));
dialogs_.push_back(new FormDocument(lv, this));
--- /dev/null
+/**
+ * \file FormCharacter.C
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#include <config.h>
+
+#ifdef __GNUG_
+#pragma implementation
+#endif
+
+#include FORMS_H_LOCATION
+
+#include "FormCharacter.h"
+#include "form_character.h"
+#include "bufferview_funcs.h"
+#include "Dialogs.h"
+#include "Liason.h"
+#include "LyXView.h"
+#include "buffer.h"
+#include "lyxtext.h"
+#include "language.h"
+#include "combox.h"
+
+#ifdef CXX_WORKING_NAMESPACES
+using Liason::setMinibuffer;
+#endif
+
+
+FormCharacter::FormCharacter(LyXView * lv, Dialogs * d)
+ : FormBaseBD(lv, d, _("Character Layout"),
+ new NoRepeatedApplyReadOnlyPolicy),
+ dialog_(0), combo_language2(0)
+{
+ // let the popup be shown
+ // This is a permanent connection so we won't bother
+ // storing a copy because we won't be disconnecting.
+ d->showLayoutCharacter.connect(slot(this, &FormCharacter::show));
+ // for LFUN_FREE
+ d->setUserFreeFont.connect(slot(this, &FormCharacter::apply));
+}
+
+
+FormCharacter::~FormCharacter()
+{
+ delete dialog_;
+ delete combo_language2;
+
+}
+
+
+FL_FORM * FormCharacter::form() const
+{
+ if (dialog_)
+ return dialog_->form;
+ return 0;
+}
+
+void FormCharacter::build()
+{
+ dialog_ = build_character();
+ // Workaround dumb xforms sizing bug
+ minw_ = form()->w;
+ minh_ = form()->h;
+ // Manage the ok, apply and cancel/close buttons
+ bc_.setApply(dialog_->button_apply);
+ bc_.setCancel(dialog_->button_close);
+ bc_.refresh();
+ bc_.addReadOnly (dialog_->check_toggle_all);
+
+ fl_addto_choice(dialog_->choice_family,
+ _(" No change %l| Roman | Sans Serif | Typewriter %l| Reset "));
+ fl_addto_choice(dialog_->choice_series,
+ _(" No change %l| Medium | Bold %l| Reset "));
+ fl_addto_choice(dialog_->choice_shape,
+ _(" No change %l| Upright | Italic | Slanted | Small Caps "
+ "%l| Reset "));
+ fl_addto_choice(dialog_->choice_size,
+ _(" No change %l| Tiny | Smallest | Smaller | Small "
+ "| Normal | Large | Larger | Largest | Huge | Huger "
+ "%l| Increase | Decrease | Reset "));
+ fl_addto_choice(dialog_->choice_bar,
+ _(" No change %l| Emph | Underbar | Noun | LaTeX mode %l| Reset "));
+ fl_addto_choice(dialog_->choice_color,
+ _(" No change %l| No color | Black | White | Red | Green "
+ "| Blue | Cyan | Magenta | Yellow %l| Reset "));
+ fl_addto_choice(dialog_->choice_language,
+ _(" English %l| German | French "));
+
+ // insert default language box manually
+ fl_addto_form(dialog_->form);
+ FL_OBJECT * ob = dialog_->choice_language;
+ combo_language2 = new Combox(FL_COMBOX_DROPLIST);
+ combo_language2->add(ob->x, ob->y, ob->w, ob->h, 250);
+ combo_language2->shortcut("#L", 1);
+ fl_end_form();
+
+ // build up the combox entries
+ combo_language2->addline(_("No change"));
+ combo_language2->addline(_("Reset"));
+ for (Languages::const_iterator cit = languages.begin();
+ cit != languages.end(); ++cit) {
+ combo_language2->addto((*cit).second.lang());
+ }
+
+
+}
+
+
+void FormCharacter::apply()
+{
+ if (!lv_->view()->available() || !dialog_)
+ return;
+
+ LyXFont font(LyXFont::ALL_IGNORE);
+
+ int pos = fl_get_choice(dialog_->choice_family);
+ switch (pos) {
+ case 1: font.setFamily(LyXFont::IGNORE_FAMILY); break;
+ case 2: font.setFamily(LyXFont::ROMAN_FAMILY); break;
+ case 3: font.setFamily(LyXFont::SANS_FAMILY); break;
+ case 4: font.setFamily(LyXFont::TYPEWRITER_FAMILY); break;
+ case 5: font.setFamily(LyXFont::INHERIT_FAMILY); break;
+ }
+
+ pos = fl_get_choice(dialog_->choice_series);
+ switch (pos) {
+ case 1: font.setSeries(LyXFont::IGNORE_SERIES); break;
+ case 2: font.setSeries(LyXFont::MEDIUM_SERIES); break;
+ case 3: font.setSeries(LyXFont::BOLD_SERIES); break;
+ case 4: font.setSeries(LyXFont::INHERIT_SERIES); break;
+ }
+
+ pos = fl_get_choice(dialog_->choice_shape);
+ switch (pos) {
+ case 1: font.setShape(LyXFont::IGNORE_SHAPE); break;
+ case 2: font.setShape(LyXFont::UP_SHAPE); break;
+ case 3: font.setShape(LyXFont::ITALIC_SHAPE); break;
+ case 4: font.setShape(LyXFont::SLANTED_SHAPE); break;
+ case 5: font.setShape(LyXFont::SMALLCAPS_SHAPE); break;
+ case 6: font.setShape(LyXFont::INHERIT_SHAPE); break;
+ }
+
+ pos = fl_get_choice(dialog_->choice_size);
+ switch (pos) {
+ case 1: font.setSize(LyXFont::IGNORE_SIZE); break;
+ case 2: font.setSize(LyXFont::SIZE_TINY); break;
+ case 3: font.setSize(LyXFont::SIZE_SCRIPT); break;
+ case 4: font.setSize(LyXFont::SIZE_FOOTNOTE); break;
+ case 5: font.setSize(LyXFont::SIZE_SMALL); break;
+ case 6: font.setSize(LyXFont::SIZE_NORMAL); break;
+ case 7: font.setSize(LyXFont::SIZE_LARGE); break;
+ case 8: font.setSize(LyXFont::SIZE_LARGER); break;
+ case 9: font.setSize(LyXFont::SIZE_LARGEST); break;
+ case 10: font.setSize(LyXFont::SIZE_HUGE); break;
+ case 11: font.setSize(LyXFont::SIZE_HUGER); break;
+ case 12: font.setSize(LyXFont::INCREASE_SIZE); break;
+ case 13: font.setSize(LyXFont::DECREASE_SIZE); break;
+ case 14: font.setSize(LyXFont::INHERIT_SIZE); break;
+ }
+
+ pos = fl_get_choice(dialog_->choice_bar);
+ switch (pos) {
+ case 1: font.setEmph(LyXFont::IGNORE);
+ font.setUnderbar(LyXFont::IGNORE);
+ font.setNoun(LyXFont::IGNORE);
+ font.setLatex(LyXFont::IGNORE);
+ break;
+ case 2: font.setEmph(LyXFont::TOGGLE); break;
+ case 3: font.setUnderbar(LyXFont::TOGGLE); break;
+ case 4: font.setNoun(LyXFont::TOGGLE); break;
+ case 5: font.setLatex(LyXFont::TOGGLE); break;
+ case 6: font.setEmph(LyXFont::INHERIT);
+ font.setUnderbar(LyXFont::INHERIT);
+ font.setNoun(LyXFont::INHERIT);
+ font.setLatex(LyXFont::INHERIT);
+ break;
+ }
+
+ pos = fl_get_choice(dialog_->choice_color);
+ switch (pos) {
+ case 1: font.setColor(LColor::ignore); break;
+ case 2: font.setColor(LColor::none); break;
+ case 3: font.setColor(LColor::black); break;
+ case 4: font.setColor(LColor::white); break;
+ case 5: font.setColor(LColor::red); break;
+ case 6: font.setColor(LColor::green); break;
+ case 7: font.setColor(LColor::blue); break;
+ case 8: font.setColor(LColor::cyan); break;
+ case 9: font.setColor(LColor::magenta); break;
+ case 10: font.setColor(LColor::yellow); break;
+ case 11: font.setColor(LColor::inherit); break;
+ }
+
+ int const choice = combo_language2->get();
+ if (choice == 1)
+ font.setLanguage(ignore_language);
+ else if (choice == 2)
+ font.setLanguage(lv_->buffer()->params.language);
+ else
+ font.setLanguage(languages.getLanguage(combo_language2->getline()));
+
+
+ bool toggleall = fl_get_button(dialog_->check_toggle_all);
+ ToggleAndShow(lv_->view(), font, toggleall);
+ lv_->view()->setState();
+ lv_->buffer()->markDirty();
+ setMinibuffer(lv_, _("Character set"));
+}
+
+
+void FormCharacter::update()
+{
+ if (!dialog_)
+ return;
+
+ bc_.readOnly(lv_->buffer()->isReadonly());
+}
+
+
--- /dev/null
+/**
+ * \file FormCharacter.h
+ * Copyright 2001 The LyX Team.
+ * See the file COPYING.
+ *
+ * \author Edwin Leuven, leuven@fee.uva.nl
+ */
+
+#ifndef FORM_CHARACTER_H
+#define FORM_CHARACTER_H
+
+#include "FormBase.h"
+
+#ifdef __GNUG_
+#pragma interface
+#endif
+
+
+class LyXView;
+class Dialogs;
+class Combox;
+struct FD_form_character;
+
+/**
+ * This class provides an XForms implementation of the FormCharacter Dialog.
+ * The character dialog allows users to change the character settings
+ * in their documents.
+ */
+class FormCharacter : public FormBaseBD {
+public:
+ ///
+ FormCharacter(LyXView *, Dialogs *);
+ ///
+ ~FormCharacter();
+
+private:
+
+ /// Build the popup
+ virtual void build();
+
+ /// Apply from popup
+ virtual void apply();
+
+ /// Update the popup.
+ virtual void update();
+
+ /// Pointer to the actual instantiation of the xform's form
+ virtual FL_FORM * form() const;
+
+ FD_form_character * build_character();
+
+ /// Real GUI implementation.
+ FD_form_character * dialog_;
+
+ Combox * combo_language2;
+};
+
+#endif
FormBrowser.h \
form_browser.C \
form_browser.h \
+ FormCharacter.C \
+ FormCharacter.h \
+ form_character.C \
+ form_character.h \
FormCitation.C \
FormCitation.h \
form_citation.C \
--- /dev/null
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+#include <config.h>
+#include "lyx_gui_misc.h"
+#include "gettext.h"
+
+/* Form definition file generated with fdesign. */
+
+#include FORMS_H_LOCATION
+#include <stdlib.h>
+#include "form_character.h"
+#include "FormCharacter.h"
+
+FD_form_character::~FD_form_character()
+{
+ if ( form->visible ) fl_hide_form( form );
+ fl_free_form( form );
+}
+
+
+FD_form_character * FormCharacter::build_character()
+{
+ FL_OBJECT *obj;
+ FD_form_character *fdui = new FD_form_character;
+
+ fdui->form = fl_bgn_form(FL_NO_BOX, 300, 415);
+ fdui->form->u_vdata = this;
+ obj = fl_add_box(FL_UP_BOX, 0, 0, 300, 415, "");
+ fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
+ obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 10, 280, 240, "");
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_set_object_resize(obj, FL_RESIZE_X);
+ {
+ char const * const dummy = N_("Family:|#F");
+ fdui->choice_family = obj = fl_add_choice(FL_NORMAL_CHOICE, 94, 15, 191, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_boxtype(obj, FL_FRAME_BOX);
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_set_object_resize(obj, FL_RESIZE_X);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+ {
+ char const * const dummy = N_("Series:|#S");
+ fdui->choice_series = obj = fl_add_choice(FL_NORMAL_CHOICE, 94, 55, 191, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_boxtype(obj, FL_FRAME_BOX);
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_set_object_resize(obj, FL_RESIZE_X);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+ {
+ char const * const dummy = N_("Shape:|#H");
+ fdui->choice_shape = obj = fl_add_choice(FL_NORMAL_CHOICE, 94, 95, 191, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_boxtype(obj, FL_FRAME_BOX);
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_set_object_resize(obj, FL_RESIZE_X);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+ {
+ char const * const dummy = N_("Size:|#Z");
+ fdui->choice_size = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 275, 191, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_boxtype(obj, FL_FRAME_BOX);
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_set_object_resize(obj, FL_RESIZE_X);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+ {
+ char const * const dummy = N_("Misc:|#M");
+ fdui->choice_bar = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 335, 190, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_boxtype(obj, FL_FRAME_BOX);
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_set_object_resize(obj, FL_RESIZE_X);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+ {
+ char const * const dummy = N_("Apply|#A");
+ fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 375, 80, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
+ fl_set_object_callback(obj, C_FormBaseApplyCB, 0);
+ {
+ char const * const dummy = N_("Cancel|#N");
+ fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 175, 375, 80, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
+ fl_set_object_callback(obj, C_FormBaseCancelCB, 0);
+ {
+ char const * const dummy = N_("Color:|#C");
+ fdui->choice_color = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 135, 191, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_boxtype(obj, FL_FRAME_BOX);
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_set_object_resize(obj, FL_RESIZE_X);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+ {
+ char const * const dummy = N_("Toggle on all these|#T");
+ fdui->check_toggle_all = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 215, 255, 25, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_set_object_resize(obj, FL_RESIZE_X);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+ fdui->choice_language = obj = fl_add_choice(FL_DROPLIST_CHOICE, 95, 175, 190, 30, _("Language:"));
+ fl_set_object_boxtype(obj, FL_FRAME_BOX);
+ fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_set_object_resize(obj, FL_RESIZE_X);
+ fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+ obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 265, 280, 45, _("These are never toggled"));
+ fl_set_object_lstyle(obj, FL_BOLD_STYLE);
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 325, 280, 45, _("These are always toggled"));
+ fl_set_object_lstyle(obj, FL_BOLD_STYLE);
+ fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
+ fl_end_form();
+
+ fdui->form->fdui = fdui;
+
+ return fdui;
+}
+/*---------------------------------------*/
+
--- /dev/null
+// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
+/** Header file generated with fdesign **/
+
+#ifndef FD_form_character_h_
+#define FD_form_character_h_
+
+/** Callbacks, globals and object handlers **/
+extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseApplyCB(FL_OBJECT *, long);
+extern "C" void C_FormBaseCancelCB(FL_OBJECT *, long);
+
+
+/**** Forms and Objects ****/
+struct FD_form_character {
+ ~FD_form_character();
+
+ FL_FORM *form;
+ FL_OBJECT *choice_family;
+ FL_OBJECT *choice_series;
+ FL_OBJECT *choice_shape;
+ FL_OBJECT *choice_size;
+ FL_OBJECT *choice_bar;
+ FL_OBJECT *button_apply;
+ FL_OBJECT *button_close;
+ FL_OBJECT *choice_color;
+ FL_OBJECT *check_toggle_all;
+ FL_OBJECT *choice_language;
+};
+
+#endif /* FD_form_character_h_ */
--- /dev/null
+Magic: 13000
+
+Internal Form Definition File
+ (do not change)
+
+Number of forms: 1
+Unit of measure: FL_COORD_PIXEL
+SnapGrid: 5
+
+=============== FORM ===============
+Name: form_character
+Width: 300
+Height: 415
+Number of Objects: 14
+
+--------------------
+class: FL_BOX
+type: UP_BOX
+box: 0 0 300 415
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label:
+shortcut:
+resize: FL_RESIZE_ALL
+gravity: FL_NorthWest FL_SouthEast
+name:
+callback:
+argument:
+
+--------------------
+class: FL_FRAME
+type: ENGRAVED_FRAME
+box: 10 10 280 240
+boxtype: FL_NO_BOX
+colors: FL_BLACK FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label:
+shortcut:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name:
+callback:
+argument:
+
+--------------------
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 94 15 191 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Family:|#F
+shortcut:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_family
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 94 55 191 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Series:|#S
+shortcut:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_series
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 94 95 191 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Shape:|#H
+shortcut:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_shape
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 95 275 191 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Size:|#Z
+shortcut:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_size
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 95 335 190 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Misc:|#M
+shortcut:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_bar
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_BUTTON
+type: NORMAL_BUTTON
+box: 60 375 80 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: Apply|#A
+shortcut:
+resize: FL_RESIZE_NONE
+gravity: FL_SouthEast FL_SouthEast
+name: button_apply
+callback: C_FormBaseApplyCB
+argument: 0
+
+--------------------
+class: FL_BUTTON
+type: RETURN_BUTTON
+box: 175 375 80 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: Cancel|#N
+shortcut: ^M
+resize: FL_RESIZE_NONE
+gravity: FL_SouthEast FL_SouthEast
+name: button_close
+callback: C_FormBaseCancelCB
+argument: 0
+
+--------------------
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 95 135 191 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Color:|#C
+shortcut:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_color
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_CHECKBUTTON
+type: PUSH_BUTTON
+box: 30 215 255 25
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: Toggle on all these|#T
+shortcut:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: check_toggle_all
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_CHOICE
+type: DROPLIST_CHOICE
+box: 95 175 190 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Language:
+shortcut:
+resize: FL_RESIZE_X
+gravity: FL_NorthWest FL_NorthEast
+name: choice_language
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_LABELFRAME
+type: ENGRAVED_FRAME
+box: 10 265 280 45
+boxtype: FL_NO_BOX
+colors: FL_BLACK FL_COL1
+alignment: FL_ALIGN_TOP_LEFT
+style: FL_BOLD_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: These are never toggled
+shortcut:
+resize: FL_RESIZE_ALL
+gravity: FL_NorthWest FL_NorthEast
+name:
+callback:
+argument:
+
+--------------------
+class: FL_LABELFRAME
+type: ENGRAVED_FRAME
+box: 10 325 280 45
+boxtype: FL_NO_BOX
+colors: FL_BLACK FL_COL1
+alignment: FL_ALIGN_TOP_LEFT
+style: FL_BOLD_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLACK
+label: These are always toggled
+shortcut:
+resize: FL_RESIZE_ALL
+gravity: FL_NorthWest FL_NorthEast
+name:
+callback:
+argument:
+
+==============================
+create_the_forms
+++ /dev/null
-// File modified by fdfix.sh for use by lyx (with xforms > 0.88) and gettext
-#include <config.h>
-#include "lyx_gui_misc.h"
-#include "gettext.h"
-
-/* Form definition file generated with fdesign. */
-
-#include FORMS_H_LOCATION
-#include <cstdlib>
-#include "layout_forms.h"
-
-FD_form_character *create_form_form_character(void)
-{
- FL_OBJECT *obj;
- FD_form_character *fdui = (FD_form_character *) fl_calloc(1, sizeof(FD_form_character));
-
- fdui->form_character = fl_bgn_form(FL_NO_BOX, 300, 415);
- obj = fl_add_box(FL_UP_BOX, 0, 0, 300, 415, "");
- fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast);
- obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 10, 280, 240, "");
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->choice_family = obj = fl_add_choice(FL_NORMAL_CHOICE, 94, 15, 191, 30, idex(_("Family:|#F")));fl_set_button_shortcut(obj, scex(_("Family:|#F")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->choice_series = obj = fl_add_choice(FL_NORMAL_CHOICE, 94, 55, 191, 30, idex(_("Series:|#S")));fl_set_button_shortcut(obj, scex(_("Series:|#S")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->choice_shape = obj = fl_add_choice(FL_NORMAL_CHOICE, 94, 95, 191, 30, idex(_("Shape:|#H")));fl_set_button_shortcut(obj, scex(_("Shape:|#H")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->choice_size = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 275, 191, 30, idex(_("Size:|#Z")));fl_set_button_shortcut(obj, scex(_("Size:|#Z")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->choice_bar = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 335, 190, 30, idex(_("Misc:|#M")));fl_set_button_shortcut(obj, scex(_("Misc:|#M")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 60, 375, 80, 30, idex(_("Apply|#A")));fl_set_button_shortcut(obj, scex(_("Apply|#A")), 1);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, CharacterApplyCB, 0);
- fdui->button_close = obj = fl_add_button(FL_RETURN_BUTTON, 175, 375, 80, 30, _("Close"));
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
- fl_set_object_callback(obj, CharacterCloseCB, 0);
- fdui->choice_color = obj = fl_add_choice(FL_NORMAL_CHOICE, 95, 135, 191, 30, idex(_("Color:|#C")));fl_set_button_shortcut(obj, scex(_("Color:|#C")), 1);
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->check_toggle_all = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 30, 215, 255, 25, idex(_("Toggle on all these|#T")));fl_set_button_shortcut(obj, scex(_("Toggle on all these|#T")), 1);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- fdui->choice_language = obj = fl_add_choice(FL_DROPLIST_CHOICE, 95, 175, 190, 30, _("Language:"));
- fl_set_object_boxtype(obj, FL_FRAME_BOX);
- fl_set_object_lsize(obj, FL_NORMAL_SIZE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_set_object_resize(obj, FL_RESIZE_X);
- obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 265, 280, 45, _("These are never toggled"));
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 10, 325, 280, 45, _("These are always toggled"));
- fl_set_object_lstyle(obj, FL_BOLD_STYLE);
- fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast);
- fl_end_form();
-
- fdui->form_character->fdui = fdui;
-
- return fdui;
-}
-/*---------------------------------------*/
-
+++ /dev/null
-/** Header file generated with fdesign **/
-
-#ifndef FD_form_character_h_
-#define FD_form_character_h_
-
-/** Callbacks, globals and object handlers **/
-extern "C" void CharacterApplyCB(FL_OBJECT *, long);
-extern "C" void CharacterCloseCB(FL_OBJECT *, long);
-
-
-/**** Forms and Objects ****/
-typedef struct {
- FL_FORM *form_character;
- void *vdata;
- char *cdata;
- long ldata;
- FL_OBJECT *choice_family;
- FL_OBJECT *choice_series;
- FL_OBJECT *choice_shape;
- FL_OBJECT *choice_size;
- FL_OBJECT *choice_bar;
- FL_OBJECT *button_apply;
- FL_OBJECT *button_close;
- FL_OBJECT *choice_color;
- FL_OBJECT *check_toggle_all;
- FL_OBJECT *choice_language;
-} FD_form_character;
-
-extern FD_form_character * create_form_form_character(void);
-
-#endif /* FD_form_character_h_ */
#include FORMS_H_LOCATION
#include "lyx.h"
-#include "layout_forms.h"
#include "lyx_main.h"
#include "lyx_cb.h"
#include "insets/insetlabel.h"
using std::sort;
using std::equal;
-extern Combox * combo_language;
-extern Combox * combo_language2;
extern BufferList bufferlist;
extern void show_symbols_form();
-extern FD_form_character * fd_form_character;
extern FD_form_figure * fd_form_figure;
extern BufferView * current_view; // called too many times in this file...
bool scrolling = false;
-// This is used to make the dreaded font toggle problem hopefully go
-// away. Definitely not the best solution, but I think it sorta works.
-bool toggleall = true;
-
/*
This is the inset locking stuff needed for mathed --------------------
}
-void MenuLayoutCharacter()
-{
- static int ow = -1, oh;
-
- if (fd_form_character->form_character->visible) {
- fl_raise_form(fd_form_character->form_character);
- } else {
- fl_show_form(fd_form_character->form_character,
- FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT,
- _("Character Style"));
- if (ow < 0) {
- ow = fd_form_character->form_character->w;
- oh = fd_form_character->form_character->h;
- }
- fl_set_form_minsize(fd_form_character->form_character, ow, oh);
- }
-}
-
-
-
void MenuLayoutSave(BufferView * bv)
{
if (!bv->available())
}
-// This is both GUI and LyXFont dependent. Don't know where to put it. (Asger)
-// Well, it's mostly GUI dependent, so I guess it will stay here. (Asger)
-LyXFont const UserFreeFont(BufferParams const & params)
-{
- LyXFont font(LyXFont::ALL_IGNORE);
-
- int pos = fl_get_choice(fd_form_character->choice_family);
- switch (pos) {
- case 1: font.setFamily(LyXFont::IGNORE_FAMILY); break;
- case 2: font.setFamily(LyXFont::ROMAN_FAMILY); break;
- case 3: font.setFamily(LyXFont::SANS_FAMILY); break;
- case 4: font.setFamily(LyXFont::TYPEWRITER_FAMILY); break;
- case 5: font.setFamily(LyXFont::INHERIT_FAMILY); break;
- }
-
- pos = fl_get_choice(fd_form_character->choice_series);
- switch (pos) {
- case 1: font.setSeries(LyXFont::IGNORE_SERIES); break;
- case 2: font.setSeries(LyXFont::MEDIUM_SERIES); break;
- case 3: font.setSeries(LyXFont::BOLD_SERIES); break;
- case 4: font.setSeries(LyXFont::INHERIT_SERIES); break;
- }
-
- pos = fl_get_choice(fd_form_character->choice_shape);
- switch (pos) {
- case 1: font.setShape(LyXFont::IGNORE_SHAPE); break;
- case 2: font.setShape(LyXFont::UP_SHAPE); break;
- case 3: font.setShape(LyXFont::ITALIC_SHAPE); break;
- case 4: font.setShape(LyXFont::SLANTED_SHAPE); break;
- case 5: font.setShape(LyXFont::SMALLCAPS_SHAPE); break;
- case 6: font.setShape(LyXFont::INHERIT_SHAPE); break;
- }
-
- pos = fl_get_choice(fd_form_character->choice_size);
- switch (pos) {
- case 1: font.setSize(LyXFont::IGNORE_SIZE); break;
- case 2: font.setSize(LyXFont::SIZE_TINY); break;
- case 3: font.setSize(LyXFont::SIZE_SCRIPT); break;
- case 4: font.setSize(LyXFont::SIZE_FOOTNOTE); break;
- case 5: font.setSize(LyXFont::SIZE_SMALL); break;
- case 6: font.setSize(LyXFont::SIZE_NORMAL); break;
- case 7: font.setSize(LyXFont::SIZE_LARGE); break;
- case 8: font.setSize(LyXFont::SIZE_LARGER); break;
- case 9: font.setSize(LyXFont::SIZE_LARGEST); break;
- case 10: font.setSize(LyXFont::SIZE_HUGE); break;
- case 11: font.setSize(LyXFont::SIZE_HUGER); break;
- case 12: font.setSize(LyXFont::INCREASE_SIZE); break;
- case 13: font.setSize(LyXFont::DECREASE_SIZE); break;
- case 14: font.setSize(LyXFont::INHERIT_SIZE); break;
- }
-
- pos = fl_get_choice(fd_form_character->choice_bar);
- switch (pos) {
- case 1: font.setEmph(LyXFont::IGNORE);
- font.setUnderbar(LyXFont::IGNORE);
- font.setNoun(LyXFont::IGNORE);
- font.setLatex(LyXFont::IGNORE);
- break;
- case 2: font.setEmph(LyXFont::TOGGLE); break;
- case 3: font.setUnderbar(LyXFont::TOGGLE); break;
- case 4: font.setNoun(LyXFont::TOGGLE); break;
- case 5: font.setLatex(LyXFont::TOGGLE); break;
- case 6: font.setEmph(LyXFont::INHERIT);
- font.setUnderbar(LyXFont::INHERIT);
- font.setNoun(LyXFont::INHERIT);
- font.setLatex(LyXFont::INHERIT);
- break;
- }
-
- pos = fl_get_choice(fd_form_character->choice_color);
- switch (pos) {
- case 1: font.setColor(LColor::ignore); break;
- case 2: font.setColor(LColor::none); break;
- case 3: font.setColor(LColor::black); break;
- case 4: font.setColor(LColor::white); break;
- case 5: font.setColor(LColor::red); break;
- case 6: font.setColor(LColor::green); break;
- case 7: font.setColor(LColor::blue); break;
- case 8: font.setColor(LColor::cyan); break;
- case 9: font.setColor(LColor::magenta); break;
- case 10: font.setColor(LColor::yellow); break;
- case 11: font.setColor(LColor::inherit); break;
- }
-
- int const choice = combo_language2->get();
- if (choice == 1)
- font.setLanguage(ignore_language);
- else if (choice == 2)
- font.setLanguage(params.language);
- else
- font.setLanguage(languages.getLanguage(combo_language2->getline()));
-
- return font;
-}
-
-
-/* callbacks for form form_character */
-
-extern "C"
-void CharacterApplyCB(FL_OBJECT *, long)
-{
- // we set toggleall locally here, since it should be true for
- // all other uses of ToggleAndShow() (JMarc)
- toggleall = fl_get_button(fd_form_character->check_toggle_all);
- ToggleAndShow(current_view, UserFreeFont(current_view->buffer()->params));
- current_view->setState();
- toggleall = true;
-}
-
-
-extern "C"
-void CharacterCloseCB(FL_OBJECT *, long)
-{
- fl_hide_form(fd_form_character->form_character);
-}
-
-
-extern "C"
-void CharacterOKCB(FL_OBJECT * ob, long data)
-{
- CharacterApplyCB(ob, data);
- CharacterCloseCB(ob, data);
-}
-
-
-
void Figure()
{
if (fd_form_figure->form_figure->visible) {
///
extern bool BindFileSet;
///
-extern LyXFont const UserFreeFont(BufferParams const & params);
-///
void ShowMessage(Buffer const * buf,
string const & msg1,
string const & msg2 = string(),
///
void MenuLayoutSave(BufferView * bv);
///
-LyXFont const UserFreeFont(BufferParams const & params);
-///
void Figure();
///
void Reconfigure(BufferView * bv);
#pragma implementation
#endif
-#include <fcntl.h>
+//#include <fcntl.h>
#include "lyx_gui.h"
#include FORMS_H_LOCATION
#include "support/filetools.h"
#include "combox.h"
#include "lyx.h"
#include "form1.h"
-#include "layout_forms.h"
#include "print_form.h"
#include "tex-strings.h"
#include "lyx_main.h"
using std::endl;
-FD_form_character * fd_form_character;
FD_form_sendto * fd_form_sendto;
FD_form_figure * fd_form_figure;
-Combox * combo_language;
-Combox * combo_language2;
extern LyXServer * lyxserver;
extern bool finished; // flag, that we are quitting the program
// Create forms
//
- // the character form
- fd_form_character = create_form_form_character();
- fl_set_form_atclose(fd_form_character->form_character,
- CancelCloseBoxCB, 0);
- fl_addto_choice(fd_form_character->choice_family,
- _(" No change %l| Roman | Sans Serif | Typewriter %l| Reset "));
- fl_addto_choice(fd_form_character->choice_series,
- _(" No change %l| Medium | Bold %l| Reset "));
- fl_addto_choice(fd_form_character->choice_shape,
- _(" No change %l| Upright | Italic | Slanted | Small Caps "
- "%l| Reset "));
- fl_addto_choice(fd_form_character->choice_size,
- _(" No change %l| Tiny | Smallest | Smaller | Small "
- "| Normal | Large | Larger | Largest | Huge | Huger "
- "%l| Increase | Decrease | Reset "));
- fl_addto_choice(fd_form_character->choice_bar,
- _(" No change %l| Emph | Underbar | Noun | LaTeX mode %l| Reset "));
- fl_addto_choice(fd_form_character->choice_color,
- _(" No change %l| No color | Black | White | Red | Green "
- "| Blue | Cyan | Magenta | Yellow %l| Reset "));
- // Appears to need initialising to avoid seg fault when dialog is
- // launched. Over-written by combo_language2, below
- fl_addto_choice(fd_form_character->choice_language,
- _(" English %l| German | French "));
- fl_set_form_minsize(fd_form_character->form_character,
- fd_form_character->form_character->w,
- fd_form_character->form_character->h);
- lyxerr[Debug::INIT] << "Initializing form_character::combox..." << endl;
- fl_addto_form(fd_form_character->form_character);
- combo_language2 = new Combox(FL_COMBOX_DROPLIST);
- FL_OBJECT * ob = fd_form_character->choice_language;
- combo_language2->add(ob->x, ob->y, ob->w, ob->h, 250);
- combo_language2->shortcut("#L", 1);
- fl_end_form();
- lyxerr[Debug::INIT] << "Initializing form_character...done" << endl;
-
- // build up the combox entries
- combo_language2->addline(_("No change"));
- combo_language2->addline(_("Reset"));
- for (Languages::const_iterator cit = languages.begin();
- cit != languages.end(); ++cit) {
-#ifdef DO_USE_DEFAULT_LANGUAGE
- if ((*cit).second.lang() != "default")
-#endif
- combo_language2->addto((*cit).second.lang());
- }
-
// the sendto form
fd_form_sendto = create_form_form_sendto();
fl_set_form_atclose(fd_form_sendto->form_sendto, CancelCloseBoxCB, 0);
#include "credits_form.h"
#include "form1.h"
#include "gettext.h"
-#include "layout_forms.h"
#include "lyx.h"
#include "lyx_cb.h"
#include "lyx_main.h"
extern BufferView * current_view;
-extern FD_form_character * fd_form_character;
extern FD_form_credits * fd_form_credits;
extern FD_form_figure * fd_form_figure;
extern FD_form_sendto * fd_form_sendto;
if (fd_delim && fd_delim->delim->visible) {
fl_redraw_form(fd_delim->delim);
}
- if (fd_form_character->form_character->visible) {
- fl_redraw_form(fd_form_character->form_character);
- }
if (fd_form_credits && fd_form_credits->form_credits->visible) {
fl_redraw_form(fd_form_credits->form_credits);
}
// have been created otherwise hiding one could cause a crash
// need the visible check otherwise XForms prints a warning
// if hiding an invisible form
- if (fd_form_character->form_character->visible) {
- fl_hide_form(fd_form_character->form_character);
- }
if (fd_form_figure->form_figure->visible) {
fl_hide_form(fd_form_figure->form_figure);
}
{
if (current_view->buffer() && current_view->buffer()->isReadonly()) {
// a little crude perhaps but it works. ARRae
- if (fd_form_character->form_character->visible) {
- fl_hide_form(fd_form_character->form_character);
- }
#ifndef ALWAYS_CLOSE_MATH_PANELS
// The math popups should be closed only if we switch
// to a readonly buffer
break;
case LFUN_FREE:
- Free(owner->view());
- owner->view()->setState();
- owner->showState();
+ owner->getDialogs()->setUserFreeFont();
break;
case LFUN_TEX:
break;
case LFUN_LAYOUT_CHARACTER:
- MenuLayoutCharacter();
+ owner->getDialogs()->showLayoutCharacter();
break;
case LFUN_LAYOUT_TABULAR:
bool MathMacro::Permit(short f) const
{
return (nargs_ > 0) ?
- tmplate_->getMacroPar(idx_)->Permit(f) : MathParInset::Permit(f);
+ tmplate_->getMacroPar(idx_)->Permit(f) :
+ MathParInset::Permit(f);
}