1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
/*
Editor Find In Pages Dialog
*/
#ifndef EDITORFIP_H
#define EDITORFIP_H
#include <gtk/gtk.h>
/* typedef struct _editor_fip_struct editor_fip_struct; */
typedef struct _editor_fip_item_struct editor_fip_item_struct;
#define EDITOR_FIP_ITEM(p) ((editor_fip_item_struct *)(p))
/*
* Find In Pages Dialog:
*/
struct _editor_fip_struct {
gboolean initialized,
map_state,
processing;
gpointer core_ptr;
gpointer editor_ptr;
GtkWidget *toplevel,
*main_vbox,
*find_combo;
/* Buttons on right column */
GtkWidget *find_btn,
*clear_btn,
*stop_btn,
*close_btn;
gint stop_find_count;
/* Search options */
GtkWidget *match_all_radio,
*match_any_radio,
*match_phrase_radio;
GtkWidget *case_sensitive_toggle; /* Case sensitive if togged */
/* Search results put into this clist, it has 4 columns which
* are for; excerpt, type, name (header or section's name), and
* manual page name.
*/
GtkWidget *results_clist;
gint selected_result; /* Can be -1 */
GtkWidget *results_menu;
/* Important menu items on results menu */
GtkWidget *goto_mi;
/* Goto selected result button */
GtkWidget *goto_btn;
GtkWidget *status_bar_dock,
*status_bar_toplevel,
*status_bar_progress,
*status_bar_label;
gfloat status_bar_progress_pos_last;
};
/*
* Find In Pages Dialog Item:
*/
struct _editor_fip_item_struct {
editor_fip_struct *editor_fip;
GtkCList *clist;
/* Pointer to the matched branch node on the layout_ctree on
* editor that was searched through */
GtkCTreeNode *found_branch;
/* This will be used for matching branch data on the editor
* when the user wants to `go to' the matched result. This is
* better since the found_branch may get deleted and matching
* by the branch's data seems to work out better */
gpointer branch_data;
/* Matched text position, can be -1 for n/a */
gint text_sel_start,
text_sel_end;
/* Matched line number, can be -1 for n/a */
gint line_num;
};
extern gint EditorFIPAddItem(
editor_fip_struct *fip,
const gchar *excerpt,
gint line_num,
const gchar *name,
const gchar *manual_page,
GtkCTreeNode *found_branch,
gpointer branch_data,
gint text_sel_start, gint text_sel_end
);
extern void EditorFIPItemDelete(editor_fip_item_struct *item);
extern void EditorFIPSetBusy(editor_fip_struct *fip);
extern void EditorFIPSetReady(editor_fip_struct *fip);
extern editor_fip_struct *EditorFIPNew(void *core_ptr, void *editor_ptr);
extern void EditorFIPUpdateMenus(editor_fip_struct *fip);
extern void EditorFIPSetStatusMessage(
editor_fip_struct *fip, const gchar *mesg
);
extern void EditorFIPSetStatusProgress(
editor_fip_struct *fip, gfloat percent
);
extern void EditorFIPReset(editor_fip_struct *fip, gboolean need_unmap);
extern void EditorFIPMap(editor_fip_struct *fip);
extern void EditorFIPUnmap(editor_fip_struct *fip);
extern void EditorFIPDelete(editor_fip_struct *fip);
#endif /* EDITORFIP_H */
|