X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FToolbar_pimpl.C;h=dae43e651a1b96de5b3b063b6cec93d846436763;hb=8075064372c5361f2dfd91860003f0cb317b4e39;hp=b80357e11e65564e6e62a09aedca88109ec4cb1d;hpb=76ef051b1cb1fb51c3ffd8ccc9105be4471e74d4;p=lyx.git diff --git a/src/frontends/xforms/Toolbar_pimpl.C b/src/frontends/xforms/Toolbar_pimpl.C index b80357e11e..dae43e651a 100644 --- a/src/frontends/xforms/Toolbar_pimpl.C +++ b/src/frontends/xforms/Toolbar_pimpl.C @@ -21,7 +21,7 @@ #include "Toolbar_pimpl.h" #include "debug.h" -#include "LyXView.h" +#include "XFormsView.h" #include "lyxfunc.h" #include "func_status.h" #include "BufferView.h" @@ -81,7 +81,7 @@ Toolbar::Pimpl::toolbarItem::operator=(toolbarItem const & ti) { Toolbar::Pimpl::Pimpl(LyXView * o, int x, int y) - : owner(o), sxpos(x), sypos(y) + : owner(static_cast(o)), sxpos(x), sypos(y) { combox = 0; #if FL_REVISION < 89 @@ -157,7 +157,7 @@ void Toolbar::Pimpl::layoutSelectedCB(int sel, void * arg, Combox *) void Toolbar::Pimpl::layoutSelected(int sel) { string const tmp = tostr(sel); - owner->getLyXFunc()->Dispatch(LFUN_LAYOUTNO, tmp); + owner->getLyXFunc()->dispatch(LFUN_LAYOUTNO, tmp); } @@ -237,10 +237,10 @@ void Toolbar::Pimpl::updateLayoutList(bool force) LyXTextClass::const_iterator end = tc.end(); for (LyXTextClass::const_iterator cit = tc.begin(); cit != end; ++cit) { - if ((*cit).obsoleted_by().empty()) - combox->addline(_((*cit).name())); + if (cit->obsoleted_by().empty()) + combox->addline(_(cit->name())); else - combox->addline("@N" + _((*cit).name())); + combox->addline("@N" + _(cit->name())); } } // we need to do this. @@ -268,9 +268,9 @@ namespace { void ToolbarCB(FL_OBJECT * ob, long ac) { - LyXView * owner = static_cast(ob->u_vdata); + XFormsView * owner = static_cast(ob->u_vdata); - string res = owner->getLyXFunc()->Dispatch(int(ac)); + string res = owner->getLyXFunc()->dispatch(int(ac)); if (!res.empty()) lyxerr[Debug::GUI] << "ToolbarCB: Function returned: " << res << endl; @@ -285,23 +285,6 @@ extern "C" void C_Toolbar_ToolbarCB(FL_OBJECT * ob, long data) } -#if 0 -// What are we supposed to do with that?? -int Toolbar::get_toolbar_func(string const & func) -{ - int action = lyxaction.LookupFunc(func); - if (action == -1) { - if (func == "separator"){ - action = TOOL_SEPARATOR; - } else if (func == "layouts"){ - action = TOOL_LAYOUTS; - } else action = 0; - } - return action; -} -#endif - - namespace { void setPixmap(FL_OBJECT * obj, int action, int buttonwidth, int height) { @@ -409,7 +392,7 @@ void Toolbar::Pimpl::set(bool doingmain) // Set the tooltip #if FL_REVISION >= 89 - string help = _(lyxaction.helpText(item->action)); + string const help(_(lyxaction.helpText(item->action))); fl_set_object_helper(obj, help.c_str()); #else fl_set_object_posthandler(obj, C_Toolbar_BubblePost); @@ -530,6 +513,7 @@ void Toolbar::Pimpl::reset() lightReset(); } + void Toolbar::Pimpl::lightReset() { xpos = sxpos - standardspacing; ypos = sypos;