SAGA API  v9.5
api_callback.cpp File Reference
#include <wx/stdpaths.h>
#include <wx/app.h>
#include "api_core.h"
#include "grid.h"
#include "parameters.h"

Go to the source code of this file.

Functions

void SG_UI_Console_Set_UTF8 (bool bOn)
 
bool SG_UI_Console_Get_UTF8 (void)
 
void SG_UI_Console_Print_StdOut (const char *Text, SG_Char End, bool bFlush)
 
void SG_UI_Console_Print_StdOut (const wchar_t *Text, SG_Char End, bool bFlush)
 
void SG_UI_Console_Print_StdOut (const CSG_String &Text, SG_Char End, bool bFlush)
 
void SG_UI_Console_Print_StdErr (const char *Text, SG_Char End, bool bFlush)
 
void SG_UI_Console_Print_StdErr (const wchar_t *Text, SG_Char End, bool bFlush)
 
void SG_UI_Console_Print_StdErr (const CSG_String &Text, SG_Char End, bool bFlush)
 
bool SG_Set_UI_Callback (TSG_PFNC_UI_Callback Function)
 
TSG_PFNC_UI_Callback SG_Get_UI_Callback (void)
 
int SG_UI_Progress_Lock (bool bOn)
 
bool SG_UI_Progress_is_Locked (void)
 
int SG_UI_Progress_Reset (void)
 
bool SG_UI_Process_Get_Okay (bool bBlink)
 
bool SG_UI_Process_Set_Okay (bool bOkay)
 
bool SG_UI_Process_Set_Busy (bool bOn, const CSG_String &Message)
 
bool SG_UI_Process_Set_Progress (int Position, int Range)
 
bool SG_UI_Process_Set_Progress (sLong Position, sLong Range)
 
bool SG_UI_Process_Set_Progress (double Position, double Range)
 
bool SG_UI_Process_Set_Ready (void)
 
void SG_UI_Process_Set_Text (const CSG_String &Text)
 
bool SG_UI_Stop_Execution (bool bDialog)
 
void SG_UI_Dlg_Message (const CSG_String &Message, const CSG_String &Caption)
 
bool SG_UI_Dlg_Continue (const CSG_String &Message, const CSG_String &Caption)
 
int SG_UI_Dlg_Error (const CSG_String &Message, const CSG_String &Caption)
 
void SG_UI_Dlg_Info (const CSG_String &Message, const CSG_String &Caption)
 
bool SG_UI_Dlg_Parameters (CSG_Parameters *pParameters, const CSG_String &Caption)
 
int SG_UI_Msg_Lock (bool bOn)
 
bool SG_UI_Msg_is_Locked (void)
 
int SG_UI_Msg_Reset (void)
 
void SG_UI_Msg_Add (const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
 
void SG_UI_Msg_Add (const wchar_t *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
 
void SG_UI_Msg_Add (const CSG_String &Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
 
void SG_UI_Msg_Add_Execution (const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
 
void SG_UI_Msg_Add_Execution (const wchar_t *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
 
void SG_UI_Msg_Add_Execution (const CSG_String &Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
 
void SG_UI_Msg_Add_Error (const char *Message)
 
void SG_UI_Msg_Add_Error (const wchar_t *Message)
 
void SG_UI_Msg_Add_Error (const CSG_String &Message)
 
void SG_UI_Msg_Flush (void)
 
void SG_UI_ProgressAndMsg_Lock (bool bOn)
 
void SG_UI_ProgressAndMsg_Reset (void)
 
bool SG_UI_DataObject_Add (CSG_Data_Object *pDataObject, int Show)
 
bool SG_UI_DataObject_Update (CSG_Data_Object *pDataObject, int Show, CSG_Parameters *pParameters)
 
bool SG_UI_DataObject_Show (CSG_Data_Object *pDataObject, int Show)
 
bool SG_UI_DataObject_asImage (CSG_Data_Object *pDataObject, CSG_Grid *pGrid)
 
bool SG_UI_DataObject_Colors_Get (CSG_Data_Object *pDataObject, CSG_Colors *pColors)
 
bool SG_UI_DataObject_Colors_Set (CSG_Data_Object *pDataObject, CSG_Colors *pColors)
 
bool SG_UI_DataObject_Params_Get (CSG_Data_Object *pDataObject, CSG_Parameters *pParameters)
 
bool SG_UI_DataObject_Params_Set (CSG_Data_Object *pDataObject, CSG_Parameters *pParameters)
 
bool SG_UI_Set_Map_Extent (double xMin, double yMin, double xMax, double yMax, int Maps)
 
bool SG_UI_Diagram_Show (class CSG_Table *pTable, class CSG_Parameters *pParameters)
 
bool SG_UI_ODBC_Update (const CSG_String &Server)
 
int SG_UI_Window_Arrange (int Arrange)
 
void * SG_UI_Get_Window_Main (void)
 
CSG_String SG_UI_Get_Application_Path (bool bPathOnly)
 
CSG_String SG_UI_Get_Application_Name (void)
 

Variables

static bool gSG_UI_Console_bUTF8 = true
 
TSG_PFNC_UI_Callback gSG_UI_Callback = NULL
 
int gSG_UI_Progress_Lock = 0
 
int gSG_UI_Msg_Lock = 0
 

Function Documentation

◆ SG_Get_UI_Callback()

TSG_PFNC_UI_Callback SG_Get_UI_Callback ( void  )

Definition at line 146 of file api_callback.cpp.

References gSG_UI_Callback.

◆ SG_Set_UI_Callback()

bool SG_Set_UI_Callback ( TSG_PFNC_UI_Callback  Function)

Definition at line 138 of file api_callback.cpp.

References gSG_UI_Callback.

◆ SG_UI_Console_Get_UTF8()

bool SG_UI_Console_Get_UTF8 ( void  )

Definition at line 75 of file api_callback.cpp.

References gSG_UI_Console_bUTF8.

◆ SG_UI_Console_Print_StdErr() [1/3]

void SG_UI_Console_Print_StdErr ( const char *  Text,
SG_Char  End,
bool  bFlush 
)

Definition at line 103 of file api_callback.cpp.

References SG_UI_Console_Print_StdErr().

Referenced by SG_UI_Console_Print_StdErr(), and SG_UI_Msg_Add_Error().

◆ SG_UI_Console_Print_StdErr() [2/3]

void SG_UI_Console_Print_StdErr ( const CSG_String Text,
SG_Char  End,
bool  bFlush 
)

◆ SG_UI_Console_Print_StdErr() [3/3]

void SG_UI_Console_Print_StdErr ( const wchar_t *  Text,
SG_Char  End,
bool  bFlush 
)

Definition at line 104 of file api_callback.cpp.

References SG_UI_Console_Print_StdErr().

◆ SG_UI_Console_Print_StdOut() [1/3]

◆ SG_UI_Console_Print_StdOut() [2/3]

void SG_UI_Console_Print_StdOut ( const CSG_String Text,
SG_Char  End,
bool  bFlush 
)

◆ SG_UI_Console_Print_StdOut() [3/3]

void SG_UI_Console_Print_StdOut ( const wchar_t *  Text,
SG_Char  End,
bool  bFlush 
)

Definition at line 79 of file api_callback.cpp.

References SG_UI_Console_Print_StdOut().

◆ SG_UI_Console_Set_UTF8()

void SG_UI_Console_Set_UTF8 ( bool  bOn)

Definition at line 74 of file api_callback.cpp.

References gSG_UI_Console_bUTF8.

◆ SG_UI_DataObject_Add()

bool SG_UI_DataObject_Add ( CSG_Data_Object pDataObject,
int  Show 
)

◆ SG_UI_DataObject_asImage()

bool SG_UI_DataObject_asImage ( CSG_Data_Object pDataObject,
CSG_Grid pGrid 
)

Definition at line 658 of file api_callback.cpp.

References CALLBACK_DATAOBJECT_ASIMAGE, and gSG_UI_Callback.

◆ SG_UI_DataObject_Colors_Get()

bool SG_UI_DataObject_Colors_Get ( CSG_Data_Object pDataObject,
CSG_Colors pColors 
)

Definition at line 671 of file api_callback.cpp.

References CALLBACK_DATAOBJECT_COLORS_GET, and gSG_UI_Callback.

Referenced by CSG_Tool::DataObject_Get_Colors().

◆ SG_UI_DataObject_Colors_Set()

bool SG_UI_DataObject_Colors_Set ( CSG_Data_Object pDataObject,
CSG_Colors pColors 
)

◆ SG_UI_DataObject_Params_Get()

bool SG_UI_DataObject_Params_Get ( CSG_Data_Object pDataObject,
CSG_Parameters pParameters 
)

◆ SG_UI_DataObject_Params_Set()

bool SG_UI_DataObject_Params_Set ( CSG_Data_Object pDataObject,
CSG_Parameters pParameters 
)

◆ SG_UI_DataObject_Show()

bool SG_UI_DataObject_Show ( CSG_Data_Object pDataObject,
int  Show 
)

Definition at line 645 of file api_callback.cpp.

References CALLBACK_DATAOBJECT_SHOW, and gSG_UI_Callback.

Referenced by SG_UI_DataObject_Update().

◆ SG_UI_DataObject_Update()

bool SG_UI_DataObject_Update ( CSG_Data_Object pDataObject,
int  Show,
CSG_Parameters pParameters 
)

◆ SG_UI_Diagram_Show()

bool SG_UI_Diagram_Show ( class CSG_Table pTable,
class CSG_Parameters pParameters 
)

◆ SG_UI_Dlg_Continue()

bool SG_UI_Dlg_Continue ( const CSG_String Message,
const CSG_String Caption 
)

◆ SG_UI_Dlg_Error()

int SG_UI_Dlg_Error ( const CSG_String Message,
const CSG_String Caption 
)

◆ SG_UI_Dlg_Info()

void SG_UI_Dlg_Info ( const CSG_String Message,
const CSG_String Caption 
)

◆ SG_UI_Dlg_Message()

void SG_UI_Dlg_Message ( const CSG_String Message,
const CSG_String Caption 
)

◆ SG_UI_Dlg_Parameters()

bool SG_UI_Dlg_Parameters ( CSG_Parameters pParameters,
const CSG_String Caption 
)

Definition at line 449 of file api_callback.cpp.

References CALLBACK_DLG_PARAMETERS, and gSG_UI_Callback.

Referenced by CSG_Tool::Dlg_Parameters().

◆ SG_UI_Get_Application_Name()

CSG_String SG_UI_Get_Application_Name ( void  )

Definition at line 812 of file api_callback.cpp.

Referenced by CSG_Tool_Library_Interface::Create(), and CSG_Tool::CSG_Tool().

◆ SG_UI_Get_Application_Path()

CSG_String SG_UI_Get_Application_Path ( bool  bPathOnly)

◆ SG_UI_Get_Window_Main()

void* SG_UI_Get_Window_Main ( void  )

◆ SG_UI_Msg_Add() [1/3]

◆ SG_UI_Msg_Add() [2/3]

void SG_UI_Msg_Add ( const CSG_String Message,
bool  bNewLine,
TSG_UI_MSG_STYLE  Style 
)

◆ SG_UI_Msg_Add() [3/3]

void SG_UI_Msg_Add ( const wchar_t *  Message,
bool  bNewLine,
TSG_UI_MSG_STYLE  Style 
)

Definition at line 504 of file api_callback.cpp.

References SG_UI_Msg_Add().

◆ SG_UI_Msg_Add_Error() [1/3]

◆ SG_UI_Msg_Add_Error() [2/3]

void SG_UI_Msg_Add_Error ( const CSG_String Message)

◆ SG_UI_Msg_Add_Error() [3/3]

void SG_UI_Msg_Add_Error ( const wchar_t *  Message)

Definition at line 558 of file api_callback.cpp.

References SG_UI_Msg_Add_Error().

◆ SG_UI_Msg_Add_Execution() [1/3]

void SG_UI_Msg_Add_Execution ( const char *  Message,
bool  bNewLine,
TSG_UI_MSG_STYLE  Style 
)

◆ SG_UI_Msg_Add_Execution() [2/3]

void SG_UI_Msg_Add_Execution ( const CSG_String Message,
bool  bNewLine,
TSG_UI_MSG_STYLE  Style 
)

◆ SG_UI_Msg_Add_Execution() [3/3]

void SG_UI_Msg_Add_Execution ( const wchar_t *  Message,
bool  bNewLine,
TSG_UI_MSG_STYLE  Style 
)

Definition at line 531 of file api_callback.cpp.

References SG_UI_Msg_Add_Execution().

◆ SG_UI_Msg_Flush()

void SG_UI_Msg_Flush ( void  )

Definition at line 577 of file api_callback.cpp.

◆ SG_UI_Msg_is_Locked()

bool SG_UI_Msg_is_Locked ( void  )

Definition at line 487 of file api_callback.cpp.

References gSG_UI_Msg_Lock.

◆ SG_UI_Msg_Lock()

int SG_UI_Msg_Lock ( bool  bOn)

◆ SG_UI_Msg_Reset()

int SG_UI_Msg_Reset ( void  )

Definition at line 493 of file api_callback.cpp.

References gSG_UI_Msg_Lock.

Referenced by SG_UI_ProgressAndMsg_Reset().

◆ SG_UI_ODBC_Update()

bool SG_UI_ODBC_Update ( const CSG_String Server)

Definition at line 749 of file api_callback.cpp.

References CALLBACK_DATABASE_UPDATE, and gSG_UI_Callback.

◆ SG_UI_Process_Get_Okay()

◆ SG_UI_Process_Set_Busy()

bool SG_UI_Process_Set_Busy ( bool  bOn,
const CSG_String Message 
)

Definition at line 243 of file api_callback.cpp.

References CALLBACK_PROCESS_SET_BUSY, and gSG_UI_Callback.

◆ SG_UI_Process_Set_Okay()

◆ SG_UI_Process_Set_Progress() [1/3]

bool SG_UI_Process_Set_Progress ( double  Position,
double  Range 
)

◆ SG_UI_Process_Set_Progress() [2/3]

◆ SG_UI_Process_Set_Progress() [3/3]

bool SG_UI_Process_Set_Progress ( sLong  Position,
sLong  Range 
)

Definition at line 262 of file api_callback.cpp.

References SG_UI_Process_Set_Progress().

◆ SG_UI_Process_Set_Ready()

◆ SG_UI_Process_Set_Text()

◆ SG_UI_Progress_is_Locked()

bool SG_UI_Progress_is_Locked ( void  )

Definition at line 192 of file api_callback.cpp.

References gSG_UI_Progress_Lock.

◆ SG_UI_Progress_Lock()

int SG_UI_Progress_Lock ( bool  bOn)

Definition at line 177 of file api_callback.cpp.

References gSG_UI_Progress_Lock.

Referenced by SG_UI_ProgressAndMsg_Lock().

◆ SG_UI_Progress_Reset()

int SG_UI_Progress_Reset ( void  )

Definition at line 198 of file api_callback.cpp.

References gSG_UI_Progress_Lock.

Referenced by SG_UI_ProgressAndMsg_Reset().

◆ SG_UI_ProgressAndMsg_Lock()

void SG_UI_ProgressAndMsg_Lock ( bool  bOn)

◆ SG_UI_ProgressAndMsg_Reset()

void SG_UI_ProgressAndMsg_Reset ( void  )

Definition at line 597 of file api_callback.cpp.

References SG_UI_Msg_Reset(), and SG_UI_Progress_Reset().

◆ SG_UI_Set_Map_Extent()

bool SG_UI_Set_Map_Extent ( double  xMin,
double  yMin,
double  xMax,
double  yMax,
int  Maps 
)

Definition at line 723 of file api_callback.cpp.

References CALLBACK_SET_MAP_EXTENT, and gSG_UI_Callback.

◆ SG_UI_Stop_Execution()

bool SG_UI_Stop_Execution ( bool  bDialog)

Definition at line 349 of file api_callback.cpp.

References CALLBACK_STOP_EXECUTION, and gSG_UI_Callback.

Referenced by CSG_Tool::Stop_Execution().

◆ SG_UI_Window_Arrange()

int SG_UI_Window_Arrange ( int  Arrange)

Definition at line 769 of file api_callback.cpp.

References CALLBACK_WINDOW_ARRANGE, and gSG_UI_Callback.

Variable Documentation

◆ gSG_UI_Callback

◆ gSG_UI_Console_bUTF8

bool gSG_UI_Console_bUTF8 = true
static

◆ gSG_UI_Msg_Lock

◆ gSG_UI_Progress_Lock