aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.hh
diff options
context:
space:
mode:
authorcout <cout>2002-04-09 12:09:03 (GMT)
committercout <cout>2002-04-09 12:09:03 (GMT)
commit30fe2fb8feb4a1405ea164424a2b8336d2f5a8f4 (patch)
treea073716b4bca24bd193003bab6418ccde6ff5e93 /src/fluxbox.hh
parent4d6f6ba54f34c8465d0b3179fe0fbd42d935edf2 (diff)
downloadfluxbox-30fe2fb8feb4a1405ea164424a2b8336d2f5a8f4.zip
fluxbox-30fe2fb8feb4a1405ea164424a2b8336d2f5a8f4.tar.bz2
Replaced LinkedList structures with std::map, std::vector, and std::list.
Diffstat (limited to 'src/fluxbox.hh')
-rw-r--r--src/fluxbox.hh43
1 files changed, 13 insertions, 30 deletions
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index 361b1f8..c73429a 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.hh,v 1.14 2002/03/19 00:16:44 fluxgen Exp $ 25// $Id: fluxbox.hh,v 1.15 2002/04/09 12:09:03 cout Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -49,7 +49,6 @@
49#include "Keys.hh" 49#include "Keys.hh"
50#include "BaseDisplay.hh" 50#include "BaseDisplay.hh"
51#include "Image.hh" 51#include "Image.hh"
52#include "LinkedList.hh"
53#include "Timer.hh" 52#include "Timer.hh"
54#include "Window.hh" 53#include "Window.hh"
55#include "Tab.hh" 54#include "Tab.hh"
@@ -60,6 +59,8 @@
60 59
61#include <string> 60#include <string>
62#include <vector> 61#include <vector>
62#include <map>
63#include <list>
63 64
64class Fluxbox : public BaseDisplay, public TimeoutHandler { 65class Fluxbox : public BaseDisplay, public TimeoutHandler {
65public: 66public:
@@ -161,20 +162,6 @@ public:
161 enum { B_AMERICANDATE = 1, B_EUROPEANDATE }; 162 enum { B_AMERICANDATE = 1, B_EUROPEANDATE };
162#endif // HAVE_STRFTIME 163#endif // HAVE_STRFTIME
163 164
164 template <class Z>
165 class DataSearch {
166 private:
167 Window window;
168 Z *data;
169
170
171 public:
172 DataSearch(Window w, Z *d) { window = w; data = d; }
173
174 inline const Window &getWindow(void) const { return window; }
175 inline Z *getData(void) { return data; }
176 };
177
178 typedef std::vector<Fluxbox::Titlebar> TitlebarList; 165 typedef std::vector<Fluxbox::Titlebar> TitlebarList;
179 166
180private: 167private:
@@ -214,27 +201,23 @@ private:
214 //std::vector<std::string> parseTitleArgs(const char *arg); 201 //std::vector<std::string> parseTitleArgs(const char *arg);
215 void setTitlebar(std::vector<Fluxbox::Titlebar>& dir, const char *arg); 202 void setTitlebar(std::vector<Fluxbox::Titlebar>& dir, const char *arg);
216 203
217 typedef DataSearch<FluxboxWindow> WindowSearch; 204 std::map<Window, FluxboxWindow *> windowSearch;
218 LinkedList<WindowSearch> *windowSearchList, *groupSearchList; 205 std::map<Window, FluxboxWindow *> groupSearch;
219 typedef DataSearch<Basemenu> MenuSearch; 206 std::map<Window, Basemenu *> menuSearch;
220 LinkedList<MenuSearch> *menuSearchList; 207 std::map<Window, Toolbar *> toolbarSearch;
221 typedef DataSearch<Toolbar> ToolbarSearch; 208 std::map<Window, Tab *> tabSearch;
222 LinkedList<ToolbarSearch> *toolbarSearchList;
223 typedef DataSearch<Tab> TabSearch;
224 LinkedList<TabSearch> *tabSearchList;
225 209
226#ifdef SLIT 210#ifdef SLIT
227 typedef DataSearch<Slit> SlitSearch; 211 std::map<Window, Slit *> slitSearch;
228 LinkedList<SlitSearch> *slitSearchList; 212# ifdef KDE
229 #ifdef KDE
230 //For KDE dock applets 213 //For KDE dock applets
231 Atom kwm1_dockwindow; //KDE v1.x 214 Atom kwm1_dockwindow; //KDE v1.x
232 Atom kwm2_dockwindow; //KDE v2.x 215 Atom kwm2_dockwindow; //KDE v2.x
233 #endif//KDE 216# endif//KDE
234#endif // SLIT 217#endif // SLIT
235 218
236 LinkedList<MenuTimestamp> *menuTimestamps; 219 std::list<MenuTimestamp *> menuTimestamps;
237 LinkedList<BScreen> *screenList; 220 std::list<BScreen *> screenList;
238 221
239 FluxboxWindow *focused_window, *masked_window; 222 FluxboxWindow *focused_window, *masked_window;
240 BTimer timer; 223 BTimer timer;