]> git.lyx.org Git - lyx.git/blob - src/ToolbarDefaults.h
Minimal fix needed to give Qt a label dialog again.
[lyx.git] / src / ToolbarDefaults.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2001 The LyX Team.
9  *
10  *
11  * ====================================================== */
12
13
14 #ifndef TOOLBARDEFAULTS_H
15 #define TOOLBARDEFAULTS_H
16
17 #include <vector>
18
19 #include "LString.h"
20
21 class LyXLex;
22
23 ///
24 class ToolbarDefaults {
25 public:
26         /// The special toolbar actions
27         enum  ItemType {
28                 /// adds space between buttons in the toolbar
29                 SEPARATOR = -3,
30                 /// a special combox insead of a button
31                 LAYOUTS = -2,
32                 /// begin a new line of button (not working)
33                 NEWLINE = -1
34         };
35
36         ///
37         typedef std::vector<int> Defaults;
38         ///
39         typedef Defaults::iterator iterator;
40         ///
41         typedef Defaults::const_iterator const_iterator;
42         ///
43         ToolbarDefaults();
44         ///
45         iterator begin() {
46                 return defaults.begin();
47         }
48         ///
49         const_iterator begin() const {
50                 return defaults.begin();
51         }
52         ///
53         iterator end() {
54                 return defaults.end();
55         }
56         ///
57         const_iterator end() const {
58                 return defaults.end();
59         }
60         ///
61         void read(LyXLex &);
62 private:
63         ///
64         void init();
65         /// This func is just to make it easy for me...
66         void add(int);
67         ///
68         void add(string const &);
69         ///
70         Defaults defaults;
71 };
72
73 /// The global instance
74 extern ToolbarDefaults toolbardefaults;
75
76
77 #endif