2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2000 The LyX Team.
9 * This file is Copyright 1996-2000
12 * ====================================================== */
22 #include FORMS_H_LOCATION
23 #include "commandtags.h"
28 /** The LyX toolbar class
29 This class {\em is} the LyX toolbar, and is not likely to be enhanced
30 further until we begin the move to Qt. We will probably have to make our
31 own QToolBar, at least until Troll Tech makes theirs.
36 Toolbar(LyXView * o, int x, int y);
44 int get_toolbar_func(string const & func);
46 /// The special toolbar actions
48 /// adds space between buttons in the toolbar
50 /// a special combox insead of a button
52 /// begin a new line of button (not working)
59 /// (re)sets the toolbar
60 void set(bool doingmain = false);
62 /** this is to be the entry point to the toolbar
63 frame, where you can change the toolbar realtime. */
65 /// add a new button to the toolbar.
66 void add(int , bool doclean = true);
67 /// name of func instead of kb_action
68 void add(string const & , bool doclean = true);
69 /// invokes the n'th icon in the toolbar
71 /// activates the toolbar
73 /// deactivates the toolbar
75 /// update the state of the icons
78 static void ToolbarCB(FL_OBJECT *, long);
82 static void BubbleTimerCB(FL_OBJECT *, long);
84 static int BubblePost(FL_OBJECT * ob, int event,
85 FL_Coord mx, FL_Coord my, int key, void * xev);
103 toolbarItem & operator=(toolbarItem const & ti);
106 /// typedef to simplify things
107 typedef std::vector<toolbarItem> ToolbarList;
108 /// The list containing all the buttons
109 ToolbarList toollist;
114 FL_OBJECT * bubble_timer;
116 /// Starting position
134 char const ** getPixmap(kb_action, string const & arg = string());
135 /// removes all toolbar buttons from the toolbar.
145 standardspacing = 2; // the usual space between items
146 sepspace = 6; // extra space
147 xpos = sxpos - standardspacing;
149 buttonwidth = 30; // the standard button width
150 height = 30; // the height of all items in the toolbar