DataWindow :

- gestione soglia
- aggiunti zoccoli per ante
- aggiunte funzioni ausiliarie per il programma.
This commit is contained in:
SaraP
2025-04-03 14:50:05 +02:00
parent a2c1032e81
commit 398b52cbae
4 changed files with 298 additions and 123 deletions
+14 -4
View File
@@ -21,13 +21,14 @@ require( 'EgtBase')
require( 'WinConst')
-- funzioni
----------------------------------------------------------------------------------
local function AddInfo( nId, sInfo, nVal)
local vInfo = EgtGetInfo( nId, sInfo, 'vi') or {}
table.insert( vInfo, nVal)
EgtSetInfo( nId, sInfo, vInfo)
end
----------------------------------------------------------------------------------
-- funzione che importa il profilo
function WinCreate.ImportProfile( sProfilePath)
-- verifico esistenza file
@@ -584,11 +585,20 @@ end
----------------------------------------------------------------------------------
-- funzione che aggiunge uno zoccolo
function WinCreate.AddBottomRail( nAreaId, nNbr)
local nAreaType = EgtGetInfo( nAreaId, WIN_AREATYPE, 'i')
if nAreaType == WIN_AREATYPES.FRAME or nAreaType == WIN_AREATYPES.SASH then
EgtSetInfo( nAreaId, WIN_BOTTOMRAIL, nNbr)
end
end
----------------------------------------------------------------------------------
---------------------------------- SOGLIA ------------------------------------
----------------------------------------------------------------------------------
-- funzione che aggiunge la soglia
function WinCreate.AddThreshold( nAreaId, sThresholdProfile)
local nAreaType = EgtGetInfo( nAreaId, WIN_AREATYPE, 'i')
if nAreaType == WIN_AREATYPES.FRAME then
-- recupero l'outline bottom
local nBaseOutlineLayerId = EgtGetFirstNameInGroup( nAreaId, WIN_AREAOUTLINE)
EgtSetInfo( nBaseOutlineLayerId, WIN_BOTTOMRAIL, nNbr)
EgtSetInfo( nAreaId, WIN_THRESHOLD_PROFILE, sThresholdProfile)
end
end