settings/src/background.h File Reference

setup application - E-reader settings application background creation/update More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define VERSION_FILE   "/etc/er_version_commercial"
#define SETTINGS_BOX_BORDER   51
#define TITLE_MIN_HEIGHT   54
#define TITLE_MIN_WIDTH   666
#define TITLE_BORDER_LEFT   10
#define TITLE_BORDER_RIGHT   10
#define SETTINGS_ITEM_PADDING   10

Functions

GtkWidget * bg_create (GtkWidget *window)
void bg_set_text (void)


Detailed Description

setup application - E-reader settings application background creation/update

Copyright (C) 2005-2008 iRex Technologies B.V. All rights reserved.

<File description>="">

Definition in file background.h.


Define Documentation

#define SETTINGS_BOX_BORDER   51

Definition at line 36 of file background.h.

#define SETTINGS_ITEM_PADDING   10

Definition at line 43 of file background.h.

#define TITLE_BORDER_LEFT   10

Definition at line 40 of file background.h.

#define TITLE_BORDER_RIGHT   10

Definition at line 41 of file background.h.

#define TITLE_MIN_HEIGHT   54

Definition at line 38 of file background.h.

#define TITLE_MIN_WIDTH   666

Definition at line 39 of file background.h.

#define VERSION_FILE   "/etc/er_version_commercial"

Definition at line 34 of file background.h.


Function Documentation

GtkWidget* bg_create ( GtkWidget *  window  ) 

Definition at line 56 of file background.c.

00057 {
00058     GtkWidget *background;
00059     GtkWidget *topLevelVBox;
00060     GtkWidget *title_background;
00061     GtkWidget *alignment;
00062     
00063     // background: allows to set a background color or pixmap
00064     background = gtk_event_box_new();
00065     gtk_widget_set_name(GTK_WIDGET(background), "screen_background");
00066     gtk_container_add(GTK_CONTAINER(parentWindow), background);
00067 
00068     // alignement: defines screen area available for objects,
00069     //             also allows user to resize window, just in case
00070     alignment = gtk_alignment_new(0.0, 0, 1, 1);
00071     gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), SETTINGS_BOX_BORDER, 1, SETTINGS_BOX_BORDER, SETTINGS_BOX_BORDER);
00072     gtk_container_add(GTK_CONTAINER(background), alignment);
00073 
00074     // topLevelVBox: orders objects top to bottom, not homogeneous, zero spacing
00075     topLevelVBox = gtk_vbox_new(FALSE, 0);
00076     gtk_container_add(GTK_CONTAINER(alignment), topLevelVBox);
00077 
00078     // title_background
00079     title_background = gtk_event_box_new();
00080     gtk_widget_set_size_request(GTK_WIDGET(title_background), TITLE_MIN_WIDTH, TITLE_MIN_HEIGHT);
00081     gtk_widget_set_name(GTK_WIDGET(title_background), "title_background");
00082     gtk_box_pack_start(GTK_BOX(topLevelVBox), title_background, FALSE, FALSE, 0);
00083 
00084     // alignment
00085     alignment = gtk_alignment_new(0.0, 0.5, 1, 1);
00086     gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, TITLE_BORDER_LEFT, TITLE_BORDER_RIGHT);
00087     gtk_container_add(GTK_CONTAINER(title_background), alignment);
00088 
00089     // g_titleItem: screen title text
00090     g_titleItem = gtk_label_new("");
00091     gtk_misc_set_alignment(GTK_MISC(g_titleItem), 0, 0.5);
00092     gtk_widget_set_name(GTK_WIDGET(g_titleItem), "title_item");
00093     gtk_container_add(GTK_CONTAINER(alignment), g_titleItem);
00094 
00095     // g_settingsArea: area to place remaining objects
00096     g_settingsArea = gtk_event_box_new();
00097     gtk_widget_set_name(GTK_WIDGET(g_settingsArea), "settings_area");
00098     gtk_box_pack_end(GTK_BOX(topLevelVBox), g_settingsArea, TRUE, TRUE, SETTINGS_ITEM_PADDING);
00099 
00100     gtk_widget_show_all(background);
00101 
00102     return g_settingsArea;
00103 }

void bg_set_text ( void   ) 

Definition at line 105 of file background.c.

00106 {
00107     gtk_label_set_text(GTK_LABEL(g_titleItem), _("iLiad Settings"));
00108 }


Generated on Sun Dec 14 17:16:55 2008 by  doxygen 1.5.6