diff options
author | fluxgen <fluxgen> | 2003-12-12 14:35:34 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-12-12 14:35:34 (GMT) |
commit | 722036eab018d8cd57511a38b15d3fe9714ac244 (patch) | |
tree | aa7913ebc1ba4f8abb04d80f9f21c53f6d500b90 /src/Container.hh | |
parent | 2d5df657edee2df4b6b8e28535ddfb12f502ea2d (diff) | |
download | fluxbox-722036eab018d8cd57511a38b15d3fe9714ac244.zip fluxbox-722036eab018d8cd57511a38b15d3fe9714ac244.tar.bz2 |
alignment
Diffstat (limited to 'src/Container.hh')
-rw-r--r-- | src/Container.hh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Container.hh b/src/Container.hh index 5f2ca4b..f620d3a 100644 --- a/src/Container.hh +++ b/src/Container.hh | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: Container.hh,v 1.3 2003/09/08 16:28:32 fluxgen Exp $ | 23 | // $Id: Container.hh,v 1.4 2003/12/12 14:35:34 fluxgen Exp $ |
24 | 24 | ||
25 | #ifndef CONTAINER_HH | 25 | #ifndef CONTAINER_HH |
26 | #define CONTAINER_HH | 26 | #define CONTAINER_HH |
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | class Container:public FbTk::FbWindow, public FbTk::EventHandler, private FbTk::NotCopyable { | 34 | class Container:public FbTk::FbWindow, public FbTk::EventHandler, private FbTk::NotCopyable { |
35 | public: | 35 | public: |
36 | enum Alignment { LEFT, RELATIVE, RIGHT }; | ||
36 | typedef FbTk::FbWindow * Item; | 37 | typedef FbTk::FbWindow * Item; |
37 | typedef std::list<Item> ItemList; | 38 | typedef std::list<Item> ItemList; |
38 | 39 | ||
@@ -51,6 +52,9 @@ public: | |||
51 | void removeAll(); | 52 | void removeAll(); |
52 | int find(Item item); | 53 | int find(Item item); |
53 | void setSelected(int index); | 54 | void setSelected(int index); |
55 | void setMaxSizePerClient(unsigned int size); | ||
56 | void setAlignment(Alignment a); | ||
57 | |||
54 | /// force update | 58 | /// force update |
55 | inline void update() { repositionItems(); } | 59 | inline void update() { repositionItems(); } |
56 | /// so we can add items without having an graphic update for each item | 60 | /// so we can add items without having an graphic update for each item |
@@ -60,6 +64,7 @@ public: | |||
60 | void exposeEvent(XExposeEvent &event); | 64 | void exposeEvent(XExposeEvent &event); |
61 | 65 | ||
62 | /// accessors | 66 | /// accessors |
67 | inline Alignment alignment() const { return m_align; } | ||
63 | inline int size() const { return m_item_list.size(); } | 68 | inline int size() const { return m_item_list.size(); } |
64 | inline const Item selected() const { return m_selected; } | 69 | inline const Item selected() const { return m_selected; } |
65 | inline Item selected() { return m_selected; } | 70 | inline Item selected() { return m_selected; } |
@@ -70,6 +75,8 @@ public: | |||
70 | private: | 75 | private: |
71 | void repositionItems(); | 76 | void repositionItems(); |
72 | 77 | ||
78 | Alignment m_align; | ||
79 | unsigned int m_max_size_per_client; | ||
73 | ItemList m_item_list; | 80 | ItemList m_item_list; |
74 | Item m_selected; | 81 | Item m_selected; |
75 | bool m_update_lock; | 82 | bool m_update_lock; |