|
SAGA API
v9.6
|
Go to the documentation of this file.
53 #ifndef HEADER_INCLUDED__SAGA_API__tool_H
54 #define HEADER_INCLUDED__SAGA_API__tool_H
213 bool Reset (
bool bManager =
true);
224 bool Delete_Manager (
bool bDetachData =
false,
bool bReset =
true);
230 bool Settings_Pop (
void);
234 virtual bool needs_GUI (
void)
const {
return(
false ); }
235 bool has_GUI (
void)
const;
236 bool has_CMD (
void)
const;
238 virtual bool is_Grid (
void)
const {
return(
false ); }
243 void Set_Show_Progress (
bool bOn =
true);
248 bool Execute (
bool bAddHistory =
false);
266 void Set_Description (
const CSG_String &String);
281 bool Dlg_Parameters (
const CSG_String &Identifier);
287 virtual bool Set_Progress (
int Position,
int Range )
const;
288 virtual bool Set_Progress (
sLong Position,
sLong Range )
const;
289 virtual bool Set_Progress (
double Position,
double Range = 1.)
const;
291 bool Stop_Execution (
bool bDialog =
true);
294 bool Message_Dlg_Confirm (
const CSG_String &Text,
const SG_Char *Caption = NULL);
296 void Message_Add (
const CSG_String &Text,
bool bNewLine =
true);
297 void Message_Fmt (
const char *Format, ...);
298 void Message_Fmt (
const wchar_t *Format, ...);
302 bool Error_Fmt (
const char *Format, ...);
303 bool Error_Fmt (
const wchar_t *Format, ...);
306 bool DataObject_Add (
CSG_Data_Object *pDataObject,
bool bUpdate =
false);
308 void DataObject_Update_All (
void);
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 int _On_Parameter_Changed (
CSG_Parameter *pParameter,
int Flags);
347 bool m_bExecutes, m_bError_Ignore, m_bShow_Progress, m_bGUI, m_bCMD;
351 CSG_String m_ID, m_Library, m_Library_Menu, m_File_Name, m_Author, m_Version, m_Execution_Info;
354 bool _Synchronize_DataObjects (
void);
360 void _Get_Script_CMD_Usage (
CSG_Parameters *pParameters,
class wxCmdLineParser &Parser);
362 CSG_String _Get_Script_Python (
bool bHeader,
bool bAllParameters);
365 CSG_String _Get_Script_Python_Wrap (
bool bHeader,
bool bName,
bool bCall,
bool bOnlyNonDefaults);
369 void _Set_Output_History (
void);
398 virtual bool is_Grid (
void)
const {
return(
true ); }
403 virtual bool Set_Progress_Cells (
sLong Cell)
const;
404 virtual bool Set_Progress_Rows (
int Row)
const;
407 int Get_NX (
void)
const {
return( Get_System().Get_NX () ); }
408 int Get_NY (
void)
const {
return( Get_System().Get_NY () ); }
410 double Get_XMin (
void)
const {
return( Get_System().Get_XMin () ); }
411 double Get_YMin (
void)
const {
return( Get_System().Get_YMin () ); }
412 double Get_XMax (
void)
const {
return( Get_System().Get_XMax () ); }
413 double Get_YMax (
void)
const {
return( Get_System().Get_YMax () ); }
417 double Get_Length (
int i)
const {
return( Get_System().Get_Length (i) ); }
428 void Lock_Create (
void);
429 void Lock_Destroy (
void);
431 bool is_Locked (
int x,
int y) {
return( Lock_Get(x, y) != 0 ); }
432 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 ); }
436 if( m_pLock && x >= 0 && x < Get_NX() && y >= 0 && y < Get_NY() )
438 m_pLock->Set_Value(x, y, Value);
487 #define TOOL_INTERACTIVE_KEY_LEFT 0x01
488 #define TOOL_INTERACTIVE_KEY_MIDDLE 0x02
489 #define TOOL_INTERACTIVE_KEY_RIGHT 0x04
490 #define TOOL_INTERACTIVE_KEY_SHIFT 0x08
491 #define TOOL_INTERACTIVE_KEY_ALT 0x10
492 #define TOOL_INTERACTIVE_KEY_CTRL 0x20
542 int m_Keys, m_Drag_Mode;
605 bool Get_Grid_Pos (
int &x,
int &y)
const;
607 int Get_xGrid (
void)
const;
608 int Get_yGrid (
void)
const;
637 typedef CSG_Tool * (* TSG_PFNC_TLB_Create_Tool) (
int i);
652 int Get_Count (
void);
655 CSG_Tool * Create_Tool (
int i,
bool bWithGUI =
false,
bool bWithCMD =
true);
657 bool Delete_Tools (
void);
671 #define SYMBOL_TLB_Initialize "TLB_Initialize"
674 #define SYMBOL_TLB_Finalize "TLB_Finalize"
677 #define SYMBOL_TLB_Get_Interface "TLB_Get_Interface"
681 #define TLB_INTERFACE_SKIP_TOOL ((CSG_Tool *)0x1)
684 #define TLB_INTERFACE_ESTABLISH CSG_Tool_Library_Interface TLB_Interface;\
686 extern "C" _SAGA_DLL_EXPORT CSG_Tool_Library_Interface * TLB_Get_Interface (void)\
688 return( &TLB_Interface );\
692 #define TLB_INTERFACE_INITIALIZE extern "C" _SAGA_DLL_EXPORT bool TLB_Initialize(const SG_Char *TLB_Path)\
694 return( TLB_Interface.Create(SAGA_VERSION, TLB_Path, Get_Info, Create_Tool) );\
698 #define TLB_INTERFACE_FINALIZE extern "C" _SAGA_DLL_EXPORT bool TLB_Finalize (void)\
704 #define TLB_INTERFACE TLB_INTERFACE_ESTABLISH TLB_INTERFACE_INITIALIZE TLB_INTERFACE_FINALIZE
711 #endif // #ifdef SWIG
721 #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)