<commit_before>/*
 *   O         ,-
 *   o    . -  '     ,-
 *     .        ` . ,
 *     (    ))     . (
 *      `-;_    . - `.`.
 *          `._'       
 *
 * Copyright (c) 2007-2010 <NAME> <<EMAIL>>
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/mit-license.php
 */
#ifndef _PieDock_Menu_
#define _PieDock_Menu_

#include "Application.h"
#include "Settings.h"
#include "Icon.h"
#include "MenuItems.h"

#include <string>

namespace PieDock
{
	/**
	 * Abstract menu
	 *
	 * @author <NAME> <<EMAIL>>
	 */
	class Menu
	{
		public:
			Menu( Application * );
			virtual ~Menu() {}
			inline void setWindowBelowCursor( Window w ) {
				windowBelowCursor = w; }
			inline const Window &getWindowBelowCursor() const {
				return windowBelowCursor; }
			virtual bool update( std::string );
			virtual void draw( int, int ) {}
			virtual bool change( Settings::Action = Settings::Launch );
			virtual void execute( Settings::Action = Settings::Launch );
			virtual std::string getItemTitle() const;

		protected:
			Application *app;
			MenuItem *selected;
			MenuItems *menuItems;
			Window windowBelowCursor;

			virtual int run( std::string ) const;
	};
}

#endif<commit_msg>Added Menu::getSelected() to return the currently selected MenuItem<commit_after>/*
 *   O         ,-
 *   o    . -  '     ,-
 *     .        ` . ,
 *     (    ))     . (
 *      `-;_    . - `.`.
 *          `._'       
 *
 * Copyright (c) 2007-2010 <NAME> <<EMAIL>>
 *
 * Licensed under the MIT license:
 * http://www.opensource.org/licenses/mit-license.php
 */
#ifndef _PieDock_Menu_
#define _PieDock_Menu_

#include "Application.h"
#include "Settings.h"
#include "Icon.h"
#include "MenuItems.h"

#include <string>

namespace PieDock
{
	/**
	 * Abstract menu
	 *
	 * @author <NAME> <<EMAIL>>
	 */
	class Menu
	{
		public:
			Menu( Application * );
			virtual ~Menu() {}
			inline void setWindowBelowCursor( Window w ) {
				windowBelowCursor = w; }
			inline const Window &getWindowBelowCursor() const {
				return windowBelowCursor; }
			virtual bool update( std::string );
			virtual void draw( int, int ) {}
			virtual bool change( Settings::Action = Settings::Launch );
			virtual void execute( Settings::Action = Settings::Launch );
			virtual std::string getItemTitle() const;
			inline MenuItem *getSelected() const {
				return selected; }

		protected:
			Application *app;
			MenuItem *selected;
			MenuItems *menuItems;
			Window windowBelowCursor;

			virtual int run( std::string ) const;
	};
}

#endif
{'fraction_non_alphanumeric': 0.1415506958250497, 'fraction_numerical': 0.006361829025844931, 'mean_word_length': 2.6945668135095446, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1291434', 'n_tokens_mistral': 919, 'n_tokens_neox': 797, 'n_words': 200}