 |
SAGA API
v9.9
|
Go to the documentation of this file.
53 #ifndef HEADER_INCLUDED__SAGA_API__tool_H
54 #define HEADER_INCLUDED__SAGA_API__tool_H
197 bool Reset (
bool bManager =
true);
208 bool Delete_Manager (
bool bDetachData =
false,
bool bReset =
true);
214 bool Settings_Pop (
void);
218 virtual bool needs_GUI (
void)
const {
return(
false ); }
219 bool has_GUI (
void)
const;
220 bool has_CMD (
void)
const;
222 virtual bool is_Grid (
void)
const {
return(
false ); }
227 void Set_Show_Progress (
bool bOn =
true);
232 bool Execute (
bool bAddHistory =
false);
243 CMD_Shell, CMD_Batch, CMD_Usage,
246 Python_Wrapper_Func_Name, Python_Wrapper_Func_ID,
247 Python_Wrapper_Call_Name, Python_Wrapper_Call_ID
250 CSG_String Get_Script (Script_Format Format,
bool bHeader =
true,
int Arguments = 0,
bool bWrapArgs =
true);
264 void Set_Description (
const CSG_String &String);
279 bool Dlg_Parameters (
const CSG_String &Identifier);
285 virtual bool Set_Progress (
int Position,
int Range )
const;
286 virtual bool Set_Progress (
sLong Position,
sLong Range )
const;
287 virtual bool Set_Progress (
double Position,
double Range = 1.)
const;
289 bool Stop_Execution (
bool bDialog =
true);
292 bool Message_Dlg_Confirm (
const CSG_String &Text,
const SG_Char *Caption = NULL);
294 void Message_Add (
const CSG_String &Text,
bool bNewLine =
true);
295 void Message_Fmt (
const char *Format, ...);
296 void Message_Fmt (
const wchar_t *Format, ...);
300 bool Error_Fmt (
const char *Format, ...);
301 bool Error_Fmt (
const wchar_t *Format, ...);
304 bool DataObject_Add (
CSG_Data_Object *pDataObject,
bool bUpdate =
false);
306 bool DataObject_Update_All (
void);
315 static int _On_Parameter_Changed (
CSG_Parameter *pParameter,
int Flags);
317 static bool Process_Get_Okay (
bool bBlink =
false);
318 static void Process_Set_Text (
const CSG_String &Text);
319 static void Process_Set_Text (
const char *Format, ...);
320 static void Process_Set_Text (
const wchar_t *Format, ...);
342 static bool DataObject_Set_Stretch_Linear (
CSG_Data_Object *pDataObject,
int Field = -1,
double Minimum = 5.,
double Maximum = 95. ,
int Interval_Mode = 0,
double Interval_Log = 1.,
int Colors = -1,
bool bUpdateNow =
false);
343 static bool DataObject_Set_Stretch_StdDev (
CSG_Data_Object *pDataObject,
int Field = -1,
double StdDev = 2.,
bool bKeepInRange =
false,
int Interval_Mode = 0,
double Interval_Log = 1.,
int Colors = -1,
bool bUpdateNow =
false);
344 static bool DataObject_Set_Stretch_Percentile (
CSG_Data_Object *pDataObject,
int Field = -1,
double Minimum = 2.,
double Maximum = 98. ,
int Interval_Mode = 0,
double Interval_Log = 1.,
int Colors = -1,
bool bUpdateNow =
false);
345 static bool DataObject_Set_Stretch (
CSG_Data_Object *pDataObject,
int Field ,
double Minimum ,
double Maximum ,
int Interval_Mode = 0,
double Interval_Log = 1.,
int Colors = -1,
bool bUpdateNow =
false);
347 static bool DataObject_Classify_Unique (
CSG_Data_Object *pDataObject,
int Field = -1,
int Classes_Max = 1024 ,
int Colors = -1);
348 static bool DataObject_Classify_Equal (
CSG_Data_Object *pDataObject,
int Field = -1,
int Classes = 10 ,
int Colors = -1);
349 static bool DataObject_Classify_Defined (
CSG_Data_Object *pDataObject,
int Field ,
double Interval,
bool bOffset =
false,
double Offset = 0.,
int Colors = -1);
350 static bool DataObject_Classify_Quantile (
CSG_Data_Object *pDataObject,
int Field = -1,
int Classes = 10,
bool bHistogram =
true ,
int Colors = -1);
351 static bool DataObject_Classify_Geometric (
CSG_Data_Object *pDataObject,
int Field = -1,
int Classes = 10,
bool bIncreasing =
true ,
int Colors = -1);
352 static bool DataObject_Classify_Natural (
CSG_Data_Object *pDataObject,
int Field = -1,
int Classes = 10 ,
int Colors = -1);
353 static bool DataObject_Classify_StdDev (
CSG_Data_Object *pDataObject,
int Field = -1,
double StdDev = 0.5,
double StdDev_Max = 4.5 ,
int Colors = -1);
358 bool m_bExecutes, m_bError_Ignore, m_bShow_Progress, m_bGUI, m_bCMD;
362 CSG_String m_ID, m_Library, m_Library_Menu, m_File_Name, m_Author, m_Version, m_Execution_Info;
365 bool _Synchronize_DataObjects (
void);
367 CSG_String _Get_Script_CMD (
bool bHeader ,
bool bAllArguments,
bool bWrapArgs,
bool bBatch);
368 void _Get_Script_CMD (
CSG_String &Script,
CSG_Parameters *pParameters,
bool bAllArguments,
bool bWrapArgs,
bool bBatch);
371 void _Get_Script_CMD_Usage (
CSG_Parameters *pParameters,
class wxCmdLineParser &Parser);
373 CSG_String _Get_Script_Python (
bool bHeader,
bool bAllArguments);
376 CSG_String _Get_Script_Python_Wrap (
bool bHeader,
bool bName,
bool bCall,
int AllArguments,
bool bWrapArgs);
379 void _Set_Output_History (
void);
408 virtual bool is_Grid (
void)
const {
return(
true ); }
413 virtual bool Set_Progress_Cells (
sLong Cell)
const;
414 virtual bool Set_Progress_Rows (
int Row)
const;
417 int Get_NX (
void)
const {
return( Get_System().Get_NX () ); }
418 int Get_NY (
void)
const {
return( Get_System().Get_NY () ); }
420 double Get_XMin (
void)
const {
return( Get_System().Get_XMin () ); }
421 double Get_YMin (
void)
const {
return( Get_System().Get_YMin () ); }
422 double Get_XMax (
void)
const {
return( Get_System().Get_XMax () ); }
423 double Get_YMax (
void)
const {
return( Get_System().Get_YMax () ); }
427 double Get_Length (
int i)
const {
return( Get_System().Get_Length (i) ); }
438 void Lock_Create (
void);
439 void Lock_Destroy (
void);
441 bool is_Locked (
int x,
int y) {
return( Lock_Get(x, y) != 0 ); }
442 char Lock_Get (
int x,
int y) {
return( m_pLock && x >= 0 && x < Get_NX() && y >= 0 && y < Get_NY() ? m_pLock->asChar(x, y) : 0 ); }
446 if( m_pLock && x >= 0 && x < Get_NX() && y >= 0 && y < Get_NY() )
448 m_pLock->Set_Value(x, y, Value);
497 #define TOOL_INTERACTIVE_KEY_LEFT 0x01
498 #define TOOL_INTERACTIVE_KEY_MIDDLE 0x02
499 #define TOOL_INTERACTIVE_KEY_RIGHT 0x04
500 #define TOOL_INTERACTIVE_KEY_SHIFT 0x08
501 #define TOOL_INTERACTIVE_KEY_ALT 0x10
502 #define TOOL_INTERACTIVE_KEY_CTRL 0x20
552 int m_Keys, m_Drag_Mode;
615 bool Get_Grid_Pos (
int &x,
int &y)
const;
617 int Get_xGrid (
void)
const;
618 int Get_yGrid (
void)
const;
647 typedef CSG_Tool * (* TSG_PFNC_TLB_Create_Tool) (
int i);
662 int Get_Count (
void);
665 CSG_Tool * Create_Tool (
int i,
bool bWithGUI =
false,
bool bWithCMD =
true);
667 bool Delete_Tools (
void);
681 #define SYMBOL_TLB_Initialize "TLB_Initialize"
684 #define SYMBOL_TLB_Finalize "TLB_Finalize"
687 #define SYMBOL_TLB_Get_Interface "TLB_Get_Interface"
691 #define TLB_INTERFACE_SKIP_TOOL ((CSG_Tool *)0x1)
694 #define TLB_INTERFACE_ESTABLISH CSG_Tool_Library_Interface TLB_Interface;\
696 extern "C" _SAGA_DLL_EXPORT CSG_Tool_Library_Interface * TLB_Get_Interface (void)\
698 return( &TLB_Interface );\
702 #define TLB_INTERFACE_INITIALIZE extern "C" _SAGA_DLL_EXPORT bool TLB_Initialize(const SG_Char *TLB_Path)\
704 return( TLB_Interface.Create(SAGA_VERSION, TLB_Path, Get_Info, Create_Tool) );\
708 #define TLB_INTERFACE_FINALIZE extern "C" _SAGA_DLL_EXPORT bool TLB_Finalize (void)\
714 #define TLB_INTERFACE TLB_INTERFACE_ESTABLISH TLB_INTERFACE_INITIALIZE TLB_INTERFACE_FINALIZE
721 #endif // #ifdef SWIG
731 #endif // #ifndef HEADER_INCLUDED__SAGA_API__tool_H
static int Get_xTo(int Direction, int x=0)
bool SG_UI_Process_Get_Okay(bool bBlink)
static int Get_yTo(int Direction, int y=0)
@ SG_UI_DATAOBJECT_UPDATE
@ PARAMETER_TYPE_Undefined
#define SAGA_API_DLL_EXPORT
static int Get_yFrom(int Direction, int y=0)
static int Get_xFrom(int Direction, int x=0)
int(* TSG_PFNC_Parameter_Changed)(CSG_Parameter *pParameter, int Flags)