Files
pfUI/api/ui-widgets.xml
T
Brues 796f20eadf Show chat copy and the share box in ClassicAPI's scrolling edit box
pfUIScrollingEditBoxTemplate (api/ui-widgets.xml) is ScrollingEditBoxTemplate
with pfUIScrollBarTemplate beside the text. Its mixin's SetFont gives the
box a font object of its own, since the edit box sets its font by object on
every SetText and pfUI fonts are paths. ui-widgets.lua now loads before the
XML, which needs the mixin.

The share box no longer recomputes its scroll child on every text change.

Chat copy reads each chat frame's messages with ClassicAPI's
GetMessageInfo when it opens, so the AddMessage hook, its 100-line copy of
the history and the skip of combat frames are gone. It shows every line
the frame keeps, lines from before login included. It puts the caret at
the end to scroll to the newest line instead of three OnUpdate passes, and
Escape now leaves copy mode on every chat frame.
2026-10-30 00:38:54 -05:00

54 lines
1.8 KiB
XML

<Ui xmlns="http://www.blizzard.com/wow/ui/">
<!--
pfUI's scroll bar for ClassicAPI's ScrollBox: a thin track with a flat
thumb. ScrollBarMixin needs Back and Forward steppers, so they exist but
stay hidden. Hook it up with ScrollUtil.InitScrollBoxListWithScrollBar.
-->
<EventFrame name="pfUIScrollBarTemplate" inherits="VerticalScrollBarTemplate" virtual="true">
<Size x="7"/>
<KeyValues>
<KeyValue key="hideIfUnscrollable" value="true" type="boolean"/>
</KeyValues>
<Frames>
<Frame parentKey="Track" setAllPoints="true" enableMouse="true">
<Frames>
<EventButton parentKey="Thumb">
<Size x="7"/>
<Layers>
<Layer level="ARTWORK">
<Texture setAllPoints="true">
<Color r=".3" g="1" b=".8" a=".5"/>
</Texture>
</Layer>
</Layers>
</EventButton>
</Frames>
</Frame>
<EventButton parentKey="Back" hidden="true"/>
<EventButton parentKey="Forward" hidden="true"/>
</Frames>
</EventFrame>
<!--
ClassicAPI's ScrollingEditBoxTemplate with pfUIScrollBarTemplate beside the
text. The frame needs a name: SetFont(font, size, flags) names its font
object after it.
-->
<Frame name="pfUIScrollingEditBoxTemplate" inherits="ScrollingEditBoxTemplate" mixin="pfUIScrollingEditBoxMixin" virtual="true">
<KeyValues>
<KeyValue key="maxLetters" value="0" type="number"/>
</KeyValues>
<Frames>
<EventFrame parentKey="ScrollBar" inherits="pfUIScrollBarTemplate">
<Anchors>
<Anchor point="TOPRIGHT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
</EventFrame>
</Frames>
<Scripts>
<OnLoad method="InitScrollBar" inherit="prepend"/>
</Scripts>
</Frame>
</Ui>