Back to index

tetex-bin  3.0
Classes | Enumerations | Functions
search-dialog.h File Reference
#include "xdvi-config.h"
#include "xdvi.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bbox
struct  search_info
struct  search_settings

Enumerations

enum  searchDirectionT { SEARCH_UP = 0, SEARCH_DOWN, SEARCH_UNINITIALIZED }

Functions

void dvi_find_string (const char *str, Boolean find_next)

Class Documentation

struct bbox

Definition at line 32 of file search-dialog.h.

Class Members
int lrx
int lry
int ulx
int uly
struct search_info

Definition at line 36 of file search-dialog.h.

Class Members
int from_pos
Boolean have_match
Boolean locked
int page_offset
int scan_page
Boolean search_wrapped
int to_pos
struct search_settings

Definition at line 47 of file search-dialog.h.

Collaboration diagram for search_settings:
Class Members
Boolean case_sensitive
int curr_page
searchDirectionT direction
int from_page
int hyphen_delta
Boolean ignore_hyphens
Boolean ignore_linebreaks
Widget message_window
char * posix_term
struct search_info * searchinfo
const char * term
int to_page
Boolean use_regexp
char * utf8_term
int x_pos
int y_pos

Enumeration Type Documentation

Enumerator:
SEARCH_UP 
SEARCH_DOWN 
SEARCH_UNINITIALIZED 

Definition at line 29 of file search-dialog.h.


Function Documentation

void dvi_find_string ( const char *  str,
Boolean  find_next 
)

Definition at line 1017 of file search-dialog.c.

{
    /* Synthesize a RET keystroke for the find dialog.
     * Also pops up the find dialog, to make it easier for user to
     * edit options, change direction etc. */
    Widget find_popup;
    if ((find_popup = XtNameToWidget(globals.widgets.top_level, "*find_popup")) == 0) {
       static struct search_settings settings;
       static struct search_info searchinfo = { False, False, False, 0, 0, 0, 0 };
       settings.term = str;
       settings.use_regexp = False;
       settings.case_sensitive = False;
       settings.direction = SEARCH_DOWN;
       settings.ignore_hyphens = False;
       settings.ignore_linebreaks = False;
       settings.x_pos = -1;
       settings.y_pos = -1;
       settings.searchinfo = &searchinfo;
       settings.hyphen_delta = 0;

       find_popup = create_search_window(&settings);

       if (find_next)
           return;
    }
    else if (str != NULL) { /* change the search term */
       Widget searchbox_input;
       if ((searchbox_input = XtNameToWidget(find_popup, "*searchbox_input")) == 0) {
           XDVI_WARNING((stderr, "Couldn't find \"searchbox_input\" widget!"));
           return;
       }
       XtVaSetValues(searchbox_input,
#ifdef MOTIF
                    XmNvalue,
#else
                    XtNstring,
#endif
                    str, NULL);
    }
    if (m_find_popup_active) {
       XRaiseWindow(DISP, XtWindow(find_popup));
    }
    else {
       XtPopup(find_popup, XtGrabNone);
       m_find_popup_active = True;
    }

    if (str != NULL || find_next) {
#ifdef MOTIF
       xm_search_go(NULL, NULL, NULL, NULL);
#else
       xaw_search_go(NULL, NULL, NULL, NULL);
#endif
    }
}

Here is the call graph for this function:

Here is the caller graph for this function: