EgtExecutor :
- esporto ExeProcessEvents e ExeOutText.
This commit is contained in:
@@ -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) ;
|
||||
|
||||
+20
-21
@@ -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 ;
|
||||
}
|
||||
|
||||
+4
-3
@@ -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() ;
|
||||
|
||||
+2
-2
@@ -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 ;
|
||||
|
||||
Reference in New Issue
Block a user