1.1 --- a/public/IRootConsoleMenu.h Fri Mar 28 06:21:34 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,105 +0,0 @@
1.4 -/**
1.5 - * vim: set ts=4 :
1.6 - * =============================================================================
1.7 - * SourceMod
1.8 - * Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
1.9 - * =============================================================================
1.10 - *
1.11 - * This program is free software; you can redistribute it and/or modify it under
1.12 - * the terms of the GNU General Public License, version 3.0, as published by the
1.13 - * Free Software Foundation.
1.14 - *
1.15 - * This program is distributed in the hope that it will be useful, but WITHOUT
1.16 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.17 - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.18 - * details.
1.19 - *
1.20 - * You should have received a copy of the GNU General Public License along with
1.21 - * this program. If not, see <http://www.gnu.org/licenses/>.
1.22 - *
1.23 - * As a special exception, AlliedModders LLC gives you permission to link the
1.24 - * code of this program (as well as its derivative works) to "Half-Life 2," the
1.25 - * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
1.26 - * by the Valve Corporation. You must obey the GNU General Public License in
1.27 - * all respects for all other code used. Additionally, AlliedModders LLC grants
1.28 - * this exception to all derivative works. AlliedModders LLC defines further
1.29 - * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
1.30 - * or <http://www.sourcemod.net/license.php>.
1.31 - *
1.32 - * Version: $Id$
1.33 - */
1.34 -
1.35 -#ifndef _INCLUDE_SOURCEMOD_ROOT_CONSOLE_MENU_H_
1.36 -#define _INCLUDE_SOURCEMOD_ROOT_CONSOLE_MENU_H_
1.37 -
1.38 -/**
1.39 - * @file IRootConsoleMenu.h
1.40 - * @brief Defines the interface for adding options to the "sm" console command.
1.41 - *
1.42 - * This interface is not yet exported. It will be eventually. The initial reason should
1.43 - * be obvious: we do not want users actually touching it. If we exposed this, every little
1.44 - * plugin would be dropping down a silly set of user commands, and exploiting/cluttering the menu.
1.45 - * Since this menu is explicitly provided for stuff that only Core itself is capable of managing,
1.46 - * we won't expose it until a legitimate reason comes up.
1.47 - */
1.48 -
1.49 -class CCommand;
1.50 -
1.51 -namespace SourceMod
1.52 -{
1.53 - /**
1.54 - * @brief Handles a root console menu action.
1.55 - */
1.56 - class IRootConsoleCommand
1.57 - {
1.58 - public:
1.59 - virtual void OnRootConsoleCommand(const char *cmdname, const CCommand &command) =0;
1.60 - };
1.61 -
1.62 - /**
1.63 - * @brief Manages the root console menu - the "sm" command for servers.
1.64 - */
1.65 - class IRootConsole
1.66 - {
1.67 - public:
1.68 - /**
1.69 - * @brief Adds a root console command handler. The command must be unique.
1.70 - *
1.71 - * @param cmd String containing the console command.
1.72 - * @param text Description text.
1.73 - * @param pHandler An IRootConsoleCommand pointer to handle the command.
1.74 - * @return True on success, false on too many commands or duplicate command.
1.75 - */
1.76 - virtual bool AddRootConsoleCommand(const char *cmd, const char *text, IRootConsoleCommand *pHandler) =0;
1.77 -
1.78 - /**
1.79 - * @brief Removes a root console command handler.
1.80 - *
1.81 - * @param cmd String containing the console command.
1.82 - * @param pHandler An IRootConsoleCommand pointer for verification.
1.83 - * @return True on success, false otherwise.
1.84 - */
1.85 - virtual bool RemoveRootConsoleCommand(const char *cmd, IRootConsoleCommand *pHandler) =0;
1.86 -
1.87 - /**
1.88 - * @brief Prints text back to the console.
1.89 - *
1.90 - * @param fmt Format of string.
1.91 - * @param ... Format arguments.
1.92 - */
1.93 - virtual void ConsolePrint(const char *fmt, ...) =0;
1.94 -
1.95 - /**
1.96 - * @brief Draws a generic command/description pair.
1.97 - * NOTE: The pair is currently four spaces indented and 16-N spaces of separation,
1.98 - * N being the length of the command name. This is subject to change in case we
1.99 - * account for Valve's font choices.
1.100 - *
1.101 - * @param cmd String containing the command option.
1.102 - * @param text String containing the command description.
1.103 - */
1.104 - virtual void DrawGenericOption(const char *cmd, const char *text) =0;
1.105 - };
1.106 -}
1.107 -
1.108 -#endif //_INCLUDE_SOURCEMOD_ROOT_CONSOLE_MENU_H_