diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2007-12-29 21:38:53 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2007-12-29 21:38:53 (GMT) |
commit | e1f362ae764884a4cd1e1673292cb37d5a85f89c (patch) | |
tree | 137430b26aee6f3638f27281d3757c2c75ef4b20 /src/FbTk/Menu.hh | |
parent | e90c3678d9e54bc9251619fdee2d7341f042167b (diff) | |
download | fluxbox-e1f362ae764884a4cd1e1673292cb37d5a85f89c.zip fluxbox-e1f362ae764884a4cd1e1673292cb37d5a85f89c.tar.bz2 |
'inline' in class declaration is implicitly inline
Diffstat (limited to 'src/FbTk/Menu.hh')
-rw-r--r-- | src/FbTk/Menu.hh | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh index 54c6d62..53b1375 100644 --- a/src/FbTk/Menu.hh +++ b/src/FbTk/Menu.hh | |||
@@ -54,12 +54,12 @@ class Menu: public FbTk::EventHandler, FbTk::FbWindowRenderer, | |||
54 | public: | 54 | public: |
55 | enum Alignment{ ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM }; | 55 | enum Alignment{ ALIGNDONTCARE = 1, ALIGNTOP, ALIGNBOTTOM }; |
56 | enum { RIGHT = 1, LEFT }; | 56 | enum { RIGHT = 1, LEFT }; |
57 | 57 | ||
58 | /** | 58 | /** |
59 | Bullet type | 59 | Bullet type |
60 | */ | 60 | */ |
61 | enum { EMPTY = 0, SQUARE, TRIANGLE, DIAMOND }; | 61 | enum { EMPTY = 0, SQUARE, TRIANGLE, DIAMOND }; |
62 | 62 | ||
63 | Menu(MenuTheme &tm, ImageControl &imgctrl); | 63 | Menu(MenuTheme &tm, ImageControl &imgctrl); |
64 | virtual ~Menu(); | 64 | virtual ~Menu(); |
65 | 65 | ||
@@ -79,11 +79,11 @@ public: | |||
79 | int remove(unsigned int item); | 79 | int remove(unsigned int item); |
80 | /// remove all items | 80 | /// remove all items |
81 | void removeAll(); | 81 | void removeAll(); |
82 | inline void setInternalMenu(bool val = true) { m_internal_menu = val; } | 82 | void setInternalMenu(bool val = true) { m_internal_menu = val; } |
83 | inline void setAlignment(Alignment a) { m_alignment = a; } | 83 | void setAlignment(Alignment a) { m_alignment = a; } |
84 | #ifdef NOT_USED | 84 | #ifdef NOT_USED |
85 | inline void setTorn() { m_torn = true; } | 85 | void setTorn() { m_torn = true; } |
86 | inline void removeParent() { if (m_internal_menu) m_parent = 0; } | 86 | void removeParent() { if (m_internal_menu) m_parent = 0; } |
87 | #endif | 87 | #endif |
88 | /// raise this window | 88 | /// raise this window |
89 | virtual void raise(); | 89 | virtual void raise(); |
@@ -119,7 +119,7 @@ public: | |||
119 | virtual void updateMenu(int active_index = -1); | 119 | virtual void updateMenu(int active_index = -1); |
120 | void setItemSelected(unsigned int index, bool val); | 120 | void setItemSelected(unsigned int index, bool val); |
121 | void setItemEnabled(unsigned int index, bool val); | 121 | void setItemEnabled(unsigned int index, bool val); |
122 | inline void setMinimumSublevels(int m) { menu.minsub = m; } | 122 | void setMinimumSublevels(int m) { menu.minsub = m; } |
123 | virtual void drawSubmenu(unsigned int index); | 123 | virtual void drawSubmenu(unsigned int index); |
124 | /// show menu | 124 | /// show menu |
125 | virtual void show(); | 125 | virtual void show(); |
@@ -129,54 +129,54 @@ public: | |||
129 | #ifdef NOT_USED | 129 | #ifdef NOT_USED |
130 | void setActiveIndex(int index) { m_active_index = index; } | 130 | void setActiveIndex(int index) { m_active_index = index; } |
131 | /*@}*/ | 131 | /*@}*/ |
132 | 132 | ||
133 | /** | 133 | /** |
134 | @name accessors | 134 | @name accessors |
135 | */ | 135 | */ |
136 | //@{ | 136 | //@{ |
137 | inline int activeIndex() const { return m_active_index; } | 137 | int activeIndex() const { return m_active_index; } |
138 | #endif | 138 | #endif |
139 | inline bool isTorn() const { return m_torn; } | 139 | bool isTorn() const { return m_torn; } |
140 | inline bool isVisible() const { return m_visible; } | 140 | bool isVisible() const { return m_visible; } |
141 | inline bool isMoving() const { return m_moving; } | 141 | bool isMoving() const { return m_moving; } |
142 | inline int screenNumber() const { return menu.window.screenNumber(); } | 142 | int screenNumber() const { return menu.window.screenNumber(); } |
143 | inline Window window() const { return menu.window.window(); } | 143 | Window window() const { return menu.window.window(); } |
144 | inline FbWindow &fbwindow() { return menu.window; } | 144 | FbWindow &fbwindow() { return menu.window; } |
145 | inline const FbWindow &fbwindow() const { return menu.window; } | 145 | const FbWindow &fbwindow() const { return menu.window; } |
146 | inline FbWindow &titleWindow() { return menu.title; } | 146 | FbWindow &titleWindow() { return menu.title; } |
147 | inline FbWindow &frameWindow() { return menu.frame; } | 147 | FbWindow &frameWindow() { return menu.frame; } |
148 | inline const std::string &label() const { return menu.label; } | 148 | const std::string &label() const { return menu.label; } |
149 | inline int x() const { return menu.window.x(); } | 149 | int x() const { return menu.window.x(); } |
150 | inline int y() const { return menu.window.y(); } | 150 | int y() const { return menu.window.y(); } |
151 | inline unsigned int width() const { return menu.window.width(); } | 151 | unsigned int width() const { return menu.window.width(); } |
152 | inline unsigned int height() const { return menu.window.height(); } | 152 | unsigned int height() const { return menu.window.height(); } |
153 | inline size_t numberOfItems() const { return menuitems.size(); } | 153 | size_t numberOfItems() const { return menuitems.size(); } |
154 | inline int currentSubmenu() const { return m_which_sub; } | 154 | int currentSubmenu() const { return m_which_sub; } |
155 | 155 | ||
156 | bool isItemSelected(unsigned int index) const; | 156 | bool isItemSelected(unsigned int index) const; |
157 | bool isItemEnabled(unsigned int index) const; | 157 | bool isItemEnabled(unsigned int index) const; |
158 | bool isItemSelectable(unsigned int index) const; | 158 | bool isItemSelectable(unsigned int index) const; |
159 | inline const MenuTheme &theme() const { return m_theme; } | 159 | const MenuTheme &theme() const { return m_theme; } |
160 | inline unsigned char alpha() const { return theme().alpha(); } | 160 | unsigned char alpha() const { return theme().alpha(); } |
161 | inline static Menu *shownMenu() { return shown; } | 161 | static Menu *shownMenu() { return shown; } |
162 | inline static Menu *focused() { return s_focused; } | 162 | static Menu *focused() { return s_focused; } |
163 | static void hideShownMenu(); | 163 | static void hideShownMenu(); |
164 | /// @return menuitem at index | 164 | /// @return menuitem at index |
165 | inline const MenuItem *find(unsigned int index) const { return menuitems[index]; } | 165 | const MenuItem *find(unsigned int index) const { return menuitems[index]; } |
166 | inline MenuItem *find(unsigned int index) { return menuitems[index]; } | 166 | MenuItem *find(unsigned int index) { return menuitems[index]; } |
167 | //@} | 167 | //@} |
168 | /// @return true if index is valid | 168 | /// @return true if index is valid |
169 | inline bool validIndex(int index) const { return (index < static_cast<int>(numberOfItems()) && index >= 0); } | 169 | bool validIndex(int index) const { return (index < static_cast<int>(numberOfItems()) && index >= 0); } |
170 | 170 | ||
171 | inline Menu *parent() { return m_parent; } | 171 | Menu *parent() { return m_parent; } |
172 | inline const Menu *parent() const { return m_parent; } | 172 | const Menu *parent() const { return m_parent; } |
173 | 173 | ||
174 | void renderForeground(FbWindow &win, FbDrawable &drawable); | 174 | void renderForeground(FbWindow &win, FbDrawable &drawable); |
175 | 175 | ||
176 | protected: | 176 | protected: |
177 | 177 | ||
178 | inline void setTitleVisibility(bool b) { | 178 | void setTitleVisibility(bool b) { |
179 | m_title_vis = b; m_need_update = true; | 179 | m_title_vis = b; m_need_update = true; |
180 | if (!b) | 180 | if (!b) |
181 | titleWindow().lower(); | 181 | titleWindow().lower(); |
182 | else | 182 | else |
@@ -196,7 +196,7 @@ protected: | |||
196 | 196 | ||
197 | virtual void update(FbTk::Subject *); | 197 | virtual void update(FbTk::Subject *); |
198 | 198 | ||
199 | private: | 199 | private: |
200 | 200 | ||
201 | void openSubmenu(); | 201 | void openSubmenu(); |
202 | void closeMenu(); | 202 | void closeMenu(); |
@@ -225,7 +225,7 @@ private: | |||
225 | bool m_torn; ///< torn from parent | 225 | bool m_torn; ///< torn from parent |
226 | bool m_internal_menu; ///< whether we should destroy this menu or if it's managed somewhere else | 226 | bool m_internal_menu; ///< whether we should destroy this menu or if it's managed somewhere else |
227 | bool m_title_vis; ///< title visibility | 227 | bool m_title_vis; ///< title visibility |
228 | 228 | ||
229 | int m_which_sub; | 229 | int m_which_sub; |
230 | Alignment m_alignment; | 230 | Alignment m_alignment; |
231 | 231 | ||