contentLister/inc/gtkSearchWnd.h File Reference

gtkSearchWnd - eReader content search dialog More...

#include <gtk/gtk.h>

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

Go to the source code of this file.

Classes

struct  swSearch_t

Defines

#define SEARCH_BK_IMG_WIDTH   666
#define SEARCH_BK_IMG_HEIGHT   230
#define SEARCH_WND_SPACE_ABOVE   300
#define SEARCH_WND_ITEM_SPACING   10
#define SEARCH_VBORDER   10
#define SEARCH_HBORDER   20
#define SEARCH_ITEM_WIDTH   (SEARCH_BK_IMG_WIDTH - 2*SEARCH_HBORDER)
#define SEARCH_TAG_HEIGHT   25
#define SEARCH_NAME_HEIGHT   30
#define SEARCH_NAME_EXPL_HEIGHT   60
#define SEARCH_BUTTON_AREA_HEIGHT   30
#define SEARCH_BUTTON_WIDTH   200
#define SEARCH_BUTTON_HEIGHT   27
#define SEARCH_PATTERN_MAX   256

Functions

GtkWidget * create_search_wnd (GtkWidget *parent)
void search_wnd_set_text (void)


Detailed Description

gtkSearchWnd - eReader content search dialog

<File description>=""> The eReader content customization window provides gtk widget to enable user customize content title and description. Which are created and updated with the following API

Definition in file gtkSearchWnd.h.


Define Documentation

#define SEARCH_BK_IMG_HEIGHT   230

Definition at line 41 of file gtkSearchWnd.h.

#define SEARCH_BK_IMG_WIDTH   666

Definition at line 40 of file gtkSearchWnd.h.

#define SEARCH_BUTTON_AREA_HEIGHT   30

Definition at line 54 of file gtkSearchWnd.h.

#define SEARCH_BUTTON_HEIGHT   27

Definition at line 56 of file gtkSearchWnd.h.

#define SEARCH_BUTTON_WIDTH   200

Definition at line 55 of file gtkSearchWnd.h.

#define SEARCH_HBORDER   20

Definition at line 47 of file gtkSearchWnd.h.

#define SEARCH_ITEM_WIDTH   (SEARCH_BK_IMG_WIDTH - 2*SEARCH_HBORDER)

Definition at line 48 of file gtkSearchWnd.h.

#define SEARCH_NAME_EXPL_HEIGHT   60

Definition at line 52 of file gtkSearchWnd.h.

#define SEARCH_NAME_HEIGHT   30

Definition at line 51 of file gtkSearchWnd.h.

#define SEARCH_PATTERN_MAX   256

Definition at line 59 of file gtkSearchWnd.h.

#define SEARCH_TAG_HEIGHT   25

Definition at line 50 of file gtkSearchWnd.h.

#define SEARCH_VBORDER   10

Definition at line 46 of file gtkSearchWnd.h.

#define SEARCH_WND_ITEM_SPACING   10

Definition at line 44 of file gtkSearchWnd.h.

#define SEARCH_WND_SPACE_ABOVE   300

Definition at line 43 of file gtkSearchWnd.h.


Function Documentation

GtkWidget* create_search_wnd ( GtkWidget *  parent  ) 

Create search options window

Parameters:
parent Gtk object
Returns:
instance pointer of window. Return NULL if failed.

Definition at line 255 of file gtkSearchWnd.c.

00256 {
00257     CL_SEARCHPRINTF("entry");
00258 
00259     // main window
00260     g_wnd.window = parent;
00261     g_signal_connect(G_OBJECT(g_wnd.window), "expose-event", G_CALLBACK(on_expose), NULL);
00262 
00263     // background
00264     GtkWidget* background = gtk_event_box_new();
00265     gtk_widget_set_name(GTK_WIDGET(background), "search_wnd_background");
00266     gtk_widget_set_size_request(GTK_WIDGET(background), SEARCH_BK_IMG_WIDTH, SEARCH_BK_IMG_HEIGHT);
00267     gtk_container_add(GTK_CONTAINER(parent), background);
00268     gtk_widget_show(background);
00269         
00270     // alignment
00271     GtkWidget* alignment = gtk_alignment_new(0.0, 0.0, 0.0, 0.0);
00272     gtk_alignment_set_padding( GTK_ALIGNMENT(alignment), 
00273                                SEARCH_VBORDER, 
00274                                SEARCH_VBORDER, 
00275                                SEARCH_HBORDER, 
00276                                SEARCH_HBORDER );
00277     gtk_container_add(GTK_CONTAINER(background), alignment);
00278     gtk_widget_show(alignment);
00279 
00280     // vbox
00281     GtkWidget*vbox = gtk_vbox_new(FALSE, SEARCH_WND_ITEM_SPACING);
00282     gtk_container_add(GTK_CONTAINER(alignment), vbox);
00283     gtk_widget_show(vbox);
00284    
00285     // pattern item
00286     createPatternItem(vbox);
00287 
00288     // search item
00289     createSearchButtonItem(vbox);
00290 
00291     return background;
00292 }

Here is the call graph for this function:

void search_wnd_set_text ( void   ) 

Set constant text in search window

Definition at line 295 of file gtkSearchWnd.c.

00296 {
00297     CL_SEARCHPRINTF("entry");
00298 
00299     // pattern item
00300     gtk_label_set_text( GTK_LABEL(g_wnd.patternTag),  _("Step 1: Please enter the search pattern") );
00301     gtk_label_set_text( GTK_LABEL(g_wnd.patternExpl), _("Multiple search strings can be separated with a space.\n"
00302                                                         "Search strings containing spaces should be enclosed in double quotes (\").\n"
00303                                                         "Narrow your search results by clicking the 'Search' icon again.") );
00304 
00305     // search item
00306     gtk_label_set_text( GTK_LABEL(g_wnd.searchTag), _("Step 2: Please click on the 'Search' button to start your enquiry") );
00307     gtk_button_set_label( GTK_BUTTON(g_wnd.searchButton), _("Search") );
00308 }


Generated on Sun Dec 14 17:12:54 2008 by  doxygen 1.5.6