# ChatTabs Chat tabs refer to the tabs/buttons that are below the {ref}`Chat` box. You can use these to change the current chat being viewed. ```{figure} ../../images/chattabs.png ``` - - - (EChatTab)= ## EChatTab enum ```pascal EChatTab = enum(NONE, ALL, GAME, PUB, PRIV, CHANNEL, CLAN, TRADE); ``` Enum representing each of the chat tabs available. - - - (EChatTabState)= ## EChatTabState enum ```pascal EChatTabState = enum(NONE, ENABLED, FILTERED, DISABLED, HIDE, AUTOCHAT); ``` Enum representing each of the filters a chat tab can have. You can see the filters when you right click the tab: ```{figure} ../../images/chattab_filter.png ``` - - - ## TChatTabs Record responsible with interacting with the {ref}`ChatTabs`. In {ref}`TChat` you have a `Tabs` variable of this type. - - - ## Chat.Tabs.SetupInterface ```pascal procedure TChatTabs.SetupInterface(); ``` Internal method used to setup the {ref}`TChatTabs` coordinates. This is automatically called for you on the {ref}`Chat.Tabs variable`. - - - ## Chat.Tabs.GetActive ```pascal function TChatTabs.GetActive(): EChatTab; ``` Returns the {ref}`TChatTab` that is active right now. Example: ```pascal WriteLn Chat.Tabs.GetActive(); ``` - - - ## Chat.Tabs.IsActive ```pascal function TChatTabs.IsActive(tab: EChatTab): Boolean; ``` Returns True/False if the specified {ref}`EChatTab` is active right now. Example: ```pascal WriteLn Chat.Tabs.IsActive(EChatTab.ALL); ``` - - - ## Chat.Tabs.Open ```pascal function TChatTabs.Open(tab: EChatTab): Boolean; ``` Attempts to open the specified {ref}`EChatTab`. Example: ```pascal WriteLn Chat.Tabs.Open(EChatTab.ALL); ``` - - - ## Chat.Tabs.GetState ```pascal function TChatTabs.GetState(tab: EChatTab): EChatTabState; ``` Returns the {ref}`EChatTabState` of the specified {ref}`EChatTab`. Example: ```pascal WriteLn Chat.Tabs.GetState(EChatTab.PUBLIC_); ``` - - - ## Chat.Tabs.ChangeState ```pascal function TChatTabs.ChangeState(tab: EChatTab; state: EChatTabState): Boolean; ``` Attempts to change the state of the specified {ref}`EChatTab` to the specified {ref}`EChatTabState`. Example: ```pascal WriteLn Chat.Tabs.GetState(EChatTab.PUBLIC_, EChatTabState.ENABLED); ```