apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: Structures_Form_Element_Gtk2_TextSelect

Source Location: /Structures_Form_Gtk2-0.8.0devel/Element/Gtk2/TextSelect.php

Class Overview

Gtk2_IndexedComboBox
   |
   --Structures_Form_Element_Gtk2_TextSelect



Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 15]


[ Top ]


Class Variables

$form =

[line 23]

The Structures_Form object.
  • Access: public

Type:   object


[ Top ]



Method Detail

__construct (Constructor)   [line 37]

void __construct( Structures_Form $form, string $label, [array $data = null], [string $value = null], [array $size = null], [object $style = null])

Constructor.
  • Access: public

Parameters:

object   $form   —  The Structures_Form.
string   $label   —  The string to be used as the label.
array   $data   —  The default data (optional).
string   $value   —  The default value (optional).
array   $size   —  The height and width of the entry (optional).
object   $style   —  The GtkStyle to apply to the entry (optional).

[ Top ]

addEventHandler   [line 294]

integer addEventHandler( string $eventName, mixed $callback)

Adds an event handler for the element.
  • Return: An identifier for the callback.
  • Access: public

Parameters:

string   $eventName   —  The name of the event.
mixed   $callback   —  The callback to call when the event occurs.

[ Top ]

addOption   [line 125]

void addOption( string $key, string $value)

Adds an option to the select element.
  • Access: public

Parameters:

string   $key   — 
string   $value   — 

[ Top ]

clearValue   [line 158]

boolean clearValue( )

Clears the current value of the element.

This method should clear the current value if possible. For example, if the widget is a GtkEntry, this method should pass null to set_text(). If the value could not be cleared for some reason (the item is frozen or it is not possible to clear the value (selection type = browse)) this method should return false.

It may not be possible to clear this element type. If no null key was given, the element will not be cleared. Therefore, this method always returns true regardless of whether or not the element was cleared.

  • Return: true if the value was cleared.
  • Access: public

[ Top ]

freeze   [line 221]

void freeze( )

Freezes the element so that its value may not be changed.

Again this method exists only to maintain consistency in the interface. It should just pass false to set_sensitive().

To make life easier down the road this method should also call set_data('frozen', true);

  • Access: public

[ Top ]

getLabel   [line 281]

string getLabel( )

Returns the GtkLabel that identifies the element.
  • Access: public

[ Top ]

getName   [line 204]

string getName( )

Returns the element's name.

This method exists to maintain consistency in the interface. It should simply call get_name which is a GtkWidget method and should be available to all elements.

  • Access: public

[ Top ]

getText   [line 112]

string getText( )

Returns element's active text.
  • Access: public

[ Top ]

getType   [line 173]

string getType( )

Returns the element type.

This method must return a string identifying the element type, such as text, password, submit, etc.

  • Return: The element type.
  • Access: public

[ Top ]

getValue   [line 101]

string getValue( )

Returns element's value.

This method should return the widget's value not just some data from the widget (i.e. set with set_data()). For example if the widget is a GtkEntry, this method should call get_text(). If the widget is a GtkComboBox, this method should return the value of the column identified when the element was constructed for the given row.

  • Access: public

[ Top ]

isFrozen   [line 258]

boolean isFrozen( )

Returns whether or not the element is currently frozen.

This method should just return the value from get_data('frozen')

  • Access: public

[ Top ]

removeOption   [line 137]

void removeOption( string $key)

Removes an option from the select element.
  • Access: public

Parameters:

string   $key   — 

[ Top ]

setLabel   [line 270]

void setLabel( string $label)

Sets the GtkLabel that identifies the element.
  • Access: public

Parameters:

string   $label   — 

[ Top ]

setName   [line 189]

void setName( string $name)

Sets the element name.

This method exists to maintain consistency in the interface. It should simply call set_name which is a GtkWidget method and should be avialable to all elements.

  • Access: public

Parameters:

string   $name   — 

[ Top ]

setValue   [line 84]

boolean setValue( string $value)

Sets an element's value.

This method should set the value of the widget not just set some data that is retrieved later. If the widget is a GtkEntry, this method should call set_text(). If the widget is a GtkComboBox, this method should set the active row.

  • Return: true if the value was changed.
  • Access: public

Parameters:

string   $value   —  The text to put in the entry.

[ Top ]

unfreeze   [line 242]

void unfreeze( )

Unfreezes the element so that its value may not be changed.

Again this method exists only to maintain consistency in the interface. It should just pass true to set_sensitive().

To make life easier down the road this method should also call set_data('frozen', false);

  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:44:12 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.