/***************************************************************************************/ /* */ /* SCS editor Version 2 */ /* File : ScsGuiReflex.pkg */ /* Version : 05 octobre 2000 */ /* Scs Graphic Interface reflex functions */ /* */ /***************************************************************************************/ /*************************************************************************************** reflex interface view registration functions ***************************************************************************************/ fun SCSGUI_CBviewChange (function) = set scsgui.SCSGUIviewCBfunctions = function::(scsgui.SCSGUIviewCBfunctions) ;; fun SCSGUI_CBviewBBChange (function) = set scsgui.SCSGUIviewBBCBfunctions = function::(scsgui.SCSGUIviewBBCBfunctions) ;; /*************************************************************************************** reflex interfaceView activation functions ***************************************************************************************/ fun SCSGUI_ActivateFunctions (function, paramFun) = exec function with [paramFun] ;; proto WINMANAG_FinalChangeView = fun [I] I;; fun SCSGUI_ViewChanged () = apply_on_list (scsgui.SCSGUIviewCBfunctions) @SCSGUI_ActivateFunctions (scsgui.SCSGUIcurrentView); /* finally show container */ WINMANAG_FinalChangeView (scsgui.SCSGUIcurrentView) ;; fun SCSGUI_GetCurrentView () = scsgui.SCSGUIcurrentView ;; fun SCSGUI_ViewBBChanged () = apply_on_list (scsgui.SCSGUIviewBBCBfunctions) @SCSGUI_ActivateFunctions (scsgui.SCSGUIcurrentView) ;; fun SCSGUI_ForceEltSelection () = if scsgui.SCSGUIcurrentView == MAINWIN_MODULE then SELECT_NewModule (SITE_GetModuleCurrentBlackBox SELECT_GetSite)::nil REFLEX_PRIORITY_ONE else SELECT_NewZone SCSGUI_GetCurrentZoneRoot REFLEX_PRIORITY_ONE ;; fun SCSGUI_SetCurrentView (view) = if scsgui.SCSGUIcurrentView == view then nil else ( set scsgui.SCSGUIcurrentView = view; SCSGUI_ViewChanged; SCSGUI_ForceEltSelection; _freememory; /* MAC ICI libération de ressources */ 1 ) ;; fun SCSGUI_ChangeViewOnZoneSelection (zones, param) = if param & REFLEX_SELECTION then let if (ZONE_GetSide hd zones) == SCS_CLIENT then MAINWIN_ZONE_CLIENT else MAINWIN_ZONE_SERVER -> view in if scsgui.SCSGUIcurrentView == view then nil else ( set scsgui.SCSGUIcurrentView = view; SCSGUI_ViewChanged ) else nil ;; fun SCSGUI_ChangeViewOnModuleSelection (modules, param) = if param & REFLEX_SELECTION then if scsgui.SCSGUIcurrentView == MAINWIN_MODULE then nil else ( set scsgui.SCSGUIcurrentView = MAINWIN_MODULE; SCSGUI_ViewChanged ) else nil ;;