~ubuntu-branches/ubuntu/trusty/rasmol/trusty

« back to all changes in this revision

Viewing changes to src/rastxt.c

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-11-24 16:48:04 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091124164804-liuvywcs6l45ibl3
Tags: 2.7.5-1
* New upstream release
* Imakefile: Use Debian versions of library dependencies
* control:
  - Add build-deps to libcvector2-dev, libcqrlib2-dev, libneartree3-dev
  - Update to standards-version 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
 
 *                             RasMol 2.7.4.2                              *
 
2
 *                              RasMol 2.7.5                               *
3
3
 *                                                                         *
4
4
 *                                 RasMol                                  *
5
5
 *                 Molecular Graphics Visualisation Tool                   *
6
 
 *                            19 November 2007                             *
7
 
 *                          (rev. 21 March 2008)                           *
 
6
 *                              13 June 2009                               *
8
7
 *                                                                         *
9
8
 *                   Based on RasMol 2.6 by Roger Sayle                    *
10
9
 * Biomolecular Structures Group, Glaxo Wellcome Research & Development,   *
31
30
 *                   RasMol 2.7.4   Nov 07                                 *
32
31
 *                   RasMol 2.7.4.1 Jan 08                                 *
33
32
 *                   RasMol 2.7.4.2 Mar 08                                 *
34
 
 *                                                                         *
35
 
 * RasMol 2.7.3 incorporates changes by Clarice Chigbo, Ricky Chachra,     *
36
 
 * and Mamoru Yamanishi.  Work on RasMol 2.7.3 supported in part by        *
37
 
 * grants DBI-0203064, DBI-0315281 and EF-0312612 from the U.S. National   *
38
 
 * Science Foundation and grant DE-FG02-03ER63601 from the U.S. Department *
39
 
 * of Energy.  RasMol 2.7.4 incorporates changes by G. Todorov, Nan Jia,   *
40
 
 * N. Darakev, P. Kamburov, G. McQuillan, J. Jemilawon.  Work on RasMol    *
41
 
 * 2.7.4 supported in part by grant 1R15GM078077-01 from the National      *
42
 
 * Institute of General Medical Sciences (NIGMS). The content is solely    *
43
 
 * the responsibility of the authors and does not necessarily represent    * 
44
 
 * the official views of the funding organizations.                        *
45
 
 *                                                                         *
46
 
 * The code for use of RasMol under GTK in RasMol 2.7.4.2 was written by   *
47
 
 * Teemu  Ikonen.                                                          *
 
33
 *                   RasMol 2.7.5   May 09                                 *
 
34
 *                                                                         *
 
35
 * RasMol 2.7.5 incorporates changes by T. Ikonen, G. McQuillan, N. Darakev*
 
36
 * and L. Andrews (via the neartree package).  Work on RasMol 2.7.5        *
 
37
 * supported in part by grant 1R15GM078077-01 from the National Institute  *
 
38
 * of General Medical Sciences (NIGMS), U.S. National Institutes of Health *
 
39
 * and by grant ER63601-1021466-0009501 from the Office of Biological &    *
 
40
 * Environmental Research (BER), Office of Science, U. S. Department of    *
 
41
 * Energy.  RasMol 2.7.4 incorporated  changes by G. Todorov, Nan Jia,     *
 
42
 * N. Darakev, P. Kamburov, G. McQuillan, and J. Jemilawon. Work on RasMol *
 
43
 * 2.7.4 supported in part by grant 1R15GM078077-01 from the NIGMS/NIH and *
 
44
 * grant ER63601-1021466-0009501 from BER/DOE.  RasMol 2.7.3 incorporates  *
 
45
 * changes by Clarice Chigbo, Ricky Chachra, and Mamoru Yamanishi.  Work   *
 
46
 * on RasMol 2.7.3 supported in part by grants DBI-0203064, DBI-0315281    *
 
47
 * and EF-0312612 from the U.S. National Science Foundation and grant      *
 
48
 * DE-FG02-03ER63601 from BER/DOE. The content is solely the responsibility*
 
49
 * of the authors and does not necessarily represent the official views of *
 
50
 * the funding organizations.                                              *
 
51
 *                                                                         *
 
52
 * The code for use of RasMol under GTK in RasMol 2.7.4.2 and 2.7.5 was    *
 
53
 * written by Teemu Ikonen.                                                *
48
54
 *                                                                         *
49
55
 *                    and Incorporating Translations by                    *
50
56
 *  Author                               Item                     Language *
436
442
 
437
443
void RefreshScreen( void )
438
444
{
 
445
    int ReDrawFlagSave;
439
446
    if( !UseSlabPlane )
440
447
    {   ReDrawFlag &= ~RFTransZ|RFSlab;
441
448
    } else ReDrawFlag &= ~RFTransZ;
442
 
 
 
449
    
 
450
    ReDrawFlagSave = ReDrawFlag;
443
451
    if( ReDrawFlag )
444
452
    {   if( ReDrawFlag & RFReSize )
445
453
            ReSizeScreen();
446
454
 
447
455
        if( ReDrawFlag & RFColour )
448
456
            DefineColourMap();
449
 
 
 
457
        
 
458
        NextReDrawFlag = 0;
450
459
        if( Database )
451
460
        {   if( ReDrawFlag & RFApply ) 
452
461
                ApplyTransform();
453
462
            DrawFrame();
454
463
        }
455
 
        ReDrawFlag = 0;
 
464
        if ((ReDrawFlagSave & RFApply) && record_on[0] && !RecordPause ) {
 
465
              WriteMovieFrame();
 
466
              record_frame[0]++;
 
467
              record_frame[1] = 0;
 
468
            } else if ((ReDrawFlagSave & RFAppear) && record_on[1] && !RecordPause) {
 
469
              WriteMovieFrame();
 
470
              record_frame[0]++;
 
471
              record_frame[1]++;
 
472
              if ((double)(record_frame[1]) <= record_fps*record_dwell) {
 
473
                NextReDrawFlag |= RFRefresh;
 
474
              } else {
 
475
                NextReDrawFlag = 0;
 
476
                record_frame[1] = 0;
 
477
              }
 
478
            }
 
479
    }
 
480
 
456
481
    }
457
482
}
458
483
 
671
696
        SetRibbonCartoons();
672
697
        EnableWireframe(WireFlag,0,0);
673
698
        RefreshScreen();
 
699
        ReDrawFlag = NextReDrawFlag;
674
700
 
675
701
        /* Avoid Pending Events */
676
702
        ProfileExecution();
687
713
        if( done )
688
714
        {   DefaultRepresentation();
689
715
            RefreshScreen();
 
716
            ReDrawFlag = NextReDrawFlag;
690
717
        }
691
718
    }
692
719
 
714
741
            {   RefreshScreen();
715
742
                if( !CommandActive )
716
743
                    ResetCommandLine(0);
 
744
                ReDrawFlag = NextReDrawFlag;
717
745
            } else done = True;
718
746
        }
719
747
    }