aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-11-14 00:15:10 (GMT)
committerfluxgen <fluxgen>2002-11-14 00:15:10 (GMT)
commitcade394b91433589df935298ba0ea1562e4aee68 (patch)
tree32764f0de8abc5d48da20487e90c9f9e0d77209b
parenteefec42311b157c0f762e7ef55e25d8d3eb76140 (diff)
downloadfluxbox_paul-cade394b91433589df935298ba0ea1562e4aee68.zip
fluxbox_paul-cade394b91433589df935298ba0ea1562e4aee68.tar.bz2
cleaning
-rw-r--r--src/Slit.hh87
1 files changed, 38 insertions, 49 deletions
diff --git a/src/Slit.hh b/src/Slit.hh
index b5135d8..154d345 100644
--- a/src/Slit.hh
+++ b/src/Slit.hh
@@ -25,85 +25,81 @@
25#ifndef SLIT_HH 25#ifndef SLIT_HH
26#define SLIT_HH 26#define SLIT_HH
27 27
28#include "Basemenu.hh"
29
28#include <X11/Xlib.h> 30#include <X11/Xlib.h>
29#include <X11/Xutil.h> 31#include <X11/Xutil.h>
30 32
31// forward declaration
32class Slit;
33class Slitmenu;
34
35#include "Basemenu.hh"
36
37#include <list> 33#include <list>
38#include <string> 34#include <string>
35#include <memory>
36
37// forward declaration
38class Slit;
39 39
40class Slitmenu : public Basemenu { 40class Slitmenu : public Basemenu {
41public: 41public:
42 explicit Slitmenu(Slit &theslist); 42 explicit Slitmenu(Slit &theslist);
43 virtual ~Slitmenu(); 43 virtual ~Slitmenu();
44 44
45 inline Basemenu *getDirectionmenu() { return directionmenu; } 45 const Basemenu &getDirectionmenu() const { return m_directionmenu; }
46 inline Basemenu *getPlacementmenu() { return placementmenu; } 46 const Basemenu &getPlacementmenu() const { return m_placementmenu; }
47
47#ifdef XINERAMA 48#ifdef XINERAMA
48 inline Basemenu *getHeadmenu() { return headmenu; } 49 const Basemenu *getHeadmenu() const { return m_headmenu.get(); }
49#endif // XINERAMA 50#endif // XINERAMA
50 51
51 void reconfigure(); 52 void reconfigure();
52 53
54protected:
55 virtual void itemSelected(int button, unsigned int index);
56 virtual void internal_hide();
57
53private: 58private:
54 class Directionmenu : public Basemenu { 59 class Directionmenu : public Basemenu {
55 private: 60 public:
56 Slitmenu *slitmenu; 61 Directionmenu(Slitmenu &sm);
57 62
58 protected: 63 protected:
59 virtual void itemSelected(int button, unsigned int index); 64 virtual void itemSelected(int button, unsigned int index);
60 65
61 public: 66 private:
62 Directionmenu(Slitmenu *); 67 Slitmenu &slitmenu;
63 }; 68 };
64 69
65 class Placementmenu : public Basemenu { 70 class Placementmenu : public Basemenu {
66 private: 71 public:
67 Slitmenu *slitmenu; 72 Placementmenu(Slitmenu &sm);
68 73
69 protected: 74 protected:
70 virtual void itemSelected(int button, unsigned int index); 75 virtual void itemSelected(int button, unsigned int index);
71 76
72 public: 77 private:
73 Placementmenu(Slitmenu *); 78 Slitmenu &slitmenu;
74 }; 79 };
75 80
81 Slit &slit;
82
76#ifdef XINERAMA 83#ifdef XINERAMA
77 class Headmenu : public Basemenu { 84 class Headmenu : public Basemenu {
78 public: 85 public:
79 Headmenu(Slitmenu *); 86 Headmenu(Slitmenu &sm);
80 private:
81 Slitmenu *slitmenu;
82
83 protected: 87 protected:
84 virtual void itemSelected(int button, unsigned int index); 88 virtual void itemSelected(int button, unsigned int index);
85 89 private:
90 Slitmenu &slitmenu;
86 }; 91 };
92 friend class Headmenu;
93 std::auto_ptr<Headmenu> m_headmenu;
87#endif // XINERAMA 94#endif // XINERAMA
88 95
89 Directionmenu *directionmenu; 96 Placementmenu m_placementmenu;
90 Placementmenu *placementmenu; 97 Directionmenu m_directionmenu;
91#ifdef XINERAMA
92 Headmenu *headmenu;
93#endif // XINERAMA
94 Slit &slit;
95 98
96 friend class Directionmenu;
97 friend class Placementmenu;
98#ifdef XINERAMA
99 friend class Headmenu;
100#endif // XINERAMA
101 friend class Slit;
102 99
103 100
104protected: 101 friend class Directionmenu;
105 virtual void itemSelected(int button, unsigned int index); 102 friend class Placementmenu;
106 virtual void internal_hide();
107}; 103};
108 104
109 105
@@ -125,14 +121,16 @@ public:
125 121
126 inline unsigned int width() const { return frame.width; } 122 inline unsigned int width() const { return frame.width; }
127 inline unsigned int height() const { return frame.height; } 123 inline unsigned int height() const { return frame.height; }
128 124 void setOnTop(bool val);
125 void setAutoHide(bool val);
129 void addClient(Window clientwin); 126 void addClient(Window clientwin);
130 void removeClient(Window clientwin, bool = true); 127 void removeClient(Window clientwin, bool = true);
131 void reconfigure(); 128 void reconfigure();
132 void reposition(); 129 void reposition();
133 void shutdown(); 130 void shutdown();
134 void saveClientList(); 131 void saveClientList();
135 132 BScreen *screen() { return m_screen; }
133 const BScreen *screen() const { return m_screen; }
136 /** 134 /**
137 @name eventhandlers 135 @name eventhandlers
138 */ 136 */
@@ -182,10 +180,7 @@ private:
182 180
183 bool on_top, hidden, do_auto_hide; 181 bool on_top, hidden, do_auto_hide;
184 182
185 Display *display; ///< display connection 183 BScreen *m_screen;
186
187 Fluxbox *fluxbox; ///< obsolete
188 BScreen *screen;
189 BTimer timer; 184 BTimer timer;
190 185
191 typedef std::list<SlitClient *> SlitClients; 186 typedef std::list<SlitClient *> SlitClients;
@@ -202,12 +197,6 @@ private:
202 unsigned int width, height; 197 unsigned int width, height;
203 } frame; 198 } frame;
204 199
205 friend class Slitmenu;
206 friend class Slitmenu::Directionmenu;
207 friend class Slitmenu::Placementmenu;
208 #ifdef XINERAMA
209 friend class Slitmenu::Headmenu;
210 #endif // XINERAMA
211}; 200};
212 201
213 202