#include "descriptions.h"
#include <string.h>
#include <gtk/gtk.h>
#include "frontend.h"
#include "question.h"
#include "template.h"
#include "fe_gtk.h"
#include "fe_data.h"
Include dependency graph for descriptions.c:

Go to the source code of this file.
Defines | |
| #define | DESCRIPTION_MARGIN 4 |
| margin around descriptions | |
| #define | DESCRIPTION_VPADDING 3 |
| vertical padding around descriptions | |
| #define | EXT_DESCRIPTION_VPADDING 2 |
| vertical padding around extendend description | |
Functions | |
| static const char * | get_icon_path (struct question *question) |
| Get the full path to an icon associated to a question type. | |
| static void | add_icon (struct question *question, GtkWidget *container) |
| Add an icon for a given question in the given container. | |
| static GdkColor * | get_background_color (struct frontend *fe) |
| Get the background color for the main window of the frontend. | |
| static void | add_description (struct frontend *fe, struct question *question, GtkWidget *container) |
| Add a description to a given container. | |
| static void | add_extended_description (struct frontend *fe, struct question *question, GtkWidget *container) |
| Add an extendend description to a given container. | |
| GtkWidget * | fe_gtk_create_description (struct frontend *fe, struct question *question) |
| Return a new widget with description and extendend description of a given question. | |
Variables | |
| struct { | |
| const char * type | |
| question type | |
| const char * path | |
| full path to the associated icon | |
| } | icon_mapping [] |
| A mapping between question type and icons for descriptions. | |
Definition in file descriptions.c.
| static void add_description | ( | struct frontend * | fe, | |
| struct question * | question, | |||
| GtkWidget * | container | |||
| ) | [static] |
Add a description to a given container.
| fe | cdebconf frontend | |
| question | the question from which the description will be read | |
| container | the container where the description will be added |
Definition at line 134 of file descriptions.c.
References DESCRIPTION_MARGIN, DESCRIPTION_VPADDING, and get_background_color().
Referenced by fe_gtk_create_description().
| static void add_extended_description | ( | struct frontend * | fe, | |
| struct question * | question, | |||
| GtkWidget * | container | |||
| ) | [static] |
Add an extendend description to a given container.
| fe | cdebconf frontend | |
| question | the question from which the extendend description will be read | |
| container | the container where the extendend description will be added |
Definition at line 177 of file descriptions.c.
References EXT_DESCRIPTION_VPADDING, and get_background_color().
Referenced by fe_gtk_create_description().
| static void add_icon | ( | struct question * | question, | |
| GtkWidget * | container | |||
| ) | [static] |
Add an icon for a given question in the given container.
| question | the question | |
| container | the container where the icon will be added |
Definition at line 87 of file descriptions.c.
References get_icon_path().
Referenced by fe_gtk_create_description().
| GtkWidget* fe_gtk_create_description | ( | struct frontend * | fe, | |
| struct question * | question | |||
| ) |
Return a new widget with description and extendend description of a given question.
| fe | cdebconf frontend | |
| question | question that will be looked upon |
Definition at line 211 of file descriptions.c.
References add_description(), add_extended_description(), and add_icon().
Referenced by fe_gtk_add_common_layout().
| static GdkColor* get_background_color | ( | struct frontend * | fe | ) | [static] |
Get the background color for the main window of the frontend.
| fe | cdebconf frontend |
Definition at line 114 of file descriptions.c.
References frontend_data::window.
Referenced by add_description(), and add_extended_description().
| static const char* get_icon_path | ( | struct question * | question | ) | [static] |
Get the full path to an icon associated to a question type.
| question | the question |
Definition at line 70 of file descriptions.c.
References icon_mapping.
Referenced by add_icon().
1.5.1