Class: TTK_Button

Source Location: Program_Root/ticatk/widgets/button.inc

Class Overview

TTK_TKNode
   |
   --TTK_Widget
      |
      --TTK_Button

TicaTK Button

Author(s):

Version:

  • $Revision: 1.5 $

Copyright:

  • © 2001, 2002, 2003 Coleebris

Variables

Methods


Child classes:

Inherited Variables

Inherited Methods

Class: TTK_Widget

constructor TTK_Widget ( &$ticatk, [$id = false] )
TTK_Widget constructor
label_format ( $v )
Html format trim() + htmlentities()
set_img ( $attname, $imgsrc, [$local = false] )
As set_attr() with automatic adding of image size
watch_attr ( $attr, $callback )
Register a callback which will be called whenever this widget have specified attribute modified by the client The callback will be called with two arguments : this object and the attribute name
watch_close ( $callback )
Register a callback which will be called whenever this widget is closed by the client The callback will be called with one argument : this object id

Class: TTK_TKNode

constructor TTK_TKNode ( &$ticatk, &$doc, [$id = false] )
TTK_TKNode Constructor
&append_child ( $obj )
Append a node
close ( )
Delete the node
get_attr ( $attr )
Get value of a node attribute
get_bool_attr ( $attr )
Get boolean value of a node attribute
&get_child ( $id )
Get a child by id.
get_childs ( )
Get node's childs
get_id ( )
Get the node's id
get_id_attr ( $attr, [$return_object = true] )
Get value of a node attribute with optional automatic from value to an instance of TTK_TKNode (or subclass)
&get_parent ( )
Get the parent node
&get_ttk_object ( $node, $ticatk )
Map and return a TTK object from a DomNode
remove ( )
Remove the node from parent
set_attr ( $attr, $value, [$local = false] )
Set value of a node attribute
set_bool_attr ( $attr, $value, [$local = false] )
Set boolean value of a node attribute
set_id_attr ( $attr, $value, [$local = false] )
Set value of a node attribute with automatic conversion of value to id if value is an instance of TTK_TKNode (or subclass)
_associate ( $ticatk, $domnode )
Associate a DomNode to this node


Class Details

TicaTK Button

Tags:

[ Top ]


Class Variables


Class Methods

get_actiondef

mixed get_actiondef ( [$return_object = true] )

Get the actiondef to be launched on click if any

Tags:

Parameters:

  • boolean $return_object - If set to false, the id of the ActionDef will be returned

[ Top ]

get_imgsrc

string get_imgsrc ( )

Get the button's image src

Tags:

Parameters:

[ Top ]

get_label

string get_label ( )

Get the button's label

Tags:

Parameters:

[ Top ]

get_selimgsrc

string get_selimgsrc ( )

Get the button's selected image src

Tags:

Parameters:

[ Top ]

is_draggable

boolean is_draggable ( )

Return true if the button is draggable

Tags:

Parameters:

[ Top ]

is_enabled

boolean is_enabled ( )

Return true if the button is enabled

Tags:

Parameters:

[ Top ]

set_actiondef

void set_actiondef ( $value )

Set the actiondef to be launched on click

Tags:

Parameters:

  • mixed $value - TTK_ActionDef object or TTK_ActionDef id

[ Top ]

set_draggable

void set_draggable ( $value )

Set if the button can be dragged by the user

Tags:

Parameters:

  • boolean $value -

[ Top ]

set_enabled

void set_enabled ( $value )

Set if the button is enabled

Tags:

Parameters:

  • boolean $value -

[ Top ]

set_imgsrc

void set_imgsrc ( $value )

Set the button's image src

Tags:

Parameters:

  • string $value - Image url

[ Top ]

set_label

void set_label ( $value )

Set the button's label

Tags:

Parameters:

  • string $value -

[ Top ]

set_selimgsrc

void set_selimgsrc ( $value )

Set the button's selected image src

Tags:

Parameters:

  • string $value - Image url

[ Top ]

constructor TTK_Button

void constructor TTK_Button ( &$ticatk, [$id = false], [$label = false], [$imgsrc = false], [$selimgsrc = false], [$actiondef = false], [$draggable = false], [$enabled = true] )

TTK_Button constructor

Tags:

Parameters:

  • object $ticatk - TTK_TicaTK
  • string $id - Identity
  • string $label - Text label
  • string $imgsrc - Image file url
  • string $selimgsrc - Clicked Image File url (if not, use $imgsrc)
  • mixed $actiondef - TTK_ActionDef object or TTK_ActionDef id
  • boolean $draggable - Set if the button is draggable
  • boolean $enabled - Set if the button is enabled

[ Top ]


Documention generated on Mon, 17 Feb 2003 16:18:24 +0100 by phpDocumentor 1.1.0