diff options
author | simonb <simonb> | 2006-06-25 09:05:58 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-06-25 09:05:58 (GMT) |
commit | 80389b5dd5e7be4025cafbb2e7b055fd06f4f56d (patch) | |
tree | 1406d6c5044958bc40f2b7f4f8326ca8cc01629f /src/MenuCreator.hh | |
parent | 577859034db0e0e36ceab85ebba62e1018dd3361 (diff) | |
download | fluxbox_pavel-80389b5dd5e7be4025cafbb2e7b055fd06f4f56d.zip fluxbox_pavel-80389b5dd5e7be4025cafbb2e7b055fd06f4f56d.tar.bz2 |
support encodings in menu files
Diffstat (limited to 'src/MenuCreator.hh')
-rw-r--r-- | src/MenuCreator.hh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/MenuCreator.hh b/src/MenuCreator.hh index 66e7408..927b564 100644 --- a/src/MenuCreator.hh +++ b/src/MenuCreator.hh | |||
@@ -23,7 +23,10 @@ | |||
23 | #ifndef MENUCREATOR_HH | 23 | #ifndef MENUCREATOR_HH |
24 | #define MENUCREATOR_HH | 24 | #define MENUCREATOR_HH |
25 | 25 | ||
26 | #include "FbTk/FbString.hh" | ||
27 | |||
26 | #include <string> | 28 | #include <string> |
29 | #include <list> | ||
27 | 30 | ||
28 | namespace FbTk { | 31 | namespace FbTk { |
29 | class Menu; | 32 | class Menu; |
@@ -44,6 +47,26 @@ public: | |||
44 | static bool createWindowMenuItem(const std::string &type, const std::string &label, | 47 | static bool createWindowMenuItem(const std::string &type, const std::string &label, |
45 | FbTk::Menu &inject_into); | 48 | FbTk::Menu &inject_into); |
46 | 49 | ||
50 | /** | ||
51 | * Encoding-related helpers (encoding, aka codeset) | ||
52 | */ | ||
53 | |||
54 | // Files are guaranteed to be "balanced", unlike user-created [encoding] tags. | ||
55 | static void startFile(); | ||
56 | static void endFile(); | ||
57 | |||
58 | static void startEncoding(const std::string &encoding); | ||
59 | static void endEncoding(); | ||
60 | |||
61 | private: | ||
62 | // stack of encodings | ||
63 | static std::list<std::string> encoding_stack; | ||
64 | // stack of ints, representing stack size as each file is entered | ||
65 | // (a file should never end more encodings than it starts) | ||
66 | static std::list<size_t> stacksize_stack; | ||
67 | |||
68 | static FbTk::StringConvertor m_stringconvertor; | ||
69 | |||
47 | }; | 70 | }; |
48 | 71 | ||
49 | #endif // MENUCREATOR_HH | 72 | #endif // MENUCREATOR_HH |