From d2e0aea0ae29289b44a82e66c44a9545a71b0d67 Mon Sep 17 00:00:00 2001 From: fluxgen <fluxgen> Date: Thu, 10 Jun 2004 11:42:35 +0000 Subject: added menu icon --- src/FbMenuParser.cc | 12 +++++++++++- src/FbMenuParser.hh | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/FbMenuParser.cc b/src/FbMenuParser.cc index fbb96b1..0f0b301 100644 --- a/src/FbMenuParser.cc +++ b/src/FbMenuParser.cc @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbMenuParser.cc,v 1.1 2004/05/02 21:02:26 fluxgen Exp $ +// $Id: FbMenuParser.cc,v 1.2 2004/06/10 11:42:35 fluxgen Exp $ #include "FbMenuParser.hh" @@ -59,6 +59,10 @@ Parser &FbMenuParser::operator >> (Parser::Item &out) { first = '{'; second = '}'; break; + case ICON: + first = '<'; + second = '>'; + break; case DONE: // get new line and call this again if (!nextLine()) { out = Parser::s_empty_item; @@ -78,6 +82,8 @@ Parser &FbMenuParser::operator >> (Parser::Item &out) { else if (m_curr_token == NAME) m_curr_token = ARGUMENT; else if (m_curr_token == ARGUMENT) + m_curr_token = ICON; + else if (m_curr_token == ICON) m_curr_token = DONE; out = Parser::s_empty_item; @@ -101,6 +107,10 @@ Parser &FbMenuParser::operator >> (Parser::Item &out) { break; case ARGUMENT: out.first = "ARGUMENT"; + m_curr_token = ICON; + break; + case ICON: + out.first = "ICON"; m_curr_token = DONE; break; case DONE: diff --git a/src/FbMenuParser.hh b/src/FbMenuParser.hh index e274ed8..a43e3e9 100644 --- a/src/FbMenuParser.hh +++ b/src/FbMenuParser.hh @@ -20,7 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbMenuParser.hh,v 1.1 2004/05/02 21:02:26 fluxgen Exp $ +// $Id: FbMenuParser.hh,v 1.2 2004/06/10 11:42:35 fluxgen Exp $ #ifndef FBMENUPARSER_HH #define FBMENUPARSER_HH @@ -52,7 +52,7 @@ private: int m_row; int m_curr_pos; std::string m_curr_line; - enum Object {TYPE, NAME, ARGUMENT, DONE} m_curr_token; + enum Object {TYPE, NAME, ARGUMENT, ICON, DONE} m_curr_token; }; #endif // FBMENUPARSER_HH -- cgit v0.11.2