X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2FSlit.hh;h=798ccb24b22ac6f93efcd87e1fc0a2b4fcaf29d5;hb=ca316865793bc9b4f1833cb7ab90c7dfc5dd9891;hp=c0484c2f294ba2b9301ce18afcfc30a041fa64cc;hpb=20063c22469643e8eb9c32bcc4b996f9640c9baf;p=chaz%2Fopenbox diff --git a/src/Slit.hh b/src/Slit.hh index c0484c2f..798ccb24 100644 --- a/src/Slit.hh +++ b/src/Slit.hh @@ -30,6 +30,7 @@ extern "C" { } #include +#include #include "Screen.hh" #include "Basemenu.hh" @@ -44,24 +45,30 @@ private: private: Directionmenu(const Directionmenu&); Directionmenu& operator=(const Directionmenu&); + Slit *slit; protected: virtual void itemSelected(int button, unsigned int index); - + virtual void setValues(void); + public: Directionmenu(Slitmenu *sm); + virtual void reconfigure(void); }; class Placementmenu : public Basemenu { private: Placementmenu(const Placementmenu&); Placementmenu& operator=(const Placementmenu&); + Slit *slit; protected: virtual void itemSelected(int buton, unsigned int index); + virtual void setValues(void); public: Placementmenu(Slitmenu *sm); + virtual void reconfigure(void); }; Directionmenu *directionmenu; @@ -103,10 +110,13 @@ private: typedef std::list SlitClientList; bool on_top, hidden, do_auto_hide; + int direction, placement; + std::string slitstr; Display *display; Blackbox *blackbox; BScreen *screen; + Configuration *config; BTimer *timer; Strut strut; @@ -137,6 +147,13 @@ public: inline bool isOnTop(void) const { return on_top; } inline bool isHidden(void) const { return hidden; } inline bool doAutoHide(void) const { return do_auto_hide; } + inline int getPlacement(void) const { return placement; } + inline int getDirection(void) const { return direction; } + + void saveOnTop(bool); + void saveAutoHide(bool); + void savePlacement(int); + void saveDirection(int); inline Slitmenu *getMenu(void) { return slitmenu; } @@ -149,13 +166,13 @@ public: inline unsigned int getWidth(void) const { return frame.rect.width(); } inline unsigned int getExposedWidth(void) const { - if (screen->getSlitDirection() == Vertical && do_auto_hide) + if (direction == Vertical && do_auto_hide) return screen->getBevelWidth(); return frame.rect.width(); } inline unsigned int getHeight(void) const { return frame.rect.height(); } inline unsigned int getExposedHeight(void) const { - if (screen->getSlitDirection() == Horizontal && do_auto_hide) + if (direction == Horizontal && do_auto_hide) return screen->getBevelWidth(); return frame.rect.height(); } @@ -163,17 +180,19 @@ public: void addClient(Window w); void removeClient(SlitClient *client, bool remap = True); void removeClient(Window w, bool remap = True); + void load_rc(void); + void save_rc(void); void reconfigure(void); void updateSlit(void); void reposition(void); void shutdown(void); void toggleAutoHide(void); - void buttonPressEvent(XButtonEvent *e); - void enterNotifyEvent(XCrossingEvent * /*unused*/); - void leaveNotifyEvent(XCrossingEvent * /*unused*/); - void configureRequestEvent(XConfigureRequestEvent *e); - void unmapNotifyEvent(XUnmapEvent *e); + void buttonPressEvent(const XButtonEvent *e); + void enterNotifyEvent(const XCrossingEvent * /*unused*/); + void leaveNotifyEvent(const XCrossingEvent * /*unused*/); + void configureRequestEvent(const XConfigureRequestEvent *e); + void unmapNotifyEvent(const XUnmapEvent *e); virtual void timeout(void);