Changeset 143

Dec 4, 2009 5:01:07 PM (11 years ago)

# on 2000/05/17 20:27:05, toby did:
major edit

1 edited


  • 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  
    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>
    7 <BODY>
     8<A HREF=>
     9<IMG SRC=""
     10alt="Link to NIST Center for Neutron Research home page"
     12<A HREF=>
     13<IMG SRC=""
     14alt="Link to National Institute of Standards & Technology home page"
    10 <H2>
    11 Customizing EXPGUI and Associated Programs</H2></CENTER>
     18Customizing EXPGUI and Associated Programs</H1></CENTER>
    1320The EXPGUI GSAS graphical user interface can be modified in many
    93100In addition to the variables defined in the previous file, expgui, uses
    94 a small number of array for other configuration options. They are:
     101a small number of array elements for other configuration options. They are:
    125132Sets the default value for display of the legend in liveplot
     135Defines commands to be executed by EXPGUI after all other commands
     136have been run. This is used to define initialization commands in
     137the <TT>localconfig</TT> or <TT>.gsas_config</TT> files that cannot be
     138run at the time when the files are sourced. <I>(added in EXPGUI v1.21)</I>
    150162for the backspace key is overridden; some UNIX systems need this so that
    151163expedt 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.
     164other systems do not. You can toggle this option using the
     165"Override Backspace" option on the file menu to see what works for you.
    277290Windows</A> and
    278291<A HREF="expgui_Unix_readme.html">
    279 UNIX</A>.
     292UNIX</A>. Note that as of the April 2000 releases, GSAS is now distributed
     293with TCLDUMP.
    281295<B>Combining CMPR and LIVEPLOT.</B>
    404 Customizing Example 2: Adding a new button to the button bar
     418Customizing Example 2: Putting DISAGL Results in a Separate Box
    406420Barbara 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.
     421window. Sounds like a pretty reasonable request. Here is an example with code
     422to do that as a customization option. Please note that this has now been
     423incorporated into EXPGUI, so do not use this example.
    410425  set expgui(disaglSeparateBox) 1
    412427  proc rundisagl {} {
    413428    global expgui txtvw tcl_version tcl_platform
    414     if {$expgui(disaglSeparateBox)} {
     429    if {$expgui(disaglSeparateBox) && $tcl_platform(platform) != "windows"} {
    415430        set root [file root $expgui(expfile)]
    416431        catch {file rename $root.LST $root.OLS}
    456471  }
     473if {$tcl_platform(platform) != "windows"} {
     474  append expgui(initstring) {
     475      $expgui(fm) add checkbutton  -label "DISAGL window" \
     476              -variable expgui(disaglSeparateBox) -underline 0;
     477  }
    459481To make this customization, put the above in the <TT>localconfig</TT>
    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) 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.
     486Note that the <tt>expgui(initstring)</tt> option became available in EXPGUI
     487version 1.21. (Previous versions will ignore this). This code must be executed
     488after all the menus and other GUI code has been run. When executed, it
     489creates a checkbutton on the Options menu to
     490turn the "separate DISAGL window mode" mode on and off.
     493Customizing Example 3: Adding a new page to EXPGUI
     495The steps for creating support for additional functionality, implementation
     496of atom constraints, is outlined here. Routines described here can be found in
     497file <tt>atomcons.tcl</tt> unless otherwise noted.
     499<LI>Create a routine to read and write the appropriate records
     500from the .EXP file. In this case, a new routine, constrinfo,
     501was added to file <tt>readexp.tcl</tt>.
     502This 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.
     505Note that in this example expcons(atommaster) is defined to be the name of the
     507<LI>Create a routine to display and edit the information shown in the
     508frame. In this case, DisplayAtomConstraints. This routine will be called each
     509time the page is displayed. Note that this routine and the previous can be
     510tested in a separate toplevel until they work well.
     511<LI>In this particular example, the previous frame is located on a notebook
     512widget that in turn placed on a notebook page, so MakeConstraintsPane is used
     513to create this inner notebook when the "Constraints" notebook page is first
     514shown. This in turn calls MakeAtomsConstraintsPane and DisplayAtomConstraints.
     515No routine is needed to update this page each time the page
     516is displayed.
     517<LI>Edit file <tt>expgui</tt> to make the following changes:
     519<P><LI>load the <tt>atomcons.tcl</tt> file:
     521# commands for costraints
     522source [file join $expgui(scriptdir) atomcons.tcl]
     524<P><LI>Define a notebook page for the option. The -createcmd option
     525is used only once, but the -raisecmd option is used every time
     526the page is exposed.
     528set expgui(consFrame) [\
     529            .n insert end consPane -text Constraints \
     530            -raisecmd "set expgui(pagenow) consFrame"\
     531            -createcmd MakeConstraintsPane]
     533Note that if we were displaying the atoms constraint page directly on
     534the main notebook widget, the previous command would have been
     535<tt>-raisecmd DisplayAtomConstraints -createcmd MakeAtomsConstraintsPane</tt>
     537If the frame will need to be updated when histogram information changes,
     538add the name of the frame and a command to execute into string
     539expgui(frameactionlist), for example:
     541    lappend expgui(frameactionlist) "consFrame DisplayConstraints"
    474546GSAS is written by Allen C. Larson and <A HREF="">
Note: See TracChangeset for help on using the changeset viewer.