- }
- break;
-
- // --- accented characters ---------------------------
-
- case LFUN_UMLAUT:
- case LFUN_CIRCUMFLEX:
- case LFUN_GRAVE:
- case LFUN_ACUTE:
- case LFUN_TILDE:
- case LFUN_CEDILLA:
- case LFUN_MACRON:
- case LFUN_DOT:
- case LFUN_UNDERDOT:
- case LFUN_UNDERBAR:
- case LFUN_CARON:
- case LFUN_SPECIAL_CARON:
- case LFUN_BREVE:
- case LFUN_TIE:
- case LFUN_HUNG_UMLAUT:
- case LFUN_CIRCLE:
- case LFUN_OGONEK:
- if (ev.argument.empty()) {
- // As always...
- owner_->getLyXFunc().handleKeyFunc(ev.action);
- } else {
- owner_->getLyXFunc().handleKeyFunc(ev.action);
- owner_->getIntl().getTransManager()
- .TranslateAndInsert(ev.argument[0], bv_->getLyXText());
- update();
- }
- break;
-
- case LFUN_MATH_MACRO:
- case LFUN_MATH_DELIM:
- case LFUN_INSERT_MATRIX:
- case LFUN_INSERT_MATH:
- case LFUN_MATH_IMPORT_SELECTION: // Imports LaTeX from the X selection
- case LFUN_MATH_DISPLAY: // Open or create a displayed math inset
- case LFUN_MATH_MODE: // Open or create an inlined math inset
- mathDispatch(ev);
- break;
-
- case LFUN_INSET_APPLY: {
- string const name = ev.getArg(0);
-
- InsetBase * inset = owner_->getDialogs().getOpenInset(name);
- if (inset) {
- // This works both for 'original' and 'mathed' insets.
- // Note that the localDispatch performs updateInset
- // also.
- FuncRequest fr(bv_, LFUN_INSET_MODIFY, ev.argument);
- inset->dispatch(fr);
- } else {
- FuncRequest fr(bv_, LFUN_INSET_INSERT, ev.argument);
- dispatch(fr);
- }
- }
- break;
-
- case LFUN_INSET_INSERT: {
- InsetOld * inset = createInset(ev);
- if (inset && insertInset(inset)) {
- updateInset(inset);
-
- string const name = ev.getArg(0);
- if (name == "bibitem") {
- // We need to do a redraw because the maximum
- // InsetBibitem width could have changed
-#warning check whether the update() is needed at all
- bv_->update();
- }
- } else {
- delete inset;
- }
- }
- break;
-
- case LFUN_FLOAT_LIST:
- if (tclass.floats().typeExist(ev.argument)) {
- InsetOld * inset = new InsetFloatList(ev.argument);
- if (!insertInset(inset, tclass.defaultLayoutName()))
- delete inset;
- } else {
- lyxerr << "Non-existent float type: "
- << ev.argument << endl;
- }
- break;
-
- case LFUN_LAYOUT_PARAGRAPH: {
- string data;
- params2string(*bv_->getLyXText()->cursorPar(), data);
-
- data = "show\n" + data;
- bv_->owner()->getDialogs().show("paragraph", data);
- break;
- }
-
- case LFUN_PARAGRAPH_UPDATE: {
- if (!bv_->owner()->getDialogs().visible("paragraph"))
- break;
- Paragraph const & par = *bv_->getLyXText()->cursorPar();
-
- string data;
- params2string(par, data);
-
- // Will the paragraph accept changes from the dialog?
- InsetOld * const inset = par.inInset();
- bool const accept =
- !(inset && inset->forceDefaultParagraphs(inset));
-
- data = "update " + tostr(accept) + '\n' + data;
- bv_->owner()->getDialogs().update("paragraph", data);