SourceMod::ITopMenuObjectCallbacks Class Reference

Top Menu callbacks for rendering/drawing. More...

#include <public/extensions/ITopMenus.h>

List of all members.

Public Member Functions

virtual unsigned int GetTopMenuAPIVersion1 ()
 Must return the topmenu API version.
virtual unsigned int OnTopMenuDrawOption (ITopMenu *menu, int client, unsigned int object_id)
 Requests how the given item should be drawn for a client.
virtual void OnTopMenuDisplayOption (ITopMenu *menu, int client, unsigned int object_id, char buffer[], size_t maxlength)=0
 Requests how the given item should be displayed for a client.
virtual void OnTopMenuDisplayTitle (ITopMenu *menu, int client, unsigned int object_id, char buffer[], size_t maxlength)=0
 Requests how the given item's title should be displayed for a client. This is called on any object_id that is a category.
virtual void OnTopMenuSelectOption (ITopMenu *menu, int client, unsigned int object_id)=0
 Notifies the listener that the menu option has been selected.
virtual void OnTopMenuObjectRemoved (ITopMenu *menu, unsigned int object_id)=0
 Notified when the given item is removed.


Detailed Description

Top Menu callbacks for rendering/drawing.

Definition at line 74 of file ITopMenus.h.


Member Function Documentation

virtual unsigned int SourceMod::ITopMenuObjectCallbacks::GetTopMenuAPIVersion1 (  )  [inline, virtual]

Must return the topmenu API version.

Returns:
Top Menu API version.

Definition at line 82 of file ITopMenus.h.

virtual unsigned int SourceMod::ITopMenuObjectCallbacks::OnTopMenuDrawOption ( ITopMenu menu,
int  client,
unsigned int  object_id 
) [inline, virtual]

Requests how the given item should be drawn for a client.

Unlike the other callbacks, this is only called in determining whether to enable, disable, or ignore an item on a client's menu.

Parameters:
menu A pointer to the parent ITopMenu.
client Client index.
object_id Object ID returned from ITopMenu::AddToMenu().
Returns:
ITEMDRAW flags to disable or not draw the option for this operation.

Definition at line 99 of file ITopMenus.h.

virtual void SourceMod::ITopMenuObjectCallbacks::OnTopMenuDisplayOption ( ITopMenu menu,
int  client,
unsigned int  object_id,
char  buffer[],
size_t  maxlength 
) [pure virtual]

Requests how the given item should be displayed for a client.

This can be called either while drawing a menu or to decide how to sort a menu for a player.

Parameters:
menu A pointer to the parent ITopMenu.
client Client index.
object_id Object ID returned from ITopMenu::AddToMenu().
buffer Buffer to store rendered text.
maxlength Maximum length of the rendering buffer.

virtual void SourceMod::ITopMenuObjectCallbacks::OnTopMenuDisplayTitle ( ITopMenu menu,
int  client,
unsigned int  object_id,
char  buffer[],
size_t  maxlength 
) [pure virtual]

Requests how the given item's title should be displayed for a client. This is called on any object_id that is a category.

Parameters:
menu A pointer to the parent ITopMenu.
client Client index.
object_id Object ID returned from ITopMenu::AddToMenu(), or 0 if the title is the root menu title.
buffer Buffer to store rendered text.
maxlength Maximum length of the rendering buffer.

virtual void SourceMod::ITopMenuObjectCallbacks::OnTopMenuSelectOption ( ITopMenu menu,
int  client,
unsigned int  object_id 
) [pure virtual]

Notifies the listener that the menu option has been selected.

Parameters:
menu A pointer to the parent ITopMenu.
client Client index.
object_id Object ID returned from ITopMenu::AddToMenu().

virtual void SourceMod::ITopMenuObjectCallbacks::OnTopMenuObjectRemoved ( ITopMenu menu,
unsigned int  object_id 
) [pure virtual]

Notified when the given item is removed.

Parameters:
menu A pointer to the parent ITopMenu.
object_id Object ID returned from ITopMenu::AddToMenu(), or 0 if the title callbacks are being removed.


The documentation for this class was generated from the following file:
Generated on Fri Nov 21 07:10:03 2008 for SourceMod SDK by  doxygen 1.5.1