diff options
Diffstat (limited to 'src/Tab.hh')
-rw-r--r-- | src/Tab.hh | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | // Tab.hh for Fluxbox | 1 | // Tab.hh for Fluxbox Window Manager |
2 | // Copyright (c) 2001 Henrik Kinnunen (fluxgen@linuxmail.org) | 2 | // Copyright (c) 2001-2002 Henrik Kinnunen (fluxgen@linuxmail.org) |
3 | // | 3 | // |
4 | // Permission is hereby granted, free of charge, to any person obtaining a | 4 | // Permission is hereby granted, free of charge, to any person obtaining a |
5 | // copy of this software and associated documentation files (the "Software"), | 5 | // copy of this software and associated documentation files (the "Software"), |
@@ -19,6 +19,8 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: Tab.hh,v 1.6 2002/01/11 09:44:35 fluxgen Exp $ | ||
23 | |||
22 | #ifndef _TAB_HH_ | 24 | #ifndef _TAB_HH_ |
23 | #define _TAB_HH_ | 25 | #define _TAB_HH_ |
24 | 26 | ||
@@ -42,6 +44,9 @@ public: | |||
42 | void draw(bool pressed); | 44 | void draw(bool pressed); |
43 | inline Tab *next() const { return m_next; } | 45 | inline Tab *next() const { return m_next; } |
44 | inline Tab *prev() const { return m_prev; } | 46 | inline Tab *prev() const { return m_prev; } |
47 | inline Tab *last() { return getLast(this); } | ||
48 | inline Tab *first() { return getFirst(this); } | ||
49 | |||
45 | inline FluxboxWindow *getWindow() const { return m_win; } | 50 | inline FluxboxWindow *getWindow() const { return m_win; } |
46 | inline unsigned int getTabWidth() const { return m_size_w; } | 51 | inline unsigned int getTabWidth() const { return m_size_w; } |
47 | inline unsigned int getTabHeight() const { return m_size_h; } | 52 | inline unsigned int getTabHeight() const { return m_size_h; } |
@@ -62,10 +67,11 @@ public: | |||
62 | void exposeEvent(XExposeEvent *ee); | 67 | void exposeEvent(XExposeEvent *ee); |
63 | void motionNotifyEvent(XMotionEvent *me); | 68 | void motionNotifyEvent(XMotionEvent *me); |
64 | static Tab *getFirst(Tab *current); | 69 | static Tab *getFirst(Tab *current); |
70 | static Tab *getLast(Tab *current); | ||
65 | void disconnect(); | 71 | void disconnect(); |
66 | 72 | ||
67 | enum { PTop = 0, PBottom = 5, PLeft = 10, PRight = 15, pnone = 20}; | 73 | enum { PTOP = 0, PBOTTOM = 5, PLEFT = 10, PRIGHT = 15, PNONE = 20}; |
68 | enum { ALeft = 0, ACenter, ARight, ARelative, anone }; | 74 | enum { ALEFT = 0, ACENTER, ARIGHT, ARELATIVE, ANONE }; |
69 | 75 | ||
70 | static const char *getTabPlacementString(int placement); | 76 | static const char *getTabPlacementString(int placement); |
71 | static int getTabPlacementNum(const char *string); | 77 | static int getTabPlacementNum(const char *string); |
@@ -89,6 +95,7 @@ private: | |||
89 | static const int m_max_tabs; | 95 | static const int m_max_tabs; |
90 | bool m_focus, m_moving; // moving and focus | 96 | bool m_focus, m_moving; // moving and focus |
91 | void createTabWindow(); // creates the X win of tab | 97 | void createTabWindow(); // creates the X win of tab |
98 | void loadTheme(); // loads the textures with right width and height | ||
92 | void setTabWidth(unsigned int w); | 99 | void setTabWidth(unsigned int w); |
93 | void setTabHeight(unsigned int h); | 100 | void setTabHeight(unsigned int h); |
94 | unsigned int calcRelativeWidth(); | 101 | unsigned int calcRelativeWidth(); |