]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Menubar_pimpl.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / Menubar_pimpl.C
index e4d261a39e8527cb112bc59ea0a5c1b9fa410ed1..2274f6a8698f3f587c90ae9d2ed06aa0ee727a7e 100644 (file)
@@ -1,9 +1,11 @@
 /**
  * \file Menubar_pimpl.C
- * Copyright 1999-2001 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author  Lars Gullik Bjønnes, larsbj@lyx.org
+ * \author  Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
@@ -90,6 +92,10 @@ Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb)
 }
 
 
+Menubar::Pimpl::~Pimpl()
+{}
+
+
 void Menubar::Pimpl::makeMenubar(Menu const & menu)
 {
        FL_FORM * form = owner_->getForm();
@@ -232,7 +238,7 @@ int Menubar::Pimpl::create_submenu(Window win, XFormsView * view,
                if (i->kind() == MenuItem::Separator)
                        *last = "%l";
                else if (!i->optional() ||
-                        !(view->getLyXFunc()->getStatus(i->action()).disabled()))
+                        !(view->getLyXFunc().getStatus(i->action()).disabled()))
                        last = it;
 
        it = extra_labels.begin();
@@ -258,7 +264,7 @@ int Menubar::Pimpl::create_submenu(Window win, XFormsView * view,
                switch (item.kind()) {
                case MenuItem::Command: {
                        FuncStatus const flag =
-                               view->getLyXFunc()->getStatus(item.action());
+                               view->getLyXFunc().getStatus(item.action());
                        // handle optional entries.
                        if (item.optional()
                            && (flag.disabled())) {
@@ -402,7 +408,7 @@ void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button)
                // If the action value is too low, then it is not a
                // valid action, but something else.
                if (choice >= action_offset + 1) {
-                       view->getLyXFunc()->dispatch(choice - action_offset, true);
+                       view->getLyXFunc().dispatch(choice - action_offset, true);
                } else {
                        lyxerr[Debug::GUI]
                                << "MenuCallback: ignoring bogus action "
@@ -417,3 +423,15 @@ void Menubar::Pimpl::MenuCallback(FL_OBJECT * ob, long button)
        fl_set_tabstop(default_tabstop);
 
 }
+
+
+Menubar::Pimpl::ItemInfo::ItemInfo
+       (Menubar::Pimpl * p, MenuItem const * i, FL_OBJECT * o)
+       : pimpl_(p), obj_(o)
+{
+       item_.reset(i);
+}
+
+
+Menubar::Pimpl::ItemInfo::~ItemInfo()
+{}