diff options
author | Mathias Gumz <akira@fluxbox.org> | 2015-01-15 17:49:35 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2015-01-15 17:49:45 (GMT) |
commit | bd9afcafb93382b5b7f32c222594699214581596 (patch) | |
tree | 418583c08c6e5ebdfcd172f5aba96d465c27d47b /src/ConfigMenu.hh | |
parent | 8387742c8860694777f7c2c62da0a90c9e836988 (diff) | |
download | fluxbox-bd9afcafb93382b5b7f32c222594699214581596.zip fluxbox-bd9afcafb93382b5b7f32c222594699214581596.tar.bz2 |
Refactor: split out menu generation from BScreen
Again, it's easier to read the code when the whole menu-generation is out of
the way.
Diffstat (limited to 'src/ConfigMenu.hh')
-rw-r--r-- | src/ConfigMenu.hh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/ConfigMenu.hh b/src/ConfigMenu.hh new file mode 100644 index 0000000..b778f0f --- /dev/null +++ b/src/ConfigMenu.hh | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef CONFIG_MENU_HH | ||
2 | #define CONFIG_MENU_HH | ||
3 | |||
4 | // ConfigMenu.cc for Fluxbox Window Manager | ||
5 | // Copyright (c) 2015 - Mathias Gumz <akira@fluxbox.org> | ||
6 | // | ||
7 | // Permission is hereby granted, free of charge, to any person obtaining a | ||
8 | // copy of this software and associated documentation files (the "Software"), | ||
9 | // to deal in the Software without restriction, including without limitation | ||
10 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
11 | // and/or sell copies of the Software, and to permit persons to whom the | ||
12 | // Software is furnished to do so, subject to the following conditions: | ||
13 | // | ||
14 | // The above copyright notice and this permission notice shall be included in | ||
15 | // all copies or substantial portions of the Software. | ||
16 | // | ||
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
20 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
23 | // DEALINGS IN THE SOFTWARE. | ||
24 | |||
25 | |||
26 | class BScreen; | ||
27 | class ScreenResource; | ||
28 | |||
29 | namespace FbTk{ | ||
30 | class Menu; | ||
31 | class ResourceManager; | ||
32 | } | ||
33 | |||
34 | class ConfigMenu { | ||
35 | public: | ||
36 | |||
37 | // makes the setup() function-signature shorter | ||
38 | struct SetupHelper { | ||
39 | BScreen& screen; | ||
40 | FbTk::ResourceManager& rm; | ||
41 | ScreenResource& resource; | ||
42 | }; | ||
43 | |||
44 | static void setup(FbTk::Menu& menu, SetupHelper& sh); | ||
45 | }; | ||
46 | |||
47 | #endif | ||