PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <xview/xview.h>
#include <xview/panel.h>
#include <xview/text.h>
#include "xv_sizes.h"
#include "genC.h"
#include "misc.h"
#include "wpips.h"
Go to the source code of this file.
Functions | |
void | start_query (char *window_title, char *query_title, char *help_topic, success(*ok_func)(char *), void(*cancel_func)(Panel_item, Event *)) |
void | query_canvas_event_proc (Xv_Window window, Event *event) |
void | end_query_pad_notify (Panel_item item, Event *event) |
Pour debug seulement : More... | |
void | end_query_notify (Panel_item item, Event *event) |
void | help_query_notify (Panel_item item, Event *event) |
void | cancel_query_notify (Panel_item item, Event *event) |
Ne fait rien d'autre que de fermer la fene^tre... More... | |
void | cancel_user_request_notify (Panel_item item, Event *event) |
Cancel clear the string value and return: More... | |
success | end_user_request_notify (char *the_answer) |
string | wpips_user_request (char *a_printf_format, va_list args) |
void | create_query_window () |
Variables | |
static Panel_item | query_pad |
static Panel_item | query_cancel_button |
static char * | query_help_topic |
static success(* | apply_on_query )(char *) |
void cancel_query_notify | ( | Panel_item | item, |
Event * | event | ||
) |
Ne fait rien d'autre que de fermer la fene^tre...
Definition at line 167 of file xv_query.c.
References hide_window(), and query_frame.
void cancel_user_request_notify | ( | Panel_item | item, |
Event * | event | ||
) |
Cancel clear the string value and return:
Just return the "":
Definition at line 176 of file xv_query.c.
References hide_window(), query_frame, and query_pad.
Referenced by wpips_user_request().
void create_query_window | ( | ) |
Semble ne servir a` rien. RK, 9/11/93.
WIN_IGNORE_X_EVENT_MASK, KeyReleaseMask,
Definition at line 230 of file xv_query.c.
References end_query_notify(), help_query_notify(), query_cancel_button, query_canvas_event_proc(), query_frame, query_pad, query_panel, and QUERY_WIDTH.
void end_query_notify | ( | Panel_item | item, |
Event * | event | ||
) |
Dans le cas ou` on vient d'un retour charriot dans le texte :
Cela ne peut bien entendu pas marcher... :-(
Remet le bouton OK a l'e'tat normal :
xv_set(xv_get(query_panel, PANEL_DEFAULT_ITEM, NULL), PANEL_BUSY, FALSE, NULL);
Definition at line 134 of file xv_query.c.
References apply_on_query, hide_window(), query_frame, and query_pad.
Referenced by create_query_window(), and query_canvas_event_proc().
void end_query_pad_notify | ( | Panel_item | item, |
Event * | event | ||
) |
Pour debug seulement :
Definition at line 124 of file xv_query.c.
References debug(), debug_off, and debug_on.
success end_user_request_notify | ( | char * | the_answer | ) |
In fact, the function above never return...
Definition at line 187 of file xv_query.c.
References hide_window(), and query_frame.
Referenced by wpips_user_request().
void help_query_notify | ( | Panel_item | item, |
Event * | event | ||
) |
Definition at line 158 of file xv_query.c.
References display_help(), and query_help_topic.
Referenced by create_query_window().
void query_canvas_event_proc | ( | Xv_Window | window, |
Event * | event | ||
) |
enter_window(window);
ie. return key pressed
ie. key is released. It is necessary to use this event because notice_prompt() (in prompt_user() (in end_query_notify() )) also returns on up RETURN. This can cause the notice to return immediately when it is called on down RETURN. There schould be another possibility: put a mask to ignore key release events on the window which owns notice_prompt(). This was done in create_main_window() but seems without effect.
Definition at line 91 of file xv_query.c.
References debug(), debug_off, debug_on, and end_query_notify().
Referenced by create_query_window().
void start_query | ( | char * | window_title, |
char * | query_title, | ||
char * | help_topic, | ||
success(*)(char *) | ok_func, | ||
void(*)(Panel_item, Event *) | cancel_func | ||
) |
PANEL_NOTIFY_PROC, cancel_query_notify,
No cancel button requested:
move the pointer to the center of the query window
Valide le focus sur l'entrée :
J'ai l'impression que le code pre'ce'dent est pluto^t obsole`te... RK.
Mais pourquoi cela ne marche pas ???
xv_set(query_xwindow , WIN_SET_FOCUS, NULL);
Definition at line 51 of file xv_query.c.
References apply_on_query, pointer_in_center_of_frame(), query_cancel_button, query_frame, query_help_topic, query_pad, query_panel, and unhide_window().
Referenced by wpips_user_request().
string wpips_user_request | ( | char * | a_printf_format, |
va_list | args | ||
) |
Loop on the Query window:
Log the answer for possible rerun through tpips:
returns a newly allocated string...
Definition at line 197 of file xv_query.c.
References cancel_user_request_notify(), end_user_request_notify(), query_frame, SMALL_BUFFER_LENGTH, start_query(), strdup(), string_undefined_p, and user_log().
Referenced by wpips_main().
|
static |
Definition at line 48 of file xv_query.c.
Referenced by end_query_notify(), and start_query().
|
static |
Definition at line 45 of file xv_query.c.
Referenced by create_query_window(), and start_query().
|
static |
Definition at line 47 of file xv_query.c.
Referenced by help_query_notify(), and start_query().
|
static |
Definition at line 44 of file xv_query.c.
Referenced by cancel_user_request_notify(), create_query_window(), end_query_notify(), and start_query().