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

Class: Gtk2_IndexedComboBox

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

Class Overview

GtkComboBox
   |
   --Gtk2_IndexedComboBox

Indexed Gtk2 combo box similar to the HTML select box.


Author(s):

Version:

  • CVS: $Id$

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$
  • License: LGPL


[ Top ]


Method Detail

__construct (Constructor)   [line 24]

Gtk2_IndexedComboBox __construct( [ $arData = null])

  • Access: public

Parameters:

   $arData   — 

[ Top ]

append   [line 48]

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

void appendArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

append_array   [line 60]

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

void getActiveKey( )

  • Access: public

[ Top ]

getActiveText   [line 242]

void getActiveText( )

  • Access: public

[ Top ]

get_active_key   [line 75]

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

string get_active_text( )

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

[ Top ]

insert   [line 106]

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

void insertArray( $nPosition, $arData)

  • Access: public

Parameters:

   $nPosition   — 
   $arData   — 

[ Top ]

insert_array   [line 119]

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

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

void prependArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

prepend_array   [line 147]

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

void removeKey( $strId)

  • Access: public

Parameters:

   $strId   — 

[ Top ]

remove_key   [line 165]

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

void setActiveKey( $strId)

  • Access: public

Parameters:

   $strId   — 

[ Top ]

setArray   [line 272]

void setArray( $arData)

  • Access: public

Parameters:

   $arData   — 

[ Top ]

set_active_key   [line 191]

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

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