SourceMod SDK  1.7
SourceMod::IMenuStyle Class Referenceabstract

Describes a "MenuStyle" system which manages menu drawing and construction. More...

#include <public/IMenuManager.h>

Public Member Functions

virtual unsigned int GetStyleAPIVersion ()
 Returns the style API version. More...
 
virtual const char * GetStyleName ()=0
 Returns the name of the menu style. More...
 
virtual IMenuPanelCreatePanel ()=0
 Creates an IMenuPanel object. More...
 
virtual IBaseMenuCreateMenu (IMenuHandler *handler, IdentityToken_t *pOwner=NULL)=0
 Creates an IBaseMenu object of this style. More...
 
virtual unsigned int GetMaxPageItems ()=0
 Returns the maximum number of items per page. More...
 
virtual MenuSource GetClientMenu (int client, void **object)=0
 Returns whether or not a client is viewing a menu. More...
 
virtual bool CancelClientMenu (int client, bool autoIgnore=false)=0
 Cancels a client's menu. More...
 
virtual Handle_t GetHandle ()=0
 Returns a Handle the IMenuStyle object. More...
 
virtual unsigned int GetApproxMemUsage ()=0
 For the Handle system, returns approximate memory usage. More...
 
virtual bool IsSupported ()=0
 Returns whether or not this style is supported by the current game. More...
 

Detailed Description

Describes a "MenuStyle" system which manages menu drawing and construction.

Member Function Documentation

virtual bool SourceMod::IMenuStyle::CancelClientMenu ( int  client,
bool  autoIgnore = false 
)
pure virtual

Cancels a client's menu.

Parameters
clientClient index.
autoIgnoreIf true, no menus can be created during the cancellation process.
Returns
True if a menu was cancelled, false otherwise.
virtual IBaseMenu* SourceMod::IMenuStyle::CreateMenu ( IMenuHandler handler,
IdentityToken_t *  pOwner = NULL 
)
pure virtual

Creates an IBaseMenu object of this style.

Note: the object should be freed using IBaseMenu::Destroy.

Parameters
handlerIMenuHandler pointer.
pOwnerOptional IdentityToken_t owner for handle creation.
Returns
An IBaseMenu pointer.
virtual IMenuPanel* SourceMod::IMenuStyle::CreatePanel ( )
pure virtual

Creates an IMenuPanel object.

Note: the object should be freed using ::DeleteThis.

Returns
IMenuPanel object.
virtual unsigned int SourceMod::IMenuStyle::GetApproxMemUsage ( )
pure virtual

For the Handle system, returns approximate memory usage.

Returns
Approximate number of bytes being used.
virtual MenuSource SourceMod::IMenuStyle::GetClientMenu ( int  client,
void **  object 
)
pure virtual

Returns whether or not a client is viewing a menu.

Parameters
clientClient index.
objectOptional pointer to retrieve menu object, if any.
Returns
MenuSource value.
virtual Handle_t SourceMod::IMenuStyle::GetHandle ( )
pure virtual

Returns a Handle the IMenuStyle object.

Returns
Handle_t pointing to this object.
virtual unsigned int SourceMod::IMenuStyle::GetMaxPageItems ( )
pure virtual

Returns the maximum number of items per page.

Menu implementations must return >= 2. Styles with only 1 or 0 items per page are not valid.

Returns
Number of items per page.
virtual unsigned int SourceMod::IMenuStyle::GetStyleAPIVersion ( )
inlinevirtual

Returns the style API version.

Returns
API version.
virtual const char* SourceMod::IMenuStyle::GetStyleName ( )
pure virtual

Returns the name of the menu style.

Returns
String containing the style name.
virtual bool SourceMod::IMenuStyle::IsSupported ( )
pure virtual

Returns whether or not this style is supported by the current game.

Returns
True if supported, otherwise false.

The documentation for this class was generated from the following file: