/* testtreecolumnsizing.c: Test case for tree view column resizing. * *Copyright(C)2008KristianRietveld<kris@gtk.org> * *Thisworkisprovided"asis";redistributionandmodification *inwholeorinpart,inanymedium,physicalorelectronicis *permittedwithoutrestriction. * *Thisworkisdistributedinthehopethatitwillbeuseful, *butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof *MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE. * *Innoeventshalltheauthorsorcontributorsbeliableforany *direct,indirect,incidental,special,exemplary,orconsequential *damages(including,butnotlimitedto,procurementofsubstitute *goodsorservices;lossofuse,data,orprofits;orbusiness *interruption)howevercausedandonanytheoryofliability,whether *incontract,strictliability,ortort(includingnegligenceor *otherwise)arisinginanywayoutoftheuseofthissoftware,even *ifadvisedofthepossibilityofsuchdamage.
*/
#include <gtk/gtk.h> #include <string.h>
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
#define NO_EXPAND "No expandable columns" #define SINGLE_EXPAND "One expandable column" #define MULTI_EXPAND "Multiple expandable columns" #define LAST_EXPAND "Last column is expandable" #define BORDER_EXPAND "First and last columns are expandable" #define ALL_EXPAND "All columns are expandable"
#define N_ROWS 10
static GtkTreeModel *
create_model (void)
{ int i;
GtkListStore *store;
store = gtk_list_store_new (5,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING);
/* Toggle button for long content row */
button = gtk_toggle_button_new_with_label ("Toggle long content row");
g_signal_connect (button, "toggled",
G_CALLBACK (toggle_long_content_row), tree_view);
gtk_box_append (GTK_BOX (vbox), button);
/* Set up option menu callback and default item */
g_signal_connect (combo_box, "changed",
G_CALLBACK (combo_box_changed), tree_view);
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.