aboutsummaryrefslogtreecommitdiff
path: root/src/Slit.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Slit.hh')
-rw-r--r--src/Slit.hh27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/Slit.hh b/src/Slit.hh
index 5c69a8c..9384ad6 100644
--- a/src/Slit.hh
+++ b/src/Slit.hh
@@ -68,7 +68,7 @@ public:
68 RIGHTBOTTOM, RIGHTCENTER, RIGHTTOP 68 RIGHTBOTTOM, RIGHTCENTER, RIGHTTOP
69 }; 69 };
70 70
71 Slit(BScreen &screen, FbTk::Layer &layer, const char *filename = 0); 71 Slit(BScreen &screen, FbTk::Layer &layer);
72 virtual ~Slit(); 72 virtual ~Slit();
73 73
74 void show() { frame.window.show(); m_visible = true; } 74 void show() { frame.window.show(); m_visible = true; }
@@ -137,7 +137,6 @@ private:
137 void setupMenu(); 137 void setupMenu();
138 138
139 void removeClient(SlitClient *client, bool remap, bool destroy); 139 void removeClient(SlitClient *client, bool remap, bool destroy);
140 void loadClientList(const char *filename);
141 void updateClientmenu(); 140 void updateClientmenu();
142 void clearStrut(); 141 void clearStrut();
143 void updateStrut(); 142 void updateStrut();
@@ -148,13 +147,11 @@ private:
148 BScreen &m_screen; 147 BScreen &m_screen;
149 FbTk::Timer m_timer; 148 FbTk::Timer m_timer;
150 149
151 SlitClients m_client_list;
152 std::auto_ptr<LayerMenu> m_layermenu; 150 std::auto_ptr<LayerMenu> m_layermenu;
153 FbMenu m_clientlist_menu, m_slitmenu; 151 FbMenu m_clientlist_menu, m_slitmenu;
154#ifdef XINERAMA 152#ifdef XINERAMA
155 XineramaHeadMenu<Slit> *m_xineramaheadmenu; 153 XineramaHeadMenu<Slit> *m_xineramaheadmenu;
156#endif // XINERAMA 154#endif // XINERAMA
157 std::string m_filename;
158 155
159 struct frame { 156 struct frame {
160 frame(const FbTk::FbWindow &parent): 157 frame(const FbTk::FbWindow &parent):
@@ -179,6 +176,28 @@ private:
179 static unsigned int s_eventmask; 176 static unsigned int s_eventmask;
180 Strut *m_strut; 177 Strut *m_strut;
181 178
179 class SlitClientsRes: public FbTk::Resource_base, public SlitClients {
180 public:
181 SlitClientsRes(FbTk::ResourceManager_base &rm, const std::string &name)
182 : FbTk::Resource_base(name, name), m_rm(rm) {
183 m_rm.addResource(*this);
184 }
185
186 ~SlitClientsRes() {
187 m_rm.removeResource(*this);
188 }
189
190 virtual void setDefaultValue() {}
191 virtual void setFromString(const char *) { assert(0); }
192 virtual std::string getString() const { assert(0); }
193 virtual void setFromLua(lua::state &l);
194 virtual void pushToLua(lua::state &l) const;
195
196 private:
197 FbTk::ResourceManager_base &m_rm;
198 };
199
200 SlitClientsRes m_client_list;
182 FbTk::BoolResource m_rc_kde_dockapp, m_rc_auto_hide, m_rc_maximize_over; 201 FbTk::BoolResource m_rc_kde_dockapp, m_rc_auto_hide, m_rc_maximize_over;
183 FbTk::Resource<Slit::Placement, FbTk::EnumTraits<Slit::Placement> > m_rc_placement; 202 FbTk::Resource<Slit::Placement, FbTk::EnumTraits<Slit::Placement> > m_rc_placement;
184 FbTk::IntResource m_rc_alpha, m_rc_on_head; 203 FbTk::IntResource m_rc_alpha, m_rc_on_head;