#include <gtk/gtk.h>
Go to the source code of this file.
Functions | |
G_BEGIN_DECLS GtkWidget * | create_screen_title (GtkWidget **p_title) |
GtkWidget * | create_separator (void) |
G_BEGIN_DECLS GtkWidget* create_screen_title | ( | GtkWidget ** | p_title | ) |
File Name : screen_utils.h
Description: utility functions for screen layout Copyright (C) 2009 iRex Technologies B.V. All rights reserved.
Definition at line 82 of file screen_utils.c.
References LOGPRINTF, TITLE_SEPARATOR_HEIGHT, TITLE_SEPARATOR_V_SPACING, and widget.
Referenced by create_screen_layout().
00083 { 00084 GtkWidget *background = NULL; // return value 00085 GtkWidget *widget; 00086 GtkWidget **p_widget; 00087 GtkBox *vbox; 00088 00089 LOGPRINTF("entry"); 00090 00091 // object hierarchy: 00092 // background (vbox) 00093 // | 00094 widget = gtk_vbox_new(FALSE, 0); 00095 gtk_container_add(GTK_CONTAINER(background), widget); 00096 gtk_widget_show(widget); 00097 vbox = GTK_BOX(widget); 00098 background = widget; 00099 // | 00100 // |-- title (label) 00101 // | 00102 p_widget = p_title; 00103 widget = gtk_label_new(NULL); 00104 gtk_widget_set_name(widget, "irex-hello-title"); 00105 gtk_box_pack_start(vbox, widget, FALSE, FALSE, 0); 00106 gtk_misc_set_alignment(GTK_MISC(widget), 0.0, 0.5); 00107 if (p_widget) 00108 { 00109 g_signal_connect(widget, "destroy", G_CALLBACK(gtk_widget_destroyed), p_widget); 00110 gtk_widget_show(widget); 00111 g_assert(*p_widget == NULL); 00112 *p_widget = widget; 00113 } 00114 // | 00115 // |-- separator (event box) 00116 // | 00117 widget = gtk_event_box_new(); 00118 gtk_widget_set_name(widget, "irex-hello-title-separator"); 00119 gtk_widget_set_size_request(widget, -1, TITLE_SEPARATOR_HEIGHT); 00120 gtk_box_pack_start(vbox, widget, FALSE, FALSE, TITLE_SEPARATOR_V_SPACING); 00121 gtk_widget_show(widget); 00122 00123 return background; 00124 }
GtkWidget* create_separator | ( | void | ) |
Definition at line 128 of file screen_utils.c.
References ITEM_SEPARATOR_HEIGHT, LOGPRINTF, and widget.
Referenced by create_screen_layout().
00129 { 00130 GtkWidget *widget = NULL; // return value 00131 00132 LOGPRINTF("entry"); 00133 00134 widget = gtk_event_box_new(); 00135 gtk_widget_set_name(widget, "irex-hello-item-separator"); 00136 gtk_widget_set_size_request(widget, -1, ITEM_SEPARATOR_HEIGHT); 00137 gtk_widget_show(widget); 00138 00139 return widget; 00140 }