« Programmation GTK2 en Pascal/GtkToolItem » : différence entre les versions
Contenu supprimé Contenu ajouté
mAucun résumé des modifications |
|||
Ligne 1 : | Ligne 1 : | ||
{{Programmation GTK2 en Pascal}} |
{{Programmation GTK2 en Pascal}} |
||
== Présentation == |
== Présentation == |
||
Le contrôle '''GtkToolItem''' permet de gérer un élément de barre d'outils autre qu'un bouton. En effet pour ceux-ci, il vaut mieux utiliser directement les contrôles <code>[[Programmation GTK2 en Pascal |
Le contrôle '''GtkToolItem''' permet de gérer un élément de barre d'outils autre qu'un bouton. En effet pour ceux-ci, il vaut mieux utiliser directement les contrôles <code>[[Programmation GTK2 en Pascal/GtkToolButton|GtkToolButton]]</code>, <code>[[Programmation GTK2 en Pascal/GtkToggleToolButton|GtkToggleToolButton]]</code> et <code>[[Programmation GTK2 en Pascal/GtkRadioToolButton|GtkRadioToolButton]]</code>. |
||
=== Hiérarchie === |
=== Hiérarchie === |
||
Ligne 8 : | Ligne 8 : | ||
|- |
|- |
||
| |
| |
||
[[Programmation GTK2 en Pascal |
[[Programmation GTK2 en Pascal/GObject|GObject]] |
||
└─[[Programmation GTK2 en Pascal |
└─[[Programmation GTK2 en Pascal/GtkObject|GtkObject]] |
||
└─[[Programmation GTK2 en Pascal |
└─[[Programmation GTK2 en Pascal/GtkWidget|GtkWidget]] |
||
└─[[Programmation GTK2 en Pascal/GtkContainer|GtkContainer]] |
└─[[Programmation GTK2 en Pascal/GtkContainer|GtkContainer]] |
||
└─[[Programmation GTK2 en Pascal/GtkBin|GtkBin]] |
└─[[Programmation GTK2 en Pascal/GtkBin|GtkBin]] |
||
└─[[Programmation GTK2 en Pascal |
└─[[Programmation GTK2 en Pascal/GtkToolItem|GtkToolItem]] |
||
├─[[Programmation GTK2 en Pascal |
├─[[Programmation GTK2 en Pascal/GtkToolButton|GtkToolButton]] |
||
└─[[Programmation GTK2 en Pascal |
└─[[Programmation GTK2 en Pascal/GtkSeparatorToolItem|GtkSeparatorToolItem]] |
||
|} |
|} |
||
Ligne 27 : | Ligne 27 : | ||
{{Programmation GTK2 en Pascal |
{{Programmation GTK2 en Pascal/Barre d'outils}} |
||
[[Catégorie:Programmation GTK2 en Pascal (livre)|GtkToolItem]] |
[[Catégorie:Programmation GTK2 en Pascal (livre)|GtkToolItem]] |
Version du 28 novembre 2011 à 13:00
Programmation GTK2 en Pascal |
|
Présentation
Le contrôle GtkToolItem permet de gérer un élément de barre d'outils autre qu'un bouton. En effet pour ceux-ci, il vaut mieux utiliser directement les contrôles GtkToolButton
, GtkToggleToolButton
et GtkRadioToolButton
.
Hiérarchie
Hiérarchie |
GObject └─GtkObject └─GtkWidget └─GtkContainer └─GtkBin └─GtkToolItem ├─GtkToolButton └─GtkSeparatorToolItem |
Utilisation de base
Création
La fonction de création d'un élément de barre d'outils est simple :
function gtk_tool_item_new : PGtkWidget;
Il faut ensuite créer le contrôle qu'il va contenir et l'y ajouter avec la fonction gtk_container_add().
Barre d'outils :
GtkToolbar ~
GtkToolItem ~
GtkToolButton ~
GtkMenuToolButton ~
GtkToggleToolButton ~
GtkRadioToolButton ~
GtkSeparatorToolItem