SAGA API Version 9.13
Loading...
Searching...
No Matches
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/app.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
68static bool gSG_UI_Console_bUTF8 = false;
69#else
70static bool gSG_UI_Console_bUTF8 = true;
71#endif
72
75
76//---------------------------------------------------------
77void SG_UI_Console_Print_StdOut(const char *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdOut(CSG_String(Text), End, bFlush); }
78void SG_UI_Console_Print_StdOut(const wchar_t *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdOut(CSG_String(Text), End, bFlush); }
79void 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//---------------------------------------------------------
102void SG_UI_Console_Print_StdErr(const char *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdErr(CSG_String(Text), End, bFlush); }
103void SG_UI_Console_Print_StdErr(const wchar_t *Text, SG_Char End, bool bFlush) { SG_UI_Console_Print_StdErr(CSG_String(Text), End, bFlush); }
104void 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//---------------------------------------------------------
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//---------------------------------------------------------
173static int gSG_UI_Progress_Lock = 0;
174
175//---------------------------------------------------------
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 return( gSG_UI_Progress_Lock != 0 );
194}
195
196//---------------------------------------------------------
198{
199 int Locked = gSG_UI_Progress_Lock;
200
202
203 return( Locked );
204}
205
206//---------------------------------------------------------
207bool SG_UI_Process_Get_Okay(bool bBlink)
208{
209 if( gSG_UI_Callback )
210 {
211 CSG_UI_Parameter p1(gSG_UI_Progress_Lock == 0 && bBlink), p2;
212
213 return( gSG_UI_Callback(CALLBACK_PROCESS_GET_OKAY, p1, p2) != 0 );
214 }
215
216 if( gSG_UI_Progress_Lock == 0 && bBlink )
217 {
218 static int iBuisy = 0; static const SG_Char Buisy[4] = { '|', '/', '-', '\\' };
219
220 SG_UI_Console_Print_StdOut(CSG_String::Format("\r%c", Buisy[iBuisy++]), '\0', true);
221
222 iBuisy %= 4;
223 }
224
225 return( true );
226}
227
228//---------------------------------------------------------
230{
232 {
233 CSG_UI_Parameter p1(bOkay), p2;
234
235 return( gSG_UI_Callback(CALLBACK_PROCESS_SET_OKAY, p1, p2) != 0 );
236 }
237
238 return( true );
239}
240
241//---------------------------------------------------------
242bool SG_UI_Process_Set_Busy(bool bOn, const CSG_String &Message)
243{
244 if( gSG_UI_Callback )
245 {
246 CSG_UI_Parameter p1(bOn), p2(Message);
247
248 return( gSG_UI_Callback(CALLBACK_PROCESS_SET_BUSY, p1, p2) != 0 );
249 }
250
251 return( true );
252}
253
254//---------------------------------------------------------
255bool SG_UI_Process_Set_Progress(int Position, int Range)
256{
257 return( SG_UI_Process_Set_Progress((double)Position, (double)Range) );
258}
259
260//---------------------------------------------------------
262{
263 return( SG_UI_Process_Set_Progress((double)Position, (double)Range) );
264}
265
266//---------------------------------------------------------
267bool SG_UI_Process_Set_Progress(double Position, double Range)
268{
269 if( gSG_UI_Progress_Lock > 0 )
270 {
271 return( SG_UI_Process_Get_Okay() );
272 }
273
274 if( gSG_UI_Callback )
275 {
276 CSG_UI_Parameter p1(Position), p2(Range);
277
278 return( gSG_UI_Callback(CALLBACK_PROCESS_SET_PROGRESS, p1, p2) != 0 );
279 }
280
281 //-----------------------------------------------------
282 static int Progress = -1;
283
284 int i = Position < 0. ? -1 : Range > 0. ? 1 + (int)(100. * Position / Range) : 100;
285
286 if( Progress != i )
287 {
288 if( Progress < 0 || i < Progress )
289 {
290 SG_UI_Console_Print_StdOut("", '\n', true);
291 }
292
293 Progress = i;
294
295 if( Progress >= 0 )
296 {
297 SG_UI_Console_Print_StdOut(CSG_String::Format("\r%3d%%", Progress > 100 ? 100 : Progress), '\0', true);
298 }
299 }
300
301 return( true );
302}
303
304//---------------------------------------------------------
306{
307 if( gSG_UI_Callback )
308 {
310
311 if( gSG_UI_Progress_Lock == 0 )
312 {
313 CSG_UI_Parameter p1, p2;
314
315 return( gSG_UI_Callback(CALLBACK_PROCESS_SET_READY, p1, p2) != 0 );
316 }
317 }
318
320
321 return( true );
322}
323
324
326// //
327// //
328// //
330
331//---------------------------------------------------------
333
334//---------------------------------------------------------
336{
337 if( bOn )
338 {
340 }
341 else if( gSG_UI_StatusBar_Lock > 0 )
342 {
344 }
345
346 return( gSG_UI_StatusBar_Lock );
347}
348
349//---------------------------------------------------------
351{
352 return( gSG_UI_StatusBar_Lock != 0 );
353}
354
355//---------------------------------------------------------
357{
358 int Locked = gSG_UI_StatusBar_Lock;
359
361
362 return( Locked );
363}
364
365//---------------------------------------------------------
367{
368 if( gSG_UI_StatusBar_Lock == 0 )
369 {
370 if( gSG_UI_Callback )
371 {
372 CSG_UI_Parameter p1(Text), p2;
373
375 }
376 else
377 {
378 SG_UI_Console_Print_StdOut(Text, '\n', true);
379 }
380 }
381}
382
383void SG_UI_Process_Set_Text(const CSG_String &Text) // deprecated, use SG_UI_StatusBar_Set_Text() instead!
384{
386}
387
388
390// //
391// //
392// //
394
395//---------------------------------------------------------
396bool SG_UI_Stop_Execution(bool bDialog)
397{
398 if( gSG_UI_Callback )
399 {
400 CSG_UI_Parameter p1(bDialog), p2;
401
402 return( gSG_UI_Callback(CALLBACK_STOP_EXECUTION, p1, p2) != 0 );
403 }
404
405 return( false );
406}
407
408
410// //
411// //
412// //
414
415//---------------------------------------------------------
416void SG_UI_Dlg_Message(const CSG_String &Message, const CSG_String &Caption)
417{
418 if( gSG_UI_Progress_Lock == 0 )
419 {
420 if( gSG_UI_Callback )
421 {
422 CSG_UI_Parameter p1(Message), p2(Caption);
423
425 }
426 else
427 {
428 SG_UI_Console_Print_StdOut(CSG_String::Format("%s: %s", Caption.c_str(), Message.c_str()), '\n', true);
429 }
430 }
431}
432
433//---------------------------------------------------------
434bool SG_UI_Dlg_Continue(const CSG_String &Message, const CSG_String &Caption)
435{
436 if( gSG_UI_Progress_Lock == 0 )
437 {
438 if( gSG_UI_Callback )
439 {
440 CSG_UI_Parameter p1(Message), p2(Caption);
441
442 return( gSG_UI_Callback(CALLBACK_DLG_CONTINUE, p1, p2) != 0 );
443 }
444 }
445
446 return( true );
447}
448
449//---------------------------------------------------------
450int SG_UI_Dlg_Error(const CSG_String &Message, const CSG_String &Caption)
451{
452 if( gSG_UI_Progress_Lock != 0 )
453 {
454 SG_UI_Msg_Add_Error(Caption);
455 SG_UI_Msg_Add_Error(Message);
456
457 return( 0 );
458 }
459
460 if( gSG_UI_Callback )
461 {
462 CSG_UI_Parameter p1(Message), p2(Caption);
463
464 return( gSG_UI_Callback(CALLBACK_DLG_ERROR, p1, p2) );
465 }
466
467 return( 0 );
468}
469
470//---------------------------------------------------------
471void SG_UI_Dlg_Info(const CSG_String &Message, const CSG_String &Caption)
472{
473 if( gSG_UI_Callback )
474 {
475 CSG_UI_Parameter p1(Message), p2(Caption);
476
478 }
479 else
480 {
481 SG_UI_Console_Print_StdOut(CSG_String::Format("%s: %s", Caption.c_str(), Message.c_str()), '\n', true);
482 }
483}
484
485
487// //
488// //
489// //
491
492//---------------------------------------------------------
493bool SG_UI_Dlg_Parameters(CSG_Parameters *pParameters, const CSG_String &Caption)
494{
495 if( gSG_UI_Callback && pParameters )
496 {
497 CSG_UI_Parameter p1(pParameters), p2(Caption.is_Empty() ? pParameters->Get_Name() : Caption);
498
499 return( gSG_UI_Callback(CALLBACK_DLG_PARAMETERS, p1, p2) != 0 );
500 }
501
502 return( true );
503}
504
505
507// //
508// //
509// //
511
512//---------------------------------------------------------
513static int gSG_UI_Msg_Lock = 0;
514
515//---------------------------------------------------------
516int SG_UI_Msg_Lock(bool bOn)
517{
518 if( bOn )
519 {
521 }
522 else if( gSG_UI_Msg_Lock > 0 )
523 {
525 }
526
527 return( gSG_UI_Msg_Lock );
528}
529
530//---------------------------------------------------------
532{
533 return( gSG_UI_Msg_Lock != 0 );
534}
535
536//---------------------------------------------------------
538{
539 int Locked = gSG_UI_Msg_Lock;
540
541 gSG_UI_Msg_Lock = 0;
542
543 return( Locked );
544}
545
546//---------------------------------------------------------
547void SG_UI_Msg_Add(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style) { SG_UI_Msg_Add(CSG_String(Message), bNewLine, Style); }
548void SG_UI_Msg_Add(const wchar_t *Message, bool bNewLine, TSG_UI_MSG_STYLE Style) { SG_UI_Msg_Add(CSG_String(Message), bNewLine, Style); }
549void SG_UI_Msg_Add(const CSG_String &Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
550{
551 if( !gSG_UI_Msg_Lock )
552 {
553 if( gSG_UI_Callback )
554 {
555 int Flags[2]; Flags[0] = bNewLine ? 1 : 0; Flags[1] = Style;
556
557 CSG_UI_Parameter p1(Message), p2(Flags);
558
560 }
561 else
562 {
563 if( bNewLine )
564 {
566 }
567
568 SG_UI_Console_Print_StdOut(Message, '\0', true);
569 }
570 }
571}
572
573//---------------------------------------------------------
574void 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); }
575void 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); }
576void SG_UI_Msg_Add_Execution(const CSG_String &Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
577{
578 if( !gSG_UI_Msg_Lock )
579 {
580 if( gSG_UI_Callback )
581 {
582 int Flags[2]; Flags[0] = bNewLine ? 1 : 0; Flags[1] = Style;
583
584 CSG_UI_Parameter p1(Message), p2(Flags);
585
587 }
588 else
589 {
590 if( bNewLine )
591 {
593 }
594
595 SG_UI_Console_Print_StdOut(Message, '\0', true);
596 }
597 }
598}
599
600//---------------------------------------------------------
601void SG_UI_Msg_Add_Error(const char *Message) { SG_UI_Msg_Add_Error(CSG_String(Message)); }
602void SG_UI_Msg_Add_Error(const wchar_t *Message) { SG_UI_Msg_Add_Error(CSG_String(Message)); }
603void SG_UI_Msg_Add_Error(const CSG_String &Message)
604{
605 if( !gSG_UI_Msg_Lock )
606 {
607 if( gSG_UI_Callback )
608 {
609 CSG_UI_Parameter p1(Message), p2;
610
612 }
613 else
614 {
615 SG_UI_Console_Print_StdErr(CSG_String::Format("\n[%s] %s", _TL("Error"), Message.c_str()), '\0', true);
616 }
617 }
618}
619
620//---------------------------------------------------------
622{
623 fflush(stdout);
624 fflush(stderr);
625}
626
627
629// //
630// //
631// //
633
634//---------------------------------------------------------
639
640//---------------------------------------------------------
645
646
648// //
649// //
650// //
652
653//---------------------------------------------------------
654bool SG_UI_DataObject_Add(CSG_Data_Object *pDataObject, int Show)
655{
656 if( gSG_UI_Callback && pDataObject )
657 {
658 CSG_UI_Parameter p1(pDataObject), p2(Show);
659
660 return( gSG_UI_Callback(CALLBACK_DATAOBJECT_ADD, p1, p2) != 0 );
661 }
662
663 return( false );
664}
665
666//---------------------------------------------------------
667bool SG_UI_DataObject_Del(CSG_Data_Object *pDataObject, bool bConfirm)
668{
669 if( gSG_UI_Callback && pDataObject )
670 {
671 CSG_UI_Parameter p1(pDataObject), p2(bConfirm);
672
673 return( gSG_UI_Callback(CALLBACK_DATAOBJECT_DEL, p1, p2) != 0 );
674 }
675
676 return( false );
677}
678
679//---------------------------------------------------------
680bool SG_UI_DataObject_Update(CSG_Data_Object *pDataObject, int Show, CSG_Parameters *pParameters)
681{
682 if( gSG_UI_Callback && pDataObject )
683 {
684 CSG_UI_Parameter p1(pDataObject->Get_Owner() ? pDataObject->Get_Owner() : pDataObject), p2(pParameters);
685
687 {
688 if( Show != SG_UI_DATAOBJECT_UPDATE )
689 {
690 SG_UI_DataObject_Show(pDataObject, Show);
691 }
692
693 return( true );
694 }
695 }
696
697 return( false );
698}
699
700//---------------------------------------------------------
701bool SG_UI_DataObject_Show(CSG_Data_Object *pDataObject, int Show)
702{
703 if( gSG_UI_Callback && pDataObject )
704 {
705 CSG_UI_Parameter p1(pDataObject), p2(Show);
706
707 return( gSG_UI_Callback(CALLBACK_DATAOBJECT_SHOW, p1, p2) != 0 );
708 }
709
710 return( false );
711}
712
713//---------------------------------------------------------
715{
716 if( gSG_UI_Callback && pDataObject )
717 {
718 CSG_UI_Parameter p1(pDataObject), p2(pGrid);
719
720 return( gSG_UI_Callback(CALLBACK_DATAOBJECT_ASIMAGE, p1, p2) != 0 );
721 }
722
723 return( false );
724}
725
726//---------------------------------------------------------
728{
729 if( gSG_UI_Callback && pDataObject && pColors )
730 {
731 CSG_UI_Parameter p1(pDataObject), p2(pColors);
732
733 return( gSG_UI_Callback(CALLBACK_DATAOBJECT_COLORS_GET, p1, p2) != 0 );
734 }
735
736 return( false );
737}
738
739//---------------------------------------------------------
741{
742 if( gSG_UI_Progress_Lock == 0 && gSG_UI_Callback && pDataObject && pColors )
743 {
744 CSG_UI_Parameter p1(pDataObject), p2(pColors);
745
746 return( gSG_UI_Callback(CALLBACK_DATAOBJECT_COLORS_SET, p1, p2) != 0 );
747 }
748
749 return( false );
750}
751
752//---------------------------------------------------------
754{
755 if( gSG_UI_Progress_Lock == 0 && gSG_UI_Callback && pDataObject )
756 {
757 CSG_UI_Parameter p1(pDataObject), p2((void *)&Options);
758
759 return( gSG_UI_Callback(CALLBACK_DATAOBJECT_CLASSIFY, p1, p2) != 0 );
760 }
761
762 return( false );
763}
764
765//---------------------------------------------------------
767{
768 if( gSG_UI_Callback && pDataObject && pParameters )
769 {
770 CSG_UI_Parameter p1(pDataObject), p2(pParameters);
771
772 return( gSG_UI_Callback(CALLBACK_DATAOBJECT_PARAMS_GET, p1, p2) != 0 );
773 }
774
775 return( false );
776}
777
778//---------------------------------------------------------
780{
781 if( gSG_UI_Progress_Lock == 0 && gSG_UI_Callback && pDataObject && pParameters )
782 {
783 CSG_UI_Parameter p1(pDataObject), p2(pParameters);
784
785 return( gSG_UI_Callback(CALLBACK_DATAOBJECT_PARAMS_SET, p1, p2) != 0 );
786 }
787
788 return( false );
789}
790
791//---------------------------------------------------------
792bool SG_UI_Set_Map_Extent (double xMin, double yMin, double xMax, double yMax, int Maps)
793{
794 return( SG_UI_Set_Map_Extent(CSG_Rect(xMin, yMin, xMax, yMax), Maps) );
795}
796
797bool SG_UI_Set_Map_Extent (const CSG_Rect &Extent, int Maps)
798{
799 if( gSG_UI_Callback )
800 {
801 CSG_UI_Parameter p1((void *)&Extent), p2(Maps);
802
803 return( gSG_UI_Callback(CALLBACK_SET_MAP_EXTENT, p1, p2) != 0 );
804 }
805
806 return( false );
807}
808
809//---------------------------------------------------------
810bool SG_UI_Get_Map_Extent (double &xMin, double &yMin, double &xMax, double &yMax)
811{
813
815 {
816 xMin = Extent.xMin; yMin = Extent.yMin; xMax = Extent.xMax; yMax = Extent.yMax;
817
818 return( true );
819 }
820
821 return( false );
822}
823
825{
826 if( gSG_UI_Callback )
827 {
828 CSG_UI_Parameter p1((void *)&Extent), p2;
829
830 return( gSG_UI_Callback(CALLBACK_SET_MAP_EXTENT, p1, p2) != 0 );
831 }
832
833 return( false );
834}
835
836//---------------------------------------------------------
837bool SG_UI_Diagram_Show (class CSG_Table *pTable, class CSG_Parameters *pParameters)
838{
840 {
841 CSG_UI_Parameter p1(pTable), p2(pParameters);
842
843 return( gSG_UI_Callback(CALLBACK_DIAGRAM_SHOW, p1, p2) != 0 );
844 }
845
846 return( false );
847}
848
849//---------------------------------------------------------
850bool SG_UI_ODBC_Update (const CSG_String &Server)
851{
852 if( gSG_UI_Callback )
853 {
854 CSG_UI_Parameter p1(Server), p2;
855
856 return( gSG_UI_Callback(CALLBACK_DATABASE_UPDATE, p1, p2) != 0 );
857 }
858
859 return( false );
860}
861
862//---------------------------------------------------------
863bool SG_UI_Cloud_Storage_Update (const CSG_String &Connection, const CSG_String &Path)
864{
865 if( gSG_UI_Callback )
866 {
867 CSG_UI_Parameter p1(Connection), p2(Path);
868
869 return( gSG_UI_Callback(CALLBACK_CLOUD_STORAGE_UPDATE, p1, p2) != 0 );
870 }
871
872 return( false );
873}
874
876// //
877// //
878// //
880
881//---------------------------------------------------------
882int SG_UI_Window_Arrange (int Arrange)
883{
884 if( gSG_UI_Callback )
885 {
886 CSG_UI_Parameter p1, p2;
887
889
890 return( 1 );
891 }
892
893 return( 0 );
894}
895
896//---------------------------------------------------------
898{
899 if( gSG_UI_Callback )
900 {
901 CSG_UI_Parameter p1, p2;
902
904
905 return( p1.Pointer );
906 }
907
908 return( NULL );
909}
910
911
913// //
914// //
915// //
917
918//---------------------------------------------------------
int SG_UI_StatusBar_Lock(bool bOn)
bool SG_UI_DataObject_Update(CSG_Data_Object *pDataObject, int Show, CSG_Parameters *pParameters)
void SG_UI_Msg_Add_Error(const char *Message)
int SG_UI_Dlg_Error(const CSG_String &Message, const CSG_String &Caption)
void SG_UI_Console_Print_StdErr(const char *Text, SG_Char End, bool bFlush)
bool SG_UI_Stop_Execution(bool bDialog)
bool SG_UI_Process_Get_Okay(bool bBlink)
bool SG_UI_Dlg_Parameters(CSG_Parameters *pParameters, const CSG_String &Caption)
int SG_UI_StatusBar_Reset(void)
bool SG_UI_Process_Set_Busy(bool bOn, const CSG_String &Message)
bool SG_UI_Cloud_Storage_Update(const CSG_String &Connection, const CSG_String &Path)
bool SG_UI_DataObject_Colors_Get(CSG_Data_Object *pDataObject, CSG_Colors *pColors)
bool SG_UI_Progress_is_Locked(void)
void SG_UI_Msg_Add(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
static int gSG_UI_Progress_Lock
bool SG_UI_Console_Get_UTF8(void)
bool SG_Set_UI_Callback(TSG_PFNC_UI_Callback Function)
bool SG_UI_DataObject_asImage(CSG_Data_Object *pDataObject, CSG_Grid *pGrid)
bool SG_UI_DataObject_Params_Get(CSG_Data_Object *pDataObject, CSG_Parameters *pParameters)
int SG_UI_Window_Arrange(int Arrange)
bool SG_UI_DataObject_Show(CSG_Data_Object *pDataObject, int Show)
void SG_UI_Process_Set_Text(const CSG_String &Text)
bool SG_UI_Process_Set_Ready(void)
bool SG_UI_Process_Set_Progress(int Position, int Range)
int SG_UI_Msg_Reset(void)
void SG_UI_Dlg_Info(const CSG_String &Message, const CSG_String &Caption)
bool SG_UI_DataObject_Add(CSG_Data_Object *pDataObject, int Show)
static int gSG_UI_Msg_Lock
void SG_UI_Console_Print_StdOut(const char *Text, SG_Char End, bool bFlush)
bool SG_UI_Diagram_Show(class CSG_Table *pTable, class CSG_Parameters *pParameters)
void SG_UI_Msg_Add_Execution(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
bool SG_UI_StatusBar_is_Locked(void)
void SG_UI_ProgressAndMsg_Reset(void)
void * SG_UI_Get_Window_Main(void)
void SG_UI_Console_Set_UTF8(bool bOn)
void SG_UI_Msg_Flush(void)
bool SG_UI_Process_Set_Okay(bool bOkay)
bool SG_UI_DataObject_Del(CSG_Data_Object *pDataObject, bool bConfirm)
TSG_PFNC_UI_Callback gSG_UI_Callback
void SG_UI_StatusBar_Set_Text(const CSG_String &Text)
bool SG_UI_ODBC_Update(const CSG_String &Server)
bool SG_UI_DataObject_Params_Set(CSG_Data_Object *pDataObject, CSG_Parameters *pParameters)
int SG_UI_Msg_Lock(bool bOn)
void SG_UI_Dlg_Message(const CSG_String &Message, const CSG_String &Caption)
static bool gSG_UI_Console_bUTF8
void SG_UI_ProgressAndMsg_Lock(bool bOn)
int SG_UI_Progress_Lock(bool bOn)
bool SG_UI_DataObject_Colors_Set(CSG_Data_Object *pDataObject, CSG_Colors *pColors)
TSG_PFNC_UI_Callback SG_Get_UI_Callback(void)
static int gSG_UI_StatusBar_Lock
bool SG_UI_Dlg_Continue(const CSG_String &Message, const CSG_String &Caption)
bool SG_UI_Set_Map_Extent(double xMin, double yMin, double xMax, double yMax, int Maps)
int SG_UI_Progress_Reset(void)
bool SG_UI_DataObject_Classify(CSG_Data_Object *pDataObject, const CSG_MetaData &Options)
bool SG_UI_Get_Map_Extent(double &xMin, double &yMin, double &xMax, double &yMax)
bool SG_UI_Msg_is_Locked(void)
TSG_UI_MSG_STYLE
Definition api_core.h:1630
signed long long sLong
Definition api_core.h:158
@ SG_UI_DATAOBJECT_UPDATE
Definition api_core.h:1647
int(* TSG_PFNC_UI_Callback)(TSG_UI_Callback_ID ID, CSG_UI_Parameter &Param_1, CSG_UI_Parameter &Param_2)
Definition api_core.h:1755
#define SG_Char
Definition api_core.h:536
@ CALLBACK_GET_APP_WINDOW
Definition api_core.h:1727
@ CALLBACK_DLG_INFO
Definition api_core.h:1694
@ CALLBACK_SET_MAP_EXTENT
Definition api_core.h:1716
@ CALLBACK_PROCESS_SET_PROGRESS
Definition api_core.h:1685
@ CALLBACK_STOP_EXECUTION
Definition api_core.h:1689
@ CALLBACK_DLG_ERROR
Definition api_core.h:1693
@ CALLBACK_WINDOW_ARRANGE
Definition api_core.h:1725
@ CALLBACK_MESSAGE_ADD_ERROR
Definition api_core.h:1699
@ CALLBACK_DATAOBJECT_UPDATE
Definition api_core.h:1704
@ CALLBACK_PROCESS_SET_TEXT
Definition api_core.h:1687
@ CALLBACK_DATAOBJECT_PARAMS_GET
Definition api_core.h:1713
@ CALLBACK_PROCESS_SET_BUSY
Definition api_core.h:1684
@ CALLBACK_DIAGRAM_SHOW
Definition api_core.h:1719
@ CALLBACK_DLG_MESSAGE
Definition api_core.h:1691
@ CALLBACK_CLOUD_STORAGE_UPDATE
Definition api_core.h:1721
@ CALLBACK_DATAOBJECT_COLORS_GET
Definition api_core.h:1708
@ CALLBACK_DLG_CONTINUE
Definition api_core.h:1692
@ CALLBACK_DATAOBJECT_COLORS_SET
Definition api_core.h:1709
@ CALLBACK_DLG_PARAMETERS
Definition api_core.h:1696
@ CALLBACK_MESSAGE_ADD
Definition api_core.h:1698
@ CALLBACK_DATAOBJECT_ASIMAGE
Definition api_core.h:1706
@ CALLBACK_DATAOBJECT_PARAMS_SET
Definition api_core.h:1714
@ CALLBACK_DATABASE_UPDATE
Definition api_core.h:1723
@ CALLBACK_DATAOBJECT_ADD
Definition api_core.h:1702
@ CALLBACK_DATAOBJECT_SHOW
Definition api_core.h:1705
@ CALLBACK_DATAOBJECT_DEL
Definition api_core.h:1703
@ CALLBACK_PROCESS_SET_READY
Definition api_core.h:1686
@ CALLBACK_PROCESS_GET_OKAY
Definition api_core.h:1682
@ CALLBACK_PROCESS_SET_OKAY
Definition api_core.h:1683
@ CALLBACK_DATAOBJECT_CLASSIFY
Definition api_core.h:1711
@ CALLBACK_MESSAGE_ADD_EXECUTION
Definition api_core.h:1700
#define _TL(s)
Definition api_core.h:1618
CSG_Data_Object * Get_Owner(void) const
Definition dataobject.h:234
const CSG_String & Get_Name(void) const
size_t to_UTF8(char **pString) const
static CSG_String Format(const char *Format,...)
const SG_Char * c_str(void) const
bool to_ASCII(char **pString, char Replace='_') const
bool is_Empty(void) const
CSG_UI_Parameter(void)
Definition api_core.h:1736
CSG_String String
Definition api_core.h:1750