SourceMod::IMenuHandler Class Reference

Contains callbacks for menu actions. More...

#include <public/IMenuManager.h>

List of all members.

Public Member Functions

virtual unsigned int GetMenuAPIVersion2 ()
 Returns the menu api verison.
virtual void OnMenuStart (IBaseMenu *menu)
 A display/selection cycle has started.
virtual void OnMenuDisplay (IBaseMenu *menu, int client, IMenuPanel *display)
 Called before a menu is being displayed. This is where you can set an alternate title on the menu.
virtual void OnMenuSelect (IBaseMenu *menu, int client, unsigned int item)
 Called when an item is selected.
virtual void OnMenuCancel (IBaseMenu *menu, int client, MenuCancelReason reason)
 An active menu display was dropped from a client.
virtual void OnMenuEnd (IBaseMenu *menu, MenuEndReason reason)
 A display/selection cycle has ended.
virtual void OnMenuDestroy (IBaseMenu *menu)
 Called when the menu object is destroyed.
virtual void OnMenuDrawItem (IBaseMenu *menu, int client, unsigned int item, unsigned int &style)
 Called when requesting how to render an item.
virtual unsigned int OnMenuDisplayItem (IBaseMenu *menu, int client, IMenuPanel *panel, unsigned int item, const ItemDrawInfo &dr)
 Called when drawing item text.
virtual void OnMenuVoteStart (IBaseMenu *menu)
 Called when a vote has been started and displayed to clients. This is called after OnMenuStart() and OnMenuDisplay(), but before OnMenuSelect().
virtual void OnMenuVoteResults (IBaseMenu *menu, const menu_vote_result_t *results)
 Called when a vote ends. This is automatically called by the wrapper, and never needs to called from a style implementation.
virtual void OnMenuVoteCancel (IBaseMenu *menu, VoteCancelReason reason)
 Called when a vote is cancelled. If this is called, then OnMenuVoteResults() will not be called. In both cases, OnMenuEnd will always be called.
virtual bool OnSetHandlerOption (const char *option, const void *data)
 Call to set private handler stuff.
virtual void OnMenuSelect2 (IBaseMenu *menu, int client, unsigned int item, unsigned int item_on_page)
 Called when an item is selected.


Detailed Description

Contains callbacks for menu actions.

Definition at line 626 of file IMenuManager.h.


Member Function Documentation

virtual unsigned int SourceMod::IMenuHandler::GetMenuAPIVersion2 (  )  [inline, virtual]

Returns the menu api verison.

Returns:
Menu API version.

Definition at line 634 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuStart ( IBaseMenu menu  )  [inline, virtual]

A display/selection cycle has started.

Parameters:
menu Menu pointer.

Definition at line 644 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuDisplay ( IBaseMenu menu,
int  client,
IMenuPanel display 
) [inline, virtual]

Called before a menu is being displayed. This is where you can set an alternate title on the menu.

Parameters:
menu Menu pointer.
client Client index.
display IMenuPanel pointer.

Definition at line 656 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuSelect ( IBaseMenu menu,
int  client,
unsigned int  item 
) [inline, virtual]

Called when an item is selected.

Parameters:
menu Menu pointer.
client Client that selected the item.
item Item number.

Definition at line 667 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuCancel ( IBaseMenu menu,
int  client,
MenuCancelReason  reason 
) [inline, virtual]

An active menu display was dropped from a client.

Parameters:
menu Menu pointer.
client Client that had the menu.
reason Menu cancellation reason.

Definition at line 678 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuEnd ( IBaseMenu menu,
MenuEndReason  reason 
) [inline, virtual]

A display/selection cycle has ended.

Parameters:
menu Menu pointer.
reason MenuEndReason reason.

Definition at line 688 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuDestroy ( IBaseMenu menu  )  [inline, virtual]

Called when the menu object is destroyed.

Parameters:
menu Menu pointer.

Definition at line 697 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuDrawItem ( IBaseMenu menu,
int  client,
unsigned int  item,
unsigned int &  style 
) [inline, virtual]

Called when requesting how to render an item.

Parameters:
menu Menu pointer.
client Client index receiving the menu.
item Item number in the menu.
style ITEMSTYLE flags, by reference for modification.

Definition at line 709 of file IMenuManager.h.

virtual unsigned int SourceMod::IMenuHandler::OnMenuDisplayItem ( IBaseMenu menu,
int  client,
IMenuPanel panel,
unsigned int  item,
const ItemDrawInfo dr 
) [inline, virtual]

Called when drawing item text.

Parameters:
menu Menu pointer.
client Client index receiving the menu.
panel Panel being used to draw the menu.
item Item number in the menu.
dr Item draw information.
Returns:
0 to let the render algorithm decide how to draw, otherwise, the return value from panel->DrawItem should be returned.

Definition at line 724 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuVoteStart ( IBaseMenu menu  )  [inline, virtual]

Called when a vote has been started and displayed to clients. This is called after OnMenuStart() and OnMenuDisplay(), but before OnMenuSelect().

Parameters:
menu Menu pointer.

Definition at line 740 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuVoteResults ( IBaseMenu menu,
const menu_vote_result_t results 
) [inline, virtual]

Called when a vote ends. This is automatically called by the wrapper, and never needs to called from a style implementation.

This function does not replace OnMenuEnd(), nor does it have the same meaning as OnMenuEnd(), meaning you should not destroy a menu while it is in this function.

Parameters:
menu Menu pointer.
results Menu vote results.

Definition at line 755 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuVoteCancel ( IBaseMenu menu,
VoteCancelReason  reason 
) [inline, virtual]

Called when a vote is cancelled. If this is called, then OnMenuVoteResults() will not be called. In both cases, OnMenuEnd will always be called.

Parameters:
menu Menu pointer.
reason VoteCancelReason reason.

Definition at line 767 of file IMenuManager.h.

virtual bool SourceMod::IMenuHandler::OnSetHandlerOption ( const char *  option,
const void *  data 
) [inline, virtual]

Call to set private handler stuff.

Parameters:
option Option name.
data Private data.
Returns:
True if set, false if invalid or unrecognized.

Definition at line 778 of file IMenuManager.h.

virtual void SourceMod::IMenuHandler::OnMenuSelect2 ( IBaseMenu menu,
int  client,
unsigned int  item,
unsigned int  item_on_page 
) [inline, virtual]

Called when an item is selected.

Note: This callback was added in v13. It is called after OnMenuSelect().

Parameters:
menu Menu pointer.
client Client that selected the item.
item Item number.
item_on_page The first item on the page the player was last viewing.

Definition at line 794 of file IMenuManager.h.


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