added menu icon
This commit is contained in:
parent
80ba32fb2d
commit
d2e0aea0ae
2 changed files with 13 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue