diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-04-16 23:50:53 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-04-16 23:50:53 +0000 |
| commit | 73a3c979b39ae0b51298d16bc5e76b61d31c89d5 (patch) | |
| tree | bb9fc01c03957c308b2bd2878e910fe57940f7c8 /src/Slit.h | |
| parent | fe9b1efde5e46c00679d0435601f915099a574b0 (diff) | |
Slit loads its own settings and saves them as they are changed
added an assert in Resource
Diffstat (limited to 'src/Slit.h')
| -rw-r--r-- | src/Slit.h | 53 |
1 files changed, 28 insertions, 25 deletions
@@ -70,17 +70,17 @@ private: protected: virtual void itemSelected(int, int); - virtual void internal_hide(void); + virtual void internal_hide(); public: Slitmenu(Slit &); - virtual ~Slitmenu(void); + virtual ~Slitmenu(); - inline Basemenu *getDirectionmenu(void) { return directionmenu; } - inline Basemenu *getPlacementmenu(void) { return placementmenu; } + inline Basemenu *getDirectionmenu() { return directionmenu; } + inline Basemenu *getPlacementmenu() { return placementmenu; } - void reconfigure(void); + void reconfigure(); }; @@ -94,11 +94,13 @@ private: unsigned int width, height; }; - Bool on_top, hidden, do_auto_hide; + bool m_ontop, m_autohide, m_hidden; + int m_direction, m_placement; Display *display; Openbox &openbox; BScreen &screen; + Resource &config; BTimer *timer; LinkedList<SlitClient> *clientList; @@ -108,8 +110,6 @@ private: Pixmap pixmap; Window window; - //int x, y, x_hidden, y_hidden; - //unsigned int width, height; Rect area; Point hidden; } frame; @@ -121,42 +121,45 @@ private: public: - Slit(BScreen &); + Slit(BScreen &, Resource &); virtual ~Slit(); - inline const Bool &isOnTop(void) const { return on_top; } - inline const Bool &isHidden(void) const { return hidden; } - inline const Bool &doAutoHide(void) const { return do_auto_hide; } - inline Slitmenu *getMenu() { return slitmenu; } inline const Window &getWindowID() const { return frame.window; } - //inline const int &getX(void) const - //{ return ((hidden) ? frame.x_hidden : frame.x); } - //inline const int &getY(void) const - //{ return ((hidden) ? frame.y_hidden : frame.y); } inline const Point &origin() const { return frame.area.origin(); } - - //inline const unsigned int &getWidth(void) const { return frame.width; } - //inline const unsigned int &getHeight(void) const { return frame.height; } inline const Size &size() const { return frame.area.size(); } - inline const Rect &area() const { return frame.area; } void addClient(Window); void removeClient(SlitClient *, Bool = True); void removeClient(Window, Bool = True); - void reconfigure(void); - void reposition(void); - void shutdown(void); + void reconfigure(); + void load(); + void reposition(); + void shutdown(); void buttonPressEvent(XButtonEvent *); void enterNotifyEvent(XCrossingEvent *); void leaveNotifyEvent(XCrossingEvent *); void configureRequestEvent(XConfigureRequestEvent *); - virtual void timeout(void); + virtual void timeout(); + + inline bool isHidden() const { return m_hidden; } + + inline bool onTop() const { return m_ontop; } + void setOnTop(bool); + + inline bool autoHide() const { return m_autohide; } + void setAutoHide(bool); + + inline int placement() const { return m_placement; } + void setPlacement(int); + + inline int direction() const { return m_direction; } + void setDirection(int); enum { Vertical = 1, Horizontal }; enum { TopLeft = 1, CenterLeft, BottomLeft, TopCenter, BottomCenter, |
