Class: TTK_Node

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

Class Overview

TTK_TKNode
   |
   --TTK_Widget
      |
      --TTK_Node

TicaTK Tree Node

Author(s):

Version:

  • $Revision: 1.7 $

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 Tree Node

Tags:

[ Top ]


Class Variables


Class Methods

get_actiondraggable

mixed get_actiondraggable ( [$return_object = true] )

Get the actiondef triggered when the node is dropped

Tags:

Parameters:

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

[ Top ]

get_actionloadsub

mixed get_actionloadsub ( [$return_object = true] )

Get the actiondef triggered when the node is empty and first opened

Tags:

Parameters:

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

[ Top ]

get_imgsrc

void get_imgsrc ( )

Tags:

Parameters:

[ Top ]

get_label

(string) get_label ( )

Get Node label attribute

Tags:

  • Return - label
  • See - TTK_Widget::get_attr()

Parameters:

[ Top ]

get_menu

void get_menu ( [$return_object = true] )

Tags:

Parameters:

[ Top ]

get_openimgsrc

void get_openimgsrc ( )

Tags:

Parameters:

[ Top ]

get_sort

string get_sort ( )

Get sort attribute

Tags:

  • Return - sort attribute
  • See - TTK_Widget::get_attr()

Parameters:

[ Top ]

is_droptarget

boolean is_droptarget ( )

Return true if the node is a drop target

Tags:

Parameters:

[ Top ]

is_open

void is_open ( )

Tags:

Parameters:

[ Top ]

is_selected

void is_selected ( )

Tags:

Parameters:

[ Top ]

is_sortcase

void is_sortcase ( )

Tags:

Parameters:

[ Top ]

set_actiondraggable

void set_actiondraggable ( $value )

Set the actiondef triggered when the node is dropped

Tags:

  • See - TTK_Widget::set_attr()

Parameters:

  • mixed $value - TTK_ActionDef or actiondef id

[ Top ]

set_actionloadsub

void set_actionloadsub ( $value )

Set the actiondef triggered when the node is empty and first opened

Tags:

  • See - TTK_Widget::set_attr()

Parameters:

  • mixed $value - TTK_ActionDef or actiondef id

[ Top ]

set_droptarget

void set_droptarget ( $droptarget )

Modify droptarget attribute

Tags:

  • See - TTK_Widget::set_attr()

Parameters:

  • $droptarget $droptarget - boolean - New value

[ Top ]

set_imgsrc

void set_imgsrc ( $imgsrc )

Modify imgsrc attribute

Tags:

  • See - TTK_Widget::set_attr()

Parameters:

  • $imgsrc $imgsrc - string - New value

[ Top ]

set_label

void set_label ( $label, [$noformat = false] )

Modify label attribute

Tags:

  • See - TTK_Widget::set_attr()

Parameters:

  • boolean $noformat - Do not apply TTK_Widget::label_format()
  • $label $label - string - New value

[ Top ]

set_menu

void set_menu ( $menu )

Modify menu attribute

Tags:

  • See - TTK_Widget::set_attr(), TTK_Menu

Parameters:

  • mixed $menu - - TTK_Menu or TTK_Menu id

[ Top ]

set_open

void set_open ( $open )

Modify open attribute

Tags:

  • See - TTK_Widget::set_attr()

Parameters:

  • $open $open - boolean - New value

[ Top ]

set_openimgsrc

void set_openimgsrc ( $imgsrc )

Modify openimgsrc attribute

Tags:

  • See - TTK_Widget::set_attr()

Parameters:

  • $imgsrc $imgsrc - string - New value

[ Top ]

set_selected

void set_selected ( [$value = true] )

Modify selected attribute

Tags:

  • See - TTK_Widget::set_attr()

Parameters:

  • $selected $value - boolean - New value

[ Top ]

set_sort

void set_sort ( $value )

Modify sort attribute

Tags:

  • See - TTK_Widget::set_attr()

Parameters:

  • string $value - (nosort|sortasc|sortdesc)

[ Top ]

set_sortcase

void set_sortcase ( $value )

Tags:

Parameters:

[ Top ]

constructor TTK_Node

void constructor TTK_Node ( &$ticatk, [$id = false], [$label = false], [$imgsrc = false], [$openimgsrc = false], [$selected = false], [$menu = false], [$actionloadsub = false], [$open = false], [$actiondraggable = false], [$droptarget = false], [$sort = "nosort"], [$sortcase = false] )

TTK_Node constructor

Tags:

Parameters:

  • string $id -
  • string $label - Node label
  • string $imgsrc - Path of close icon image for the node
  • string $openimgsrc - Path of open icon image for the node (if not, $imgsrc is used)
  • boolean $selected -
  • mixed $menu - TTK_Menu object or TTK_Menu id
  • boolean $actionloadsub - Define if sub-nodes have to be loaded later
  • boolean $open - Define if node is opened on load
  • mixed $actiondraggable - TTK_ActionDef object or TTK_ActionDef id
  • boolean $droptarget - Define if node can receive a drop
  • string $sort - Define sort type of the sub-nodes ("nosort"|"sortasc"|"sortdesc")
  • boolean $sortcase - Define if case is respected for the sort
  • &$ticatk &$ticatk -

[ Top ]


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