/* This file is part of * ====================================================== * * LyX, The Document Processor * * Copyright (C) 1995 Matthias Ettrich * Copyright (C) 1995-1998 The LyX Team. *
* ====================================================== */
// this is crappy... why are those colors command line arguments and // not in lyxrc?? (Matthias) // Because nobody put them there. (Asger) externint fast_selection; extern LString background_color; externchar selection_color[]; externbool cursor_follows_scrollbar; extern kb_keymap *toplevel_keymap; extern LyXAction lyxaction;
case RC_PS_COMMAND: if (lexrc.next())
ps_command = lexrc.GetString(); break;
case RC_VIEWPS_COMMAND: if (lexrc.next())
view_ps_command = lexrc.GetString(); break;
case RC_VIEWPSPIC_COMMAND: if (lexrc.next())
view_pspic_command = lexrc.GetString(); break;
case RC_CHKTEX_COMMAND: if (lexrc.next())
chktex_command = lexrc.GetString(); break;
case RC_SCREEN_DPI: if (lexrc.next())
dpi = lexrc.GetInteger(); break;
case RC_SCREEN_ZOOM: if (lexrc.next())
zoom = lexrc.GetInteger(); break;
case RC_SCREEN_FONT_SIZES: if (lexrc.next())
font_sizes[LyXFont::SIZE_TINY] =
lexrc.GetFloat(); if (lexrc.next())
font_sizes[LyXFont::SIZE_SCRIPT] =
lexrc.GetFloat(); if (lexrc.next())
font_sizes[LyXFont::SIZE_FOOTNOTE] =
lexrc.GetFloat(); if (lexrc.next())
font_sizes[LyXFont::SIZE_SMALL] =
lexrc.GetFloat(); if (lexrc.next())
font_sizes[LyXFont::SIZE_NORMAL] =
lexrc.GetFloat(); if (lexrc.next())
font_sizes[LyXFont::SIZE_LARGE] =
lexrc.GetFloat(); if (lexrc.next())
font_sizes[LyXFont::SIZE_LARGER] =
lexrc.GetFloat(); if (lexrc.next())
font_sizes[LyXFont::SIZE_LARGEST] =
lexrc.GetFloat(); if (lexrc.next())
font_sizes[LyXFont::SIZE_HUGE] =
lexrc.GetFloat(); if (lexrc.next())
font_sizes[LyXFont::SIZE_HUGER] =
lexrc.GetFloat(); break;
case RC_SCREEN_FONT_SCALABLE: if (lexrc.next())
use_scalable_fonts = lexrc.GetBool(); break;
case RC_AUTOSAVE: if (lexrc.next())
autosave = lexrc.GetInteger(); break;
case RC_SGML_EXTRA_OPTIONS: if (lexrc.next())
sgml_extra_options = lexrc.GetString(); break;
case RC_DOCUMENTPATH: if (lexrc.next()) {
document_path = ExpandPath(lexrc.GetString());
} break;
case RC_TEMPLATEPATH: if (lexrc.next())
template_path = ExpandPath(lexrc.GetString()); break;
case RC_TEMPDIRPATH: if (lexrc.next())
tempdir_path = ExpandPath(lexrc.GetString()); break;
case RC_USETEMPDIR: if (lexrc.next())
use_tempdir = lexrc.GetBool(); break;
case RC_LASTFILES: if (lexrc.next())
lastfiles = ExpandPath(lexrc.GetString()); break;
case RC_NUMLASTFILES: if (lexrc.next())
num_lastfiles = lexrc.GetInteger(); break;
case RC_CHECKLASTFILES: if (lexrc.next())
check_lastfiles = lexrc.GetBool(); break;
case RC_SCREEN_FONT_ROMAN: if (lexrc.next())
roman_font_name = lexrc.GetString(); break;
case RC_SCREEN_FONT_SANS: if (lexrc.next())
sans_font_name = lexrc.GetString(); break;
case RC_SCREEN_FONT_TYPEWRITER: if (lexrc.next())
typewriter_font_name = lexrc.GetString(); break;
case RC_SCREEN_FONT_MENU: if (lexrc.next())
menu_font_name = lexrc.GetString(); break;
case RC_SCREEN_FONT_POPUP: if (lexrc.next())
popup_font_name = lexrc.GetString(); break;
case RC_SCREEN_FONT_ENCODING: if (lexrc.next())
font_norm = lexrc.GetString(); break;
case RC_AUTOREGIONDELETE: // Auto region delete defaults to true if (lexrc.next())
auto_region_delete = lexrc.GetBool(); break;
case RC_BIND:
{ // we should not do an explicit binding before // loading a bind file. So, in this case, load // the default bind file. if (!hasBindFile)
ReadBindFile();
if ((action = lyxaction.LookupFunc(cmd.c_str()))>=0) { if (lyxerr.debugging(Error::KEY)) {
lyxerr.print("RC_BIND: Sequence `"
+ seq + "' Command `"
+ cmd + "' Action `"
+ (int) action + '\'');
}
res = bindKey(seq.c_str(), action); if (res != 0) {
lexrc.printError( "Invalid key sequence `"
+ seq + '\'');
}
} else {// cmd is the last token read.
lexrc.printError( "Unknown LyX function `$$Token'");
} break;
} case RC_SERVERPIPE: if (lexrc.next())
lyxpipes = ExpandPath(lexrc.GetString()); break;
case RC_CURSOR_FOLLOWS_SCROLLBAR: if (lexrc.next())
cursor_follows_scrollbar = lexrc.GetBool(); break; case RC_FAST_SELECTION: if (lexrc.next())
fast_selection = lexrc.GetBool(); break; case RC_BACKGROUND_COLOR: if (lexrc.next())
background_color = lexrc.GetString(); break; case RC_SELECTION_COLOR: if (lexrc.next())
strncpy(selection_color,
lexrc.GetString().c_str(),31); break; case RC_FAX_COMMAND: if (lexrc.next())
fax_command = lexrc.GetString(); break; case RC_FAXPROGRAM: if (lexrc.next())
fax_program = lexrc.GetString(); break; case RC_PHONEBOOK: if (lexrc.next()) {
LString s = lexrc.GetString(); if (AbsolutePath(s))
phone_book = s; else
phone_book = user_lyxdir + s;
} break; case RC_ASCIIROFF_COMMAND: if (lexrc.next())
ascii_roff_command = lexrc.GetString(); break; case RC_ASCII_LINELEN: if (lexrc.next())
ascii_linelen = lexrc.GetInteger(); break; // Spellchecker settings: case RC_SPELL_COMMAND: if (lexrc.next())
isp_command = lexrc.GetString(); break; case RC_ACCEPT_COMPOUND: if (lexrc.next())
isp_accept_compound = lexrc.GetBool(); break; case RC_USE_INP_ENC: if (lexrc.next())
isp_use_input_encoding = lexrc.GetBool(); break; case RC_USE_ALT_LANG: if (lexrc.next())
isp_use_alt_lang = lexrc.GetBool(); break; case RC_USE_PERS_DICT: if (lexrc.next())
isp_use_pers_dict = lexrc.GetBool(); break; case RC_USE_ESC_CHARS: if (lexrc.next())
isp_use_esc_chars = lexrc.GetBool(); break; case RC_ALT_LANG: if (lexrc.next())
isp_alt_lang = lexrc.GetString(); break; case RC_PERS_DICT: if (lexrc.next())
isp_pers_dict = lexrc.GetString(); break; case RC_ESC_CHARS: if (lexrc.next())
isp_esc_chars = lexrc.GetString(); break;
default:
lexrc.printError("Unknown tag `$$Token'"); break;
}
}
return 0;
}
void LyXRC::Print()
{
lyxerr.print("The current internal LyXRC:");
}
/// define the default key bindings for LyX. void LyXRC::defaultKeyBindings()
{
bindKey("Right", LFUN_RIGHT);
bindKey("Left", LFUN_LEFT);
bindKey("Up", LFUN_UP);
bindKey("Down", LFUN_DOWN);
bindKey("Delete", LFUN_DELETE);
bindKey("BackSpace", LFUN_BACKSPACE); // bindKeyings for transparent handling of deadkeys // The keysyms are gotten from XFree86 X11R6
bindKey("~C-~S-~M-dead_acute", LFUN_ACUTE);
bindKey("~C-~S-~M-dead_breve", LFUN_BREVE);
bindKey("~C-~S-~M-dead_caron", LFUN_CARON);
bindKey("~C-~S-~M-dead_cedilla", LFUN_CEDILLA);
bindKey("~C-~S-~M-dead_abovering", LFUN_CIRCLE);
bindKey("~C-~S-~M-dead_circumflex", LFUN_CIRCUMFLEX);
bindKey("~C-~S-~M-dead_abovedot", LFUN_DOT);
bindKey("~C-~S-~M-dead_grave", LFUN_GRAVE);
bindKey("~C-~S-~M-dead_doubleacute", LFUN_HUNG_UMLAUT);
bindKey("~C-~S-~M-dead_macron", LFUN_MACRON); // nothing with this name // bindKey("~C-~S-~M-dead_special_caron", LFUN_SPECIAL_CARON);
bindKey("~C-~S-~M-dead_tilde", LFUN_TILDE);
bindKey("~C-~S-~M-dead_diaeresis", LFUN_UMLAUT); // nothing with this name either... //bindKey("~C-~S-~M-dead_underbar", LFUN_UNDERBAR);
bindKey("~C-~S-~M-dead_belowdot", LFUN_UNDERDOT);
bindKey("~C-~S-~M-dead_tie", LFUN_TIE);
bindKey("~C-~S-~M-dead_ogonek", LFUN_OGONEK);
// bindings to utilize the use of the numeric keypad // e.g. Num Lock set
bindKey("KP_0", LFUN_SELFINSERT);
bindKey("KP_Decimal", LFUN_SELFINSERT);
bindKey("KP_Enter", LFUN_SELFINSERT);
bindKey("KP_1", LFUN_SELFINSERT);
bindKey("KP_2", LFUN_SELFINSERT);
bindKey("KP_3", LFUN_SELFINSERT);
bindKey("KP_4", LFUN_SELFINSERT);
bindKey("KP_5", LFUN_SELFINSERT);
bindKey("KP_6", LFUN_SELFINSERT);
bindKey("KP_Add", LFUN_SELFINSERT);
bindKey("KP_7", LFUN_SELFINSERT);
bindKey("KP_8", LFUN_SELFINSERT);
bindKey("KP_9", LFUN_SELFINSERT);
bindKey("KP_Divide", LFUN_SELFINSERT);
bindKey("KP_Multiply", LFUN_SELFINSERT);
bindKey("KP_Subtract", LFUN_SELFINSERT);
/* Most self-insert keys are handled in the 'default:' section of * WorkAreaKeyPress - so we don't have to define them all. * However keys explicit decleared as self-insert are
* handled seperatly (LFUN_SELFINSERT.) Lgb. */
bindKey("C-Tab", LFUN_TABINSERT); // ale970515
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.3Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.