PIPS
xv_edit2.c
Go to the documentation of this file.
1 /*
2 
3  $Id: xv_edit2.c 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 
28 #include <stdlib.h>
29 #include <stdio.h>
30 #include <sys/param.h>
31 
32 #include <sys/time.h>
33 #include <sys/resource.h>
34 #include <xview/xview.h>
35 #include <xview/panel.h>
36 #include <xview/text.h>
37 
38 #if (defined(TEXT))
39 #undef TEXT
40 #endif
41 
42 #if (defined(TEXT_TYPE))
43 #undef TEXT_TYPE
44 #endif
45 
46 #include "genC.h"
47 #include "linear.h"
48 #include "ri.h"
49 #include "ri-util.h"
50 #include "database.h"
51 
52 #include "misc.h"
53 #include "pipsdbm.h"
54 
55 #include "resources.h"
56 #include "constants.h"
57 #include "top-level.h"
58 
59 #include "wpips.h"
60 
61 /* Include the label names: */
62 #include "wpips-labels.h"
63 
65 #include "wpips_view_menu_layout.h"
66  /* No more views */
67  {
68  NULL, NULL, NULL
69  }
70 };
71 
72 
73 
78 
79 static Menu_item current_selection_mi,
82 Menu_item edit_menu_item;
83 
84 /* The menu "View" on the main panel: */
85 Menu view_menu;
86 
87 
88 /* To pass the view name to
89  execute_wpips_execute_and_display_something_outside_the_notifyer(): */
91 
92 
93 void
94 edit_notify(Menu menu,
95  Menu_item menu_item)
96 {
97  char string_filename[SMALL_BUFFER_LENGTH],
98  string_modulename[SMALL_BUFFER_LENGTH];
99  char file_name_in_database[MAXPATHLEN*2];
100  char * modulename = db_get_current_module_name();
101  char * file_name;
102  int win_nb;
103  char * alternate_wpips_editor;
104 
105  if (modulename == NULL) {
106  prompt_user("No module selected");
107  return;
108  }
109 
110  if (wpips_emacs_mode) {
111  /* Rely on the standard EPips viewer: */
112  wpips_view_menu_layout_line * current_view;
113  char * label = (char *) xv_get(menu_item, MENU_STRING);
114  /* Translate the menu string in a resource name: */
115  for (current_view = &wpips_view_menu_layout[0];
116  current_view->menu_entry_string != NULL;
117  current_view++)
118  if (strcmp(label, current_view->menu_entry_string) == 0)
119  break;
120 
121  pips_assert("Resource related to the menu entry not found",
122  current_view->menu_entry_string != NULL);
123 
125  }
126  else {
127  file_name = db_get_file_resource(DBR_SOURCE_FILE, modulename, TRUE);
128  sprintf(file_name_in_database, "%s/%s",
130  file_name);
131 
132  if ((alternate_wpips_editor = getenv("PIPS_WPIPS_EDITOR")) != NULL) {
133  char editor_command[MAXPATHLEN*2];
134  sprintf(editor_command, "%s %s &",
135  alternate_wpips_editor,
136  file_name_in_database);
137  system(editor_command);
138  }
139  else {
140  /* Is there an available edit_textsw ? */
141  if ( (win_nb=alloc_first_initialized_window(FALSE)) == NO_TEXTSW_AVAILABLE ) {
142  prompt_user("None of the text-windows is available");
143  return;
144  }
145 
146  sprintf(string_filename, "File: %s", file_name);
147  sprintf(string_modulename, "Module: %s", modulename);
148 
149  /* Display the file name and the module name. RK, 2/06/1993 : */
150  xv_set(edit_frame[win_nb], FRAME_LABEL, "Pips Edit Facility",
151  FRAME_SHOW_FOOTER, TRUE,
152  FRAME_LEFT_FOOTER, string_filename,
153  FRAME_RIGHT_FOOTER, string_modulename,
154  NULL);
155 
156  xv_set(edit_textsw[win_nb],
157  TEXTSW_FILE, file_name_in_database,
158  TEXTSW_BROWSING, FALSE,
159  TEXTSW_FIRST, 0,
160  NULL);
161 
162  unhide_window(edit_frame[win_nb]);
163 
164  xv_set(current_selection_mi,
165  MENU_STRING, "Lasts",
166  MENU_INACTIVE, FALSE,
167  NULL);
168 
169  xv_set(close_menu_item, MENU_INACTIVE, FALSE, NULL);
170  }
171  }
172 }
173 
174 
175 void current_selection_notify(menu, menu_item)
176 Menu menu;
177 Menu_item menu_item;
178 {
179  int i;
180 
181  for(i = 0; i < number_of_wpips_windows; i++)
183 }
184 
185 
186 #define DONT_TOUCH_WINDOW_ADDRESS 0
187 
188 void dont_touch_window_notify(Panel_item item, int value, Event *event)
189 {
190  bool *dont_touch_window = (bool *) xv_get(item, XV_KEY_DATA,
192  *dont_touch_window = (bool) xv_get(item, PANEL_VALUE);
193 }
194 
195 
196 char *
198 {
199  char title_string_beginning[] = "Xview Pips Display Facility # ";
200  static char title_string[sizeof(title_string_beginning) + 4];
201 
202  (void) sprintf(title_string, "%s%d",
203  title_string_beginning, window_number + 1);
204  /* xv_set will copy the string. */
205  return title_string;
206 }
207 
208 /* Find the first free window if any. If called with TRUE, giive the
209  same as the previous choosen one. */
210 int
211 alloc_first_initialized_window(bool the_same_as_previous)
212 {
213  static int next = 0;
214  static int candidate = 0;
215  int i;
216 
217  if (the_same_as_previous)
218  return candidate;
219 
220  for(i = next; i < next + number_of_wpips_windows; i++) {
221  candidate = i % number_of_wpips_windows;
222  /* Skip windows with modified text inside : */
223  if ((bool)xv_get(edit_textsw[candidate], TEXTSW_MODIFIED))
224  continue;
225  /* Skip windows with a retain attribute : */
226  if ((bool)xv_get(check_box[candidate], PANEL_VALUE))
227  continue;
228 
229  next = candidate + 1;
230  return candidate;
231  }
232  candidate = NO_TEXTSW_AVAILABLE;
233 
234  return candidate;
235 }
236 
237 
238 /* Mark a wpips or epips window as busy: */
239 bool
240 wpips_view_marked_busy(char * title_module_name, /* The module name for example */
241  char * title_label, /* "Sequential View" for exemple */
242  char * icon_name,
243  char * icon_title)
244 {
245  char busy_label[SMALL_BUFFER_LENGTH];
246 
247  if (! wpips_emacs_mode) {
248  int window_number;
249  /* Is there an available edit_textsw ? */
251  == NO_TEXTSW_AVAILABLE) {
252  prompt_user("None of the text-windows is available");
253  return FALSE;
254  }
255  (void) sprintf(busy_label, "*Computing %s * ...", title_label);
256  /* Display the file name and the module name. RK, 2/06/1993 : */
257  xv_set(edit_frame[window_number],
258  FRAME_LABEL, compute_title_string(window_number),
259  FRAME_SHOW_FOOTER, TRUE,
260  FRAME_LEFT_FOOTER, busy_label,
261  FRAME_RIGHT_FOOTER, title_module_name,
262  FRAME_BUSY, TRUE,
263  NULL);
264 
265  set_pips_icon(edit_frame[window_number], icon_name, icon_title);
266 
268  }
270 
271  return TRUE;
272 }
273 
274 
275 /* Display a file in a wpips or epips window: */
276 void
278  char * title_module_name, /* The module name for example */
279  char * title_label, /* "Sequential View" for exemple */
280  char * icon_name,
281  char * icon_title)
282 {
283  if (file_name == NULL) {
284  /* Well, something got wrong... */
285  prompt_user("Nothing available to display...");
286  return;
287  }
288 
289  if (! wpips_emacs_mode) {
290  int window_number;
291 
292  /* Is there an available edit_textsw ? Ask for the same one
293  allocated for wpips_view_marked_busy() */
295  == NO_TEXTSW_AVAILABLE) {
296  prompt_user("None of the text-windows is available");
297  return;
298  }
299  /* Display the file name and the module name. RK, 2/06/1993 : */
300  xv_set(edit_frame[window_number],
301  FRAME_LABEL, compute_title_string(window_number),
302  FRAME_SHOW_FOOTER, TRUE,
303  FRAME_RIGHT_FOOTER, title_module_name,
304  NULL);
305 
306  set_pips_icon(edit_frame[window_number], icon_name, icon_title);
307 
308  xv_set(edit_textsw[window_number],
309  TEXTSW_FILE, file_name,
310  TEXTSW_BROWSING, TRUE,
311  TEXTSW_FIRST, 0,
312  NULL);
313 
314  xv_set(edit_frame[window_number],
315  FRAME_LEFT_FOOTER, title_label,
316  FRAME_BUSY, FALSE,
317  NULL);
318 
320 
321  xv_set(current_selection_mi,
322  MENU_STRING, "Lasts",
323  MENU_INACTIVE, FALSE, NULL);
324  xv_set(close_menu_item, MENU_INACTIVE, FALSE, NULL);
325  }
326  else {
327  /* The Emacs mode equivalent: */
329  /* send_icon_name_to_emacs(icon_number); */
330  send_view_to_emacs(title_label, file_name);
331  }
333 }
334 
335 
336 /* Use daVinci to display a graph information: */
337 void
339 {
340  char * file_name;
341  char a_buffer[SMALL_BUFFER_LENGTH];
342  /* Exploit some parallelism between daVinci/Emacs and PIPS
343  itself: */
344  if (wpips_emacs_mode)
346 
348 
349  user_log("Displaying in a \"daVinci\" window...\n");
350 
351  /* Preprocess the graph to be understandable by daVinci : */
352  if (wpips_emacs_mode) {
353  sprintf(a_buffer, "pips_graph2daVinci %s", file_name);
354  system(a_buffer);
355  /* Since Emacs may be with another current directory, use the
356  full path name: */
358  "/", file_name, NULL));
359  }
360  else {
361  (void) sprintf(a_buffer, "pips_graph2daVinci -launch_daVinci %s",
362  file_name);
363  system(a_buffer);
364  }
365 
366  free(file_name);
367 }
368 
369 
370 /* Use some text viewer to display the resource: */
371 void
373 {
374  char title_module_name[SMALL_BUFFER_LENGTH];
375 
376  char * print_type = menu_line->resource_name_to_view;
377  char * icon_name = menu_line->icon_name;
378  char * label = menu_line->menu_entry_string;
379 
380  (void) sprintf(title_module_name, "Module: %s",
382  if (wpips_view_marked_busy(title_module_name, label, icon_name,
385 
386  wpips_file_view(file_name, title_module_name, label, icon_name,
388 
389  free(file_name);
390  }
391 }
392 
393 
394 /* Mainly a hack to display 2 files in only one method for WP65... */
395 void
397 {
398  char title_module_name[SMALL_BUFFER_LENGTH];
399 
400  char * print_type = menu_line->resource_name_to_view;
401  char * icon_name = menu_line->icon_name;
402  char * label = menu_line->menu_entry_string;
403 
404  (void) sprintf(title_module_name, "Module: %s",
406  if (wpips_view_marked_busy(title_module_name, label, icon_name,
408  {
409  char bank_view_name[SMALL_BUFFER_LENGTH];
410 
412  wpips_file_view(file_name, title_module_name, label, icon_name,
414  free(file_name);
415 
416  /* Now display the other file: */
417  (void) sprintf(bank_view_name, "%s (bank view)", label);
418  if (wpips_view_marked_busy(title_module_name, bank_view_name,
419  "WP65_bank", db_get_current_module_name()))
420  {
421  /* Assume the previous build_view_file built the both
422  resources: */
423  file_name = get_dont_build_view_file(DBR_WP65_BANK_FILE);
424 
425  wpips_file_view(file_name, title_module_name,
426  bank_view_name, "WP65_bank",
428 
429  free(file_name);
430  }
431  }
432 }
433 
434 
435 /* To execute something and display some Pips output with wpips or
436  epips, called outside the notifyer: */
437 void
439 {
441 
442  /* Execute the needed method: */
443  menu_line->method_function_to_use(menu_line);
444 
445  /* The module list may have changed (well not very likely to
446  happen, but...): */
449 }
450 
451 
452 void
454 {
456  /* Ask to execute the
457  execute_wpips_execute_and_display_something_outside_the_notifyer(): */
459  /* I guess the function above does not return... */
460 }
461 
462 
463 /* To execute something and display some Pips output with wpips or
464  epips: */
465 void
467 {
469  wpips_view_menu_layout_line * current_view;
470 
471  if (module_name == NULL) {
472  prompt_user("No module selected");
473  return;
474  }
475 
476  /* Translate the resource name in a menu entry descriptor: */
477  for (current_view = &wpips_view_menu_layout[0];
478  current_view->menu_entry_string != NULL;
479  current_view++)
480  if (strcmp(resource_name, current_view->resource_name_to_view) == 0)
481  break;
482 
483  pips_assert("Resource related to the menu entry not found",
484  current_view->menu_entry_string != NULL);
485 
487 }
488 
489 
490 /* To execute something and display some Pips output with wpips or
491  epips by knowing its alias: */
492 void
494 {
496  wpips_view_menu_layout_line * current_view;
497 
498  if (module_name == NULL) {
499  prompt_user("No module selected");
500  return;
501  }
502 
503  for (current_view = &wpips_view_menu_layout[0];
504  current_view->menu_entry_string != NULL;
505  current_view++)
506  if (strcmp(alias_name, current_view->menu_entry_string) == 0)
507  break;
508 
509  pips_assert("Resource related to the menu entry not found",
510  current_view->menu_entry_string != NULL);
511 
513 }
514 
515 
516 void
517 view_notify(Menu menu,
518  Menu_item menu_item)
519 {
520  /* Translate the menu string in a resource name: */
521  char * label = (char *) xv_get(menu_item, MENU_STRING);
523 }
524 
525 
526 void
528  Menu_item menu_item)
529 {
530  int i;
531 
532  if (! wpips_emacs_mode) {
533  for(i = 0; i < MAX_NUMBER_OF_WPIPS_WINDOWS; i++)
534  if (! (bool)xv_get(edit_textsw[i], TEXTSW_MODIFIED))
536 
537  for(i = 0; i < MAX_NUMBER_OF_WPIPS_WINDOWS; i++)
538  if ((bool)xv_get(edit_textsw[i], TEXTSW_MODIFIED)) {
540  prompt_user("File not saved in editor");
541  return;
542  }
543 
544  for(i = 0; i < MAX_NUMBER_OF_WPIPS_WINDOWS; i++)
546 
547  xv_set(current_selection_mi,
548  MENU_STRING, "No Selection",
549  MENU_INACTIVE, TRUE, NULL);
550 
551  xv_set(close_menu_item, MENU_INACTIVE, TRUE, NULL);
552  }
554 }
555 
556 
557 void
558 disable_menu_item(Menu_item item)
559 {
560  xv_set(item, MENU_INACTIVE, TRUE, 0);
561 }
562 
563 
564 void
565 enable_menu_item(Menu_item item)
566 {
567  xv_set(item, MENU_INACTIVE, FALSE, 0);
568 }
569 
570 
571 void
572 apply_on_each_view_item(void (* function_to_apply_on_each_menu_item)(Menu_item),
573  void (* function_to_apply_on_each_panel_item)(Panel_item))
574 {
575  int i;
576 
577  /* Skip the "current_selection_mi" and "close" Menu_items: */
578  for(i = (int) xv_get(view_menu, MENU_NITEMS); i > 0; i--) {
579  Menu_item menu_item = (Menu_item) xv_get(view_menu, MENU_NTH_ITEM, i);
580  /* Skip the title item: */
581  if (!(bool) xv_get(menu_item, MENU_TITLE)
582  && menu_item != current_selection_mi
583  && menu_item != close_menu_item
584  && xv_get(menu_item, MENU_NOTIFY_PROC) != NULL)
585  function_to_apply_on_each_menu_item(menu_item);
586  }
587 
588  /* Now walk through the options panel: */
589  {
590  Panel_item panel_item;
591 
592  PANEL_EACH_ITEM(options_panel, panel_item)
593  /* Only on the PANEL_CHOICE_STACK: */
594  if ((Panel_item_type) xv_get(panel_item, PANEL_ITEM_CLASS) ==
595  PANEL_BUTTON_ITEM)
596  function_to_apply_on_each_panel_item(panel_item);
597  PANEL_END_EACH
598  }
599 }
600 
601 
602 void
604 {
606 }
607 
608 
609 void
611 {
613 }
614 
615 
617 {
618  /* Xv_Window window; */
619  int i;
620 
621  for(i = 0; i < MAX_NUMBER_OF_WPIPS_WINDOWS; i++) {
622  Panel panel;
623 
624  edit_textsw[i] = xv_create(edit_frame[i], TEXTSW,
625  TEXTSW_DISABLE_CD, TRUE,
626  TEXTSW_DISABLE_LOAD, TRUE,
627  0);
628  window_fit(edit_textsw[i]);
629  panel = xv_create(edit_frame[i], PANEL,
630  WIN_ROW_GAP, 1,
631  WIN_COLUMN_GAP, 1,
632  NULL);
633  dont_touch_window[i] = FALSE;
634  check_box[i] = xv_create(panel, PANEL_CHECK_BOX,
635  PANEL_CHOICE_STRINGS, "Retain this window", NULL,
636  PANEL_VALUE, dont_touch_window[i],
637  PANEL_ITEM_X_GAP, 1,
638  PANEL_ITEM_Y_GAP, 1,
639  PANEL_NOTIFY_PROC, dont_touch_window_notify,
641  NULL);
642  window_fit_height(panel);
643  window_fit(edit_frame[i]);
644  }
645 }
646 
647 
648 void
650 {
651  wpips_view_menu_layout_line * current_view;
652 
654  xv_create(NULL, MENUITEM,
655  MENU_STRING, "No Selection",
656  MENU_NOTIFY_PROC, current_selection_notify,
657  MENU_INACTIVE, TRUE,
658  MENU_RELEASE,
659  NULL);
660 
661  close_menu_item =
662  xv_create(NULL, MENUITEM,
663  MENU_STRING, "Close",
664  MENU_NOTIFY_PROC, edit_close_notify,
665  MENU_INACTIVE, TRUE,
666  MENU_RELEASE,
667  NULL);
668 
670  xv_create(NULL, MENUITEM,
671  MENU_STRING, SEQUENTIAL_VIEW,
672  MENU_NOTIFY_PROC, view_notify,
673  NULL);
674 
675  view_menu =
676  xv_create(XV_NULL, MENU_COMMAND_MENU,
677  MENU_GEN_PIN_WINDOW, main_frame, "View & Edit Menu",
678  MENU_TITLE_ITEM, "Viewing or editing a module ",
679  NULL);
680 
681  if (! wpips_emacs_mode) {
682  /* Make sense only if we have XView edit windows: */
683  xv_set(view_menu, MENU_APPEND_ITEM, current_selection_mi,
684  NULL);
685  }
686  /* Now add all the view entries: */
687  for (current_view = &wpips_view_menu_layout[0];
688  current_view->menu_entry_string != NULL;
689  current_view++) {
690  if (strcmp(current_view->menu_entry_string,
692  xv_set(view_menu,
693  /* Just a separator: */
695  NULL);
696  else
697  xv_set(view_menu,
698  MENU_ACTION_ITEM, current_view->menu_entry_string,
699  view_notify,
700  NULL);
701  }
702  if (! wpips_emacs_mode) {
703  /* Make sense only if we have XView edit windows: */
704  xv_set(view_menu, /* Just a separator: */
706  MENU_APPEND_ITEM, close_menu_item,
707  NULL);
708  }
709 
710  (void) xv_create(main_panel, PANEL_BUTTON,
711  PANEL_LABEL_STRING, "View",
712  PANEL_ITEM_MENU, view_menu,
713  NULL);
714 
715 }
void user_log(const char *format,...)
Definition: message.c:234
string db_get_current_module_name(void)
Also used to check whether set...
Definition: database.c:1059
#define resource_name(x)
Definition: database.h:108
void ask_emacs_to_open_a_new_daVinci_context()
Definition: emacs.c:236
void send_the_names_of_the_available_modules_to_emacs(void)
Tell Emacs about what are the modules available in the current workspace, if any:
Definition: emacs.c:137
void ask_emacs_to_display_a_graph(string file_name)
Definition: emacs.c:243
bool wpips_emacs_mode
Here are all the stuff to interface Pips with Emacs.
Definition: emacs.c:65
void send_view_to_emacs(char *view_name, char *the_file_name)
Definition: emacs.c:192
void send_module_name_to_emacs(char *some_text)
Here are all the methods used to send an object to Emacs:
Definition: emacs.c:128
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
char * get_cwd(void)
returns the current working directory name.
Definition: file.c:486
void free(void *)
#define SEQUENTIAL_VIEW
Definition: gpips-labels.h:33
#define SMALL_BUFFER_LENGTH
Definition: gpips-local.h:24
GtkWidget * main_frame
If we are in the Emacs mode, the log_frame is no longer really used:
Definition: gpips.c:60
#define NO_TEXTSW_AVAILABLE
Definition: gpips-local.h:32
void set_pips_icon(Frame frame, char *icon_name, char *icon_text)
Definition: xv_icons.c:118
void execute_main_loop_command(gpips_main_loop_command_type command)
To ask pipsmake to stop as soon as possible:
Definition: gpips.c:267
void prompt_user(string a_printf_format,...)
Definition: gtk_log.c:66
void display_memory_usage()
Definition: gtk_status.c:84
GtkWidget * window_number
Definition: gtk_status.c:75
gint hide_window(GtkWidget *window, GdkEvent *ev __attribute__((unused)), gpointer data __attribute__((unused)))
Definition: gtk_utils.c:89
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define MAXPATHLEN
MAXPATHLEN is defined in <sys/param.h> for SunOS...
Definition: misc-local.h:203
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
int bool
we cannot use an enum or stdbool because we need to be compatible with newgen, thus boolean need to h...
Definition: newgen_types.h:78
#define db_get_file_resource
#define build_pgmwd
string db_get_current_workspace_name(void)
the function is used to check that there is some current workspace...
Definition: workspace.c:82
string get_dont_build_view_file(const char *)
Definition: view.c:102
string build_view_file(const char *)
view.c
Definition: view.c:97
void print_type(type)
For debugging.
Definition: type.c:111
The type describing a View menu entry:
Definition: wpips-local.h:84
void(* method_function_to_use)(struct wpips_view_menu_layout_line_s *)
Definition: wpips-local.h:87
static string file_name
#define MAX_NUMBER_OF_WPIPS_WINDOWS
How many display wondows can be opened :
Definition: wpips-local.h:30
#define INITIAL_NUMBER_OF_WPIPS_WINDOWS
Definition: wpips-local.h:31
#define WPIPS_MENU_SEPARATOR_ID
How it is specified in the layout .h:
Definition: wpips-local.h:96
Frame edit_frame[MAX_NUMBER_OF_WPIPS_WINDOWS]
Definition: wpips-local.h:41
@ WPIPS_EXECUTE_AND_DISPLAY
Definition: wpips-local.h:69
Panel main_panel
Definition: wpips.c:63
#define WPIPS_MENU_SEPARATOR
Define the menu separator:
Definition: wpips-local.h:94
int alloc_first_initialized_window(bool the_same_as_previous)
Find the first free window if any.
Definition: xv_edit2.c:211
void create_edit_menu()
Definition: xv_edit2.c:649
void wpips_display_graph_file_display(wpips_view_menu_layout_line *menu_line)
Use daVinci to display a graph information:
Definition: xv_edit2.c:338
void wpips_execute_and_display_something_from_alias(char *alias_name)
To execute something and display some Pips output with wpips or epips by knowing its alias:
Definition: xv_edit2.c:493
void create_edit_window()
Definition: xv_edit2.c:616
char * compute_title_string(int window_number)
Definition: xv_edit2.c:197
static Menu_item close_menu_item
Definition: xv_edit2.c:80
void wpips_execute_and_display_something_outside_the_notifyer(wpips_view_menu_layout_line *menu_line)
Definition: xv_edit2.c:453
bool wpips_view_marked_busy(char *title_module_name, char *title_label, char *icon_name, char *icon_title)
Mark a wpips or epips window as busy:
Definition: xv_edit2.c:240
void view_notify(Menu menu, Menu_item menu_item)
Definition: xv_edit2.c:517
Menu_item edit_menu_item
Definition: xv_edit2.c:82
static Menu_item current_selection_mi
Definition: xv_edit2.c:79
static wpips_view_menu_layout_line wpips_view_menu_layout[]
Include the label names:
Definition: xv_edit2.c:64
void execute_wpips_execute_and_display_something_outside_the_notifyer()
To execute something and display some Pips output with wpips or epips, called outside the notifyer:
Definition: xv_edit2.c:438
void wpips_display_plain_file(wpips_view_menu_layout_line *menu_line)
Use some text viewer to display the resource:
Definition: xv_edit2.c:372
void wpips_display_WP65_file(wpips_view_menu_layout_line *menu_line)
Mainly a hack to display 2 files in only one method for WP65...
Definition: xv_edit2.c:396
void wpips_file_view(char *file_name, char *title_module_name, char *title_label, char *icon_name, char *icon_title)
Display a file in a wpips or epips window:
Definition: xv_edit2.c:277
static wpips_view_menu_layout_line * execute_wpips_execute_and_display_something_outside_the_notifyer_menu_line
To pass the view name to execute_wpips_execute_and_display_something_outside_the_notifyer():
Definition: xv_edit2.c:90
static Panel_item check_box[MAX_NUMBER_OF_WPIPS_WINDOWS]
Definition: xv_edit2.c:75
void current_selection_notify(Menu menu, Menu_item menu_item)
Definition: xv_edit2.c:175
void dont_touch_window_notify(Panel_item item, int value, Event *event)
Definition: xv_edit2.c:188
static Menu_item sequential_view_menu_item
Definition: xv_edit2.c:81
void wpips_execute_and_display_something(char *resource_name)
To execute something and display some Pips output with wpips or epips:
Definition: xv_edit2.c:466
static bool dont_touch_window[MAX_NUMBER_OF_WPIPS_WINDOWS]
Definition: xv_edit2.c:76
static Textsw edit_textsw[MAX_NUMBER_OF_WPIPS_WINDOWS]
Definition: xv_edit2.c:74
void enable_menu_item(Menu_item item)
Definition: xv_edit2.c:565
void edit_close_notify(Menu menu, Menu_item menu_item)
Definition: xv_edit2.c:527
void disable_view_selection()
Definition: xv_edit2.c:603
void enable_view_selection()
Definition: xv_edit2.c:610
void disable_menu_item(Menu_item item)
Definition: xv_edit2.c:558
Menu view_menu
The menu "View" on the main panel:
Definition: xv_edit2.c:85
void edit_notify(Menu menu, Menu_item menu_item)
Definition: xv_edit2.c:94
#define DONT_TOUCH_WINDOW_ADDRESS
Definition: xv_edit2.c:186
int number_of_wpips_windows
Definition: xv_edit2.c:77
void apply_on_each_view_item(void(*function_to_apply_on_each_menu_item)(Menu_item), void(*function_to_apply_on_each_panel_item)(Panel_item))
Definition: xv_edit2.c:572
void enable_panel_item(Panel_item item)
Definition: xv_props.c:102
Panel options_panel
Definition: xv_props.c:69
void disable_panel_item(Panel_item item)
Definition: xv_props.c:95
void unhide_window(Frame frame)
map a frame on the screen
Definition: xv_utils.c:55