#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. | |
| 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. | |
| virtual bool | RemoveItem (unsigned int position)=0 |
| Removes an item from the menu. | |
| 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. | |
| virtual unsigned int | GetItemCount ()=0 |
| Returns the number of items. | |
| virtual bool | SetPagination (unsigned int itemsPerPage)=0 |
| Sets the menu's pagination,. | |
| virtual unsigned int | GetPagination ()=0 |
| Returns an item's pagination. | |
| virtual IMenuStyle * | GetDrawStyle ()=0 |
| Returns the menu style. | |
| virtual void | SetDefaultTitle (const char *message)=0 |
| Sets the menu's display title/message. | |
| virtual const char * | GetDefaultTitle ()=0 |
| Returns the menu's display/title message. | |
| virtual bool | SetExtOption (MenuOption option, const void *valuePtr)=0 |
| Sets an extended menu option. | |
| virtual IMenuPanel * | CreatePanel ()=0 |
| Creates a new IMenuPanel object using extended options specific to the IMenuStyle parent. Titles, items, etc, are not copied. | |
| virtual bool | Display (int client, unsigned int time, IMenuHandler *alt_handler=NULL)=0 |
| Sends the menu to a client. | |
| virtual void | Destroy (bool releaseHandle=true)=0 |
| Destroys the menu and frees all associated resources. | |
| 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. | |
| virtual Handle_t | GetHandle ()=0 |
| Returns the menu's Handle. The Handle is automatically removed when the menu is destroyed. | |
| virtual unsigned int | GetMenuOptionFlags ()=0 |
| Returns menu option flags. | |
| virtual void | SetMenuOptionFlags (unsigned int flags)=0 |
| Sets menu option flags. | |
| virtual IMenuHandler * | GetHandler ()=0 |
| Returns the menu's handler. | |
| 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. | |
| virtual unsigned int | GetApproxMemUsage ()=0 |
| For the Handle system, returns approximate memory usage. | |
Definition at line 428 of file IMenuManager.h.
| virtual bool SourceMod::IBaseMenu::AppendItem | ( | const char * | info, | |
| const ItemDrawInfo & | draw | |||
| ) | [pure virtual] |
Appends an item to the end of a menu.
| info | Item information string. | |
| draw | Default drawing information. |
| virtual bool SourceMod::IBaseMenu::InsertItem | ( | unsigned int | position, | |
| const char * | info, | |||
| const ItemDrawInfo & | draw | |||
| ) | [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. |
| virtual bool SourceMod::IBaseMenu::RemoveItem | ( | unsigned int | position | ) | [pure virtual] |
Removes an item from the menu.
| position | Position, starting from 0. |
| virtual const char* SourceMod::IBaseMenu::GetItemInfo | ( | unsigned int | position, | |
| ItemDrawInfo * | draw | |||
| ) | [pure virtual] |
Returns an item's info.
| position | Position, starting from 0. | |
| draw | Optional pointer to store a draw information. |
| virtual unsigned int SourceMod::IBaseMenu::GetItemCount | ( | ) | [pure virtual] |
Returns the number of items.
| virtual bool SourceMod::IBaseMenu::SetPagination | ( | unsigned int | itemsPerPage | ) | [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. |
| virtual unsigned int SourceMod::IBaseMenu::GetPagination | ( | ) | [pure virtual] |
Returns an item's pagination.
| virtual IMenuStyle* SourceMod::IBaseMenu::GetDrawStyle | ( | ) | [pure virtual] |
Returns the menu style.
| virtual void SourceMod::IBaseMenu::SetDefaultTitle | ( | const char * | message | ) | [pure virtual] |
Sets the menu's display title/message.
| message | Message (format options allowed). |
| virtual const char* SourceMod::IBaseMenu::GetDefaultTitle | ( | ) | [pure virtual] |
Returns the menu's display/title message.
| virtual bool SourceMod::IBaseMenu::SetExtOption | ( | MenuOption | option, | |
| const void * | valuePtr | |||
| ) | [pure virtual] |
Sets an extended menu option.
| option | Option type. | |
| valuePtr | Pointer of the type expected by the option. |
| virtual IMenuPanel* SourceMod::IBaseMenu::CreatePanel | ( | ) | [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.
| virtual bool SourceMod::IBaseMenu::Display | ( | int | client, | |
| unsigned int | time, | |||
| IMenuHandler * | alt_handler = NULL | |||
| ) | [pure virtual] |
Sends the menu to a client.
| client | Client index to display to. | |
| time | Time to hold menu for. | |
| alt_handler | Alternate IMenuHandler. |
| virtual void SourceMod::IBaseMenu::Destroy | ( | bool | releaseHandle = true |
) | [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. |
| virtual void SourceMod::IBaseMenu::Cancel | ( | ) | [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.
| virtual Handle_t SourceMod::IBaseMenu::GetHandle | ( | ) | [pure virtual] |
Returns the menu's Handle. The Handle is automatically removed when the menu is destroyed.
| virtual unsigned int SourceMod::IBaseMenu::GetMenuOptionFlags | ( | ) | [pure virtual] |
Returns menu option flags.
| virtual void SourceMod::IBaseMenu::SetMenuOptionFlags | ( | unsigned int | flags | ) | [pure virtual] |
Sets menu option flags.
| flags | Menu option flags. |
| virtual IMenuHandler* SourceMod::IBaseMenu::GetHandler | ( | ) | [pure virtual] |
| virtual bool SourceMod::IBaseMenu::DisplayAtItem | ( | int | client, | |
| unsigned int | time, | |||
| unsigned int | start_item, | |||
| IMenuHandler * | alt_handler = NULL | |||
| ) | [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. |
| virtual unsigned int SourceMod::IBaseMenu::GetApproxMemUsage | ( | ) | [pure virtual] |
For the Handle system, returns approximate memory usage.
1.5.1