/***************************************************************************************/ /* */ /* SCS editor Version 2 */ /* File : PositionChart.pkg */ /* Version : 21 juin 2000 */ /* Position chart for zone */ /* */ /***************************************************************************************/ struct PositionChart = [ POSCHARTcontainer : ObjContainer , /* chart container */ POSCHARTbitmap : CompBitmap , /* zone bitmap */ POSCHARTx1ArrowLabel : CompText , /* x1 arrow label */ POSCHARTwArrowLabel : CompText , /* w arrow label */ POSCHARTx2ArrowLabel : CompText , /* x2 arrow label */ POSCHARTy1ArrowLabel : CompText , /* y1 arrow label */ POSCHARThArrowLabel : CompText , /* h arrow label */ POSCHARTy2ArrowLabel : CompText , /* y2 arrow label */ POSCHARTx1Arrow : CompCheck , /* x1 arrow */ POSCHARTwArrow : CompCheck , /* w arrow */ POSCHARTx2Arrow : CompCheck , /* x2 arrow */ POSCHARTy1Arrow : CompCheck , /* y1 arrow */ POSCHARThArrow : CompCheck , /* h arrow */ POSCHARTy2Arrow : CompCheck , /* y2 arrow */ POSCHARTx1Label : CompText , /* x1 label */ POSCHARTx1Text : CompText , /* x1 text */ POSCHARTwLabel : CompText , /* w label */ POSCHARTwText : CompText , /* w text */ POSCHARTx2Label : CompText , /* x2 label */ POSCHARTx2Text : CompText , /* x2 text */ POSCHARTy1Label : CompText , /* y1 label */ POSCHARTy1Text : CompText , /* y1 text */ POSCHARThLabel : CompText , /* h label */ POSCHARThText : CompText , /* h text */ POSCHARTy2Label : CompText , /* y2 label */ POSCHARTy2Text : CompText /* y2 text */ ] mkPositionChart ;; fun PROPERTIES_GetMainContainer (zone) = WINMANAG_SearchWindow if (ZONE_GetSide zone) == SCS_CLIENT then MAINWIN_ZONE_CLIENT else MAINWIN_ZONE_SERVER ;; fun PROPERTIES_GetZoneFatherSize (zone) = let ZONE_GetFather SELECT_GetSite zone -> father in if (ZONE_IsPopup zone nil) || (father == nil) then let _GETcontainerPositionSize PROPERTIES_GetMainContainer zone -> [_ _ w h] in [w h] else ZONE_GetSize father ;; fun PROPERTIES_ChangeSideRef (comp, propWin, posx, posy, btn, mask) = let if comp == propWin.PROPposition.POSCHARTx1Arrow then ZONE_LW_FLEX else if comp == propWin.PROPposition.POSCHARTwArrow then ZONE_MW_FLEX else if comp == propWin.PROPposition.POSCHARTx2Arrow then ZONE_RW_FLEX else if comp == propWin.PROPposition.POSCHARTy1Arrow then ZONE_LH_FLEX else if comp == propWin.PROPposition.POSCHARThArrow then ZONE_MH_FLEX else if comp == propWin.PROPposition.POSCHARTy2Arrow then ZONE_RH_FLEX else nil -> revert in let hd SELECT_GetZone REFLEX_PRIORITY_ONE -> zone in ZONE_SetPositionStyle zone revert ;; fun PROPERTIES_CreateArrow (propWin, cont, pos, bitmap) = _CBcompCheckUnClick _CRcompCheck propWin.PROPchannel cont nil pos OBJ_VISIBLE|OBJ_ENABLE|ROL_DISABLE OBJ_KEYBOARD|OBJ_CONTAINER_MOVE|OBJ_KEYBOARD bitmap @PROPERTIES_ChangeSideRef propWin ;; fun PROPERTIES_ChangePos (text, func, type, val) = let hd SELECT_GetZone REFLEX_PRIORITY_ONE -> zone in exec func with [SELECT_GetSite zone atoi val] ;; fun PROPERTIES_RerouteKeyboard( container, param, key, keycode )= UTILSGUI_OnKeyDown container param key keycode ;; fun PROPERTIES_GetChartLoc( suffix )= _locSCS strcat "propertieszone-" suffix nil ;; fun PROPERTIES_CreateChart (propWin) = let _CRcontainerFromObjCont propWin.PROPchannel propWin.PROPcontainer 10 170 180 180 CO_CHILDINSIDE|CO_HIDE GD_DEFAULT_BACKGROUNDCOLOR (_locSCS "positionchart-POSCHART" nil) -> cont in let THEME_getParamsByTheme GD_THEME "ARROW_POS_V" -> [pathARV _ _ _ _ _ _ _ _ ] in let exec GD_FUNCTIONHANDLER_LOADBITMAP with [pathARV propWin.PROPchannel] -> alphav in let THEME_getParamsByTheme GD_THEME "ARROW_POS_H" -> [pathARH _ _ _ _ _ _ _ _ ] in let exec GD_FUNCTIONHANDLER_LOADBITMAP with [pathARH propWin.PROPchannel] -> alphah in let THEME_getInfos GD_THEME "ARROW_TRANSPARENCY_RGB" -> [c1 [c2 [c3 _]]] in let make_rgb atoi c1 atoi c2 atoi c3 -> Arrow_Trans_Color in ( _CBcontainerKeyDown cont @PROPERTIES_RerouteKeyboard nil; _SETalphaBitmapTransparency alphav Arrow_Trans_Color; _SETalphaBitmapTransparency alphah Arrow_Trans_Color; mkPositionChart [ cont _CRcompBitmap propWin.PROPchannel cont nil [60 60] OBJ_VISIBLE|OBJ_ENABLE OBJ_CONTAINER_MOVE|OBJ_KEYBOARD UTILSGUI_CreateRectWithText propWin.PROPchannel make_rgb 255 255 255 60 60 nil GD_DEFAULT_TEXT_COLOR 0 0 60 60 UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil PROPERTIES_GetChartLoc "W1" [7 72] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil PROPERTIES_GetChartLoc "W2" [65 72] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil PROPERTIES_GetChartLoc "W3" [130 72] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil PROPERTIES_GetChartLoc "H1" [97 5] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil PROPERTIES_GetChartLoc "H2" [97 65] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil PROPERTIES_GetChartLoc "H3" [97 130] [20 20] nil nil PROPERTIES_CreateArrow propWin cont [0 80] alphav PROPERTIES_CreateArrow propWin cont [60 80] alphav PROPERTIES_CreateArrow propWin cont [120 80] alphav PROPERTIES_CreateArrow propWin cont [80 0] alphah PROPERTIES_CreateArrow propWin cont [80 60] alphah PROPERTIES_CreateArrow propWin cont [80 120] alphah UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil strcat PROPERTIES_GetChartLoc "W1" " :" [1 5] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_TEXT nil nil [20 0] [35 20] @PROPERTIES_ChangePos @ZONE_SetX1Position UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil strcat PROPERTIES_GetChartLoc "W2" " :" [1 25] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_TEXT nil nil [20 20] [35 20] @PROPERTIES_ChangePos @ZONE_SetWSize UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil strcat PROPERTIES_GetChartLoc "W3" " :" [1 45] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_TEXT nil nil [20 40] [35 20] @PROPERTIES_ChangePos @ZONE_SetX2Position UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil strcat PROPERTIES_GetChartLoc "H1" " :" [125 115] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_TEXT nil nil [145 110] [35 20] @PROPERTIES_ChangePos @ZONE_SetY1Position UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil strcat PROPERTIES_GetChartLoc "H2" " :" [125 135] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_TEXT nil nil [145 130] [35 20] @PROPERTIES_ChangePos @ZONE_SetHSize UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_LABEL nil strcat PROPERTIES_GetChartLoc "H3" " :" [125 155] [20 20] nil nil UTILSGUI_SetOrCreateText propWin.PROPchannel cont GUI_TEXT nil nil [145 150] [35 20] @PROPERTIES_ChangePos @ZONE_SetY2Position ] ) ;; fun PROPERTIES_SetArrow (comp, val) = if val then _SETcompCheckState comp CHK_CHECKED else _SETcompCheckState comp CHK_UNCHECKED ;; fun PROPERTIES_UpdateChartPosition (propWin, zone) = let ZONE_GetEdgePositions zone -> [x1 x2 y1 y2] in let ZONE_GetSize zone -> [w h] in let ZONE_GetStyle zone -> [position _ _] in ( PROPERTIES_SetArrow propWin.PROPposition.POSCHARTx1Arrow !(position&ZONE_LW_FLEX); PROPERTIES_SetArrow propWin.PROPposition.POSCHARTwArrow !(position&ZONE_MW_FLEX); PROPERTIES_SetArrow propWin.PROPposition.POSCHARTx2Arrow !(position&ZONE_RW_FLEX); PROPERTIES_SetArrow propWin.PROPposition.POSCHARTy1Arrow !(position&ZONE_LH_FLEX); PROPERTIES_SetArrow propWin.PROPposition.POSCHARThArrow !(position&ZONE_MH_FLEX); PROPERTIES_SetArrow propWin.PROPposition.POSCHARTy2Arrow !(position&ZONE_RH_FLEX); _SETcompText propWin.PROPposition.POSCHARTx1Text (itoa abs x1) scsgui.SCSGUIsmallFont nil CT_BEGIN; _SETcompText propWin.PROPposition.POSCHARTx2Text (itoa abs x2) scsgui.SCSGUIsmallFont nil CT_BEGIN; _SETcompText propWin.PROPposition.POSCHARTy1Text (itoa abs y1) scsgui.SCSGUIsmallFont nil CT_BEGIN; _SETcompText propWin.PROPposition.POSCHARTy2Text (itoa abs y2) scsgui.SCSGUIsmallFont nil CT_BEGIN; _SETcompText propWin.PROPposition.POSCHARTwText (itoa abs w) scsgui.SCSGUIsmallFont nil CT_BEGIN; _SETcompText propWin.PROPposition.POSCHARThText (itoa abs h) scsgui.SCSGUIsmallFont nil CT_BEGIN; _PAINTcontainer propWin.PROPposition.POSCHARTcontainer ) ;; fun PROPERTIES_TOOLTIP_Text(param)= if (_GETcompCheckState param) == 1 then _locSCS "LOC_TOOLTIP_PROPERTIES_Fixe" nil else _locSCS "LOC_TOOLTIP_PROPERTIES_Resizable" nil;; fun PROPERTIES_ShowOrCreateChart (propWin, zone) = if propWin.PROPposition.POSCHARTcontainer == nil then ( set propWin.PROPposition = PROPERTIES_CreateChart propWin; let _CONVERTcompCheckToObjNode propWin.PROPposition.POSCHARTx1Arrow -> obnode in TOOLTIP_DynamicLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIdynamicToolTip mkfun1 @PROPERTIES_TOOLTIP_Text propWin.PROPposition.POSCHARTx1Arrow ; let _CONVERTcompCheckToObjNode propWin.PROPposition.POSCHARTwArrow -> obnode in TOOLTIP_DynamicLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIdynamicToolTip mkfun1 @PROPERTIES_TOOLTIP_Text propWin.PROPposition.POSCHARTwArrow ; let _CONVERTcompCheckToObjNode propWin.PROPposition.POSCHARTx2Arrow -> obnode in TOOLTIP_DynamicLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIdynamicToolTip mkfun1 @PROPERTIES_TOOLTIP_Text propWin.PROPposition.POSCHARTx2Arrow; let _CONVERTcompCheckToObjNode propWin.PROPposition.POSCHARTy1Arrow -> obnode in TOOLTIP_DynamicLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIdynamicToolTip mkfun1 @PROPERTIES_TOOLTIP_Text propWin.PROPposition.POSCHARTy1Arrow; let _CONVERTcompCheckToObjNode propWin.PROPposition.POSCHARThArrow -> obnode in TOOLTIP_DynamicLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIdynamicToolTip mkfun1 @PROPERTIES_TOOLTIP_Text propWin.PROPposition.POSCHARThArrow; let _CONVERTcompCheckToObjNode propWin.PROPposition.POSCHARTy2Arrow -> obnode in TOOLTIP_DynamicLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIdynamicToolTip mkfun1 @PROPERTIES_TOOLTIP_Text propWin.PROPposition.POSCHARTy2Arrow; let _CONVERTcompBitmapToObjNode propWin.PROPposition.POSCHARTbitmap -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_Bitmap" nil; let _CONVERTcompBitmapToObjNode propWin.PROPposition.POSCHARTbitmap -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_Bitmap" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTx1Label -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_X1" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTx1Text -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_X1" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTx2Label -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_X2" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTx2Text -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_X2" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTy1Label -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_Y1" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTy1Text -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_Y1" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTy2Label -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_Y2" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTy2Text -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_Y2" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTwLabel -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_W" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARTwText -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_W" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARThLabel -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_Y" nil; let _CONVERTcompTextToObjNode propWin.PROPposition.POSCHARThText -> obnode in TOOLTIP_StaticLink propWin.PROPposition.POSCHARTcontainer obnode scsgui.SCSGUIstaticToolTip _locSCS "LOC_TOOLTIP_PROPERTIES_Y" nil; ) else nil; _SHOWcontainer propWin.PROPposition.POSCHARTcontainer CONTAINER_UNHIDDEN; PROPERTIES_UpdateChartPosition propWin zone; 0 ;; fun PROPERTIES_HideChart (propWin) = _DScontainer propWin.PROPposition.POSCHARTcontainer; set propWin.PROPposition.POSCHARTcontainer = nil ;; fun PROPERTIES_ChartInit (propWin) = 0 ;;