/***************************************************************************************/ /* */ /* SCS editor Version 2 */ /* File : ZonesCreation.pkg */ /* Version : 27 juin 2000 */ /* Modules Graph creation functions */ /* */ /***************************************************************************************/ fun ZONES_CreateWinZone (Channel, cont, fatherObj, pos, flag, color, name, w, h, colortext, bitmap, typebitmap) = _CRcompBitmap Channel cont fatherObj pos flag OBJ_CONTAINER_CLICK|OBJ_CONTAINER_UNCLICK|OBJ_CONTAINER_MOVE|OBJ_KEYBOARD UTILSGUI_CreateRectWithTextAndBitmap Channel color w h name colortext bitmap typebitmap 0 0 w h ;; /*************************************************************************************** * * Create a zone on zone view * ***************************************************************************************/ fun ZONES_BuildAssoString( site, asso )= strcatn (lineBuildSeparator (SITE_GetModuleCompleteName site ASSO_GetModule asso) ".")::" : "::(ASSO_GetName asso)::nil ;; fun ZONES_BuildAssoStrings( site, assos )= if assos == nil then nil else (strcatn " "::(ZONES_BuildAssoString site hd assos)::"\n"::nil)::ZONES_BuildAssoStrings site tl assos ;; fun ZONES_BuildTooltipContent( site, zone )= if ZONE_IsPopup zone nil then nil else let ASSO_GetAllZoneAssociation site zone::nil -> assos in if assos == nil then nil else strcatn (_locSCS "zone-TOOLTIP" nil)::" :\n"::ZONES_BuildAssoStrings site assos ;; fun ZONES_CreateZone (zone, param) = let param -> [Channel zonesViewed site] in let ZONE_GetSize zone -> [w h] in let ZONE_GetEdgePositions zone -> [x _ y _] in let ZONE_GetFather site zone -> father in let ZONES_GetZoneWindow zonesViewed father -> fatherView in let ZONE_GetStyle zone -> [position _ type] in let if type == ZONE_POPUP then nil else fatherView -> fatherObj in let ZONE_GetBitmapData zone Channel -> [bitmapAlpha typebitmap] in let _GETalphaBitmaps bitmapAlpha -> [bitmap _] in let ZONES_CreateWinZone Channel zonesViewed.ZONESfather fatherObj [x y] OBJ_VISIBLE|OBJ_ENABLE|OBJ_RW_FLEX|OBJ_RH_FLEX ZONE_GetColor zone ZONE_GetName zone w h GD_DEFAULT_TEXT_COLOR bitmap typebitmap -> newbit in let if (hd SELECT_GetZone REFLEX_PRIORITY_ONE) == zone then ZONES_CreateResizeForZone zonesViewed Channel zonesViewed.ZONESfather (_CONVERTcompBitmapToObjNode newbit) w h position else nil -> newResize in let ZONES_SetZoneWindow zonesViewed zone newbit newResize -> zoneView in ( /* info-bulle */ TOOLTIP_DynamicLink zonesViewed.ZONESfather (_CONVERTcompBitmapToObjNode newbit) scsgui.SCSGUIdynamicToolTip mkfun1 mkfun2 @ZONES_BuildTooltipContent zone SELECT_GetSite; _CBcompBitmapClick newbit @ZONES_BitmapClick [zonesViewed zoneView 0]; _CBcompBitmapDblClick newbit @ZONES_BitmapDblClick nil; _CBcompBitmapResizeResource newbit @ZONES_BitmapResizeResource [ZONE_GetName zone ZONE_GetColor zone Channel GD_DEFAULT_TEXT_COLOR bitmap typebitmap]; ZONES_SetResizeCB newResize zonesViewed zoneView 1; 1 ) ;; fun ZONES_RemoveZoneFromList (zoneViewList, zone) = if zoneViewList == nil then nil else let hd zoneViewList -> zoneView in if zone == zoneView.ZVIEWzone then ( ZONES_ClearZone zoneView nil; tl zoneViewList ) else zoneView::(ZONES_RemoveZoneFromList tl zoneViewList zone) ;; fun ZONES_DestroyZone (zone, zonesViewed) = if (ZONE_GetSide zone) == SCS_CLIENT then set zonesViewed.ZONESclient = ZONES_RemoveZoneFromList zonesViewed.ZONESclient zone else set zonesViewed.ZONESserver = ZONES_RemoveZoneFromList zonesViewed.ZONESserver zone; 1 ;; /*************************************************************************************** * * Clear all zone View * ***************************************************************************************/ fun ZONES_Clear (zonesViewed) = apply_on_list zonesViewed.ZONESclient @ZONES_ClearZone nil; set zonesViewed.ZONESclient = nil; apply_on_list zonesViewed.ZONESserver @ZONES_ClearZone nil; set zonesViewed.ZONESserver = nil ;;