Detailed Description

Handles the tab (draggable part) of a horizontal or vertical scrollbar.

Inheritance diagram for PowerUI.ScrollTabTag:
PowerUI.HtmlTagHandler Wrench.TagHandler PowerUI.HScrollTabTag PowerUI.VScrollTabTag

Public Member Functions

override bool SelfClosing ()
 Returns true if this tag has no kids and closes itself. For example <input type='text' />. Note that this method exists to make that final slash essentially optional. More...
 
override bool OnClick (UIEvent clickEvent)
 Called when the element is clicked (or the mouse is released over it). More...
 
virtual int SizeBefore ()
 The size (either width or height) of the element before the scroll tab. More...
 
virtual int SizeAfter ()
 The size (either width or height) of the element after the scroll tab. More...
 
virtual int StyleSize ()
 The total border/padding size on this axis of the tab itself. More...
 
void ElementScrolled (float progress)
 Called when the element has been scrolled. More...
 
void GetScrollBar ()
 Sets up the PowerUI.ScrollTabTag.ScrollBar property. More...
 
virtual bool UseX ()
 Checks if this is a horizontal scrollbar. More...
 
virtual int BarSize ()
 Gets the length of the bar in pixels. More...
 
virtual int TabPosition ()
 The current position of the tab. Note that width of elements before the tab like buttons are included in this. More...
 
float TabProgress ()
 Gets this tabs progress along the scrollbar, taking into account the size of the tab itself. More...
 
void ScrollBy (int pixels)
 Scrolls this scrollbar by the given number of pixels. Note that this may fail if the scrollbar cannot scroll any further. More...
 
virtual void ScrollBy (int pixels, bool fromCurrent, bool scrollTarget)
 Scrolls this scrollbar by the given number of pixels, optionally relative to a fixed point on the bar. Note that this may fail if the scrollbar cannot scroll any further. More...
 
virtual void Clicked (UIEvent clickEvent)
 Called when the tab is clicked on. More...
 
void ApplyTabSize (float percentSize)
 Makes the tab a percentage size relative to the length of the bar. More...
 
void ScrollTo (float percent, bool scrollTarget)
 Scrolls this tab to the specific percentage along the bar. 0-1. Optionally scrolls the target element. More...
 
virtual void ScrollTo (int location, bool scrollTarget)
 Scrolls this tab to the specific position along the bar. Optionally scrolls the target element. More...
 
virtual int TabSize ()
 Gets the tabs size in pixels. More...
 
- Public Member Functions inherited from PowerUI.HtmlTagHandler
void RequestLayout ()
 Requests the renderer handling this element to layout next update. More...
 
virtual bool Junk ()
 Tells the parser to not include this element in the DOM. More...
 
virtual void OnResetAllVariables ()
 Called when all variable () values must have their content reloaded. More...
 
virtual void OnResetVariable (string name)
 Called when the named variable variable () values must have its content reloaded. More...
 
virtual void OnRenderPass ()
 Called during a layout event on only the focused element. More...
 
virtual void HeightChanged ()
 Called when the fixed height of this element changes. More...
 
virtual void WidthChanged ()
 Called when the width of this element changes. More...
 
virtual void OnLayout ()
 Called during a layout event on all elements. More...
 
virtual void OnFocus ()
 Called when this element comes into focus. More...
 
virtual void OnBlur ()
 Called when this element becomes unfocused. More...
 
virtual void OnLoaded (string objectLoaded)
 Called when this elements content has been loaded. Used by e.g. iframe or img. More...
 
virtual void OnKeyPress (UIEvent pressEvent)
 Called on the focused element when a key is pressed or released. More...
 
virtual void OnMouseMove (UIEvent moveEvent)
 Called on the focused element when the mouse is moved. More...
 
virtual KeyboardMode OnShowMobileKeyboard ()
 Called when PowerUI attempts to display the mobile keyboard (only called on mobile platforms). More...
 
virtual void OnChildrenLoaded ()
 Called when the elements kids are fully loaded. More...
 
override bool OnAttributeChange (string property)
 Called when an attribute of the element was changed. Returns true if the method handled the change to prevent unnecessary checks. More...
 
- Public Member Functions inherited from Wrench.TagHandler
virtual string[] GetTags ()
 Returns all tags that are handled by this handler, e.g. "div" or "span". Usually there will be just one in the set but some tags may wish to have more. More...
 
virtual TagHandler GetInstance ()
 Makes a new instance of this tag handler. A global instance is made of this handler so this is used to generate a new instance in an efficient way. More...
 
virtual void OnTagLoaded ()
 Called when the tag is instanced and the element plus its attributes and kids have been fully parsed. More...
 
virtual void OnParseContent (MLLexer lexer)
 Called when the parser is reading the content of this tag for custom reading, e.g. a script/style tag. Non-self closing tags only. Anything that's not read by this method is assumed to be a child element. More...
 

Public Attributes

InputTag ScrollBar
 The scrollbar this tab belongs to. More...
 
- Public Attributes inherited from PowerUI.HtmlTagHandler
bool IsIsolated
 True if this element is isolated from style changes by its parent (e.g. used by iframes). More...
 
Element Element
 The element this tag handler is attached to. More...
 
bool IgnoreClick
 True if the element should ignore all clicks. More...
 
bool IsFocusable
 True if this tag is focusable. More...
 
bool IgnoreSelfClick
 Set this to true if this element should ignore clicks on itself, but not its kids (e.g. html or body). More...
 
- Public Attributes inherited from Wrench.TagHandler
int Priority
 If you define a tag handler with tags which already exist, this priority allows your tag to override the existing one optionally. All system tags have a priority of zero. More...
 
string TagExtension
 This is applied to every derivative of this tag handler. This enables tags to be grouped by file they are handling. e.g. "ui" extension and tag name "div" would become "ui-div" internally. More...
 

Protected Member Functions

virtual void SetTabSize (int newSize)
 Sets the tab to be the given size in pixels. More...
 

Member Function Documentation

void PowerUI.ScrollTabTag.ApplyTabSize ( float  percentSize)
inline

Makes the tab a percentage size relative to the length of the bar.

Parameters
percentSizeA value from 0->1 that represents how visible the content is and as a result how long the tab is.
virtual int PowerUI.ScrollTabTag.BarSize ( )
inlinevirtual

Gets the length of the bar in pixels.

Returns
The pixel length of the scrollbar.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

virtual void PowerUI.ScrollTabTag.Clicked ( UIEvent  clickEvent)
inlinevirtual

Called when the tab is clicked on.

Parameters
clickEventThe mouse click event.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

void PowerUI.ScrollTabTag.ElementScrolled ( float  progress)
inline

Called when the element has been scrolled.

Parameters
progressA value from 0->1 which denotes how much the content has been scrolled by.
void PowerUI.ScrollTabTag.GetScrollBar ( )
inline

Sets up the PowerUI.ScrollTabTag.ScrollBar property.

override bool PowerUI.ScrollTabTag.OnClick ( UIEvent  clickEvent)
inlinevirtual

Called when the element is clicked (or the mouse is released over it).

Parameters
clickEventThe UIEvent describing the click.

Reimplemented from PowerUI.HtmlTagHandler.

void PowerUI.ScrollTabTag.ScrollBy ( int  pixels)
inline

Scrolls this scrollbar by the given number of pixels. Note that this may fail if the scrollbar cannot scroll any further.

Parameters
pixelsThe number of pixels to scroll this bar by.
virtual void PowerUI.ScrollTabTag.ScrollBy ( int  pixels,
bool  fromCurrent,
bool  scrollTarget 
)
inlinevirtual

Scrolls this scrollbar by the given number of pixels, optionally relative to a fixed point on the bar. Note that this may fail if the scrollbar cannot scroll any further.

Parameters
pixelsThe number of pixels to scroll this bar by.
fromCurrentTrue if pixels is relative to where the tab currently is. False if pixels is relative to where the bar was when the mouse was clicked. See e.g. PowerUI.VScrollTabTag.StartY.
scrollTargetTrue if the target should also be scrolled.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

void PowerUI.ScrollTabTag.ScrollTo ( float  percent,
bool  scrollTarget 
)
inline

Scrolls this tab to the specific percentage along the bar. 0-1. Optionally scrolls the target element.

virtual void PowerUI.ScrollTabTag.ScrollTo ( int  location,
bool  scrollTarget 
)
inlinevirtual

Scrolls this tab to the specific position along the bar. Optionally scrolls the target element.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

override bool PowerUI.ScrollTabTag.SelfClosing ( )
inlinevirtual

Returns true if this tag has no kids and closes itself. For example <input type='text' />. Note that this method exists to make that final slash essentially optional.

Reimplemented from Wrench.TagHandler.

Reimplemented in PowerUI.VScrollTabTag.

virtual void PowerUI.ScrollTabTag.SetTabSize ( int  newSize)
inlineprotectedvirtual

Sets the tab to be the given size in pixels.

Parameters
newSizeThe size in pixels of the tab.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

virtual int PowerUI.ScrollTabTag.SizeAfter ( )
inlinevirtual

The size (either width or height) of the element after the scroll tab.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

virtual int PowerUI.ScrollTabTag.SizeBefore ( )
inlinevirtual

The size (either width or height) of the element before the scroll tab.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

virtual int PowerUI.ScrollTabTag.StyleSize ( )
inlinevirtual

The total border/padding size on this axis of the tab itself.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

virtual int PowerUI.ScrollTabTag.TabPosition ( )
inlinevirtual

The current position of the tab. Note that width of elements before the tab like buttons are included in this.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

float PowerUI.ScrollTabTag.TabProgress ( )
inline

Gets this tabs progress along the scrollbar, taking into account the size of the tab itself.

virtual int PowerUI.ScrollTabTag.TabSize ( )
inlinevirtual

Gets the tabs size in pixels.

Returns
The size of the tab in pixels.

Reimplemented in PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

virtual bool PowerUI.ScrollTabTag.UseX ( )
inlinevirtual

Checks if this is a horizontal scrollbar.

Returns
True if this is a horizontal scrollbar which uses the x axis; false otherwise.

Reimplemented in PowerUI.HScrollTabTag.

Member Data Documentation

InputTag PowerUI.ScrollTabTag.ScrollBar

The scrollbar this tab belongs to.