lyx_mirror/src/frontends/xforms/XFormsMenubar.h
Lars Gullik Bjønnes 44cd0fc9a1 The std::string mammoth path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7862 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-06 15:43:21 +00:00

89 lines
1.7 KiB
C++

// -*- C++ -*-
/**
* \file XFormsMenubar.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Lars Gullik Bjønnes
*
* Full author contact details are available in file CREDITS.
*/
#ifndef XFORMSMENUBAR_H
#define XFORMSMENUBAR_H
#include "funcrequest.h"
#include "frontends/Menubar.h"
#include <boost/shared_ptr.hpp>
#include "forms_fwd.h"
#include <X11/X.h> // Window
#include <vector>
class LyXView;
class XFormsView;
class Menu;
class MenuItem;
class MenuBackend;
class XFormsMenubar : public Menubar {
public:
///
typedef std::vector<FuncRequest> Funcs;
///
XFormsMenubar(LyXView *, MenuBackend const &);
///
~XFormsMenubar();
/// update the state of the menuitems
void update();
/// Opens a top-level submenu given its name
void openByName(std::string const &);
///
static void MenuCallback(FL_OBJECT *, long);
private:
///
void add_toc(int menu, std::string const & extra_label,
std::vector<int> & smn, Window win);
///
void add_references(int menu, std::string const & extra_label,
std::vector<int> & smn, Window win);
///
int create_submenu(Window win, XFormsView * view,
Menu const & menu,
std::vector<int> & smn, Funcs & funcs);
//
void makeMenubar(Menu const & menu);
///
XFormsView * owner_;
///
MenuBackend const * menubackend_;
///
struct ItemInfo {
///
ItemInfo(XFormsMenubar * p, MenuItem const * i,
FL_OBJECT * o);
~ItemInfo();
///
XFormsMenubar * menubar_;
///
boost::shared_ptr<MenuItem const> item_;
///
FL_OBJECT * obj_;
};
///
typedef std::vector<boost::shared_ptr<ItemInfo> > ButtonList;
///
ButtonList buttonlist_;
};
#endif