+2001-11-13 André Pönitz <poenitz@gmx.net>
+
+ * ui/default.ui: create a new Submenu Insert->Math, since placing
+ everything in the main insert menu seems not possible in the long
+ run...
+
2001-11-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* ui/default.ui: move math panel from Edit to Insert.
# INSERT MENU
#
Menu "insert"
- Item "Math Formula|h" "math-mode"
- Item "Display Formula|D" "math-display"
- Item "Math Panel|l" "math-panel"
- #Item "Display Formula|D" "math-mode display"
- #Item "Change to Inline Math Formula|q" "math-mutate simple"
- #Item "Change to Displayed Math Formula|q" "math-mutate equation"
- #Item "Change to Eqnarray Environment|q" "math-mutate eqnarray"
- #Item "Change to Align Environment|g" "math-mutate align"
+ Submenu "Math|h" "insert_math"
Separator
Submenu "Special Character|S" "insert_special"
Item "Citation Reference...|C" "citation-insert"
Item "Menu Separator|M" "menu-separator-insert"
End
+ Menu "insert_math"
+ Item "Inline Formula|h" "math-mode"
+ Item "Display Formula|D" "math-display"
+ Item "Eqnarray environment|E" "command-sequence math-mode; math-mutate eqnarray;"
+ Item "AMS align environment|A" "command-sequence math-mode; math-mutate align;"
+ Item "AMS alignat environment|t" "command-sequence math-mode; math-mutate alignat;"
+ Item "AMS xalignat environment|x" "command-sequence math-mode; math-mutate xalignat;"
+ Item "AMS xxalignat environment" "command-sequence math-mode; math-mutate xxalignat;"
+ Separator
+ Item "Array environment|y" "math-insert matrix 2 2"
+ Item "Cases environment|C" "math-insert cases 2"
+ Separator
+ Item "Math Panel|l" "math-panel"
+ End
+
Menu "insert_floats"
FloatInsert
End
void BufferView::Pimpl::smartQuote()
{
+ LyXText const * lt = bv_->getLyXText();
+ Paragraph const * par = lt->cursor.par();
+ Paragraph::size_type pos = lt->cursor.pos();
char c;
- LyXText * lt = bv_->getLyXText();
- if (lt->cursor.pos())
- c = lt->cursor.par()->getChar(lt->cursor.pos() - 1);
- else
+ if (!pos
+ || (par->isInset(pos - 1)
+ && par->getInset(pos - 1)->isSpace()))
c = ' ';
+ else
+ c = par->getChar(pos - 1);
+
hideCursor();
LyXLayout const & style = textclasslist.Style(
- bv_->buffer()->params.textclass,
- lt->cursor.par()->getLayout());
+ bv_->buffer()->params.textclass, par->getLayout());
if (style.pass_thru ||
(!insertInset(new InsetQuotes(c, bv_->buffer()->params))))
+2001-11-13 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * text.C (selectNextWordToSpellcheck): do not test explicitely for
+ insets which are part of a word. Paragraph::isLetter takes care of
+ that now. Use Paragraph::isInset to identify insets.
+ (selectSelectedWord): do not test for hyphenation break.
+
+ * BufferView_pimpl.C (smartQuote): use Inset::isSpace, so
+ that protected spaces are considered as spaces.
+
+ * paragraph.C (isLetter): cleanup the code for ispell extras; use
+ Inset::isLetter.
+
2001-11-12 John Levon <moz@compsoc.man.ac.uk>
* lyxserver.h:
+2001-11-13 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
+
+ * forms/form_graphics.fd: fixed shortcut clash
+ * forms/form-external.fd: added shortcut for "Apply"
+
2001-11-12 John Levon <moz@compsoc.man.ac.uk>
* FormFiledialog.C: don't reset path if new dir
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
fl_set_object_callback(obj, C_FormBaseOKCB, 0);
- fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 355, 270, 90, 30, _("Apply"));
+ {
+ char const * const dummy = N_("Apply|#A");
+ fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 355, 270, 90, 30, idex(_(dummy)));
+ fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+ }
fl_set_object_color(obj, FL_COL1, FL_BLACK);
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast);
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 230, 450, 90, _("Subcaption"));
{
- char const * const dummy = N_("Subcaption|#S");
+ char const * const dummy = N_("Subcaption|#u");
fdui->check_subcaption = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 110, 240, 30, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Apply
+label: Apply|#A
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_SouthEast FL_SouthEast
style: FL_NORMAL_STYLE
size: FL_DEFAULT_SIZE
lcol: FL_BLACK
-label: Subcaption|#S
+label: Subcaption|#u
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
+2001-11-13 Herbert Voss <voss@perce.de>
+
+ * insetgraphic.C: fix scale bug
+
+2001-11-13 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * inset.h (isSpace):
+ (isLetter): new virtual methods.
+
+ * insetspecialchar.C (isSpace):
+ (isLetter): implement here.
+
2001-11-04 John Levon <moz@compsoc.man.ac.uk>
* inset.h: new inline helpers
// needed for spellchecking text
///
virtual bool allowSpellcheck() { return false; }
+
+ // is this equivalent to a letter?
+ virtual bool isLetter() const { return false; }
+ // is this equivalent to a space?
+ virtual bool isSpace() const { return false; }
+
protected:
///
mutable int top_x;
break;
case InsetGraphicsParams::SCALE:
- os << "scale" << '=' << size << ',';
+ os << "scale" << '=' << size/100 << ',';
}
}
features.lyxarrow = true;
}
}
+
+
+bool InsetSpecialChar::isLetter() const
+{
+ return kind_ == HYPHENATION || kind_ == LIGATURE_BREAK;
+}
+
+
+bool InsetSpecialChar::isSpace() const
+{
+ return kind_ == PROTECTED_SEPARATOR;
+}
};
///
void validate(LaTeXFeatures &) const;
+ /// is this equivalent to a letter?
+ bool isLetter() const;
+ /// is this equivalent to a space?
+ bool isSpace() const;
private:
/// And which kind is this?
Kind kind_;
value_type const c = getChar(pos);
if (IsLetterChar(c))
return true;
- // '\0' is not a letter, allthough every string contains "" (below)
- if (c == '\0')
- return false;
+ if (isInset(pos))
+ return getInset(pos)->isLetter();
// We want to pass the ' and escape chars to ispell
string const extra = lyxrc.isp_esc_chars + '\'';
- char ch[2] = { c, 0 };
- return contains(extra, ch);
+ return contains(extra, c);
}
#include "support/lstrings.h"
#include "insets/insetbib.h"
#include "insets/insettext.h"
-#include "insets/insetspecialchar.h"
#include "lyx_gui_misc.h"
#include "gettext.h"
#include "bufferparams.h"
Inset * inset;
- // and find the end of the word
- // (optional hyphens are part of a word)
+ // and find the end of the word (insets like optional hyphens
+ // and ligature break are part of a word)
while (cursor.pos() < cursor.par()->size()
- && (cursor.par()->isLetter(cursor.pos()))
- // assignment is intentional here
- || ((inset = getInset())
- && inset->lyxCode() == Inset::SPECIALCHAR_CODE
- && static_cast<InsetSpecialChar *>(inset)->kind()
- == InsetSpecialChar::HYPHENATION
- ))
+ && (cursor.par()->isLetter(cursor.pos())))
cursor.pos(cursor.pos() + 1);
// Finally, we copy the word to a string and return it
if (selection.cursor.pos() < cursor.pos()) {
Paragraph::size_type i;
for (i = selection.cursor.pos(); i < cursor.pos(); ++i) {
- if (cursor.par()->getChar(i) != Paragraph::META_INSET)
+ if (!cursor.par()->isInset(i))
str += cursor.par()->getChar(i);
}
}
// now find the end of the word
while (cursor.pos() < cursor.par()->size()
- && (cursor.par()->isLetter(cursor.pos())
- // assignment is intentional here
- || ((inset = getInset())
- && inset->lyxCode() == Inset::SPECIALCHAR_CODE
- && static_cast<InsetSpecialChar *>(inset)->kind()
- == InsetSpecialChar::HYPHENATION
- )))
+ && (cursor.par()->isLetter(cursor.pos())))
cursor.pos(cursor.pos() + 1);
setCursor(bview, cursor.par(), cursor.pos());