| 
    SourceMod SDK
    1.7
    
   | 
 
High-level interface for building menus. More...
#include <public/IMenuManager.h>
Public Member Functions | |
| virtual bool | AppendItem (const char *info, const ItemDrawInfo &draw)=0 | 
| Appends an item to the end of a menu.  More... | |
| virtual bool | InsertItem (unsigned int position, const char *info, const ItemDrawInfo &draw)=0 | 
| Inserts an item into the menu before a certain position; the new item will be at the given position and all next items pushed forward.  More... | |
| virtual bool | RemoveItem (unsigned int position)=0 | 
| Removes an item from the menu.  More... | |
| virtual void | RemoveAllItems ()=0 | 
| Removes all items from the menu.  | |
| virtual const char * | GetItemInfo (unsigned int position, ItemDrawInfo *draw)=0 | 
| Returns an item's info.  More... | |
| virtual unsigned int | GetItemCount ()=0 | 
| Returns the number of items.  More... | |
| virtual bool | SetPagination (unsigned int itemsPerPage)=0 | 
| Sets the menu's pagination,.  More... | |
| virtual unsigned int | GetPagination ()=0 | 
| Returns an item's pagination.  More... | |
| virtual IMenuStyle * | GetDrawStyle ()=0 | 
| Returns the menu style.  More... | |
| virtual void | SetDefaultTitle (const char *message)=0 | 
| Sets the menu's display title/message.  More... | |
| virtual const char * | GetDefaultTitle ()=0 | 
| Returns the menu's display/title message.  More... | |
| virtual bool | SetExtOption (MenuOption option, const void *valuePtr)=0 | 
| Sets an extended menu option.  More... | |
| virtual IMenuPanel * | CreatePanel ()=0 | 
| Creates a new IMenuPanel object using extended options specific to the IMenuStyle parent. Titles, items, etc, are not copied.  More... | |
| virtual bool | Display (int client, unsigned int time, IMenuHandler *alt_handler=NULL)=0 | 
| Sends the menu to a client.  More... | |
| virtual void | Destroy (bool releaseHandle=true)=0 | 
| Destroys the menu and frees all associated resources.  More... | |
| virtual void | Cancel ()=0 | 
| Cancels the menu on all client's displays. While the menu is being cancelled, the menu may not be re-displayed to any clients. If a vote menu is currently active, it will be cancelled as well.  More... | |
| virtual Handle_t | GetHandle ()=0 | 
| Returns the menu's Handle. The Handle is automatically removed when the menu is destroyed.  More... | |
| virtual unsigned int | GetMenuOptionFlags ()=0 | 
| Returns menu option flags.  More... | |
| virtual void | SetMenuOptionFlags (unsigned int flags)=0 | 
| Sets menu option flags.  More... | |
| virtual IMenuHandler * | GetHandler ()=0 | 
| Returns the menu's handler.  More... | |
| virtual bool | DisplayAtItem (int client, unsigned int time, unsigned int start_item, IMenuHandler *alt_handler=NULL)=0 | 
| Sends the menu to a client, starting from the given item number.  More... | |
| virtual unsigned int | GetApproxMemUsage ()=0 | 
| For the Handle system, returns approximate memory usage.  More... | |
High-level interface for building menus.
      
  | 
  pure virtual | 
Appends an item to the end of a menu.
| info | Item information string. | 
| draw | Default drawing information. | 
      
  | 
  pure virtual | 
Cancels the menu on all client's displays. While the menu is being cancelled, the menu may not be re-displayed to any clients. If a vote menu is currently active, it will be cancelled as well.
      
  | 
  pure virtual | 
Creates a new IMenuPanel object using extended options specific to the IMenuStyle parent. Titles, items, etc, are not copied.
Note: The object should be freed with IMenuPanel::DeleteThis.
      
  | 
  pure virtual | 
Destroys the menu and frees all associated resources.
| releaseHandle | If true, the Handle will be released in the destructor. This should be set to true except for IHandleTypeDispatch destructors. | 
      
  | 
  pure virtual | 
Sends the menu to a client.
| client | Client index to display to. | 
| time | Time to hold menu for. | 
| alt_handler | Alternate IMenuHandler. | 
      
  | 
  pure virtual | 
Sends the menu to a client, starting from the given item number.
Note: this API call was added in v13.
| client | Client index to display to. | 
| time | Time to hold menu for. | 
| start_item | Starting item to draw. | 
| alt_handler | Alternate IMenuHandler. | 
      
  | 
  pure virtual | 
For the Handle system, returns approximate memory usage.
      
  | 
  pure virtual | 
Returns the menu's display/title message.
      
  | 
  pure virtual | 
Returns the menu style.
      
  | 
  pure virtual | 
Returns the menu's Handle. The Handle is automatically removed when the menu is destroyed.
      
  | 
  pure virtual | 
Returns the menu's handler.
      
  | 
  pure virtual | 
Returns the number of items.
      
  | 
  pure virtual | 
Returns an item's info.
| position | Position, starting from 0. | 
| draw | Optional pointer to store a draw information. | 
      
  | 
  pure virtual | 
Returns menu option flags.
      
  | 
  pure virtual | 
Returns an item's pagination.
      
  | 
  pure virtual | 
Inserts an item into the menu before a certain position; the new item will be at the given position and all next items pushed forward.
| position | Position, starting from 0. | 
| info | Item information string. | 
| draw | Default item draw info. | 
      
  | 
  pure virtual | 
Removes an item from the menu.
| position | Position, starting from 0. | 
      
  | 
  pure virtual | 
Sets the menu's display title/message.
| message | Message (format options allowed). | 
      
  | 
  pure virtual | 
Sets an extended menu option.
| option | Option type. | 
| valuePtr | Pointer of the type expected by the option. | 
      
  | 
  pure virtual | 
Sets menu option flags.
| flags | Menu option flags. | 
      
  | 
  pure virtual | 
Sets the menu's pagination,.
If pagination is set to MENU_NO_PAGINATION, and the previous pagination was not MENU_NO_PAGINATION, then the MENUFLAG_BUTTON_EXIT is unset. It can be re-applied if desired.
| itemsPerPage | Number of items per page, or MENU_NO_PAGINATION. |