]> git.lyx.org Git - features.git/commitdiff
move a few things out-of-line
authorAndré Pönitz <poenitz@gmx.net>
Wed, 21 Aug 2002 06:32:10 +0000 (06:32 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 21 Aug 2002 06:32:10 +0000 (06:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5048 a592a061-630c-0410-9148-cb99ea01b6c8

src/MenuBackend.C
src/MenuBackend.h
src/frontends/xforms/Menubar_pimpl.C
src/frontends/xforms/Menubar_pimpl.h

index 71ded3f708cfed01ed578778f46fb390d42e9835..faa09a8a523556932df2178f4544281d553b22d2 100644 (file)
@@ -81,6 +81,13 @@ MenuItem::MenuItem(Kind kind, string const & label,
 }
 
 
+MenuItem::MenuItem(Kind kind, string const & label, int action,
+                bool optional = false);
+       : kind_(kind), label_(label), action_(action), submenuname_(),
+         optional_(optional)
+{}
+
+
 MenuItem::~MenuItem()
 {}
 
@@ -104,6 +111,12 @@ Menu & Menu::add(MenuItem const & i)
 }
 
 
+void Menu::submenu(Menu * menu)
+{
+       submenu_.reset(menu);
+}
+
+
 Menu & Menu::read(LyXLex & lex)
 {
        enum Menutags {
index b7a3abeb7aba4d62754e42f5ad479f40015663c6..12e38bf0a67112745b2526f8b2cf23dd0d586567 100644 (file)
@@ -72,9 +72,7 @@ public:
        MenuItem(Kind kind,
                 string const & label,
                 int action,
-                bool optional = false)
-               : kind_(kind), label_(label),
-                 action_(action), submenuname_(), optional_(optional) {}
+                bool optional = false);
 
        /// This one is just to please boost::shared_ptr<>
        ~MenuItem();
@@ -97,7 +95,7 @@ public:
        ///
        Menu * submenu() const { return submenu_.get(); }
        ///
-       void submenu(Menu * menu) { submenu_.reset(menu); }
+       void submenu(Menu * menu);
 
 private:
        //friend class MenuBackend;
index f430ecd050d75436e1c40018c99d4404a9ae75d2..e9af3553f94f1b63b46f4d0edb6beb0ca46f4e67 100644 (file)
@@ -90,6 +90,10 @@ Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mb)
 }
 
 
+Menubar::Pimpl::~Pimpl()
+{}
+
+
 void Menubar::Pimpl::makeMenubar(Menu const & menu)
 {
        FL_FORM * form = owner_->getForm();
@@ -417,3 +421,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()
+{}
index 16dfdac303fe7b4fda190d1cc9bfd6200b751824..dd0e6afe6d71ff7ed4c5c75d6e37f3648fc07805 100644 (file)
@@ -39,6 +39,8 @@ struct Menubar::Pimpl {
 public:
        ///
        Pimpl(LyXView *, MenuBackend const &);
+       ///
+       ~Pimpl();
 
        /// update the state of the menuitems
        void update();
@@ -62,7 +64,7 @@ private:
                           std::vector<int> & smn, bool & all_disabled);
 
        //
-       void makeMenubar(Menu const &menu);
+       void makeMenubar(Menu const & menu);
 
        ///
        XFormsView * owner_;
@@ -72,9 +74,8 @@ private:
        struct ItemInfo {
                ///
                ItemInfo(Menubar::Pimpl * p, MenuItem const * i,
-                        FL_OBJECT * o)
-
-                       : pimpl_(p), obj_(o) { item_.reset(i); }
+                        FL_OBJECT * o);
+               ~ItemInfo();
                ///
                Menubar::Pimpl * pimpl_;
                ///