Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
Template:Widget
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Use this at the top of all WoW widget API pages. This template mostly just floats {{t|apinav}} table to the right and adds categories. Any pages with this template will be added to [[:Category:Widgets]]. See [[Widget API]]. See also [[Template:Widgetmethod]], [[Template:Widgethandler]], [[Template:Wowapi]]. ;Usage * 1 - API context type, like 'Glue'. Default is regular game play UI context. Affects wiki categories and page parent folder. Used by 'Glue' environment API. * t - [member, method] - identifier type for page, like if page subject is an general topic, object, method, or regular member. * removed - patch number removed in. See also [[Template:WoW/removedapi]] * replace - text explaining what to use if removed, replaced or deprecated. * toc - [0,1] - Force TOC enabled or disabled. Default depends on type. * tocright [1,0] - disables or enables toc going right side. Default is '1'. ;Examples * <code><nowiki>{{widget}}</nowiki></code> - Used for main page, widget topics, and widget api objects * <code><nowiki>{{widget|t=method}}</nowiki></code> - 'API Frame SetText' displays as 'Frame:SetText'. * <code><nowiki>{{widget|t=member}}</nowiki></code> - 'API Frame parent' displays as 'Frame.parent'. * <code><nowiki>{{widget|t=handler}}</nowiki></code> - 'UIHANDLER OnClick' displays as 'OnClick'. [[Category:Interface customization templates|{{PAGENAME}}]] ---- ;Template <onlyinclude><includeonly>__NOWYSIWYG__<!-- -->{{#if:{{{removed|}}}|{{WoW/removedapi|{{{removed|}}}|{{{replace|}}}}}}}<!-- --><div style="float:right; margin-left:2em; margin-bottom:1em">{{apinav|toc={{{toc|}}}}}<!-- do vars after apinav so not conflict -->{{#vardefine:tNAME|{{PAGENAME}}}}<!-- fixed-up display name without disambig prefixes -->{{#vardefine:tTYPE|{{#sub:{{PAGENAME}}|0|3}}}}<!-- page type 'API ' - whitespace gets trimmed -->{{#vardefine:tNSTART|{{#switch:{{#var:tTYPE}}|API=4|UIO=8|UIH=9|#default=0}}}}<!-- start of first real name -->{{#ifeq:{{#var:tNSTART}}|0||<!-- -->{{#vardefine:tNAME|{{#sub:{{#var:tNAME}}|{{#var:tNSTART}}}}}}<!-- to start of name without disambig -->}}<!-- -->{{#vardefine:tSTYPE|{{lc:{{{t|{{#var:tTYPE}}}}}}}}}<!-- parameter or automatic by page name for type -->{{#switch:{{#var:tSTYPE}}|member|method={{#vardefine:tSPAR|{{#sub:{{#var:tNAME}}|0|{{#pos:{{#var:tNAME}}|}}}}}}}}<!-- -->{{#switch:{{#var:tSTYPE}}|member|method={{#vardefine:tSNAM|{{#explode:{{#var:tNAME}}||-1}}}}}}<!-- -->{{#switch:{{#var:tSTYPE}}<!-- -->|member|method={{#vardefine:tNAME|{{#replace:{{#var:tNAME}}||{{#ifeq:{{#var:tSTYPE}}|member|.|:}}}}}}<!-- -->}}<!-- -->{{#vardefine:tCAT|{{#switch:{{#var:tSTYPE}}|method|member=Widget methods|handler=Widget event handlers|#default=Widgets}}}}<!-- -->{{#vardefine:tSCAT|{{#switch:{{#var:tSTYPE}}|method|member=Methods|handler=Handlers|#default={{#var:tCAT}}}}}}<!-- -->{{#vardefine:tPPAGE|{{#switch:{{#var:tSTYPE}}|handler|uih=Widget handlers|#default=Widget API}}}}<!-- --><div style="margin-left: 1em; margin-right: 1em;"><!-- cat link at bottom of api navbox --><small>→ [[:Category:{{#var:tCAT}}|{{#var:tSCAT}}]]</small></div><!-- --></div><!-- -->{{#ifeq:{{FULLPAGENAME}}|{{PAGENAME}}|[[Category:{{#var:tCAT}}|{{#var:tNAME}}]]}}<!-- skip if cat, tempate, etc... -->{{#if:{{{nosort|}}}||{{DEFAULTSORT:{{#var:tNAME}}}}}}<!-- -->{{#ifeq:{{#var:tSTYPE}}|uiob|{{#ifeq:{{{toc|}}}|1||__NOTOC__}}<!-- -->|{{#ifeq:{{{toc|}}}|0|__NOTOC__|{{#ifeq:{{{tocright|1}}}|0||{{tocright}}}}}}}}<!-- toc style -->{{#switch:{{FULLPAGENAME}}|Widget handlers|Widget API=|#default=<!-- if we are not actual list page -->{{DISPLAYTITLE: {{#switch:{{#var:tTYPE}}<!-- -->|API=Widget API:|UIH=Widget handler:|UIO=Widget:|#default=}} {{#var:tNAME}}}}<!-- -->}}<!-- -->{{#ifeq:{{FULLPAGENAME}}|{{#var:tPPAGE}}<!-- if we are actual parent page, a list page -->|{{#ifeq:{{FULLPAGENAME}}|Widget API||← [[wo:Widget API|Widget API]]|}}<!-- if top level don't render -->|← [[{{#var:tPPAGE}}|{{#var:tPPAGE}}]]<!-- -->}}<!-- -->{{#if:{{#var:tSPAR}}|<!-- --> ← [[UIOBJECT {{#var:tSPAR}}|{{#var:tSPAR}}]]<!-- -->}}<!-- -->{{#switch:{{#var:tTYPE}}<!-- if a list-able API signature or type, put list breadcrumb -->|API|UIO|UIH= < [[{{#var:tPPAGE}}#{{#var:tNAME}}|{{#var:tSNAM|{{#var:tNAME}}}}]]}}<!-- tTYPE ({{#var:tTYPE}}) --></includeonly></onlyinclude>
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)