- Timestamp:
- Dec 4, 2009 5:01:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/expgui_cfg.html
- Property rcs:date changed from 1999/10/11 20:27:13 to 2000/05/17 20:27:05
- Property rcs:lines changed from +107 -3 to +93 -21
- Property rcs:rev changed from 1.7 to 1.8
r114 r143 1 1 <HTML> 2 <TITLE> 3 Customizing EXPGUI and Associated Programs 4 </TITLE> 2 <META NAME="Author" CONTENT="Brian H. Toby"> 3 <TITLE>Customizing EXPGUI and Associated Programs</TITLE> 5 4 <HEAD> 6 5 </HEAD> 7 <BODY> 8 6 <BODY BGCOLOR="#FFFFFF"> 7 8 <A HREF=http://www.ncnr.nist.gov> 9 <IMG SRC="http://www.ncnr.nist.gov/images/ncnrtrans.gif" 10 alt="Link to NIST Center for Neutron Research home page" 11 ALIGN=RIGHT></A> 12 <A HREF=http://www.nist.gov> 13 <IMG SRC="http://www.ncnr.nist.gov/images/webidblue_2lineright.gif" 14 alt="Link to National Institute of Standards & Technology home page" 15 ALIGN=LEFT></A> 9 16 <CENTER> 10 <H 2>11 Customizing EXPGUI and Associated Programs</H 2></CENTER>17 <H1> 18 Customizing EXPGUI and Associated Programs</H1></CENTER> 12 19 13 20 The EXPGUI GSAS graphical user interface can be modified in many … … 92 99 93 100 In addition to the variables defined in the previous file, expgui, uses 94 a small number of array for other configuration options. They are:101 a small number of array elements for other configuration options. They are: 95 102 <DL><DL> 96 103 … … 125 132 Sets the default value for display of the legend in liveplot 126 133 134 <DT>expgui(initstring)<DD> 135 Defines commands to be executed by EXPGUI after all other commands 136 have been run. This is used to define initialization commands in 137 the <TT>localconfig</TT> or <TT>.gsas_config</TT> files that cannot be 138 run at the time when the files are sourced. <I>(added in EXPGUI v1.21)</I> 127 139 </DL></DL> 128 140 … … 150 162 for the backspace key is overridden; some UNIX systems need this so that 151 163 expedt and other terminal-oriented programs work correctly and 152 other systems do not. You can toggle this option using the "sets an environment variable needed by the "Override Backspace" option on the file menu. 164 other systems do not. You can toggle this option using the 165 "Override Backspace" option on the file menu to see what works for you. 153 166 154 167 </DL></DL> … … 277 290 Windows</A> and 278 291 <A HREF="expgui_Unix_readme.html"> 279 UNIX</A>. 292 UNIX</A>. Note that as of the April 2000 releases, GSAS is now distributed 293 with TCLDUMP. 280 294 <P> 281 295 <B>Combining CMPR and LIVEPLOT.</B> … … 402 416 <hr> 403 417 <H2> 404 Customizing Example 2: Adding a new button to the button bar418 Customizing Example 2: Putting DISAGL Results in a Separate Box 405 419 </H2> 406 420 Barbara Reisner has been asking me to put the output from DISAGL in a separate 407 window. Sounds like a pretty reasonable request. Here is the code to do that. 408 421 window. Sounds like a pretty reasonable request. Here is an example with code 422 to do that as a customization option. Please note that this has now been 423 incorporated into EXPGUI, so do not use this example. 409 424 <PRE> 410 425 set expgui(disaglSeparateBox) 1 … … 412 427 proc rundisagl {} { 413 428 global expgui txtvw tcl_version tcl_platform 414 if {$expgui(disaglSeparateBox) } {429 if {$expgui(disaglSeparateBox) && $tcl_platform(platform) != "windows"} { 415 430 set root [file root $expgui(expfile)] 416 431 catch {file rename $root.LST $root.OLS} … … 456 471 } 457 472 473 if {$tcl_platform(platform) != "windows"} { 474 append expgui(initstring) { 475 $expgui(fm).option.menu add checkbutton -label "DISAGL window" \ 476 -variable expgui(disaglSeparateBox) -underline 0; 477 } 478 } 479 458 480 </PRE> 459 481 To make this customization, put the above in the <TT>localconfig</TT> … … 462 484 file. 463 485 <P> 464 Note that an even better customization might be to add these commands into 465 the expgui file somewhere near the beginning and then near the end, 466 add 467 <PRE> 468 $expgui(fm).option.menu add checkbutton -label "DISAGL window" \ 469 -variable expgui(disaglSeparateBox) -underline 0 470 </PRE> 471 so that there is an option to turn the "separate DISAGL window mode" 472 on and off. 486 Note that the <tt>expgui(initstring)</tt> option became available in EXPGUI 487 version 1.21. (Previous versions will ignore this). This code must be executed 488 after all the menus and other GUI code has been run. When executed, it 489 creates a checkbutton on the Options menu to 490 turn the "separate DISAGL window mode" mode on and off. 491 492 <hr><H2> 493 Customizing Example 3: Adding a new page to EXPGUI 494 </H2> 495 The steps for creating support for additional functionality, implementation 496 of atom constraints, is outlined here. Routines described here can be found in 497 file <tt>atomcons.tcl</tt> unless otherwise noted. 498 <OL> 499 <LI>Create a routine to read and write the appropriate records 500 from the .EXP file. In this case, a new routine, constrinfo, 501 was added to file <tt>readexp.tcl</tt>. 502 This takes considerable care and manual testing. 503 <LI>Create a routine that places the appropriate widgets into a frame 504 (in this case MakeAtomsConstraintsPane). This routine will be called only once. 505 Note that in this example expcons(atommaster) is defined to be the name of the 506 frame. 507 <LI>Create a routine to display and edit the information shown in the 508 frame. In this case, DisplayAtomConstraints. This routine will be called each 509 time the page is displayed. Note that this routine and the previous can be 510 tested in a separate toplevel until they work well. 511 <LI>In this particular example, the previous frame is located on a notebook 512 widget that in turn placed on a notebook page, so MakeConstraintsPane is used 513 to create this inner notebook when the "Constraints" notebook page is first 514 shown. This in turn calls MakeAtomsConstraintsPane and DisplayAtomConstraints. 515 No routine is needed to update this page each time the page 516 is displayed. 517 <LI>Edit file <tt>expgui</tt> to make the following changes: 518 <UL> 519 <P><LI>load the <tt>atomcons.tcl</tt> file: 520 <PRE> 521 # commands for costraints 522 source [file join $expgui(scriptdir) atomcons.tcl] 523 </PRE> 524 <P><LI>Define a notebook page for the option. The -createcmd option 525 is used only once, but the -raisecmd option is used every time 526 the page is exposed. 527 <PRE> 528 set expgui(consFrame) [\ 529 .n insert end consPane -text Constraints \ 530 -raisecmd "set expgui(pagenow) consFrame"\ 531 -createcmd MakeConstraintsPane] 532 </PRE> 533 Note that if we were displaying the atoms constraint page directly on 534 the main notebook widget, the previous command would have been 535 <tt>-raisecmd DisplayAtomConstraints -createcmd MakeAtomsConstraintsPane</tt> 536 <P> 537 If the frame will need to be updated when histogram information changes, 538 add the name of the frame and a command to execute into string 539 expgui(frameactionlist), for example: 540 <PRE> 541 lappend expgui(frameactionlist) "consFrame DisplayConstraints" 542 </PRE> 543 </UL> 544 </OL> 473 545 <hr> 474 546 GSAS is written by Allen C. Larson and <A HREF="http://www.nist.gov/cgi-bin/exit_nist.cgi?url=http://lansce.lanl.gov/lujan/staff12/vondreele.htm">
Note: See TracChangeset
for help on using the changeset viewer.