2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
6 * Copyright (C) 1995 Matthias Ettrich
8 * This file is Copyright (C) 1996-1998
11 *======================================================*/
20 #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(Toolbar const &, LyXView *o, int x, int y);
44 init(); // set default toolbar.
53 int get_toolbar_func(string const & func);
55 /// The special toolbar actions
57 /// adds space between buttons in the toolbar
59 /// a special combox insead of a button
61 /// begin a new line of button (not working)
70 /// sets up the default toolbar
72 /// (re)sets the toolbar
73 void set(bool doingmain=false);
75 /** this is to be the entry point to the toolbar
76 frame, where you can change the toolbar realtime. */
78 /// add a new button to the toolbar.
79 void add(int ,bool doclean=true);
80 /// name of func instead of kb_action
81 void add(string const & , bool doclean=true);
82 /// invokes the n'th icon in the toolbar
84 /// activates the toolbar
86 /// deactivates the toolbar
90 static void ToolbarCB(FL_OBJECT*, long);
92 static void BubbleTimerCB(FL_OBJECT *, long);
94 static int BubblePost(FL_OBJECT *ob, int event,
95 FL_Coord mx, FL_Coord my, int key, void *xev);
116 action = LFUN_NOACTION;
124 fl_delete_object(icon);
125 fl_free_object(icon);
131 /// a list containing all the buttons
132 toolbarItem *toollist;
136 FL_OBJECT *bubble_timer;
137 /// Starting position
155 char **getPixmap(kb_action, string const & arg=string());
156 /// removes all toolbar buttons from the toolbar.
171 standardspacing = 2; // the usual space between items
172 sepspace = 6; // extra space
173 xpos = sxpos - standardspacing;
175 buttonwidth = 30; // the standard button width
176 height = 30; // the height of all items in the toolbar