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 * ====================================================== */
21 #include FORMS_H_LOCATION
25 /** The LyX toolbar class
26 This class {\em is} the LyX toolbar, and is not likely to be enhanced
27 further until we begin the move to Qt. We will probably have to make our
28 own QToolBar, at least until Troll Tech makes theirs.
33 Toolbar(LyXView * o, int x, int y);
41 int get_toolbar_func(string const & func);
43 /// The special toolbar actions
45 /// adds space between buttons in the toolbar
47 /// a special combox insead of a button
49 /// begin a new line of button (not working)
56 /// (re)sets the toolbar
57 void set(bool doingmain = false);
59 /** this is to be the entry point to the toolbar
60 frame, where you can change the toolbar realtime. */
62 /// add a new button to the toolbar.
63 void add(int , bool doclean = true);
64 /// name of func instead of kb_action
65 void add(string const & , bool doclean = true);
66 /// invokes the n'th icon in the toolbar
68 /// activates the toolbar
70 /// deactivates the toolbar
74 static void ToolbarCB(FL_OBJECT *, long);
78 static void BubbleTimerCB(FL_OBJECT *, long);
80 static int BubblePost(FL_OBJECT * ob, int event,
81 FL_Coord mx, FL_Coord my, int key, void * xev);
103 action = LFUN_NOACTION;
111 fl_delete_object(icon);
112 fl_free_object(icon);
118 /// a list containing all the buttons
119 toolbarItem * toollist;
124 FL_OBJECT * bubble_timer;
126 /// Starting position
144 char const ** getPixmap(kb_action, string const & arg = string());
145 /// removes all toolbar buttons from the toolbar.
160 standardspacing = 2; // the usual space between items
161 sepspace = 6; // extra space
162 xpos = sxpos - standardspacing;
164 buttonwidth = 30; // the standard button width
165 height = 30; // the height of all items in the toolbar