SAGA API  v9.2
api_callback.cpp
Go to the documentation of this file.
1 
3 // //
4 // SAGA //
5 // //
6 // System for Automated Geoscientific Analyses //
7 // //
8 // Application Programming Interface //
9 // //
10 // Library: SAGA_API //
11 // //
12 //-------------------------------------------------------//
13 // //
14 // api_callback.cpp //
15 // //
16 // Copyright (C) 2005 by Olaf Conrad //
17 // //
18 //-------------------------------------------------------//
19 // //
20 // This file is part of 'SAGA - System for Automated //
21 // Geoscientific Analyses'. //
22 // //
23 // This library is free software; you can redistribute //
24 // it and/or modify it under the terms of the GNU Lesser //
25 // General Public License as published by the Free //
26 // Software Foundation, either version 2.1 of the //
27 // License, or (at your option) any later version. //
28 // //
29 // This library is distributed in the hope that it will //
30 // be useful, but WITHOUT ANY WARRANTY; without even the //
31 // implied warranty of MERCHANTABILITY or FITNESS FOR A //
32 // PARTICULAR PURPOSE. See the GNU Lesser General Public //
33 // License for more details. //
34 // //
35 // You should have received a copy of the GNU Lesser //
36 // General Public License along with this program; if //
37 // not, see <http://www.gnu.org/licenses/>. //
38 // //
39 //-------------------------------------------------------//
40 // //
41 // contact: Olaf Conrad //
42 // Institute of Geography //
43 // University of Goettingen //
44 // Goldschmidtstr. 5 //
45 // 37077 Goettingen //
46 // Germany //
47 // //
48 // e-mail: oconrad@saga-gis.org //
49 // //
51 
52 //---------------------------------------------------------
53 #include <wx/stdpaths.h>
54 
55 #include "api_core.h"
56 #include "grid.h"
57 #include "parameters.h"
58 
59 
61 // //
62 // //
63 // //
65 
66 //---------------------------------------------------------
67 #ifdef _SAGA_MSW
68 static bool gSG_UI_Console_bUTF8 = false;
69 #else
70 static bool gSG_UI_Console_bUTF8 = true;
71 #endif
72 
75 
76 //---------------------------------------------------------
77 void SG_UI_Console_Print_StdOut(const char *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdOut(CSG_String(Text), End, bFlush); }
78 void SG_UI_Console_Print_StdOut(const wchar_t *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdOut(CSG_String(Text), End, bFlush); }
79 void SG_UI_Console_Print_StdOut(const CSG_String &Text, SG_Char End, bool bFlush)
80 {
82  {
83  printf("%s", Text.to_UTF8 ().Get_Data());
84  }
85  else
86  {
87  printf("%s", Text.to_ASCII().Get_Data());
88  }
89 
90  if( End )
91  {
92  printf("%c", End);
93  }
94 
95  if( bFlush )
96  {
97  fflush(stdout);
98  }
99 }
100 
101 //---------------------------------------------------------
102 void SG_UI_Console_Print_StdErr(const char *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdErr(CSG_String(Text), End, bFlush); }
103 void SG_UI_Console_Print_StdErr(const wchar_t *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdErr(CSG_String(Text), End, bFlush); }
104 void SG_UI_Console_Print_StdErr(const CSG_String &Text, SG_Char End, bool bFlush)
105 {
107  {
108  fprintf(stderr, "%s", Text.to_UTF8 ().Get_Data());
109  }
110  else
111  {
112  fprintf(stderr, "%s", Text.to_ASCII().Get_Data());
113  }
114 
115  if( End )
116  {
117  printf("%c", End);
118  }
119 
120  if( bFlush )
121  {
122  fflush(stderr);
123  }
124 }
125 
126 
128 // //
129 // //
130 // //
132 
133 //---------------------------------------------------------
135 
136 //---------------------------------------------------------
138 {
139  gSG_UI_Callback = Function;
140 
141  return( true );
142 }
143 
144 //---------------------------------------------------------
146 {
147  return( gSG_UI_Callback );
148 }
149 
150 
152 // //
153 // //
154 // //
156 
158 {
159  Boolean = Copy.Boolean;
160  Number = Copy.Number ;
161  Pointer = Copy.Pointer;
162  String = Copy.String ;
163 }
164 
165 
167 // //
168 // //
169 // //
171 
172 //---------------------------------------------------------
174 
175 //---------------------------------------------------------
176 int SG_UI_Progress_Lock(bool bOn)
177 {
178  if( bOn )
179  {
181  }
182  else if( gSG_UI_Progress_Lock > 0 )
183  {
185  }
186 
187  return( gSG_UI_Progress_Lock );
188 }
189 
190 //---------------------------------------------------------
192 {
193  int Locked = gSG_UI_Progress_Lock;
194 
196 
197  return( Locked );
198 }
199 
200 //---------------------------------------------------------
201 bool SG_UI_Process_Get_Okay(bool bBlink)
202 {
203  if( gSG_UI_Callback )
204  {
205  CSG_UI_Parameter p1(gSG_UI_Progress_Lock == 0 && bBlink), p2;
206 
207  return( gSG_UI_Callback(CALLBACK_PROCESS_GET_OKAY, p1, p2) != 0 );
208  }
209 
210  if( gSG_UI_Progress_Lock == 0 && bBlink )
211  {
212  static int iBuisy = 0; static const SG_Char Buisy[4] = { '|', '/', '-', '\\' };
213 
214  SG_UI_Console_Print_StdOut(CSG_String::Format("\r%c", Buisy[iBuisy++]), '\0', true);
215 
216  iBuisy %= 4;
217  }
218 
219  return( true );
220 }
221 
222 //---------------------------------------------------------
223 bool SG_UI_Process_Set_Okay(bool bOkay)
224 {
226  {
227  CSG_UI_Parameter p1(bOkay), p2;
228 
229  return( gSG_UI_Callback(CALLBACK_PROCESS_SET_OKAY, p1, p2) != 0 );
230  }
231 
232  return( true );
233 }
234 
235 //---------------------------------------------------------
236 bool SG_UI_Process_Set_Busy(bool bOn, const CSG_String &Message)
237 {
238  if( gSG_UI_Callback )
239  {
240  CSG_UI_Parameter p1(bOn), p2(Message);
241 
242  return( gSG_UI_Callback(CALLBACK_PROCESS_SET_BUSY, p1, p2) != 0 );
243  }
244 
245  return( true );
246 }
247 
248 //---------------------------------------------------------
249 bool SG_UI_Process_Set_Progress(int Position, int Range)
250 {
251  return( SG_UI_Process_Set_Progress((double)Position, (double)Range) );
252 }
253 
254 //---------------------------------------------------------
256 {
257  return( SG_UI_Process_Set_Progress((double)Position, (double)Range) );
258 }
259 
260 //---------------------------------------------------------
261 bool SG_UI_Process_Set_Progress(double Position, double Range)
262 {
263  if( gSG_UI_Progress_Lock > 0 )
264  {
265  return( SG_UI_Process_Get_Okay() );
266  }
267 
268  if( gSG_UI_Callback )
269  {
270  CSG_UI_Parameter p1(Position), p2(Range);
271 
272  return( gSG_UI_Callback(CALLBACK_PROCESS_SET_PROGRESS, p1, p2) != 0 );
273  }
274 
275  //-----------------------------------------------------
276  static int Progress = -1;
277 
278  int i = Position < 0. ? -1 : Range > 0. ? 1 + (int)(100. * Position / Range) : 100;
279 
280  if( Progress != i )
281  {
282  if( Progress < 0 || i < Progress )
283  {
284  SG_UI_Console_Print_StdOut("", '\n', true);
285  }
286 
287  Progress = i;
288 
289  if( Progress >= 0 )
290  {
291  SG_UI_Console_Print_StdOut(CSG_String::Format("\r%3d%%", Progress > 100 ? 100 : Progress), '\0', true);
292  }
293  }
294 
295  return( true );
296 }
297 
298 //---------------------------------------------------------
300 {
301  if( gSG_UI_Callback )
302  {
303  if( gSG_UI_Progress_Lock == 0 )
304  {
305  CSG_UI_Parameter p1, p2;
306 
307  return( gSG_UI_Callback(CALLBACK_PROCESS_SET_READY, p1, p2) != 0 );
308  }
309  }
310 
312 
313  return( true );
314 }
315 
316 //---------------------------------------------------------
318 {
319  if( gSG_UI_Progress_Lock == 0 )
320  {
321  if( gSG_UI_Callback )
322  {
323  CSG_UI_Parameter p1(Text), p2;
324 
326  }
327  else
328  {
329  SG_UI_Console_Print_StdOut(Text, '\n', true);
330  }
331  }
332 }
333 
334 
336 // //
337 // //
338 // //
340 
341 //---------------------------------------------------------
342 bool SG_UI_Stop_Execution(bool bDialog)
343 {
344  if( gSG_UI_Callback )
345  {
346  CSG_UI_Parameter p1(bDialog), p2;
347 
348  return( gSG_UI_Callback(CALLBACK_STOP_EXECUTION, p1, p2) != 0 );
349  }
350 
351  return( false );
352 }
353 
354 
356 // //
357 // //
358 // //
360 
361 //---------------------------------------------------------
362 void SG_UI_Dlg_Message(const CSG_String &Message, const CSG_String &Caption)
363 {
364  if( gSG_UI_Progress_Lock == 0 )
365  {
366  if( gSG_UI_Callback )
367  {
368  CSG_UI_Parameter p1(Message), p2(Caption);
369 
371  }
372  else
373  {
374  SG_UI_Console_Print_StdOut(CSG_String::Format("%s: %s", Caption.c_str(), Message.c_str()), '\n', true);
375  }
376  }
377 }
378 
379 //---------------------------------------------------------
380 bool SG_UI_Dlg_Continue(const CSG_String &Message, const CSG_String &Caption)
381 {
382  if( gSG_UI_Progress_Lock == 0 )
383  {
384  if( gSG_UI_Callback )
385  {
386  CSG_UI_Parameter p1(Message), p2(Caption);
387 
388  return( gSG_UI_Callback(CALLBACK_DLG_CONTINUE, p1, p2) != 0 );
389  }
390  }
391 
392  return( true );
393 }
394 
395 //---------------------------------------------------------
396 int SG_UI_Dlg_Error(const CSG_String &Message, const CSG_String &Caption)
397 {
398  if( gSG_UI_Progress_Lock != 0 )
399  {
400  SG_UI_Msg_Add_Error(Caption);
401  SG_UI_Msg_Add_Error(Message);
402 
403  return( 0 );
404  }
405 
406  if( gSG_UI_Callback )
407  {
408  CSG_UI_Parameter p1(Message), p2(Caption);
409 
410  return( gSG_UI_Callback(CALLBACK_DLG_ERROR, p1, p2) );
411  }
412 
413  return( 0 );
414 }
415 
416 //---------------------------------------------------------
417 void SG_UI_Dlg_Info(const CSG_String &Message, const CSG_String &Caption)
418 {
419  if( gSG_UI_Progress_Lock == 0 )
420  {
421  if( gSG_UI_Callback )
422  {
423  CSG_UI_Parameter p1(Message), p2(Caption);
424 
426  }
427  else
428  {
429  SG_UI_Console_Print_StdOut(CSG_String::Format("%s: %s", Caption.c_str(), Message.c_str()), '\n', true);
430  }
431  }
432 }
433 
434 
436 // //
437 // //
438 // //
440 
441 //---------------------------------------------------------
442 bool SG_UI_Dlg_Parameters(CSG_Parameters *pParameters, const CSG_String &Caption)
443 {
444  if( gSG_UI_Callback && pParameters )
445  {
446  CSG_UI_Parameter p1(pParameters), p2(Caption);
447 
448  return( gSG_UI_Callback(CALLBACK_DLG_PARAMETERS, p1, p2) != 0 );
449  }
450 
451  return( true );
452 }
453 
454 
456 // //
457 // //
458 // //
460 
461 //---------------------------------------------------------
463 
464 //---------------------------------------------------------
465 int SG_UI_Msg_Lock(bool bOn)
466 {
467  if( bOn )
468  {
469  gSG_UI_Msg_Lock++;
470  }
471  else if( gSG_UI_Msg_Lock > 0 )
472  {
473  gSG_UI_Msg_Lock--;
474  }
475 
476  return( gSG_UI_Msg_Lock );
477 }
478 
479 //---------------------------------------------------------
481 {
482  int Locked = gSG_UI_Msg_Lock;
483 
484  gSG_UI_Msg_Lock = 0;
485 
486  return( Locked );
487 }
488 
489 //---------------------------------------------------------
490 void SG_UI_Msg_Add(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style) { SG_UI_Msg_Add(CSG_String(Message), bNewLine, Style); }
491 void SG_UI_Msg_Add(const wchar_t *Message, bool bNewLine, TSG_UI_MSG_STYLE Style) { SG_UI_Msg_Add(CSG_String(Message), bNewLine, Style); }
492 void SG_UI_Msg_Add(const CSG_String &Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
493 {
494  if( !gSG_UI_Msg_Lock )
495  {
496  if( gSG_UI_Callback )
497  {
498  int Flags[2]; Flags[0] = bNewLine ? 1 : 0; Flags[1] = Style;
499 
500  CSG_UI_Parameter p1(Message), p2(Flags);
501 
503  }
504  else
505  {
506  if( bNewLine )
507  {
509  }
510 
511  SG_UI_Console_Print_StdOut(Message, '\0', true);
512  }
513  }
514 }
515 
516 //---------------------------------------------------------
517 void SG_UI_Msg_Add_Execution(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style) { SG_UI_Msg_Add_Execution(CSG_String(Message), bNewLine, Style); }
518 void SG_UI_Msg_Add_Execution(const wchar_t *Message, bool bNewLine, TSG_UI_MSG_STYLE Style) { SG_UI_Msg_Add_Execution(CSG_String(Message), bNewLine, Style); }
519 void SG_UI_Msg_Add_Execution(const CSG_String &Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
520 {
521  if( !gSG_UI_Msg_Lock )
522  {
523  if( gSG_UI_Callback )
524  {
525  int Flags[2]; Flags[0] = bNewLine ? 1 : 0; Flags[1] = Style;
526 
527  CSG_UI_Parameter p1(Message), p2(Flags);
528 
530  }
531  else
532  {
533  if( bNewLine )
534  {
536  }
537 
538  SG_UI_Console_Print_StdOut(Message, '\0', true);
539  }
540  }
541 }
542 
543 //---------------------------------------------------------
544 void SG_UI_Msg_Add_Error(const char *Message) { SG_UI_Msg_Add_Error(CSG_String(Message)); }
545 void SG_UI_Msg_Add_Error(const wchar_t *Message) { SG_UI_Msg_Add_Error(CSG_String(Message)); }
546 void SG_UI_Msg_Add_Error(const CSG_String &Message)
547 {
548  if( !gSG_UI_Msg_Lock )
549  {
550  if( gSG_UI_Callback )
551  {
552  CSG_UI_Parameter p1(Message), p2;
553 
555  }
556  else
557  {
558  SG_UI_Console_Print_StdErr(CSG_String::Format("\n[%s] %s", _TL("Error"), Message.c_str()), '\0', true);
559  }
560  }
561 }
562 
563 //---------------------------------------------------------
564 void SG_UI_Msg_Flush(void)
565 {
566  fflush(stdout);
567  fflush(stderr);
568 }
569 
571 // //
572 // //
573 // //
575 
576 //---------------------------------------------------------
578 {
579  SG_UI_Progress_Lock(bOn);
580  SG_UI_Msg_Lock (bOn);
581 }
582 
583 //---------------------------------------------------------
585 {
587  SG_UI_Msg_Reset ();
588 }
589 
590 
592 // //
593 // //
594 // //
596 
597 //---------------------------------------------------------
598 bool SG_UI_DataObject_Add(CSG_Data_Object *pDataObject, int Show)
599 {
600  if( gSG_UI_Callback && pDataObject )
601  {
602  CSG_UI_Parameter p1(pDataObject), p2(Show ? true : false);
603 
604  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_ADD, p1, p2) != 0 );
605  }
606 
607  return( false );
608 }
609 
610 //---------------------------------------------------------
611 bool SG_UI_DataObject_Update(CSG_Data_Object *pDataObject, int Show, CSG_Parameters *pParameters)
612 {
613  if( gSG_UI_Callback && pDataObject )
614  {
615  CSG_UI_Parameter p1(pDataObject->Get_Owner() ? pDataObject->Get_Owner() : pDataObject), p2(pParameters);
616 
617  if( gSG_UI_Callback(CALLBACK_DATAOBJECT_UPDATE, p1, p2) != 0 )
618  {
619  if( Show != SG_UI_DATAOBJECT_UPDATE )
620  {
621  SG_UI_DataObject_Show(pDataObject, Show);
622  }
623 
624  return( true );
625  }
626  }
627 
628  return( false );
629 }
630 
631 //---------------------------------------------------------
632 bool SG_UI_DataObject_Show(CSG_Data_Object *pDataObject, int Show)
633 {
634  if( gSG_UI_Callback && pDataObject )
635  {
636  CSG_UI_Parameter p1(pDataObject), p2(Show);
637 
638  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_SHOW, p1, p2) != 0 );
639  }
640 
641  return( false );
642 }
643 
644 //---------------------------------------------------------
646 {
647  if( gSG_UI_Callback && pDataObject )
648  {
649  CSG_UI_Parameter p1(pDataObject), p2(pGrid);
650 
651  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_ASIMAGE, p1, p2) != 0 );
652  }
653 
654  return( false );
655 }
656 
657 //---------------------------------------------------------
659 {
660  if( gSG_UI_Callback && pDataObject && pColors )
661  {
662  CSG_UI_Parameter p1(pDataObject), p2(pColors);
663 
664  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_COLORS_GET, p1, p2) != 0 );
665  }
666 
667  return( false );
668 }
669 
670 //---------------------------------------------------------
672 {
673  if( gSG_UI_Progress_Lock == 0 && gSG_UI_Callback && pDataObject && pColors )
674  {
675  CSG_UI_Parameter p1(pDataObject), p2(pColors);
676 
677  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_COLORS_SET, p1, p2) != 0 );
678  }
679 
680  return( false );
681 }
682 
683 //---------------------------------------------------------
685 {
686  if( gSG_UI_Callback && pDataObject && pParameters )
687  {
688  CSG_UI_Parameter p1(pDataObject), p2(pParameters);
689 
690  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_PARAMS_GET, p1, p2) != 0 );
691  }
692 
693  return( false );
694 }
695 
696 //---------------------------------------------------------
698 {
699  if( gSG_UI_Progress_Lock == 0 && gSG_UI_Callback && pDataObject && pParameters )
700  {
701  CSG_UI_Parameter p1(pDataObject), p2(pParameters);
702 
703  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_PARAMS_SET, p1, p2) != 0 );
704  }
705 
706  return( false );
707 }
708 
709 //---------------------------------------------------------
710 bool SG_UI_Set_Map_Extent (double xMin, double yMin, double xMax, double yMax, int Maps)
711 {
712  if( gSG_UI_Callback )
713  {
714  CSG_Rect r(xMin, yMin, xMax, yMax); CSG_UI_Parameter p1(&r), p2(Maps);
715 
716  return( gSG_UI_Callback(CALLBACK_SET_MAP_EXTENT, p1, p2) != 0 );
717  }
718 
719  return( false );
720 }
721 
722 //---------------------------------------------------------
723 bool SG_UI_Diagram_Show (class CSG_Table *pTable, class CSG_Parameters *pParameters)
724 {
726  {
727  CSG_UI_Parameter p1(pTable), p2(pParameters);
728 
729  return( gSG_UI_Callback(CALLBACK_DIAGRAM_SHOW, p1, p2) != 0 );
730  }
731 
732  return( false );
733 }
734 
735 //---------------------------------------------------------
736 bool SG_UI_ODBC_Update (const CSG_String &Server)
737 {
738  if( gSG_UI_Callback )
739  {
740  CSG_UI_Parameter p1(Server), p2;
741 
742  return( gSG_UI_Callback(CALLBACK_DATABASE_UPDATE, p1, p2) != 0 );
743  }
744 
745  return( false );
746 }
747 
748 
750 // //
751 // //
752 // //
754 
755 //---------------------------------------------------------
756 int SG_UI_Window_Arrange (int Arrange)
757 {
758  if( gSG_UI_Callback )
759  {
760  CSG_UI_Parameter p1, p2;
761 
763 
764  return( 1 );
765  }
766 
767  return( 0 );
768 }
769 
770 //---------------------------------------------------------
772 {
773  if( gSG_UI_Callback )
774  {
775  CSG_UI_Parameter p1, p2;
776 
778 
779  return( p1.Pointer );
780  }
781 
782  return( NULL );
783 }
784 
785 //---------------------------------------------------------
787 {
788  CSG_String App_Path(wxStandardPaths::Get().GetExecutablePath().wc_str());
789 
790  if( bPathOnly )
791  {
792  App_Path = SG_File_Get_Path(App_Path);
793  }
794 
795  return( SG_File_Get_Path_Absolute(App_Path) );
796 }
797 
798 
800 // //
801 // //
802 // //
804 
805 //---------------------------------------------------------
gSG_UI_Progress_Lock
int gSG_UI_Progress_Lock
Definition: api_callback.cpp:173
CSG_Rect
Definition: geo_tools.h:471
SG_File_Get_Path
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path(const CSG_String &full_Path)
Definition: api_file.cpp:875
gSG_UI_Msg_Lock
int gSG_UI_Msg_Lock
Definition: api_callback.cpp:462
CALLBACK_DLG_CONTINUE
@ CALLBACK_DLG_CONTINUE
Definition: api_core.h:1554
CALLBACK_PROCESS_SET_BUSY
@ CALLBACK_PROCESS_SET_BUSY
Definition: api_core.h:1546
_TL
#define _TL(s)
Definition: api_core.h:1480
SG_UI_DataObject_Params_Set
bool SG_UI_DataObject_Params_Set(CSG_Data_Object *pDataObject, CSG_Parameters *pParameters)
Definition: api_callback.cpp:697
CSG_String::to_ASCII
bool to_ASCII(char **pString, char Replace='_') const
Definition: api_string.cpp:909
CALLBACK_DATAOBJECT_COLORS_GET
@ CALLBACK_DATAOBJECT_COLORS_GET
Definition: api_core.h:1569
SG_UI_Msg_Reset
int SG_UI_Msg_Reset(void)
Definition: api_callback.cpp:480
CSG_UI_Parameter::CSG_UI_Parameter
CSG_UI_Parameter(void)
Definition: api_core.h:1591
SG_UI_Dlg_Continue
bool SG_UI_Dlg_Continue(const CSG_String &Message, const CSG_String &Caption)
Definition: api_callback.cpp:380
SG_Set_UI_Callback
bool SG_Set_UI_Callback(TSG_PFNC_UI_Callback Function)
Definition: api_callback.cpp:137
CALLBACK_STOP_EXECUTION
@ CALLBACK_STOP_EXECUTION
Definition: api_core.h:1551
CALLBACK_DIAGRAM_SHOW
@ CALLBACK_DIAGRAM_SHOW
Definition: api_core.h:1576
gSG_UI_Callback
TSG_PFNC_UI_Callback gSG_UI_Callback
Definition: api_callback.cpp:134
CALLBACK_DLG_INFO
@ CALLBACK_DLG_INFO
Definition: api_core.h:1556
CALLBACK_DATABASE_UPDATE
@ CALLBACK_DATABASE_UPDATE
Definition: api_core.h:1578
SG_UI_Msg_Add_Execution
void SG_UI_Msg_Add_Execution(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
Definition: api_callback.cpp:517
SG_UI_Process_Get_Okay
bool SG_UI_Process_Get_Okay(bool bBlink)
Definition: api_callback.cpp:201
SG_UI_ProgressAndMsg_Reset
void SG_UI_ProgressAndMsg_Reset(void)
Definition: api_callback.cpp:584
SG_UI_Process_Set_Okay
bool SG_UI_Process_Set_Okay(bool bOkay)
Definition: api_callback.cpp:223
SG_UI_Console_Print_StdOut
void SG_UI_Console_Print_StdOut(const char *Text, SG_Char End, bool bFlush)
Definition: api_callback.cpp:77
SG_UI_Stop_Execution
bool SG_UI_Stop_Execution(bool bDialog)
Definition: api_callback.cpp:342
grid.h
CALLBACK_PROCESS_SET_OKAY
@ CALLBACK_PROCESS_SET_OKAY
Definition: api_core.h:1545
api_core.h
CALLBACK_PROCESS_SET_PROGRESS
@ CALLBACK_PROCESS_SET_PROGRESS
Definition: api_core.h:1547
SG_UI_Get_Application_Path
CSG_String SG_UI_Get_Application_Path(bool bPathOnly)
Definition: api_callback.cpp:786
CSG_UI_Parameter::String
CSG_String String
Definition: api_core.h:1605
SG_UI_DataObject_Show
bool SG_UI_DataObject_Show(CSG_Data_Object *pDataObject, int Show)
Definition: api_callback.cpp:632
SG_Get_UI_Callback
TSG_PFNC_UI_Callback SG_Get_UI_Callback(void)
Definition: api_callback.cpp:145
SG_UI_Progress_Reset
int SG_UI_Progress_Reset(void)
Definition: api_callback.cpp:191
CSG_Data_Object::Get_Owner
CSG_Data_Object * Get_Owner(void) const
Definition: dataobject.h:222
SG_UI_Set_Map_Extent
bool SG_UI_Set_Map_Extent(double xMin, double yMin, double xMax, double yMax, int Maps)
Definition: api_callback.cpp:710
SG_UI_DATAOBJECT_UPDATE
@ SG_UI_DATAOBJECT_UPDATE
Definition: api_core.h:1509
TSG_PFNC_UI_Callback
int(* TSG_PFNC_UI_Callback)(TSG_UI_Callback_ID ID, CSG_UI_Parameter &Param_1, CSG_UI_Parameter &Param_2)
Definition: api_core.h:1610
SG_UI_ODBC_Update
bool SG_UI_ODBC_Update(const CSG_String &Server)
Definition: api_callback.cpp:736
SG_UI_Dlg_Message
void SG_UI_Dlg_Message(const CSG_String &Message, const CSG_String &Caption)
Definition: api_callback.cpp:362
CSG_Data_Object
Definition: dataobject.h:180
SG_UI_Dlg_Info
void SG_UI_Dlg_Info(const CSG_String &Message, const CSG_String &Caption)
Definition: api_callback.cpp:417
CALLBACK_SET_MAP_EXTENT
@ CALLBACK_SET_MAP_EXTENT
Definition: api_core.h:1574
SG_UI_Process_Set_Busy
bool SG_UI_Process_Set_Busy(bool bOn, const CSG_String &Message)
Definition: api_callback.cpp:236
SG_UI_Console_Set_UTF8
void SG_UI_Console_Set_UTF8(bool bOn)
Definition: api_callback.cpp:73
CALLBACK_DATAOBJECT_UPDATE
@ CALLBACK_DATAOBJECT_UPDATE
Definition: api_core.h:1565
CALLBACK_DLG_PARAMETERS
@ CALLBACK_DLG_PARAMETERS
Definition: api_core.h:1558
CALLBACK_PROCESS_SET_READY
@ CALLBACK_PROCESS_SET_READY
Definition: api_core.h:1548
SG_UI_Msg_Lock
int SG_UI_Msg_Lock(bool bOn)
Definition: api_callback.cpp:465
SG_UI_Dlg_Parameters
bool SG_UI_Dlg_Parameters(CSG_Parameters *pParameters, const CSG_String &Caption)
Definition: api_callback.cpp:442
SG_UI_DataObject_Update
bool SG_UI_DataObject_Update(CSG_Data_Object *pDataObject, int Show, CSG_Parameters *pParameters)
Definition: api_callback.cpp:611
CALLBACK_DATAOBJECT_ADD
@ CALLBACK_DATAOBJECT_ADD
Definition: api_core.h:1564
sLong
signed long long sLong
Definition: api_core.h:158
CALLBACK_DATAOBJECT_SHOW
@ CALLBACK_DATAOBJECT_SHOW
Definition: api_core.h:1566
CSG_UI_Parameter::Number
double Number
Definition: api_core.h:1601
SG_UI_DataObject_Add
bool SG_UI_DataObject_Add(CSG_Data_Object *pDataObject, int Show)
Definition: api_callback.cpp:598
SG_UI_DataObject_Colors_Set
bool SG_UI_DataObject_Colors_Set(CSG_Data_Object *pDataObject, CSG_Colors *pColors)
Definition: api_callback.cpp:671
SG_UI_Process_Set_Text
void SG_UI_Process_Set_Text(const CSG_String &Text)
Definition: api_callback.cpp:317
CALLBACK_DATAOBJECT_PARAMS_SET
@ CALLBACK_DATAOBJECT_PARAMS_SET
Definition: api_core.h:1572
SG_UI_Progress_Lock
int SG_UI_Progress_Lock(bool bOn)
Definition: api_callback.cpp:176
CALLBACK_DLG_ERROR
@ CALLBACK_DLG_ERROR
Definition: api_core.h:1555
CSG_UI_Parameter::Pointer
void * Pointer
Definition: api_core.h:1603
CALLBACK_MESSAGE_ADD_EXECUTION
@ CALLBACK_MESSAGE_ADD_EXECUTION
Definition: api_core.h:1562
CALLBACK_PROCESS_SET_TEXT
@ CALLBACK_PROCESS_SET_TEXT
Definition: api_core.h:1549
CSG_UI_Parameter
Definition: api_core.h:1589
parameters.h
CSG_String::Format
static CSG_String Format(const char *Format,...)
Definition: api_string.cpp:270
SG_UI_DataObject_Colors_Get
bool SG_UI_DataObject_Colors_Get(CSG_Data_Object *pDataObject, CSG_Colors *pColors)
Definition: api_callback.cpp:658
CSG_Table
Definition: table.h:283
CALLBACK_MESSAGE_ADD_ERROR
@ CALLBACK_MESSAGE_ADD_ERROR
Definition: api_core.h:1561
SG_UI_Dlg_Error
int SG_UI_Dlg_Error(const CSG_String &Message, const CSG_String &Caption)
Definition: api_callback.cpp:396
CSG_String::to_UTF8
size_t to_UTF8(char **pString) const
Definition: api_string.cpp:813
SG_File_Get_Path_Absolute
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path_Absolute(const CSG_String &full_Path)
Definition: api_file.cpp:883
SG_UI_DataObject_Params_Get
bool SG_UI_DataObject_Params_Get(CSG_Data_Object *pDataObject, CSG_Parameters *pParameters)
Definition: api_callback.cpp:684
SG_Char
#define SG_Char
Definition: api_core.h:530
CSG_String
Definition: api_core.h:557
CALLBACK_GET_APP_WINDOW
@ CALLBACK_GET_APP_WINDOW
Definition: api_core.h:1582
SG_UI_Process_Set_Progress
bool SG_UI_Process_Set_Progress(int Position, int Range)
Definition: api_callback.cpp:249
CALLBACK_WINDOW_ARRANGE
@ CALLBACK_WINDOW_ARRANGE
Definition: api_core.h:1580
CALLBACK_MESSAGE_ADD
@ CALLBACK_MESSAGE_ADD
Definition: api_core.h:1560
SG_UI_Console_Get_UTF8
bool SG_UI_Console_Get_UTF8(void)
Definition: api_callback.cpp:74
CSG_Grid
Definition: grid.h:473
SG_UI_Diagram_Show
bool SG_UI_Diagram_Show(class CSG_Table *pTable, class CSG_Parameters *pParameters)
Definition: api_callback.cpp:723
SG_UI_Window_Arrange
int SG_UI_Window_Arrange(int Arrange)
Definition: api_callback.cpp:756
CALLBACK_DATAOBJECT_PARAMS_GET
@ CALLBACK_DATAOBJECT_PARAMS_GET
Definition: api_core.h:1571
SG_UI_Get_Window_Main
void * SG_UI_Get_Window_Main(void)
Definition: api_callback.cpp:771
gSG_UI_Console_bUTF8
static bool gSG_UI_Console_bUTF8
Definition: api_callback.cpp:70
CALLBACK_PROCESS_GET_OKAY
@ CALLBACK_PROCESS_GET_OKAY
Definition: api_core.h:1544
SG_UI_DataObject_asImage
bool SG_UI_DataObject_asImage(CSG_Data_Object *pDataObject, CSG_Grid *pGrid)
Definition: api_callback.cpp:645
CALLBACK_DLG_MESSAGE
@ CALLBACK_DLG_MESSAGE
Definition: api_core.h:1553
SG_UI_ProgressAndMsg_Lock
void SG_UI_ProgressAndMsg_Lock(bool bOn)
Definition: api_callback.cpp:577
CSG_String::c_str
const SG_Char * c_str(void) const
Definition: api_string.cpp:236
SG_UI_Process_Set_Ready
bool SG_UI_Process_Set_Ready(void)
Definition: api_callback.cpp:299
TSG_UI_MSG_STYLE
TSG_UI_MSG_STYLE
Definition: api_core.h:1492
CSG_UI_Parameter::Boolean
bool Boolean
Definition: api_core.h:1599
CSG_Parameters
Definition: parameters.h:1650
SG_UI_Msg_Add_Error
void SG_UI_Msg_Add_Error(const char *Message)
Definition: api_callback.cpp:544
SG_UI_Msg_Flush
void SG_UI_Msg_Flush(void)
Definition: api_callback.cpp:564
SG_UI_Console_Print_StdErr
void SG_UI_Console_Print_StdErr(const char *Text, SG_Char End, bool bFlush)
Definition: api_callback.cpp:102
CALLBACK_DATAOBJECT_ASIMAGE
@ CALLBACK_DATAOBJECT_ASIMAGE
Definition: api_core.h:1567
CALLBACK_DATAOBJECT_COLORS_SET
@ CALLBACK_DATAOBJECT_COLORS_SET
Definition: api_core.h:1570
CSG_Colors
Definition: api_core.h:1329
SG_UI_Msg_Add
void SG_UI_Msg_Add(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
Definition: api_callback.cpp:490