Creation de nouvelles applications graphiques

Pour creer une nouvelle application Xtemplate, vous devez editer (et renommer) les fichiers template XTemplate (lancement de la nouvelle appli) et XTemplate.cfg (configuration des menus, barre d'icones, etc).
Attention, les deux fichiers doivent porter le meme nom a l'extension pres.

Liste des macros tcl/tk dosponibles dans IFU_X11_libs pour la creation d'objets graphiques :

Dans toute la suite, name represente le nom de la fenetre toplevel. C'est a dire qu'on a fait preceder les appels de macros, des trois lignes suivantes :

toplevel $name
wm title $name "Template"
wm iconname $name "Template"

Le tableau de parametre est nomme TEMPLATE. Il est global a l'application. Les macros creant des fenetres retournent toujours le path de la fenetre creee.

N.B. Les fonctions sont presentees dans leur ordre d'utilisation le plus probable.

  • STD_buttons_box
  • STD_main_param_box
  • STD_user_param_box, STD_standard_param_box, STD_optional_param_box, STD_debug_param_box
  • STD_param_array
  • STD_option_list
  • Liste des macros tcl/tk pour la manipulation de graphiques (plot & display) :

    ------------------------------------------------------------------------
    # Function name : Go_DisplayDC
    #
    # Description : Create an image display (standalone)
    #
    # Input :
    #
    # window, name of the window to create
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : Go_DisplayGC
    #
    # Description : Create a graphic display (standalone)
    #
    # Input :
    #
    # window, name of the window to create
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_Close
    #
    # Description : Graphic display close
    #
    # Input :
    #
    # window, name of the window to close
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : Create_Graph
    #
    # Description : Create a new plot widget
    #
    # Input :
    #
    # g, name of the widget to create
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_Plot_table_label
    #
    # Description : Launch plot_table and waiting output for table plot with label column
    #
    # Input :
    #
    # window, name of the graph's parent
    # mode, plot or over
    # filename, name of the table to plot
    # legende, legend to display for this plot
    # colx, label of the table column for X absciss
    # coly, label of the table column for Y absciss
    # colz, label of the table column for text display instead of symbol
    # args, color, symbol ... etc ... for the plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_Plot_table
    #
    # Description : Launch plot_table and waiting output for table plot
    #
    # Input :
    #
    # window, name of the graph's parent
    # mode, plot or over
    # filename, name of the table to plot
    # legende, legend to display for this plot
    # colx, label of the table column for X absciss
    # coly, label of the table column for Y absciss
    # args, color, symbol ... etc ... for the plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_Plot_datacube
    #
    # Description : Launch plot_datacube and waiting output for spectrum plot
    #
    # Input :
    #
    # window, name of the graph's parent
    # mode, plot or over
    # filename, name of the datacube to plot
    # lens, lens number
    # flag, flag bad pixel
    # datatype, data type (1=spectrum, 2=noise, 3=S/N)
    # legende, legend to display for this plot
    # args, color, symbol ... etc ... for the plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_Plot_spectrum
    #
    # Description : Launch plot_spec and waiting output for spectrum plot
    #
    # Input :
    #
    # window, name of the graph's parent
    # mode, plot or over
    # filename, name of the spectrum to plot
    # legende, legend to display for this plot
    # args, color, symbol ... etc ... for the plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_OverPlot_line
    #
    # Description : Launch plot_line and waiting output for line overplot
    #
    # Input :
    #
    # window, name of the graph's parent
    # filename, name of the spectrum to plot
    # legende, legend to display for this plot
    # args, color, symbol ... etc ... for the plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_Plot_max
    #
    # Description : Launch plot_max and waiting output for Max plot
    #
    # Input :
    #
    # window, name of the graph's parent
    # mode, plot or over
    # filename, name of the spectrum to plot
    # params, args for plot_max
    # legende, legend to display for this plot
    # args, color, symbol ... etc ... for the plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_Plot_mask
    #
    # Description : Launch plot_optics and waiting output for Mask plot
    #
    # Input :
    #
    # window, name of the graph's parent
    # mode, plot or over
    # filename, name of the spectrum to plot
    # params, args for plot_optics
    # legende, legend to display for this plot
    # args, color, symbol ... etc ... for the plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_title
    #
    # Description : Set the graph title
    #
    # Input :
    #
    # w, Graph root widget path
    # title, title to set for this graph
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_xaxis
    #
    # Description : Configure Xaxis
    #
    # Input :
    #
    # w, Graph root widget path
    # args, list of config args
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_yaxis
    #
    # Description : Configure Yaxis
    #
    # Input :
    #
    # w, Graph root widget path
    # args, list of config args
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_Print
    #
    # Description : Print current plot to PS printer
    #
    # Input :
    #
    # w, Graph root widget path
    #
    # Output : nothing
    ------------------------------------------------------------------------
    # Function name : Add_maker
    #
    # Description : User want to display a text somewhere in the graphic
    #
    # Input :
    #
    # g, path of the graph widget
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : Create_marker
    #
    # Description : Display marker on the graphic
    #
    # Input :
    #
    # g, path of the graph widget
    # id, identification of current marker
    # coord, list of x and y coordinate on the graph
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : Line_Select
    #
    # Description : Select a line (or unselect) in edit reference table
    #
    # Input :
    #
    # g, path of the graph widget
    # x, wavelength of the selected line
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayDC_Plot_Image
    #
    # Description : Open a new RTD display and load the specified image
    #
    # Input :
    #
    # filename, name of the image to plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayDC_Explorer
    #
    # Description : Launch 3D Explorer
    #
    # Input :
    #
    # filename, name of the image to plot
    # cube, name of the datacube to plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : Graph_destroy
    #
    # Description : Destroy graph window
    #
    # Input :
    #
    # window, name of the window to destroy
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayDC_exist
    #
    # Description : Check if a display (Rtd or 3Dexplorer) is currently running
    #
    # Input :
    #
    # appli, name of the display to test (Rtd or 3Dexplorer)
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayDC_wait_the_end
    #
    # Description : Wait until the end of the current plot
    #
    # Input :
    #
    # g, current graph widget
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------
    # Function name : DisplayGC_Plot_function
    #
    # Description : Launch plot_function and waiting output for function plot
    #
    # Input :
    #
    # window, name of the graph's parent
    # curve, name of the curve
    # mode, plot or over
    # function, name of the function
    # coefs, parameters of the function
    # bounds, bounds between which to plot
    # legende, legend to display for this plot
    # args, color, symbol ... etc ... for the plot
    #
    # Output : nothing
    #
    ------------------------------------------------------------------------


    Arlette.Pecontal@obs.univ-lyon1.fr - 31/03/2003