next up previous contents index
Next: Freezing Displays Up: Graphic Windows Previous: Editor Actions

Setup Panel

 

All setup data is contained in a structure ( struct SetupDataType) which is itself contained in a display structure.

typedef struct SetupDataType {
    Bool          showValueFlg;
    Bool          showValue;
    Bool          showTitleFlg;
    Bool          showTitle;
    Bool          showLinkFlg;
    Bool          showDirectionFlg;
    Bool          showWeightFlg;
    FlintType     linkPosTrigger, linkNegTrigger;
    FlintType     unitScaleFactor;
};

When the setup panel is opened, the corresponding display is current. Therefore all changes are performed in the current display ui_currentDisplayPtr, and all inital data is read there. If a scrollbar is manipulated, the callback function ui_thumbed() is called to save the value in the corresponding global variable. To set the values of showValue and showTitle, there are two callback functions that assign the value to the parameter client_data in each menu option. The layer value is determined by the common method of the layer popup.

The toggles, that switch the various display options on and off call the function ui_set_toggleValues(). This function sets the corresponding component of the setup variables in the current graphic window.  

When the DONE button is pressed, the setup panel becomes invisible again. The new grid size and origin are read from the panel, and the graphic window is redrawn. There the new parameters are used, and the desired picture is created.



next up previous contents index
Next: Freezing Displays Up: Graphic Windows Previous: Editor Actions



Niels Mache
Wed May 17 11:23:58 MET DST 1995