\Hazaar\View\Widgets
Panel

Basic button widget.

Tags

Since

1.1

Summary
Methods Properties Constants
set
val
No constants
Properties
Inherited
$element
$element
Inherited
$name
$name
Inherited
$script
$script
Methods
__construct()
__construct($name, $content = null)

Initialise a button widget

Parameters

$name

No description

$content

No description

append()
append($content) : string

Appends an element to the panel’s content.

Tags

Since

1.1

Parameters

$content

No description

Returns

string
autoUpdate()
autoUpdate($value) : \\Hazaar\\Widgets\\Panel

Automatically updates the panel, if its children size is changed.

Tags

Since

1.1

Parameters

$valuestring

The value to set

Returns

\\Hazaar\\Widgets\\Panel
clearcontent()
clearcontent() : string

Clears the panel’s content.

Tags

Since

1.1

Returns

string
disabled()
disabled($value) : \\Hazaar\\Widgets\\Panel

Sets or gets whether the panel is disabled.

Tags

Since

1.1

Parameters

$valuestring

The value to set

Returns

\\Hazaar\\Widgets\\Panel
getHScrollPosition()
getHScrollPosition() : string

Get the horizontal scrollbar’s position. Returns a Number.

Tags

Since

1.1

Returns

string
getScrollHeight()
getScrollHeight() : string

Get the scrollable height. Returns a Number.

Tags

Since

1.1

Returns

string
getScrollWidth()
getScrollWidth() : string

Get the scrollable width. Returns a Number.

Tags

Since

1.1

Returns

string
getVScrollPosition()
getVScrollPosition() : string

Get the vertical scrollbar’s position. Returns a Number.

Tags

Since

1.1

Returns

string
onLayout()
onLayout($code) : \\Hazaar\\Widgets\\Panel

Occurs when the layout is performed.

Tags

Since

1.1

Parameters

$codestring

The JavaScript code to execute when the event is triggered.

Returns

\\Hazaar\\Widgets\\Panel
prepend()
prepend($content) : string

Prepends an element to the panel’s content.

Tags

Since

1.1

Parameters

$content

No description

Returns

string
remove()
remove($content) : string

Remove an element from the panel’s content.

Tags

Since

1.1

Parameters

$content

No description

Returns

string
scrollBarSize()
scrollBarSize($value) : \\Hazaar\\Widgets\\Panel

Sets or gets the scrollbar’s size.

Tags

Since

1.1

Parameters

$valuestring

The value to set

Returns

\\Hazaar\\Widgets\\Panel
scrollTo()
scrollTo($x = 0, $y = 0) : string

Scroll to specific position.

Tags

Since

1.1

Parameters

$x

No description

$y

No description

Returns

string
sizeMode()
sizeMode($value) : \\Hazaar\\Widgets\\Panel

Sets or gets the sizing mode. In the ‘fixed’ mode, the panel displays scrollbars, if its content requires it. In the wrap mode, the scrollbars are not displayed and the panel automatically changes its size.

Possible Values:

  • ‘fixed’
  • ‘wrap’

Tags

Since

1.1

Parameters

$valuestring

The value to set

Returns

\\Hazaar\\Widgets\\Panel
Inherited
onClick()
onClick($value) : \Hazaar\View\Widgets\Widget

Adds a click event to a widget

Parameters

$valuemixed

The code as a string or JavaScript object, or array of objects to execute.

Returns

\Hazaar\View\Widgets\Widget
Inherited
render()
render() : string

Execute the render method on a widget

Returns

string

JavaScript code to execute the render method.

Inherited
renderObject()
renderObject() : string

Method to render the widget into HTML.

Returns

string

The widget rendererd as HTML.

Inherited
set()
set($key, $value = null, $type = null) : \Hazaar\View\Widgets\Widget

Sets a parameter that is sent to the DOM object.

This method can be used to set a single parameter, with the $key and $value arguments, or multiple parameters by just using the $key argument which is an array of key/value pairs of parameters that are to be set.

Parameters

$keymixed

The name of the parameter to be set, or an array of key/value pairs listing multiple parameters to be set.

$valuemixed

(Optional) The value of the parameter if only specifying one parameter.

$typestring

(Optional) The data type of the value. If set then this will be set explicitly.

Returns

\Hazaar\View\Widgets\Widget

A reference to the current object.

Inherited
setContent()
setContent($content) : string

Sets or gets the value.

Parameters

$content

No description

Returns

string
Inherited
style()
style($value)

Parameters

$value

No description

Inherited
theme()
theme($value) : \Hazaar\View\Widgets\Widget

Specifies the theme to use when initialising the widget. This is not normally needed as the default theme is set when creating each widget. However you may want to override the theme on a per widget basis and this allows for that.

Keep in mind that the theme file used will have to included manually.

Parameters

$valuestring

The name of the theme.

Returns

\Hazaar\View\Widgets\Widget

A reference to the current object.

Inherited
val()
val($value = null) : string

Sets or gets the value.

Parameters

$valuestring

The value to set

Returns

string
Inherited
width()
width($value) : \Hazaar\View\Widgets\Widget

Specifies the width of the widget in pixels.

Parameters

$valuemixed

The width value. Either an integer or string (with px suffix);

Returns

\Hazaar\View\Widgets\Widget

A reference to the current object.