mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
move a few things out-of-line
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5048 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5d443af86a
commit
375e2ac1a0
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
{}
|
||||
|
@ -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_;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user