Reference

The PHP-GTK2 Manual compiled by the php-gtk development team has a whole lot of wealth, though sometimes the treasures are buried deep inside. Here's convenient link to some of these treasures and commonly-used items.

  1. GtkStockItems - Pre-defined stock items
  2. example: How to display a popup alert for required fields - Part 1?

  3. GtkResponseType - Response ID for pre-defined dialog buttons
  4. example: How to display a popup alert for required fields - Part 1?

  5. Symbolic names for keys - for use in key-press-event
  6. GdkModifierType - used to test if modifier keys such as Shift, Control, Apple and Alt is being pressed
  7. GdkEventType - used to test for example which mouse button is being pressed
  8. GtkJustification - sets justification of text for GtkLabel
  9. example: How to right justify the text in GtkLabel?

  10. GtkWindowPosition - sets the window position
  11. example: How to display a popup alert for required fields - Part 1?

  12. GtkButtonBoxStyle - sets the style of layout of buttons
  13. example: How to display a popup alert for required fields - Part 2 - OK button centered?

  14. GtkStateType - indicates the state of a widget - need this when setting the fg or bg color of a widget
  15. example: How to run multiple applications in multiple windows - Part 1?

  16. GtkFileChooserAction - describes whether a GtkFileChooser is being used to open existing files or to save to a new file
  17. example: How to open a file with GtkFileChooser?

  18. GtkType - used in GtkListStore and GtkTreeStore to determine the type of the column in the data table
  19. example: How to display a 2D array in GtkTreeView - Part 1?

  20. GtkTreeViewColumn type (attributes) - specify the data type of treeview column
  21. example: How to display a 2D array in GtkTreeView - Part 1?

  22. GtkSelectionMode - specify what selections users are allowed to make
  23. example: How to copy row data from GtkTreeView using GtkClipboard - Part 2 - copy multiple rows?

Commonly used signals

One of the "confusing" areas of php-gtk2 is knowing which signals to use for what widgets, and what the arguments passed to you by php-gtk2 when the event is activated.

Here's a convenient link to the most commonly used signals, with a summary of the arguments passed to your callback functions by php-gtk2. Note that you can append as many user-defined data as you want after those sets of arguments.

  1. GtkWidget::key-press-event() - callback($widget, $event)
  2. GtkWidget::button-press-event() - callback($widget, $event)
  3. example: How to put a clickable link in GtkLabel - Part 1?

  4. GtkEntry::activate() - callback(GtkEntry entry)
  5. example: How to display a popup alert for required fields - Part 1?

  6. GtkButton::clicked() - callback(GtkButton button)
  7. example: How to set a button as default action when user press Enter?

  8. GtkCelllayout::set_cell_data_func() - callback(GtkCellLayout cell_layout, GtkCellRenderer cell, GtkTreeModel tree_model, GtkTreeIter iter)
  9. example: How to display a 2D array in GtkTreeView - Part 3 - with alternate row colors?

  10. GtkTreeselection::changed() - callback(GtkTreeSelection treeselection)
  11. example: How to display a 2D array in GtkTreeView - Part 5 - get user selection?

  12. GtkCellrenderertext::edited() - callback(GtkCellRendererText cellrenderertext, string path, string new_text)
  13. example: How to use GtkCellRendererCombo - Part 2 - process combobox?

Search This Site

Google
Web This Site

Search PHP-GTK2 Manual

Full-text search on php-gtk2 manual

Members Login

Username:
Password:
Key:
What is this?
  Forget Password?