+2000-06-22 Juergen Vigna <jug@sad.it>
+
+ * src/mathed/formulamacro.[Ch]:
+ * src/mathed/formula.[Ch]: changed prototype of draw() and GetCursorPos
+
2000-06-21 Juergen Vigna <jug@sad.it>
* src/text.C (GetVisibleRow): look if I should clear the area or not
* src/text2.C (UpdateInset): return bool insted of int
+2000-06-20 Dekel Tsur <dekel@math.tau.ac.il>
+
+ * src/lyx_gui.C (create_forms): Add "Reset" option to the language
+ combox in the character popup
+
+ * src/lyx_cb.C (UserFreeFont): Add argument to the method:
+ BufferParams const & params
+
2000-06-20 Juergen Vigna <jug@sad.it>
* src/insets/insettext.C (SetParagraphData): set insetowner on
void Free(BufferView * bv)
{
- ToggleAndShow(bv, UserFreeFont());
+ ToggleAndShow(bv, UserFreeFont(bv->buffer()->params));
}
// 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 UserFreeFont()
+LyXFont UserFreeFont(BufferParams const & params)
{
LyXFont font(LyXFont::ALL_IGNORE);
case 11: font.setColor(LColor::inherit); break;
}
- string language = combo_language2->getline();
- Languages::iterator lit = languages.find(language);
- if (lit != languages.end())
- font.setLanguage(&(*lit).second);
- else
- font.setLanguage(ignore_language);
-
+ int choice = combo_language2->get();
+ if (choice == 1)
+ font.setLanguage(ignore_language);
+ else if (choice == 2)
+ font.setLanguage(params.language_info);
+ else
+ font.setLanguage(&languages[combo_language2->getline()]);
return font;
}
-
-
/* callbacks for form form_title */
extern "C" void TimerCB(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());
+ ToggleAndShow(current_view, UserFreeFont(current_view->buffer()->params));
current_view->setState();
toggleall = true;
}
#ifndef LYX_CB_H
#define LYX_CB_H
+class BufferParams;
+
///
extern bool quitting;
extern bool toggleall;
// When still false after reading lyxrc, warn user
//about failing \bind_file command. RVDK_PATCH_5
extern bool BindFileSet;
-extern LyXFont UserFreeFont();
+extern LyXFont UserFreeFont(BufferParams const & params);
#endif
// "default" is not part of the languages array any more.
combo_language->addto("default");
- combo_language2->addto("No change");
+ combo_language2->addto(_("No change"));
+ combo_language2->addto(_("Reset"));
for(Languages::const_iterator cit = languages.begin();
cit != languages.end(); ++cit) {
combo_language->addto((*cit).second.lang().c_str());
}
-void InsetFormula::draw(Painter & pain, LyXFont const & f,
+void InsetFormula::draw(BufferView * bv, LyXFont const & f,
int baseline, float & x) const
{
+ Painter & pain = bv->painter();
// Seems commenting out solves a problem.
LyXFont font = mathed_get_font(LM_TC_TEXTRM, LM_ST_TEXT);
font.setSize(f.size());
}
-void InsetFormula::GetCursorPos(int& x, int& y) const
+void InsetFormula::GetCursorPos(BufferView *, int& x, int& y) const
{
mathcursor->GetPos(x, y);
x -= par->xo;
///
int width(Painter &, LyXFont const &) const;
///
- void draw(Painter &, LyXFont const &, int baseline, float & x) const;
+ void draw(BufferView *,LyXFont const &, int baseline, float & x) const;
///
void Write(Buffer const *, std::ostream &) const;
///
///
void HideInsetCursor(BufferView *);
///
- void GetCursorPos(int &, int &) const;
+ void GetCursorPos(BufferView *, int &, int &) const;
///
void ToggleInsetSelection(BufferView * bv);
///
}
-void InsetFormulaMacro::draw(Painter & pain, LyXFont const & f,
+void InsetFormulaMacro::draw(BufferView * bv, LyXFont const & f,
int baseline, float & x) const
{
+ Painter & pain = bv->painter();
LyXFont font(f);
tmacro->update();
if (opened) {
tmacro->setEditMode(true);
- InsetFormula::draw(pain, font, baseline, x);
+ InsetFormula::draw(bv, font, baseline, x);
tmacro->setEditMode(false);
} else {
font.setColor(LColor::math);
///
int width(Painter &, LyXFont const &) const;
///
- void draw(Painter &, LyXFont const &, int baseline, float & x) const;
+ void draw(BufferView *,LyXFont const &, int baseline, float & x) const;
///
void Read(Buffer const *, LyXLex & lex);
///