mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
More preference work from Angus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1152 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
99083f35de
commit
db5199aa9d
@ -1,3 +1,9 @@
|
|||||||
|
2000-10-24 Angus Leeming <a.leeming@ic.ac.uk>
|
||||||
|
|
||||||
|
* src/frontends/xforms/FormPreferences.[Ch]:
|
||||||
|
* src/frontends/xforms/forms/form_preferences.fd: added spell checker,
|
||||||
|
TeX encoding and default paper size sections.
|
||||||
|
|
||||||
2000-10-24 Lars Gullik Bjønnes <larsbj@lyx.org>
|
2000-10-24 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||||
|
|
||||||
* src/frontends/xforms/FormTabularCreate.C: add missing #pragma
|
* src/frontends/xforms/FormTabularCreate.C: add missing #pragma
|
||||||
|
1
README
1
README
@ -159,6 +159,7 @@ Does LyX have support for non-English speakers/writers/readers?
|
|||||||
Greek
|
Greek
|
||||||
Hebrew
|
Hebrew
|
||||||
Hungarian (Magyar)
|
Hungarian (Magyar)
|
||||||
|
Latvian
|
||||||
Polish
|
Polish
|
||||||
Portugese
|
Portugese
|
||||||
Romanian
|
Romanian
|
||||||
|
@ -30,8 +30,8 @@ using SigC::slot;
|
|||||||
FormPreferences::FormPreferences(LyXView * lv, Dialogs * d)
|
FormPreferences::FormPreferences(LyXView * lv, Dialogs * d)
|
||||||
: FormBaseBI(lv, d, _("Preferences"), new PreferencesPolicy),
|
: FormBaseBI(lv, d, _("Preferences"), new PreferencesPolicy),
|
||||||
dialog_(0), outputs_tab_(0), look_n_feel_tab_(0), inputs_tab_(0),
|
dialog_(0), outputs_tab_(0), look_n_feel_tab_(0), inputs_tab_(0),
|
||||||
lnf_general_(0), screen_fonts_(0), interface_(0),
|
spellchecker_tab_(0), lnf_general_(0), screen_fonts_(0),
|
||||||
printer_(0), paths_(0), outputs_general_(0)
|
interface_(0), printer_(0), paths_(0), outputs_general_(0)
|
||||||
{
|
{
|
||||||
// let the dialog be shown
|
// let the dialog be shown
|
||||||
// This is a permanent connection so we won't bother
|
// This is a permanent connection so we won't bother
|
||||||
@ -46,6 +46,7 @@ FormPreferences::~FormPreferences()
|
|||||||
delete look_n_feel_tab_;
|
delete look_n_feel_tab_;
|
||||||
delete inputs_tab_;
|
delete inputs_tab_;
|
||||||
delete outputs_tab_;
|
delete outputs_tab_;
|
||||||
|
delete spellchecker_tab_;
|
||||||
delete lnf_general_;
|
delete lnf_general_;
|
||||||
delete screen_fonts_;
|
delete screen_fonts_;
|
||||||
delete interface_;
|
delete interface_;
|
||||||
@ -87,6 +88,7 @@ void FormPreferences::build()
|
|||||||
outputs_tab_ = build_outer_tab();
|
outputs_tab_ = build_outer_tab();
|
||||||
look_n_feel_tab_ = build_outer_tab();
|
look_n_feel_tab_ = build_outer_tab();
|
||||||
inputs_tab_ = build_outer_tab();
|
inputs_tab_ = build_outer_tab();
|
||||||
|
spellchecker_tab_ = build_spellchecker();
|
||||||
|
|
||||||
// build actual tabfolder contents
|
// build actual tabfolder contents
|
||||||
// these will become nested tabfolders
|
// these will become nested tabfolders
|
||||||
@ -159,6 +161,20 @@ void FormPreferences::build()
|
|||||||
// outputs general
|
// outputs general
|
||||||
fl_set_counter_return(outputs_general_->counter_line_len,
|
fl_set_counter_return(outputs_general_->counter_line_len,
|
||||||
FL_RETURN_CHANGED);
|
FL_RETURN_CHANGED);
|
||||||
|
fl_set_input_return(outputs_general_->input_tex_encoding,
|
||||||
|
FL_RETURN_CHANGED);
|
||||||
|
fl_addto_choice(outputs_general_->choice_default_papersize,
|
||||||
|
_(" default | US letter | legal | executive | A3 | A4 | A5 | B5 "));
|
||||||
|
|
||||||
|
// spell checker
|
||||||
|
fl_addto_choice(spellchecker_tab_->choice_spell_command,
|
||||||
|
_(" none | ispell | aspell "));
|
||||||
|
fl_set_input_return(spellchecker_tab_->input_alt_lang,
|
||||||
|
FL_RETURN_CHANGED);
|
||||||
|
fl_set_input_return(spellchecker_tab_->input_escape_chars,
|
||||||
|
FL_RETURN_CHANGED);
|
||||||
|
fl_set_input_return(spellchecker_tab_->input_personal_dict,
|
||||||
|
FL_RETURN_CHANGED);
|
||||||
|
|
||||||
// Now add them to the tabfolder
|
// Now add them to the tabfolder
|
||||||
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
||||||
@ -170,6 +186,9 @@ void FormPreferences::build()
|
|||||||
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
||||||
_("Outputs"),
|
_("Outputs"),
|
||||||
outputs_tab_->form);
|
outputs_tab_->form);
|
||||||
|
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
||||||
|
_("Spell checker"),
|
||||||
|
spellchecker_tab_->form);
|
||||||
|
|
||||||
// now build the nested tabfolders
|
// now build the nested tabfolders
|
||||||
// Starting with look and feel
|
// Starting with look and feel
|
||||||
@ -207,6 +226,7 @@ void FormPreferences::build()
|
|||||||
fl_deactivate_object(paths_->button_lastfiles_browse);
|
fl_deactivate_object(paths_->button_lastfiles_browse);
|
||||||
fl_deactivate_object(paths_->button_backup_path_browse);
|
fl_deactivate_object(paths_->button_backup_path_browse);
|
||||||
fl_deactivate_object(paths_->button_serverpipe_browse);
|
fl_deactivate_object(paths_->button_serverpipe_browse);
|
||||||
|
fl_deactivate_object(spellchecker_tab_->button_personal_dict);
|
||||||
fl_set_object_lcol(interface_->button_bind_file_browse, FL_INACTIVE);
|
fl_set_object_lcol(interface_->button_bind_file_browse, FL_INACTIVE);
|
||||||
fl_set_object_lcol(interface_->button_ui_file_browse, FL_INACTIVE);
|
fl_set_object_lcol(interface_->button_ui_file_browse, FL_INACTIVE);
|
||||||
fl_set_object_lcol(paths_->button_document_browse, FL_INACTIVE);
|
fl_set_object_lcol(paths_->button_document_browse, FL_INACTIVE);
|
||||||
@ -215,6 +235,7 @@ void FormPreferences::build()
|
|||||||
fl_set_object_lcol(paths_->button_lastfiles_browse, FL_INACTIVE);
|
fl_set_object_lcol(paths_->button_lastfiles_browse, FL_INACTIVE);
|
||||||
fl_set_object_lcol(paths_->button_backup_path_browse, FL_INACTIVE);
|
fl_set_object_lcol(paths_->button_backup_path_browse, FL_INACTIVE);
|
||||||
fl_set_object_lcol(paths_->button_serverpipe_browse, FL_INACTIVE);
|
fl_set_object_lcol(paths_->button_serverpipe_browse, FL_INACTIVE);
|
||||||
|
fl_set_object_lcol(spellchecker_tab_->button_personal_dict, FL_INACTIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -369,12 +390,88 @@ void FormPreferences::apply()
|
|||||||
// outputs general
|
// outputs general
|
||||||
lyxrc.ascii_linelen = static_cast<unsigned int>
|
lyxrc.ascii_linelen = static_cast<unsigned int>
|
||||||
(fl_get_counter_value(outputs_general_->counter_line_len));
|
(fl_get_counter_value(outputs_general_->counter_line_len));
|
||||||
|
lyxrc.fontenc = fl_get_input(outputs_general_->input_tex_encoding);
|
||||||
|
|
||||||
|
int choice =
|
||||||
|
fl_get_choice(outputs_general_->choice_default_papersize) - 1;
|
||||||
|
lyxrc.default_papersize = static_cast<BufferParams::PAPER_SIZE>(choice);
|
||||||
|
|
||||||
|
applySpellChecker();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FormPreferences::applySpellChecker()
|
||||||
|
{
|
||||||
|
|
||||||
|
string choice = "none";
|
||||||
|
switch(fl_get_choice(spellchecker_tab_->choice_spell_command)) {
|
||||||
|
case 1:
|
||||||
|
choice = "none";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
choice = "ispell";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
choice = "aspell";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
lyxrc.isp_command = choice;
|
||||||
|
|
||||||
|
// If spell checker == "none", all other input set to off.
|
||||||
|
if( fl_get_choice(spellchecker_tab_->choice_spell_command) == 1 ) {
|
||||||
|
lyxrc.isp_use_alt_lang = false;
|
||||||
|
lyxrc.isp_alt_lang.erase();
|
||||||
|
|
||||||
|
lyxrc.isp_use_esc_chars = false;
|
||||||
|
lyxrc.isp_esc_chars.erase();
|
||||||
|
|
||||||
|
lyxrc.isp_use_pers_dict = false;
|
||||||
|
lyxrc.isp_pers_dict.erase();
|
||||||
|
|
||||||
|
lyxrc.isp_accept_compound = false;
|
||||||
|
lyxrc.isp_use_input_encoding = false;
|
||||||
|
} else {
|
||||||
|
int button = fl_get_button(spellchecker_tab_->check_alt_lang);
|
||||||
|
choice = fl_get_input(spellchecker_tab_->input_alt_lang);
|
||||||
|
if( button && choice.empty() ) button = 0;
|
||||||
|
if( !button ) choice.erase();
|
||||||
|
|
||||||
|
lyxrc.isp_use_alt_lang = static_cast<bool>(button);
|
||||||
|
lyxrc.isp_alt_lang = choice;
|
||||||
|
|
||||||
|
button = fl_get_button(spellchecker_tab_->check_escape_chars);
|
||||||
|
choice = fl_get_input(spellchecker_tab_->input_escape_chars);
|
||||||
|
if( button && choice.empty() ) button = 0;
|
||||||
|
if( !button ) choice.erase();
|
||||||
|
|
||||||
|
lyxrc.isp_use_esc_chars = static_cast<bool>(button);
|
||||||
|
lyxrc.isp_esc_chars = choice;
|
||||||
|
|
||||||
|
button = fl_get_button(spellchecker_tab_->check_personal_dict);
|
||||||
|
choice = fl_get_input(spellchecker_tab_->input_personal_dict);
|
||||||
|
if( button && choice.empty() ) button = 0;
|
||||||
|
if( !button ) choice.erase();
|
||||||
|
|
||||||
|
lyxrc.isp_use_pers_dict = static_cast<bool>(button);
|
||||||
|
lyxrc.isp_pers_dict = choice;
|
||||||
|
|
||||||
|
button = fl_get_button(spellchecker_tab_->check_compound_words);
|
||||||
|
lyxrc.isp_accept_compound = static_cast<bool>(button);
|
||||||
|
|
||||||
|
button = fl_get_button(spellchecker_tab_->check_input_enc);
|
||||||
|
lyxrc.isp_use_input_encoding = static_cast<bool>(button);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateSpellChecker();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FormPreferences::update()
|
void FormPreferences::update()
|
||||||
{
|
{
|
||||||
if (dialog_) {
|
if (!dialog_) return;
|
||||||
|
|
||||||
// read lyxrc entries
|
// read lyxrc entries
|
||||||
// Lnf_General tab
|
// Lnf_General tab
|
||||||
fl_set_button(lnf_general_->check_banner,
|
fl_set_button(lnf_general_->check_banner,
|
||||||
@ -499,8 +596,55 @@ void FormPreferences::update()
|
|||||||
// outputs general
|
// outputs general
|
||||||
fl_set_counter_value(outputs_general_->counter_line_len,
|
fl_set_counter_value(outputs_general_->counter_line_len,
|
||||||
lyxrc.ascii_linelen);
|
lyxrc.ascii_linelen);
|
||||||
|
fl_set_input(outputs_general_->input_tex_encoding,
|
||||||
|
lyxrc.fontenc.c_str());
|
||||||
|
fl_set_choice(outputs_general_->choice_default_papersize,
|
||||||
|
lyxrc.default_papersize+1);
|
||||||
|
|
||||||
}
|
updateSpellChecker();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FormPreferences::updateSpellChecker()
|
||||||
|
{
|
||||||
|
int choice = 1;
|
||||||
|
if( lyxrc.isp_command == "none" )
|
||||||
|
choice = 1;
|
||||||
|
else if( lyxrc.isp_command == "ispell" )
|
||||||
|
choice = 2;
|
||||||
|
else if( lyxrc.isp_command == "aspell" )
|
||||||
|
choice = 3;
|
||||||
|
fl_set_choice(spellchecker_tab_->choice_spell_command, choice);
|
||||||
|
|
||||||
|
string str = string();
|
||||||
|
if( lyxrc.isp_use_alt_lang ) str = lyxrc.isp_alt_lang;
|
||||||
|
|
||||||
|
fl_set_button(spellchecker_tab_->check_alt_lang,
|
||||||
|
lyxrc.isp_use_alt_lang);
|
||||||
|
fl_set_input(spellchecker_tab_->input_alt_lang, str.c_str());
|
||||||
|
|
||||||
|
str = string();
|
||||||
|
if( lyxrc.isp_use_esc_chars ) str = lyxrc.isp_esc_chars;
|
||||||
|
|
||||||
|
fl_set_button(spellchecker_tab_->check_escape_chars,
|
||||||
|
lyxrc.isp_use_esc_chars);
|
||||||
|
fl_set_input(spellchecker_tab_->input_escape_chars, str.c_str());
|
||||||
|
|
||||||
|
str = string();
|
||||||
|
if( lyxrc.isp_use_pers_dict ) str = lyxrc.isp_pers_dict;
|
||||||
|
|
||||||
|
fl_set_button(spellchecker_tab_->check_personal_dict,
|
||||||
|
lyxrc.isp_use_pers_dict);
|
||||||
|
fl_set_input(spellchecker_tab_->input_personal_dict, str.c_str());
|
||||||
|
|
||||||
|
fl_set_button(spellchecker_tab_->check_compound_words,
|
||||||
|
lyxrc.isp_accept_compound);
|
||||||
|
fl_set_button(spellchecker_tab_->check_input_enc,
|
||||||
|
lyxrc.isp_use_input_encoding);
|
||||||
|
|
||||||
|
// Activate/Deactivate the input fields dependent on the state of the
|
||||||
|
// buttons.
|
||||||
|
inputSpellChecker();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -629,10 +773,70 @@ bool FormPreferences::input(FL_OBJECT *, long)
|
|||||||
lyxerr[Debug::GUI] << "Preferences: Sizes are wrong\n";
|
lyxerr[Debug::GUI] << "Preferences: Sizes are wrong\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( ! inputSpellChecker() )
|
||||||
|
activate = false;
|
||||||
|
|
||||||
return activate;
|
return activate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool FormPreferences::inputSpellChecker()
|
||||||
|
{
|
||||||
|
// Allow/dissallow input
|
||||||
|
|
||||||
|
// If spell checker == "none", disable all input.
|
||||||
|
if( fl_get_choice(spellchecker_tab_->choice_spell_command) == 1 ) {
|
||||||
|
fl_deactivate_object( spellchecker_tab_->check_alt_lang );
|
||||||
|
fl_deactivate_object( spellchecker_tab_->input_alt_lang );
|
||||||
|
fl_deactivate_object( spellchecker_tab_->check_escape_chars );
|
||||||
|
fl_deactivate_object( spellchecker_tab_->input_escape_chars );
|
||||||
|
fl_deactivate_object( spellchecker_tab_->check_personal_dict );
|
||||||
|
fl_deactivate_object( spellchecker_tab_->input_personal_dict );
|
||||||
|
fl_deactivate_object( spellchecker_tab_->check_compound_words );
|
||||||
|
fl_deactivate_object( spellchecker_tab_->check_input_enc );
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
fl_activate_object( spellchecker_tab_->check_alt_lang );
|
||||||
|
fl_activate_object( spellchecker_tab_->check_escape_chars );
|
||||||
|
fl_activate_object( spellchecker_tab_->check_personal_dict );
|
||||||
|
fl_activate_object( spellchecker_tab_->check_compound_words );
|
||||||
|
fl_activate_object( spellchecker_tab_->check_input_enc );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( fl_get_button(spellchecker_tab_->check_alt_lang) ) {
|
||||||
|
fl_activate_object(spellchecker_tab_->input_alt_lang);
|
||||||
|
fl_set_object_lcol(spellchecker_tab_->input_alt_lang,
|
||||||
|
FL_BLACK);
|
||||||
|
} else {
|
||||||
|
fl_deactivate_object(spellchecker_tab_->input_alt_lang);
|
||||||
|
fl_set_object_lcol(spellchecker_tab_->input_alt_lang,
|
||||||
|
FL_INACTIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( fl_get_button(spellchecker_tab_->check_escape_chars) ) {
|
||||||
|
fl_activate_object(spellchecker_tab_->input_escape_chars);
|
||||||
|
fl_set_object_lcol(spellchecker_tab_->input_escape_chars,
|
||||||
|
FL_BLACK);
|
||||||
|
} else {
|
||||||
|
fl_deactivate_object(spellchecker_tab_->input_escape_chars);
|
||||||
|
fl_set_object_lcol(spellchecker_tab_->input_escape_chars,
|
||||||
|
FL_INACTIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( fl_get_button(spellchecker_tab_->check_personal_dict) ) {
|
||||||
|
fl_activate_object(spellchecker_tab_->input_personal_dict);
|
||||||
|
fl_set_object_lcol(spellchecker_tab_->input_personal_dict,
|
||||||
|
FL_BLACK);
|
||||||
|
} else {
|
||||||
|
fl_deactivate_object(spellchecker_tab_->input_personal_dict);
|
||||||
|
fl_set_object_lcol(spellchecker_tab_->input_personal_dict,
|
||||||
|
FL_INACTIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true; // all input is valid!
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void FormPreferences::ok()
|
void FormPreferences::ok()
|
||||||
{
|
{
|
||||||
FormBase::ok();
|
FormBase::ok();
|
||||||
|
@ -34,6 +34,7 @@ struct FD_form_printer;
|
|||||||
struct FD_form_paths;
|
struct FD_form_paths;
|
||||||
struct FD_form_outer_tab;
|
struct FD_form_outer_tab;
|
||||||
struct FD_form_outputs_general;
|
struct FD_form_outputs_general;
|
||||||
|
struct FD_form_spellchecker;
|
||||||
|
|
||||||
/** This class provides an XForms implementation of the FormPreferences Dialog.
|
/** This class provides an XForms implementation of the FormPreferences Dialog.
|
||||||
The preferences dialog allows users to set/save their preferences.
|
The preferences dialog allows users to set/save their preferences.
|
||||||
@ -62,6 +63,12 @@ private:
|
|||||||
///
|
///
|
||||||
virtual FL_FORM * form() const;
|
virtual FL_FORM * form() const;
|
||||||
///
|
///
|
||||||
|
void applySpellChecker();
|
||||||
|
///
|
||||||
|
void updateSpellChecker();
|
||||||
|
///
|
||||||
|
bool inputSpellChecker();
|
||||||
|
///
|
||||||
FD_form_preferences * build_preferences();
|
FD_form_preferences * build_preferences();
|
||||||
///
|
///
|
||||||
FD_form_outer_tab * build_outer_tab();
|
FD_form_outer_tab * build_outer_tab();
|
||||||
@ -77,6 +84,8 @@ private:
|
|||||||
FD_form_paths * build_paths();
|
FD_form_paths * build_paths();
|
||||||
///
|
///
|
||||||
FD_form_outputs_general * build_outputs_general();
|
FD_form_outputs_general * build_outputs_general();
|
||||||
|
///
|
||||||
|
FD_form_spellchecker * build_spellchecker();
|
||||||
|
|
||||||
/// Real GUI implementation.
|
/// Real GUI implementation.
|
||||||
FD_form_preferences * dialog_;
|
FD_form_preferences * dialog_;
|
||||||
@ -87,6 +96,8 @@ private:
|
|||||||
/// reLyX and other import/input stuff
|
/// reLyX and other import/input stuff
|
||||||
FD_form_outer_tab * inputs_tab_;
|
FD_form_outer_tab * inputs_tab_;
|
||||||
///
|
///
|
||||||
|
FD_form_spellchecker * spellchecker_tab_;
|
||||||
|
///
|
||||||
FD_form_lnf_general * lnf_general_;
|
FD_form_lnf_general * lnf_general_;
|
||||||
///
|
///
|
||||||
FD_form_screen_fonts * screen_fonts_;
|
FD_form_screen_fonts * screen_fonts_;
|
||||||
|
@ -449,6 +449,68 @@ FD_form_outputs_general * FormPreferences::build_outputs_general()
|
|||||||
fl_set_counter_bounds(obj, 0, 120);
|
fl_set_counter_bounds(obj, 0, 120);
|
||||||
fl_set_counter_value(obj, 75);
|
fl_set_counter_value(obj, 75);
|
||||||
fl_set_counter_step(obj, 1, 1);
|
fl_set_counter_step(obj, 1, 1);
|
||||||
|
fdui->input_tex_encoding = obj = fl_add_input(FL_NORMAL_INPUT, 216, 95, 200, 30, _("TeX encoding"));
|
||||||
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
|
fdui->choice_default_papersize = obj = fl_add_choice(FL_NORMAL_CHOICE, 217, 142, 199, 29, _("Default paper size"));
|
||||||
|
fl_set_object_boxtype(obj, FL_FRAME_BOX);
|
||||||
|
fl_end_form();
|
||||||
|
|
||||||
|
fdui->form->fdui = fdui;
|
||||||
|
|
||||||
|
return fdui;
|
||||||
|
}
|
||||||
|
/*---------------------------------------*/
|
||||||
|
|
||||||
|
FD_form_spellchecker::~FD_form_spellchecker()
|
||||||
|
{
|
||||||
|
if( form->visible ) fl_hide_form( form );
|
||||||
|
fl_free_form( form );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FD_form_spellchecker * FormPreferences::build_spellchecker()
|
||||||
|
{
|
||||||
|
FL_OBJECT *obj;
|
||||||
|
FD_form_spellchecker *fdui = new FD_form_spellchecker;
|
||||||
|
|
||||||
|
fdui->form = fl_bgn_form(FL_NO_BOX, 450, 320);
|
||||||
|
fdui->form->u_vdata = this;
|
||||||
|
obj = fl_add_box(FL_FLAT_BOX, 0, 0, 450, 320, "");
|
||||||
|
fdui->choice_spell_command = obj = fl_add_choice(FL_NORMAL_CHOICE, 141, 47, 171, 34, _("Spell command"));
|
||||||
|
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, C_FormBaseInputCB, 0);
|
||||||
|
fdui->check_alt_lang = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 208, 100, 30, 30, _("Use alternative language"));
|
||||||
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
|
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
|
fdui->input_alt_lang = obj = fl_add_input(FL_NORMAL_INPUT, 239, 100, 170, 30, "");
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
|
fdui->check_escape_chars = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 208, 130, 30, 30, _("Use escape characters"));
|
||||||
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
|
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
|
fdui->input_escape_chars = obj = fl_add_input(FL_NORMAL_INPUT, 239, 130, 170, 30, "");
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
|
fdui->check_personal_dict = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 208, 160, 30, 30, _("Use personal dictionary"));
|
||||||
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
|
fl_set_object_lalign(obj, FL_ALIGN_LEFT);
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
|
fdui->input_personal_dict = obj = fl_add_input(FL_NORMAL_INPUT, 239, 160, 170, 30, "");
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
|
fdui->button_personal_dict = obj = fl_add_button(FL_NORMAL_BUTTON, 239, 190, 89, 30, _("Browse..."));
|
||||||
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
|
fdui->check_compound_words = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 130, 230, 30, 30, _("Accept compound words"));
|
||||||
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
|
fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
|
fdui->check_input_enc = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 130, 260, 30, 30, _("Use input encoding"));
|
||||||
|
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||||
|
fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
|
||||||
|
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
|
||||||
fl_end_form();
|
fl_end_form();
|
||||||
|
|
||||||
fdui->form->fdui = fdui;
|
fdui->form->fdui = fdui;
|
||||||
|
@ -21,6 +21,8 @@ extern "C" void C_FormBaseOKCB(FL_OBJECT *, long);
|
|||||||
extern "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
|
extern "C" void C_FormBaseRestoreCB(FL_OBJECT *, long);
|
||||||
|
|
||||||
|
|
||||||
|
extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
|
||||||
|
|
||||||
extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
|
extern "C" void C_FormBaseInputCB(FL_OBJECT *, long);
|
||||||
|
|
||||||
|
|
||||||
@ -138,6 +140,23 @@ struct FD_form_outputs_general {
|
|||||||
|
|
||||||
FL_FORM *form;
|
FL_FORM *form;
|
||||||
FL_OBJECT *counter_line_len;
|
FL_OBJECT *counter_line_len;
|
||||||
|
FL_OBJECT *input_tex_encoding;
|
||||||
|
FL_OBJECT *choice_default_papersize;
|
||||||
|
};
|
||||||
|
struct FD_form_spellchecker {
|
||||||
|
~FD_form_spellchecker();
|
||||||
|
|
||||||
|
FL_FORM *form;
|
||||||
|
FL_OBJECT *choice_spell_command;
|
||||||
|
FL_OBJECT *check_alt_lang;
|
||||||
|
FL_OBJECT *input_alt_lang;
|
||||||
|
FL_OBJECT *check_escape_chars;
|
||||||
|
FL_OBJECT *input_escape_chars;
|
||||||
|
FL_OBJECT *check_personal_dict;
|
||||||
|
FL_OBJECT *input_personal_dict;
|
||||||
|
FL_OBJECT *button_personal_dict;
|
||||||
|
FL_OBJECT *check_compound_words;
|
||||||
|
FL_OBJECT *check_input_enc;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FD_form_lnf_general_h_ */
|
#endif /* FD_form_lnf_general_h_ */
|
||||||
|
@ -3,7 +3,7 @@ Magic: 13000
|
|||||||
Internal Form Definition File
|
Internal Form Definition File
|
||||||
(do not change)
|
(do not change)
|
||||||
|
|
||||||
Number of forms: 8
|
Number of forms: 9
|
||||||
Unit of measure: FL_COORD_PIXEL
|
Unit of measure: FL_COORD_PIXEL
|
||||||
SnapGrid: 1
|
SnapGrid: 1
|
||||||
|
|
||||||
@ -1556,7 +1556,7 @@ argument:
|
|||||||
Name: form_outputs_general
|
Name: form_outputs_general
|
||||||
Width: 455
|
Width: 455
|
||||||
Height: 345
|
Height: 345
|
||||||
Number of Objects: 2
|
Number of Objects: 4
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BOX
|
class: FL_BOX
|
||||||
@ -1598,5 +1598,245 @@ argument: 0
|
|||||||
value: 75
|
value: 75
|
||||||
sstep: 1
|
sstep: 1
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_INPUT
|
||||||
|
type: NORMAL_INPUT
|
||||||
|
box: 216 95 200 30
|
||||||
|
boxtype: FL_DOWN_BOX
|
||||||
|
colors: FL_COL1 FL_MCOL
|
||||||
|
alignment: FL_ALIGN_LEFT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_NORMAL_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: TeX encoding
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: input_tex_encoding
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_CHOICE
|
||||||
|
type: NORMAL_CHOICE
|
||||||
|
box: 217 142 199 29
|
||||||
|
boxtype: FL_FRAME_BOX
|
||||||
|
colors: FL_COL1 FL_BLACK
|
||||||
|
alignment: FL_ALIGN_LEFT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_DEFAULT_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Default paper size
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: choice_default_papersize
|
||||||
|
callback:
|
||||||
|
argument:
|
||||||
|
|
||||||
|
=============== FORM ===============
|
||||||
|
Name: form_spellchecker
|
||||||
|
Width: 450
|
||||||
|
Height: 320
|
||||||
|
Number of Objects: 11
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_BOX
|
||||||
|
type: FLAT_BOX
|
||||||
|
box: 0 0 450 320
|
||||||
|
boxtype: FL_FLAT_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_NoGravity FL_NoGravity
|
||||||
|
name:
|
||||||
|
callback:
|
||||||
|
argument:
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_CHOICE
|
||||||
|
type: NORMAL_CHOICE
|
||||||
|
box: 141 47 171 34
|
||||||
|
boxtype: FL_FRAME_BOX
|
||||||
|
colors: FL_COL1 FL_BLACK
|
||||||
|
alignment: FL_ALIGN_TOP
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_NORMAL_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Spell command
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: choice_spell_command
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_CHECKBUTTON
|
||||||
|
type: PUSH_BUTTON
|
||||||
|
box: 208 100 30 30
|
||||||
|
boxtype: FL_NO_BOX
|
||||||
|
colors: FL_COL1 FL_YELLOW
|
||||||
|
alignment: FL_ALIGN_LEFT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_NORMAL_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Use alternative language
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: check_alt_lang
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_INPUT
|
||||||
|
type: NORMAL_INPUT
|
||||||
|
box: 239 100 170 30
|
||||||
|
boxtype: FL_DOWN_BOX
|
||||||
|
colors: FL_COL1 FL_MCOL
|
||||||
|
alignment: FL_ALIGN_LEFT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_DEFAULT_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label:
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: input_alt_lang
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_CHECKBUTTON
|
||||||
|
type: PUSH_BUTTON
|
||||||
|
box: 208 130 30 30
|
||||||
|
boxtype: FL_NO_BOX
|
||||||
|
colors: FL_COL1 FL_YELLOW
|
||||||
|
alignment: FL_ALIGN_LEFT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_NORMAL_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Use escape characters
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: check_escape_chars
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_INPUT
|
||||||
|
type: NORMAL_INPUT
|
||||||
|
box: 239 130 170 30
|
||||||
|
boxtype: FL_DOWN_BOX
|
||||||
|
colors: FL_COL1 FL_MCOL
|
||||||
|
alignment: FL_ALIGN_LEFT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_DEFAULT_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label:
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: input_escape_chars
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_CHECKBUTTON
|
||||||
|
type: PUSH_BUTTON
|
||||||
|
box: 208 160 30 30
|
||||||
|
boxtype: FL_NO_BOX
|
||||||
|
colors: FL_COL1 FL_YELLOW
|
||||||
|
alignment: FL_ALIGN_LEFT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_NORMAL_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Use personal dictionary
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: check_personal_dict
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_INPUT
|
||||||
|
type: NORMAL_INPUT
|
||||||
|
box: 239 160 170 30
|
||||||
|
boxtype: FL_DOWN_BOX
|
||||||
|
colors: FL_COL1 FL_MCOL
|
||||||
|
alignment: FL_ALIGN_LEFT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_DEFAULT_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label:
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: input_personal_dict
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_BUTTON
|
||||||
|
type: NORMAL_BUTTON
|
||||||
|
box: 239 190 89 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: Browse...
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: button_personal_dict
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_CHECKBUTTON
|
||||||
|
type: PUSH_BUTTON
|
||||||
|
box: 130 230 30 30
|
||||||
|
boxtype: FL_NO_BOX
|
||||||
|
colors: FL_COL1 FL_YELLOW
|
||||||
|
alignment: FL_ALIGN_RIGHT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_NORMAL_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Accept compound words
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: check_compound_words
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_CHECKBUTTON
|
||||||
|
type: PUSH_BUTTON
|
||||||
|
box: 130 260 30 30
|
||||||
|
boxtype: FL_NO_BOX
|
||||||
|
colors: FL_COL1 FL_YELLOW
|
||||||
|
alignment: FL_ALIGN_RIGHT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_NORMAL_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Use input encoding
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: check_input_enc
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
==============================
|
==============================
|
||||||
create_the_forms
|
create_the_forms
|
||||||
|
Loading…
Reference in New Issue
Block a user