Smallbox

Smallbox — Small input box.

Synopsis




struct              box_desc;
struct              box_desc2;
gboolean            smallbox_x                          (gchar *title,
                                                         struct box_desc *d);
gboolean            smallbox_x2                         (gchar *title,
                                                         struct box_desc2 *d);
gchar*              smallbox                            (gchar *title,
                                                         gchar *labeltext,
                                                         gchar *dval);

Description

Functions to create a simple inputbox offering multiple selections or an input field.

Details

struct box_desc

struct box_desc {
  gchar *label;
  gchar *value;
};

Value pair to describe a query in a small box.

The componet label describes the query text, value the initial value of the text input field.


struct box_desc2

struct box_desc2 {
  gchar *label;
  gchar *value;
  GList *suggestions;
};

box_desc2 offers a more complex struct to decribe a query in a small box.

The componet label describes the query text, value the initial value of the text input field.

Additionally it contains a list of suggestions to offer the user a set of predefined choices.


smallbox_x ()

gboolean            smallbox_x                          (gchar *title,
                                                         struct box_desc *d);

Small and simple text input box to query for text input.

title : Box title.
d : Array of box content descriptions (Query text and default value).
Returns : TRUE if a value was entered and confirmed, FALSE otherwise.

smallbox_x2 ()

gboolean            smallbox_x2                         (gchar *title,
                                                         struct box_desc2 *d);

Small and simple text input box to query for text input offering a defined set of values to select from or to enter own text.

title : Box title.
d : Aray of box content descriptions containing query text, default value and a list of predefined values.
Returns : TRUE if a value was entered and confirmed, FALSE otherwise.

smallbox ()

gchar*              smallbox                            (gchar *title,
                                                         gchar *labeltext,
                                                         gchar *dval);

This function displays an input dialog box to query a user for text input.

title : Dialog title
labeltext : Query text displayed inside the box.
dval : Default value
Returns : Entered text if user taps OK, NULL otherwise.