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

Class: Gtk2_IndexedComboBox

Source Location: /Gtk2_IndexedComboBox-1.1.0/Gtk2/IndexedComboBox.php

Class Overview

GtkComboBox
   |
   --Gtk2_IndexedComboBox

Indexed Gtk2 combo box similar to the HTML select box.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 36]
Indexed Gtk2 combo box similar to the HTML select box.

Lets you not only store values as the normal GtkComboBox, but associated keys as well. The active key can be easily received with get_active_key.

It imitates the convenience methods of a text-based GtkComboBox that is constructed with GtkComboBox::new_text().

Both key and values can be strings or integers.

Method names aren't camelCase but with underscores to be close the naming of the original Gtk2 methods.



[ Top ]


Class Variables

$renderer =  null

[line 42]

The cell renderer for the text
  • Access: protected

Type:   GtkCellRenderer


[ Top ]



Method Detail

__construct (Constructor)   [line 51]

Gtk2_IndexedComboBox __construct( [array $arData = null])

Create a new instance
  • Access: public

Parameters:

array   $arData     Array of key-value pairs

[ Top ]

append   [line 77]

void append( string $strId, string $strValue)

Appends a single key/value pair to the list.
  • Access: public

Parameters:

string   $strId     The id to append
string   $strValue     The value to append

[ Top ]

appendArray   [line 303]

void appendArray( array $arData)

Appends an array (key and value) as data to the store.

Alias of @see append_array().

  • Access: public

Parameters:

array   $arData     The array to append

[ Top ]

append_array   [line 91]

void append_array( array $arData)

Appends an array (key and value) as data to the store.
  • Access: public

Parameters:

array   $arData     The array to append

[ Top ]

getActiveKey   [line 318]

string getActiveKey( )

Returns the id of the active entry.

If there is no active key, NULL will be returned.

Alias of @see get_active_key().

  • Return: The id/key of the selected entry
  • Access: public

[ Top ]

getActiveText   [line 333]

string getActiveText( )

Returns the string of the active entry.

If there is no active entry, NULL will be returned.

Alias of @see getActiveText();

  • Return: The string value of the selected entry
  • Access: public

[ Top ]

getArray   [line 347]

array getArray( )

Returns an array with all key/value pairs.

Alias of @see get_array().

  • Return: Array with key/value pairs in the model
  • Access: public

[ Top ]

getCellRenderer   [line 361]

GtkCellRenderer getCellRenderer( )

Returns the default cell renderer.

Alias of @see get_cell_renderer().

  • Return: The default cell renderer
  • Access: public

[ Top ]

get_active_key   [line 104]

string get_active_key( )

Returns the id of the active entry.

If there is no active key, NULL will be returned.

  • Return: The id/key of the selected entry
  • Access: public

[ Top ]

get_active_text   [line 126]

string get_active_text( )

Returns the string of the active entry.

If there is no active entry, NULL will be returned.

  • Return: The string value of the selected entry
  • Access: public

[ Top ]

get_array   [line 147]

array get_array( )

Returns an array with all key/value pairs.
  • Return: Array with key/value pairs in the model
  • Access: public

[ Top ]

get_cell_renderer   [line 159]

GtkCellRenderer get_cell_renderer( )

Returns the default cell renderer.
  • Return: The default cell renderer
  • Access: public

[ Top ]

insert   [line 175]

void insert( int $nPosition, string $strId, string $strValue)

Inserts a single key/value pair at a certain position into the list.
  • Access: public

Parameters:

int   $nPosition     The position to insert the values at
string   $strId     The id to append
string   $strValue     The value to append

[ Top ]

insertArray   [line 378]

void insertArray( int $nPosition, array $arData)

Inserts an array (key and value) at a certain position into the list.

Alias of @see insert_array().

  • Access: public

Parameters:

int   $nPosition     The position to insert the array at
array   $arData     The array to append

[ Top ]

insert_array   [line 190]

void insert_array( int $nPosition, array $arData)

Inserts an array (key and value) at a certain position into the list.
  • Access: public

Parameters:

int   $nPosition     The position to insert the array at
array   $arData     The array to append

[ Top ]

prepend   [line 205]

void prepend( string $strId, string $strValue)

Prepends a single key/value pair to the list.
  • Access: public

Parameters:

string   $strId     The id to append
string   $strValue     The value to append

[ Top ]

prependArray   [line 394]

void prependArray( array $arData)

Prepends an array (key and value) at the beginning of the store

Alias of @see prepend_array().

  • Access: public

Parameters:

array   $arData     The array to append

[ Top ]

prepend_array   [line 219]

void prepend_array( array $arData)

Prepends an array (key and value) at the beginning of the store
  • Access: public

Parameters:

array   $arData     The array to append

[ Top ]

removeKey   [line 410]

boolean removeKey( string $strId)

Removes the first entry with the given key from the list.

Alias of @see remove_key().

  • Return: True if an entry has been deleted
  • Access: public

Parameters:

string   $strId     The key of the entry to remove

[ Top ]

remove_key   [line 233]

boolean remove_key( string $strId)

Removes the first entry with the given key from the list.
  • Return: True if an entry has been deleted
  • Access: public

Parameters:

string   $strId     The key of the entry to remove

[ Top ]

setActiveKey   [line 426]

boolean setActiveKey( string $strId)

Sets the model row with the given key as active.

Alias of @see setActiveKey().

  • Return: True if an entry has been set active
  • Access: public

Parameters:

string   $strId     The key of the entry to be made active

[ Top ]

setArray   [line 441]

void setArray( array $arData)

Sets an array (key and value) as data into the store.

Clears any previous entries.

  • Access: public

Parameters:

array   $arData     The array to set

[ Top ]

set_active_key   [line 247]

boolean set_active_key( string $strId)

Sets the model row with the given key as active.
  • Return: True if an entry has been set active
  • Access: public

Parameters:

string   $strId     The key of the entry to be made active

[ Top ]

set_array   [line 281]

void set_array( array $arData)

Sets an array (key and value) as data into the store.

Clears any previous entries.

  • Access: public

Parameters:

array   $arData     The array to set

[ Top ]


Documentation generated on Fri, 11 Apr 2008 14:30:12 -0400 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.