|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/desktop/dlogutil.h |
source navigation diff markup identifier search freetext search file search |
1 /* dlogutil.h
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information (NCBI)
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government do not place any restriction on its use or reproduction.
13 * We would, however, appreciate having the NCBI and the author cited in
14 * any work or product based on this material
15 *
16 * Although all reasonable efforts have been taken to ensure the accuracy
17 * and reliability of the software and data, the NLM and the U.S.
18 * Government do not and cannot warrant the performance or results that
19 * may be obtained by using this software or data. The NLM and the U.S.
20 * Government disclaim all warranties, express or implied, including
21 * warranties of performance, merchantability or fitness for any particular
22 * purpose.
23 *
24 * ===========================================================================
25 *
26 * File Name: dlogutil.h
27 *
28 * Author: Jonathan Kans
29 *
30 * Version Creation Date: 1/22/95
31 *
32 * $Revision: 6.105 $
33 *
34 * File Description:
35 *
36 * Modifications:
37 * --------------------------------------------------------------------------
38 * Date Name Description of modification
39 * ------- ---------- -----------------------------------------------------
40 *
41 *
42 * ==========================================================================
43 */
44
45 #ifndef _DLOGUTIL_
46 #define _DLOGUTIL_
47
48 #include <vibrant.h>
49 #include <document.h>
50 #include <sqnutils.h>
51 #include <prtutil.h>
52 #include <asn.h>
53 #include <objall.h>
54 #include <objfeat.h>
55 #include <objfdef.h>
56 #include <sequtil.h>
57
58
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62
63 #define CHANGE_VIEW_NOTABS 0
64 #define CHANGE_VIEW_FOLDERTABS 1
65 #define CHANGE_VIEW_TEXTTABS 2
66 #define CHANGE_VIEW_RADIOBUTTONS 3
67 #define CHANGE_VIEW_POPUP 4
68
69 extern StdPrintOptionsPtr spop;
70
71 extern Boolean SetupPrintOptions (void);
72 extern void FreePrintOptions (void);
73
74 extern EnumFieldAssoc months_alist [];
75
76 extern void DatePtrToVibrant (DatePtr dp, PopuP dateMonth, TexT dateDay, TexT dateYear);
77 extern DatePtr VibrantToDatePtr (PopuP dateMonth, TexT dateDay, TexT dateYear);
78
79 extern ValNodePtr AddStringToValNodeChain (ValNodePtr head, CharPtr str, Uint1 choice);
80
81 #define DESCRIPTOR_FORM_BLOCK \
82 FORM_MESSAGE_BLOCK \
83 DialoG data;
84
85
86 #define FEATURE_FORM_BLOCK \
87 DESCRIPTOR_FORM_BLOCK \
88 DialoG commonRadio; \
89 GrouP commonSubGrp [8]; \
90 Int2 commonPage; \
91 ButtoN partial; \
92 ButtoN exception; \
93 ButtoN pseudo; \
94 DialoG experiment; \
95 DialoG inference; \
96 TexT comment; \
97 TexT title; \
98 TexT exceptText; \
99 PopuP evidence; \
100 Handle gene; \
101 PopuP genePopup; \
102 LisT geneList; \
103 ValNodePtr geneNames; \
104 GrouP useGeneXref; \
105 GrouP newGeneGrp; \
106 TexT geneSymbol; \
107 TexT geneAllele; \
108 TexT geneDesc; \
109 TexT locusTag; \
110 TexT geneSynonym; \
111 ButtoN editGeneBtn; \
112 TexT protXrefName; \
113 TexT protXrefDesc; \
114 DialoG location; \
115 DialoG product; \
116 DialoG featcits; \
117 DialoG dbxrefs; \
118 DialoG gbquals; \
119 DialoG usrobjext; \
120 TexT featid; \
121 TexT fidxref; \
122 ButtoN leave_dlg_up; \
123 UserObjectPtr goTermUserObj; \
124 Int2 badInfAttempts; \
125 Boolean acceptBadInf;
126
127 typedef struct descform {
128 DESCRIPTOR_FORM_BLOCK
129 } DescriptorForm, PNTR DescriptorFormPtr;
130
131 typedef struct featform {
132 FEATURE_FORM_BLOCK
133 } FeatureForm, PNTR FeatureFormPtr;
134
135 extern void SetDescriptorPropagate (BioseqSetPtr bssp);
136 extern Int2 LIBCALLBACK DescriptorPropagate (Pointer data);
137 extern Boolean DescFormReplaceWithoutUpdateProc (ForM f);
138 extern void StdDescFormActnProc (ForM f);
139
140 extern void StdDescFormCleanupProc (GraphiC g, VoidPtr data);
141
142 extern Boolean FeatFormReplaceWithoutUpdateProc (ForM f);
143 extern void StdFeatFormActnProc (ForM f);
144
145 extern void StdSeqFeatPtrToFeatFormProc (ForM f, Pointer data);
146 extern void StdInitFeatFormProc (ForM f);
147 extern void StdFeatFormCleanupProc (GraphiC g, VoidPtr data);
148 extern void StdFeatFormAcceptButtonProc (ButtoN b);
149
150 extern void InferenceDialogToGBQuals (DialoG d, SeqFeatPtr sfp, Boolean convertBadToNote);
151 extern void GBQualsToInferenceDialog (DialoG d, SeqFeatPtr sfp);
152
153 /*
154 extern void ExtendGeneFeatIfOnMRNA (Uint2 entityID, SeqEntryPtr sep);
155 */
156
157 extern OMUserDataPtr ItemAlreadyHasEditor (Uint2 entityID, Uint4 itemID, Uint2 itemtype, Uint2 procid);
158 extern Uint2 GetProcIdForItemEditor (Uint2 entityID, Uint2 itemID, Uint1 itemtype, Uint2 subinputtype);
159 extern OMUserDataPtr EntityAlreadyHasViewer (Uint2 entityID);
160 extern Boolean MakeViewerIndependent (Uint2 entityID, OMUserDataPtr omudp);
161
162 extern Int2 LIBCALLBACK StdVibrantEditorMsgFunc (OMMsgStructPtr ommsp);
163
164 extern Boolean TestInference (FeatureFormPtr ffp, CharPtr badInfQual, size_t len, CharPtr badInfMssg);
165
166 /*****************************************************************************
167 *
168 * Various specific spreadsheet or editor dialogs.
169 *
170 *****************************************************************************/
171
172 extern DialoG CreateAuthorDialog (GrouP prnt, Uint2 rows, Int2 spacing);
173
174 extern DialoG CreateDateDialogEx (GrouP prnt, CharPtr title, Int4 start_year, Int4 num_years);
175 extern DialoG CreateDateDialog (GrouP prnt, CharPtr title);
176
177 extern DialoG CreateAffilDialog (GrouP prnt, CharPtr title);
178 extern DialoG CreatePublisherAffilDialog (GrouP prnt, CharPtr title);
179 extern DialoG CreateProceedingsDialog (GrouP prnt, CharPtr title);
180
181 /* The Ext versions split the affil dialogs into two superimposed pages,
182 both of which are initially hidden, that can go in separate folder tabs */
183
184 extern DialoG CreateExtAffilDialog (GrouP prnt, CharPtr title,
185 GrouP PNTR grp1, GrouP PNTR grp2);
186 extern DialoG CreateExtPublisherAffilDialog (GrouP prnt, CharPtr title,
187 GrouP PNTR grp1, GrouP PNTR grp2);
188 extern DialoG CreateExtProceedingsDialog (GrouP prnt, CharPtr title,
189 GrouP PNTR grp1, GrouP PNTR grp2);
190
191 extern GrouP CreateCommonFeatureGroup (GrouP h, FeatureFormPtr ffp,
192 SeqFeatPtr sfp, Boolean hasGeneControl,
193 Boolean hasCitationTab);
194 extern GrouP CreateCommonFeatureGroupEx (GrouP h, FeatureFormPtr ffp,
195 SeqFeatPtr sfp, Boolean hasGeneControl,
196 Boolean hasCitationTab, Boolean hasGeneSuppress);
197 extern void UpdateGeneLocation (SeqFeatPtr gene, SeqLocPtr old_feat_loc,
198 SeqLocPtr new_feat_loc, Uint2 entityID);
199 extern void PopulateGenePopup (FeatureFormPtr ffp);
200 extern void SeqFeatPtrToCommon (FeatureFormPtr ffp, SeqFeatPtr sfp);
201 extern void SetNewFeatureDefaultInterval (FeatureFormPtr ffp);
202 extern DialoG CreateImportFields (GrouP h, CharPtr name, SeqFeatPtr sfp, Boolean allowProductGBQual);
203 extern DialoG NewCreateImportFields (GrouP h, CharPtr name, SeqFeatPtr sfp, Boolean allowProductGBQual);
204
205
206 extern DialoG CreateIntervalEditorDialog (GrouP h, CharPtr title, Uint2 rows,
207 Int2 spacing, SeqEntryPtr sep,
208 Boolean nucsOK, Boolean protsOK);
209
210 typedef void (*IntEdPartialProc) (FeatureFormPtr ffp, Boolean partial5, Boolean partial3, Boolean order);
211
212 extern DialoG CreateIntervalEditorDialogEx (GrouP h, CharPtr title, Uint2 rows,
213 Int2 spacing, SeqEntryPtr sep,
214 Boolean nucsOK, Boolean protsOK,
215 Boolean useBar, Boolean showPartials,
216 Boolean allowGaps, FeatureFormPtr ffp,
217 IntEdPartialProc proc);
218
219 extern DialoG CreateIntervalEditorDialogExEx (GrouP h, CharPtr title, Uint2 rows,
220 Int2 spacing, SeqEntryPtr sep,
221 Boolean nucsOK, Boolean protsOK,
222 Boolean useBar, Boolean showPartials,
223 Boolean allowGaps, FeatureFormPtr ffp,
224 IntEdPartialProc proc,
225 Boolean use_aln, Boolean show_seqid,
226 TaglistCallback tlp_callback,
227 Pointer callback_data,
228 Boolean allow_nulls_in_list);
229
230 extern void DisplayErrorMessages (CharPtr title, ValNodePtr err_list);
231
232 extern Boolean AdjustFromForGap (Int4Ptr p_from, SeqAlignPtr salp, Int4 aln_len, Int4 aln_row);
233 extern Boolean AdjustToForGap (Int4Ptr p_to, SeqAlignPtr salp, Int4 aln_row);
234
235 extern void SetSequenceAndStrandForIntervalPage (DialoG d);
236 extern void StdFeatIntEdPartialCallback (FeatureFormPtr ffp, Boolean partial5, Boolean partial3, Boolean order);
237
238 extern DialoG CreateVisibleStringDialog (GrouP h, Uint2 rows,
239 Int2 spacing, Int2 width);
240
241 extern DialoG CreateDbtagDialog (GrouP h, Uint2 rows, Int2 spacing,
242 Int2 width1, Int2 width2);
243
244 /*****************************************************************************
245 *
246 * Miscellaneous functions.
247 *
248 *****************************************************************************/
249
250 /*
251 * The TextViewProcsPtr may be registered with a call to SetAppProperty
252 * e.g., SetAppProperty ("TextDisplayForm", &viewprocs), where viewprocs
253 * is a persistent structure filled with callback function pointers specific
254 * for a given application.
255 */
256
257 typedef struct textviewprocs {
258 WndActnProc activateForm;
259 WndActnProc closeForm;
260 WndActnProc createMenus;
261
262 FormMessageFunc handleMessages;
263
264 Int2 minPixelWidth;
265 Int2 minPixelHeight;
266 Boolean useScrollText;
267
268 FonT displayFont;
269
270 Char screenMode;
271
272 } TextViewProcs, PNTR TextViewProcsPtr;
273
274 typedef CharPtr (*Nlm_RepopulateViewer) PROTO ((Pointer userdata));
275 typedef Pointer (*Nlm_RepopulateDataFree) PROTO ((Pointer userdata));
276
277 extern void LaunchGeneralTextViewer (CharPtr path, CharPtr title);
278 extern void LaunchAsnTextViewer (Pointer from, AsnWriteFunc writefunc, CharPtr title);
279 extern void LaunchGeneralTextViewerWithRepopulate
280 (CharPtr path, CharPtr title,
281 Nlm_RepopulateViewer repopulate_func, Pointer repopulate_data,
282 Nlm_RepopulateDataFree free_data_func);
283
284 extern Boolean FileToScrollText (TexT t, CharPtr path);
285 extern void ScrollTextToFile (TexT t, CharPtr path);
286
287 extern void FileToClipboard (CharPtr path);
288
289 /*
290 * The StdEditorProcsPtr may be registered with a call to SetAppProperty
291 * e.g., SetAppProperty ("StdEditorForm", &viewprocs), where viewprocs
292 * is a persistent structure filled with callback function pointers specific
293 * for a given application.
294 */
295
296 typedef struct stdeditorprocs {
297 WndActnProc activateForm;
298 FormMessageFunc handleMessages;
299
300 Boolean duplicateExisting;
301
302 Char screenMode;
303
304 } StdEditorProcs, PNTR StdEditorProcsPtr;
305
306 #ifndef WIN_MAC
307 extern void CreateStdEditorFormMenus (WindoW w);
308 #endif
309
310 /*
311 * When duplicating instead of editing, the editors call the following
312 * function to change the baseFormPtr itemID and itemtype to the closest
313 * Bioseq or BioseqSet, thus adding the new item to that parent.
314 */
315
316 extern Boolean SetClosestParentIfDuplicating (BaseFormPtr bfp);
317
318 /*
319 * The HelpMessageFunc may be registered with a call to SetAppProperty
320 * e.g., SetAppProperty ("HelpMessageProc", helpproc), where helpproc
321 * is an application-supplied callback function that takes character
322 * strings for the heading and section.
323 */
324
325 typedef void (*HelpMessageFunc) (CharPtr, CharPtr);
326
327 /*****************************************************************************
328 *
329 * Miscellaneous functions.
330 *
331 *****************************************************************************/
332
333 extern CharPtr SaveStringFromTextAndStripNewlines (TexT t);
334 extern CharPtr StripNewlines (CharPtr str);
335 extern void NewlinesToTildes (CharPtr str);
336
337 /* GetRidOfEmptyFeatsDescStrings takes either an entityID or a SeqEntryPtr */
338
339 extern void GetRidOfEmptyFeatsDescStrings (Uint2 entityID, SeqEntryPtr sep);
340
341 /*****************************************************************************
342 *
343 * LaunchEntrezURL constructs a web-Entrez URL query. Parameter choices are:
344 *
345 * Database Report Formats
346 *
347 * PubMed DocSum, Brief, Abstract, Citation, MEDLINE, ASN.1, ExternalLink
348 * Nucleotide DocSum, Brief, GenBank, ASN.1, FASTA, ExternalLink
349 * Protein DocSum, Brief, GenPept, ASN.1, FASTA, ExternalLink
350 * Genome DocSum, Brief, ASN.1, ExternalLink
351 * Popset DocSum, Brief, ASN.1, FASTA, ExternalLink
352 * Structure DocSum, Brief
353 * OMIM DocSum, Text, Synopsis, Variants, MiniMIM, ASN.1, ExternalLink
354 * Taxonomy DocSum, Brief, TxInfo, TxTree, ExternalLink
355 *
356 *****************************************************************************/
357
358 NLM_EXTERN void LaunchEntrezURL (CharPtr database, Int4 uid, CharPtr format);
359
360 /* this function creates a dialog for selecting publications in a record */
361 extern DialoG FeatCitEditDialog (GrouP parent, Uint2 entityID);
362
363 /* This structure and the functions after it are used for
364 * modal dialogs with two choices.
365 */
366 typedef struct modalacceptcancel
367 {
368 Boolean accepted;
369 Boolean cancelled;
370 Boolean third_option;
371 } ModalAcceptCancelData, PNTR ModalAcceptCancelPtr;
372
373 extern void ModalAcceptButton (ButtoN b);
374 extern void ModalCancelButton (ButtoN b);
375 extern void ModalThirdOptionButton (ButtoN b);
376 NLM_EXTERN Int4 ThreeOptionsDlg (CharPtr title_txt, CharPtr explain_txt, CharPtr opt1, CharPtr opt2, CharPtr opt3);
377
378 typedef void (*TableDisplayDblClick) PROTO((PoinT, CharPtr, CharPtr, Pointer));
379 typedef Boolean (*TableDisplayLeftInRed) PROTO ((Int4, ValNodePtr, Pointer));
380 extern DialoG TableDisplayDialog (GrouP parent, Int4 width, Int4 height,
381 Int4 frozen_header, Int4 frozen_left,
382 TableDisplayDblClick dbl_click,
383 Pointer dbl_click_data,
384 TableDisplayLeftInRed,
385 Pointer left_in_red_data);
386 extern ValNodePtr FreeTableDisplayRowList (ValNodePtr row_list);
387 extern void PrintTableDisplayRowListToFile (ValNodePtr row_list, FILE *fp);
388 extern ValNodePtr CopyTableDisplayRowList (ValNodePtr row_list);
389 extern CharPtr GetRowListCellText (ValNodePtr row_list, Int4 row, Int4 column);
390 extern FonT GetTableDisplayDefaultFont (void);
391
392
393 #define TALL_SELECTION_LIST 8
394 #define SHORT_SELECTION_LIST 4
395 /* err_msg is the message to put in the results from TestDialog if nothing is selected */
396 /* choice_list should be a valnode list of strings to use for the names of the choices. */
397 /* All is automatically included as a choice if allow_multi is true. */
398 /* The ValNodeList returned is a list of integers indicating the position of the item
399 * in the list: 1 is the first item, 2 is the second item, etc. */
400 extern DialoG SelectionDialog
401 (GrouP h,
402 Nlm_ChangeNotifyProc change_notify,
403 Pointer change_userdata,
404 Boolean allow_multi,
405 CharPtr err_msg,
406 ValNodePtr choice_list,
407 Int2 list_height);
408
409 extern DialoG SelectionDialogEx
410 (GrouP h,
411 Nlm_ChangeNotifyProc change_notify,
412 Pointer change_userdata,
413 Boolean allow_multi,
414 CharPtr err_msg,
415 ValNodePtr choice_list,
416 Int2 list_height,
417 Boolean force_list);
418
419 extern DialoG SelectionDialogExEx
420 (GrouP h,
421 Nlm_ChangeNotifyProc change_notify,
422 Pointer change_userdata,
423 Boolean allow_multi,
424 CharPtr err_msg,
425 ValNodePtr choice_list,
426 Int2 list_height,
427 Boolean force_list,
428 Boolean force_popup);
429
430
431 /* This function should free just the data associated with the ValNode */
432 typedef void (*FreeValNodeProc) PROTO ((ValNodePtr));
433 /* This function should copy just this ValNode, not the chain */
434 typedef ValNodePtr (*CopyValNodeDataProc) PROTO ((ValNodePtr));
435 typedef ValNodePtr (*RemapValNodeProc) PROTO ((ValNodePtr));
436 typedef Boolean (*MatchValNodeProc) PROTO ((ValNodePtr, ValNodePtr));
437 typedef CharPtr (*NameFromValNodeProc) PROTO ((ValNodePtr));
438
439 extern DialoG ValNodeSelectionDialogExEx
440 (GrouP h,
441 ValNodePtr choice_list,
442 Int2 list_height,
443 NameFromValNodeProc name_proc,
444 FreeValNodeProc free_vn_proc,
445 CopyValNodeDataProc copy_vn_proc,
446 MatchValNodeProc match_vn_proc,
447 CharPtr err_name,
448 Nlm_ChangeNotifyProc change_notify,
449 Pointer change_userdata,
450 Boolean allow_multi,
451 Boolean force_list,
452 Boolean force_popup,
453 RemapValNodeProc remap_vn_proc);
454 extern DialoG ValNodeSelectionDialogEx
455 (GrouP h,
456 ValNodePtr choice_list,
457 Int2 list_height,
458 NameFromValNodeProc name_proc,
459 FreeValNodeProc free_vn_proc,
460 CopyValNodeDataProc copy_vn_proc,
461 MatchValNodeProc match_vn_proc,
462 CharPtr err_name,
463 Nlm_ChangeNotifyProc change_notify,
464 Pointer change_userdata,
465 Boolean allow_multi,
466 Boolean force_list,
467 RemapValNodeProc remap_vn_proc);
468 extern DialoG ValNodeSelectionDialog
469 (GrouP h,
470 ValNodePtr choice_list,
471 Int2 list_height,
472 NameFromValNodeProc name_proc,
473 FreeValNodeProc free_vn_proc,
474 CopyValNodeDataProc copy_vn_proc,
475 MatchValNodeProc match_vn_proc,
476 CharPtr err_name,
477 Nlm_ChangeNotifyProc change_notify,
478 Pointer change_userdata,
479 Boolean allow_multi);
480
481 extern DialoG EnumAssocSelectionDialog
482 (GrouP h,
483 Nlm_EnumFieldAssocPtr eap,
484 CharPtr err_name,
485 Boolean allow_multi,
486 Nlm_ChangeNotifyProc change_notify,
487 Pointer change_userdata);
488
489 extern CharPtr ValNodeStringName (ValNodePtr vnp);
490 extern void ValNodeSimpleDataFree (ValNodePtr vnp);
491 extern ValNodePtr ValNodeStringCopy (ValNodePtr vnp);
492 extern Boolean ValNodeChoiceMatch (ValNodePtr vnp1, ValNodePtr vnp2);
493 extern Boolean ValNodeStringMatch (ValNodePtr vnp1, ValNodePtr vnp2);
494
495 extern DialoG SequenceSelectionDialog
496 (GrouP h,
497 Nlm_ChangeNotifyProc change_notify,
498 Pointer change_userdata,
499 Boolean allow_multi,
500 Boolean show_nucs,
501 Boolean show_prots,
502 Uint2 entityID);
503
504 extern DialoG SequenceSelectionDialogEx
505 (GrouP h,
506 Nlm_ChangeNotifyProc change_notify,
507 Pointer change_userdata,
508 Boolean allow_multi,
509 Boolean allow_none,
510 Boolean show_nucs,
511 Boolean show_prots,
512 Uint2 entityID,
513 Int4 list_height);
514
515 extern DialoG SubSourceTypeDialog
516 (GrouP h,
517 Int2 list_height,
518 Nlm_ChangeNotifyProc change_notify,
519 Pointer change_userdata,
520 Boolean allow_multi,
521 Boolean force_list,
522 Boolean include_note);
523
524 extern DialoG OrgModTypeDialog
525 (GrouP h,
526 Int2 list_height,
527 Nlm_ChangeNotifyProc change_notify,
528 Pointer change_userdata,
529 Boolean allow_multi,
530 Boolean force_list,
531 Boolean include_note);
532
533
534 typedef CharPtr (*GetClickableItemText) (ValNodePtr item_list);
535
536 extern DialoG
537 CreateClickableListDialog
538 (GrouP h,
539 CharPtr label1,
540 CharPtr label2,
541 ClickableCallback item_single_click_callback,
542 ClickableCallback item_double_click_callback,
543 Pointer item_click_callback_data,
544 GetClickableItemText get_item_text);
545
546 extern DialoG
547 CreateClickableListDialogEx
548 (GrouP h,
549 CharPtr label1,
550 CharPtr label2,
551 CharPtr help1,
552 CharPtr help2,
553 ClickableCallback item_single_click_callback,
554 ClickableCallback item_double_click_callback,
555 Pointer item_click_callback_data,
556 GetClickableItemText get_item_text,
557 Int4 left_width,
558 Int4 right_width,
559 Boolean horizontal,
560 Boolean show_find);
561
562 extern DialoG
563 CreateClickableListDialogExEx
564 (GrouP h,
565 CharPtr label1,
566 CharPtr label2,
567 CharPtr help1,
568 CharPtr help2,
569 ClickableCallback item_single_click_callback,
570 ClickableCallback item_double_click_callback,
571 Pointer item_click_callback_data,
572 GetClickableItemText get_item_text,
573 Int4 left_width,
574 Int4 right_width,
575 Boolean horizontal,
576 Boolean show_find,
577 Boolean display_chosen);
578
579 extern void SetClickableListDialogTitles (DialoG d, CharPtr title1, CharPtr title2, CharPtr help1, CharPtr help2);
580 extern void SetClickableListDisplayChosen (DialoG d, Boolean set);
581
582 extern void ScrollToNextClickableTextDescription (CharPtr txt, DialoG d);
583 extern void ScrollToPreviousClickableTextDescription (CharPtr txt, DialoG d);
584
585 extern CharPtr GetSelectedClickableListText (DialoG d);
586
587 extern void GetAlignmentsInSeqEntryCallback (SeqAnnotPtr sap, Pointer userdata);
588 extern void CreateSeqAlignLabel (SeqAlignPtr salp, CharPtr buf, Int4 buf_size);
589
590
591 typedef struct existingtext
592 {
593 Int4 existing_text_choice;
594 } ExistingTextData, PNTR ExistingTextPtr;
595
596 typedef enum {
597 eExistingTextChoiceReplaceOld = 1,
598 eExistingTextChoiceAppendSemi,
599 eExistingTextChoiceAppendSpace,
600 eExistingTextChoiceAppendColon,
601 eExistingTextChoiceAppendNone,
602 eExistingTextChoicePrefixSemi,
603 eExistingTextChoicePrefixSpace,
604 eExistingTextChoicePrefixColon,
605 eExistingTextChoicePrefixNone,
606 eExistingTextChoiceLeaveOld,
607 eExistingTextChoiceCancel } EExistingTextChoice;
608
609 extern CharPtr
610 HandleExistingText
611 (CharPtr existing_text,
612 CharPtr new_text,
613 ExistingTextPtr etp);
614
615 extern ExistingTextPtr GetExistingTextHandlerInfo (Int4 num_found, Boolean non_text);
616
617 typedef enum {
618 EditApplyFindLocation_anywhere = 1,
619 EditApplyFindLocation_beginning,
620 EditApplyFindLocation_end
621 } EditApplyFindLocation;
622
623 typedef struct applyvalue
624 {
625 ValNodePtr field_list;
626 ExistingTextPtr etp;
627 CharPtr new_text;
628 CharPtr text_to_replace;
629 EditApplyFindLocation where_to_replace;
630
631 } ApplyValueData, PNTR ApplyValuePtr;
632
633
634 typedef struct editapply
635 {
636 CharPtr find_txt;
637 EditApplyFindLocation find_location;
638 CharPtr repl_txt;
639 CharPtr apply_txt;
640 } EditApplyData, PNTR EditApplyPtr;
641
642 extern EditApplyPtr EditApplyFree (EditApplyPtr eap);
643 extern EditApplyPtr EditApplyNew (void);
644
645 typedef enum {
646 eEditApplyChoice_Apply = 0,
647 eEditApplyChoice_Edit } EEditApplyChoice;
648
649 extern DialoG EditApplyDialog
650 (GrouP h,
651 Int4 action_choice,
652 CharPtr apply_label,
653 ValNodePtr choice_list,
654 Nlm_ChangeNotifyProc change_notify,
655 Pointer change_userdata);
656
657 /* For the global inference editor */
658 typedef struct inferenceparsedata
659 {
660 CharPtr category;
661 Boolean same_species;
662 CharPtr first_field;
663 CharPtr second_field;
664 } InferenceParseData, PNTR InferenceParsePtr;
665
666 extern InferenceParsePtr ParseInferenceText (CharPtr inference);
667 extern CharPtr InferenceTextFromStruct (InferenceParsePtr ipp);
668
669 typedef struct inferencefieldedit
670 {
671 CharPtr field_category;
672 Int4 field_choice;
673 EditApplyPtr edit_apply;
674 } InferenceFieldEditData, PNTR InferenceFieldEditPtr;
675
676 extern InferenceFieldEditPtr InferenceFieldEditFree (InferenceFieldEditPtr ifep);
677
678 typedef enum {
679 eInferenceRemove = 0,
680 eInferenceEditCategory,
681 eInferenceApplyCategoryFields,
682 eInferenceEditCategoryFields,
683 eNumInferenceEditActions } EInferenceEditAction;
684
685
686 typedef struct inferenceedit {
687 EInferenceEditAction action;
688 CharPtr category_from;
689 CharPtr category_to;
690
691 InferenceFieldEditPtr field_edit;
692 } InferenceEditData, PNTR InferenceEditPtr;
693
694 extern InferenceEditPtr InferenceEditFree (InferenceEditPtr iep);
695
696 extern DialoG CreateInferenceEditDialog
697 (GrouP h,
698 Nlm_ChangeNotifyProc change_notify,
699 Pointer change_userdata);
700
701 typedef enum {
702 eValueEditSimpleText = 0,
703 eValueEditTrueFalse,
704 eValueEditLatLon,
705 eValueEditSpecimenVoucher,
706 eNumValueEditors
707 } EValueEdit;
708
709 /* In name_vnp, choice is type of editor, ptrvalue is string with choice name */
710 typedef struct namevaluepair {
711 ValNodePtr name_vnp;
712 CharPtr value;
713 } NameValuePairData, PNTR NameValuePairPtr;
714
715 extern NameValuePairPtr NameValuePairFree (NameValuePairPtr nvp);
716 extern NameValuePairPtr NameValuePairCopy (NameValuePairPtr nvp);
717 extern ValNodePtr NameValuePairListFree (ValNodePtr vnp);
718
719 #define VALUE_LIST_PARENT_FIELDS \
720 DIALOG_MESSAGE_BLOCK \
721 TexT note;
722
723
724 typedef struct valuelistparent {
725 VALUE_LIST_PARENT_FIELDS
726 } ValueListParentData, PNTR ValueListParentPtr;
727
728
729 extern DialoG
730 ValueListDialog
731 (GrouP h,
732 Uint2 num_rows,
733 Int2 width,
734 ValNodePtr choice_list,
735 ValueListParentPtr parent,
736 TaglistCallback change_notify,
737 Pointer change_userdata);
738
739 extern DialoG CreateSubSourceDialog (GrouP h, EnumFieldAssocPtr al);
740 extern DialoG CreateOrgModDialog (GrouP h, EnumFieldAssocPtr al, TexT taxname);
741
742 extern Boolean IsNonTextModifier (CharPtr mod_name);
743
744
745 typedef Boolean (*ParseOK) PROTO ((CharPtr));
746
747 extern Boolean ParseCollectionDateOk (CharPtr txt);
748 extern DialoG CollectionDateDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
749 TaglistCallback tlp_callback,
750 Pointer callback_data);
751
752 extern DialoG CreateRptUnitRangeDialog (GrouP h, SeqEntryPtr sep, CharPtr name,
753 TaglistCallback tlp_callback,
754 Pointer callback_data);
755
756 extern void CreateStandardEditMenu (WindoW w);
757
758 extern void CleanupEvidenceGBQuals (GBQualPtr PNTR prevgbq);
759 extern void VisStringDialogToGbquals (SeqFeatPtr sfp, DialoG d, CharPtr qual);
760
761 extern void RememberSqnTempFile (CharPtr file);
762 extern void FreeSqnTempFiles (void);
763
764 /* For fixing special characters */
765 NLM_EXTERN Boolean FixSpecialCharacters (Uint2 entityID);
766 extern Boolean FixSpecialCharactersForStringsInList (ValNodePtr find_list, CharPtr exp_text, Boolean force_fix);
767 NLM_EXTERN Boolean FixSpecialCharactersForObject (Uint2 datatype, Pointer objdata, CharPtr msg, Boolean force_fix, BoolPtr changed);
768
769 /* for functions that act on all open records */
770 NLM_EXTERN ValNodePtr GetBaseFormList (void);
771 NLM_EXTERN ValNodePtr GetViewedSeqEntryList (void);
772 NLM_EXTERN SeqEntryPtr RestoreFromFile (CharPtr path);
773 NLM_EXTERN Uint2 RestoreEntityIDFromFile (CharPtr path, Uint2 entityID);
774
775 NLM_EXTERN Int2 PanelOffsetFromCharOffsetEx (DoC doc, FonT font, Int2 item, Int2 col, Int2 char_offset);
776 NLM_EXTERN Int2 GetTextSelectCharOffsetEx (PoinT pt, DoC doc, FonT font, Int2 item, Int2 row, Int2 col);
777 NLM_EXTERN CharPtr GetSelectedDocText (DoC doc, Int2 item_start, Int2 row_start, Int2 col_start, Int2 char_start,
778 Int2 item_stop, Int2 row_stop, Int2 col_stop, Int2 char_stop,
779 Int2Ptr only_these_columns, Int2 num_col);
780
781
782 /* for feature replace */
783 NLM_EXTERN ValNodePtr FeatureReplaceListFree (ValNodePtr vnp);
784 NLM_EXTERN void ActOnFeatureReplaceList (ValNodePtr list);
785 NLM_EXTERN DialoG FeatureReplaceListDialog (GrouP h, Int4 width, Nlm_ChangeNotifyProc change_notify, Pointer change_userdata);
786 NLM_EXTERN Boolean AddFeaturesToReplaceList (DialoG d, ValNodePtr feature_list);
787 NLM_EXTERN ValNodePtr RemoveFeaturesFromReplaceList (DialoG d);
788 NLM_EXTERN ValNodePtr FeatureReplaceListFromSeqAnnot (SeqAnnotPtr sap);
789 NLM_EXTERN DialoG FeatureSelectListDialog (GrouP h, Int4 width);
790 NLM_EXTERN ValNodePtr RemoveSelectedFeaturesFromList (DialoG d);
791 NLM_EXTERN void AddFeaturesToList (DialoG d, ValNodePtr features);
792 NLM_EXTERN void SortSeqFeatInAnnot (SeqAnnotPtr sap);
793 NLM_EXTERN SeqFeatPtr GetSelectedNewFeature (DialoG d);
794 NLM_EXTERN void ScrollToMatchingFeatures (DialoG d, SeqFeatPtr sfp);
795 NLM_EXTERN Boolean AutomatchFeatures (DialoG d, ValNodePtr PNTR existing_features);
796
797 NLM_EXTERN void CloseLog (LogInfoPtr lip);
798
799
800 #ifdef __cplusplus
801 }
802 #endif
803
804 #endif /* ndef _DLOGUTIL_ */
805
806 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |