// -*- C++ -*-
/**
* \file Toolbar_pimpl.h
- * Copyright 2002 the LyX Team
* Copyright 1996-2001 Lars Gullik Bjønnes
- * Read 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
*/
#ifndef TOOLBAR_PIMPL_H
class XFormsView;
class Tooltips;
-class Dialogs;
class Combox;
/** The LyX xforms toolbar class
public:
/// called when user selects a layout from combox
static void layoutSelectedCB(int, void *, Combox *);
- ///
- Pimpl(LyXView * o, Dialogs &, int x, int y);
- ///
- ~Pimpl();
+
+ /// create an empty toolbar
+ Pimpl(LyXView * o, int x, int y);
- /// (re)sets the toolbar
- void set(bool doingmain = false);
+ ~Pimpl();
- /** this is to be the entry point to the toolbar
- frame, where you can change the toolbar realtime.
- */
- void edit();
/// add a new button to the toolbar.
- void add(int, bool doclean = true);
- /// invokes the n'th icon in the toolbar
- void push(int);
+ void add(int action);
+
/// update the state of the icons
void update();
/// the non-static version of layoutSelectedCB
void layoutSelected();
- ///
+ /// an item on the toolbar
struct toolbarItem
{
- ///
- int action;
- ///
- FL_OBJECT * icon;
- ///
toolbarItem();
- ///
- void clean();
- ///
+
~toolbarItem();
- ///
+
toolbarItem & operator=(toolbarItem const & ti);
+
+ /// deallocate icon
+ void kill_icon();
+
+ /// lyx action number
+ int action;
+ /// icon for this item
+ FL_OBJECT * icon;
};
- /// typedef to simplify things
typedef std::vector<toolbarItem> ToolbarList;
+
/// The list containing all the buttons
- ToolbarList toollist;
- ///
- XFormsView * owner;
- ///
+ ToolbarList toollist_;
+ /// owning view
+ XFormsView * owner_;
+ /// tooltips manager
Tooltips * tooltip_;
- ///
- Combox * combox;
- /// Starting position
- int sxpos;
- ///
- int sypos;
- ///
+ /// layout combo
+ Combox * combox_;
+ /// x position of end of toolbar
int xpos;
- ///
+ /// y position of end of toolbar
int ypos;
- ///
- bool cleaned;
-
- /// removes all toolbar buttons from the toolbar.
- void clean();
-
- /// more...
- void reset();
-
- /// more...
- void lightReset();
};
-#endif
+
+#endif // TOOLBAR_PIMPL_H