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 *
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. *
46
* The code for use of RasMol under GTK in RasMol 2.7.4.2 was written by *
33
* RasMol 2.7.5 May 09 *
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. *
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. *
49
55
* and Incorporating Translations by *
50
56
* Author Item Language *
283
291
GTK_FILE_CHOOSER_ACTION_OPEN,
284
292
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
285
293
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
288
296
filter = gtk_file_filter_new();
289
297
gtk_file_filter_set_name(filter, "Molecular structures");
325
333
g_free (prevname);
326
334
prevname = gtk_file_chooser_get_filename (
327
335
GTK_FILE_CHOOSER (opendialog));
328
strcpy(DataFileName, prevname);
336
strcpy(DataFileName, prevname);
329
337
if(FetchFile(FormatPDB, False, prevname)) {
330
338
char tmp[PATH_MAX+10];
1394
1404
void vscroll_cb(GtkRange *range, gpointer user_data)
1396
WRotValue[YScrlDial] = gtk_range_get_value(range);
1406
WorldDialValue[YScrlDial] = gtk_range_get_value(range);
1397
1407
ReDrawFlag |= (1<<YScrlDial);
1398
1408
RefreshScreen();
1409
ReDrawFlag = NextReDrawFlag;
1401
1412
void hscroll_cb(GtkRange *range, gpointer user_data)
1407
1418
BondSelected->BRotValue = val;
1408
1419
ReDrawFlag |= RFRotBond;
1410
WRotValue[XScrlDial] = val;
1421
WorldDialValue[XScrlDial] = val;
1411
1422
ReDrawFlag |= (1<<XScrlDial);
1413
1424
RefreshScreen();
1425
ReDrawFlag = NextReDrawFlag;
1416
1428
static gboolean popup_cb (GtkWidget *widget)
1427
1439
dragging = TRUE;
1428
1440
stat = GetStatus(event->state);
1429
1441
ProcessMouseMove(event->x,event->y,stat);
1431
1443
RefreshScreen();
1444
ReDrawFlag = NextReDrawFlag;
1432
1446
xorig = event->x;
1433
1447
yorig = event->y;
1434
1448
gdk_window_get_pointer(canvas->window, &x, &y, &mask);
1582
1597
g_set_application_name("RasMol");
1583
1598
mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
1584
1599
gtk_widget_add_events(mainwin, GDK_KEY_PRESS_MASK);
1585
g_signal_connect (mainwin, "delete-event",
1600
g_signal_connect (mainwin, "delete-event",
1586
1601
G_CALLBACK (RasMolExit), NULL);
1588
1603
menubar = build_gtkmenu();
1599
1614
g_signal_connect (G_OBJECT (canvasarea), "expose-event",
1600
1615
G_CALLBACK (expose_cb), NULL);
1601
1616
g_signal_connect (G_OBJECT (canvasarea), "configure-event",
1602
G_CALLBACK (configure_cb), NULL);
1617
G_CALLBACK (configure_cb), NULL);
1603
1618
g_signal_connect (G_OBJECT (canvasarea), "motion-notify-event",
1604
1619
G_CALLBACK (motion_cb), NULL);
1605
1620
g_signal_connect (G_OBJECT (canvasarea), "button-press-event",
1607
1622
g_signal_connect (G_OBJECT (canvasarea), "button-release-event",
1608
1623
G_CALLBACK (button_release_cb), NULL);
1609
1624
g_signal_connect (G_OBJECT (canvasarea), "popup-menu",
1610
G_CALLBACK (popup_cb), NULL);
1625
G_CALLBACK (popup_cb), NULL);
1612
1627
vscrollbar = gtk_vscrollbar_new(NULL);
1613
1628
gtk_range_set_update_policy(GTK_RANGE(vscrollbar),
1623
1638
gtk_range_set_range(GTK_RANGE(hscrollbar), -1.0, 1.0);
1624
1639
gtk_range_set_increments(GTK_RANGE(hscrollbar), 0.01, 0.1);
1625
1640
hscr_handler = g_signal_connect(G_OBJECT(hscrollbar), "value-changed",
1626
G_CALLBACK(hscroll_cb), NULL);
1641
G_CALLBACK(hscroll_cb), NULL);
1628
1643
vte = vte_terminal_new();