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

Class: Gtk2_IndexedComboBox

Source Location: /Gtk2_IndexedComboBox-0.0.3/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.1 2006/03/20 08:22:54 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.1 2006/03/20 08:22:54 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 250]

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

void getActiveKey( )

  • Access: public

[ Top ]

getActiveText   [line 262]

void getActiveText( )

  • Access: public

[ Top ]

getCellRenderer   [line 268]

void getCellRenderer( )

  • Access: public

[ Top ]

get_active_key   [line 83]

string get_active_key( )

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

[ Top ]

get_active_text   [line 98]

string get_active_text( )

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

[ Top ]

get_cell_renderer   [line 113]

GtkCellRenderer get_cell_renderer( )

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

[ Top ]

insert   [line 126]

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

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

Parameters:

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

[ Top ]

insertArray   [line 274]

void insertArray( $nPosition, $arData)

  • Access: public

Parameters:

   $nPosition   — 
   $arData   — 

[ Top ]

insert_array   [line 139]

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

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

void prependArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

prepend_array   [line 167]

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

void removeKey( $strId)

  • Access: public

Parameters:

   $strId   — 

[ Top ]

remove_key   [line 185]

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

void setActiveKey( $strId)

  • Access: public

Parameters:

   $strId   — 

[ Top ]

setArray   [line 298]

void setArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

set_active_key   [line 211]

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

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