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

Class: Structures_Form_Element_Gtk2_FileSelect

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

Class Overview

GtkFileChooserButton
   |
   --Structures_Form_Element_Gtk2_FileSelect



Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 14]


[ Top ]


Class Variables

$fileAtConstruct =

[line 30]

The file set at construct time.
  • Access: protected

Type:   string


[ Top ]

$form =

[line 22]

The Structures_Form object.
  • Access: public

Type:   object


[ Top ]



Method Detail

__construct (Constructor)   [line 44]

void __construct( Structures_Form $form, [string $label = ''], [string $file = null], [integer $action = 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.
string   $file   —  The default file (optional).
integer   $action   —  The file chooser action (optional).
array   $size   —  The height and width of the entry (optional).
object   $style   —  The GtkStyle to apply to the entry (optional).

[ Top ]

addEventHandler   [line 269]

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 ]

clearValue   [line 134]

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.

  • Return: true at all times.
  • Access: public

[ Top ]

freeze   [line 196]

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 256]

string getLabel( )

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

[ Top ]

getName   [line 179]

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 ]

getType   [line 148]

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 117]

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 233]

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 ]

setLabel   [line 245]

void setLabel( string $label)

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

Parameters:

string   $label   — 

[ Top ]

setName   [line 164]

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 92]

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 217]

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.