diff options
Diffstat (limited to 'src/MenuCreator.hh')
-rw-r--r-- | src/MenuCreator.hh | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/src/MenuCreator.hh b/src/MenuCreator.hh index a9fb649..91add47 100644 --- a/src/MenuCreator.hh +++ b/src/MenuCreator.hh | |||
@@ -35,37 +35,16 @@ class Menu; | |||
35 | class FbMenu; | 35 | class FbMenu; |
36 | class FluxboxWindow; | 36 | class FluxboxWindow; |
37 | 37 | ||
38 | class MenuCreator { | 38 | namespace MenuCreator { |
39 | public: | 39 | |
40 | static FbMenu *createMenu(const std::string &label, int screen_num); | 40 | FbMenu *createMenu(const std::string &label, int screen_num); |
41 | static FbMenu *createMenuType(const std::string &label, int screen_num); | 41 | FbMenu *createMenuType(const std::string &label, int screen_num); |
42 | static bool createFromFile(const std::string &filename, | 42 | bool createFromFile(const std::string &filename, |
43 | FbTk::Menu &inject_into, | 43 | FbTk::Menu &inject_into, |
44 | FbTk::AutoReloadHelper *reloader = NULL, | 44 | FbTk::AutoReloadHelper *reloader = NULL, |
45 | bool begin = true); | 45 | bool begin = true); |
46 | static bool createWindowMenuItem(const std::string &type, const std::string &label, | 46 | bool createWindowMenuItem(const std::string &type, const std::string &label, |
47 | FbTk::Menu &inject_into); | 47 | FbTk::Menu &inject_into); |
48 | |||
49 | /** | ||
50 | * Encoding-related helpers (encoding, aka codeset) | ||
51 | */ | ||
52 | |||
53 | // Files are guaranteed to be "balanced", unlike user-created [encoding] tags. | ||
54 | static void startFile(); | ||
55 | static void endFile(); | ||
56 | |||
57 | static void startEncoding(const std::string &encoding); | ||
58 | static void endEncoding(); | ||
59 | |||
60 | private: | ||
61 | // stack of encodings | ||
62 | static std::list<std::string> encoding_stack; | ||
63 | // stack of ints, representing stack size as each file is entered | ||
64 | // (a file should never end more encodings than it starts) | ||
65 | static std::list<size_t> stacksize_stack; | ||
66 | |||
67 | static FbTk::StringConvertor m_stringconvertor; | ||
68 | |||
69 | }; | 48 | }; |
70 | 49 | ||
71 | #endif // MENUCREATOR_HH | 50 | #endif // MENUCREATOR_HH |