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

Class: Gtk2_IndexedComboBox

Source Location: /Gtk2_IndexedComboBox-0.1.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 22]
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 28]

The cell renderer for the text
  • Access: protected

Type:   GtkCellRenderer


[ Top ]



Method Detail

__construct (Constructor)   [line 32]

Gtk2_IndexedComboBox __construct( [ $arData = null])

  • Access: public

Parameters:

   $arData   — 

[ Top ]

append   [line 56]

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

void appendArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

append_array   [line 68]

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

void getActiveKey( )

  • Access: public

[ Top ]

getActiveText   [line 304]

void getActiveText( )

  • Access: public

[ Top ]

getArray   [line 310]

void getArray( )

  • Access: public

[ Top ]

getCellRenderer   [line 316]

void getCellRenderer( )

  • Access: public

[ Top ]

get_active_key   [line 84]

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

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

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

GtkCellRenderer get_cell_renderer( )

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

[ Top ]

insert   [line 159]

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

void insertArray( $nPosition, $arData)

  • Access: public

Parameters:

   $nPosition   — 
   $arData   — 

[ Top ]

insert_array   [line 172]

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

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

void prependArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

prepend_array   [line 200]

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

void removeKey( $strId)

  • Access: public

Parameters:

   $strId   — 

[ Top ]

remove_key   [line 218]

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

void setActiveKey( $strId)

  • Access: public

Parameters:

   $strId   — 

[ Top ]

setArray   [line 346]

void setArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

set_active_key   [line 246]

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

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:38:52 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.