#include #include #include #include #include #include #include #include #include #include #include #include "defs.h" #include "externs.h" #include "search.h" #include "searchwidgets.h" #include "convert.h" #include "game.h" #include "readfile.h" #include "utils.h" #include "init.h" /***************************************************/ /* We implement "stroke count search" here. */ /***************************************************/ Widget kanjistroke_popup; enum {SKIP_RL, SKIP_UD, SKIP_ENC, SKIP_DK, SKIP_NUMW}; static Widget skiptoggle[5]; static short skipval; Widget strokeinputw; /* * Get the number of strokes input, and pass along to appropriate * kanji search routine. * Also use skip value, if present. */ void DoStrokeSearch(Widget w, XtPointer data, XtPointer call_data) { int strokecount; strokecount=GetWidgetNumberval(strokeinputw); if(strokecount<1) { XtVaSetValues(strokeinputw,XtNstring,""); return; } dostrokefind(strokecount,skipval); } /* handle toggle for additional narrowing parameter on search. * we cross-reference with initial SKIP number */ void StrokeSKIPcount(Widget w, XtPointer data, XtPointer call_data) { int bcount; for(bcount=0;bcount