C# Class Fluqi.Widget.jToolTip.ToolTip

Inheritance: Core.ControlBase, IControlRenderer, IControl
ファイルを表示 Open project: toepoke/Fluqi Class Usage Examples

Public Methods

Method Description
GetStartUpScript ( ) : string

Renders (and returns) the JavaScript required to initialise the ToolTip control with the required options. A jQuery document.ready section is wrapped around the script.

GetStartUpScript ( bool incDocReady ) : string

Writes out the tabs initialisation script to the Response.

Useful if you want more control over where the initialisation takes place.

Render ( ) : void

Writes the HTML for the ToolTip control to the response stream.

RenderStartUpScript ( ) : void

Writes out the document.ready, text/JavaScript and control initialisation script to the Response.

Useful if you want more control over where the initialisation takes place.

RenderStartUpScript ( bool incDocReady ) : void

Writes out the document.ready, text/JavaScript and control initialisation script to the Response.

Useful if you want more control over where the initialisation takes place.

ToolTip ( TextWriter writer ) : System

Detailed constructor

ToolTip ( TextWriter writer, string id ) : System

Detailed constructor

WithAttribute ( string attrName, string attrValue ) : ToolTip

Registers an HTML attribute to be added to the control when it is rendered.

WithCss ( string cssClasses ) : ToolTip

Registers a set of CSS class names to be added to the control when it is rendered. This is in addition to jQuery UI styles that may appear (see RenderCss property).

WithStyle ( string styleName, string styleValue ) : ToolTip

Registers an embedded style setting to be added to the control when it is rendered. These are written out as part of the "style" attribute, so we might add 'WithStyle("border", "solid 1px blue")' for example.

Protected Methods

Method Description
GetControlScript ( ) : string

Writes out the initialisation JavaScript to configure the tabs object client-side.

Useful if you want to declare your own document.ready and add in the initialisation yourself (if you have additional initialisation you want to perform for instance).

GetControlScript ( int tabDepth ) : string

Writes out the calling script for the jQuery Tabs plugin, adding options that have been a defined.

GetTagHtml ( ) : string

Builds and returns the HTML for the ToolTip control (basically the DIV). JavaScript initialisation for the control is also added to the response stream if the AutoScript rendering option is true.

IsGlobal ( ) : bool

Flags that tooltip settings should be applied globally on the page

In essence this just looks for an empty ID. If the ID is empty, we're not targetting a specific element => we're targetting everything on the page

WithID ( string idValue ) : ToolTip

Registers an ID attribute to be added to the control when it is rendered.

Method Details

GetControlScript() protected method

Writes out the initialisation JavaScript to configure the tabs object client-side.
Useful if you want to declare your own document.ready and add in the initialisation yourself (if you have additional initialisation you want to perform for instance).
protected GetControlScript ( ) : string
return string

GetControlScript() protected method

Writes out the calling script for the jQuery Tabs plugin, adding options that have been a defined.
protected GetControlScript ( int tabDepth ) : string
tabDepth int /// How far to indent the script code setting. ///
return string

GetStartUpScript() public method

Renders (and returns) the JavaScript required to initialise the ToolTip control with the required options. A jQuery document.ready section is wrapped around the script.
public GetStartUpScript ( ) : string
return string

GetStartUpScript() public method

Writes out the tabs initialisation script to the Response.
Useful if you want more control over where the initialisation takes place.
public GetStartUpScript ( bool incDocReady ) : string
incDocReady bool /// If true wraps the initialisation script with a jQuery document.ready section /// If false only the control initialisation script is written. ///
return string

GetTagHtml() protected method

Builds and returns the HTML for the ToolTip control (basically the DIV). JavaScript initialisation for the control is also added to the response stream if the AutoScript rendering option is true.
protected GetTagHtml ( ) : string
return string

IsGlobal() protected method

Flags that tooltip settings should be applied globally on the page
In essence this just looks for an empty ID. If the ID is empty, we're not targetting a specific element => we're targetting everything on the page
protected IsGlobal ( ) : bool
return bool

Render() public method

Writes the HTML for the ToolTip control to the response stream.
public Render ( ) : void
return void

RenderStartUpScript() public method

Writes out the document.ready, text/JavaScript and control initialisation script to the Response.
Useful if you want more control over where the initialisation takes place.
public RenderStartUpScript ( ) : void
return void

RenderStartUpScript() public method

Writes out the document.ready, text/JavaScript and control initialisation script to the Response.
Useful if you want more control over where the initialisation takes place.
public RenderStartUpScript ( bool incDocReady ) : void
incDocReady bool /// If true the control initialisation is wrapped in a jQuery document.ready and script /// declaration. /// If false no wrapping takes place. ///
return void

ToolTip() public method

Detailed constructor
public ToolTip ( TextWriter writer ) : System
writer System.IO.TextWriter Response stream to write the control to
return System

ToolTip() public method

Detailed constructor
public ToolTip ( TextWriter writer, string id ) : System
writer System.IO.TextWriter Response stream to write the control to
id string /// ID of the control (which must be unique on the page) /// Leave this empty to apply the tooltip settings to everything on the page (e.g. if you're targetting the /// [title] attribute for everything on the page) ///
return System

WithAttribute() public method

Registers an HTML attribute to be added to the control when it is rendered.
public WithAttribute ( string attrName, string attrValue ) : ToolTip
attrName string Name of the HTML attribute, e.g. "ToolTip" or "id" for example
attrValue string Value to be applied when the attribute is rendered
return ToolTip

WithCss() public method

Registers a set of CSS class names to be added to the control when it is rendered. This is in addition to jQuery UI styles that may appear (see RenderCss property).
public WithCss ( string cssClasses ) : ToolTip
cssClasses string Set of space separated CSS class names to add
return ToolTip

WithID() protected method

Registers an ID attribute to be added to the control when it is rendered.
protected WithID ( string idValue ) : ToolTip
idValue string Value for the ID
return ToolTip

WithStyle() public method

Registers an embedded style setting to be added to the control when it is rendered. These are written out as part of the "style" attribute, so we might add 'WithStyle("border", "solid 1px blue")' for example.
public WithStyle ( string styleName, string styleValue ) : ToolTip
styleName string Name of the style attribute to be added
styleValue string Value of the style to be added
return ToolTip