/**
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 * In particular this file is part of the Framework Core Library
 *
 * The iWear Framework is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 * 
 * The iWear Framework is distributed in the hope that it will be
 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with The iWear Framework; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */

#ifndef __MARKASSISTANTMENUFUNCTOR_H
#define __MARKASSISTANTMENUFUNCTOR_H

// Standard includes

// iWear includes
#ifndef __UTILITY_H
#include <iwear/utility.h>
#endif

#ifndef __DEBUGSTREAM_H
#include <iwear/debugstream.h>
#endif

#ifndef __MENUFUNCTOR_H
#include <iwear_uiservices/menufunctor.h>
#endif

using namespace std;
using namespace iwear::uiservices;

namespace iwear {
namespace dcag {

    /** Forward declaration. */
    class DCAGMarkAssistant;

/**
 * MarkAssistantMenuFunctor
 * @author Jörn Reimerdes
 */
class MarkAssistantMenuFunctor : public virtual MenuFunctor {

public:

    /** Creates a new MarkAssistantMenuFunctor.
     * @param mark_assistant A reference to the mark assistant so that
     *  it can be controled from the functor.
     */
    MarkAssistantMenuFunctor(DCAGMarkAssistant* mark_assistant);

    /** Destroyes the MarkAssistantMenuFunctor.
     * 
     */   
    ~MarkAssistantMenuFunctor(void);

    /**
     * Is called on any menu action.
     */
    void on_element_selected(void);

    /**
     * If an element is activated
     */
    void on_element_activated(void);
    
    /**
     * If a jump event is called
     */
    inline void on_event_jump(void){
	d_nons << ANSI_YELLOW
	       << "MarkAssistantMenuFunctor::on_event_jump()"
	       << " - information: " << get_menu_event_information()
	       << ANSI_NORMAL
	       << endl;	
    }

    /**
     * If a switch event is called
     */
    inline void on_event_switch(void){
	d_nons << ANSI_YELLOW
	       << "MarkAssistantMenuFunctor::on_event_switch()"
	       << " - information: " << get_menu_event_information()
	       << ANSI_NORMAL
	       << endl;	
    }

    /**
     * If a quit event is called
     */
    inline void on_event_quit(void){
	d_nons << ANSI_YELLOW
	       << "MarkAssistantMenuFunctor::on_event_quit()"
	       << " - information: " << get_menu_event_information()
	       << ANSI_NORMAL
	       << endl;	
    }
protected: 

private:

    DCAGMarkAssistant* mark_assistant;

};

} // namespace dcag
} // namespace iwear


#endif // __MARKASSISTANTMENUFUNCTOR_H

