// -*- C++ -*- /** * \file XFormsToolbar.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * * \author Lars Gullik Bjønnes * \author Jean-Marc Lasgouttes * * Full author contact details are available in file CREDITS. */ #ifndef XFORMSTOOLBAR_H #define XFROMSTOOLBAR_H #include #include "forms_fwd.h" #include "LayoutEngine.h" #include "frontends/Toolbar.h" #include "ToolbarBackend.h" class XFormsView; class Tooltips; /** The LyX xforms toolbar class */ class XFormsToolbar : public Toolbar { public: /// create an empty toolbar XFormsToolbar(LyXView * o); /// ~XFormsToolbar(); /// add a new toolbar void add(ToolbarBackend::Toolbar const & tb); /// add an item to a toolbar void add(FuncRequest const &, std::string const & tooltip); /// display toolbar, not implemented void displayToolbar(ToolbarBackend::Toolbar const & tb, bool show); /// update the state of the icons void update(); /// select the right layout in the combox void setLayout(std::string const & layout); /// Populate the layout combox. void updateLayoutList(); /// Drop down the layout list void openLayoutList(); /// Erase the layout list void clearLayoutList(); /// void layoutSelected(); /// an item on the toolbar struct toolbarItem { toolbarItem(); ~toolbarItem(); toolbarItem & operator=(toolbarItem const & ti); /// deallocate icon void kill_icon(); /// lyx action FuncRequest func; /// icon for this item FL_OBJECT * icon; }; /// lyx::frontend::Box * toolbar_; /// lyx::frontend::BoxList * toolbar_buttons_; /// lyx::frontend::WidgetMap widgets_; typedef std::vector Funcs; Funcs funcs; typedef std::vector ToolbarList; /// The list containing all the buttons ToolbarList toollist_; /// owning view XFormsView * owner_; /// tooltips manager Tooltips * tooltip_; /// layout combo FL_OBJECT * combox_; }; #endif