#include <gtk/gtk.h>
#include "dict.h"
#include "gui_top_window.h"
Go to the source code of this file.
Functions | |
int | dict_clistcmp (int n, const char *key, GtkCList *c) |
Compairs the key with the specified word in the dictionary. More... | |
int | mybsearch (int n, int(*cmp)(int, gpointer, gpointer), const gpointer key, gpointer data) |
Binary search using a custom compare function. More... | |
void | dict_inpch (GtkEntry *e, GtkObject *w) |
Callback to handle the change in the dictionary's quick search input box. More... | |
GtkWidget * | dict_new () |
Create a dictionoarry widget. More... | |
void | dict_add_words (GtkWidget *dict, int wnum, char ***words) |
Adds a dictionary to a CList widget of a dictionary. More... | |
void | dict_add_word (GtkWidget *dict, char **word) |
Adds a word in a dictionary widget. More... | |
GtkWidget * | dict_new_from_file (const char *fn, const char *sep) |
Create a new dictionary widget from a file. More... | |
void | gui_dict_open2_cb (GtkWidget *opencb) |
adds the selected dictionary to the notebook gets the file name selected using Dictionary->Open... More... | |
void | gui_dict_open_cb () |
The callback called when Dictionary->Open... More... | |
void | gui_dict_close_cb () |
Closes the current page in the notebook. More... |
Definition in file gui_dict.c.
|
Adds a word in a dictionary widget. This is only a wrapper script to dict_add_words().
Definition at line 173 of file gui_dict.c. References dict_add_words(). |
|
Adds a dictionary to a CList widget of a dictionary. Adds the list of word pairs to the given widget. It updates the widget properties: dict_wnum (the number of words), dict_words (list to word pairs). It gets the CList from the dict_clist property of the widget.
Definition at line 149 of file gui_dict.c. Referenced by dict_add_word(), and dict_new_from_file(). |
|
Compairs the key with the specified word in the dictionary.
Definition at line 22 of file gui_dict.c. Referenced by dict_inpch(). |
|
Callback to handle the change in the dictionary's quick search input box. The function gets the text from the entry and searches it in the clist of the given dictionary widget with mybsearch(), then selects the corresponding word in the CList and positions the adjustment to make that word visible.
Definition at line 78 of file gui_dict.c. References dict_clistcmp(), and mybsearch(). Referenced by dict_new(). |
|
Create a dictionoarry widget.
Definition at line 100 of file gui_dict.c. References dict_inpch(). Referenced by dict_new_from_file(). |
|
Create a new dictionary widget from a file.
Definition at line 188 of file gui_dict.c. References dict_add_words(), dict_get_words(), and dict_new(). Referenced by gui_dict_open2_cb(), and top_window_new(). |
|
Closes the current page in the notebook.
Definition at line 255 of file gui_dict.c. |
|
adds the selected dictionary to the notebook gets the file name selected using Dictionary->Open... creates the new dictionary widget and puts it in the notebook widget.
Definition at line 210 of file gui_dict.c. References dict_new_from_file(). Referenced by gui_dict_open_cb(). |
|
The callback called when Dictionary->Open... is selected. It creates a modal file selection dialog and connects a signal to its OK button to gui_dict_open2_cb() to handle the user request.
Definition at line 228 of file gui_dict.c. References gui_dict_open2_cb(). |
|
Binary search using a custom compare function. This function searches for the first element in a virtual list provided by a compare function where the key is greater or equal to the corresponding element in the list.
Definition at line 47 of file gui_dict.c. Referenced by dict_inpch(). |