From 71eba828ab1adaebaaaf42bd7ed3d6c8becd9411 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 30 May 2016 08:55:59 +0000 Subject: [PATCH] EgtExecutor : - esporto ExeProcessEvents e ExeOutText. --- EXE.h | 6 ------ EXE_General.cpp | 41 ++++++++++++++++++++--------------------- EXE_Scene.cpp | 7 ++++--- LUA_General.cpp | 4 ++-- 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/EXE.h b/EXE.h index 7b5df28..895ba44 100644 --- a/EXE.h +++ b/EXE.h @@ -21,9 +21,3 @@ ILogger* GetLogger( void) ; ILogger* GetCmdLogger( void) ; bool SetCmdLog( bool bVal) ; bool IsCmdLog( void) ; - -//---------------------------------------------------------------------------- -int ProcessEvents( int nProg, int nPause) ; - -//---------------------------------------------------------------------------- -bool OutText( const std::string& sText) ; diff --git a/EXE_General.cpp b/EXE_General.cpp index eab352e..dae2f9f 100644 --- a/EXE_General.cpp +++ b/EXE_General.cpp @@ -360,6 +360,16 @@ ExeSetProcessEvents( pfProcEvents pFun) return ( pFun != nullptr) ; } +//----------------------------------------------------------------------------- +int +ExeProcessEvents( int nProg, int nPause) +{ + if ( s_pFunProcEvents != nullptr) + return s_pFunProcEvents( nProg, nPause) ; + else + return 0 ; +} + //----------------------------------------------------------------------------- bool ExeSetOutText( pfOutText pFun) @@ -368,6 +378,16 @@ ExeSetOutText( pfOutText pFun) return ( pFun != nullptr) ; } +//----------------------------------------------------------------------------- +bool +ExeOutText( const string& sText) +{ + if ( s_pFunOutText != nullptr) + return s_pFunOutText( sText) ; + else + return false ; +} + //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- @@ -398,24 +418,3 @@ IsCmdLog( void) { return s_bCmdLog ; } - -//----------------------------------------------------------------------------- -//----------------------------------------------------------------------------- -int -ProcessEvents( int nProg, int nPause) -{ - if ( s_pFunProcEvents != nullptr) - return s_pFunProcEvents( nProg, nPause) ; - else - return 0 ; -} - -//----------------------------------------------------------------------------- -bool -OutText( const string& sText) -{ - if ( s_pFunOutText != nullptr) - return s_pFunOutText( sText) ; - else - return false ; -} diff --git a/EXE_Scene.cpp b/EXE_Scene.cpp index 83435ce..f8e46f5 100644 --- a/EXE_Scene.cpp +++ b/EXE_Scene.cpp @@ -17,6 +17,7 @@ #include "EXE_Macro.h" #include "DllGraphics.h" #include "/EgtDev/Include/EXeExecutor.h" +#include "/EgtDev/Include/EXeConst.h" #include "/EgtDev/Include/EgtStringConverter.h" #include "/EgtDev/Include/EgtPointerOwner.h" @@ -427,19 +428,19 @@ ExeZoom( int nZoom, bool bRedraw) const double COEFF_OUT = 1 / COEFF_IN ; switch ( nZoom) { - case 1 : + case ZM_ALL : pGseCtx->m_pScene->ZoomAll() ; if ( bRedraw) pGseCtx->m_pScene->RedrawWindow() ; return true ; break ; - case 2 : + case ZM_IN : pGseCtx->m_pScene->ZoomChange( COEFF_IN) ; if ( bRedraw) pGseCtx->m_pScene->RedrawWindow() ; return true ; break ; - case 3 : + case ZM_OUT : pGseCtx->m_pScene->ZoomChange( COEFF_OUT) ; if ( bRedraw) pGseCtx->m_pScene->RedrawWindow() ; diff --git a/LUA_General.cpp b/LUA_General.cpp index b6cf715..5dd837c 100644 --- a/LUA_General.cpp +++ b/LUA_General.cpp @@ -232,7 +232,7 @@ LuaProcessEvents( lua_State* L) LuaCheckParam( L, 2, nPause) LuaClearStack( L) ; // lancio aggiornamento interfaccia - int nRes = ProcessEvents( nProg, nPause) ; + int nRes = ExeProcessEvents( nProg, nPause) ; // restituisco il risultato LuaSetParam( L, nRes) ; return 1 ; @@ -247,7 +247,7 @@ LuaOutText( lua_State* L) LuaCheckParam( L, 1, sText) LuaClearStack( L) ; // lancio emissione testo - bool bOk = OutText( sText) ; + bool bOk = ExeOutText( sText) ; // restituisco il risultato LuaSetParam( L, bOk) ; return 1 ;