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

Class: Gtk2_IndexedComboBox

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

Class Overview

GtkComboBox
   |
   --Gtk2_IndexedComboBox

Indexed Gtk2 combo box similar to the HTML select box.


Author(s):

Version:

  • CVS: $Id: IndexedComboBox.php,v 1.3 2006/04/05 07:13:27 cweiske Exp $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 24]
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.

  • Author: Christian Weiske <cweiske@php.net>
  • Version: CVS: $Id: IndexedComboBox.php,v 1.3 2006/04/05 07:13:27 cweiske Exp $
  • License: LGPL


[ Top ]


Class Variables

$renderer =  null

[line 30]

The cell renderer for the text
  • Access: protected

Type:   GtkCellRenderer


[ Top ]



Method Detail

__construct (Constructor)   [line 34]

Gtk2_IndexedComboBox __construct( [ $arData = null])

  • Access: public

Parameters:

   $arData   — 

[ Top ]

append   [line 58]

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

void appendArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

append_array   [line 70]

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

void getActiveKey( )

  • Access: public

[ Top ]

getActiveText   [line 271]

void getActiveText( )

  • Access: public

[ Top ]

getArray   [line 277]

void getArray( )

  • Access: public

[ Top ]

getCellRenderer   [line 283]

void getCellRenderer( )

  • Access: public

[ Top ]

get_active_key   [line 83]

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

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

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

GtkCellRenderer get_cell_renderer( )

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

[ Top ]

insert   [line 148]

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

void insertArray( $nPosition, $arData)

  • Access: public

Parameters:

   $nPosition   — 
   $arData   — 

[ Top ]

insert_array   [line 161]

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

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

void prependArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

prepend_array   [line 186]

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

void removeKey( $strId)

  • Access: public

Parameters:

   $strId   — 

[ Top ]

remove_key   [line 200]

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

void setActiveKey( $strId)

  • Access: public

Parameters:

   $strId   — 

[ Top ]

setArray   [line 313]

void setArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

set_active_key   [line 214]

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

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 Mon, 11 Mar 2019 14:39:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.