SAGA API  v9.5
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 #include <wx/app.h>
55 
56 #include "api_core.h"
57 #include "grid.h"
58 #include "parameters.h"
59 
60 
62 // //
63 // //
64 // //
66 
67 //---------------------------------------------------------
68 #ifdef _SAGA_MSW
69 static bool gSG_UI_Console_bUTF8 = false;
70 #else
71 static bool gSG_UI_Console_bUTF8 = true;
72 #endif
73 
76 
77 //---------------------------------------------------------
78 void SG_UI_Console_Print_StdOut(const char *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdOut(CSG_String(Text), End, bFlush); }
79 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); }
80 void SG_UI_Console_Print_StdOut(const CSG_String &Text, SG_Char End, bool bFlush)
81 {
83  {
84  printf("%s", Text.to_UTF8 ().Get_Data());
85  }
86  else
87  {
88  printf("%s", Text.to_ASCII().Get_Data());
89  }
90 
91  if( End )
92  {
93  printf("%c", End);
94  }
95 
96  if( bFlush )
97  {
98  fflush(stdout);
99  }
100 }
101 
102 //---------------------------------------------------------
103 void SG_UI_Console_Print_StdErr(const char *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdErr(CSG_String(Text), End, bFlush); }
104 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); }
105 void SG_UI_Console_Print_StdErr(const CSG_String &Text, SG_Char End, bool bFlush)
106 {
108  {
109  fprintf(stderr, "%s", Text.to_UTF8 ().Get_Data());
110  }
111  else
112  {
113  fprintf(stderr, "%s", Text.to_ASCII().Get_Data());
114  }
115 
116  if( End )
117  {
118  printf("%c", End);
119  }
120 
121  if( bFlush )
122  {
123  fflush(stderr);
124  }
125 }
126 
127 
129 // //
130 // //
131 // //
133 
134 //---------------------------------------------------------
136 
137 //---------------------------------------------------------
139 {
140  gSG_UI_Callback = Function;
141 
142  return( true );
143 }
144 
145 //---------------------------------------------------------
147 {
148  return( gSG_UI_Callback );
149 }
150 
151 
153 // //
154 // //
155 // //
157 
159 {
160  Boolean = Copy.Boolean;
161  Number = Copy.Number ;
162  Pointer = Copy.Pointer;
163  String = Copy.String ;
164 }
165 
166 
168 // //
169 // //
170 // //
172 
173 //---------------------------------------------------------
175 
176 //---------------------------------------------------------
177 int SG_UI_Progress_Lock(bool bOn)
178 {
179  if( bOn )
180  {
182  }
183  else if( gSG_UI_Progress_Lock > 0 )
184  {
186  }
187 
188  return( gSG_UI_Progress_Lock );
189 }
190 
191 //---------------------------------------------------------
193 {
194  return( gSG_UI_Progress_Lock != 0 );
195 }
196 
197 //---------------------------------------------------------
199 {
200  int Locked = gSG_UI_Progress_Lock;
201 
203 
204  return( Locked );
205 }
206 
207 //---------------------------------------------------------
208 bool SG_UI_Process_Get_Okay(bool bBlink)
209 {
210  if( gSG_UI_Callback )
211  {
212  CSG_UI_Parameter p1(gSG_UI_Progress_Lock == 0 && bBlink), p2;
213 
214  return( gSG_UI_Callback(CALLBACK_PROCESS_GET_OKAY, p1, p2) != 0 );
215  }
216 
217  if( gSG_UI_Progress_Lock == 0 && bBlink )
218  {
219  static int iBuisy = 0; static const SG_Char Buisy[4] = { '|', '/', '-', '\\' };
220 
221  SG_UI_Console_Print_StdOut(CSG_String::Format("\r%c", Buisy[iBuisy++]), '\0', true);
222 
223  iBuisy %= 4;
224  }
225 
226  return( true );
227 }
228 
229 //---------------------------------------------------------
230 bool SG_UI_Process_Set_Okay(bool bOkay)
231 {
233  {
234  CSG_UI_Parameter p1(bOkay), p2;
235 
236  return( gSG_UI_Callback(CALLBACK_PROCESS_SET_OKAY, p1, p2) != 0 );
237  }
238 
239  return( true );
240 }
241 
242 //---------------------------------------------------------
243 bool SG_UI_Process_Set_Busy(bool bOn, const CSG_String &Message)
244 {
245  if( gSG_UI_Callback )
246  {
247  CSG_UI_Parameter p1(bOn), p2(Message);
248 
249  return( gSG_UI_Callback(CALLBACK_PROCESS_SET_BUSY, p1, p2) != 0 );
250  }
251 
252  return( true );
253 }
254 
255 //---------------------------------------------------------
256 bool SG_UI_Process_Set_Progress(int Position, int Range)
257 {
258  return( SG_UI_Process_Set_Progress((double)Position, (double)Range) );
259 }
260 
261 //---------------------------------------------------------
263 {
264  return( SG_UI_Process_Set_Progress((double)Position, (double)Range) );
265 }
266 
267 //---------------------------------------------------------
268 bool SG_UI_Process_Set_Progress(double Position, double Range)
269 {
270  if( gSG_UI_Progress_Lock > 0 )
271  {
272  return( SG_UI_Process_Get_Okay() );
273  }
274 
275  if( gSG_UI_Callback )
276  {
277  CSG_UI_Parameter p1(Position), p2(Range);
278 
279  return( gSG_UI_Callback(CALLBACK_PROCESS_SET_PROGRESS, p1, p2) != 0 );
280  }
281 
282  //-----------------------------------------------------
283  static int Progress = -1;
284 
285  int i = Position < 0. ? -1 : Range > 0. ? 1 + (int)(100. * Position / Range) : 100;
286 
287  if( Progress != i )
288  {
289  if( Progress < 0 || i < Progress )
290  {
291  SG_UI_Console_Print_StdOut("", '\n', true);
292  }
293 
294  Progress = i;
295 
296  if( Progress >= 0 )
297  {
298  SG_UI_Console_Print_StdOut(CSG_String::Format("\r%3d%%", Progress > 100 ? 100 : Progress), '\0', true);
299  }
300  }
301 
302  return( true );
303 }
304 
305 //---------------------------------------------------------
307 {
308  if( gSG_UI_Callback )
309  {
310  if( gSG_UI_Progress_Lock == 0 )
311  {
312  CSG_UI_Parameter p1, p2;
313 
314  return( gSG_UI_Callback(CALLBACK_PROCESS_SET_READY, p1, p2) != 0 );
315  }
316  }
317 
319 
320  return( true );
321 }
322 
323 //---------------------------------------------------------
325 {
326  if( gSG_UI_Progress_Lock == 0 )
327  {
328  if( gSG_UI_Callback )
329  {
330  CSG_UI_Parameter p1(Text), p2;
331 
333  }
334  else
335  {
336  SG_UI_Console_Print_StdOut(Text, '\n', true);
337  }
338  }
339 }
340 
341 
343 // //
344 // //
345 // //
347 
348 //---------------------------------------------------------
349 bool SG_UI_Stop_Execution(bool bDialog)
350 {
351  if( gSG_UI_Callback )
352  {
353  CSG_UI_Parameter p1(bDialog), p2;
354 
355  return( gSG_UI_Callback(CALLBACK_STOP_EXECUTION, p1, p2) != 0 );
356  }
357 
358  return( false );
359 }
360 
361 
363 // //
364 // //
365 // //
367 
368 //---------------------------------------------------------
369 void SG_UI_Dlg_Message(const CSG_String &Message, const CSG_String &Caption)
370 {
371  if( gSG_UI_Progress_Lock == 0 )
372  {
373  if( gSG_UI_Callback )
374  {
375  CSG_UI_Parameter p1(Message), p2(Caption);
376 
378  }
379  else
380  {
381  SG_UI_Console_Print_StdOut(CSG_String::Format("%s: %s", Caption.c_str(), Message.c_str()), '\n', true);
382  }
383  }
384 }
385 
386 //---------------------------------------------------------
387 bool SG_UI_Dlg_Continue(const CSG_String &Message, const CSG_String &Caption)
388 {
389  if( gSG_UI_Progress_Lock == 0 )
390  {
391  if( gSG_UI_Callback )
392  {
393  CSG_UI_Parameter p1(Message), p2(Caption);
394 
395  return( gSG_UI_Callback(CALLBACK_DLG_CONTINUE, p1, p2) != 0 );
396  }
397  }
398 
399  return( true );
400 }
401 
402 //---------------------------------------------------------
403 int SG_UI_Dlg_Error(const CSG_String &Message, const CSG_String &Caption)
404 {
405  if( gSG_UI_Progress_Lock != 0 )
406  {
407  SG_UI_Msg_Add_Error(Caption);
408  SG_UI_Msg_Add_Error(Message);
409 
410  return( 0 );
411  }
412 
413  if( gSG_UI_Callback )
414  {
415  CSG_UI_Parameter p1(Message), p2(Caption);
416 
417  return( gSG_UI_Callback(CALLBACK_DLG_ERROR, p1, p2) );
418  }
419 
420  return( 0 );
421 }
422 
423 //---------------------------------------------------------
424 void SG_UI_Dlg_Info(const CSG_String &Message, const CSG_String &Caption)
425 {
426  if( gSG_UI_Progress_Lock == 0 )
427  {
428  if( gSG_UI_Callback )
429  {
430  CSG_UI_Parameter p1(Message), p2(Caption);
431 
433  }
434  else
435  {
436  SG_UI_Console_Print_StdOut(CSG_String::Format("%s: %s", Caption.c_str(), Message.c_str()), '\n', true);
437  }
438  }
439 }
440 
441 
443 // //
444 // //
445 // //
447 
448 //---------------------------------------------------------
449 bool SG_UI_Dlg_Parameters(CSG_Parameters *pParameters, const CSG_String &Caption)
450 {
451  if( gSG_UI_Callback && pParameters )
452  {
453  CSG_UI_Parameter p1(pParameters), p2(Caption);
454 
455  return( gSG_UI_Callback(CALLBACK_DLG_PARAMETERS, p1, p2) != 0 );
456  }
457 
458  return( true );
459 }
460 
461 
463 // //
464 // //
465 // //
467 
468 //---------------------------------------------------------
470 
471 //---------------------------------------------------------
472 int SG_UI_Msg_Lock(bool bOn)
473 {
474  if( bOn )
475  {
476  gSG_UI_Msg_Lock++;
477  }
478  else if( gSG_UI_Msg_Lock > 0 )
479  {
480  gSG_UI_Msg_Lock--;
481  }
482 
483  return( gSG_UI_Msg_Lock );
484 }
485 
486 //---------------------------------------------------------
488 {
489  return( gSG_UI_Msg_Lock != 0 );
490 }
491 
492 //---------------------------------------------------------
494 {
495  int Locked = gSG_UI_Msg_Lock;
496 
497  gSG_UI_Msg_Lock = 0;
498 
499  return( Locked );
500 }
501 
502 //---------------------------------------------------------
503 void SG_UI_Msg_Add(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style) { SG_UI_Msg_Add(CSG_String(Message), bNewLine, Style); }
504 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); }
505 void SG_UI_Msg_Add(const CSG_String &Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
506 {
507  if( !gSG_UI_Msg_Lock )
508  {
509  if( gSG_UI_Callback )
510  {
511  int Flags[2]; Flags[0] = bNewLine ? 1 : 0; Flags[1] = Style;
512 
513  CSG_UI_Parameter p1(Message), p2(Flags);
514 
516  }
517  else
518  {
519  if( bNewLine )
520  {
522  }
523 
524  SG_UI_Console_Print_StdOut(Message, '\0', true);
525  }
526  }
527 }
528 
529 //---------------------------------------------------------
530 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); }
531 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); }
532 void SG_UI_Msg_Add_Execution(const CSG_String &Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
533 {
534  if( !gSG_UI_Msg_Lock )
535  {
536  if( gSG_UI_Callback )
537  {
538  int Flags[2]; Flags[0] = bNewLine ? 1 : 0; Flags[1] = Style;
539 
540  CSG_UI_Parameter p1(Message), p2(Flags);
541 
543  }
544  else
545  {
546  if( bNewLine )
547  {
549  }
550 
551  SG_UI_Console_Print_StdOut(Message, '\0', true);
552  }
553  }
554 }
555 
556 //---------------------------------------------------------
557 void SG_UI_Msg_Add_Error(const char *Message) { SG_UI_Msg_Add_Error(CSG_String(Message)); }
558 void SG_UI_Msg_Add_Error(const wchar_t *Message) { SG_UI_Msg_Add_Error(CSG_String(Message)); }
559 void SG_UI_Msg_Add_Error(const CSG_String &Message)
560 {
561  if( !gSG_UI_Msg_Lock )
562  {
563  if( gSG_UI_Callback )
564  {
565  CSG_UI_Parameter p1(Message), p2;
566 
568  }
569  else
570  {
571  SG_UI_Console_Print_StdErr(CSG_String::Format("\n[%s] %s", _TL("Error"), Message.c_str()), '\0', true);
572  }
573  }
574 }
575 
576 //---------------------------------------------------------
577 void SG_UI_Msg_Flush(void)
578 {
579  fflush(stdout);
580  fflush(stderr);
581 }
582 
584 // //
585 // //
586 // //
588 
589 //---------------------------------------------------------
591 {
592  SG_UI_Progress_Lock(bOn);
593  SG_UI_Msg_Lock (bOn);
594 }
595 
596 //---------------------------------------------------------
598 {
600  SG_UI_Msg_Reset ();
601 }
602 
603 
605 // //
606 // //
607 // //
609 
610 //---------------------------------------------------------
611 bool SG_UI_DataObject_Add(CSG_Data_Object *pDataObject, int Show)
612 {
613  if( gSG_UI_Callback && pDataObject )
614  {
615  CSG_UI_Parameter p1(pDataObject), p2(Show);
616 
617  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_ADD, p1, p2) != 0 );
618  }
619 
620  return( false );
621 }
622 
623 //---------------------------------------------------------
624 bool SG_UI_DataObject_Update(CSG_Data_Object *pDataObject, int Show, CSG_Parameters *pParameters)
625 {
626  if( gSG_UI_Callback && pDataObject )
627  {
628  CSG_UI_Parameter p1(pDataObject->Get_Owner() ? pDataObject->Get_Owner() : pDataObject), p2(pParameters);
629 
630  if( gSG_UI_Callback(CALLBACK_DATAOBJECT_UPDATE, p1, p2) != 0 )
631  {
632  if( Show != SG_UI_DATAOBJECT_UPDATE )
633  {
634  SG_UI_DataObject_Show(pDataObject, Show);
635  }
636 
637  return( true );
638  }
639  }
640 
641  return( false );
642 }
643 
644 //---------------------------------------------------------
645 bool SG_UI_DataObject_Show(CSG_Data_Object *pDataObject, int Show)
646 {
647  if( gSG_UI_Callback && pDataObject )
648  {
649  CSG_UI_Parameter p1(pDataObject), p2(Show);
650 
651  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_SHOW, p1, p2) != 0 );
652  }
653 
654  return( false );
655 }
656 
657 //---------------------------------------------------------
659 {
660  if( gSG_UI_Callback && pDataObject )
661  {
662  CSG_UI_Parameter p1(pDataObject), p2(pGrid);
663 
664  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_ASIMAGE, p1, p2) != 0 );
665  }
666 
667  return( false );
668 }
669 
670 //---------------------------------------------------------
672 {
673  if( gSG_UI_Callback && pDataObject && pColors )
674  {
675  CSG_UI_Parameter p1(pDataObject), p2(pColors);
676 
677  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_COLORS_GET, p1, p2) != 0 );
678  }
679 
680  return( false );
681 }
682 
683 //---------------------------------------------------------
685 {
686  if( gSG_UI_Progress_Lock == 0 && gSG_UI_Callback && pDataObject && pColors )
687  {
688  CSG_UI_Parameter p1(pDataObject), p2(pColors);
689 
690  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_COLORS_SET, p1, p2) != 0 );
691  }
692 
693  return( false );
694 }
695 
696 //---------------------------------------------------------
698 {
699  if( gSG_UI_Callback && pDataObject && pParameters )
700  {
701  CSG_UI_Parameter p1(pDataObject), p2(pParameters);
702 
703  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_PARAMS_GET, p1, p2) != 0 );
704  }
705 
706  return( false );
707 }
708 
709 //---------------------------------------------------------
711 {
712  if( gSG_UI_Progress_Lock == 0 && gSG_UI_Callback && pDataObject && pParameters )
713  {
714  CSG_UI_Parameter p1(pDataObject), p2(pParameters);
715 
716  return( gSG_UI_Callback(CALLBACK_DATAOBJECT_PARAMS_SET, p1, p2) != 0 );
717  }
718 
719  return( false );
720 }
721 
722 //---------------------------------------------------------
723 bool SG_UI_Set_Map_Extent (double xMin, double yMin, double xMax, double yMax, int Maps)
724 {
725  if( gSG_UI_Callback )
726  {
727  CSG_Rect r(xMin, yMin, xMax, yMax); CSG_UI_Parameter p1(&r), p2(Maps);
728 
729  return( gSG_UI_Callback(CALLBACK_SET_MAP_EXTENT, p1, p2) != 0 );
730  }
731 
732  return( false );
733 }
734 
735 //---------------------------------------------------------
736 bool SG_UI_Diagram_Show (class CSG_Table *pTable, class CSG_Parameters *pParameters)
737 {
739  {
740  CSG_UI_Parameter p1(pTable), p2(pParameters);
741 
742  return( gSG_UI_Callback(CALLBACK_DIAGRAM_SHOW, p1, p2) != 0 );
743  }
744 
745  return( false );
746 }
747 
748 //---------------------------------------------------------
749 bool SG_UI_ODBC_Update (const CSG_String &Server)
750 {
751  if( gSG_UI_Callback )
752  {
753  CSG_UI_Parameter p1(Server), p2;
754 
755  return( gSG_UI_Callback(CALLBACK_DATABASE_UPDATE, p1, p2) != 0 );
756  }
757 
758  return( false );
759 }
760 
761 
763 // //
764 // //
765 // //
767 
768 //---------------------------------------------------------
769 int SG_UI_Window_Arrange (int Arrange)
770 {
771  if( gSG_UI_Callback )
772  {
773  CSG_UI_Parameter p1, p2;
774 
776 
777  return( 1 );
778  }
779 
780  return( 0 );
781 }
782 
783 //---------------------------------------------------------
785 {
786  if( gSG_UI_Callback )
787  {
788  CSG_UI_Parameter p1, p2;
789 
791 
792  return( p1.Pointer );
793  }
794 
795  return( NULL );
796 }
797 
798 //---------------------------------------------------------
800 {
801  CSG_String App_Path(wxStandardPaths::Get().GetExecutablePath().wc_str());
802 
803  if( bPathOnly )
804  {
805  App_Path = SG_File_Get_Path(App_Path);
806  }
807 
808  return( SG_File_Get_Path_Absolute(App_Path) );
809 }
810 
811 //---------------------------------------------------------
813 {
814  return( wxApp::GetInstance()->GetAppName().wc_str() );
815 // return( SG_File_Get_Name(SG_UI_Get_Application_Path(false), false) );
816 }
817 
818 
820 // //
821 // //
822 // //
824 
825 //---------------------------------------------------------
gSG_UI_Progress_Lock
int gSG_UI_Progress_Lock
Definition: api_callback.cpp:174
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:891
gSG_UI_Msg_Lock
int gSG_UI_Msg_Lock
Definition: api_callback.cpp:469
CALLBACK_DLG_CONTINUE
@ CALLBACK_DLG_CONTINUE
Definition: api_core.h:1563
CALLBACK_PROCESS_SET_BUSY
@ CALLBACK_PROCESS_SET_BUSY
Definition: api_core.h:1555
_TL
#define _TL(s)
Definition: api_core.h:1489
SG_UI_DataObject_Params_Set
bool SG_UI_DataObject_Params_Set(CSG_Data_Object *pDataObject, CSG_Parameters *pParameters)
Definition: api_callback.cpp:710
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:1578
SG_UI_Msg_Reset
int SG_UI_Msg_Reset(void)
Definition: api_callback.cpp:493
CSG_UI_Parameter::CSG_UI_Parameter
CSG_UI_Parameter(void)
Definition: api_core.h:1600
SG_UI_Dlg_Continue
bool SG_UI_Dlg_Continue(const CSG_String &Message, const CSG_String &Caption)
Definition: api_callback.cpp:387
SG_Set_UI_Callback
bool SG_Set_UI_Callback(TSG_PFNC_UI_Callback Function)
Definition: api_callback.cpp:138
CALLBACK_STOP_EXECUTION
@ CALLBACK_STOP_EXECUTION
Definition: api_core.h:1560
CALLBACK_DIAGRAM_SHOW
@ CALLBACK_DIAGRAM_SHOW
Definition: api_core.h:1585
SG_UI_Get_Application_Name
CSG_String SG_UI_Get_Application_Name(void)
Definition: api_callback.cpp:812
gSG_UI_Callback
TSG_PFNC_UI_Callback gSG_UI_Callback
Definition: api_callback.cpp:135
CALLBACK_DLG_INFO
@ CALLBACK_DLG_INFO
Definition: api_core.h:1565
CALLBACK_DATABASE_UPDATE
@ CALLBACK_DATABASE_UPDATE
Definition: api_core.h:1587
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:530
SG_UI_Process_Get_Okay
bool SG_UI_Process_Get_Okay(bool bBlink)
Definition: api_callback.cpp:208
SG_UI_ProgressAndMsg_Reset
void SG_UI_ProgressAndMsg_Reset(void)
Definition: api_callback.cpp:597
SG_UI_Process_Set_Okay
bool SG_UI_Process_Set_Okay(bool bOkay)
Definition: api_callback.cpp:230
SG_UI_Console_Print_StdOut
void SG_UI_Console_Print_StdOut(const char *Text, SG_Char End, bool bFlush)
Definition: api_callback.cpp:78
SG_UI_Stop_Execution
bool SG_UI_Stop_Execution(bool bDialog)
Definition: api_callback.cpp:349
grid.h
CALLBACK_PROCESS_SET_OKAY
@ CALLBACK_PROCESS_SET_OKAY
Definition: api_core.h:1554
api_core.h
CALLBACK_PROCESS_SET_PROGRESS
@ CALLBACK_PROCESS_SET_PROGRESS
Definition: api_core.h:1556
SG_UI_Get_Application_Path
CSG_String SG_UI_Get_Application_Path(bool bPathOnly)
Definition: api_callback.cpp:799
SG_UI_Msg_is_Locked
bool SG_UI_Msg_is_Locked(void)
Definition: api_callback.cpp:487
CSG_UI_Parameter::String
CSG_String String
Definition: api_core.h:1614
SG_UI_DataObject_Show
bool SG_UI_DataObject_Show(CSG_Data_Object *pDataObject, int Show)
Definition: api_callback.cpp:645
SG_Get_UI_Callback
TSG_PFNC_UI_Callback SG_Get_UI_Callback(void)
Definition: api_callback.cpp:146
SG_UI_Progress_Reset
int SG_UI_Progress_Reset(void)
Definition: api_callback.cpp:198
CSG_Data_Object::Get_Owner
CSG_Data_Object * Get_Owner(void) const
Definition: dataobject.h:231
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:723
SG_UI_DATAOBJECT_UPDATE
@ SG_UI_DATAOBJECT_UPDATE
Definition: api_core.h:1518
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:1619
SG_UI_ODBC_Update
bool SG_UI_ODBC_Update(const CSG_String &Server)
Definition: api_callback.cpp:749
SG_UI_Dlg_Message
void SG_UI_Dlg_Message(const CSG_String &Message, const CSG_String &Caption)
Definition: api_callback.cpp:369
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:424
CALLBACK_SET_MAP_EXTENT
@ CALLBACK_SET_MAP_EXTENT
Definition: api_core.h:1583
SG_UI_Process_Set_Busy
bool SG_UI_Process_Set_Busy(bool bOn, const CSG_String &Message)
Definition: api_callback.cpp:243
SG_UI_Console_Set_UTF8
void SG_UI_Console_Set_UTF8(bool bOn)
Definition: api_callback.cpp:74
CALLBACK_DATAOBJECT_UPDATE
@ CALLBACK_DATAOBJECT_UPDATE
Definition: api_core.h:1574
CALLBACK_DLG_PARAMETERS
@ CALLBACK_DLG_PARAMETERS
Definition: api_core.h:1567
CALLBACK_PROCESS_SET_READY
@ CALLBACK_PROCESS_SET_READY
Definition: api_core.h:1557
SG_UI_Msg_Lock
int SG_UI_Msg_Lock(bool bOn)
Definition: api_callback.cpp:472
SG_UI_Dlg_Parameters
bool SG_UI_Dlg_Parameters(CSG_Parameters *pParameters, const CSG_String &Caption)
Definition: api_callback.cpp:449
SG_UI_DataObject_Update
bool SG_UI_DataObject_Update(CSG_Data_Object *pDataObject, int Show, CSG_Parameters *pParameters)
Definition: api_callback.cpp:624
CALLBACK_DATAOBJECT_ADD
@ CALLBACK_DATAOBJECT_ADD
Definition: api_core.h:1573
sLong
signed long long sLong
Definition: api_core.h:158
CALLBACK_DATAOBJECT_SHOW
@ CALLBACK_DATAOBJECT_SHOW
Definition: api_core.h:1575
CSG_UI_Parameter::Number
double Number
Definition: api_core.h:1610
SG_UI_DataObject_Add
bool SG_UI_DataObject_Add(CSG_Data_Object *pDataObject, int Show)
Definition: api_callback.cpp:611
SG_UI_DataObject_Colors_Set
bool SG_UI_DataObject_Colors_Set(CSG_Data_Object *pDataObject, CSG_Colors *pColors)
Definition: api_callback.cpp:684
SG_UI_Process_Set_Text
void SG_UI_Process_Set_Text(const CSG_String &Text)
Definition: api_callback.cpp:324
CALLBACK_DATAOBJECT_PARAMS_SET
@ CALLBACK_DATAOBJECT_PARAMS_SET
Definition: api_core.h:1581
SG_UI_Progress_Lock
int SG_UI_Progress_Lock(bool bOn)
Definition: api_callback.cpp:177
CALLBACK_DLG_ERROR
@ CALLBACK_DLG_ERROR
Definition: api_core.h:1564
CSG_UI_Parameter::Pointer
void * Pointer
Definition: api_core.h:1612
CALLBACK_MESSAGE_ADD_EXECUTION
@ CALLBACK_MESSAGE_ADD_EXECUTION
Definition: api_core.h:1571
CALLBACK_PROCESS_SET_TEXT
@ CALLBACK_PROCESS_SET_TEXT
Definition: api_core.h:1558
CSG_UI_Parameter
Definition: api_core.h:1598
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:671
CSG_Table
Definition: table.h:283
CALLBACK_MESSAGE_ADD_ERROR
@ CALLBACK_MESSAGE_ADD_ERROR
Definition: api_core.h:1570
SG_UI_Dlg_Error
int SG_UI_Dlg_Error(const CSG_String &Message, const CSG_String &Caption)
Definition: api_callback.cpp:403
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:899
SG_UI_DataObject_Params_Get
bool SG_UI_DataObject_Params_Get(CSG_Data_Object *pDataObject, CSG_Parameters *pParameters)
Definition: api_callback.cpp:697
SG_Char
#define SG_Char
Definition: api_core.h:536
CSG_String
Definition: api_core.h:563
CALLBACK_GET_APP_WINDOW
@ CALLBACK_GET_APP_WINDOW
Definition: api_core.h:1591
SG_UI_Process_Set_Progress
bool SG_UI_Process_Set_Progress(int Position, int Range)
Definition: api_callback.cpp:256
CALLBACK_WINDOW_ARRANGE
@ CALLBACK_WINDOW_ARRANGE
Definition: api_core.h:1589
SG_UI_Progress_is_Locked
bool SG_UI_Progress_is_Locked(void)
Definition: api_callback.cpp:192
CALLBACK_MESSAGE_ADD
@ CALLBACK_MESSAGE_ADD
Definition: api_core.h:1569
SG_UI_Console_Get_UTF8
bool SG_UI_Console_Get_UTF8(void)
Definition: api_callback.cpp:75
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:736
SG_UI_Window_Arrange
int SG_UI_Window_Arrange(int Arrange)
Definition: api_callback.cpp:769
CALLBACK_DATAOBJECT_PARAMS_GET
@ CALLBACK_DATAOBJECT_PARAMS_GET
Definition: api_core.h:1580
SG_UI_Get_Window_Main
void * SG_UI_Get_Window_Main(void)
Definition: api_callback.cpp:784
gSG_UI_Console_bUTF8
static bool gSG_UI_Console_bUTF8
Definition: api_callback.cpp:71
CALLBACK_PROCESS_GET_OKAY
@ CALLBACK_PROCESS_GET_OKAY
Definition: api_core.h:1553
SG_UI_DataObject_asImage
bool SG_UI_DataObject_asImage(CSG_Data_Object *pDataObject, CSG_Grid *pGrid)
Definition: api_callback.cpp:658
CALLBACK_DLG_MESSAGE
@ CALLBACK_DLG_MESSAGE
Definition: api_core.h:1562
SG_UI_ProgressAndMsg_Lock
void SG_UI_ProgressAndMsg_Lock(bool bOn)
Definition: api_callback.cpp:590
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:306
TSG_UI_MSG_STYLE
TSG_UI_MSG_STYLE
Definition: api_core.h:1501
CSG_UI_Parameter::Boolean
bool Boolean
Definition: api_core.h:1608
CSG_Parameters
Definition: parameters.h:1690
SG_UI_Msg_Add_Error
void SG_UI_Msg_Add_Error(const char *Message)
Definition: api_callback.cpp:557
SG_UI_Msg_Flush
void SG_UI_Msg_Flush(void)
Definition: api_callback.cpp:577
SG_UI_Console_Print_StdErr
void SG_UI_Console_Print_StdErr(const char *Text, SG_Char End, bool bFlush)
Definition: api_callback.cpp:103
CALLBACK_DATAOBJECT_ASIMAGE
@ CALLBACK_DATAOBJECT_ASIMAGE
Definition: api_core.h:1576
CALLBACK_DATAOBJECT_COLORS_SET
@ CALLBACK_DATAOBJECT_COLORS_SET
Definition: api_core.h:1579
CSG_Colors
Definition: api_core.h:1338
SG_UI_Msg_Add
void SG_UI_Msg_Add(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
Definition: api_callback.cpp:503