if (lyxrc.use_gui) {
fl_add_canvas_handler(figinset_canvas, ClientMessage,
GhostscriptMsg,
- current_view->owner()->getMainForm());
+ current_view->owner()->getForm());
local_gc_copy = createGC();
}
-void InsetFig::draw(Painter & pain, LyXFont const & f,
- int baseline, float & x) const
+void InsetFig::draw(BufferView * bv, LyXFont const & f,
+ int baseline, float & x, bool) const
{
LyXFont font(f);
+ Painter & pain = bv->painter();
if (bitmap_waiting) getbitmaps();
} else {
char * msg = 0;
// draw frame
- pain.rectangle(x, baseline - hgh - 1, wid + 1, hgh + 1);
+ pain.rectangle(int(x), baseline - hgh - 1, wid + 1, hgh + 1);
if (figure && figure->data) {
if (figure->data->broken) msg = _("[render error]");
}
-void InsetFig::Write(ostream & os) const
+void InsetFig::Write(Buffer const *, ostream & os) const
{
Regenerate();
os << "Figure size " << wid << " " << hgh << "\n";
}
-void InsetFig::Read(LyXLex & lex)
+void InsetFig::Read(Buffer const *, LyXLex & lex)
{
string buf;
bool finished = false;
}
-int InsetFig::Latex(ostream & os,
+int InsetFig::Latex(Buffer const *, ostream & os,
bool /* fragile*/, bool /* fs*/) const
{
Regenerate();
}
-int InsetFig::Ascii(ostream &) const
+int InsetFig::Ascii(Buffer const *, ostream &) const
{
return 0;
}
-int InsetFig::Linuxdoc(ostream &) const
+int InsetFig::Linuxdoc(Buffer const *, ostream &) const
{
return 0;
}
-int InsetFig::DocBook(ostream & os) const
+int InsetFig::DocBook(Buffer const *, ostream & os) const
{
- string figurename = fname;
+ string buf1 = OnlyPath(owner->fileName());
+ string figurename = MakeRelPath(fname, buf1);
if(suffixIs(figurename, ".eps"))
figurename.erase(fname.length() - 4);
os << "@<graphic fileref=\"" << figurename << "\"></graphic>";
return 0;
-}
+}
void InsetFig::Validate(LaTeXFeatures & features) const
fl_activate_object(form->Height);
}
- int pflags = flags & 3;
- fl_set_button(form->Wysiwyg0, (pflags == 0));
- fl_set_button(form->Wysiwyg1, (pflags == 1));
- fl_set_button(form->Wysiwyg2, (pflags == 2));
- fl_set_button(form->Wysiwyg3, (pflags == 3));
+ int piflags = flags & 3;
+ fl_set_button(form->Wysiwyg0, (piflags == 0));
+ fl_set_button(form->Wysiwyg1, (piflags == 1));
+ fl_set_button(form->Wysiwyg2, (piflags == 2));
+ fl_set_button(form->Wysiwyg3, (piflags == 3));
fl_set_button(form->Frame, ((flags & 4) != 0));
fl_set_button(form->Translations, ((flags & 8) != 0));
fl_set_button(form->Subfigure, (subfigure != 0));