spatialite_gui-2.0.0-devel/0000775000175000017500000000000012544030130012604 500000000000000spatialite_gui-2.0.0-devel/Main.cpp0000664000175000017500000175675712544026240014157 00000000000000/* / Main.cpp / the main core of spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 1.7, 2014 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2014 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/menu.h" #include "wx/aboutdlg.h" #include "wx/filename.h" #include "wx/config.h" #include "wx/tokenzr.h" #include #include #include // // ICONs in XPM format [universally portable] // #include "icons/icon.xpm" #include "icons/icon_info.xpm" #include "icons/create_new.xpm" #include "icons/connect.xpm" #include "icons/connect_ro.xpm" #include "icons/disconnect.xpm" #include "icons/memdb_load.xpm" #include "icons/memdb_new.xpm" #include "icons/memdb_clock.xpm" #include "icons/memdb_save.xpm" #include "icons/vacuum.xpm" #include "icons/sql_script.xpm" #include "icons/composer.xpm" #include "icons/loadshp.xpm" #include "icons/virtshp.xpm" #include "icons/loadtxt.xpm" #include "icons/virttxt.xpm" #include "icons/loaddbf.xpm" #include "icons/virtdbf.xpm" #include "icons/loadxl.xpm" #include "icons/virtxl.xpm" #include "icons/network.xpm" #include "icons/exif.xpm" #include "icons/loadxml.xpm" #include "icons/srids.xpm" #include "icons/charset.xpm" #include "icons/help.xpm" #include "icons/about.xpm" #include "icons/exit.xpm" #include "icons/attach.xpm" #include "icons/sql_log.xpm" #include "icons/db_status.xpm" #include "icons/checkgeom.xpm" #include "icons/sanegeom.xpm" #include "icons/wfs.xpm" #include "icons/dxf.xpm" #include "icons/security_lock.xpm" #include "icons/security_relaxed.xpm" #include "icons/security_rdonly.xpm" #include "icons/coverage.xpm" #if defined(_WIN32) && !defined(__MINGW32__) #define unlink _unlink #endif IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { // // main APP implementation // wxString path; if (argc > 1) path = argv[1]; MyFrame *frame = new MyFrame(wxT("spatialite_gui [a GUI tool for SQLite/SpatiaLite]"), wxPoint(0, 0), wxSize(700, 480)); frame->Show(true); SetTopWindow(frame); frame->LoadConfig(path); return true; } MyFrame::MyFrame(const wxString & title, const wxPoint & pos, const wxSize & size): wxFrame((wxFrame *) NULL, -1, title, pos, size) { // // main GUI frame constructor // setlocale(LC_ALL, ""); // forcing DECIMAL POINT IS COMMA setlocale(LC_NUMERIC, "C"); Old_SPATIALITE_SECURITY_ENV = NULL; RL2MaxThreads = 1; wxImage::AddHandler(new wxPNGHandler); MemoryDatabase = false; AutoSaveInterval = 0; LastTotalChanges = 0; TimerAutoSave = NULL; SqlLogEnabled = false; // // initializing CHARSET lists // CharsetsLen = 79; Charsets = new wxString[CharsetsLen]; CharsetsNames = new wxString[CharsetsLen]; *(CharsetsNames + 0) = wxT("ARMSCII-8 Armenian"); *(CharsetsNames + 1) = wxT("ASCII US-ASCII"); *(CharsetsNames + 2) = wxT("BIG5 Chinese/Traditional"); *(CharsetsNames + 3) = wxT("BIG5-HKSCS Chinese/Hong Kong"); *(CharsetsNames + 4) = wxT("BIG5-HKSCS:1999"); *(CharsetsNames + 5) = wxT("BIG5-HKSCS:2001"); *(CharsetsNames + 6) = wxT("CP850 DOS/OEM Western Europe"); *(CharsetsNames + 7) = wxT("CP862 DOS/OEM Hebrew"); *(CharsetsNames + 8) = wxT("CP866 DOS/OEM Cyrillic"); *(CharsetsNames + 9) = wxT("CP874 DOS/OEM Thai"); *(CharsetsNames + 10) = wxT("CP932 DOS/OEM Japanese"); *(CharsetsNames + 11) = wxT("CP936 DOS/OEM Chinese"); *(CharsetsNames + 12) = wxT("CP949 DOS/OEM Korean"); *(CharsetsNames + 13) = wxT("CP950 DOS/OEM Chinese/Big5"); *(CharsetsNames + 14) = wxT("CP1133 Laotian"); *(CharsetsNames + 15) = wxT("CP1250 Windows Central Europe"); *(CharsetsNames + 16) = wxT("CP1251 Windows Cyrillic"); *(CharsetsNames + 17) = wxT("CP1252 Windows Latin 1"); *(CharsetsNames + 18) = wxT("CP1253 Windows Greek"); *(CharsetsNames + 19) = wxT("CP1254 Windows Turkish"); *(CharsetsNames + 20) = wxT("CP1255 Windows Hebrew"); *(CharsetsNames + 21) = wxT("CP1256 Windows Arabic"); *(CharsetsNames + 22) = wxT("CP1257 Windows Baltic"); *(CharsetsNames + 23) = wxT("CP1258 Windows Vietnamese"); *(CharsetsNames + 24) = wxT("EUC-CN Chinese"); *(CharsetsNames + 25) = wxT("EUC-JP Japanese"); *(CharsetsNames + 26) = wxT("EUC-KR Korean"); *(CharsetsNames + 27) = wxT("EUC-TW Taiwan"); *(CharsetsNames + 28) = wxT("GB18030 Chinese/National Standard"); *(CharsetsNames + 29) = wxT("GBK Chinese/Simplified"); *(CharsetsNames + 30) = wxT("Georgian-Academy"); *(CharsetsNames + 31) = wxT("Georgian-PS"); *(CharsetsNames + 32) = wxT("HZ Chinese"); *(CharsetsNames + 33) = wxT("ISO-2022-CN Chinese"); *(CharsetsNames + 34) = wxT("ISO-2022-CN-EXT"); *(CharsetsNames + 35) = wxT("ISO-2022-JP Japanese"); *(CharsetsNames + 36) = wxT("ISO-2022-JP-1"); *(CharsetsNames + 37) = wxT("ISO-2022-JP-2"); *(CharsetsNames + 38) = wxT("ISO-2022-KR Korean"); *(CharsetsNames + 39) = wxT("ISO-8859-1 Latin-1 Western European"); *(CharsetsNames + 40) = wxT("ISO-8859-2 Latin-2 Central European"); *(CharsetsNames + 41) = wxT("ISO-8859-3 Latin-3 South European"); *(CharsetsNames + 42) = wxT("ISO-8859-4 Latin-4 North European"); *(CharsetsNames + 43) = wxT("ISO-8859-5 Latin/Cyrillic"); *(CharsetsNames + 44) = wxT("ISO-8859-6 Latin/Arabic"); *(CharsetsNames + 45) = wxT("ISO-8859-7 Latin/Greek"); *(CharsetsNames + 46) = wxT("ISO-8859-8 Latin/Hebrew"); *(CharsetsNames + 47) = wxT("ISO-8859-9 Latin-5 Turkish"); *(CharsetsNames + 48) = wxT("ISO-8859-10 Latin-6 Nordic"); *(CharsetsNames + 49) = wxT("ISO-8859-11 Latin/Thai"); *(CharsetsNames + 50) = wxT("ISO-8859-13 Latin-7 Baltic Rim"); *(CharsetsNames + 51) = wxT("ISO-8859-14 Latin-8 Celtic"); *(CharsetsNames + 52) = wxT("ISO-8859-15 Latin-9"); *(CharsetsNames + 53) = wxT("ISO-8859-16 Latin-10 South-Eastern European"); *(CharsetsNames + 54) = wxT("JOHAB Korean"); *(CharsetsNames + 55) = wxT("KOI8-R Russian"); *(CharsetsNames + 56) = wxT("KOI8-U Ukrainian"); *(CharsetsNames + 57) = wxT("KOI8-RU Belarusian"); *(CharsetsNames + 58) = wxT("KOI8-T Tajik"); *(CharsetsNames + 59) = wxT("MacArabic MAC Arabic"); *(CharsetsNames + 60) = wxT("MacCentralEurope"); *(CharsetsNames + 61) = wxT("MacCroatian MAC Croatian"); *(CharsetsNames + 62) = wxT("MacCyrillic MAC Cyrillic"); *(CharsetsNames + 63) = wxT("MacGreek MAC Greek"); *(CharsetsNames + 64) = wxT("MacHebrew MAC Hebrew"); *(CharsetsNames + 65) = wxT("MacIceland MAC Iceland"); *(CharsetsNames + 66) = wxT("Macintosh"); *(CharsetsNames + 67) = wxT("MacRoman MAC European/Western languages"); *(CharsetsNames + 68) = wxT("MacRomania MAC Romania"); *(CharsetsNames + 69) = wxT("MacThai MAC Thai"); *(CharsetsNames + 70) = wxT("MacTurkish MAC Turkish"); *(CharsetsNames + 71) = wxT("MacUkraine MAC Ukraine"); *(CharsetsNames + 72) = wxT("MuleLao-1 Laotian"); *(CharsetsNames + 73) = wxT("PT154 Kazakh"); *(CharsetsNames + 74) = wxT("RK1048 Kazakh"); *(CharsetsNames + 75) = wxT("SHIFT_JIS Japanese"); *(CharsetsNames + 76) = wxT("TCVN Vietnamese"); *(CharsetsNames + 77) = wxT("TIS-620 Thai"); *(CharsetsNames + 77) = wxT("UTF-8 UNICODE/Universal"); *(CharsetsNames + 78) = wxT("VISCII Vietnamese"); *(Charsets + 0) = wxT("ARMSCII-8"); *(Charsets + 1) = wxT("ASCII"); *(Charsets + 2) = wxT("BIG5"); *(Charsets + 3) = wxT("BIG5-HKSCS"); *(Charsets + 4) = wxT("BIG5-HKSCS:1999"); *(Charsets + 5) = wxT("BIG5-HKSCS:2001"); *(Charsets + 6) = wxT("CP850"); *(Charsets + 7) = wxT("CP862"); *(Charsets + 8) = wxT("CP866"); *(Charsets + 9) = wxT("CP874"); *(Charsets + 10) = wxT("CP932"); *(Charsets + 11) = wxT("CP936"); *(Charsets + 12) = wxT("CP949"); *(Charsets + 13) = wxT("CP950"); *(Charsets + 14) = wxT("CP1133"); *(Charsets + 15) = wxT("CP1250"); *(Charsets + 16) = wxT("CP1251"); *(Charsets + 17) = wxT("CP1252"); *(Charsets + 18) = wxT("CP1253"); *(Charsets + 19) = wxT("CP1254"); *(Charsets + 20) = wxT("CP1255"); *(Charsets + 21) = wxT("CP1256"); *(Charsets + 22) = wxT("CP1257"); *(Charsets + 23) = wxT("CP1258"); *(Charsets + 24) = wxT("EUC-CN"); *(Charsets + 25) = wxT("EUC-JP"); *(Charsets + 26) = wxT("EUC-KR"); *(Charsets + 27) = wxT("EUC-TW"); *(Charsets + 28) = wxT("GB18030"); *(Charsets + 29) = wxT("GBK"); *(Charsets + 30) = wxT("Georgian-Academy"); *(Charsets + 31) = wxT("Georgian-PS"); *(Charsets + 32) = wxT("HZ"); *(Charsets + 33) = wxT("ISO-2022-CN"); *(Charsets + 34) = wxT("ISO-2022-CN-EXT"); *(Charsets + 35) = wxT("ISO-2022-JP"); *(Charsets + 36) = wxT("ISO-2022-JP-1"); *(Charsets + 37) = wxT("ISO-2022-JP-2"); *(Charsets + 38) = wxT("ISO-2022-KR"); *(Charsets + 39) = wxT("ISO-8859-1"); *(Charsets + 40) = wxT("ISO-8859-2"); *(Charsets + 41) = wxT("ISO-8859-3"); *(Charsets + 42) = wxT("ISO-8859-4"); *(Charsets + 43) = wxT("ISO-8859-5"); *(Charsets + 44) = wxT("ISO-8859-6"); *(Charsets + 45) = wxT("ISO-8859-7"); *(Charsets + 46) = wxT("ISO-8859-8"); *(Charsets + 47) = wxT("ISO-8859-9"); *(Charsets + 48) = wxT("ISO-8859-10"); *(Charsets + 49) = wxT("ISO-8859-11"); *(Charsets + 50) = wxT("ISO-8859-13"); *(Charsets + 51) = wxT("ISO-8859-14"); *(Charsets + 52) = wxT("ISO-8859-15"); *(Charsets + 53) = wxT("ISO-8859-16"); *(Charsets + 54) = wxT("JOHAB"); *(Charsets + 55) = wxT("KOI8-R"); *(Charsets + 56) = wxT("KOI8-U"); *(Charsets + 57) = wxT("KOI8-RU"); *(Charsets + 58) = wxT("KOI8-T"); *(Charsets + 59) = wxT("MacArabic"); *(Charsets + 60) = wxT("MacCentralEurope"); *(Charsets + 61) = wxT("MacCroatian"); *(Charsets + 62) = wxT("MacCyrillic"); *(Charsets + 63) = wxT("MacGreek"); *(Charsets + 64) = wxT("MacHebrew"); *(Charsets + 65) = wxT("MacIceland"); *(Charsets + 66) = wxT("Macintosh"); *(Charsets + 67) = wxT("MacRoman"); *(Charsets + 68) = wxT("MacRomania"); *(Charsets + 69) = wxT("MacThai"); *(Charsets + 70) = wxT("MacTurkish"); *(Charsets + 71) = wxT("MacUkraine"); *(Charsets + 72) = wxT("MuleLao-1"); *(Charsets + 73) = wxT("PT154"); *(Charsets + 74) = wxT("RK1048"); *(Charsets + 75) = wxT("SHIFT_JIS"); *(Charsets + 76) = wxT("TCVN"); *(Charsets + 77) = wxT("TIS-620"); *(Charsets + 77) = wxT("UTF-8"); *(Charsets + 78) = wxT("VISCII"); LocaleCharset = wxString::FromUTF8(gaiaGetLocaleCharset()); DefaultCharset = LocaleCharset; AskCharset = false; HelpPane = false; SqliteHandle = NULL; SpliteInternalCache = NULL; RL2PrivateData = rl2_alloc_private(); SqlitePath = wxT(""); BtnConnect = new wxBitmap(connect_xpm); BtnConnectReadOnly = new wxBitmap(connect_ro_xpm); BtnCreateNew = new wxBitmap(create_new_xpm); BtnDisconnect = new wxBitmap(disconnect_xpm); BtnMemDbLoad = new wxBitmap(memdb_load_xpm); BtnMemDbNew = new wxBitmap(memdb_new_xpm); BtnMemDbClock = new wxBitmap(memdb_clock_xpm); BtnMemDbSave = new wxBitmap(memdb_save_xpm); BtnVacuum = new wxBitmap(vacuum_xpm); BtnSqlScript = new wxBitmap(sql_script_xpm); BtnQueryComposer = new wxBitmap(composer_xpm); BtnLoadShp = new wxBitmap(loadshp_xpm); BtnVirtualShp = new wxBitmap(virtshp_xpm); BtnLoadTxt = new wxBitmap(loadtxt_xpm); BtnVirtualTxt = new wxBitmap(virttxt_xpm); BtnLoadDbf = new wxBitmap(loaddbf_xpm); BtnVirtualDbf = new wxBitmap(virtdbf_xpm); BtnLoadXL = new wxBitmap(loadxl_xpm); BtnVirtualXL = new wxBitmap(virtxl_xpm); BtnNetwork = new wxBitmap(network_xpm); BtnExif = new wxBitmap(exif_xpm); BtnLoadXml = new wxBitmap(loadxml_xpm); BtnSrids = new wxBitmap(srids_xpm); BtnCharset = new wxBitmap(charset_xpm); BtnHelp = new wxBitmap(help_xpm); BtnAbout = new wxBitmap(about_xpm); BtnExit = new wxBitmap(exit_xpm); BtnAttach = new wxBitmap(attach_xpm); BtnSqlLog = new wxBitmap(sql_log_xpm); BtnDbStatus = new wxBitmap(db_status_xpm); BtnCheckGeom = new wxBitmap(checkgeom_xpm); BtnSaneGeom = new wxBitmap(sanegeom_xpm); BtnWFS = new wxBitmap(wfs_xpm); BtnDXF = new wxBitmap(dxf_xpm); // // setting up the application icon // wxIcon MyIcon(icon_xpm); SetIcon(MyIcon); // // setting up panes // TableTree = new MyTableTree(this); QueryView = new MyQueryView(this); RsView = new MyResultSetView(this); Manager.SetManagedWindow(this); wxAuiPaneInfo paneSql = wxAuiPaneInfo().Top(); paneSql.Name(wxT("sql_stmt")); paneSql.CaptionVisible(false); paneSql.Floatable(true); paneSql.Dockable(true); paneSql.Movable(true); paneSql.Gripper(true); paneSql.CloseButton(false); paneSql.BestSize(wxSize(200, 120)); Manager.AddPane(QueryView, paneSql); wxAuiPaneInfo paneView = wxAuiPaneInfo().Centre(); paneView.Name(wxT("result_set")); paneView.CaptionVisible(false); paneView.Floatable(true); paneView.Dockable(true); paneView.Movable(true); paneView.Gripper(false); paneView.CloseButton(false); Manager.AddPane(RsView, paneView); wxAuiPaneInfo paneTree = wxAuiPaneInfo().Left(); paneTree.Name(wxT("tree_view")); paneTree.CaptionVisible(false); paneTree.Floatable(true); paneTree.Dockable(true); paneTree.Movable(true); paneTree.Gripper(true); paneTree.CloseButton(false); paneTree.BestSize(wxSize(200, 480)); Manager.AddPane(TableTree, paneTree, wxPoint(0, 10)); Manager.Update(); Centre(); // // setting up the status bar // StatusBar = new MyStatusBar(this); SetStatusBar(StatusBar); // // setting up the menu bar // wxMenu *menuFile = new wxMenu; wxMenuItem *menuItem; menuItem = new wxMenuItem(menuFile, ID_Connect, wxT("&Connecting an existing SQLite DB")); menuItem->SetBitmap(*BtnConnect); menuFile->Append(menuItem); menuItem = new wxMenuItem(menuFile, ID_Connect_RO, wxT("&Connecting an existing SQLite DB (Read Only)")); menuItem->SetBitmap(*BtnConnectReadOnly); menuFile->Append(menuItem); menuItem = new wxMenuItem(menuFile, ID_CreateNew, wxT("Creating a &New (empty) SQLite DB")); menuItem->SetBitmap(*BtnCreateNew); menuFile->Append(menuItem); wxMenu *memoryMenu = new wxMenu(); menuItem = new wxMenuItem(memoryMenu, ID_MemoryDbLoad, wxT("&Loading an existing DB into the MEMORY-DB")); menuItem->SetBitmap(*BtnMemDbLoad); memoryMenu->Append(menuItem); menuItem = new wxMenuItem(memoryMenu, ID_MemoryDbNew, wxT("Creating a &New (empty) MEMORY-DB")); menuItem->SetBitmap(*BtnMemDbNew); memoryMenu->Append(menuItem); menuItem = new wxMenuItem(memoryMenu, ID_MemoryDbClock, wxT("&AutoSaving the current MEMORY-DB")); menuItem->SetBitmap(*BtnMemDbClock); memoryMenu->Append(menuItem); menuItem = new wxMenuItem(memoryMenu, ID_MemoryDbSave, wxT("&Saving the current MEMORY-DB")); menuItem->SetBitmap(*BtnMemDbSave); memoryMenu->Append(menuItem); menuFile->AppendSubMenu(memoryMenu, wxT("&MEMORY-DB")); menuItem = new wxMenuItem(menuFile, ID_Disconnect, wxT("&Disconnecting current SQLite DB")); menuItem->SetBitmap(*BtnDisconnect); menuFile->Append(menuItem); menuItem = new wxMenuItem(menuFile, ID_Vacuum, wxT("&Optimizing current SQLite DB [VACUUM]")); menuItem->SetBitmap(*BtnVacuum); menuFile->Append(menuItem); menuFile->AppendSeparator(); wxMenu *advancedMenu = new wxMenu(); menuItem = new wxMenuItem(advancedMenu, ID_SqlScript, wxT("&Execute SQL script")); menuItem->SetBitmap(*BtnSqlScript); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_QueryViewComposer, wxT("Query/View &Composer")); menuItem->SetBitmap(*BtnQueryComposer); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_LoadShp, wxT("&Load Shapefile")); menuItem->SetBitmap(*BtnLoadShp); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_VirtualShp, wxT("&Virtual Shapefile")); menuItem->SetBitmap(*BtnVirtualShp); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_LoadTxt, wxT("Load CSV/&TXT")); menuItem->SetBitmap(*BtnLoadTxt); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_VirtualTxt, wxT("Virtual &CSV/TXT")); menuItem->SetBitmap(*BtnVirtualTxt); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_LoadDbf, wxT("Load &DBF")); menuItem->SetBitmap(*BtnLoadDbf); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_VirtualDbf, wxT("Virtual &DBF")); menuItem->SetBitmap(*BtnVirtualDbf); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_LoadXL, wxT("Load &XLS")); menuItem->SetBitmap(*BtnLoadXL); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_VirtualXL, wxT("Virtual &XLS")); menuItem->SetBitmap(*BtnVirtualXL); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_Network, wxT("Build &Network")); menuItem->SetBitmap(*BtnNetwork); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_Exif, wxT("Import &EXIF photos")); menuItem->SetBitmap(*BtnExif); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_LoadXml, wxT("Import &XML Documents")); menuItem->SetBitmap(*BtnLoadXml); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_WFS, wxT("Import data from &WFS datasource")); menuItem->SetBitmap(*BtnWFS); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_DXF, wxT("Import &DXF drawings")); menuItem->SetBitmap(*BtnDXF); advancedMenu->Append(menuItem); advancedMenu->AppendSeparator(); menuItem = new wxMenuItem(advancedMenu, ID_Srids, wxT("&Search SRID by name")); menuItem->SetBitmap(*BtnSrids); advancedMenu->Append(menuItem); menuItem = new wxMenuItem(advancedMenu, ID_Charset, wxT("&Default Output Charset")); menuItem->SetBitmap(*BtnCharset); advancedMenu->Append(menuItem); menuFile->AppendSubMenu(advancedMenu, wxT("&Advanced")); menuFile->AppendSeparator(); menuItem = new wxMenuItem(menuFile, ID_Attach, wxT("&Attach DataBase")); menuItem->SetBitmap(*BtnAttach); menuFile->Append(menuItem); menuFile->AppendSeparator(); menuItem = new wxMenuItem(menuFile, ID_SqlLog, wxT("&SQL Log"), wxT("&SQL Log"), wxITEM_CHECK); menuFile->Append(menuItem); menuItem = new wxMenuItem(menuFile, ID_DbStatus, wxT("&DB Status")); menuFile->Append(menuItem); menuFile->AppendSeparator(); menuItem = new wxMenuItem(menuFile, ID_CheckGeom, wxT("&Check Geometries")); menuFile->Append(menuItem); menuItem = new wxMenuItem(menuFile, ID_SaneGeom, wxT("&Sanitize Geometries")); menuFile->Append(menuItem); menuFile->AppendSeparator(); menuItem = new wxMenuItem(menuFile, ID_Help, wxT("&Help")); menuItem->SetBitmap(*BtnHelp); menuFile->Append(menuItem); menuItem = new wxMenuItem(menuFile, wxID_ABOUT, wxT("&About ...")); menuItem->SetBitmap(*BtnAbout); menuFile->Append(menuItem); menuFile->AppendSeparator(); menuItem = new wxMenuItem(menuFile, wxID_EXIT, wxT("&Quit")); menuItem->SetBitmap(*BtnExit); menuFile->Append(menuItem); wxMenuBar *menuBar = new wxMenuBar; menuBar->Append(menuFile, wxT("&Files")); SetMenuBar(menuBar); // // setting up menu initial state // menuBar->Enable(ID_Disconnect, false); menuBar->Enable(ID_MemoryDbClock, false); menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_Vacuum, false); menuBar->Enable(ID_SqlScript, false); menuBar->Enable(ID_QueryViewComposer, false); menuBar->Enable(ID_LoadShp, false); menuBar->Enable(ID_VirtualShp, false); menuBar->Enable(ID_LoadTxt, false); menuBar->Enable(ID_VirtualTxt, false); menuBar->Enable(ID_LoadDbf, false); menuBar->Enable(ID_VirtualDbf, false); menuBar->Enable(ID_LoadXL, false); menuBar->Enable(ID_VirtualXL, false); menuBar->Enable(ID_Network, false); menuBar->Enable(ID_Exif, false); menuBar->Enable(ID_LoadXml, false); menuBar->Enable(ID_Srids, false); menuBar->Enable(ID_Attach, false); menuBar->Enable(ID_SqlLog, false); menuBar->Enable(ID_DbStatus, false); menuBar->Enable(ID_CheckGeom, false); menuBar->Enable(ID_SaneGeom, false); menuBar->Enable(ID_WFS, false); menuBar->Enable(ID_DXF, false); // // setting up the toolbar // wxToolBar *toolBar = CreateToolBar(); toolBar->AddTool(ID_Connect, wxT("Connecting an existing SQLite DB"), *BtnConnect, wxNullBitmap, wxITEM_NORMAL, wxT("Connecting an existing SQLite DB")); toolBar->AddTool(ID_Connect_RO, wxT("Connecting an existing SQLite DB (Read Only)"), *BtnConnectReadOnly, wxNullBitmap, wxITEM_NORMAL, wxT("Connecting an existing SQLite DB (Read Only)")); toolBar->AddTool(ID_CreateNew, wxT("Creating a &New (empty) SQLite DB"), *BtnCreateNew, wxNullBitmap, wxITEM_NORMAL, wxT("Creating a &New (empty) SQLite DB")); toolBar->AddTool(ID_MemoryDbLoad, wxT("Loading an existing DB into the MEMORY-DB"), *BtnMemDbLoad, wxNullBitmap, wxITEM_NORMAL, wxT("Loading an existing DB into the MEMORY-DB")); toolBar->AddTool(ID_MemoryDbNew, wxT("Creating a New (empty) MEMORY-DB"), *BtnMemDbNew, wxNullBitmap, wxITEM_NORMAL, wxT("Creating a New (empty) MEMORY-DB")); toolBar->AddTool(ID_MemoryDbClock, wxT("AutoSaving the current MEMORY-DB"), *BtnMemDbClock, wxNullBitmap, wxITEM_NORMAL, wxT("AutoSaving the current MEMORY-DB")); toolBar->AddTool(ID_MemoryDbSave, wxT("Saving the current MEMORY-DB"), *BtnMemDbSave, wxNullBitmap, wxITEM_NORMAL, wxT("Saving the current MEMORY-DB")); toolBar->AddTool(ID_Disconnect, wxT("Disconnecting current SQLite DB"), *BtnDisconnect, wxNullBitmap, wxITEM_NORMAL, wxT("Disconnecting current SQLite DB")); toolBar->AddTool(ID_Vacuum, wxT("Optimizing current SQLite DB [VACUUM]"), *BtnVacuum, wxNullBitmap, wxITEM_NORMAL, wxT("Optimizing current SQLite DB [VACUUM]")); //toolBar->AddSeparator(); toolBar->AddTool(ID_Attach, wxT("Attach DataBase"), *BtnAttach, wxNullBitmap, wxITEM_NORMAL, wxT("Attach DataBase")); //toolBar->AddSeparator(); toolBar->AddTool(ID_SqlLog, wxT("SQL Log"), *BtnSqlLog, wxNullBitmap, wxITEM_CHECK, wxT("SQL Log")); toolBar->AddTool(ID_DbStatus, wxT("DB Status"), *BtnDbStatus, wxNullBitmap, wxITEM_NORMAL, wxT("DB Status")); //toolBar->AddSeparator(); toolBar->AddTool(ID_CheckGeom, wxT("Check Geometries"), *BtnCheckGeom, wxNullBitmap, wxITEM_NORMAL, wxT("Check Geometries")); toolBar->AddTool(ID_SaneGeom, wxT("Sanitize Geometries"), *BtnSaneGeom, wxNullBitmap, wxITEM_NORMAL, wxT("Sanitize Geometries")); //toolBar->AddSeparator(); toolBar->AddTool(ID_SqlScript, wxT("Execute SQL script"), *BtnSqlScript, wxNullBitmap, wxITEM_NORMAL, wxT("Execute SQL script")); //toolBar->AddSeparator(); toolBar->AddTool(ID_QueryViewComposer, wxT("Query/View Composer"), *BtnQueryComposer, wxNullBitmap, wxITEM_NORMAL, wxT("Query/View Composer")); //toolBar->AddSeparator(); toolBar->AddTool(ID_LoadShp, wxT("Load Shapefile"), *BtnLoadShp, wxNullBitmap, wxITEM_NORMAL, wxT("Load Shapefile")); toolBar->AddTool(ID_VirtualShp, wxT("Virtual Shapefile"), *BtnVirtualShp, wxNullBitmap, wxITEM_NORMAL, wxT("Virtual Shapefile")); //toolBar->AddSeparator(); toolBar->AddTool(ID_LoadTxt, wxT("Load CSV/TXT"), *BtnLoadTxt, wxNullBitmap, wxITEM_NORMAL, wxT("Load CSV/TXT")); toolBar->AddTool(ID_VirtualTxt, wxT("Virtual CSV/TXT"), *BtnVirtualTxt, wxNullBitmap, wxITEM_NORMAL, wxT("Virtual CSV/TXT")); //toolBar->AddSeparator(); toolBar->AddTool(ID_LoadDbf, wxT("Load DBF"), *BtnLoadDbf, wxNullBitmap, wxITEM_NORMAL, wxT("Load DBF")); toolBar->AddTool(ID_VirtualDbf, wxT("Virtual DBF"), *BtnVirtualDbf, wxNullBitmap, wxITEM_NORMAL, wxT("Virtual DBF")); //toolBar->AddSeparator(); toolBar->AddTool(ID_LoadXL, wxT("Load XLS"), *BtnLoadXL, wxNullBitmap, wxITEM_NORMAL, wxT("Load XLS")); toolBar->AddTool(ID_VirtualXL, wxT("Virtual XLS"), *BtnVirtualXL, wxNullBitmap, wxITEM_NORMAL, wxT("Virtual XLS")); //toolBar->AddSeparator(); toolBar->AddTool(ID_Network, wxT("Build Network"), *BtnNetwork, wxNullBitmap, wxITEM_NORMAL, wxT("Build Network")); //toolBar->AddSeparator(); toolBar->AddTool(ID_Exif, wxT("Import EXIF photos"), *BtnExif, wxNullBitmap, wxITEM_NORMAL, wxT("Import EXIF photos")); toolBar->AddTool(ID_LoadXml, wxT("Import XML Documents"), *BtnLoadXml, wxNullBitmap, wxITEM_NORMAL, wxT("Import XML Documents")); toolBar->AddTool(ID_WFS, wxT("Import data from WFS datasource"), *BtnWFS, wxNullBitmap, wxITEM_NORMAL, wxT("Import data from WFS datasource")); toolBar->AddTool(ID_DXF, wxT("Import DXF drawings"), *BtnDXF, wxNullBitmap, wxITEM_NORMAL, wxT("Import DXF drawings")); //toolBar->AddSeparator(); toolBar->AddTool(ID_Srids, wxT("Search SRID by name"), *BtnSrids, wxNullBitmap, wxITEM_NORMAL, wxT("Search SRID by name")); //toolBar->AddSeparator(); toolBar->AddTool(ID_Charset, wxT("Default Output Charset"), *BtnCharset, wxNullBitmap, wxITEM_NORMAL, wxT("Default Output Charset")); //toolBar->AddSeparator(); toolBar->AddTool(ID_Help, wxT("Help"), *BtnHelp, wxNullBitmap, wxITEM_NORMAL, wxT("Help")); toolBar->AddTool(wxID_ABOUT, wxT("About ..."), *BtnAbout, wxNullBitmap, wxITEM_NORMAL, wxT("About ...")); //toolBar->AddSeparator(); toolBar->AddTool(wxID_EXIT, wxT("Quit"), *BtnExit, wxNullBitmap, wxITEM_NORMAL, wxT("Quit")); toolBar->Realize(); SetToolBar(toolBar); // // setting up the toolbar initial state // toolBar->EnableTool(ID_Disconnect, false); toolBar->EnableTool(ID_MemoryDbClock, false); toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_Vacuum, false); toolBar->EnableTool(ID_SqlScript, false); toolBar->EnableTool(ID_QueryViewComposer, false); toolBar->EnableTool(ID_LoadShp, false); toolBar->EnableTool(ID_VirtualShp, false); toolBar->EnableTool(ID_LoadTxt, false); toolBar->EnableTool(ID_VirtualTxt, false); toolBar->EnableTool(ID_LoadDbf, false); toolBar->EnableTool(ID_VirtualDbf, false); toolBar->EnableTool(ID_LoadXL, false); toolBar->EnableTool(ID_VirtualXL, false); toolBar->EnableTool(ID_Network, false); toolBar->EnableTool(ID_Exif, false); toolBar->EnableTool(ID_LoadXml, false); toolBar->EnableTool(ID_Srids, false); toolBar->EnableTool(ID_Attach, false); toolBar->EnableTool(ID_SqlLog, false); toolBar->EnableTool(ID_DbStatus, false); toolBar->EnableTool(ID_CheckGeom, false); toolBar->EnableTool(ID_SaneGeom, false); toolBar->EnableTool(ID_WFS, false); toolBar->EnableTool(ID_DXF, false); // updating the status bar UpdateStatusBar(); // // setting up event handlers for menu and toolbar // Connect(ID_Connect, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnConnect); Connect(ID_Connect_RO, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnConnectReadOnly); Connect(ID_CreateNew, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnCreateNew); Connect(ID_Disconnect, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnDisconnect); Connect(ID_MemoryDbLoad, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMemoryDbLoad); Connect(ID_MemoryDbNew, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMemoryDbNew); Connect(ID_MemoryDbClock, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMemoryDbClock); Connect(ID_MemoryDbSave, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnMemoryDbSave); Connect(ID_Vacuum, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnVacuum); Connect(ID_SqlScript, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnSqlScript); Connect(ID_QueryViewComposer, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnQueryViewComposer); Connect(ID_LoadShp, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnLoadShp); Connect(ID_VirtualShp, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnVirtualShp); Connect(ID_LoadTxt, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnLoadTxt); Connect(ID_VirtualTxt, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnVirtualTxt); Connect(ID_LoadDbf, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnLoadDbf); Connect(ID_VirtualDbf, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnVirtualDbf); Connect(ID_LoadXL, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnLoadXL); Connect(ID_VirtualXL, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnVirtualXL); Connect(ID_Network, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnNetwork); Connect(ID_Exif, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnImportExifPhotos); Connect(ID_LoadXml, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnImportXmlDocuments); Connect(ID_WFS, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnImportWFS); Connect(ID_DXF, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnImportDXF); Connect(ID_Srids, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnSrids); Connect(ID_Charset, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnCharset); Connect(ID_Attach, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnAttachDatabase); Connect(ID_SqlLog, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnSqlLog); Connect(ID_DbStatus, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnDbStatus); Connect(ID_CheckGeom, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnCheckGeometries); Connect(ID_SaneGeom, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnSanitizeGeometries); Connect(ID_Help, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnHelp); Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnAbout); Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyFrame::OnQuit); Connect(wxID_ANY, wxEVT_MOTION, wxMouseEventHandler(MyFrame::OnMouseMove), NULL, this); // // setting up event handlers for mouse // TableTree->Connect(wxID_ANY, wxEVT_MOTION, wxMouseEventHandler(MyFrame::OnMouseMove), NULL, this); GetMenuBar()->Connect(wxID_ANY, wxEVT_MOTION, wxMouseEventHandler(MyFrame::OnMouseMove), NULL, this); GetStatusBar()->Connect(wxID_ANY, wxEVT_MOTION, wxMouseEventHandler(MyFrame::OnMouseMove), NULL, this); // // setting up a Timer event handler for AutoSave // Connect(ID_AUTO_SAVE_TIMER, wxEVT_TIMER, wxTimerEventHandler(MyFrame::OnTimerAutoSave), NULL, this); } MyFrame::~MyFrame() { // // main GUI frame destructor // if (TimerAutoSave) { TimerAutoSave->Stop(); delete TimerAutoSave; } LastDitchMemoryDbSave(); ConfigLayout = Manager.SavePerspective(); GetPosition(&ConfigPaneX, &ConfigPaneY); GetSize(&ConfigPaneWidth, &ConfigPaneHeight); DoUpdateRL2MaxThreads(); if (SqliteHandle) sqlite3_close(SqliteHandle); if (SpliteInternalCache) spatialite_cleanup_ex(SpliteInternalCache); spatialite_shutdown(); SaveConfig(); Manager.UnInit(); if (BtnConnect != NULL) delete BtnConnect; if (BtnConnectReadOnly != NULL) delete BtnConnectReadOnly; if (BtnCreateNew != NULL) delete BtnCreateNew; if (BtnDisconnect != NULL) delete BtnDisconnect; if (BtnMemDbLoad != NULL) delete BtnMemDbLoad; if (BtnMemDbNew != NULL) delete BtnMemDbNew; if (BtnMemDbClock != NULL) delete BtnMemDbClock; if (BtnMemDbSave != NULL) delete BtnMemDbSave; if (BtnVacuum != NULL) delete BtnVacuum; if (BtnSqlScript != NULL) delete BtnSqlScript; if (BtnQueryComposer != NULL) delete BtnQueryComposer; if (BtnLoadShp != NULL) delete BtnLoadShp; if (BtnVirtualShp != NULL) delete BtnVirtualShp; if (BtnLoadTxt != NULL) delete BtnLoadTxt; if (BtnVirtualTxt != NULL) delete BtnVirtualTxt; if (BtnLoadDbf != NULL) delete BtnLoadDbf; if (BtnVirtualDbf != NULL) delete BtnVirtualDbf; if (BtnLoadXL != NULL) delete BtnLoadXL; if (BtnVirtualXL != NULL) delete BtnVirtualXL; if (BtnNetwork != NULL) delete BtnNetwork; if (BtnExif != NULL) delete BtnExif; if (BtnLoadXml != NULL) delete BtnLoadXml; if (BtnSrids != NULL) delete BtnSrids; if (BtnCharset != NULL) delete BtnCharset; if (BtnWFS != NULL) delete BtnWFS; if (BtnDXF != NULL) delete BtnDXF; if (BtnHelp != NULL) delete BtnHelp; if (BtnAttach != NULL) delete BtnAttach; if (BtnSqlLog != NULL) delete BtnSqlLog; if (BtnDbStatus != NULL) delete BtnDbStatus; if (BtnCheckGeom != NULL) delete BtnCheckGeom; if (BtnSaneGeom != NULL) delete BtnSaneGeom; if (BtnAbout != NULL) delete BtnAbout; if (BtnExit != NULL) delete BtnExit; if (Charsets) delete[]Charsets; if (CharsetsNames) delete[]CharsetsNames; if (RL2PrivateData) rl2_cleanup_private(RL2PrivateData); } void MyFrame::SaveConfig() { // // saves layout configuration // wxConfig *config = new wxConfig(wxT("SpatialiteGui")); config->Write(wxT("Layout"), ConfigLayout); config->Write(wxT("PaneX"), ConfigPaneX); config->Write(wxT("PaneY"), ConfigPaneY); config->Write(wxT("PaneWidth"), ConfigPaneWidth); config->Write(wxT("PaneHeight"), ConfigPaneHeight); config->Write(wxT("SqlitePath"), SqlitePath); config->Write(wxT("LastDirectory"), LastDirectory); config->Write(wxT("WfsGetCapabilitiesURL"), WfsGetCapabilitiesURL); config->Write(wxT("HttpProxy"), HttpProxy); config->Write(wxT("ReadOnlyConnection"), ReadOnlyConnection); config->Write(wxT("RL2MaxThreads"), RL2MaxThreads); delete config; } void MyFrame::LoadConfig(wxString & externalPath) { // // loads layout configuration // ConfigLayout = wxT(""); ConfigDbPath = wxT(""); ConfigDir = wxT(""); wxConfig *config = new wxConfig(wxT("SpatialiteGui")); config->Read(wxT("Layout"), &ConfigLayout); config->Read(wxT("PaneX"), &ConfigPaneX, -1); config->Read(wxT("PaneY"), &ConfigPaneY, -1); config->Read(wxT("PaneWidth"), &ConfigPaneWidth, -1); config->Read(wxT("PaneHeight"), &ConfigPaneHeight, -1); config->Read(wxT("SqlitePath"), &ConfigDbPath); config->Read(wxT("LastDirectory"), &ConfigDir); config->Read(wxT("WfsGetCapabilitiesURL"), &WfsGetCapabilitiesURL); config->Read(wxT("HttpProxy"), &HttpProxy); config->Read(wxT("ReadOnlyConnection"), &ReadOnlyConnection); config->Read(wxT("RL2MaxThreads"), &RL2MaxThreads); delete config; Hide(); if (externalPath.Len() > 0) { // applying the external path wxFileName file(externalPath); ConfigDir = file.GetPath(); ConfigDbPath = externalPath; } if (ConfigLayout.Len() > 0) Manager.LoadPerspective(ConfigLayout, true); if (ConfigPaneX >= 0 && ConfigPaneY >= 0 && ConfigPaneWidth > 0 && ConfigPaneHeight > 0) SetSize(ConfigPaneX, ConfigPaneY, ConfigPaneWidth, ConfigPaneHeight); if (ConfigDir.Len() > 0) LastDirectory = ConfigDir; if (ConfigDbPath.Len() > 0) { SqlitePath = ConfigDbPath; if (OpenDB(ReadOnlyConnection) == false) SqlitePath = wxT(""); else { bool metadata = CheckMetadata(); wxMenuBar *menuBar = GetMenuBar(); menuBar->Enable(ID_Connect, false); menuBar->Enable(ID_Connect_RO, false); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); if (MemoryDatabase == true) { menuBar->Enable(ID_MemoryDbSave, true); menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); menuBar->Enable(ID_LoadDbf, true); menuBar->Enable(ID_VirtualDbf, true); menuBar->Enable(ID_LoadXL, true); menuBar->Enable(ID_VirtualXL, true); menuBar->Enable(ID_Network, true); menuBar->Enable(ID_Exif, true); menuBar->Enable(ID_LoadXml, true); menuBar->Enable(ID_WFS, true); menuBar->Enable(ID_DXF, true); menuBar->Enable(ID_Srids, metadata); menuBar->Enable(ID_Attach, true); menuBar->Enable(ID_SqlLog, true); menuBar->Enable(ID_DbStatus, true); menuBar->Enable(ID_CheckGeom, true); menuBar->Enable(ID_SaneGeom, true); EnableSqlLog(); menuBar->Check(ID_SqlLog, SqlLogEnabled); wxToolBar *toolBar = GetToolBar(); toolBar->EnableTool(ID_Connect, false); toolBar->EnableTool(ID_Connect_RO, false); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); if (MemoryDatabase == true) { toolBar->EnableTool(ID_MemoryDbSave, true); toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); toolBar->EnableTool(ID_LoadDbf, true); toolBar->EnableTool(ID_VirtualDbf, true); toolBar->EnableTool(ID_LoadXL, true); toolBar->EnableTool(ID_VirtualXL, true); toolBar->EnableTool(ID_Network, true); toolBar->EnableTool(ID_Exif, true); toolBar->EnableTool(ID_LoadXml, true); toolBar->EnableTool(ID_WFS, true); toolBar->EnableTool(ID_DXF, true); toolBar->EnableTool(ID_Srids, metadata); toolBar->EnableTool(ID_Attach, true); toolBar->EnableTool(ID_SqlLog, true); toolBar->ToggleTool(ID_SqlLog, SqlLogEnabled); toolBar->EnableTool(ID_DbStatus, true); toolBar->EnableTool(ID_CheckGeom, true); toolBar->EnableTool(ID_SaneGeom, true); UpdateStatusBar(); } } Show(); if (AutoFDOmsg.Len() > 0) { wxMessageBox(AutoFDOmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoFDOmsg = wxT(""); } if (AutoGPKGmsg.Len() > 0) { wxMessageBox(AutoGPKGmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoGPKGmsg = wxT(""); } } void MyFrame::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // EXIT - event handler // CloseDB(); Close(true); } void MyFrame::OnAttachDatabase(wxCommandEvent & WXUNUSED(event)) { // // Attach Database - event handler // int ret; wxString lastDir; wxString path; wxString suffixList = wxT ("SpatiaLite DB (*.sqlite;*.atlas;*.db;*.gpkg)|*.sqlite;*.atlas;*.db;*.gpkg|"); suffixList += wxT("SQLite DB (*.sqlite)|*.sqlite|"); suffixList += wxT("LibreAtlas DB (*.atlas)|*.atlas|"); suffixList += wxT("SQLite DB (*.db)|*.db|"); suffixList += wxT("OGC GeoPackage (*.gpkg)|*.gpkg|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("Attach DataBase"), wxT(""), wxT("db.sqlite"), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); if (IsValidSqliteFile(path) == false) return; if (DoAttachDatabase(path) == true) { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); SetLastDirectory(lastDir); InitTableTree(); } } } bool MyFrame::IsValidSqliteFile(wxString & db_path) { // checking the internal Magic Number wxString msg = wxT("Unable to connect: ") + db_path; bool ret = false; char path[1024]; char magic[16]; FILE *in; strcpy(path, db_path.ToUTF8()); in = fopen(path, "rb"); if (in == NULL) { msg += wxT("\n\nNot existing file or forbidden access"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return false; } if (fread(magic, 1, 16, in) == 16) { int count = 0; if (magic[0] == 0x53) count++; if (magic[1] == 0x51) count++; if (magic[2] == 0x4c) count++; if (magic[3] == 0x69) count++; if (magic[4] == 0x74) count++; if (magic[5] == 0x65) count++; if (magic[6] == 0x20) count++; if (magic[7] == 0x66) count++; if (magic[8] == 0x6f) count++; if (magic[9] == 0x72) count++; if (magic[10] == 0x6d) count++; if (magic[11] == 0x61) count++; if (magic[12] == 0x74) count++; if (magic[13] == 0x20) count++; if (magic[14] == 0x33) count++; if (magic[15] == 0x00) count++; if (count == 16) ret = true; } fclose(in); if (ret == false) { msg += wxT("\n\nNot a valid SQLite DB-file: invalid magic number"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } return ret; } void MyFrame::EnableSqlLog() { // // enables the SQL Log if the currently connected DB is v.4.0.0 // if (GetMetaDataType() == METADATA_CURRENT) SqlLogEnabled = true; else SqlLogEnabled = false; } void MyFrame::OnSqlLog(wxCommandEvent & WXUNUSED(event)) { // // SQL Log - event handler // wxMenuBar *menuBar = GetMenuBar(); wxToolBar *toolBar = GetToolBar(); if (SqlLogEnabled == true) { SqlLogEnabled = false; menuBar->Check(ID_SqlLog, false); toolBar->ToggleTool(ID_SqlLog, false); } else { EnableSqlLog(); menuBar->Check(ID_SqlLog, SqlLogEnabled); toolBar->ToggleTool(ID_SqlLog, SqlLogEnabled); } } void MyFrame::OnDbStatus(wxCommandEvent & WXUNUSED(event)) { // // DB Status and internal statistics // DbStatusDialog *stats = new DbStatusDialog(); stats->Create(this); stats->Show(); } void MyFrame::OnCheckGeometries(wxCommandEvent & WXUNUSED(event)) { // // Checking all geometry columns // wxString msg = wxT("Do you really intend checking for validity all Geometries ?\n\n"); msg += wxT ("This will imply evaluating ST_IsValid() for each single Geometry stored\n"); msg += wxT ("within any \"layer\" defined in \"geometry_columns\", and could require\n"); msg += wxT("a substantial time for a huge DB\n\n"); msg += wxT("A HTML diagnostic report will be created."); int ret = wxMessageBox(msg, wxT("spatialite_gui"), wxYES_NO | wxICON_QUESTION, this); if (ret != wxYES) return; char *err_msg = NULL; char output_dir[1024]; wxDirDialog dirDialog(this, wxT("Directory for Diagnostic Report")); ret = dirDialog.ShowModal(); if (ret == wxID_OK) { strcpy(output_dir, dirDialog.GetPath().ToUTF8()); ::wxBeginBusyCursor(); int invalids; ret = check_all_geometry_columns_r(GetSpliteInternalCache(), GetSqlite(), output_dir, &invalids, &err_msg); ::wxEndBusyCursor(); if (ret == 0) { // reporting some error condition msg = wxT("Some unexpected error occurred:\n\n"); if (err_msg != NULL) { msg += wxString::FromUTF8(err_msg); free(err_msg); } else msg += wxT("Sorry, no further details are available"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { int mode; if (invalids > 0) { msg = wxT ("ATTENTION: some invalid Geometries have been detected !!!\n\n"); mode = wxICON_WARNING; } else { msg = wxT ("No invalid Geometries have been detected; the whole DB is full valid\n\n"); mode = wxICON_INFORMATION; } msg += wxT("A full diagnostic report has been created.\n"); msg += wxT ("Please point your WEB Browser at the following HTML document containing the report:\n\n"); #if defined(_WIN32) const char *delim = "\\"; #else const char *delim = "/"; #endif msg += dirDialog.GetPath() + wxString::FromUTF8(delim) + wxT("index.html"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | mode, this); } } } void MyFrame::OnSanitizeGeometries(wxCommandEvent & WXUNUSED(event)) { // // Sanitizing all invalid geometries // int ret; SanitizeAllGeometriesDialog dlg; dlg.Create(this); ret = dlg.ShowModal(); if (ret != wxYES) return; char tmp_prefix[1024]; char *err_msg = NULL; char output_dir[1024]; wxString msg; strcpy(tmp_prefix, dlg.GetTmpPrefix().ToUTF8()); wxDirDialog dirDialog(this, wxT("Directory for Diagnostic Report")); ret = dirDialog.ShowModal(); if (ret == wxID_OK) { strcpy(output_dir, dirDialog.GetPath().ToUTF8()); ::wxBeginBusyCursor(); int not_validated; ret = sanitize_all_geometry_columns_r(GetSpliteInternalCache(), GetSqlite(), tmp_prefix, output_dir, ¬_validated, &err_msg); ::wxEndBusyCursor(); if (ret == 0) { // reporting some error condition msg = wxT("Some unexpected error occurred:\n\n"); if (err_msg != NULL) { msg += wxString::FromUTF8(err_msg); free(err_msg); } else msg += wxT("Sorry, no further details are available"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { int mode; if (not_validated > 0) { msg = wxT ("ATTENTION: some invalid Geometries still remain invalid !!!\n\n"); mode = wxICON_WARNING; } else { msg = wxT ("All invalid Geometries have been saned; the whole DB is now full valid\n\n"); mode = wxICON_INFORMATION; } msg += wxT("A full diagnostic report has been created.\n"); msg += wxT ("Please point your WEB Browser at the following HTML document containing the report:\n\n"); #if defined(_WIN32) const char *delim = "\\"; #else const char *delim = "/"; #endif msg += dirDialog.GetPath() + wxString::FromUTF8(delim) + wxT("index.html"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | mode, this); } } } void MyFrame::OnHelp(wxCommandEvent & WXUNUSED(event)) { // // HELP - event handler // if (HelpPane == true) return; HelpDialog *help = new HelpDialog(this); help->Show(); } void MyFrame::OnAbout(wxCommandEvent & WXUNUSED(event)) { // // ABOUT dialog - event handler // char ver[128]; wxAboutDialogInfo dlg; dlg.SetIcon(wxIcon(icon_info_xpm)); dlg.SetName(wxT("spatialite_gui")); const char *version = VERSION; dlg.SetVersion(wxString::FromUTF8(version)); wxString str = wxT("a GUI-tool for SQLite / SpatiaLite\n\n"); sprintf(ver, "%d.%d.%d", wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER); str += wxT("wxWidgets version ") + wxString::FromUTF8(ver) + wxT("\n"); strcpy(ver, spatialite_version()); str += wxT("SpatiaLite version ") + wxString::FromUTF8(ver) + wxT("\n"); strcpy(ver, rl2_version()); str += wxT("RasterLite2 version ") + wxString::FromUTF8(ver) + wxT("\n"); strcpy(ver, sqlite3_libversion()); str += wxT("SQLite version ") + wxString::FromUTF8(ver) + wxT("\n"); strcpy(ver, GEOSversion()); str += wxT("GEOS version ") + wxString::FromUTF8(ver) + wxT("\n"); strcpy(ver, pj_get_release()); str += wxT("PROJ.4 version ") + wxString::FromUTF8(ver) + wxT("\n"); if (GetLwGeomVersion(ver)) { // printing out the LWGEOM version if supported str += wxT("LWGEOM version ") + wxString::FromUTF8(ver) + wxT("\n"); } if (GetLibXml2Version(ver)) { // printing out the LIBXML2 version if supported str += wxT("LIBXML2 version ") + wxString::FromUTF8(ver) + wxT("\n"); } str += wxT("\nSQLite's extensions: 'SpatiaLite', 'VirtualShape', 'VirtualDbf',\n"); str += wxT("'VirtualXL', 'VirtualText', 'VirtualXPath', 'VirtualNetwork',\n"); str += wxT("'RTree', 'MbrCache', 'VirtualBBox', 'VirtualFDO', 'VirtualGPKG',\n"); str += wxT("'RasterLite2'\n\n"); strcpy(ver, spatialite_target_cpu()); str += wxT("Target CPU ") + wxString::FromUTF8(ver) + wxT("\n"); dlg.SetDescription(str); dlg.SetCopyright(wxT("by Alessandro Furieri - 2008/2014")); dlg.SetWebSite(wxT("http://www.gaia-gis.it")); wxString license = wxT("This program is free software; you can redistribute it\n"); license += wxT("and/or modify it under the terms of the GNU General Public License\n"); license += wxT("(GPL) as published by the Free Software Foundation\n\n"); license += wxT ("A copy of the GPL can be found at\nhttp://www.gnu.org/licenses/gpl.txt"); dlg.SetLicense(license); ::wxAboutBox(dlg); } void MyFrame::OnMouseMove(wxMouseEvent & WXUNUSED(event)) { // // MOUSE motion - event handler // UpdateStatusBar(false); } void MyFrame::UpdateStatusBar(bool changeIcon) { // // updating the status bar // wxString msg; if (StatusBar == NULL) return; if (changeIcon == true) { // changing the current Icon if (IsConnected() == true) { if (ReadOnlyConnection == true) StatusBar->SetReadOnlyIcon(); else { // showing the currently set SECURITY LEVEL if (SecurityRelaxed == true) StatusBar->SetSecurityRelaxedIcon(); else StatusBar->SetSecurityStrongIcon(); } } else StatusBar->SetNotConnectedIcon(); } if (MemoryDatabase == true) { msg = wxT("Current SQLite DB: MEMORY-DB"); StatusBar->SetText(msg); QueryView->ShowControls(); } else { if (SqlitePath.Len() < 1) { msg = wxT("not connected"); StatusBar->SetText(msg); } else { if (ReadOnlyConnection) msg = wxT("Current SQLite DB [READ-ONLY]: ") + SqlitePath; else msg = wxT("Current SQLite DB: ") + SqlitePath; StatusBar->SetText(msg); } if (SqlitePath.Len() < 1) { QueryView->HideControls(); RsView->HideControls(); } else QueryView->ShowControls(); } } void MyFrame::OnConnect(wxCommandEvent & WXUNUSED(event)) { // // connecting to an existent SQLite DB // int ret; wxString lastDir; wxString suffixList = wxT ("SpatiaLite DB (*.sqlite;*.atlas;*.db;*.gpkg)|*.sqlite;*.atlas;*.db;*.gpkg|"); suffixList += wxT("SQLite DB (*.sqlite)|*.sqlite|"); suffixList += wxT("LibreAtlas DB (*.atlas)|*.atlas|"); suffixList += wxT("SQLite DB (*.db)|*.db|"); suffixList += wxT("OGC GeoPackage (*.gpkg)|*.gpkg|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("DB connection"), wxT(""), wxT("db.sqlite"), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { SqlitePath = fileDialog.GetPath(); if (IsValidSqliteFile(SqlitePath) == false) { SqlitePath = wxT(""); return; } if (OpenDB(false) == false) SqlitePath = wxT(""); else { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); SetLastDirectory(lastDir); bool metadata = CheckMetadata(); wxMenuBar *menuBar = GetMenuBar(); menuBar->Enable(ID_Connect, false); menuBar->Enable(ID_Connect_RO, false); menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); if (MemoryDatabase == true) { menuBar->Enable(ID_MemoryDbSave, true); menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); menuBar->Enable(ID_LoadDbf, true); menuBar->Enable(ID_VirtualDbf, true); menuBar->Enable(ID_LoadXL, true); menuBar->Enable(ID_VirtualXL, true); menuBar->Enable(ID_Network, true); menuBar->Enable(ID_Exif, true); menuBar->Enable(ID_LoadXml, true); menuBar->Enable(ID_WFS, true); menuBar->Enable(ID_DXF, true); menuBar->Enable(ID_Srids, metadata); menuBar->Enable(ID_Attach, true); menuBar->Enable(ID_SqlLog, true); menuBar->Enable(ID_DbStatus, true); menuBar->Enable(ID_CheckGeom, true); menuBar->Enable(ID_SaneGeom, true); EnableSqlLog(); menuBar->Check(ID_SqlLog, SqlLogEnabled); wxToolBar *toolBar = GetToolBar(); toolBar->EnableTool(ID_Connect, false); toolBar->EnableTool(ID_Connect_RO, false); toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); if (MemoryDatabase == true) { toolBar->EnableTool(ID_MemoryDbSave, true); toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); toolBar->EnableTool(ID_LoadDbf, true); toolBar->EnableTool(ID_VirtualDbf, true); toolBar->EnableTool(ID_LoadXL, true); toolBar->EnableTool(ID_VirtualXL, true); toolBar->EnableTool(ID_Network, true); toolBar->EnableTool(ID_Exif, true); toolBar->EnableTool(ID_LoadXml, true); toolBar->EnableTool(ID_WFS, true); toolBar->EnableTool(ID_DXF, true); toolBar->EnableTool(ID_Srids, metadata); toolBar->EnableTool(ID_Attach, true); toolBar->EnableTool(ID_SqlLog, true); toolBar->EnableTool(ID_DbStatus, true); toolBar->EnableTool(ID_CheckGeom, true); toolBar->EnableTool(ID_SaneGeom, true); toolBar->ToggleTool(ID_SqlLog, SqlLogEnabled); UpdateStatusBar(); } } if (AutoFDOmsg.Len() > 0) { wxMessageBox(AutoFDOmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoFDOmsg = wxT(""); } if (AutoGPKGmsg.Len() > 0) { wxMessageBox(AutoGPKGmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoGPKGmsg = wxT(""); } } void MyFrame::EnableAllTools(bool mode) { // // enabling - disabling all buttons while executing // a threaded sql query // bool mode2; bool mode3; if (mode == true) { mode2 = HasViewsMetadata(); mode3 = CheckMetadata(); } else { mode2 = false; mode3 = false; } wxMenuBar *menuBar = GetMenuBar(); menuBar->Enable(ID_Disconnect, mode); menuBar->Enable(ID_Vacuum, mode); menuBar->Enable(ID_SqlScript, mode); menuBar->Enable(ID_QueryViewComposer, mode2); menuBar->Enable(ID_LoadShp, mode); menuBar->Enable(ID_VirtualShp, mode); menuBar->Enable(ID_LoadTxt, mode); menuBar->Enable(ID_VirtualTxt, mode); menuBar->Enable(ID_LoadDbf, mode); menuBar->Enable(ID_VirtualDbf, mode); menuBar->Enable(ID_LoadXL, mode); menuBar->Enable(ID_VirtualXL, mode); menuBar->Enable(ID_Network, mode); menuBar->Enable(ID_Exif, mode); menuBar->Enable(ID_LoadXml, mode); menuBar->Enable(ID_WFS, mode); menuBar->Enable(ID_DXF, mode); menuBar->Enable(ID_Srids, mode3); menuBar->Enable(ID_Attach, mode); menuBar->Enable(ID_SqlLog, mode); menuBar->Enable(ID_DbStatus, mode); menuBar->Enable(ID_CheckGeom, mode); menuBar->Enable(ID_SaneGeom, mode); wxToolBar *toolBar = GetToolBar(); toolBar->EnableTool(ID_Disconnect, mode); toolBar->EnableTool(ID_Vacuum, mode); toolBar->EnableTool(ID_SqlScript, mode); toolBar->EnableTool(ID_QueryViewComposer, mode2); toolBar->EnableTool(ID_LoadShp, mode); toolBar->EnableTool(ID_VirtualShp, mode); toolBar->EnableTool(ID_LoadTxt, mode); toolBar->EnableTool(ID_VirtualTxt, mode); toolBar->EnableTool(ID_LoadDbf, mode); toolBar->EnableTool(ID_VirtualDbf, mode); toolBar->EnableTool(ID_LoadXL, mode); toolBar->EnableTool(ID_VirtualXL, mode); toolBar->EnableTool(ID_Network, mode); toolBar->EnableTool(ID_Exif, mode); toolBar->EnableTool(ID_LoadXml, mode); toolBar->EnableTool(ID_WFS, mode); toolBar->EnableTool(ID_DXF, mode); toolBar->EnableTool(ID_Srids, mode3); toolBar->EnableTool(ID_Attach, mode); toolBar->EnableTool(ID_SqlLog, mode); toolBar->EnableTool(ID_DbStatus, mode); toolBar->EnableTool(ID_CheckGeom, mode); toolBar->EnableTool(ID_SaneGeom, mode); } void MyFrame::OnConnectReadOnly(wxCommandEvent & WXUNUSED(event)) { // // connecting to an existent SQLite DB (Read Only) // int ret; wxString lastDir; wxString suffixList = wxT ("SpatiaLite DB (*.sqlite;*.atlas;*.db;*.gpkg)|*.sqlite;*.atlas;*.db;*.gpkg|"); suffixList += wxT("SQLite DB (*.sqlite)|*.sqlite|"); suffixList += wxT("LibreAtlas DB (*.atlas)|*.atlas|"); suffixList += wxT("SQLite DB (*.db)|*.db|"); suffixList += wxT("OGC GeoPackage (*.gpkg)|*.gpkg|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("DB connection"), wxT(""), wxT("db.sqlite"), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { SqlitePath = fileDialog.GetPath(); if (IsValidSqliteFile(SqlitePath) == false) { SqlitePath = wxT(""); return; } if (OpenDB(true) == false) SqlitePath = wxT(""); else { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); SetLastDirectory(lastDir); bool metadata = CheckMetadata(); wxMenuBar *menuBar = GetMenuBar(); menuBar->Enable(ID_Connect, false); menuBar->Enable(ID_Connect_RO, false); menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); if (MemoryDatabase == true) { menuBar->Enable(ID_MemoryDbSave, true); menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); menuBar->Enable(ID_LoadDbf, true); menuBar->Enable(ID_VirtualDbf, true); menuBar->Enable(ID_LoadXL, true); menuBar->Enable(ID_VirtualXL, true); menuBar->Enable(ID_Network, true); menuBar->Enable(ID_Exif, true); menuBar->Enable(ID_LoadXml, true); menuBar->Enable(ID_WFS, true); menuBar->Enable(ID_DXF, true); menuBar->Enable(ID_Srids, metadata); menuBar->Enable(ID_Attach, true); menuBar->Enable(ID_SqlLog, true); menuBar->Enable(ID_DbStatus, true); menuBar->Enable(ID_CheckGeom, true); menuBar->Enable(ID_SaneGeom, true); EnableSqlLog(); menuBar->Check(ID_SqlLog, SqlLogEnabled); wxToolBar *toolBar = GetToolBar(); toolBar->EnableTool(ID_Connect, false); toolBar->EnableTool(ID_Connect_RO, false); toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); if (MemoryDatabase == true) { toolBar->EnableTool(ID_MemoryDbSave, true); toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); toolBar->EnableTool(ID_LoadDbf, true); toolBar->EnableTool(ID_VirtualDbf, true); toolBar->EnableTool(ID_LoadXL, true); toolBar->EnableTool(ID_VirtualXL, true); toolBar->EnableTool(ID_Network, true); toolBar->EnableTool(ID_Exif, true); toolBar->EnableTool(ID_LoadXml, true); toolBar->EnableTool(ID_WFS, true); toolBar->EnableTool(ID_DXF, true); toolBar->EnableTool(ID_Srids, metadata); toolBar->EnableTool(ID_Attach, true); toolBar->EnableTool(ID_SqlLog, true); toolBar->EnableTool(ID_DbStatus, true); toolBar->EnableTool(ID_CheckGeom, true); toolBar->EnableTool(ID_SaneGeom, true); toolBar->ToggleTool(ID_SqlLog, SqlLogEnabled); UpdateStatusBar(); } } if (AutoFDOmsg.Len() > 0) { wxMessageBox(AutoFDOmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoFDOmsg = wxT(""); } if (AutoGPKGmsg.Len() > 0) { wxMessageBox(AutoGPKGmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoGPKGmsg = wxT(""); } } void MyFrame::OnDisconnect(wxCommandEvent & WXUNUSED(event)) { // // disconnecting current SQLite DB // if (TimerAutoSave) { TimerAutoSave->Stop(); delete TimerAutoSave; TimerAutoSave = NULL; } CloseDB(); ExternalSqlitePath = wxT(""); wxMenuBar *menuBar = GetMenuBar(); menuBar->Enable(ID_Connect, true); menuBar->Enable(ID_Connect_RO, true); menuBar->Enable(ID_CreateNew, true); menuBar->Enable(ID_Disconnect, false); menuBar->Enable(ID_MemoryDbLoad, true); menuBar->Enable(ID_MemoryDbNew, true); menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); menuBar->Enable(ID_Vacuum, false); menuBar->Enable(ID_SqlScript, false); menuBar->Enable(ID_QueryViewComposer, false); menuBar->Enable(ID_LoadShp, false); menuBar->Enable(ID_VirtualShp, false); menuBar->Enable(ID_LoadTxt, false); menuBar->Enable(ID_VirtualTxt, false); menuBar->Enable(ID_LoadDbf, false); menuBar->Enable(ID_VirtualDbf, false); menuBar->Enable(ID_LoadXL, false); menuBar->Enable(ID_VirtualXL, false); menuBar->Enable(ID_Network, false); menuBar->Enable(ID_Exif, false); menuBar->Enable(ID_LoadXml, false); menuBar->Enable(ID_WFS, false); menuBar->Enable(ID_DXF, false); menuBar->Enable(ID_Srids, false); menuBar->Enable(ID_Attach, false); menuBar->Enable(ID_SqlLog, false); menuBar->Enable(ID_DbStatus, false); menuBar->Enable(ID_CheckGeom, false); menuBar->Enable(ID_SaneGeom, false); SqlLogEnabled = false; wxToolBar *toolBar = GetToolBar(); toolBar->EnableTool(ID_Connect, true); toolBar->EnableTool(ID_Connect_RO, true); toolBar->EnableTool(ID_CreateNew, true); toolBar->EnableTool(ID_Disconnect, false); toolBar->EnableTool(ID_MemoryDbLoad, true); toolBar->EnableTool(ID_MemoryDbNew, true); toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); toolBar->EnableTool(ID_Vacuum, false); toolBar->EnableTool(ID_SqlScript, false); toolBar->EnableTool(ID_QueryViewComposer, false); toolBar->EnableTool(ID_LoadShp, false); toolBar->EnableTool(ID_VirtualShp, false); toolBar->EnableTool(ID_LoadTxt, false); toolBar->EnableTool(ID_VirtualTxt, false); toolBar->EnableTool(ID_LoadDbf, false); toolBar->EnableTool(ID_VirtualDbf, false); toolBar->EnableTool(ID_LoadXL, false); toolBar->EnableTool(ID_VirtualXL, false); toolBar->EnableTool(ID_Network, false); toolBar->EnableTool(ID_Exif, false); toolBar->EnableTool(ID_LoadXml, false); toolBar->EnableTool(ID_WFS, false); toolBar->EnableTool(ID_DXF, false); toolBar->EnableTool(ID_Srids, false); toolBar->EnableTool(ID_Attach, false); toolBar->EnableTool(ID_SqlLog, false); toolBar->ToggleTool(ID_SqlLog, false); toolBar->EnableTool(ID_DbStatus, false); toolBar->ToggleTool(ID_DbStatus, false); toolBar->EnableTool(ID_CheckGeom, false); toolBar->ToggleTool(ID_CheckGeom, false); toolBar->EnableTool(ID_SaneGeom, false); toolBar->ToggleTool(ID_SaneGeom, false); UpdateStatusBar(); } void MyFrame::OnCreateNew(wxCommandEvent & WXUNUSED(event)) { // // creating a new, empty SQLite DB // int retdlg; int ret; wxString lastDir; bool metadata; wxFileDialog fileDialog(this, wxT("Creating a new, empty DB"), wxT(""), wxT("db.sqlite"), wxT ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); retdlg = fileDialog.ShowModal(); if (retdlg == wxID_OK) { // creating the new DB SqlitePath = fileDialog.GetPath(); ret = CreateDB(); if (ret == false) goto error; metadata = CheckMetadata(); wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); SetLastDirectory(lastDir); wxMenuBar *menuBar = GetMenuBar(); menuBar->Enable(ID_Connect, false); menuBar->Enable(ID_Connect_RO, false); menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); menuBar->Enable(ID_LoadDbf, true); menuBar->Enable(ID_VirtualDbf, true); menuBar->Enable(ID_LoadXL, true); menuBar->Enable(ID_VirtualXL, true); menuBar->Enable(ID_Network, true); menuBar->Enable(ID_Exif, true); menuBar->Enable(ID_LoadXml, true); menuBar->Enable(ID_WFS, true); menuBar->Enable(ID_DXF, true); menuBar->Enable(ID_Srids, metadata); menuBar->Enable(ID_Attach, true); menuBar->Enable(ID_SqlLog, true); menuBar->Enable(ID_DbStatus, true); menuBar->Enable(ID_CheckGeom, true); menuBar->Enable(ID_SaneGeom, true); EnableSqlLog(); menuBar->Check(ID_SqlLog, SqlLogEnabled); wxToolBar *toolBar = GetToolBar(); toolBar->EnableTool(ID_Connect, false); toolBar->EnableTool(ID_Connect_RO, false); toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); toolBar->EnableTool(ID_LoadDbf, true); toolBar->EnableTool(ID_VirtualDbf, true); toolBar->EnableTool(ID_LoadXL, true); toolBar->EnableTool(ID_VirtualXL, true); toolBar->EnableTool(ID_Network, true); toolBar->EnableTool(ID_Exif, true); toolBar->EnableTool(ID_LoadXml, true); toolBar->EnableTool(ID_WFS, true); toolBar->EnableTool(ID_DXF, true); toolBar->EnableTool(ID_Srids, metadata); toolBar->EnableTool(ID_Attach, true); toolBar->EnableTool(ID_SqlLog, true); toolBar->EnableTool(ID_DbStatus, true); toolBar->EnableTool(ID_CheckGeom, true); toolBar->EnableTool(ID_SaneGeom, true); toolBar->ToggleTool(ID_SqlLog, SqlLogEnabled); UpdateStatusBar(); return; } else return; error: unlink(SqlitePath.ToUTF8()); wxString msg = wxT("An error occurred\nno DB was created"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::OnMemoryDbLoad(wxCommandEvent & WXUNUSED(event)) { // // loading an external DB into the MEMORY-DB // sqlite3 *extSqlite = NULL; sqlite3_backup *backup; int retdlg; int ret; wxString lastDir; char path[1024]; wxString error; char *errMsg = NULL; wxFileDialog fileDialog(this, wxT("Loading an existing DB into the MEMORY-DB"), wxT(""), wxT("db.sqlite"), wxT ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); retdlg = fileDialog.ShowModal(); if (retdlg == wxID_OK) { // opening the external DB ExternalSqlitePath = fileDialog.GetPath(); strcpy(path, ExternalSqlitePath.ToUTF8()); // testing for an appropriate Security level TestSecurityRelaxed(path); ret = sqlite3_open_v2(path, &extSqlite, SQLITE_OPEN_READWRITE, NULL); if (ret) { // an error occurred wxString errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); error = wxT("Failure while connecting to DB\n\n"); error += errCause; error += wxT("\n"); goto stop; } ret = sqlite3_open_v2(":memory:", &SqliteHandle, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); if (ret) { // an error occurred wxString errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); error = wxT("MEMORY-DB: an error occurred \n\n"); error += errCause; error += +wxT("\n"); goto stop; } wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); SetLastDirectory(lastDir); backup = sqlite3_backup_init(SqliteHandle, "main", extSqlite, "main"); if (!backup) goto stop; while (1) { ret = sqlite3_backup_step(backup, 1024); if (ret == SQLITE_DONE) break; } ret = sqlite3_backup_finish(backup); sqlite3_close(extSqlite); // setting up the internal cache SpliteInternalCache = spatialite_alloc_connection(); spatialite_init_ex(SqliteHandle, SpliteInternalCache, 0); rl2_init(SqliteHandle, RL2PrivateData, 0); // enabling LOAD_EXTENSION ret = sqlite3_enable_load_extension(SqliteHandle, 1); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to enable LOAD_EXTENSION"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); } // activating Foreign Key constraints ret = sqlite3_exec(SqliteHandle, "PRAGMA foreign_keys = 1", NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to activate FOREIGN_KEY constraints"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); goto stop; } // setting RL2 MaxThreads char sqlmax[1024]; sprintf(sqlmax, "SELECT RL2_SetMaxThreads(%d)", RL2MaxThreads); sqlite3_exec(SqliteHandle, sqlmax, NULL, 0, &errMsg); MemoryDatabase = true; AutoSaveInterval = 120; AutoFDOStart(); AutoGPKGStart(); InitTableTree(); bool metadata = CheckMetadata(); wxMenuBar *menuBar = GetMenuBar(); menuBar->Enable(ID_Connect, false); menuBar->Enable(ID_Connect_RO, false); menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); if (MemoryDatabase == true) { menuBar->Enable(ID_MemoryDbSave, true); menuBar->Enable(ID_MemoryDbClock, true); } else { menuBar->Enable(ID_MemoryDbSave, false); menuBar->Enable(ID_MemoryDbClock, false); } menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); menuBar->Enable(ID_LoadDbf, true); menuBar->Enable(ID_VirtualDbf, true); menuBar->Enable(ID_LoadXL, true); menuBar->Enable(ID_VirtualXL, true); menuBar->Enable(ID_Network, true); menuBar->Enable(ID_Exif, true); menuBar->Enable(ID_LoadXml, true); menuBar->Enable(ID_WFS, true); menuBar->Enable(ID_DXF, true); menuBar->Enable(ID_Srids, metadata); menuBar->Enable(ID_Attach, true); menuBar->Enable(ID_SqlLog, true); menuBar->Enable(ID_DbStatus, true); menuBar->Enable(ID_CheckGeom, true); menuBar->Enable(ID_SaneGeom, true); EnableSqlLog(); menuBar->Check(ID_SqlLog, SqlLogEnabled); wxToolBar *toolBar = GetToolBar(); toolBar->EnableTool(ID_Connect, false); toolBar->EnableTool(ID_Connect_RO, false); toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); if (MemoryDatabase == true) { toolBar->EnableTool(ID_MemoryDbSave, true); toolBar->EnableTool(ID_MemoryDbClock, true); } else { toolBar->EnableTool(ID_MemoryDbSave, false); toolBar->EnableTool(ID_MemoryDbClock, false); } toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); toolBar->EnableTool(ID_LoadDbf, true); toolBar->EnableTool(ID_VirtualDbf, true); toolBar->EnableTool(ID_LoadXL, true); toolBar->EnableTool(ID_VirtualXL, true); toolBar->EnableTool(ID_Network, true); toolBar->EnableTool(ID_Exif, true); toolBar->EnableTool(ID_LoadXml, true); toolBar->EnableTool(ID_WFS, true); toolBar->EnableTool(ID_DXF, true); toolBar->EnableTool(ID_Srids, metadata); toolBar->EnableTool(ID_Attach, true); toolBar->EnableTool(ID_SqlLog, true); toolBar->EnableTool(ID_DbStatus, true); toolBar->EnableTool(ID_CheckGeom, true); toolBar->EnableTool(ID_SaneGeom, true); toolBar->ToggleTool(ID_SqlLog, SqlLogEnabled); UpdateStatusBar(); if (AutoSaveInterval <= 0) { if (TimerAutoSave) { TimerAutoSave->Stop(); delete TimerAutoSave; TimerAutoSave = NULL; } } else { // // starting the AutoSave timer // if (!TimerAutoSave) TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); else TimerAutoSave->Stop(); LastTotalChanges = 0; TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); } } if (AutoFDOmsg.Len() > 0) { wxMessageBox(AutoFDOmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoFDOmsg = wxT(""); } if (AutoGPKGmsg.Len() > 0) { wxMessageBox(AutoGPKGmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); AutoGPKGmsg = wxT(""); } return; stop: MemoryDatabase = false; if (SqliteHandle) sqlite3_close(SqliteHandle); if (extSqlite) sqlite3_close(extSqlite); if (SpliteInternalCache) spatialite_cleanup_ex(SpliteInternalCache); wxString msg = wxT("MEMORY-DB wasn't loaded\n\n"); msg += error; wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); SqliteHandle = NULL; SpliteInternalCache = NULL; } void MyFrame::OnMemoryDbNew(wxCommandEvent & WXUNUSED(event)) { // //creating a new MEMORY-DB // int ret; wxToolBar *toolBar; wxMenuBar *menuBar; bool metadata; MemoryDatabase = true; AutoSaveInterval = 120; ExternalSqlitePath = wxT(""); // creating the new MEMORY-DB ret = CreateDB(); if (ret == false) goto error; metadata = CheckMetadata(); menuBar = GetMenuBar(); menuBar->Enable(ID_Connect, false); menuBar->Enable(ID_Connect_RO, false); menuBar->Enable(ID_CreateNew, false); menuBar->Enable(ID_Disconnect, true); menuBar->Enable(ID_MemoryDbLoad, false); menuBar->Enable(ID_MemoryDbNew, false); menuBar->Enable(ID_MemoryDbSave, true); menuBar->Enable(ID_MemoryDbClock, true); menuBar->Enable(ID_Vacuum, true); menuBar->Enable(ID_SqlScript, true); menuBar->Enable(ID_QueryViewComposer, HasViewsMetadata()); menuBar->Enable(ID_LoadShp, true); menuBar->Enable(ID_VirtualShp, true); menuBar->Enable(ID_LoadTxt, true); menuBar->Enable(ID_VirtualTxt, true); menuBar->Enable(ID_LoadDbf, true); menuBar->Enable(ID_VirtualDbf, true); menuBar->Enable(ID_LoadXL, true); menuBar->Enable(ID_VirtualXL, true); menuBar->Enable(ID_Network, true); menuBar->Enable(ID_Exif, true); menuBar->Enable(ID_LoadXml, true); menuBar->Enable(ID_WFS, true); menuBar->Enable(ID_DXF, true); menuBar->Enable(ID_Srids, metadata); menuBar->Enable(ID_Attach, true); menuBar->Enable(ID_SqlLog, true); menuBar->Enable(ID_DbStatus, true); menuBar->Enable(ID_CheckGeom, true); menuBar->Enable(ID_SaneGeom, true); EnableSqlLog(); menuBar->Check(ID_SqlLog, SqlLogEnabled); toolBar = GetToolBar(); toolBar->EnableTool(ID_Connect, false); toolBar->EnableTool(ID_Connect_RO, false); toolBar->EnableTool(ID_CreateNew, false); toolBar->EnableTool(ID_Disconnect, true); toolBar->EnableTool(ID_MemoryDbLoad, false); toolBar->EnableTool(ID_MemoryDbNew, false); toolBar->EnableTool(ID_MemoryDbSave, true); toolBar->EnableTool(ID_MemoryDbClock, true); toolBar->EnableTool(ID_Vacuum, true); toolBar->EnableTool(ID_SqlScript, true); toolBar->EnableTool(ID_QueryViewComposer, HasViewsMetadata()); toolBar->EnableTool(ID_LoadShp, true); toolBar->EnableTool(ID_VirtualShp, true); toolBar->EnableTool(ID_LoadTxt, true); toolBar->EnableTool(ID_VirtualTxt, true); toolBar->EnableTool(ID_LoadDbf, true); toolBar->EnableTool(ID_VirtualDbf, true); toolBar->EnableTool(ID_LoadXL, true); toolBar->EnableTool(ID_VirtualXL, true); toolBar->EnableTool(ID_Network, true); toolBar->EnableTool(ID_Exif, true); toolBar->EnableTool(ID_LoadXml, true); toolBar->EnableTool(ID_WFS, true); toolBar->EnableTool(ID_DXF, true); toolBar->EnableTool(ID_Srids, metadata); toolBar->EnableTool(ID_Attach, true); toolBar->EnableTool(ID_SqlLog, true); toolBar->EnableTool(ID_DbStatus, true); toolBar->EnableTool(ID_CheckGeom, true); toolBar->EnableTool(ID_SaneGeom, true); toolBar->ToggleTool(ID_SqlLog, SqlLogEnabled); UpdateStatusBar(); if (AutoSaveInterval <= 0) { if (TimerAutoSave) { TimerAutoSave->Stop(); delete TimerAutoSave; TimerAutoSave = NULL; } } else { // // starting the AutoSave timer // if (!TimerAutoSave) TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); else TimerAutoSave->Stop(); LastTotalChanges = 0; TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); } return; error: wxString msg = wxT("An error occurred\nno MEMORY-DB was created"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } bool MyFrame::MemoryDbSave() { // // trying to export the MEMORY-DB into an external DB // sqlite3 *extSqlite = NULL; sqlite3_backup *backup; char path[1024]; char bak_path[1024]; int ret; wxString error; if (ExternalSqlitePath.Len() == 0) return false; ::wxBeginBusyCursor(); strcpy(path, ExternalSqlitePath.ToUTF8()); strcpy(bak_path, path); strcat(bak_path, ".bak"); unlink(bak_path); rename(path, bak_path); ret = sqlite3_open_v2(path, &extSqlite, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); if (ret) { // an error occurred wxString errCause = wxString::FromUTF8(sqlite3_errmsg(extSqlite)); error = wxT("An error occurred\n\n"); error += errCause; error += +wxT("\n"); error += ExternalSqlitePath; goto stop; } backup = sqlite3_backup_init(extSqlite, "main", SqliteHandle, "main"); if (!backup) goto stop; while (1) { ret = sqlite3_backup_step(backup, 1024); if (ret == SQLITE_DONE) break; } ret = sqlite3_backup_finish(backup); sqlite3_close(extSqlite); unlink(bak_path); ::wxEndBusyCursor(); LastTotalChanges = sqlite3_total_changes(SqliteHandle); return true; stop: if (extSqlite) sqlite3_close(extSqlite); wxString msg = wxT("Backup failure: MEMORY-DB wasn't saved\n\n"); msg += error; wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ExternalSqlitePath = wxT(""); ::wxEndBusyCursor(); return false; } void MyFrame::OnMemoryDbSave(wxCommandEvent & WXUNUSED(event)) { // // exporting the MEMORY-DB into an external DB // int retdlg; wxString lastDir; if (ExternalSqlitePath.Len() > 0) { if (MemoryDbSave() == true) { wxMessageBox(wxT("Ok, MEMORY-DB was successfully saved"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); if (AutoSaveInterval <= 0) { if (TimerAutoSave) { TimerAutoSave->Stop(); delete TimerAutoSave; TimerAutoSave = NULL; } } else { // // restarting the AutoSave timer // if (!TimerAutoSave) TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); else TimerAutoSave->Stop(); TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); } return; } } wxFileDialog fileDialog(this, wxT("Saving the MEMORY-DB"), wxT(""), wxT("db.sqlite"), wxT ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); retdlg = fileDialog.ShowModal(); if (retdlg == wxID_OK) { // exporting the external DB ExternalSqlitePath = fileDialog.GetPath(); if (MemoryDbSave() == true) { wxMessageBox(wxT("Ok, MEMORY-DB was successfully saved"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); SetLastDirectory(lastDir); if (AutoSaveInterval <= 0) { if (TimerAutoSave) { TimerAutoSave->Stop(); delete TimerAutoSave; TimerAutoSave = NULL; } } else { // // restarting the AutoSave timer // if (!TimerAutoSave) TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); else TimerAutoSave->Stop(); TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); } } } } void MyFrame::OnMemoryDbClock(wxCommandEvent & WXUNUSED(event)) { // // setting up AutoSave for MEMORY-DB // AutoSaveDialog dlg; dlg.Create(this, ExternalSqlitePath, AutoSaveInterval); int ret = dlg.ShowModal(); if (ret == wxID_OK) { AutoSaveInterval = dlg.GetSeconds(); if (AutoSaveInterval <= 0) { // // stopping the AutoSave timer // if (TimerAutoSave) { TimerAutoSave->Stop(); delete TimerAutoSave; TimerAutoSave = NULL; } } else { // // restarting the AutoSave timer // if (!TimerAutoSave) TimerAutoSave = new wxTimer(this, ID_AUTO_SAVE_TIMER); else TimerAutoSave->Stop(); TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); } } } void MyFrame::DbPagesCount(int *total, int *frees) { // // computing the DB pages count // int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; wxString sql; char *value; *total = 0; *frees = 0; sql = wxT("PRAGMA page_count"); ret = sqlite3_get_table(GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; *total = atoi(value); } } sqlite3_free_table(results); sql = wxT("PRAGMA freelist_count"); ret = sqlite3_get_table(GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; *frees = atoi(value); } } sqlite3_free_table(results); } bool MyFrame::GetLwGeomVersion(char *buf) { // // retieving the LWGEOM version (if enabled) // int ret; char **results; int rows; int columns; int i; bool ok = false; if (GetSqlite() == NULL) return false; ret = sqlite3_get_table(GetSqlite(), "SELECT lwgeom_version()", &results, &rows, &columns, NULL); if (ret != SQLITE_OK) return false; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *version = results[(i * columns) + 0]; if (version != NULL) { strcpy(buf, version); ok = true; } } } sqlite3_free_table(results); return ok; } bool MyFrame::GetLibXml2Version(char *buf) { // // retieving the LIBXML2 version (if enabled) // int ret; char **results; int rows; int columns; int i; bool ok = false; if (GetSqlite() == NULL) return false; ret = sqlite3_get_table(GetSqlite(), "SELECT libxml2_version()", &results, &rows, &columns, NULL); if (ret != SQLITE_OK) return false; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *version = results[(i * columns) + 0]; if (version != NULL) { strcpy(buf, version); ok = true; } } } sqlite3_free_table(results); return ok; } void MyFrame::OnVacuum(wxCommandEvent & WXUNUSED(event)) { // // performing a VACUUM in order to reorganize the current DB // char *errMsg = NULL; int totalPages; int freePages; int totalPages2; int freePages2; wxString msg; char dummy[128]; DbPagesCount(&totalPages, &freePages); if (!freePages) { msg = wxT("The current DB doesn't requires to be VACUUMed\n\n"); msg += wxT("Total Pages: "); sprintf(dummy, "%d\n", totalPages); msg += wxString::FromUTF8(dummy); msg += wxT("Free Pages: 0\n\n"); msg += wxT("Free Ratio: 0.0%"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; } else { double ratio = 100.0 / ((double) totalPages / (double) freePages); if (ratio >= 33.33) msg = wxT("The current DB urgently requires to be VACUUMed\n\n"); else if (ratio >= 10.0) msg = wxT("The current DB may usefully be VACUUMed\n\n"); else msg = wxT("The current DB doesn't strictly requires to be VACUUMed\n\n"); msg += wxT("Total Pages: "); sprintf(dummy, "%d\n", totalPages); msg += wxString::FromUTF8(dummy); msg += wxT("Free Pages: "); sprintf(dummy, "%d\n\n", freePages); msg += wxString::FromUTF8(dummy); msg += wxT("Free Ratio: "); sprintf(dummy, "%1.2f%%\n", ratio); msg += wxString::FromUTF8(dummy); msg += wxT("\n\nDo you confirm VACUUMing the current DB ?"); int ret = wxMessageBox(msg, wxT("spatialite_gui"), wxYES_NO | wxICON_QUESTION, this); if (ret != wxYES) return; } ::wxBeginBusyCursor(); int ret = sqlite3_exec(SqliteHandle, "ANALYZE; VACUUM;", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } else { DbPagesCount(&totalPages2, &freePages2); msg = wxT("Current DB was successfully optimized"); if (totalPages2 < totalPages) { sprintf(dummy, "\n\n%d unused pages were reclaimed", totalPages - totalPages2); msg += wxString::FromUTF8(dummy); } wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } ::wxEndBusyCursor(); } char *MyFrame::ReadSqlLine(FILE * in, int *len, int *eof) { // // reading an SQL script line // int c; *eof = 0; int size = 4096; char *line = (char *) malloc(size); int off = 0; while ((c = getc(in)) != EOF) { // consuming input one chat at each time if (off == size) { // buffer overflow; reallocating a bigger one // presumably this is because there is some BLOB, so we'll grow by 1MB at each time size += 1024 * 1024; line = (char *) realloc(line, size); } *(line + off) = c; off++; if (c == '\n') { // end of line marker *(line + off) = '\0'; *len = off; return line; } if (c == ';') { // end of SQL statement marker *(line + off) = '\0'; *len = off; return line; } } // EOF reached *len = off; *eof = 1; return line; } void MyFrame::OnQueryViewComposer(wxCommandEvent & WXUNUSED(event)) { // // invoking the Query/View composer tool // QueryViewComposer(); } void MyFrame::OnSqlScript(wxCommandEvent & WXUNUSED(event)) { // // executing an SQL Script // int ret; wxString lastDir; wxString path; wxString charset; FILE *sql; char *line = NULL; char *statement = NULL; int stmt_len = 0; char *prev_stmt; int prev_len; int eof; int rowNo = 1; int stmt = 0; int len; wxString msg; char dummy[128]; void *cvtCS = NULL; char *utf8stmt = NULL; int cvtErr; char x_path[1024]; char x_table[1024]; char x_column[1024]; char x_charset[1024]; char x_type[1024]; int rows; unsigned int urows; wxString extPath; wxString extTable; wxString extCharset; wxString extColumn; wxString extType; int extWorksheetIndex; int extFirstTitle; int srid; bool coerce2D; bool compressed; int command; bool stmtDone; wxString workingDir; wxFileDialog fileDialog(this, wxT("SQL Script"), wxT(""), wxT("init_spatialite.sql"), wxT("SQL script (*.sql)|*.sql|All files (*.*)|*.*"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); SqlScriptDialog dlg; dlg.Create(this, path, LocaleCharset); ret = dlg.ShowModal(); if (ret == wxID_OK) charset = dlg.GetCharset(); else return; // opening the SQL script sql = fopen(path.ToUTF8(), "r"); if (sql == NULL) { wxMessageBox(wxT("can't open: ") + fileDialog.GetPath(), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); SetLastDirectory(lastDir); cvtCS = gaiaCreateUTF8Converter(charset.ToUTF8()); if (!cvtCS) { msg = charset + wxT(": unsupported CharacterSet"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); goto stop; } ::wxBeginBusyCursor(); workingDir = wxGetCwd(); wxSetWorkingDirectory(lastDir); while (1) { // reading the SQL script lines line = ReadSqlLine(sql, &len, &eof); if (len > 0) { if (statement == NULL) { statement = line; stmt_len = len; } else { // appending line to SQL statement prev_stmt = statement; prev_len = stmt_len; stmt_len = prev_len + len; statement = (char *) malloc(stmt_len + 1); memcpy(statement, prev_stmt, prev_len); memcpy(statement + prev_len, line, len); *(statement + stmt_len) = '\0'; free(prev_stmt); free(line); line = NULL; } } else { free(line); line = NULL; } if (statement) { stmtDone = false; command = TestDotCommand(statement); if (command == CMD_SQLLOG) { // simply ignoring free(statement); statement = NULL; stmt_len = 0; stmt++; stmtDone = true; } if (command == CMD_LOADSHP || command == CMD_LOADDBF || command == CMD_LOADXL || command == CMD_DUMPSHP || command == CMD_DUMPDBF) { utf8stmt = gaiaConvertToUTF8(cvtCS, statement + 9, stmt_len, &cvtErr); if (cvtErr || !utf8stmt) { Rollback(); msg = wxT ("SQL Script abnormal termination\nillegal character sequence"); msg += wxT("\n\nROLLBACK was automatically performed"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); goto stop; } if (command == CMD_LOADSHP) { if (IsDotCommandLoadShp (utf8stmt, x_path, x_table, x_charset, x_column, &srid, &coerce2D, &compressed)) { load_shapefile(SqliteHandle, x_path, x_table, x_charset, srid, x_column, coerce2D, compressed, 0, 0, &rows, NULL); free(statement); statement = NULL; stmt_len = 0; stmt++; stmtDone = true; } } if (command == CMD_LOADDBF) { if (IsDotCommandLoadDbf (utf8stmt, x_path, x_table, x_charset) == true) { load_dbf(SqliteHandle, x_path, x_table, x_charset, 0, &rows, NULL); free(statement); statement = NULL; stmt_len = 0; stmt++; stmtDone = true; } } if (command == CMD_LOADXL) { if (IsDotCommandLoadXL (utf8stmt, x_path, x_table, &extWorksheetIndex, &extFirstTitle) == true) { #ifndef OMIT_FREEXL /* only if FreeXL is enabled */ load_XL(SqliteHandle, x_path, x_table, extWorksheetIndex, extFirstTitle, &urows, NULL); free(statement); statement = NULL; stmt_len = 0; stmt++; stmtDone = true; #else /* FreeXL isn't enabled */ stmtDone = false; #endif /* end FreeXL conditional support */ } } if (command == CMD_DUMPSHP) { if (IsDotCommandDumpShp (utf8stmt, x_table, x_column, x_path, x_charset, x_type) == true) { dump_shapefile(SqliteHandle, x_table, x_column, x_path, x_charset, x_type, 0, &rows, NULL); free(statement); statement = NULL; stmt_len = 0; stmt++; stmtDone = true; } } free(utf8stmt); utf8stmt = NULL; } if (stmtDone) ; else if (sqlite3_complete(statement)) { // executing the SQL statement utf8stmt = gaiaConvertToUTF8(cvtCS, statement, stmt_len, &cvtErr); free(statement); statement = NULL; stmt_len = 0; if (cvtErr || !utf8stmt) { Rollback(); msg = wxT ("SQL Script abnormal termination\nillegal character sequence"); msg += wxT("\n\nROLLBACK was automatically performed"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); goto stop; } if (ExecuteSql(utf8stmt, rowNo) == false) { Rollback(); msg = wxT ("SQL Script abnormal termination\nan error occurred"); msg += wxT("\n\nROLLBACK was automatically performed"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); goto stop; } else { stmt++; free(utf8stmt); utf8stmt = NULL; } } } rowNo++; if (eof) break; } sprintf(dummy, "SQL Script normal termination\n\n%d SQL statements were performed", stmt); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); stop: if (cvtCS) gaiaFreeUTF8Converter(cvtCS); if (utf8stmt) free(utf8stmt); if (statement) free(statement); if (line) free(line); fclose(sql); wxSetWorkingDirectory(workingDir); ::wxEndBusyCursor(); } } } void MyFrame::OnLoadShp(wxCommandEvent & WXUNUSED(event)) { // // loading a shapefile // int ret; wxString table; wxString column = wxT("Geometry"); wxString charset; int srid = 0; int text_dates; int coerce2D; int compressed; int spatial_index; wxString path; wxString lastDir; wxFileDialog fileDialog(this, wxT("Load Shapefile"), wxT(""), wxT("shapefile.shp"), wxT("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); if (GetMetaDataType() != METADATA_CURRENT) srid = -1; // old default SRID lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); table = file.GetName(); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); LoadShpDialog dlg; dlg.Create(this, path, table, srid, column, LocaleCharset); ret = dlg.ShowModal(); if (ret == wxID_OK) { int rt; int rows; char x_path[1024]; char x_table[1024]; char x_column[1024]; char x_gtype[1024]; char *gtype; char x_pkey[1024]; char *pkey; char x_charset[1024]; char err_msg[1024]; SetLastDirectory(lastDir); strcpy(x_path, path.ToUTF8()); strcpy(x_table, dlg.GetTable().ToUTF8()); srid = dlg.GetSrid(); strcpy(x_column, dlg.GetColumn().ToUTF8()); strcpy(x_charset, dlg.GetCharset().ToUTF8()); if (dlg.ApplyCoertion2D() == true) coerce2D = 1; else coerce2D = 0; if (dlg.ApplyCompression() == true) compressed = 1; else compressed = 0; if (dlg.CreateSpatialIndex() == true) spatial_index = 1; else spatial_index = 0; if (dlg.IsUserDefinedGType() == false) gtype = NULL; else { strcpy(x_gtype, dlg.GetGeometryType().ToUTF8()); gtype = x_gtype; } if (dlg.IsUserDefinedPKey() == false) pkey = NULL; else { strcpy(x_pkey, dlg.GetPKColumn().ToUTF8()); pkey = x_pkey; } text_dates = dlg.IsTextDates(); ::wxBeginBusyCursor(); rt = load_shapefile_ex2(SqliteHandle, x_path, x_table, x_charset, srid, x_column, gtype, pkey, coerce2D, compressed, 0, spatial_index, text_dates, &rows, err_msg); ::wxEndBusyCursor(); if (rt) { wxMessageBox(wxT("load shp OK:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); } else wxMessageBox(wxT("load shp error:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } } void MyFrame::OnVirtualShp(wxCommandEvent & WXUNUSED(event)) { // // creating a VirtualShape // int ret; wxString charset; int srid; char dummy[128]; wxString sql; wxString path; wxString table; wxString lastDir; wxString geometryType; char *errMsg = NULL; char xname[1024]; bool text_dates = false; sqlite3 *sqlite = GetSqlite(); wxFileDialog fileDialog(this, wxT("VirtualShape"), wxT(""), wxT("shapefile.shp"), wxT("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); wxFileName file(path); table = file.GetName(); VirtualShpDialog dlg; dlg.Create(this, path, table, LocaleCharset); ret = dlg.ShowModal(); if (ret == wxID_OK) { table = dlg.GetTable(); srid = dlg.GetSrid(); charset = dlg.GetCharset(); text_dates = dlg.IsTextDates(); } else return; lastDir = file.GetPath(); SetLastDirectory(lastDir); sql = wxT("CREATE VIRTUAL TABLE "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\nUSING VirtualShape('"); sql += file.GetPath(); sql += file.GetPathSeparator(); sql += file.GetName(); sql += wxT("',\n'"); sql += charset; sprintf(dummy, "', %d", srid); sql += wxString::FromUTF8(dummy); if (text_dates) sql += wxT(", 1)"); else sql += wxT(")"); ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } wxMessageBox(wxT("Virtual Table ") + table + wxT(" was successfully created"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); } } void MyFrame::OnLoadTxt(wxCommandEvent & WXUNUSED(event)) { // // loading a CSV/TXT // int ret; wxString charset; wxString sql; wxString path; wxString table; wxString lastDir; bool first_titles; bool decimal_comma; char separator; char text_separator; wxString filelist = wxT("TXT and CSV files (*.txt;*.csv)|*.txt;*.csv"); filelist += wxT("|Text file (*.txt)|*.txt|CSV file (*.csv)|*.csv|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("Load CSV/TXT"), wxT(""), wxT("textfile.txt"), filelist, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); wxFileName file(path); table = file.GetName(); LoadTxtDialog dlg; dlg.Create(this, path, table, LocaleCharset); ret = dlg.ShowModal(); if (ret == wxID_OK) { SetLastDirectory(lastDir); table = dlg.GetTable(); charset = dlg.GetCharset(); first_titles = dlg.IsFirstLineTitles(); decimal_comma = dlg.IsDecimalPointComma(); separator = dlg.GetSeparator(); text_separator = dlg.GetTextSeparator(); char decimal_separator = '.'; if (decimal_comma == true) decimal_separator = ','; LoadText(path, table, charset, first_titles, decimal_separator, separator, text_separator); } } } void MyFrame::OnVirtualTxt(wxCommandEvent & WXUNUSED(event)) { // // creating a VirtualText // int ret; wxString charset; wxString sql; wxString path; wxString table; wxString lastDir; bool first_titles; bool decimal_comma; char separator; char text_separator; char dummy[16]; char *errMsg = NULL; char xname[1024]; sqlite3 *sqlite = GetSqlite(); wxString filelist = wxT("TXT and CSV files (*.txt;*.csv)|*.txt;*.csv"); filelist += wxT("|Text file (*.txt)|*.txt|CSV file (*.csv)|*.csv|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("VirtualText"), wxT(""), wxT("textfile.txt"), filelist, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); wxFileName file(path); table = file.GetName(); VirtualTxtDialog dlg; dlg.Create(this, path, table, LocaleCharset); ret = dlg.ShowModal(); if (ret == wxID_OK) { table = dlg.GetTable(); charset = dlg.GetCharset(); first_titles = dlg.IsFirstLineTitles(); decimal_comma = dlg.IsDecimalPointComma(); separator = dlg.GetSeparator(); text_separator = dlg.GetTextSeparator(); } else return; lastDir = file.GetPath(); SetLastDirectory(lastDir); sql = wxT("CREATE VIRTUAL TABLE "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\nUSING VirtualText('"); sql += path; sql += wxT("',\n'"); sql += charset; if (first_titles == true) sql += wxT("', 1"); else sql += wxT("', 0"); if (decimal_comma == true) sql += wxT(", COMMA"); else sql += wxT(", POINT"); if (text_separator == '\'') sql += wxT(", SINGLEQUOTE"); else if (text_separator == '"') sql += wxT(", DOUBLEQUOTE"); else sql += wxT(", NONE"); if (separator == '\t') sql += wxT(", TAB"); else { sprintf(dummy, ", '%c'", separator); sql += wxString::FromUTF8(dummy); } sql += wxT(")"); ::wxBeginBusyCursor(); ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } ::wxEndBusyCursor(); wxMessageBox(wxT("Virtual Table ") + table + wxT(" was successfully created"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); } } void MyFrame::OnLoadDbf(wxCommandEvent & WXUNUSED(event)) { // // loading a DBF // int ret; wxString charset; wxString sql; wxString path; wxString table; wxString lastDir; wxString filelist = wxT("DBF files (*.dbf)|*.dbf|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("Load DBF"), wxT(""), wxT("dbfile.dbf"), filelist, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); wxFileName file(path); table = file.GetName(); LoadDbfDialog dlg; dlg.Create(this, path, table, LocaleCharset); ret = dlg.ShowModal(); if (ret == wxID_OK) { int rt; int rows; char x_path[1024]; char x_table[1024]; char x_charset[1024]; char x_pkey[1024]; char *pkey; char err_msg[1024]; int text_dates = 0; SetLastDirectory(lastDir); strcpy(x_path, path.ToUTF8()); strcpy(x_table, dlg.GetTable().ToUTF8()); strcpy(x_charset, dlg.GetCharset().ToUTF8()); if (dlg.IsUserDefinedPKey() == false) pkey = NULL; else { strcpy(x_pkey, dlg.GetPKColumn().ToUTF8()); pkey = x_pkey; } text_dates = dlg.IsTextDates(); rt = load_dbf_ex2(SqliteHandle, x_path, x_table, pkey, x_charset, 0, text_dates, &rows, err_msg); if (rt) wxMessageBox(wxT("load dbf OK:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("load dbf error:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } } void MyFrame::OnVirtualDbf(wxCommandEvent & WXUNUSED(event)) { // // creating a VirtualDbf // int ret; wxString charset; wxString sql; wxString path; wxString table; wxString lastDir; char *errMsg = NULL; char xname[1024]; bool text_dates = false; sqlite3 *sqlite = GetSqlite(); wxString filelist = wxT("DBF files (*.dbf)|*.dbf|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("VirtualDbf"), wxT(""), wxT("dbfile.dbf"), filelist, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); wxFileName file(path); table = file.GetName(); VirtualDbfDialog dlg; dlg.Create(this, path, table, LocaleCharset); ret = dlg.ShowModal(); if (ret == wxID_OK) { table = dlg.GetTable(); charset = dlg.GetCharset(); text_dates = dlg.IsTextDates(); } else return; lastDir = file.GetPath(); SetLastDirectory(lastDir); sql = wxT("CREATE VIRTUAL TABLE "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\nUSING VirtualDbf('"); sql += path; sql += wxT("', '"); sql += charset; if (text_dates) sql += wxT("', 1)"); else sql += wxT("')"); ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } wxMessageBox(wxT("Virtual Table ") + table + wxT(" was successfully created"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); } } void MyFrame::OnLoadXL(wxCommandEvent & WXUNUSED(event)) { // // loading an XLS // #ifndef OMIT_FREEXL /* FreeXL is enabled */ int ret; wxString charset; wxString sql; wxString path; wxString table; int sheetIndex; int firstLineTitles; char err_msg[1024]; unsigned int rows; wxString lastDir; wxString filelist = wxT("Microsoft Excel spreadsheets (*.xls)|*.xls|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("Load XLS"), wxT(""), wxT("spreadsheet.xls"), filelist, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); wxFileName file(path); table = file.GetName(); LoadXLDialog dlg; dlg.Create(this, path, table); ret = dlg.ShowModal(); if (ret == wxID_OK) { char x_path[1024]; char x_table[1024]; table = dlg.GetTable(); sheetIndex = dlg.GetWorksheetIndex(); if (dlg.IsFirstLineTitles() == true) firstLineTitles = 1; else firstLineTitles = 0; strcpy(x_path, path.ToUTF8()); strcpy(x_table, table.ToUTF8()); if (!load_XL (SqliteHandle, x_path, x_table, sheetIndex, firstLineTitles, &rows, err_msg)) { wxMessageBox(wxT("load XL error:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } } #else /* FreeXL disabled */ wxString msg = wxT("This copy of spatialite_gui was built explictly\n"); msg += wxT("disabling the FreeXL support.\n"); msg += wxT("Sorry ..."); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_EXCLAMATION, this); #endif /* end FreeXL conditional */ } void MyFrame::OnVirtualXL(wxCommandEvent & WXUNUSED(event)) { // // creating a VirtualXL // #ifndef OMIT_FREEXL /* FreeXL is enabled */ int ret; wxString charset; wxString sql; wxString path; wxString table; int sheetIndex; bool firstLineTitles; wxString lastDir; char *errMsg = NULL; char xname[1024]; sqlite3 *sqlite = GetSqlite(); wxString filelist = wxT("Microsoft Excel spreadsheets (*.xls)|*.xls|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("VirtualXL"), wxT(""), wxT("spreadsheet.xls"), filelist, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); wxFileName file(path); table = file.GetName(); VirtualXLDialog dlg; dlg.Create(this, path, table); ret = dlg.ShowModal(); if (ret == wxID_OK) { table = dlg.GetTable(); sheetIndex = dlg.GetWorksheetIndex(); firstLineTitles = dlg.IsFirstLineTitles(); } else return; lastDir = file.GetPath(); SetLastDirectory(lastDir); sql = wxT("CREATE VIRTUAL TABLE "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\nUSING VirtualXL('"); sql += path; sprintf(xname, "', %d, %d)", sheetIndex, (firstLineTitles == true) ? 1 : 0); sql += wxString::FromUTF8(xname); ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } wxMessageBox(wxT("Virtual Table ") + table + wxT(" was successfully created"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); } #else /* FreeXL disabled */ wxString msg = wxT("This copy of spatialite_gui was built explictly\n"); msg += wxT("disabling the FreeXL support.\n"); msg += wxT("Sorry ..."); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_EXCLAMATION, this); #endif /* end FreeXL conditional */ } void MyFrame::OnNetwork(wxCommandEvent & WXUNUSED(event)) { // // building a Network // NetworkDialog dlg; int ret; wxString table; wxString from; wxString to; bool isNoGeometry; wxString geom; wxString name; bool isGeomLength; wxString cost; bool isBidirectional; bool isOneWays; wxString oneWayToFrom; wxString oneWayFromTo; bool aStarSupported; wxString dataTableName; wxString virtualTableName; dlg.Create(this); ret = dlg.ShowModal(); if (ret == wxID_OK) { table = dlg.GetTableName(); from = dlg.GetFromColumn(); to = dlg.GetToColumn(); isNoGeometry = dlg.IsNoGeometry(); geom = dlg.GetGeomColumn(); name = dlg.GetNameColumn(); isGeomLength = dlg.IsGeomLength(); cost = dlg.GetCostColumn(); isBidirectional = dlg.IsBidirectional(); isOneWays = dlg.IsOneWays(); oneWayToFrom = dlg.GetOneWayToFrom(); oneWayFromTo = dlg.GetOneWayFromTo(); aStarSupported = dlg.IsAStarSupported(); dataTableName = dlg.GetDataTable(); virtualTableName = dlg.GetVirtualTable(); BuildNetwork(table, from, to, isNoGeometry, geom, name, isGeomLength, cost, isBidirectional, isOneWays, oneWayFromTo, oneWayToFrom, aStarSupported, dataTableName, virtualTableName); } } void MyFrame::OnImportXmlDocuments(wxCommandEvent & WXUNUSED(event)) { // // importing XML Documents // #ifdef ENABLE_LIBXML2 /* only if LIBXML2 is enabled */ XmlDocumentsDialog dlg; int ret; wxString path; bool isFolder; int compressed; bool isInternalSchema; char *schemaURI; char xschema[8192]; wxString lastDir; wxString dir_path; wxString xml_path; wxString suffix; wxString table; wxString pkName; wxString xmlColumn; wxString inPathColumn; wxString parseErrColumn; wxString validateErrColumn; wxString schemaUriColumn; wxString filelist = wxT("XML Documents (*.xml)|*.xml|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("XML File/Folder selection"), wxT(""), wxT(""), filelist, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { xml_path = fileDialog.GetPath(); wxFileName file(xml_path); dir_path = file.GetPath(); } else return; dlg.Create(this, dir_path, xml_path); ret = dlg.ShowModal(); if (ret == wxID_OK) { ::wxBeginBusyCursor(); SetLastDirectory(dir_path); isFolder = dlg.IsFolder(); if (isFolder == true) path = dlg.GetDirPath(); else path = dlg.GetXmlPath(); suffix = dlg.GetSuffix(); table = dlg.GetTargetTable(); pkName = dlg.GetPkName(); xmlColumn = dlg.GetXmlColumn(); compressed = dlg.IsCompressed(); wxString schema = dlg.GetSchemaURI(); isInternalSchema = dlg.IsInternalSchemaURI(); if (schema.Len() == 0) schemaURI = NULL; else { strcpy((char *) xschema, schema.ToUTF8()); schemaURI = xschema; } inPathColumn = dlg.GetInPathColumn(); schemaUriColumn = dlg.GetSchemaUriColumn(); parseErrColumn = dlg.GetParseErrorColumn(); validateErrColumn = dlg.GetValidateErrorColumn(); wxString currDir =::wxGetCwd(); ::wxSetWorkingDirectory(dir_path); ImportXmlDocuments(path, isFolder, suffix, table, pkName, xmlColumn, inPathColumn, schemaUriColumn, parseErrColumn, validateErrColumn, compressed, schemaURI, isInternalSchema); ::wxSetWorkingDirectory(currDir); ::wxEndBusyCursor(); InitTableTree(); } #else wxMessageBox(wxT ("Sorry, spatialite_gui was built disabling LIBXML2\n\nUnsupported operation"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); #endif /* end LIBXML2 conditionals */ } void MyFrame::OnImportWFS(wxCommandEvent & WXUNUSED(event)) { // // importing data from WFS datasource // #ifdef ENABLE_LIBXML2 /* only if LIBXML2 is enabled */ WfsDialog dlg; dlg.Create(this, WfsGetCapabilitiesURL, HttpProxy); dlg.ShowModal(); #else wxMessageBox(wxT ("Sorry, spatialite_gui was built disabling LIBXML2\n\nUnsupported operation"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); #endif /* end LIBXML2 conditionals */ } void MyFrame::OnImportDXF(wxCommandEvent & WXUNUSED(event)) { // // importing DXF file(s) // DxfDialog dlg; int ret; wxString path; bool isFolder; wxString lastDir; wxString dir_path; wxString dxf_path; wxString prefix; wxString layer; int srid; bool force2d; bool force3d; bool mixed; bool linked; bool unlinked; bool append; wxString filelist = wxT("DXF drawing file (*.dxf)|*.dxf|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("DXF File/Folder selection"), wxT(""), wxT(""), filelist, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { dxf_path = fileDialog.GetPath(); wxFileName file(dxf_path); dir_path = file.GetPath(); } else return; dlg.Create(this, dir_path, dxf_path); ret = dlg.ShowModal(); if (ret == wxID_OK) { ::wxBeginBusyCursor(); SetLastDirectory(dir_path); isFolder = dlg.IsFolder(); if (isFolder == true) path = dlg.GetDirPath(); else path = dlg.GetDxfPath(); prefix = dlg.GetPrefix(); layer = dlg.GetSingleLayer(); srid = dlg.GetSrid(); force2d = dlg.IsForce2D(); force3d = dlg.IsForce3D(); mixed = dlg.IsImportMixed(); linked = dlg.IsLinkedRings(); unlinked = dlg.IsUnlinkedRings(); append = dlg.IsAppendMode(); wxString currDir =::wxGetCwd(); ::wxSetWorkingDirectory(dir_path); ImportDXFfiles(path, isFolder, prefix, layer, srid, force2d, force3d, mixed, linked, unlinked, append); ::wxSetWorkingDirectory(currDir); ::wxEndBusyCursor(); InitTableTree(); } } rl2PixelPtr MyFrame::DefaultNoData(unsigned char sample, unsigned char pixel, unsigned char num_bands) { /* creating a default NO-DATA value */ int nb; rl2PixelPtr pxl = rl2_create_pixel(sample, pixel, num_bands); if (pxl == NULL) return NULL; switch (pixel) { case RL2_PIXEL_MONOCHROME: rl2_set_pixel_sample_1bit(pxl, 0); break; case RL2_PIXEL_PALETTE: switch (sample) { case RL2_SAMPLE_1_BIT: rl2_set_pixel_sample_1bit(pxl, 0); break; case RL2_SAMPLE_2_BIT: rl2_set_pixel_sample_2bit(pxl, 0); break; case RL2_SAMPLE_4_BIT: rl2_set_pixel_sample_4bit(pxl, 0); break; case RL2_SAMPLE_UINT8: rl2_set_pixel_sample_uint8(pxl, 0, 0); break; }; break; case RL2_PIXEL_GRAYSCALE: switch (sample) { case RL2_SAMPLE_1_BIT: rl2_set_pixel_sample_1bit(pxl, 1); break; case RL2_SAMPLE_2_BIT: rl2_set_pixel_sample_2bit(pxl, 3); break; case RL2_SAMPLE_4_BIT: rl2_set_pixel_sample_4bit(pxl, 15); break; case RL2_SAMPLE_UINT8: rl2_set_pixel_sample_uint8(pxl, 0, 255); break; case RL2_SAMPLE_UINT16: rl2_set_pixel_sample_uint16(pxl, 0, 0); break; }; break; case RL2_PIXEL_RGB: switch (sample) { case RL2_SAMPLE_UINT8: rl2_set_pixel_sample_uint8(pxl, 0, 255); rl2_set_pixel_sample_uint8(pxl, 1, 255); rl2_set_pixel_sample_uint8(pxl, 2, 255); break; case RL2_SAMPLE_UINT16: rl2_set_pixel_sample_uint16(pxl, 0, 0); rl2_set_pixel_sample_uint16(pxl, 1, 0); rl2_set_pixel_sample_uint16(pxl, 2, 0); break; }; break; case RL2_PIXEL_DATAGRID: switch (sample) { case RL2_SAMPLE_INT8: rl2_set_pixel_sample_int8(pxl, 0); break; case RL2_SAMPLE_UINT8: rl2_set_pixel_sample_uint8(pxl, 0, 0); break; case RL2_SAMPLE_INT16: rl2_set_pixel_sample_int16(pxl, 0); break; case RL2_SAMPLE_UINT16: rl2_set_pixel_sample_uint16(pxl, 0, 0); break; case RL2_SAMPLE_INT32: rl2_set_pixel_sample_int32(pxl, 0); break; case RL2_SAMPLE_UINT32: rl2_set_pixel_sample_uint32(pxl, 0); break; case RL2_SAMPLE_FLOAT: rl2_set_pixel_sample_float(pxl, 0.0); break; case RL2_SAMPLE_DOUBLE: rl2_set_pixel_sample_double(pxl, 0.0); break; }; break; case RL2_PIXEL_MULTIBAND: switch (sample) { case RL2_SAMPLE_UINT8: for (nb = 0; nb < num_bands; nb++) rl2_set_pixel_sample_uint8(pxl, nb, 255); break; case RL2_SAMPLE_UINT16: for (nb = 0; nb < num_bands; nb++) rl2_set_pixel_sample_uint16(pxl, nb, 0); break; }; break; }; return pxl; } char *MyFrame::GetNum(const char *start, const char *end) { /* extracting a token */ char *buf; int len = end - start; if (len <= 0) return NULL; buf = (char *) malloc(len + 1); memcpy(buf, start, len); *(buf + len) = '\0'; return buf; } rl2PixelPtr MyFrame::ParseNoData(wxString & NoData, int SampleType, int PixelType, int NumBands) { // // parsing a NO-DATA string // int band = 0; char *num = NULL; const char *p; const char *start; const char *end; char int8_value = 0; unsigned char uint8_value = 0; short int16_value = 0; unsigned short uint16_value = 0; int int32_value = 0; unsigned int uint32_value = 0; float flt_value = 0.0; double dbl_value = 0.0; rl2PixelPtr pixel = NULL; unsigned char num_bands = 0; char buf[4192]; const char *in; strcpy(buf, NoData.ToUTF8()); in = buf; switch (PixelType) { case RL2_PIXEL_MONOCHROME: num_bands = 1; break; case RL2_PIXEL_PALETTE: num_bands = 1; break; case RL2_PIXEL_GRAYSCALE: num_bands = 1; break; case RL2_PIXEL_RGB: num_bands = 3; break; case RL2_PIXEL_DATAGRID: num_bands = 1; break; case RL2_PIXEL_MULTIBAND: num_bands = NumBands; break; }; if (num_bands != NumBands) return NULL; pixel = rl2_create_pixel(SampleType, PixelType, num_bands); if (pixel == NULL) return NULL; start = in; p = in; while (1) { if (*p == ',' || *p == '\0') { end = p; switch (SampleType) { case RL2_SAMPLE_1_BIT: num = GetNum(start, end); if (num == NULL) goto error; uint8_value = atoi(num); free(num); num = NULL; if (rl2_set_pixel_sample_1bit(pixel, int8_value) != RL2_OK) goto error; break; case RL2_SAMPLE_2_BIT: num = GetNum(start, end); if (num == NULL) goto error; uint8_value = atoi(num); free(num); num = NULL; if (rl2_set_pixel_sample_2bit(pixel, int8_value) != RL2_OK) goto error; break; case RL2_SAMPLE_4_BIT: num = GetNum(start, end); if (num == NULL) goto error; uint8_value = atoi(num); free(num); num = NULL; if (rl2_set_pixel_sample_4bit(pixel, int8_value) != RL2_OK) goto error; break; case RL2_SAMPLE_INT8: num = GetNum(start, end); if (num == NULL) goto error; int8_value = atoi(num); free(num); num = NULL; if (rl2_set_pixel_sample_int8(pixel, int8_value) != RL2_OK) goto error; break; case RL2_SAMPLE_UINT8: num = GetNum(start, end); if (num == NULL) goto error; uint8_value = atoi(num); free(num); num = NULL; if (rl2_set_pixel_sample_uint8(pixel, band, uint8_value) != RL2_OK) goto error; break; case RL2_SAMPLE_INT16: num = GetNum(start, end); if (num == NULL) goto error; int16_value = atoi(num); free(num); num = NULL; if (rl2_set_pixel_sample_int16(pixel, int16_value) != RL2_OK) goto error; break; case RL2_SAMPLE_UINT16: num = GetNum(start, end); if (num == NULL) goto error; uint16_value = atoi(num); free(num); num = NULL; if (rl2_set_pixel_sample_uint16 (pixel, band, uint16_value) != RL2_OK) goto error; break; case RL2_SAMPLE_INT32: num = GetNum(start, end); if (num == NULL) goto error; int32_value = atoi(num); free(num); num = NULL; if (rl2_set_pixel_sample_int32(pixel, int32_value) != RL2_OK) goto error; break; case RL2_SAMPLE_UINT32: num = GetNum(start, end); if (num == NULL) goto error; uint32_value = atoi(num); free(num); num = NULL; if (rl2_set_pixel_sample_uint32(pixel, uint32_value) != RL2_OK) goto error; break; case RL2_SAMPLE_FLOAT: num = GetNum(start, end); if (num == NULL) goto error; flt_value = atof(num); free(num); num = NULL; if (rl2_set_pixel_sample_float(pixel, flt_value) != RL2_OK) goto error; break; case RL2_SAMPLE_DOUBLE: num = GetNum(start, end); if (num == NULL) goto error; dbl_value = atof(num); free(num); num = NULL; if (rl2_set_pixel_sample_double(pixel, dbl_value) != RL2_OK) goto error; break; }; if (*p == '\0') break; start = p + 1; band++; } p++; } return pixel; error: if (num != NULL) free(num); if (pixel != NULL) rl2_destroy_pixel(pixel); return NULL; } bool MyFrame::CreateRasterCoverage(wxString & CoverageName, wxString & Title, wxString & Abstract, int SampleType, int PixelType, int NumBands, int Compression, int Quality, int TileWidth, int TileHeight, bool NotGeoreferenced, int Srid, double HorzResolution, double VertResolution, wxString NoData, bool StrictResolution, bool MixedResolutions, bool InputPaths, bool MD5, bool Summary, int RedBand, int GreenBand, int BlueBand, int NIRband, bool AutoNDVI) { // // actual creation of a Raster Coverage // int ret; const char *sql; char *errMsg = NULL; sqlite3_stmt *stmt = NULL; char *err_msg = NULL; int strict_resolution = 0; int mixed_resolutions = 0; int section_paths = 0; int section_md5 = 0; int section_summary = 0; rl2PalettePtr palette = NULL; rl2PixelPtr no_data = NULL; bool retval = false; // starting a transaction ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } // just in case, attempting to (re)create raster meta-tables ret = sqlite3_exec(SqliteHandle, "SELECT CreateRasterCoveragesTable()", NULL, NULL, &err_msg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CreateRasterCoveragesTable() error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(err_msg); return false; } ret = sqlite3_exec(SqliteHandle, "SELECT CreateStylingTables()", NULL, NULL, &err_msg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CreateStylingTables() error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(err_msg); return false; } if (NoData.Len() == 0) { // creating a default NO-DATA value no_data = DefaultNoData(SampleType, PixelType, NumBands); } else { no_data = ParseNoData(NoData, SampleType, PixelType, NumBands); if (no_data == NULL) { wxMessageBox(wxT("ERROR: invalid NO-DATA string"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return false; } } if (PixelType == RL2_PIXEL_PALETTE) { // creating a default PALETTE palette = rl2_create_palette(1); rl2_set_palette_color(palette, 0, 255, 255, 255); } if (NotGeoreferenced == true) { Srid = -1; HorzResolution = 1.0; VertResolution = 1.0; } if (StrictResolution) strict_resolution = 1; if (MixedResolutions) mixed_resolutions = 1; if (InputPaths) section_paths = 1; if (MD5) section_md5 = 1; if (Summary) section_summary = 1; if (rl2_create_dbms_coverage (SqliteHandle, CoverageName.ToUTF8(), SampleType, PixelType, NumBands, Compression, Quality, TileWidth, TileHeight, Srid, HorzResolution, VertResolution, no_data, palette, strict_resolution, mixed_resolutions, section_paths, section_md5, section_summary) != RL2_OK) { wxMessageBox(wxT("ERROR: unable to create Raster Coverage ") + CoverageName, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return false; } if (PixelType == RL2_PIXEL_MULTIBAND) { if (RedBand >= 0 && GreenBand >= 0 && BlueBand >= 0 && NIRband >= 0) { // attempting to register the default Band Settings rl2_set_dbms_coverage_default_bands(SqliteHandle, CoverageName.ToUTF8(), RedBand, GreenBand, BlueBand, NIRband); if (AutoNDVI == true) rl2_enable_dbms_coverage_auto_ndvi(SqliteHandle, CoverageName.ToUTF8(), 1); } } // committing the still pending transaction ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } // updating Title and Abstract sql = "SELECT RL2_SetRasterCoverageInfos(?, ?, ?)"; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { const char *msg = sqlite3_errmsg(SqliteHandle); wxMessageBox(wxT("ERROR - SetRasterCoverageInfos: ") + wxString::FromUTF8(msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return false; } sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 2, Title.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 3, Abstract.ToUTF8(), -1, SQLITE_TRANSIENT); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) retval = true; else { const char *msg = sqlite3_errmsg(SqliteHandle); wxMessageBox(wxT("ERROR - SetRasterCoverageInfos: ") + wxString::FromUTF8(msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); retval = false; } sqlite3_finalize(stmt); return retval; } bool MyFrame::DoGetRasterCoverageInfos(wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression, int *srid) { // // attempting to retrieve basic Raster Coverage Infos // const char *sql; int ret; int count = 0; int err = 0; sqlite3_stmt *stmt = NULL; sql = "SELECT title, abstract, sample_type, pixel_type, num_bands, compression, srid " "FROM raster_coverages WHERE Lower(coverage_name) = Lower(?)"; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, coverage.ToUTF8(), coverage.Len(), SQLITE_TRANSIENT); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { count++; const char *str; if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) { str = (const char *) sqlite3_column_text(stmt, 0); title = wxString::FromUTF8(str); } else title = wxT("*** Unknown ***"); if (sqlite3_column_type(stmt, 1) == SQLITE_TEXT) { str = (const char *) sqlite3_column_text(stmt, 1); abstract = wxString::FromUTF8(str); } else abstract = wxT("*** Unknown ***"); if (sqlite3_column_type(stmt, 2) == SQLITE_TEXT) { str = (const char *) sqlite3_column_text(stmt, 2); if (strcasecmp(str, "1 BIT") == 0) sample = wxT("1-BIT"); else if (strcasecmp(str, "2 BIT") == 0) sample = wxT("2-BIT"); else if (strcasecmp(str, "4 BIT") == 0) sample = wxT("4-BIT"); else if (strcasecmp(str, "INT8") == 0) sample = wxT("Signed Integer 8 bit"); else if (strcasecmp(str, "UINT8") == 0) sample = wxT("Unsigned Integer 8 bit"); else if (strcasecmp(str, "INT16") == 0) sample = wxT("Signed Integer 16 bit"); else if (strcasecmp(str, "UINT16") == 0) sample = wxT("Unsigned Integer 16 bit"); else if (strcasecmp(str, "INT32") == 0) sample = wxT("Signed Integer 32 bit"); else if (strcasecmp(str, "UINT32") == 0) sample = wxT("Unsigned Integer 32 bit"); else if (strcasecmp(str, "FLOAT") == 0) sample = wxT("Floating point single precision: 32 bit"); else if (strcasecmp(str, "DOUBLE") == 0) sample = wxT("Floating point double precision: 64 bit"); else { sample = wxT("*** Unknown ***"); err = 1; } } else { sample = wxT("*** Unknown ***"); err = 1; } if (sqlite3_column_type(stmt, 3) == SQLITE_TEXT) { str = (const char *) sqlite3_column_text(stmt, 3); if (strcasecmp(str, "MONOCHROME") == 0) pixel = wxT("MonoChrome"); else if (strcasecmp(str, "PALETTE") == 0) pixel = wxT("Palette-based"); else if (strcasecmp(str, "GRAYSCALE") == 0) pixel = wxT("GrayScale (black&white)"); else if (strcasecmp(str, "RGB") == 0) pixel = wxT("RGB (TrueColor)"); else if (strcasecmp(str, "MULTIBAND") == 0) { pixel = wxT("MultiBand"); if (sqlite3_column_type(stmt, 4) == SQLITE_INTEGER) { char dummy[128]; sprintf(dummy, ": %d bands", sqlite3_column_int(stmt, 4)); pixel += wxString::FromUTF8(dummy); } else { pixel += wxT(": unknown bands"); err = 1; } } else if (strcasecmp(str, "DATAGRID") == 0) pixel = wxT("Data Grid"); else { pixel = wxT("*** Unknown ***"); err = 1; } } else { pixel = wxT("*** Unknown ***"); err = 1; } if (sqlite3_column_type(stmt, 5) == SQLITE_TEXT) { str = (const char *) sqlite3_column_text(stmt, 5); if (strcasecmp(str, "NONE") == 0) compression = wxT("None, not compressed"); else if (strcasecmp(str, "DEFLATE") == 0) compression = wxT("Deflate (ZIP) with Delta-encoding: lossless"); else if (strcasecmp(str, "DEFLATE_NO") == 0) compression = wxT("Deflate (ZIP), no Delta-encoding: lossless"); else if (strcasecmp(str, "LZMA") == 0) compression = wxT("LZMA (7-Zip) with Delta-encoding: lossless"); else if (strcasecmp(str, "LZMA_NO") == 0) compression = wxT("LZMA (7-Zip), no Delta-encoding: lossless"); else if (strcasecmp(str, "PNG") == 0) compression = wxT("PNG: lossless"); else if (strcasecmp(str, "JPEG") == 0) compression = wxT("JPEG: lossy"); else if (strcasecmp(str, "LOSSY_WEBP") == 0) compression = wxT("WebP: lossy mode"); else if (strcasecmp(str, "LOSSLESS_WEBP") == 0) compression = wxT("WebP: lossless mode"); else if (strcasecmp(str, "CCITTFAX4") == 0) compression = wxT("Fax Group 4: lossless"); else if (strcasecmp(str, "CHARLS") == 0) compression = wxT("CharLS [JPEG-LS]: lossless"); else if (strcasecmp(str, "LOSSY_JP2") == 0) compression = wxT("JPEG2000: lossy mode"); else if (strcasecmp(str, "LOSSLESS_JP2") == 0) compression = wxT("JPEG2000: lossless mode"); else { compression = wxT("*** Unknown ***"); err = 1; } } else { compression = wxT("*** Unknown ***"); err = 1; } if (sqlite3_column_type(stmt, 6) == SQLITE_INTEGER) *srid = sqlite3_column_int(stmt, 6); else { *srid = -1; err = 1; } } else break; } sqlite3_finalize(stmt); if (count != 1 || err) { wxMessageBox(wxT("Unable to retrieve a valid Raster Coverage named: ") + coverage, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return false; } return true; } bool MyFrame::DoGetVectorCoverageInfos(wxString & coverage, wxString & title, wxString & abstract, wxString & type, int *srid) { // // attempting to retrieve basic Vector Coverage Infos // const char *sql; int ret; int count = 0; int err = 0; sqlite3_stmt *stmt = NULL; sql = "SELECT c.title, c.abstract, g.geometry_type, g.srid " "FROM vector_coverages AS c JOIN geometry_columns AS g ON (" "Lower(c.f_table_name) = Lower(g.f_table_name) AND " "Lower(c.f_geometry_column) = Lower(g.f_geometry_column)) " "WHERE Lower(c.coverage_name) = Lower(?)"; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, coverage.ToUTF8(), coverage.Len(), SQLITE_TRANSIENT); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { count++; const char *str; if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) { str = (const char *) sqlite3_column_text(stmt, 0); title = wxString::FromUTF8(str); } else title = wxT("*** Unknown ***"); if (sqlite3_column_type(stmt, 1) == SQLITE_TEXT) { str = (const char *) sqlite3_column_text(stmt, 1); abstract = wxString::FromUTF8(str); } else abstract = wxT("*** Unknown ***"); if (sqlite3_column_type(stmt, 2) == SQLITE_INTEGER) { int gtype = sqlite3_column_int(stmt, 2); switch (gtype) { case 0: case 1000: case 2000: case 3000: type = wxT("GEOMETRY"); break; case 1: case 1001: case 2001: case 3001: type = wxT("POINT"); break; case 2: case 1002: case 2002: case 3002: type = wxT("LINESTRING"); break; case 3: case 1003: case 2003: case 3003: type = wxT("POLYGON"); break; case 4: case 1004: case 2004: case 3004: type = wxT("MULTIPOINT"); break; case 5: case 1005: case 2005: case 3005: type = wxT("MULTILINESTRING"); break; case 6: case 1006: case 2006: case 3006: type = wxT("MULTIPOLYGON"); break; case 7: case 1007: case 2007: case 3007: type = wxT("GEOMETRYCOLLECTION"); break; default: type = wxT("*** UNKNOWN ***"); break; }; switch (gtype) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: type += wxT(" XY"); break; case 1000: case 1001: case 1002: case 1003: case 1004: case 1005: case 1006: case 1007: type += wxT(" XYZ"); break; case 2000: case 2001: case 2002: case 2003: case 2004: case 2005: case 2006: case 2007: type += wxT(" XYM"); break; case 3000: case 3001: case 3002: case 3003: case 3004: case 3005: case 3006: case 3007: type += wxT(" XYZM"); break; }; } else { type = wxT("*** UNKNOWN ***"); err = 1; } if (sqlite3_column_type(stmt, 3) == SQLITE_INTEGER) *srid = sqlite3_column_int(stmt, 3); else { *srid = -1; err = 1; } } else break; } sqlite3_finalize(stmt); if (count != 1 || err) { wxMessageBox(wxT("Unable to retrieve a valid Vector Coverage named: ") + coverage, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return false; } return true; } bool MyFrame::DoImportRaster(sqlite3_stmt * stmt, wxString & coverage, wxString & path, int forced_srid, bool with_worldfile, bool pyramidize) { // // attempting to import a single Raster file into a Raster Coverage // int ret; bool retval = false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, coverage.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 2, path.ToUTF8(), -1, SQLITE_TRANSIENT); if (with_worldfile == false) sqlite3_bind_int(stmt, 3, 0); else sqlite3_bind_int(stmt, 3, 1); sqlite3_bind_int(stmt, 4, forced_srid); if (pyramidize == false) sqlite3_bind_int(stmt, 5, 0); else sqlite3_bind_int(stmt, 5, 1); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { int status = sqlite3_column_int(stmt, 0); if (status <= 0) { wxMessageBox(wxT("RL2_LoadRaster: \"") + path + wxT("\" error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else retval = true; } else { wxMessageBox(wxT("RL2_LoadRaster: sqlite3_step() error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } return retval; } void MyFrame::DoCreateStylingTables() { // // attempting to create (just in case) the Styling Tables // int ret; const char *sql; char *errMsg = NULL; // starting a transaction ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } // just in case, attempting to (re)create raster meta-tables ret = sqlite3_exec(SqliteHandle, "SELECT CreateStylingTables()", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CreateStylingTables() error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } // committing the still pending transaction ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } } void MyFrame::OnImportExifPhotos(wxCommandEvent & WXUNUSED(event)) { // // importing EXIF Photos // ExifDialog dlg; int ret; wxString path; bool isFolder; bool isMetadata; bool isGpsOnly; wxString lastDir; wxString dir_path; wxString img_path; wxString filelist = wxT("JPEG files (*.jpg;*.jpeg)|*.jpg;*.jpeg|"); filelist += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("EXIF File/Folder selection"), wxT(""), wxT(""), filelist, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { img_path = fileDialog.GetPath(); wxFileName file(img_path); dir_path = file.GetPath(); } else return; dlg.Create(this, dir_path, img_path); ret = dlg.ShowModal(); if (ret == wxID_OK) { SetLastDirectory(dir_path); isFolder = dlg.IsFolder(); if (isFolder == true) path = dlg.GetDirPath(); else path = dlg.GetImgPath(); isMetadata = dlg.IsMetadata(); isGpsOnly = dlg.IsGpsOnly(); ImportExifPhotos(path, isFolder, isMetadata, isGpsOnly); } } void MyFrame::OnSrids(wxCommandEvent & WXUNUSED(event)) { // // searching a SRID by name // SearchSridDialog dlg; int ret; wxString string; wxString sql; dlg.Create(this); ret = dlg.ShowModal(); if (ret == wxID_OK) { sql = wxT("SELECT * FROM spatial_ref_sys\n"); if (dlg.IsSearchBySrid() == true) { // searching by SRID char txt[128]; sprintf(txt, "WHERE srid = %d", dlg.GetSrid()); sql += wxString::FromUTF8(txt); } else { // searching by NAME string = dlg.GetString(); sql += wxT("WHERE ref_sys_name LIKE '%"); sql += string; sql += wxT("%'\nORDER BY srid"); } QueryView->SetSql(sql, true); } } void MyFrame::OnCharset(wxCommandEvent & WXUNUSED(event)) { // // setting the default CHARSET // DefaultCharsetDialog dlg; int ret; dlg.Create(this, DefaultCharset, AskCharset); ret = dlg.ShowModal(); if (ret == wxID_OK) { DefaultCharset = dlg.GetCharset(); AskCharset = dlg.IsSetAskCharset(); } } void MyFrame::OnTimerAutoSave(wxTimerEvent & WXUNUSED(event)) { // // AutoSave - Timer event handler // int tc = sqlite3_total_changes(SqliteHandle); if (tc != LastTotalChanges) MemoryDbSave(); if (AutoSaveInterval <= 0) { delete TimerAutoSave; TimerAutoSave = NULL; } else TimerAutoSave->Start(AutoSaveInterval * 1000, wxTIMER_ONE_SHOT); } bool MyFrame::ExecuteSql(const char *sql, int rowNo) { // // executes an SQL statement from the SQL script // int ret; char *errMsg = NULL; wxString msg; char dummy[128]; ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { sprintf(dummy, "row %d\n\nSQLite SQL error: ", rowNo); msg = wxString::FromUTF8(dummy); wxMessageBox(msg + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } return true; } void MyFrame::Rollback() { // // performing a ROLLBACK // sqlite3_exec(SqliteHandle, "ROLLBACK", NULL, NULL, NULL); } bool MyFrame::OpenDB(bool read_only) { // // establishing a physical connection to some DB SQLite // int ret; char *errMsg = NULL; int mode = SQLITE_OPEN_READWRITE; ReadOnlyConnection = false; if (read_only) { mode = SQLITE_OPEN_READONLY; ReadOnlyConnection = true; } else { // testing for an appropriate Security level char path[1024]; strcpy(path, SqlitePath.ToUTF8()); TestSecurityRelaxed(path); } ret = sqlite3_open_v2(SqlitePath.ToUTF8(), &SqliteHandle, mode, NULL); if (ret) { // an error occurred wxString errCause; errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); sqlite3_close(SqliteHandle); wxMessageBox(wxT("Failure while connecting to DB\n\n") + errCause + wxT("\n") + SqlitePath, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); SqliteHandle = NULL; SpliteInternalCache = NULL; ClearTableTree(); MemoryDatabase = false; return false; } // setting up the internal cache SpliteInternalCache = spatialite_alloc_connection(); spatialite_init_ex(SqliteHandle, SpliteInternalCache, 0); rl2_init(SqliteHandle, RL2PrivateData, 0); // enabling LOAD_EXTENSION ret = sqlite3_enable_load_extension(SqliteHandle, 1); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to enable LOAD_EXTENSION"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); } // activating Foreign Key constraints ret = sqlite3_exec(SqliteHandle, "PRAGMA foreign_keys = 1", NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to activate FOREIGN_KEY constraints"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); } // setting RL2 MaxThreads char sqlmax[1024]; sprintf(sqlmax, "SELECT RL2_SetMaxThreads(%d)", RL2MaxThreads); sqlite3_exec(SqliteHandle, sqlmax, NULL, 0, &errMsg); AutoFDOStart(); AutoGPKGStart(); InitTableTree(); LoadHistory(); return true; } void MyFrame::LastDitchMemoryDbSave() { // // performing the last desperate attempt to save a MEMORY-DB // int tc; int ret; wxString lastDir; if (MemoryDatabase == false) return; if (!SqliteHandle) return; tc = sqlite3_total_changes(SqliteHandle); if (tc == LastTotalChanges) return; while (1) { // OK, this MEMORY-DB needs to be saved if (MemoryDbSave() == true) break; // we must ask the user wxString msg = wxT("WARNING: the MEMORY-DB contains uncommitted changes\n\n"); msg += wxT("The MEMORY_DB is intrinsecally volatile, so these changes\n"); msg += wxT("will be irremediably lost if you don't export them to some\n"); msg += wxT("persistent storage [i.e. on the file-system]\n\n"); msg += wxT ("Do you want to export [SAVE] the MEMORY-DB to some external database ?"); ret = wxMessageBox(msg, wxT("spatialite_gui"), wxYES_NO | wxICON_QUESTION, this); if (ret != wxYES) break; // asking a PATHNAME to the user wxFileDialog fileDialog(this, wxT("Saving the MEMORY-DB"), wxT(""), wxT("db.sqlite"), wxT ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { // exporting the external DB ExternalSqlitePath = fileDialog.GetPath(); if (MemoryDbSave() == true) { wxMessageBox(wxT("Ok, MEMORY-DB was successfully saved"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); break; } } } } int MyFrame::GetDecimalPrecision() { // // querying the currently set decimal precision // int precision = -1; const char *sql = "SELECT GetDecimalPrecision()"; int ret; sqlite3_stmt *stmt = NULL; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return precision; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) precision = sqlite3_column_int(stmt, 0); } else break; } sqlite3_finalize(stmt); return precision; } void MyFrame::DoUpdateRL2MaxThreads() { // // updating RL2MaxThreads // const char *sql = "SELECT RL2_GetMaxThreads()"; int ret; sqlite3_stmt *stmt = NULL; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); RL2MaxThreads = 1; if (ret != SQLITE_OK) return; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) RL2MaxThreads = sqlite3_column_int(stmt, 0); } else break; } sqlite3_finalize(stmt); } int MyFrame::GetRL2MaxThreads() { // // retrieving RL2MaxThreads // const char *sql = "SELECT RL2_GetMaxThreads()"; int ret; sqlite3_stmt *stmt = NULL; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); int maxThreads = 1; if (ret != SQLITE_OK) return maxThreads; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) maxThreads = sqlite3_column_int(stmt, 0); } else break; } sqlite3_finalize(stmt); return maxThreads; } void MyFrame::CloseDB() { // // disconnecting current SQLite DB // if (!SqliteHandle) return; AutoFDOStop(); AutoGPKGStop(); if (AutoFDOmsg.Len() > 0) wxMessageBox(AutoFDOmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); if (AutoGPKGmsg.Len() > 0) wxMessageBox(AutoGPKGmsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); LastDitchMemoryDbSave(); DoUpdateRL2MaxThreads(); sqlite3_close(SqliteHandle); SqliteHandle = NULL; spatialite_cleanup_ex(SpliteInternalCache); SpliteInternalCache = NULL; SqlitePath = wxT(""); ReadOnlyConnection = false; MemoryDatabase = false; ResetSecurity(); ClearTableTree(); } bool MyFrame::CreateDB() { // creating a new, empty SQLite DB int ret; char path[1024]; char *errMsg = NULL; ReadOnlyConnection = false; if (MemoryDatabase == true) strcpy(path, ":memory:"); else { strcpy(path, SqlitePath.ToUTF8()); unlink(path); } SetSecurityRelaxed(); ret = sqlite3_open_v2(path, &SqliteHandle, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); if (ret) { // an error occurred wxString errCause; errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); sqlite3_close(SqliteHandle); wxMessageBox(wxT("An error occurred\n\n") + errCause + wxT("\n") + SqlitePath, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); SqliteHandle = NULL; SpliteInternalCache = NULL; ClearTableTree(); MemoryDatabase = false; return false; } // setting up the internal cache SpliteInternalCache = spatialite_alloc_connection(); spatialite_init_ex(SqliteHandle, SpliteInternalCache, 0); rl2_init(SqliteHandle, RL2PrivateData, 0); // enabling LOAD_EXTENSION ret = sqlite3_enable_load_extension(SqliteHandle, 1); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to enable LOAD_EXTENSION"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); } // activating Foreign Key constraints ret = sqlite3_exec(SqliteHandle, "PRAGMA foreign_keys = 1", NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to activate FOREIGN_KEY constraints"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); sqlite3_free(errMsg); SqliteHandle = NULL; ClearTableTree(); MemoryDatabase = false; return false; } // setting RL2 MaxThreads char sqlmax[1024]; sprintf(sqlmax, "SELECT RL2_SetMaxThreads(%d)", RL2MaxThreads); sqlite3_exec(SqliteHandle, sqlmax, NULL, 0, &errMsg); InitializeSpatialMetadata(); AutoFDOStart(); AutoGPKGStart(); InitTableTree(); return true; } void MyFrame::InitializeSpatialMetadata() { // attempting to perform self-initialization for a newly created DB int ret; char sql[1024]; char *errMsg = NULL; int count; int i; char **results; int rows; int columns; if (SqliteHandle == NULL) return; // checking if this DB is really empty strcpy(sql, "SELECT Count(*) from sqlite_master"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) return; if (rows < 1) ; else { for (i = 1; i <= rows; i++) count = atoi(results[(i * columns) + 0]); } sqlite3_free_table(results); if (count > 0) return; // all right, it's empty: proceding to initialize strcpy(sql, "SELECT InitSpatialMetadata(1)"); ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("Unable to initialite SpatialMetadata: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } } bool MyFrame::HasHistory(void) { // checks if the "sql_statement" table exists int ret; int i; char **results; int rows; int columns; wxString sql; bool ok_sql = false; bool ok_cause = false; bool ok_time = false; char *errMsg = NULL; sql = wxT("PRAGMA table_info(sql_statements_log)"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *name = results[(i * columns) + 1]; wxString x = wxString::FromUTF8(name); if (x.CmpNoCase(wxT("sql_statement")) == 0) ok_sql = true; if (x.CmpNoCase(wxT("error_cause")) == 0) ok_cause = true; if (x.CmpNoCase(wxT("sql_statement")) == 0) ok_time = true; } } sqlite3_free_table(results); if (ok_sql && ok_cause && ok_time) return true; return false; } void MyFrame::LoadHistory(void) { // attempting to load the most recent SQL history int ret; int i; char **results; int rows; int columns; wxString sql; char *errMsg = NULL; if (!HasHistory()) return; sql = wxT("SELECT sql_statement FROM sql_statements_log "); sql += wxT("WHERE error_cause = 'success' ORDER BY time_end DESC "); sql += wxT("LIMIT 25"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i < rows; i++) { const char *name = results[(i * columns) + 1]; wxString x = wxString::FromUTF8(name); QueryView->GetHistory()->Prepend(x); } } sqlite3_free_table(results); QueryView->SetHistoryStates(); } void MyFrame::DoubleQuotedSql(char *buf) { // well-formatting a string to be used as an SQL name char tmp[1024]; char *in = tmp; char *out = buf; strcpy(tmp, buf); *out++ = '"'; while (*in != '\0') { if (*in == '"') *out++ = '"'; *out++ = *in++; } *out++ = '"'; *out = '\0'; } bool MyFrame::IsSpatialIndex(wxString & tableName) { // testing if this table belongs to some R*Tree Spatial Index int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *geom; char dummy[2048]; wxString tblName; wxString sql; bool status = false; // fetching any defined Spatial Index sql = wxT ("SELECT f_table_name, f_geometry_column FROM geometry_columns WHERE spatial_index_enabled = 1"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) return false; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; geom = results[(i * columns) + 1]; sprintf(dummy, "idx_%s_%s", name, geom); tblName = wxString::FromUTF8(dummy); if (tableName.CmpNoCase(tblName) == 0) { status = true; goto end; } sprintf(dummy, "idx_%s_%s_node", name, geom); tblName = wxString::FromUTF8(dummy); if (tableName.CmpNoCase(tblName) == 0) { status = true; goto end; } sprintf(dummy, "idx_%s_%s_parent", name, geom); tblName = wxString::FromUTF8(dummy); if (tableName.CmpNoCase(tblName) == 0) { status = true; goto end; } sprintf(dummy, "idx_%s_%s_rowid", name, geom); tblName = wxString::FromUTF8(dummy); if (tableName.CmpNoCase(tblName) == 0) { status = true; goto end; } } } end: sqlite3_free_table(results); return status; } bool MyFrame::IsSpatialIndex(wxString & dbAlias, wxString & tableName) { // testing if this table belongs to some R*Tree Spatial Index int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *geom; char dummy[2048]; wxString tblName; wxString sql; // fetching any defined Spatial Index sql = wxT("SELECT f_table_name, f_geometry_column FROM "); sql += dbAlias + wxT(".geometry_columns WHERE spatial_index_enabled = 1"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) return false; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; geom = results[(i * columns) + 1]; sprintf(dummy, "idx_%s_%s", name, geom); tblName = wxString::FromUTF8(dummy); if (tableName.CmpNoCase(tblName) == 0) goto exit_ok; sprintf(dummy, "idx_%s_%s_node", name, geom); tblName = wxString::FromUTF8(dummy); if (tableName.CmpNoCase(tblName) == 0) goto exit_ok; sprintf(dummy, "idx_%s_%s_parent", name, geom); tblName = wxString::FromUTF8(dummy); if (tableName.CmpNoCase(tblName) == 0) goto exit_ok; sprintf(dummy, "idx_%s_%s_rowid", name, geom); tblName = wxString::FromUTF8(dummy); if (tableName.CmpNoCase(tblName) == 0) goto exit_ok; } } sqlite3_free_table(results); return false; exit_ok: sqlite3_free_table(results); return true; } void MyFrame::ElementaryGeoms(wxString & inTable, wxString & geometry, wxString & outTable, wxString & pKey, wxString & multiID, wxString & type, int *srid, wxString & coordDims, bool * spIdx) { // ancillary SQL for ElementaryGeoms int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *gtp; char *dims; char dummy[2048]; wxString sql; bool ok; int metadata_type; outTable = inTable + wxT("_elem"); pKey = wxT("pk_elem"); multiID = wxT("multi_id"); type = wxT("*** Error ***"); *srid = 0; coordDims = wxT("*** Error ***"); *spIdx = false; // fetching metadata metadata_type = GetMetaDataType(); if (metadata_type == METADATA_LEGACY) sql = wxT ("SELECT type, coord_dimension, srid, spatial_index_enabled FROM geometry_columns "); else if (metadata_type == METADATA_CURRENT) sql = wxT ("SELECT geometry_type, srid, spatial_index_enabled FROM geometry_columns "); else return; sql += wxT("WHERE Lower(f_table_name) = Lower('"); strcpy(dummy, inTable.ToUTF8()); CleanSqlString(dummy); sql += wxString::FromUTF8(dummy); sql += wxT("') AND Lower(f_geometry_column) = Lower('"); strcpy(dummy, geometry.ToUTF8()); CleanSqlString(dummy); sql += wxString::FromUTF8(dummy); sql += wxT("')"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (metadata_type == METADATA_LEGACY) { /* legacy Spatial MetaData layout */ gtp = results[(i * columns) + 0]; dims = results[(i * columns) + 1]; *srid = atoi(results[(i * columns) + 2]); if (atoi(results[(i * columns) + 3]) == 0) *spIdx = false; else *spIdx = true; if (strcasecmp(gtp, "POINT") == 0 || strcasecmp(gtp, "MULTIPOINT") == 0) type = wxString::FromUTF8("POINT"); else if (strcasecmp(gtp, "LINESTRING") == 0 || strcasecmp(gtp, "MULTILINESTRING") == 0) type = wxString::FromUTF8("LINESTRING"); else if (strcasecmp(gtp, "POLYGON") == 0 || strcasecmp(gtp, "MULTIPOLYGON") == 0) type = wxString::FromUTF8("POLYGON"); else type = wxString::FromUTF8("GEOMETRY"); coordDims = wxString::FromUTF8(dims); } else { /* current Spatial MetaData layout */ switch (atoi(results[(i * columns) + 0])) { case 0: case 1: case 2: case 3: case 7: type = wxT("GEOMETRY"); coordDims = wxT("XY"); break; case 1000: case 1001: case 1002: case 1003: case 1007: type = wxT("GEOMETRY"); coordDims = wxT("XYZ"); break; case 2000: case 2001: case 2002: case 2003: case 2007: type = wxT("GEOMETRY"); coordDims = wxT("XYM"); break; case 3000: case 3001: case 3002: case 3003: case 3007: type = wxT("GEOMETRY"); coordDims = wxT("XYZM"); break; case 4: type = wxT("POINT"); coordDims = wxT("XY"); break; case 1004: type = wxT("POINT"); coordDims = wxT("XYZ"); break; case 2004: type = wxT("POINT"); coordDims = wxT("XYM"); break; case 3004: type = wxT("POINT"); coordDims = wxT("XYZM"); break; case 5: type = wxT("LINESTRING"); coordDims = wxT("XY"); break; case 1005: type = wxT("LINESTRING"); coordDims = wxT("XYZ"); break; case 2005: type = wxT("LINESTRING"); coordDims = wxT("XYM"); break; case 3005: type = wxT("LINESTRING"); coordDims = wxT("XYZM"); break; case 6: type = wxT("POLYGON"); coordDims = wxT("XY"); break; case 1006: type = wxT("POLYGON"); coordDims = wxT("XYZ"); break; case 2006: type = wxT("POLYGON"); coordDims = wxT("XYM"); break; case 3006: type = wxT("POLYGON"); coordDims = wxT("XYZM"); break; }; *srid = atoi(results[(i * columns) + 1]); if (atoi(results[(i * columns) + 2]) == 0) *spIdx = false; else *spIdx = true; } } } sqlite3_free_table(results); ok = true; while (ok) { // creating an unique PrimaryKey name ok = false; sql = wxT("PRAGMA table_info("); strcpy(dummy, inTable.ToUTF8()); DoubleQuotedSql(dummy); sql += wxString::FromUTF8(dummy); sql += wxT(")"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; wxString x = wxString::FromUTF8(name); if (x.CmpNoCase(pKey) == 0) { pKey += wxT("_1"); ok = true; break; } } } sqlite3_free_table(results); } ok = true; while (ok) { // creating an unique MultiID name ok = false; sql = wxT("PRAGMA table_info("); strcpy(dummy, inTable.ToUTF8()); DoubleQuotedSql(dummy); sql += wxString::FromUTF8(dummy); sql += wxT(")"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; wxString x = wxString::FromUTF8(name); if (x.CmpNoCase(multiID) == 0) { multiID += wxT("_1"); ok = true; break; } } } sqlite3_free_table(results); } ok = true; while (ok) { // creating an unique Table name ok = false; sql = wxT ("SELECT Count(*) FROM sqlite_master WHERE type = 'table' AND Lower(tbl_name) = Lower('"); strcpy(dummy, outTable.ToUTF8()); CleanSqlString(dummy); sql += wxString::FromUTF8(dummy); sql += wxT("')"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (atoi(results[(i * columns) + 0]) != 0) { outTable += wxT("_1"); ok = true; break; } } } sqlite3_free_table(results); } } bool MyFrame::DoElementaryGeometries(wxString & inTable, wxString & geometry, wxString & outTable, wxString & pKey, wxString & multiID, wxString & type, int srid, wxString & coordDims, bool spIdx) { // testing if this table belongs to some R*Tree Spatial Index int ret; int i; char **results; int rows; int columns; wxString sql; wxString sql2; wxString sql3; wxString sql4; wxString sql_geom; wxString sql_spidx; wxString sqlx; char dummy[8192]; char *errMsg = NULL; bool comma = false; sqlite3_stmt *stmt_in = NULL; sqlite3_stmt *stmt_out = NULL; int n_columns; sqlite3_int64 id = 0; int geom_idx = -1; // starts a transaction ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } sql = wxT("SELECT "); sql2 = wxT("INSERT INTO "); sql3 = wxT(") VALUES (NULL, ?"); sql4 = wxT("CREATE TABLE "); strcpy(dummy, outTable.ToUTF8()); DoubleQuotedSql(dummy); sql2 += wxString::FromUTF8(dummy); sql2 += wxT(" ("); sql4 += wxString::FromUTF8(dummy); strcpy(dummy, pKey.ToUTF8()); DoubleQuotedSql(dummy); sql2 += wxString::FromUTF8(dummy); sql2 += wxT(", "); strcpy(dummy, multiID.ToUTF8()); DoubleQuotedSql(dummy); sql2 += wxString::FromUTF8(dummy); sql4 += wxT(" (\n\t"); strcpy(dummy, pKey.ToUTF8()); DoubleQuotedSql(dummy); sql4 += wxString::FromUTF8(dummy); sql4 += wxT(" INTEGER PRIMARY KEY AUTOINCREMENT"); sql4 += wxT(",\n\t"); strcpy(dummy, multiID.ToUTF8()); DoubleQuotedSql(dummy); sql4 += wxString::FromUTF8(dummy); sql4 += wxT(" INTEGER NOT NULL"); sqlx = wxT("PRAGMA table_info("); strcpy(dummy, inTable.ToUTF8()); DoubleQuotedSql(dummy); sqlx += wxString::FromUTF8(dummy); sqlx += wxT(")"); ret = sqlite3_get_table(SqliteHandle, sqlx.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { strcpy(dummy, results[(i * columns) + 1]); DoubleQuotedSql(dummy); if (comma) sql += wxT(", "); else comma = true; sql += wxString::FromUTF8(dummy); sql2 += wxT(", "); sql2 += wxString::FromUTF8(dummy); sql3 += wxT(", ?"); wxString x = wxString::FromUTF8(results[(i * columns) + 1]); if (x.CmpNoCase(geometry) == 0) geom_idx = i - 1; else { sql4 += wxT(",\n\t"); sql4 += wxString::FromUTF8(dummy); sql4 += wxT(" ") + wxString::FromUTF8(results[(i * columns) + 2]); if (atoi(results[(i * columns) + 3]) != 0) sql4 += wxT(" NOT NULL"); } } } sqlite3_free_table(results); if (geom_idx < 0) goto abort; sql += wxT(" FROM "); strcpy(dummy, inTable.ToUTF8()); DoubleQuotedSql(dummy); sql += wxString::FromUTF8(dummy); sql2 += sql3; sql2 += wxT(")"); sql4 += wxT(")"); sql_geom = wxT("SELECT AddGeometryColumn('"); strcpy(dummy, outTable.ToUTF8()); CleanSqlString(dummy); sql_geom += wxString::FromUTF8(dummy); sql_geom += wxT("', '"); strcpy(dummy, geometry.ToUTF8()); CleanSqlString(dummy); sql_geom += wxString::FromUTF8(dummy); sql_geom += wxT("', "); sprintf(dummy, "%d, '", srid); sql_geom += wxString::FromUTF8(dummy); strcpy(dummy, type.ToUTF8()); CleanSqlString(dummy); sql_geom += wxString::FromUTF8(dummy); sql_geom += wxT("', '"); strcpy(dummy, coordDims.ToUTF8()); CleanSqlString(dummy); sql_geom += wxString::FromUTF8(dummy); sql_geom += wxT("')"); if (spIdx == true) { sql_spidx = wxT("SELECT CreateSpatialIndex('"); strcpy(dummy, outTable.ToUTF8()); CleanSqlString(dummy); sql_spidx += wxString::FromUTF8(dummy); sql_spidx += wxT("', '"); strcpy(dummy, geometry.ToUTF8()); CleanSqlString(dummy); sql_spidx += wxString::FromUTF8(dummy); sql_spidx += wxT("')"); } // creating the output table strcpy(dummy, sql4.ToUTF8()); ret = sqlite3_exec(SqliteHandle, dummy, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // creating the output Geometry strcpy(dummy, sql_geom.ToUTF8()); ret = sqlite3_exec(SqliteHandle, dummy, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("AddGeometryColumn error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (spIdx == true) { // creating the R*Tree Spatial Index strcpy(dummy, sql_spidx.ToUTF8()); ret = sqlite3_exec(SqliteHandle, dummy, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CreateSpatialIndex error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } } // preparing the INPUT statement strcpy(dummy, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, dummy, strlen(dummy), &stmt_in, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("[IN]SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } // preparing the OUTPUT statement strcpy(dummy, sql2.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, dummy, strlen(dummy), &stmt_out, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("[OUT]SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } // data transfer n_columns = sqlite3_column_count(stmt_in); while (1) { ret = sqlite3_step(stmt_in); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { gaiaGeomCollPtr g = gaiaFromSpatiaLiteBlobWkb((const unsigned char *) sqlite3_column_blob(stmt_in, geom_idx), sqlite3_column_bytes(stmt_in, geom_idx)); if (!g) { // NULL input geometry sqlite3_reset(stmt_out); sqlite3_clear_bindings(stmt_out); sqlite3_bind_int64(stmt_out, 1, id); sqlite3_bind_null(stmt_out, geom_idx + 2); for (i = 0; i < n_columns; i++) { int type = sqlite3_column_type(stmt_in, i); if (i == geom_idx) continue; switch (type) { case SQLITE_INTEGER: sqlite3_bind_int64(stmt_out, i + 2, sqlite3_column_int(stmt_in, i)); break; case SQLITE_FLOAT: sqlite3_bind_double(stmt_out, i + 2, sqlite3_column_double(stmt_in, i)); break; case SQLITE_TEXT: sqlite3_bind_text(stmt_out, i + 2, (const char *) sqlite3_column_text(stmt_in, i), sqlite3_column_bytes(stmt_in, i), SQLITE_STATIC); break; case SQLITE_BLOB: sqlite3_bind_blob(stmt_out, i + 2, sqlite3_column_blob(stmt_in, i), sqlite3_column_bytes(stmt_in, i), SQLITE_STATIC); break; case SQLITE_NULL: default: sqlite3_bind_null(stmt_out, i + 2); break; }; } ret = sqlite3_step(stmt_out); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("[OUT]step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } } else { // separating Elementary Geoms gaiaPointPtr pt; gaiaLinestringPtr ln; gaiaPolygonPtr pg; gaiaGeomCollPtr outGeom; pt = g->FirstPoint; while (pt) { // separating Points outGeom = GeomFromPoint(pt, g->Srid); sqlite3_reset(stmt_out); sqlite3_clear_bindings(stmt_out); sqlite3_bind_int64(stmt_out, 1, id); if (!outGeom) sqlite3_bind_null(stmt_out, geom_idx + 2); else { unsigned char *blob; int size; gaiaToSpatiaLiteBlobWkb(outGeom, &blob, &size); sqlite3_bind_blob(stmt_out, geom_idx + 2, blob, size, free); gaiaFreeGeomColl(outGeom); } for (i = 0; i < n_columns; i++) { int type = sqlite3_column_type(stmt_in, i); if (i == geom_idx) continue; switch (type) { case SQLITE_INTEGER: sqlite3_bind_int64(stmt_out, i + 2, sqlite3_column_int(stmt_in, i)); break; case SQLITE_FLOAT: sqlite3_bind_double(stmt_out, i + 2, sqlite3_column_double(stmt_in, i)); break; case SQLITE_TEXT: sqlite3_bind_text(stmt_out, i + 2, (const char *) sqlite3_column_text(stmt_in, i), sqlite3_column_bytes(stmt_in, i), SQLITE_STATIC); break; case SQLITE_BLOB: sqlite3_bind_blob(stmt_out, i + 2, sqlite3_column_blob(stmt_in, i), sqlite3_column_bytes(stmt_in, i), SQLITE_STATIC); break; case SQLITE_NULL: default: sqlite3_bind_null(stmt_out, i + 2); break; }; } ret = sqlite3_step(stmt_out); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("[OUT]step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } pt = pt->Next; } ln = g->FirstLinestring; while (ln) { // separating Linestrings outGeom = GeomFromLinestring(ln, g->Srid); sqlite3_reset(stmt_out); sqlite3_clear_bindings(stmt_out); sqlite3_bind_int64(stmt_out, 1, id); if (!outGeom) sqlite3_bind_null(stmt_out, geom_idx + 2); else { unsigned char *blob; int size; gaiaToSpatiaLiteBlobWkb(outGeom, &blob, &size); sqlite3_bind_blob(stmt_out, geom_idx + 2, blob, size, free); gaiaFreeGeomColl(outGeom); } for (i = 0; i < n_columns; i++) { int type = sqlite3_column_type(stmt_in, i); if (i == geom_idx) continue; switch (type) { case SQLITE_INTEGER: sqlite3_bind_int64(stmt_out, i + 2, sqlite3_column_int(stmt_in, i)); break; case SQLITE_FLOAT: sqlite3_bind_double(stmt_out, i + 2, sqlite3_column_double(stmt_in, i)); break; case SQLITE_TEXT: sqlite3_bind_text(stmt_out, i + 2, (const char *) sqlite3_column_text(stmt_in, i), sqlite3_column_bytes(stmt_in, i), SQLITE_STATIC); break; case SQLITE_BLOB: sqlite3_bind_blob(stmt_out, i + 2, sqlite3_column_blob(stmt_in, i), sqlite3_column_bytes(stmt_in, i), SQLITE_STATIC); break; case SQLITE_NULL: default: sqlite3_bind_null(stmt_out, i + 2); break; }; } ret = sqlite3_step(stmt_out); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("[OUT]step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } ln = ln->Next; } pg = g->FirstPolygon; while (pg) { // separating Polygons outGeom = GeomFromPolygon(pg, g->Srid); sqlite3_reset(stmt_out); sqlite3_clear_bindings(stmt_out); sqlite3_bind_int64(stmt_out, 1, id); if (!outGeom) sqlite3_bind_null(stmt_out, geom_idx + 2); else { unsigned char *blob; int size; gaiaToSpatiaLiteBlobWkb(outGeom, &blob, &size); sqlite3_bind_blob(stmt_out, geom_idx + 2, blob, size, free); gaiaFreeGeomColl(outGeom); } for (i = 0; i < n_columns; i++) { int type = sqlite3_column_type(stmt_in, i); if (i == geom_idx) continue; switch (type) { case SQLITE_INTEGER: sqlite3_bind_int64(stmt_out, i + 2, sqlite3_column_int(stmt_in, i)); break; case SQLITE_FLOAT: sqlite3_bind_double(stmt_out, i + 2, sqlite3_column_double(stmt_in, i)); break; case SQLITE_TEXT: sqlite3_bind_text(stmt_out, i + 2, (const char *) sqlite3_column_text(stmt_in, i), sqlite3_column_bytes(stmt_in, i), SQLITE_STATIC); break; case SQLITE_BLOB: sqlite3_bind_blob(stmt_out, i + 2, sqlite3_column_blob(stmt_in, i), sqlite3_column_bytes(stmt_in, i), SQLITE_STATIC); break; case SQLITE_NULL: default: sqlite3_bind_null(stmt_out, i + 2); break; }; } ret = sqlite3_step(stmt_out); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("[OUT]step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } pg = pg->Next; } gaiaFreeGeomColl(g); } id++; } else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("[IN]step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } } sqlite3_finalize(stmt_in); sqlite3_finalize(stmt_out); // commits the transaction ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } return true; abort: if (stmt_in) sqlite3_finalize(stmt_in); if (stmt_out) sqlite3_finalize(stmt_out); return false; } gaiaGeomCollPtr MyFrame::GeomFromPoint(gaiaPointPtr pt, int srid) { // creating a Geometry containing a single Point gaiaGeomCollPtr g = NULL; switch (pt->DimensionModel) { case GAIA_XY_Z_M: g = gaiaAllocGeomCollXYZM(); break; case GAIA_XY_Z: g = gaiaAllocGeomCollXYZ(); break; case GAIA_XY_M: g = gaiaAllocGeomCollXYM(); break; default: g = gaiaAllocGeomColl(); break; }; if (!g) return NULL; g->Srid = srid; g->DeclaredType = GAIA_POINT; switch (pt->DimensionModel) { case GAIA_XY_Z_M: gaiaAddPointToGeomCollXYZM(g, pt->X, pt->Y, pt->Z, pt->M); break; case GAIA_XY_Z: gaiaAddPointToGeomCollXYZ(g, pt->X, pt->Y, pt->Z); break; case GAIA_XY_M: gaiaAddPointToGeomCollXYM(g, pt->X, pt->Y, pt->M); break; default: gaiaAddPointToGeomColl(g, pt->X, pt->Y); break; }; return g; } gaiaGeomCollPtr MyFrame::GeomFromLinestring(gaiaLinestringPtr ln, int srid) { // creating a Geometry containing a single Linestring gaiaGeomCollPtr g = NULL; gaiaLinestringPtr ln2; int iv; double x; double y; double z; double m; switch (ln->DimensionModel) { case GAIA_XY_Z_M: g = gaiaAllocGeomCollXYZM(); break; case GAIA_XY_Z: g = gaiaAllocGeomCollXYZ(); break; case GAIA_XY_M: g = gaiaAllocGeomCollXYM(); break; default: g = gaiaAllocGeomColl(); break; }; if (!g) return NULL; g->Srid = srid; g->DeclaredType = GAIA_LINESTRING; ln2 = gaiaAddLinestringToGeomColl(g, ln->Points); switch (ln->DimensionModel) { case GAIA_XY_Z_M: for (iv = 0; iv < ln->Points; iv++) { gaiaGetPointXYZM(ln->Coords, iv, &x, &y, &z, &m); gaiaSetPointXYZM(ln2->Coords, iv, x, y, z, m); } break; case GAIA_XY_Z: for (iv = 0; iv < ln->Points; iv++) { gaiaGetPointXYZ(ln->Coords, iv, &x, &y, &z); gaiaSetPointXYZ(ln2->Coords, iv, x, y, z); } break; case GAIA_XY_M: for (iv = 0; iv < ln->Points; iv++) { gaiaGetPointXYM(ln->Coords, iv, &x, &y, &m); gaiaSetPointXYM(ln2->Coords, iv, x, y, m); } break; default: for (iv = 0; iv < ln->Points; iv++) { gaiaGetPoint(ln->Coords, iv, &x, &y); gaiaSetPoint(ln2->Coords, iv, x, y); } break; }; return g; } gaiaGeomCollPtr MyFrame::GeomFromPolygon(gaiaPolygonPtr pg, int srid) { // creating a Geometry containing a single Polygon gaiaGeomCollPtr g = NULL; gaiaPolygonPtr pg2; gaiaRingPtr rng; gaiaRingPtr rng2; int ib; int iv; double x; double y; double z; double m; switch (pg->DimensionModel) { case GAIA_XY_Z_M: g = gaiaAllocGeomCollXYZM(); break; case GAIA_XY_Z: g = gaiaAllocGeomCollXYZ(); break; case GAIA_XY_M: g = gaiaAllocGeomCollXYM(); break; default: g = gaiaAllocGeomColl(); break; }; if (!g) return NULL; g->Srid = srid; g->DeclaredType = GAIA_POLYGON; rng = pg->Exterior; pg2 = gaiaAddPolygonToGeomColl(g, rng->Points, pg->NumInteriors); rng2 = pg2->Exterior; switch (pg->DimensionModel) { case GAIA_XY_Z_M: for (iv = 0; iv < rng->Points; iv++) { gaiaGetPointXYZM(rng->Coords, iv, &x, &y, &z, &m); gaiaSetPointXYZM(rng2->Coords, iv, x, y, z, m); } for (ib = 0; ib < pg->NumInteriors; ib++) { rng = pg->Interiors + ib; rng2 = gaiaAddInteriorRing(pg2, ib, rng->Points); for (iv = 0; iv < rng->Points; iv++) { gaiaGetPointXYZM(rng->Coords, iv, &x, &y, &z, &m); gaiaSetPointXYZM(rng2->Coords, iv, x, y, z, m); } } break; case GAIA_XY_Z: for (iv = 0; iv < rng->Points; iv++) { gaiaGetPointXYZ(rng->Coords, iv, &x, &y, &z); gaiaSetPointXYZ(rng2->Coords, iv, x, y, z); } for (ib = 0; ib < pg->NumInteriors; ib++) { rng = pg->Interiors + ib; rng2 = gaiaAddInteriorRing(pg2, ib, rng->Points); for (iv = 0; iv < rng->Points; iv++) { gaiaGetPointXYZ(rng->Coords, iv, &x, &y, &z); gaiaSetPointXYZ(rng2->Coords, iv, x, y, z); } } break; case GAIA_XY_M: for (iv = 0; iv < rng->Points; iv++) { gaiaGetPointXYM(rng->Coords, iv, &x, &y, &m); gaiaSetPointXYM(rng2->Coords, iv, x, y, m); } for (ib = 0; ib < pg->NumInteriors; ib++) { rng = pg->Interiors + ib; rng2 = gaiaAddInteriorRing(pg2, ib, rng->Points); for (iv = 0; iv < rng->Points; iv++) { gaiaGetPointXYM(rng->Coords, iv, &x, &y, &m); gaiaSetPointXYM(rng2->Coords, iv, x, y, m); } } break; default: for (iv = 0; iv < rng->Points; iv++) { gaiaGetPoint(rng->Coords, iv, &x, &y); gaiaSetPoint(rng2->Coords, iv, x, y); } for (ib = 0; ib < pg->NumInteriors; ib++) { rng = pg->Interiors + ib; rng2 = gaiaAddInteriorRing(pg2, ib, rng->Points); for (iv = 0; iv < rng->Points; iv++) { gaiaGetPoint(rng->Coords, iv, &x, &y); gaiaSetPoint(rng2->Coords, iv, x, y); } } break; }; return g; } bool MyFrame::GetTilePreview(wxString & currentTileData, int currentTileId, unsigned char **blob, int *blobSize) { // creating a TilePreview bool success = false; int ret; sqlite3_stmt *stmt; if (currentTileData.Len() == 0) return false; char table[1024]; strcpy(table, currentTileData.ToUTF8()); char *sql = sqlite3_mprintf("SELECT RL2_GetTileImage(%Q, %d)", table, currentTileId); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return false; while (1) { // // fetching the result set rows // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { const unsigned char *p_blob = (const unsigned char *) sqlite3_column_blob(stmt, 0); *blobSize = sqlite3_column_bytes(stmt, 0); *blob = new unsigned char[*blobSize]; memcpy(*blob, p_blob, *blobSize); success = true; } } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (success == false) return false; return true; } void MyFrame::InitTableTree() { // loads the table TREE list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *createSql; char *type; wxString tblName; wxString sql; TableViewList *list; TableViewItem *ptv; bool virtualTable = false; TableTree->Show(false); if (MemoryDatabase == true) { wxString memory = wxT("MEMORY-DB"); TableTree->SetPath(memory); } else TableTree->SetPath(SqlitePath); TableTree->FlushAll(); if (ExistsTopologyMaster()) { // fetching topologies wxString column_list; GetTopologyColumns(&column_list); sql = wxT("SELECT "); sql += column_list; sql += wxT(" FROM main.topology_master"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { int srid_column = -1; int dims_column = -1; for (int c = 0; c < columns; c++) { const char *name = results[c]; if (strcasecmp(name, "srid") == 0) srid_column = c; if (strcasecmp(name, "coord_dimension") == 0) dims_column = c; } for (i = 1; i <= rows; i++) { // adding some Topology TopologySet topology; for (int c = 0; c < columns; c++) { const char *name = results[(i * columns) + c]; if (name != NULL) { if (c == srid_column) topology.SetSrid(atoi(name)); else if (c == dims_column) topology.SetCoordDims(name); else { bool table; bool view; CheckIfExists(name, &table, &view); if (table == true || view == true) topology.Add(name, table, view); } } } if (topology.CheckPrefix() == true) TableTree->AddTopology(&topology); } } sqlite3_free_table(results); } if (ExistsRasterCoverages()) { // fetching Raster Coverages sql = wxT("SELECT coverage_name, srid FROM main.raster_coverages"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { // adding some Raster Coverage const char *name = results[(i * columns) + 0]; int srid = atoi(results[(i * columns) + 1]); RasterCoverageSet coverage(name, srid); TableTree->AddRasterCoverage(&coverage); } } sqlite3_free_table(results); } if (ExistsVectorCoverages()) { // fetching Vector Coverages sql = wxT("SELECT c.coverage_name, g.srid FROM main.vector_coverages AS c "); sql += wxT("JOIN geometry_columns AS g ON ("); sql += wxT("Lower(c.f_table_name) = Lower(g.f_table_name) AND "); sql += wxT("Lower(c.f_geometry_column) = Lower(g.f_geometry_column))"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { // adding some Vector Coverage const char *name = results[(i * columns) + 0]; int srid = atoi(results[(i * columns) + 1]); VectorCoverageSet coverage(name, srid); TableTree->AddVectorCoverage(&coverage); } } sqlite3_free_table(results); } // fetching persistent tables and views sql = wxT ("SELECT name, sql, type FROM main.sqlite_master WHERE (type = 'table' OR type = 'view') ORDER BY name"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } list = new TableViewList(); if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; createSql = results[(i * columns) + 1]; type = results[(i * columns) + 2]; if (strstr(createSql, " VIRTUAL ") || strstr(createSql, " virtual ")) virtualTable = true; else virtualTable = false; tblName = wxString::FromUTF8(name); if (strcmp(type, "view") == 0) list->Add(tblName, true, false); else list->Add(tblName, false, virtualTable); } } sqlite3_free_table(results); FindGeometries(list); ptv = list->GetFirst(); while (ptv != NULL) { // inserting items into the Tree Control View if (ptv->IsView() == true) TableTree->AddView(ptv->GetName(), ptv->IsGeometry(), false); else TableTree->AddTable(ptv->GetName(), ptv->IsVirtual(), ptv->IsGeometry(), false); ptv = ptv->GetNext(); } delete list; // fetching temporary tables and views sql = wxT ("SELECT name, sql, type FROM sqlite_temp_master WHERE (type = 'table' OR type = 'view') ORDER BY name"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } list = new TableViewList(); if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; createSql = results[(i * columns) + 1]; type = results[(i * columns) + 2]; if (strstr(createSql, " VIRTUAL ") || strstr(createSql, " virtual ")) virtualTable = true; else virtualTable = false; tblName = wxString::FromUTF8(name); if (strcmp(type, "view") == 0) list->Add(tblName, true, false); else list->Add(tblName, false, virtualTable); } } sqlite3_free_table(results); FindGeometries(list); ptv = list->GetFirst(); while (ptv != NULL) { // inserting items into the Tree Control View if (ptv->IsView() == true) TableTree->AddView(ptv->GetName(), ptv->IsGeometry(), true); else TableTree->AddTable(ptv->GetName(), ptv->IsVirtual(), ptv->IsGeometry(), true); ptv = ptv->GetNext(); } delete list; ListAttached(); TableTree->ExpandRoot(); TableTree->Show(true); } void MyFrame::InitTableTree(wxString & dbAlias, wxString & path) { // loads the table TREE list [ATTACHED DB] int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *createSql; char *type; wxString tblName; wxString sql; TableViewList *list; TableViewItem *ptv; bool virtualTable = false; TableTree->DeleteAltTopologies(); TableTree->DeleteAltRasterCoverages(); TableTree->DeleteAltVectorCoverages(); wxString dbInfos = dbAlias + wxT(": ") + path; wxTreeItemId db = TableTree->AppendItem(TableTree->GetRootItem(), dbInfos); TableTree->SetItemData(db, (wxTreeItemData *) (new MyObject(MY_ATTACHED, true, dbAlias, path))); TableTree->SetItemImage(db, 21); wxTreeItemId rootUserData = TableTree->AppendItem(db, wxT("User Data")); wxTreeItemId rootIsoMetadata = TableTree->AppendItem(db, wxT("ISO Metadata")); wxTreeItemId rootStyling = TableTree->AppendItem(db, wxT("Styling")); wxTreeItemId rootTopologies = TableTree->AppendItem(db, wxT("Topologies")); wxTreeItemId rootRasterCoverages = TableTree->AppendItem(db, wxT("Raster Coverages")); wxTreeItemId rootVectorCoverages = TableTree->AppendItem(db, wxT("VectorRaster Coverages")); wxTreeItemId rootMetadata = TableTree->AppendItem(db, wxT("Metadata")); wxTreeItemId rootInternal = TableTree->AppendItem(db, wxT("Internal Data")); wxTreeItemId rootSpatialIndex = TableTree->AppendItem(db, wxT("Spatial Index")); TableTree->SetItemImage(rootUserData, 17); TableTree->SetItemImage(rootTopologies, 17); TableTree->SetItemImage(rootRasterCoverages, 22); TableTree->SetItemImage(rootVectorCoverages, 24); TableTree->SetItemImage(rootStyling, 17); TableTree->SetItemImage(rootIsoMetadata, 17); TableTree->SetItemImage(rootMetadata, 17); TableTree->SetItemImage(rootInternal, 17); TableTree->SetItemImage(rootSpatialIndex, 17); RootNodes nodes = RootNodes(dbAlias, rootUserData, rootTopologies, rootRasterCoverages, rootVectorCoverages, rootStyling, rootIsoMetadata, rootMetadata, rootInternal, rootSpatialIndex); if (ExistsTopologyMaster(dbAlias)) { // fetching topologies wxString column_list; GetTopologyColumns(dbAlias, &column_list); sql = wxT("SELECT "); sql += column_list; sql += wxT(" FROM ") + dbAlias + wxT(".topology_master"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { int srid_column = -1; int dims_column = -1; for (int c = 0; c < columns; c++) { const char *name = results[c]; if (strcasecmp(name, "srid") == 0) srid_column = c; if (strcasecmp(name, "coord_dimension") == 0) dims_column = c; } for (i = 1; i <= rows; i++) { // adding some Topology TopologySet topology; for (int c = 0; c < columns; c++) { const char *name = results[(i * columns) + c]; if (name != NULL) { if (c == srid_column) topology.SetSrid(atoi(name)); else if (c == dims_column) topology.SetCoordDims(name); else { bool table; bool view; CheckIfExists(dbAlias, name, &table, &view); if (table == true || view == true) topology.Add(name, table, view); } } } if (topology.CheckPrefix() == true) TableTree->AddAltTopology(rootTopologies, &topology); } } sqlite3_free_table(results); } if (ExistsRasterCoverages(dbAlias)) { // fetching Raster Coverages sql = wxT("SELECT coverage_name, srid FROM ") + dbAlias + wxT(".raster_coverages"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { // adding some Raster Coverage const char *name = results[(i * columns) + 0]; int srid = atoi(results[(i * columns) + 1]); RasterCoverageSet coverage(name, srid); TableTree->AddAltRasterCoverage(rootRasterCoverages, &coverage); } } sqlite3_free_table(results); } if (ExistsVectorCoverages(dbAlias)) { // fetching Vector Coverages sql = wxT("SELECT c.coverage_name, g.srid FROM ") + dbAlias + wxT(".vector_coverages AS c "); sql += wxT("JOIN ") + dbAlias + wxT(".geometry_columns AS g ON ("); sql += wxT("Lower(c.f_table_name) = Lower(g.f_table_name) AND "); sql += wxT("Lower(c.f_geometry_column) = Lower(g.f_geometry_column))"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { // adding some Vector Coverage const char *name = results[(i * columns) + 0]; int srid = atoi(results[(i * columns) + 1]); VectorCoverageSet coverage(name, srid); TableTree->AddAltVectorCoverage(rootVectorCoverages, &coverage); } } sqlite3_free_table(results); } // fetching tables and views sql = wxT("SELECT name, sql, type FROM "); sql += dbAlias; sql += wxT(".sqlite_master WHERE (type = 'table' OR type = 'view') ORDER BY name"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } list = new TableViewList(); if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; createSql = results[(i * columns) + 1]; type = results[(i * columns) + 2]; if (strstr(createSql, " VIRTUAL ") || strstr(createSql, " virtual ")) virtualTable = true; else virtualTable = false; tblName = wxString::FromUTF8(name); if (strcmp(type, "view") == 0) list->Add(tblName, true, false); else list->Add(tblName, false, virtualTable); } } sqlite3_free_table(results); FindGeometries(dbAlias, list); ptv = list->GetFirst(); while (ptv != NULL) { // inserting items into the Tree Control View if (ptv->IsView() == true) TableTree->AddView(dbAlias, ptv->GetName(), ptv->IsGeometry(), &nodes); else TableTree->AddTable(dbAlias, ptv->GetName(), ptv->IsVirtual(), ptv->IsGeometry(), &nodes); ptv = ptv->GetNext(); } delete list; } void MyFrame::ListAttached() { // // listing all Attached DBs // int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; ret = sqlite3_get_table(GetSqlite(), "PRAGMA database_list", &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (strcasecmp("main", results[(i * columns) + 1]) == 0) continue; if (strcasecmp("temp", results[(i * columns) + 1]) == 0) continue; wxString dbAlias = wxString::FromUTF8(results[(i * columns) + 1]); wxString dbPath = wxString::FromUTF8(results[(i * columns) + 2]); InitTableTree(dbAlias, dbPath); } } sqlite3_free_table(results); } wxString *MyFrame::GetTables(int *n) { // loads the table list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString *tables = NULL; wxString sql; *n = 0; sql = wxT("SELECT name FROM sqlite_master WHERE type = 'table' ORDER BY name"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return tables; } if (rows < 1) ; else { tables = new wxString[rows]; *n = rows; for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; tables[i - 1] = wxString::FromUTF8(name); } } sqlite3_free_table(results); return tables; } void MyFrame::GetTableColumns(wxString & tableName, MyTableInfo * list) { // loads the table's column list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *column; wxString Name; wxString Column; bool pKey; bool index; bool cached; wxString sql; char xname[1024]; sql = wxT("PRAGMA table_info("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (atoi(results[(i * columns) + 5]) == 0) pKey = false; else pKey = true; Name = wxString::FromUTF8(name); list->AddColumn(Name, pKey); } } sqlite3_free_table(results); if (CheckMetadata() == true) { // ok, Spatial MetaData exists; retrieving Geometries and Spatial Indices sql = wxT ("SELECT f_geometry_column, spatial_index_enabled FROM geometry_columns "); sql += wxT("WHERE Lower(f_table_name) = Lower('"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { column = results[(i * columns) + 0]; if (atoi(results[(i * columns) + 1]) == 1) index = true; else index = false; if (atoi(results[(i * columns) + 1]) == 2) cached = true; else cached = false; Column = wxString::FromUTF8(column); list->SetGeometry(Column, index, cached); } } sqlite3_free_table(results); if (HasVirtsMetadata() == true) { // may also be some VirtualShape sql = wxT("SELECT virt_geometry FROM virts_geometry_columns "); sql += wxT("WHERE Lower(virt_name) = Lower('"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { column = results[(i * columns) + 0]; Column = wxString::FromUTF8(column); list->SetGeometry(Column, false, false); } } sqlite3_free_table(results); } } } void MyFrame::FindGeometries(TableViewList * list) { // Finds all registered Geometries within the current DB int ret; int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; char *table; list->PrepareSorted(); if (CheckMetadata() == true) { // ok, Spatial MetaData exists; retrieving Geometries sql = wxT("SELECT f_table_name FROM main.geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { table = results[(i * columns) + 0]; wxString tbl = wxString::FromUTF8(table); list->SetGeometry(tbl); } } sqlite3_free_table(results); if (HasVirtsMetadata() == true) { // may also be some VirtualShape sql = wxT("SELECT virt_name FROM main.virts_geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { table = results[(i * columns) + 0]; wxString tbl = wxString::FromUTF8(table); list->SetGeometry(tbl); } } sqlite3_free_table(results); } if (HasViewsMetadata() == true) { // ok, Spatial MetaData exists; retrieving Geometries sql = wxT("SELECT view_name FROM main.views_geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { table = results[(i * columns) + 0]; wxString tbl = wxString::FromUTF8(table); list->SetGeometry(tbl); } } sqlite3_free_table(results); } } } void MyFrame::FindGeometries(wxString & dbAlias, TableViewList * list) { // Finds all registered Geometries within an Attached DB int ret; int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; char *table; list->PrepareSorted(); if (CheckMetadata(dbAlias) == true) { // ok, Spatial MetaData exists; retrieving Geometries sql = wxT("SELECT f_table_name FROM "); sql += dbAlias + wxT(".") + wxT("geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { table = results[(i * columns) + 0]; wxString tbl = wxString::FromUTF8(table); list->SetGeometry(tbl); } } sqlite3_free_table(results); if (HasVirtsMetadata(dbAlias) == true) { // may also be some VirtualShape sql = wxT("SELECT virt_name FROM "); sql += dbAlias + wxT(".") + wxT("virts_geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { table = results[(i * columns) + 0]; wxString tbl = wxString::FromUTF8(table); list->SetGeometry(tbl); } } sqlite3_free_table(results); } if (HasViewsMetadata(dbAlias) == true) { // ok, Spatial MetaData exists; retrieving Geometries sql = wxT("SELECT view_name FROM "); sql += dbAlias + wxT(".") + wxT("views_geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { table = results[(i * columns) + 0]; wxString tbl = wxString::FromUTF8(table); list->SetGeometry(tbl); } } sqlite3_free_table(results); } } } void MyFrame::GetTableColumns(wxString & dbAlias, wxString & tableName, MyTableInfo * list) { // loads the table's column list [Attached DB] int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *column; wxString Name; wxString Column; bool pKey; bool index; bool cached; wxString sql; char xname[1024]; sql = wxT("PRAGMA ") + dbAlias + wxT(".table_info("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (atoi(results[(i * columns) + 5]) == 0) pKey = false; else pKey = true; Name = wxString::FromUTF8(name); list->AddColumn(Name, pKey); } } sqlite3_free_table(results); if (CheckMetadata(dbAlias) == true) { // ok, Spatial MetaData exists; retrieving Geometries and Spatial Indices sql = wxT("SELECT f_geometry_column, spatial_index_enabled FROM "); sql += dbAlias + wxT(".geometry_columns "); sql += wxT("WHERE Lower(f_table_name) = Lower('"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { column = results[(i * columns) + 0]; if (atoi(results[(i * columns) + 1]) == 1) index = true; else index = false; if (atoi(results[(i * columns) + 1]) == 2) cached = true; else cached = false; Column = wxString::FromUTF8(column); list->SetGeometry(Column, index, cached); } } sqlite3_free_table(results); if (HasVirtsMetadata(dbAlias) == true) { // may also be some VirtualShape sql = wxT("SELECT virt_geometry FROM "); sql += dbAlias + wxT(".virts_geometry_columns "); sql += wxT("WHERE Lower(virt_name) = Lower('"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { column = results[(i * columns) + 0]; Column = wxString::FromUTF8(column); list->SetGeometry(Column, false, false); } } sqlite3_free_table(results); } } } bool MyFrame::IsPrimaryKey(wxString & tableName, wxString & columnName) { // checking if some column is a PRIMARY KEY int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; bool pk = false; wxString sql; char column[1024]; char xname[1024]; strcpy(column, columnName.ToUTF8()); sql = wxT("PRAGMA table_info("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (strcasecmp(name, column) == 0) { if (atoi(results[(i * columns) + 5]) != 0) pk = true; } } } sqlite3_free_table(results); return pk; } void MyFrame::GetViewColumns(wxString & tableName, MyViewInfo * list) { // loads the view's column list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *column; wxString Name; wxString Column; bool index; bool cached; wxString sql; char xname[1024]; char xsql[4192]; sql = wxT("PRAGMA table_info("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); strcpy(xsql, sql.ToUTF8()); int ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; Name = wxString::FromUTF8(name); list->AddColumn(Name); } } sqlite3_free_table(results); if (HasViewsMetadata() == true) { // ok, Spatial MetaData exists; retrieving Geometries and Spatial Indices sql = wxT("SELECT a.view_geometry, b.spatial_index_enabled "); sql += wxT("FROM views_geometry_columns AS a "); sql += wxT("JOIN geometry_columns AS b ON ("); sql += wxT("Lower(a.f_table_name) = Lower(b.f_table_name) AND "); sql += wxT("Lower(a.f_geometry_column) = Lower(b.f_geometry_column)) "); sql += wxT("WHERE Lower(view_name) = Lower('"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { column = results[(i * columns) + 0]; if (atoi(results[(i * columns) + 1]) == 1) index = true; else index = false; if (atoi(results[(i * columns) + 1]) == 2) cached = true; else cached = false; Column = wxString::FromUTF8(column); list->SetGeometry(Column, index, cached); } } sqlite3_free_table(results); } } void MyFrame::GetViewColumns(wxString & dbAlias, wxString & tableName, MyViewInfo * list) { // loads the view's column list [Attached DB] int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *column; wxString Name; wxString Column; bool index; bool cached; wxString sql; char xname[1024]; char xsql[4192]; sql = wxT("PRAGMA ") + dbAlias + wxT(".table_info("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); strcpy(xsql, sql.ToUTF8()); int ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; Name = wxString::FromUTF8(name); list->AddColumn(Name); } } sqlite3_free_table(results); if (HasViewsMetadata(dbAlias) == true) { // ok, Spatial MetaData exists; retrieving Geometries and Spatial Indices sql = wxT("SELECT a.view_geometry, b.spatial_index_enabled "); sql += wxT("FROM ") + dbAlias + wxT(".views_geometry_columns AS a "); sql += wxT("JOIN ") + dbAlias + wxT(".geometry_columns AS b ON ("); sql += wxT("Lower(a.f_table_name) = Lower(b.f_table_name) AND "); sql += wxT("Lower(a.f_geometry_column) = Lower(b.f_geometry_column)) "); sql += wxT("WHERE Lower(view_name) = Lower('"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { column = results[(i * columns) + 0]; if (atoi(results[(i * columns) + 1]) == 1) index = true; else index = false; if (atoi(results[(i * columns) + 1]) == 2) cached = true; else cached = false; Column = wxString::FromUTF8(column); list->SetGeometry(Column, index, cached); } } sqlite3_free_table(results); } } void MyFrame::GetViewTriggers(wxString & tableName, MyViewInfo * list) { // loads the view's indices list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("SELECT name FROM sqlite_master WHERE type = 'trigger' "); sql += wxT("AND Lower(tbl_name) = Lower('"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("') ORDER BY name"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; Name = wxString::FromUTF8(name); list->AddTrigger(Name); } } sqlite3_free_table(results); TableTree->ExpandRoot(); } void MyFrame::GetViewTriggers(wxString & dbAlias, wxString & tableName, MyViewInfo * list) { // loads the view's indices list [Attached DB] int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("SELECT name FROM ") + dbAlias + wxT(".sqlite_master WHERE type = 'trigger' AND tbl_name = '"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("' ORDER BY name"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; Name = wxString::FromUTF8(name); list->AddTrigger(Name); } } sqlite3_free_table(results); TableTree->ExpandRoot(); } void MyFrame::GetTableIndices(wxString & tableName, MyTableInfo * list) { // loads the table's indices list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("PRAGMA index_list("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; Name = wxString::FromUTF8(name); list->AddIndex(Name); } } sqlite3_free_table(results); } void MyFrame::GetTableIndices(wxString & dbAlias, wxString & tableName, MyTableInfo * list) { // loads the table's indices list [Attached DB] int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("PRAGMA ") + dbAlias + wxT(".index_list("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; Name = wxString::FromUTF8(name); list->AddIndex(Name); } } sqlite3_free_table(results); } void MyFrame::GetIndexFields(wxString & indexName, wxTreeItemId & node) { // loads the index fields list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("PRAGMA index_info("); strcpy(xname, indexName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 2]; Name = wxString::FromUTF8(name); TableTree->AppendItem(node, Name, 3); } } sqlite3_free_table(results); } void MyFrame::GetIndexFields(wxString & dbAlias, wxString & indexName, wxTreeItemId & node) { // loads the index fields list [Attached DB] int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("PRAGMA ") + dbAlias + wxT(".index_info("); strcpy(xname, indexName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 2]; Name = wxString::FromUTF8(name); TableTree->AppendItem(node, Name, 3); } } sqlite3_free_table(results); } void MyFrame::GetPrimaryKeyFields(wxString & indexName, wxTreeItemId & node) { // loads the Primary Key fields list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("PRAGMA index_info("); strcpy(xname, indexName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 2]; Name = wxString::FromUTF8(name); TableTree->AppendItem(node, Name, 2); } } sqlite3_free_table(results); } void MyFrame::GetPrimaryKeyFields(wxString & dbAlias, wxString & indexName, wxTreeItemId & node) { // loads the Primary Key fields list [Attached DB] int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("PRAGMA ") + dbAlias + wxT(".index_info("); strcpy(xname, indexName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 2]; Name = wxString::FromUTF8(name); TableTree->AppendItem(node, Name, 2); } } sqlite3_free_table(results); } void MyFrame::GetForeignKeys(wxString & tableName, wxTreeItemId & node) { // loads the Foreign Keys list int i; char **results; int rows; int columns; char *errMsg = NULL; char *ref_table; char *column; int id; int uid = INT_MIN; wxString refTable; wxString Column; wxString sql; char xname[1024]; wxTreeItemId item; sql = wxT("PRAGMA foreign_key_list("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { id = atoi(results[(i * columns) + 0]); ref_table = results[(i * columns) + 2]; column = results[(i * columns) + 3]; refTable = wxString::FromUTF8(ref_table); Column = wxString::FromUTF8(column); if (i == 1) { wxString fkName = wxT("FK#"); sprintf(xname, "%d", id); fkName += wxString::FromUTF8(xname); fkName += wxT(" ref: ") + refTable; item = TableTree->AppendItem(node, fkName, 18); uid = id; } else if (id != uid) { wxString fkName = wxT("FK#"); sprintf(xname, "%d", id); fkName += wxString::FromUTF8(xname); fkName += wxT(" ref: ") + refTable; item = TableTree->AppendItem(node, fkName, 18); uid = id; } TableTree->AppendItem(item, Column, 3); } } sqlite3_free_table(results); } void MyFrame::GetForeignKeys(wxString & dbAlias, wxString & tableName, wxTreeItemId & node) { // loads the Foreign Keys list [Attached DB] int i; char **results; int rows; int columns; char *errMsg = NULL; char *ref_table; char *column; int id; int uid = INT_MIN; wxString refTable; wxString Column; wxString sql; char xname[1024]; wxTreeItemId item; sql = wxT("PRAGMA ") + dbAlias + wxT(".foreign_key_list("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { id = atoi(results[(i * columns) + 0]); ref_table = results[(i * columns) + 2]; column = results[(i * columns) + 3]; refTable = wxString::FromUTF8(ref_table); Column = wxString::FromUTF8(column); if (i == 1) { wxString fkName = wxT("FK#"); sprintf(xname, "%d", id); fkName += wxString::FromUTF8(xname); fkName += wxT(" ref: ") + refTable; item = TableTree->AppendItem(node, fkName, 18); uid = id; } else if (id != uid) { wxString fkName = wxT("FK#"); sprintf(xname, "%d", id); fkName += wxString::FromUTF8(xname); fkName += wxT(" ref: ") + refTable; item = TableTree->AppendItem(node, fkName, 18); uid = id; } TableTree->AppendItem(item, Column, 3); } } sqlite3_free_table(results); } void MyFrame::GetTableTriggers(wxString & tableName, MyTableInfo * list) { // loads the table's indices list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("SELECT name FROM sqlite_master WHERE type = 'trigger' "); sql += wxT("AND Lower(tbl_name) = Lower('"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("') ORDER BY name"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; Name = wxString::FromUTF8(name); list->AddTrigger(Name); } } sqlite3_free_table(results); TableTree->ExpandRoot(); } void MyFrame::GetTableTriggers(wxString & dbAlias, wxString & tableName, MyTableInfo * list) { // loads the table's indices list [Attached DB] int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; wxString sql; char xname[1024]; sql = wxT("SELECT name FROM ") + dbAlias; sql += wxT(".sqlite_master WHERE type = 'trigger' AND tbl_name = '"); strcpy(xname, tableName.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("' ORDER BY name"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; Name = wxString::FromUTF8(name); list->AddTrigger(Name); } } sqlite3_free_table(results); TableTree->ExpandRoot(); } wxString *MyFrame::GetColumnNames(wxString & tableName, int *n_cols) { // loads the table's column names list wxString *cols = NULL; int nCols = 0; char **results; int rows; int columns; int i; char *errMsg = NULL; wxString sql; char *column; char xname[1024]; sql = wxT("PRAGMA table_info("); strcpy(xname, tableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return NULL; } sql = wxT(""); if (rows < 1) ; else { nCols = rows; cols = new wxString[rows]; for (i = 1; i <= rows; i++) { column = results[(i * columns) + 1]; *(cols + i - 1) += wxString::FromUTF8(column); } } sqlite3_free_table(results); *n_cols = nCols; return cols; } int MyFrame::GetCharsetIndex(wxString & charset) { // identifies the INDEX for a given charset int i; for (i = 0; i < CharsetsLen; i++) { if (*(Charsets + i) == charset) return i; } return wxNOT_FOUND; } wxString & MyFrame::GetCharsetName(wxString & charset) { // identifies the full name for a given charset code int i; for (i = 0; i < CharsetsLen; i++) { if (*(Charsets + i) == charset) return *(CharsetsNames + i); } return charset; } void MyFrame::ClearTableTree() { // resets the table TREE list to the empty state wxString path = wxT("no current DB"); TableTree->SetPath(path); TableTree->FlushAll(); } void MyFrame::AutoFDOStart() { // // trying to start the FDO-OGR auto-wrapper // int ret; const char *name; int i; char **results; int rows; int columns; char sql[1024]; int count = 0; int len; int spatial_type = 0; AutoFDOTables tables; AutoFDOTable *p; wxString fdoNames[5]; char xname[1024]; char xname2[1024]; SpatiaLiteMetadata = false; AutoFDOmsg = wxT(""); strcpy(sql, "SELECT CheckSpatialMetadata()"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) goto error1; if (rows < 1) ; else { for (i = 1; i <= rows; i++) spatial_type = atoi(results[(i * columns) + 0]); } sqlite3_free_table(results); error1: if (spatial_type == 1 || spatial_type == 3) SpatiaLiteMetadata = true; if (spatial_type == 2) { // // ok, creating VirtualFDO tables // strcpy(sql, "SELECT DISTINCT f_table_name FROM geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) goto error; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; if (name) { len = strlen(name); tables.Add(name, len); } } } sqlite3_free_table(results); p = tables.GetFirst(); while (p) { // // destroying the VirtualFDO table [if existing] // sprintf(xname, "fdo_%s", p->GetName()); DoubleQuotedSql(xname); sprintf(sql, "DROP TABLE IF EXISTS %s", xname); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; // // creating the VirtualFDO table // sprintf(xname, "fdo_%s", p->GetName()); DoubleQuotedSql(xname); strcpy(xname2, p->GetName()); DoubleQuotedSql(xname2); sprintf(sql, "CREATE VIRTUAL TABLE %s USING VirtualFDO(%s)", xname, xname2); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; if (count < 5) fdoNames[count] = wxT("- VirtualTable: fdo_") + wxString::FromUTF8(p->GetName()); else fdoNames[4] = wxT("- ... and others ..."); count++; p = p->GetNext(); } error: if (count) { AutoFDOmsg = wxT("FDO-OGR detected; activating FDO-OGR auto-wrapping ...\n\n"); if (fdoNames[0].Len() > 0) AutoFDOmsg += fdoNames[0] + wxT("\n"); if (fdoNames[1].Len() > 0) AutoFDOmsg += fdoNames[1] + wxT("\n"); if (fdoNames[2].Len() > 0) AutoFDOmsg += fdoNames[2] + wxT("\n"); if (fdoNames[3].Len() > 0) AutoFDOmsg += fdoNames[3] + wxT("\n"); if (fdoNames[4].Len() > 0) AutoFDOmsg += fdoNames[4] + wxT("\n"); AutoFDOmsg += wxT ("\nAccessing these fdo_XX tables you can take full advantage of\n"); AutoFDOmsg += wxT("FDO-OGR auto-wrapping facility\n"); AutoFDOmsg += wxT ("This allows you to access any specific FDO-OGR Geometry as if it\n"); AutoFDOmsg += wxT ("where native SpatiaLite ones in a completely transparent way.\n"); } return; } } void MyFrame::AutoFDOStop() { // // trying to stop the FDO-OGR auto-wrapper // int ret; const char *name; int i; char **results; int rows; int columns; char sql[1024]; int count = 0; int len; int spatial_type = 0; char xname[1024]; AutoFDOTables tables; AutoFDOTable *p; AutoFDOmsg = wxT(""); strcpy(sql, "SELECT CheckSpatialMetadata()"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) goto error1; if (rows < 1) ; else { for (i = 1; i <= rows; i++) spatial_type = atoi(results[(i * columns) + 0]); } sqlite3_free_table(results); error1: if (spatial_type == 2) { // // ok, destroying VirtualFDO tables // strcpy(sql, "SELECT DISTINCT f_table_name FROM geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) goto error; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; if (name) { len = strlen(name); tables.Add(name, len); } } } sqlite3_free_table(results); p = tables.GetFirst(); while (p) { // // destroying the VirtualFDO table [if existing] // sprintf(xname, "fdo_%s", p->GetName()); DoubleQuotedSql(xname); sprintf(sql, "DROP TABLE IF EXISTS %s", xname); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; count++; p = p->GetNext(); } error: if (count) AutoFDOmsg = wxT("FDO-OGR auto-wrapping shutdown done"); return; } } void MyFrame::AutoGPKGStart() { // // trying to start the OGC GeoPackage auto-wrapper // int ret; const char *name; int i; char **results; int rows; int columns; char sql[1024]; int count = 0; int len; int is_gpkg = 0; AutoGPKGTables tables; AutoGPKGTable *p; wxString gpkgNames[5]; char xname[1024]; char xname2[1024]; AutoGPKGmsg = wxT(""); strcpy(sql, "SELECT CheckGeoPackageMetadata()"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) goto error1; if (rows < 1) ; else { for (i = 1; i <= rows; i++) is_gpkg = atoi(results[(i * columns) + 0]); } sqlite3_free_table(results); error1: if (is_gpkg) { // // ok, creating VirtualGPKG tables // strcpy(sql, "SELECT DISTINCT table_name FROM gpkg_geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) goto error; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; if (name) { len = strlen(name); tables.Add(name, len); } } } sqlite3_free_table(results); p = tables.GetFirst(); while (p) { // // destroying the VirtualGPKG table [if existing] // sprintf(xname, "vgpkg_%s", p->GetName()); DoubleQuotedSql(xname); sprintf(sql, "DROP TABLE IF EXISTS %s", xname); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; // // creating the VirtualGPKG table // sprintf(xname, "vgpkg_%s", p->GetName()); DoubleQuotedSql(xname); strcpy(xname2, p->GetName()); DoubleQuotedSql(xname2); sprintf(sql, "CREATE VIRTUAL TABLE %s USING VirtualGPKG(%s)", xname, xname2); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; if (count < 5) gpkgNames[count] = wxT("- VirtualTable: vgpg_") + wxString::FromUTF8(p->GetName()); else gpkgNames[4] = wxT("- ... and others ..."); count++; p = p->GetNext(); } error: if (count) { AutoGPKGmsg = wxT ("GPKG detected; activating OGC GeoPackage auto-wrapping ...\n\n"); if (gpkgNames[0].Len() > 0) AutoGPKGmsg += gpkgNames[0] + wxT("\n"); if (gpkgNames[1].Len() > 0) AutoGPKGmsg += gpkgNames[1] + wxT("\n"); if (gpkgNames[2].Len() > 0) AutoGPKGmsg += gpkgNames[2] + wxT("\n"); if (gpkgNames[3].Len() > 0) AutoGPKGmsg += gpkgNames[3] + wxT("\n"); if (gpkgNames[4].Len() > 0) AutoGPKGmsg += gpkgNames[4] + wxT("\n"); AutoGPKGmsg += wxT ("\nAccessing these vgpkg_XX tables you can take full advantage of\n"); AutoGPKGmsg += wxT("OGC GeoPackage auto-wrapping facility\n"); AutoGPKGmsg += wxT ("This allows you to access any specific GPKG Geometry as if it\n"); AutoGPKGmsg += wxT ("where native SpatiaLite ones in a completely transparent way.\n"); } return; } } void MyFrame::AutoGPKGStop() { // // trying to stop the OGC GeoPackage auto-wrapper // int ret; const char *name; int i; char **results; int rows; int columns; char sql[1024]; int count = 0; int len; int is_gpkg = 0; char xname[1024]; AutoGPKGTables tables; AutoGPKGTable *p; AutoGPKGmsg = wxT(""); strcpy(sql, "SELECT CheckGeoPackageMetadata()"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) goto error1; if (rows < 1) ; else { for (i = 1; i <= rows; i++) is_gpkg = atoi(results[(i * columns) + 0]); } sqlite3_free_table(results); error1: if (is_gpkg) { // // ok, destroying VirtualGPKG tables // strcpy(sql, "SELECT DISTINCT table_name FROM gpkg_geometry_columns"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) goto error; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; if (name) { len = strlen(name); tables.Add(name, len); } } } sqlite3_free_table(results); p = tables.GetFirst(); while (p) { // // destroying the VirtualGPKG table [if existing] // sprintf(xname, "vgpkg_%s", p->GetName()); DoubleQuotedSql(xname); sprintf(sql, "DROP TABLE IF EXISTS %s", xname); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, NULL); if (ret != SQLITE_OK) goto error; count++; p = p->GetNext(); } error: if (count) AutoGPKGmsg = wxT("OGC GeoPackage auto-wrapping shutdown done"); return; } } bool MyFrame::HasVirtsMetadata() { // // testing if the VIRTS_GEOMETRY_COLUMNS table exists // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; bool defined = false; sql = wxT("PRAGMA table_info(virts_geometry_columns)"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) defined = true; } sqlite3_free_table(results); return defined; } bool MyFrame::HasVirtsMetadata(wxString & dbAlias) { // // testing if the VIRTS_GEOMETRY_COLUMNS table exists [Attached DB] // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; bool defined = false; sql = wxT("PRAGMA ") + dbAlias + wxT(".table_info(virts_geometry_columns)"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) defined = true; } sqlite3_free_table(results); return defined; } bool MyFrame::HasViewsMetadata() { // // testing if the VIEWS_GEOMETRY_COLUMNS table exists // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; bool defined = false; sql = wxT("PRAGMA table_info(views_geometry_columns)"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) defined = true; } sqlite3_free_table(results); return defined; } bool MyFrame::HasViewsMetadata(wxString & dbAlias) { // // testing if the VIEWS_GEOMETRY_COLUMNS table exists [Attached DB] // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; bool defined = false; sql = wxT("PRAGMA ") + dbAlias + wxT(".table_info(views_geometry_columns)"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) defined = true; } sqlite3_free_table(results); return defined; } int MyFrame::TestDotCommand(const char *p_stmt) { // // identifying DOT-COMMANDS [SQL script] // const char *stmt = p_stmt; int len; if (*p_stmt == '\n') stmt = p_stmt + 1; len = strlen(stmt); if (strncasecmp(stmt, ".loadxl ", 8) == 0) return CMD_LOADXL; if (len <= 9) return CMD_NONE; if (strncasecmp(stmt, ".loadshp ", 9) == 0) return CMD_LOADSHP; if (strncasecmp(stmt, ".loaddbf ", 9) == 0) return CMD_LOADDBF; if (strncasecmp(stmt, ".dumpshp ", 9) == 0) return CMD_DUMPSHP; if (strncasecmp(stmt, ".dumpdbf ", 9) == 0) return CMD_DUMPDBF; if (strncasecmp(stmt, ".sqllog ", 8) == 0) return CMD_SQLLOG; return CMD_NONE; } bool MyFrame::IsDotCommandLoadShp(const char *stmt, char *path, char *table, char *charset, char *column, int *srid, bool * coerce2D, bool * compressed) { // // attempting to parse a .loadshp command [SQL script] // wxString cmd = wxString::FromUTF8(stmt); wxString extPath; wxString extTable; wxString extCharset; wxString extColumn = wxT("Geometry"); long extSrid = 0; bool extCoerce2D = false; bool extCompressed = false; int count = 0; wxStringTokenizer tok(cmd); while (tok.HasMoreTokens()) { wxString token = tok.GetNextToken(); switch (count) { case 0: extPath = token; break; case 1: extTable = token; break; case 2: extCharset = token; break; case 3: if (token.ToLong(&extSrid) == false) extSrid = 0; break; case 4: extColumn = token; break; case 5: extCoerce2D = true; break; case 6: extCompressed = true; break; }; count++; } if (count == 3 || count == 4 || count == 5 || count == 6 || count == 7) { strcpy(path, extPath.ToUTF8()); strcpy(table, extTable.ToUTF8()); strcpy(charset, extCharset.ToUTF8()); strcpy(column, extColumn.ToUTF8()); *srid = extSrid; *coerce2D = extCoerce2D; *compressed = extCompressed; return true; } return false; } bool MyFrame::IsDotCommandLoadDbf(const char *stmt, char *path, char *table, char *charset) { // // attempting to parse a .loaddbf command [SQL script] // wxString cmd = wxString::FromUTF8(stmt); wxString extPath; wxString extTable; wxString extCharset; int count = 0; wxStringTokenizer tok(cmd); while (tok.HasMoreTokens()) { wxString token = tok.GetNextToken(); switch (count) { case 0: extPath = token; break; case 1: extTable = token; break; case 2: extCharset = token; break; }; count++; } if (count == 3) { strcpy(path, extPath.ToUTF8()); strcpy(table, extTable.ToUTF8()); strcpy(charset, extCharset.ToUTF8()); return true; } return false; } bool MyFrame::IsDotCommandLoadXL(const char *stmt, char *path, char *table, int *worksheetIndex, int *firstTitle) { // // attempting to parse a .loadxl command [SQL script] // wxString cmd = wxString::FromUTF8(stmt); wxString extPath; wxString extTable; int extWorksheetIndex = 0; bool extFirstTitle = false; int count = 0; char dummy[128]; wxStringTokenizer tok(cmd); while (tok.HasMoreTokens()) { wxString token = tok.GetNextToken(); switch (count) { case 0: extPath = token; break; case 1: extTable = token; break; case 2: strcpy(dummy, token.ToUTF8()); extWorksheetIndex = atoi(dummy); break; case 3: strcpy(dummy, token.ToUTF8()); if (atoi(dummy) == 1) extFirstTitle = true; break; }; count++; } if (count == 3 || count == 4 || count == 5) { if (extFirstTitle == true) *firstTitle = 1; else *firstTitle = 0; strcpy(path, extPath.ToUTF8()); strcpy(table, extTable.ToUTF8()); *worksheetIndex = extWorksheetIndex; return true; } return false; } bool MyFrame::IsViewGeometry(wxString & table, wxString & column) { // // checking if some table.geometry corresponds to a VIEW // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; int count = 0; sql = wxT ("SELECT Count(*) FROM views_geometry_columns WHERE Lower(view_name) = Lower('"); sql += table; sql += wxT("') AND view_geometry = Lower('"); sql += column; sql += wxT("')"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { count = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (count) return true; return false; } bool MyFrame::ExistsTopologyMaster() { // // checking if TOPOLOGY_MASTER exists // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; int count = 0; sql = wxT("SELECT Count(*) FROM main.sqlite_master "); sql += wxT("WHERE type = 'table' AND "); sql += wxT("tbl_name = 'topology_master'"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { count = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (count) return true; return false; } bool MyFrame::ExistsTopologyMaster(wxString & dbAlias) { // // checking if TOPOLOGY_MASTER exists [Attached DB] // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; int count = 0; sql = wxT("SELECT Count(*) FROM ") + dbAlias + wxT(".sqlite_master "); sql += wxT("WHERE type = 'table' AND "); sql += wxT("tbl_name = 'topology_master'"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { count = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (count) return true; return false; } void MyFrame::GetTopologyColumns(wxString * list) { // // identifying TOPOLOGY_MASTER columns // int i; char **results; int rows; int columns; char *errMsg = NULL; const char *name; int comma = false; wxString col_list; *list = col_list; int ret = sqlite3_get_table(SqliteHandle, "PRAGMA table_info(topology_master)", &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (comma == false) comma = true; else col_list += wxT(", "); col_list += wxString::FromUTF8(name); } } sqlite3_free_table(results); *list = col_list; } void MyFrame::GetTopologyColumns(wxString & dbAlias, wxString * list) { // // identifying TOPOLOGY_MASTER columns [Attached DB] // int i; char **results; int rows; int columns; char *errMsg = NULL; const char *name; int comma = false; wxString col_list; wxString sql; *list = col_list; sql = wxT("PRAGMA ") + dbAlias + wxT(".table_info(topology_master)"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (comma == false) comma = true; else col_list += wxT(", "); col_list += wxString::FromUTF8(name); } } sqlite3_free_table(results); *list = col_list; } bool MyFrame::ExistsRasterCoverages() { // // checking if RASTER_COVERAGES exists // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; int count = 0; sql = wxT("SELECT Count(*) FROM main.sqlite_master "); sql += wxT("WHERE type = 'table' AND "); sql += wxT("tbl_name = 'raster_coverages'"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { count = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (count) return true; return false; } bool MyFrame::ExistsRasterCoverages(wxString & dbAlias) { // // checking if RASTER_COVERAGES exists [Attached DB] // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; int count = 0; sql = wxT("SELECT Count(*) FROM ") + dbAlias + wxT(".sqlite_master "); sql += wxT("WHERE type = 'table' AND "); sql += wxT("tbl_name = 'raster_coverages'"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { count = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (count) return true; return false; } bool MyFrame::ExistsVectorCoverages() { // // checking if VECTOR_COVERAGES exists // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; int count = 0; sql = wxT("SELECT Count(*) FROM main.sqlite_master "); sql += wxT("WHERE type = 'table' AND "); sql += wxT("tbl_name = 'vector_coverages'"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { count = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (count) return true; return false; } bool MyFrame::ExistsVectorCoverages(wxString & dbAlias) { // // checking if VECTOR_COVERAGES exists [Attached DB] // int i; char **results; int rows; int columns; char *errMsg = NULL; wxString sql; int count = 0; sql = wxT("SELECT Count(*) FROM ") + dbAlias + wxT(".sqlite_master "); sql += wxT("WHERE type = 'table' AND "); sql += wxT("tbl_name = 'vector_coverages'"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { count = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (count) return true; return false; } void MyFrame::CheckIfExists(const char *name, bool * table, bool * view) { // // checking if a Topology related Table or View actually exists // char dummy[2048]; wxString sql; int i; char **results; int rows; int columns; char *errMsg = NULL; *table = false; *view = false; strcpy(dummy, name); CleanSqlString(dummy); sql = wxT("SELECT type FROM sqlite_master WHERE Lower(name) = Lower('"); sql += wxString::FromUTF8(dummy); sql += wxT("')"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; if (strcasecmp(name, "table") == 0) *table = true; if (strcasecmp(name, "view") == 0) *view = true; } } sqlite3_free_table(results); } void MyFrame::CheckIfExists(wxString & dbAlias, const char *name, bool * table, bool * view) { // // checking if a Topology related Table or View actually exists [Attached DB] // char dummy[2048]; wxString sql; int i; char **results; int rows; int columns; char *errMsg = NULL; *table = false; *view = false; strcpy(dummy, name); CleanSqlString(dummy); sql = wxT("SELECT type FROM ") + dbAlias + wxT(".sqlite_master WHERE Lower(name) = Lower('"); sql += wxString::FromUTF8(dummy); sql += wxT("')"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; if (strcasecmp(name, "table") == 0) *table = true; if (strcasecmp(name, "view") == 0) *view = true; } } sqlite3_free_table(results); } int MyFrame::GetMetaDataType() { // // determining the MetaData type // int ret; int i; char **results; int rows; int columns; char sql[1024]; int spatial_type = 0; strcpy(sql, "SELECT CheckSpatialMetadata()"); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, NULL); if (ret != SQLITE_OK) goto error1; if (rows < 1) ; else { for (i = 1; i <= rows; i++) spatial_type = atoi(results[(i * columns) + 0]); } sqlite3_free_table(results); if (spatial_type == 1) return METADATA_LEGACY; if (spatial_type == 3) return METADATA_CURRENT; error1: return METADATA_UNKNOWN; } void MyFrame::InsertIntoLog(wxString & sql_stmt) { // // inserting a row into sql_statements_log // char *clean; int ret; char *errMsg = NULL; if (ReadOnlyConnection) return; wxString sql = wxT("INSERT INTO sql_statements_log "); sql += wxT("(id, time_start, user_agent, sql_statement) VALUES ("); sql += wxT("NULL, strftime('%Y-%m-%dT%H:%M:%fZ', 'now'), "); sql += wxT("'spatialite_gui', '"); clean = gaiaSingleQuotedSql(sql_stmt.ToUTF8()); sql += wxString::FromUTF8(clean); free(clean); sql += wxT("')"); ret = sqlite3_exec(SqliteHandle, sql.ToUTF8(), NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("InsertIntoLog: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); LastSqlLogID = -1; return; } LastSqlLogID = sqlite3_last_insert_rowid(SqliteHandle); } void MyFrame::UpdateLog() { // // updating sql_statements_log: success // char dummy[64]; int ret; char *errMsg = NULL; if (ReadOnlyConnection) return; wxString sql = wxT("UPDATE sql_statements_log SET "); sql += wxT("time_end = strftime('%Y-%m-%dT%H:%M:%fZ', 'now'), "); sql += wxT("success = 1, error_cause = 'success' "); #if defined(_WIN32) || defined(__MINGW32__) /* CAVEAT - M$ runtime doesn't supports %lld for 64 bits */ sprintf(dummy, "WHERE id = %I64d", LastSqlLogID); #else sprintf(dummy, "WHERE id = %lld", LastSqlLogID); #endif sql += wxString::FromUTF8(dummy); ret = sqlite3_exec(SqliteHandle, sql.ToUTF8(), NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("UpdateLog: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } } void MyFrame::UpdateLog(wxString & error_msg) { // // updating sql_statements_log: failure // char dummy[64]; char *clean; int ret; char *errMsg = NULL; if (ReadOnlyConnection) return; wxString sql = wxT("UPDATE sql_statements_log SET "); sql += wxT("time_end = strftime('%Y-%m-%dT%H:%M:%fZ', 'now'), "); sql += wxT("success = 0, error_cause = '"); clean = gaiaSingleQuotedSql(error_msg.ToUTF8()); sql += wxString::FromUTF8(clean); free(clean); #if defined(_WIN32) || defined(__MINGW32__) /* CAVEAT - M$ runtime doesn't supports %lld for 64 bits */ sprintf(dummy, "' WHERE id = %I64d", LastSqlLogID); #else sprintf(dummy, "' WHERE id = %lld", LastSqlLogID); #endif sql += wxString::FromUTF8(dummy); ret = sqlite3_exec(SqliteHandle, sql.ToUTF8(), NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("UpdateLog: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } } void MyFrame::UpdateAbortedLog() { // // updating sql_statements_log: success // char dummy[64]; int ret; char *errMsg = NULL; if (ReadOnlyConnection) return; wxString sql = wxT("UPDATE sql_statements_log SET "); sql += wxT("time_end = strftime('%Y-%m-%dT%H:%M:%fZ', 'now'), "); sql += wxT("success = 0, error_cause = 'aborted by the user' "); #if defined(_WIN32) || defined(__MINGW32__) /* CAVEAT - M$ runtime doesn't supports %lld for 64 bits */ sprintf(dummy, "WHERE id = %I64d", LastSqlLogID); #else sprintf(dummy, "WHERE id = %lld", LastSqlLogID); #endif sql += wxString::FromUTF8(dummy); ret = sqlite3_exec(SqliteHandle, sql.ToUTF8(), NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("UpdateAbortedLog: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } } void MyFrame::GetNextAttachedSymbol(wxString & symbol) { // // return an unused DB alias name // int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; char sym[16]; bool already_used = false; char x; char y; char z; ret = sqlite3_get_table(GetSqlite(), "PRAGMA database_list", &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (x = 'a'; x < 'z'; x++) { already_used = false; sprintf(sym, "%c", x); for (i = 1; i <= rows; i++) { if (strcasecmp(sym, results[(i * columns) + 1]) == 0) already_used = true; } if (already_used == false) { symbol = wxString::FromUTF8(sym); goto stop; } } for (y = 'a'; y < 'z'; y++) { for (x = 'a'; x < 'z'; x++) { already_used = false; sprintf(sym, "%c%c", y, x); for (i = 1; i <= rows; i++) { if (strcasecmp(sym, results[(i * columns) + 1]) == 0) already_used = true; } if (already_used == false) { symbol = wxString::FromUTF8(sym); goto stop; } } } for (z = 'a'; z < 'z'; z++) { for (y = 'a'; y < 'z'; y++) { for (x = 'a'; x < 'z'; x++) { already_used = false; sprintf(sym, "%c%c%c", z, y, x); for (i = 1; i <= rows; i++) { if (strcasecmp(sym, results[(i * columns) + 1]) == 0) already_used = true; } if (already_used == false) { symbol = wxString::FromUTF8(sym); goto stop; } } } } } stop: sqlite3_free_table(results); } bool MyFrame::DoAttachDatabase(wxString & path) { // // attempting to attach another DB // int ret; char *errMsg = NULL; wxString symbol; wxString sql = wxT("ATTACH DATABASE \""); sql += path; sql += wxT("\" AS "); GetNextAttachedSymbol(symbol); sql += symbol; ret = sqlite3_exec(SqliteHandle, sql.ToUTF8(), NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("AttachDatabase: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } return true; } bool MyFrame::IsDotCommandDumpShp(const char *stmt, char *table, char *column, char *path, char *charset, char *type) { // // attempting to parse a .dumpshp command [SQL script] // wxString cmd = wxString::FromUTF8(stmt); wxString extPath; wxString extTable; wxString extColumn; wxString extCharset; wxString extType; int count = 0; wxStringTokenizer tok(cmd); while (tok.HasMoreTokens()) { wxString token = tok.GetNextToken(); switch (count) { case 0: extTable = token; break; case 1: extColumn = token; break; case 2: extPath = token; break; case 3: extCharset = token; break; case 4: extType = token; break; }; count++; } if (count == 4 || count == 5) { strcpy(path, extPath.ToUTF8()); strcpy(table, extTable.ToUTF8()); strcpy(column, extColumn.ToUTF8()); strcpy(charset, extCharset.ToUTF8()); strcpy(type, extType.ToUTF8()); return true; } return false; } void MyFrame::CheckGPKG(wxString & tableName, MyTableInfo * list) { // testing form PGPG virtual-geometry if (tableName.StartsWith(wxT("vgpkg_")) == false) return; list->CheckGPKG(this, SqliteHandle, tableName); } void MyFrame::ResetSecurity() { // resetting the Security level if (Old_SPATIALITE_SECURITY_ENV != NULL) { #ifdef _WIN32 char *env = sqlite3_mprintf("SPATIALITE_SECURITY=%s", Old_SPATIALITE_SECURITY_ENV); putenv(env); sqlite3_free(env); #else /* not WIN32 */ setenv("SPATIALITE_SECURITY", Old_SPATIALITE_SECURITY_ENV, 1); #endif } else { #ifdef _WIN32 putenv("SPATIALITE_SECURITY="); #else /* not WIN32 */ unsetenv("SPATIALITE_SECURITY"); #endif } } void MyFrame::SetSecurityRelaxed() { // enabling SPATIALIRE_SECURITY=relaxed Old_SPATIALITE_SECURITY_ENV = getenv("SPATIALITE_SECURITY"); #ifdef _WIN32 putenv("SPATIALITE_SECURITY=relaxed"); #else /* not WIN32 */ setenv("SPATIALITE_SECURITY", "relaxed", 1); #endif SecurityRelaxed = true; } void MyFrame::TestSecurityRelaxed(const char *path) { // testing for an appropriate security level if (IsSafeDB(path) == true) SetSecurityRelaxed(); } bool MyFrame::IsSafeDB(const char *path) { // testing an existing DB for safety int ret; sqlite3 *handle; char **results; int rows; int columns; int i; int count = 1; void *cache = NULL; ret = sqlite3_open_v2(path, &handle, SQLITE_OPEN_READONLY, NULL); if (ret) { // an error occurred sqlite3_close(handle); return false; } // setting up the internal cache cache = spatialite_alloc_connection(); spatialite_init_ex(handle, cache, 0); ret = sqlite3_get_table(handle, "SELECT CountUnsafeTriggers()", &results, &rows, &columns, NULL); if (ret != SQLITE_OK) { // an error occurred sqlite3_close(handle); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { const char *value = results[(i * columns) + 0]; count = atoi(value); } } sqlite3_free_table(results); sqlite3_close(handle); spatialite_cleanup_ex(cache); if (count == 0) return true; wxString msg = wxT("SECURITY ALERT !!!\n\n"); msg += wxT ("The currently connected DB-file contains one or more harmful Triggers.\n"); msg += wxT("Such a condition could eventually cause serious security breaches."); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_EXCLAMATION, this); return false; } MyStatusBar::MyStatusBar(MyFrame * parent):wxStatusBar(parent) { // constructor Parent = parent; int widths[2]; widths[0] = 20; widths[1] = -1; SetFieldsCount(2); SetStatusWidths(2, widths); Bitmap = new wxStaticBitmap(this, wxID_ANY, wxIcon(disconnect_xpm)); // setting up the event handlers Connect(wxID_ANY, wxEVT_SIZE, (wxObjectEventFunction) & MyStatusBar::OnSize); } void MyStatusBar::OnSize(wxSizeEvent & WXUNUSED(event)) { // // this window has changed its size // wxRect rect; GetFieldRect(0, rect); wxSize size = Bitmap->GetSize(); Bitmap->Move(rect.x + (rect.width - size.x) / 2, rect.y + (rect.height - size.y) / 2); } void MyStatusBar::SetSecurityRelaxedIcon() { Bitmap->SetIcon(wxIcon(security_relaxed_xpm)); } void MyStatusBar::SetSecurityStrongIcon() { Bitmap->SetIcon(wxIcon(security_lock_xpm)); } void MyStatusBar::SetReadOnlyIcon() { Bitmap->SetIcon(wxIcon(security_rdonly_xpm)); } void MyStatusBar::SetNotConnectedIcon() { Bitmap->SetIcon(wxIcon(disconnect_xpm)); } void MyStatusBar::SetText(wxString & msg) { wxStatusBar *sb = Parent->GetStatusBar(); if (!sb) return; sb->SetStatusText(msg, 1); } void MyFrame::GetHelp(wxString & html) { // // return the HTML Help // html = wxT(""); html += wxT(""); html += wxT(""); html += wxT (""); html += wxT("SQLite + SpatiaLite quick Help"); html += wxT(""); html += wxT(""); html += wxT("

SQLite + SpatiaLite quick Help

"); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT("
Index of contents
1.SQLite SQL syntax
2.SQLite SQL functions
3.SpatiaLite SQL Spatial functions
"); html += wxT("

SQLite SQL syntax

"); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT("
ALTER TABLEsql-statement ::= ALTER TABLE [database-name .] table-name alteration
"); html += wxT("alteration ::= RENAME TO new-table-name
"); html += wxT("alteration ::= ADD [COLUMN] column-def
ANALYZEsql-statement ::= ANALYZE
"); html += wxT("sql-statement ::= ANALYZE database-name
"); html += wxT("sql-statement ::= ANALYZE [database-name .] table-name
ATTACH DATABASEsql-statement ::= ATTACH [DATABASE] database-filename AS database-name
BEGIN TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); html += wxT("sql-statement ::= END [TRANSACTION [name]]
"); html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]
"); html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]
COMMIT TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); html += wxT("sql-statement ::= END [TRANSACTION [name]]
"); html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]
"); html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]
CREATE INDEXsql-statement ::= CREATE [UNIQUE] INDEX [IF NOT EXISTS] [database-name .] index-name
"); html += wxT("ON table-name ( column-name [, column-name]* )
"); html += wxT ("column-name ::= name [ COLLATE collation-name] [ ASC | DESC ]
CREATE TABLEsql-command ::= CREATE [TEMP | TEMPORARY] TABLE [IF NOT EXISTS] [database-name .] table-name (
"); html += wxT("column-def [, column-def]*
"); html += wxT("[, constraint]*
"); html += wxT(")
"); html += wxT ("sql-command ::= CREATE [TEMP | TEMPORARY] TABLE [database-name.] table-name AS select-statement
"); html += wxT ("column-def ::= name [type] [[CONSTRAINT name] column-constraint]*
"); html += wxT("type ::= typename |
"); html += wxT("typename ( number ) |
"); html += wxT("typename ( number , number )
"); html += wxT("column-constraint ::= NOT NULL [ conflict-clause ] |
"); html += wxT("PRIMARY KEY [sort-order] [ conflict-clause ] [AUTOINCREMENT] |
"); html += wxT("UNIQUE [ conflict-clause ] |
"); html += wxT("CHECK ( expr ) |
"); html += wxT("DEFAULT value |
"); html += wxT("COLLATE collation-name
"); html += wxT("constraint ::= PRIMARY KEY ( column-list ) [ conflict-clause ] |
"); html += wxT("UNIQUE ( column-list ) [ conflict-clause ] |
"); html += wxT("CHECK ( expr )
"); html += wxT("conflict-clause ::= ON CONFLICT conflict-algorithm
CREATE TRIGGERsql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] trigger-name [ BEFORE | AFTER ]
"); html += wxT("database-event ON [database-name .] table-name
"); html += wxT("trigger-action
"); html += wxT ("sql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER [IF NOT EXISTS] trigger-name INSTEAD OF
"); html += wxT("database-event ON [database-name .] view-name
"); html += wxT("trigger-action
"); html += wxT("database-event ::= DELETE |
"); html += wxT("INSERT |
"); html += wxT("UPDATE |
"); html += wxT("UPDATE OF column-list
"); html += wxT("trigger-action ::= [ FOR EACH ROW ] [ WHEN expression ]
"); html += wxT("BEGIN
"); html += wxT("trigger-step ; [ trigger-step ; ]*
"); html += wxT("END
"); html += wxT("trigger-step ::= update-statement | insert-statement |
"); html += wxT("delete-statement | select-statement
CREATE VIEWsql-command ::= CREATE [TEMP | TEMPORARY] VIEW [IF NOT EXISTS] [database-name.] view-name AS select-statement
CREATE VIRTUAL TABLEsql-command ::= CREATE VIRTUAL TABLE [database-name .] table-name USING module-name [( arguments )]
DELETEsql-statement ::= DELETE FROM [database-name .] table-name [WHERE expr]
DETACH DATABASEsql-command ::= DETACH [DATABASE] database-name
DROP INDEXsql-command ::= DROP INDEX [IF EXISTS] [database-name .] index-name
DROP TABLEsql-command ::= DROP TABLE [IF EXISTS] [database-name.] table-name
DROP TRIGGERsql-statement ::= DROP TRIGGER [IF EXISTS] [database-name .] trigger-name
DROP VIEWsql-command ::= DROP VIEW [IF EXISTS] view-name
END TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); html += wxT("sql-statement ::= END [TRANSACTION [name]]
"); html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]
"); html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]
EXPLAINsql-statement ::= EXPLAIN sql-statement
INSERTsql-statement ::= INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] VALUES(value-list) |
"); html += wxT ("INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] select-statement
ON CONFLICT clauseconflict-clause ::= ON CONFLICT conflict-algorithm
"); html += wxT ("conflict-algorithm ::= ROLLBACK | ABORT | FAIL | IGNORE | REPLACE
PRAGMAsql-statement ::= PRAGMA name [= value] |
"); html += wxT("PRAGMA function(arg)
"); html += wxT("PRAGMA auto_vacuum;
"); html += wxT("PRAGMA auto_vacuum = 0 | none | 1 | full | 2 | incremental;
"); html += wxT("PRAGMA cache_size;
"); html += wxT("PRAGMA cache_size = Number-of-pages;
"); html += wxT("PRAGMA case_sensitive_like;
"); html += wxT("PRAGMA case_sensitive_like = 0 | 1;
"); html += wxT("PRAGMA count_changes;
"); html += wxT("PRAGMA count_changes = 0 | 1;
"); html += wxT("PRAGMA default_cache_size;
"); html += wxT("PRAGMA default_cache_size = Number-of-pages;
"); html += wxT("PRAGMA empty_result_callbacks;
"); html += wxT("PRAGMA empty_result_callbacks = 0 | 1;
"); html += wxT("PRAGMA encoding;
"); html += wxT("PRAGMA encoding = \"UTF-8\";
"); html += wxT("PRAGMA encoding = \"UTF-16\";
"); html += wxT("PRAGMA encoding = \"UTF-16le\";
"); html += wxT("PRAGMA encoding = \"UTF-16be\";
"); html += wxT("PRAGMA foreign_keys;
"); html += wxT("PRAGMA foreign_keys = 0 | 1;
"); html += wxT("PRAGMA full_column_names;
"); html += wxT("PRAGMA full_column_names = 0 | 1;
"); html += wxT("PRAGMA fullfsync;
"); html += wxT("PRAGMA fullfsync = 0 | 1;
"); html += wxT("PRAGMA journal_mode;
"); html += wxT("PRAGMA database.journal_mode;
"); html += wxT("PRAGMA journal_mode = DELETE | TRUNCATE | PERSIST | MEMORY | OFF
"); html += wxT ("PRAGMA database.journal_mode = DELETE | TRUNCATE | PERSIST | MEMORY | OFF
"); html += wxT("PRAGMA journal_size_limit;
"); html += wxT("PRAGMA journal_size_limit = N
"); html += wxT("PRAGMA legacy_file_format;
"); html += wxT("PRAGMA legacy_file_format = 0 | 1
"); html += wxT("PRAGMA locking_mode;
"); html += wxT("PRAGMA locking_mode = NORMAL | EXCLUSIVE
"); html += wxT("PRAGMA page_size;
"); html += wxT("PRAGMA page_size = bytes;
"); html += wxT("PRAGMA max_page_count;
"); html += wxT("PRAGMA max_page_count = N;
"); html += wxT("PRAGMA read_uncommitted;
"); html += wxT("PRAGMA read_uncommitted = 0 | 1;
"); html += wxT("PRAGMA recursive_triggers;
"); html += wxT("PRAGMA recursive_triggers = 0 | 1;
"); html += wxT("PRAGMA reverse_unordered_selects;
"); html += wxT("PRAGMA reverse_unordered_selects = 0 | 1;
"); html += wxT("PRAGMA short_column_names;
"); html += wxT("PRAGMA short_column_names = 0 | 1;
"); html += wxT("PRAGMA synchronous;
"); html += wxT("PRAGMA synchronous = FULL; (2)
"); html += wxT("PRAGMA synchronous = NORMAL; (1)
"); html += wxT("PRAGMA synchronous = OFF; (0)
"); html += wxT("PRAGMA temp_store;
"); html += wxT("PRAGMA temp_store = DEFAULT; (0)
"); html += wxT("PRAGMA temp_store = FILE; (1)
"); html += wxT("PRAGMA temp_store = MEMORY; (2)
"); html += wxT("PRAGMA temp_store_directory;
"); html += wxT("PRAGMA temp_store_directory = 'directory-name';
"); html += wxT("PRAGMA database_list;
"); html += wxT("PRAGMA foreign_key_list(table-name);
"); html += wxT("PRAGMA [database].freelist_count;
"); html += wxT("PRAGMA index_info(index-name);
"); html += wxT("PRAGMA index_list(table-name);
"); html += wxT("PRAGMA table_info(table-name);
"); html += wxT("PRAGMA [database.]schema_version;
"); html += wxT("PRAGMA [database.]schema_version = integer ;
"); html += wxT("PRAGMA [database.]user_version;
"); html += wxT("PRAGMA [database.]user_version = integer ;
"); html += wxT("PRAGMA integrity_check;
"); html += wxT("PRAGMA integrity_check(integer)
"); html += wxT("PRAGMA quick_check;
"); html += wxT("PRAGMA quick_check(integer)
"); html += wxT("PRAGMA parser_trace = ON; (1)
"); html += wxT("PRAGMA parser_trace = OFF; (0)
"); html += wxT("PRAGMA vdbe_trace = ON; (1)
"); html += wxT("PRAGMA vdbe_trace = OFF; (0)
"); html += wxT("PRAGMA vdbe_listing = ON; (1)
"); html += wxT("PRAGMA vdbe_listing = OFF; (0)
REINDEXsql-statement ::= REINDEX collation name
"); html += wxT ("sql-statement ::= REINDEX [database-name .] table/index-name
REPLACEsql-statement ::= REPLACE INTO [database-name .] table-name [( column-list )] VALUES ( value-list ) |
"); html += wxT ("REPLACE INTO [database-name .] table-name [( column-list )] select-statement
ROLLBACK TRANSACTIONsql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
"); html += wxT("sql-statement ::= END [TRANSACTION [name]]
"); html += wxT("sql-statement ::= COMMIT [TRANSACTION [name]]
"); html += wxT("sql-statement ::= ROLLBACK [TRANSACTION [name]]
SELECTsql-statement ::= SELECT [ALL | DISTINCT] result [FROM table-list]
"); html += wxT("[WHERE expr]
"); html += wxT("[GROUP BY expr-list]
"); html += wxT("[HAVING expr]
"); html += wxT("[compound-op select]*
"); html += wxT("[ORDER BY sort-expr-list]
"); html += wxT("[LIMIT integer [( OFFSET | , ) integer]]
"); html += wxT("result ::= result-column [, result-column]*
"); html += wxT("result-column ::= * | table-name . * | expr [ [AS] string ]
"); html += wxT("table-list ::= table [join-op table join-args]*
"); html += wxT("table ::= table-name [AS alias] |
"); html += wxT("( select ) [AS alias]
"); html += wxT ("join-op ::= , | [NATURAL] [LEFT | RIGHT | FULL] [OUTER | INNER | CROSS] JOIN
"); html += wxT("join-args ::= [ON expr] [USING ( id-list )]
"); html += wxT("sort-expr-list ::= expr [sort-order] [, expr [sort-order]]*
"); html += wxT("sort-order ::= [ COLLATE collation-name ] [ ASC | DESC ]
"); html += wxT("compound_op ::= UNION | UNION ALL | INTERSECT | EXCEPT
UPDATEsql-statement ::= UPDATE [ OR conflict-algorithm ] [database-name .] table-name
"); html += wxT("SET assignment [, assignment]*
"); html += wxT("[WHERE expr]
"); html += wxT("assignment ::= column-name = expr
VACUUMsql-statement ::= VACUUM
"); html += wxT("back to index"); html += wxT ("

SQLite SQL functions

"); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (" "); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (" "); html += wxT("
ordinary functions
back to index
abs(X)Return the absolute value of the numeric argument X. "); html += wxT ("Return NULL if X is NULL. Return 0.0 if X is not a numeric value.
changes()Returns the number of database rows that were changed or inserted or deleted "); html += wxT ("by the most recently completed INSERT, DELETE, or UPDATE statement, exclusive of statements in lower-level triggers.
char(X1,X2,...,XN)The char(X1,X2,...,XN) function returns a string "); html += wxT ("composed of characters having the unicode code point values of integers X1 through XN, respectively.
coalesce(X,Y,...)Return a copy of the first non-NULL argument. "); html += wxT ("If all arguments are NULL then NULL is returned. There must be at least 2 arguments.
glob(X,Y)This function is used to implement the \"X GLOB Y\" syntax of SQLite. "); html += wxT ("The sqlite3_create_function() interface can be used to override this function and thereby change the operation of the GLOB operator.
ifnull(X,Y)Return a copy of the first non-NULL argument. "); html += wxT ("If both arguments are NULL then NULL is returned. This behaves the same as coalesce().
instr(X,Y)The instr(X,Y) function finds the first occurrence of string Y within string X and returns the "); html += wxT ("number of prior characters plus 1, or 0 if Y is nowhere found within X. Or, if X and Y are both BLOBs, then instr(X,Y) returns one more than "); html += wxT ("the number bytes prior to the first occurrence of Y, or 0 if Y does not occur anywhere within X. If both arguments X and Y to instr(X,Y) "); html += wxT ("are non-NULL and are not BLOBs then both are interpreted as strings. If either X or Y are NULL in instr(X,Y) then the result is NULL.
hex(X)The argument is interpreted as a BLOB. "); html += wxT ("The result is a hexadecimal rendering of the content of that blob.
last_insert_rowid()Return the ROWID of the last row insert from this connection to the database. "); html += wxT ("This is the same value that would be returned from the sqlite3_last_insert_rowid() API function.
length(X)Return the string length of X in characters. "); html += wxT ("If SQLite is configured to support UTF-8, then the number of UTF-8 characters is returned, not the number of bytes.
like(X,Y)
like(X,Y,Z)
This function is used to implement the \"X LIKE Y [ESCAPE Z]\" syntax of SQL."); html += wxT ("If the optional ESCAPE clause is present, then the user-function is invoked with three arguments. "); html += wxT("Otherwise, it is invoked with two arguments only. "); html += wxT ("The sqlite3_create_function() interface can be used to override this function and thereby change the operation of the LIKE operator. "); html += wxT ("When doing this, it may be important to override both the two and three argument versions of the like() function. "); html += wxT ("Otherwise, different code may be called to implement the LIKE operator depending on whether or not an ESCAPE clause was specified.
load_extension(X)
load_extension(X,Y)
Load SQLite extensions "); html += wxT("out of the shared library file named X using the entry point Y. "); html += wxT ("The result is a NULL. If Y is omitted then the default entry point of sqlite3_extension_init is used. "); html += wxT ("This function raises an exception if the extension fails to load or initialize correctly.
lower(X)Return a copy of string X will all ASCII characters converted to lower case. "); html += wxT ("The C library tolower() routine is used for the conversion, which means that this function might not work correctly on non-ASCII UTF-8 characters.
ltrim(X)
ltrim(X,Y)
Return a string formed by removing any and all characters "); html += wxT ("that appear in Y from the left side of X. If the Y argument is omitted, spaces are removed.
max(X,Y,...)Return the argument with the maximum value. "); html += wxT("Arguments may be strings in addition to numbers. "); html += wxT("The maximum value is determined by the usual sort order. "); html += wxT ("Note that max() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.
min(X,Y,...)Return the argument with the minimum value. "); html += wxT("Arguments may be strings in addition to numbers. "); html += wxT("The minimum value is determined by the usual sort order. "); html += wxT ("Note that min() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.
nullif(X,Y)Return the first argument if the arguments are different, otherwise return NULL.
quote(X)This routine return a string which is the value of its argument suitable for inclusion "); html += wxT ("into another SQL statement. Strings are surrounded by single-quotes with escapes on interior quotes as needed. "); html += wxT ("BLOBs are encoded as hexadecimal literals. The implementation of VACUUM uses this function. "); html += wxT ("The function is also useful when writing triggers to implement undo/redo functionality.
random()Return a pseudo-random integer between -9223372036854775808 and +9223372036854775807.
randomblob(N)Return an N-byte blob containing pseudo-random bytes. N should be a postive integer.
replace(X,Y,Z)Return a string formed by substituting string Z for every occurrance of string Y in string X. "); html += wxT("The BINARY collating sequence is used for comparisons.
round(X)
round(X,Y)
Round off the number X to Y digits to the right of the decimal point. "); html += wxT("If the Y argument is omitted, 0 is assumed.
rtrim(X)
rtrim(X,Y)
Return a string formed by removing any and all characters "); html += wxT ("that appear in Y from the right side of X. If the Y argument is omitted, spaces are removed.
sqlite_version(X)Return the version string for the SQLite library that is running. Example: \"3.5.9\"
substr(X,Y,Z)
substr(X,Y)
Return a substring of input string X that begins with the Y-th character "); html += wxT ("and which is Z characters long. If Z is omitted then all character through the end of the string are returned. "); html += wxT("The left-most character of X is number 1. "); html += wxT ("If Y is negative the the first character of the substring is found by counting from the right rather than the left. "); html += wxT ("If X is string then characters indices refer to actual UTF-8 characters. If X is a BLOB then the indices refer to bytes.
trim(X)
trim(X,Y)
Return a string formed by removing any and all characters that appear in Y from both ends of X. "); html += wxT("If the Y argument is omitted, spaces are removed.
typeof(X)Return the type of the expression X. "); html += wxT ("The only return values are \"null\", \"integer\", \"real\", \"text\", and \"blob\".
unicode(X)The unicode(X) function returns the numeric unicode code point corresponding to the first "); html += wxT ("character of the string X. If the argument to unicode(X) is not a string then the result is undefined.
upper(X)Return a copy of input string X converted to all upper-case letters. "); html += wxT ("The implementation of this function uses the C library routine toupper() which means it may not work correctly on non-ASCII UTF-8 strings.
zeroblob(N)Return a BLOB consisting of N bytes of 0x00. "); html += wxT("SQLite manages these zeroblobs very efficiently. "); html += wxT ("Zeroblobs can be used to reserve space for a BLOB that is later written using incremental BLOB I/O.
aggregate functions
back to index
avg(X)Return the average value of all non-NULL X within a group. "); html += wxT ("String and BLOB values that do not look like numbers are interpreted as 0. "); html += wxT ("The result of avg() is always a floating point value even if all inputs are integers.
count(X)
count(*)
The first form return a count of the number of times that X is not NULL in a group. "); html += wxT ("The second form (with no argument) return the total number of rows in the group.
group_concat(X)
group_concat(X,Y)
The result is a string which is the concatenation of all non-NULL values of X. "); html += wxT ("If parameter Y is the separator between instances of X. A comma (\",\") is used as the separator if Y is omitted.
max(X)Return the maximum value of all values in the group. "); html += wxT("The usual sort order is used to determine the maximum.
min(X)Return the minimum non-NULL value of all values in the group. "); html += wxT ("The usual sort order is used to determine the minimum. NULL is only returned if all values in the group are NULL.
sum(X)
total(X)
Return the numeric sum of all non-NULL values in the group. "); html += wxT ("If there are no non-NULL input rows then sum() return NULL but total() return 0.0. "); html += wxT ("NULL is not normally a helpful result for the sum of no rows but the SQL standard requires it and most other SQL "); html += wxT ("database engines implement sum() that way so SQLite does it in the same way in order to be compatible. "); html += wxT ("The non-standard total() function is provided as a convenient way to work around this design problem in the SQL language.
"); html += wxT ("The result of total() is always a floating point value. The result of sum() is an integer value if all non-NULL inputs are integers. "); html += wxT ("If any input to sum() is neither an integer or a NULL then sum() return a floating point value which might be an approximation to the true sum.
"); html += wxT ("Sum() will throw an \"integer overflow\" exception if all inputs are integers or NULL and an integer overflow occurs at any point during the computation."); html += wxT("Total() never throws an exception.
"); html += wxT("back to index"); html += wxT("

SpatiaLite SQL Spatial functions

"); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT("
back to index"); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT("ST_SetStartPoint( line Linestring , point Point ) : Linestring"); html += wxT (""); html += wxT("ST_SetEndtPoint( line Linestring , point Point ) : Linestring"); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT(""); html += wxT(""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT(""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT (""); html += wxT("
SQL version info [and build options] functions"); html += wxT("
back to index
spatialite_version( void ) : Stringreturns the current SpatiaLite version
spatialite_target_cpu( void ) : Stringreturns the current SpatiaLite Target CPU
proj4_version( void ) : Stringreturns the current PROJ.4 version, or NULL if PROJ.4 is currently unsupported
geos_version( void ) : Stringreturns the current GEOS version, or NULL if GEOS is currently unsupported
lwgeom_version( void ) : Stringreturns the current LWGEOM version, or NULL if LWGEOM is currently unsupported
libxml2_version( void ) : Stringreturns the current LibXML2 version, or NULL if LibXML2 is currently unsupported
HasIconv( void ) : BooleanTRUE if the underlaying library was built enabling ICONV
HasMathSQL( void ) : BooleanTRUE if the underlaying library was built enabling MATHSQL
HasGeoCallbacks( void ) : BooleanTRUE if the underlaying library was built enabling GEOCALLBACKS
HasProj( void ) : BooleanTRUE if the underlaying library was built enabling PROJ
HasGeos( void ) : BooleanTRUE if the underlaying library was built enabling GEOS
HasGeosAdvanced( void ) : BooleanTRUE if the underlaying library was built enabling GEOSADVANCED
HasGeosTrunk( void ) : BooleanTRUE if the underlaying library was built enabling GEOSTRUNK
HasLwGeom( void ) : BooleanTRUE if the underlaying library was built enabling LWGEOM
HasLibXML2( void ) : BooleanTRUE if the underlaying library was built enabling LibXML2
HasEpsg( void ) : BooleanTRUE if the underlaying library was built enabling EPSG
HasFreeXL( void ) : BooleanTRUE if the underlaying library was built enabling FreeXL
generic SQL functions"); html += wxT("
back to index
CastToInteger( value Generic ) : Integerreturns the intput value possibly casted to the Integer data-type: NULL if no conversion is possible.
CastToDouble( value Generic ) : Double precisionreturns the intput value possibly casted to the Double data-type: NULL if no conversion is possible.
CastToText( value Generic ) : Text
CastToText( value Generic ) : Text
returns the intput value possibly casted to the Text data-type: NULL if no conversion is possible.
"); html += wxT ("If an optional argument \"zero_pad\" is passed and the input value is of the Integer or Double type, then the returned string will be padded using as much trailing ZEROs so to ensure the required length.
CastToBlob( value Generic ) : Blob
"); html += wxT("(CastToBlob (value Generic , hex_input Boolean ) : Blob
returns the intput value possibly casted to the Blob data-type: NULL if no conversion is possible.
ForceAsNull( val1 Generic , val2 Generic ) : Genericif \"val1\" and \"val2\" are equal (and exactly of the same data-type) NULL will be returned; "); html += wxT ("otherwise \"val1\" will be returned absolutely untouched and still preserving its originale data-type.
CreateUUID( void ) : Textreturns a Version 4 (random) UUID (Universally unique identifier).
MD5Checksum( BLOB | TEXT ) : Textreturns the MD5 checksum corresponding to the input value.
Will return NULL for non-BLOB input.
MD5TotalChecksum( BLOB | TEXT ) : Textreturns a cumulative MD5 checksum.
Aggregate function.
SQL functions reporting "); html += wxT("GEOS / LWGEOM errors and warnings"); html += wxT ("
GEOS_GetLastWarningMsg( void ) : StringWill return the most recent warning message returned by GEOS (if any).
"); html += wxT("NULL will be returned if there is no pending GEOS warning.
GEOS_GetLastErrorMsg( void ) : StringWill return the most recent error message returned by GEOS (if any).
"); html += wxT("NULL will be returned if there is no pending GEOS error.
GEOS_GetLastAuxErrorMsg( void ) : StringWill return the most recent (auxiliary) error message returned by GEOS (if any).
"); html += wxT ("NULL will be returned if there is no pending GEOS (auxiliary) error.
GEOS_GetCriticalPointFromMsg( void ) : Point
"); html += wxT("GEOS_GetCriticalPointFromMsg( SRID Integer ) : Point
Will (possibly) return a Point Geometry extracted from the latest error / warning "); html += wxT ("message returned by GEOS.
NULL will be returned if there is no pending GEOS message, or if the "); html += wxT("current GEOS message doesn't contain a critical Point.
LWGEOM_GetLastWarningMsg( void ) : StringWill return the most recent warning message returned by LWGEOM (if any).
"); html += wxT("NULL will be returned if there is no pending LWGEOM error.
LWGEOM_GetLastErrorMsg( void ) : StringWill return the most recent error message returned by LWGEOM (if any).
"); html += wxT("NULL will be returned if there is no pending LWGEOM error.
SQL math functions"); html += wxT("
back to index
Abs( x Double precision ) : Double precisionreturns the absolute value of x
Acos( x Double precision ) : Double precisionreturns the arc cosine of x, that is, the value whose cosine is x
"); html += wxT("returns NULL if x is not in the range -1 to 1
Asin( x Double precision ) : Double precisionreturns the arc sine of x, that is, the value whose sine is x
"); html += wxT("returns NULL if x is not in the range -1 to 1
Atan( x Double precision ) : Double precisionreturns the arc tangent of x, that is, the value whose tangent is x
Ceil( x Double precision ) : Double precision
"); html += wxT("Ceiling( x Double precision ) : Double precision
returns the smallest integer value not less than x
Cos( x Double precision ) : Double precisionreturns the cosine of x, where x is given in radians
Cot( x Double precision ) : Double precisionreturns the cotangent of x, where x is given in radians
Degrees( x Double precision ) : Double precisionreturns the argument x, converted from radians to degrees
Exp( x Double precision ) : Double precisionreturns the value of e (the base of natural logarithms) raised to the power of x
"); html += wxT ("the inverse of this function is Log() (using a single argument only) or Ln()
Floor( x Double precision ) : Double precisionreturns the largest integer value not greater than x
Ln( x Double precision ) : Double precision
"); html += wxT("Log( x Double precision ) : Double precision
returns the natural logarithm of x; that is, the base-e logarithm of x
"); html += wxT ("If x is less than or equal to 0, then NULL is returned
Log( b Double precision, x Double precision ) : Double precisionreturns the logarithm of x to the base b
"); html += wxT ("If x is less than or equal to 0, or if b is less than or equal to 1, then NULL is returned
"); html += wxT ("Log(b, x) is equivalent to Log(x) / Log(b)
Log2( x Double precision ) : Double precisionreturns the base-2 logarithm of x
"); html += wxT ("Log2(x) is equivalent to Log(x) / Log(2)
Log10( x Double precision ) : Double precisionreturns the base-10 logarithm of x
"); html += wxT ("Log10(x) is equivalent to Log(x) / Log(10)
PI( void ) : Double precisionreturns the value of PI
Pow( x Double precision, y Double precision ) : Double precision
"); html += wxT ("Power( x Double precision, y Double precision ) : Double precision
returns the value of x raised to the power of y
Radians( x Double precision ) : Double precisionreturns the argument x, converted from degrees to radians
Sign( x Double precision ) : Double precisionreturns the sign of the argument as -1, 0, or 1, "); html += wxT ("depending on whether x is negative, zero, or positive.
Sin( x Double precision ) : Double precisionreturns the sine of x, where x is given in radians
Sqrt( x Double precision ) : Double precisionreturns the square root of a non-negative number x
Stddev_pop( x Double precision ) : Double precisionreturns the population standard deviation of the input values
"); html += wxT("aggregate function
Stddev_samp( x Double precision ) : Double precisionreturns the sample standard deviation of the input values
"); html += wxT("aggregate function
Tan( x Double precision ) : Double precisionreturns the tangent of x, where x is given in radians
Var_pop( x Double precision ) : Double precisionreturns the population variance of the input values (square of the population standard deviation)
"); html += wxT("aggregate function
Var_samp( x Double precision ) : Double precisionreturns the sample variance of the input values (square of the sample standard deviation)
"); html += wxT("aggregate function
SQL length/distance unit-conversion functions"); html += wxT("
back to index
CvtToKm( x Double precision ) : Double precision
CvtFromKm( x Double precision ) : Double precision
meters / kilometers
CvtToDm( x Double precision ) : Double precision
CvtFromDm( x Double precision ) : Double precision
meters / decimeters
CvtToCm( x Double precision ) : Double precision
CvtFromCm( x Double precision ) : Double precision
meters / centimeters
CvtToMm( x Double precision ) : Double precision
CvtFromMm( x Double precision ) : Double precision
meters / millimeters
CvtToKmi( x Double precision ) : Double precision
CvtFromKmi( x Double precision ) : Double precision
meters / internation nautical miles
CvtToIn( x Double precision ) : Double precision
CvtFromIn( x Double precision ) : Double precision
meters / international inches
CvtToFt( x Double precision ) : Double precision
CvtFromFt( x Double precision ) : Double precision
meters / international feet
CvtToYd( x Double precision ) : Double precision
CvtFromYd( x Double precision ) : Double precision
meters / international yards
CvtToMi( x Double precision ) : Double precision
CvtFromMi( x Double precision ) : Double precision
meters / international statute miles
CvtToFath( x Double precision ) : Double precision
CvtFromFath( x Double precision ) : Double precision
meters / international fathoms
CvtToCh( x Double precision ) : Double precision
CvtFromCh( x Double precision ) : Double precision
meters / international chains
CvtToLink( x Double precision ) : Double precision
CvtFromLink( x Double precision ) : Double precision
meters / international links
CvtToUsIn( x Double precision ) : Double precision
CvtFromUsIn( x Double precision ) : Double precision
meters / U.S. inches
CvtToUsFt( x Double precision ) : Double precision
CvtFromUsFt( x Double precision ) : Double precision
meters / U.S. feet
CvtToUsYd( x Double precision ) : Double precision
CvtFromUsYd( x Double precision ) : Double precision
meters / U.S. yards
CvtToUsMi( x Double precision ) : Double precision
CvtFromUsMi( x Double precision ) : Double precision
meters / U.S. statute miles
CvtToUsCh( x Double precision ) : Double precision
CvtFromUsCh( x Double precision ) : Double precision
meters / U.S. chains
CvtToIndFt( x Double precision ) : Double precision
CvtFromIndFt( x Double precision ) : Double precision
meters / indian feet
CvtToIndYd( x Double precision ) : Double precision
CvtFromIndYd( x Double precision ) : Double precision
meters / indian yards
CvtToIndCh( x Double precision ) : Double precision
CvtFromIndCh( x Double precision ) : Double precision
meters / indian chains
DD/DMS conversion functions (longitude/latitude)"); html += wxT("
back to index
LongLatToDMS( longitude Double precision , latitude Double precision ) : Stringwill return a DMS string (Degrees, Minutes and Seconds) starting from DD (Decimal Degrees) input coordinates
"); html += wxT("NULL will be returned on invalid input.
LongitudeFromDMS( dms_expression String ) : Double precision
LatitudeFromDMS( dms_expression String ) : Double precision
will return the DD coordinates from within a DMS expression
"); html += wxT("NULL will be returned on invalid input.
SQL utility functions for BLOB objects"); html += wxT("
back to index
IsZipBlob( content Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if this BLOB object corresponds to a valid ZIP-compressed file
IsPdfBlob( content Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if this BLOB object corresponds to a valid PDF document
IsGifBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if this BLOB object corresponds to a valid GIF image
IsPngBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if this BLOB object corresponds to a valid PNG image
IsTiffBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if this BLOB object corresponds to a valid TIFF image
IsJpegBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if this BLOB object corresponds to a valid JPEG image
IsExifBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if this BLOB object corresponds to a valid EXIF image
"); html += wxT ("Please note: any valid EXIF image is a valid JPEG as well
IsExifGpsBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if this BLOB object corresponds to a valid EXIF-GPS image
"); html += wxT ("Please note: any valid EXIF-GPS image is a valid EXIF and JPEG as well
IsWebpBlob( image Blob ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if this BLOB object corresponds to a valid WebP image
GetMimeType( payload Blob ) : StringThe return type is Text.
"); html += wxT ("NULL could be returned for an invalid argument or if no valid mime-type is detected.
BlobFromFile( filepath String ) : BLOBIf filepath corresponds to some valid pathname, and the corresponding file "); html += wxT ("can be actually accessed in read mode, then the whole file content will be returned as a BLOB value.
"); html += wxT ("Otherwise NULL will be returned.
Please note: SQLite doesn't support BLOB values bigger than SQLITE_MAX_LENGTH (usually, 1 GB).
"); html += wxT ("Please note: security restrictions apply to this function, which is really supported only when the environment variable \"SPATIALTE_SECURITY=relaxed\" is explicitly set.
BlobToFile( payload BLOB , filepath String ) : IntegerIf payload is of the BLOB-type, and if filepath corresponds to some valid pathname "); html += wxT ("(accessible in write/create mode), then the corresponding file will be created/overwritten so to contain the payload.
"); html += wxT ("The return type is Integer, with a return value of 1 for success, 0 for failure.
"); html += wxT ("Please note: security restrictions apply to this function, which is really supported only when the environment variable \"SPATIALTE_SECURITY=relaxed\" is explicitly set.
CountUnsafeTriggers( ) : IntegerThis SQL function checks if the currently connected DB does contain any potentially malicious Trigger; "); html += wxT ("carefully checking this conditions is a minimal precaution expected to be always verified before eventually activating the \"SPATIALITE_SECURITY=relaxed\" mode.
"); html += wxT ("The return type is Integer (total count of suspected Triggers); 0 means that the currently connected DB should be considered absolutely safe.
SQL utility functions [non-standard] for geometric objects"); html += wxT("
back to index
GeomFromExifGpsBlob( image Blob ) : Geometrya POINT Geometry will be returned representing the GPS long/lat contained within EXIF-GPS metadata for the BLOB image
"); html += wxT ("NULL will be returned if for any reason it's not possible to build such a POINT
ST_Point( x Double precision , y Double precision ) : Geometrysimply an alias-name for MakePoint() (SRID is never supported).
MakePoint( x Double precision , y Double precision [ , SRID Integer] ) : Geometrya Geometry will be returned representing the POINT defined by [x y] coordinates
MakePointZ( x Double precision , y Double precision , z Double precision [ , SRID Integer] ) : Geometrya Geometry will be returned representing the POINT Z defined by [x y z] coordinates
MakePointM( x Double precision , y Double precision , m Double precision [ , SRID Integer] ) : Geometrya Geometry will be returned representing the POINT M defined by [x y m] coordinates
MakePointZM( x Double precision , y Double precision , z Double precision , m Double precision "); html += wxT("[ , SRID Integer] ) : Geometrya Geometry will be returned representing the POINT ZM defined by [x y z m] coordinates
MakeLine( pt1 PointGeometry , pt2 PointGeometry ) : LinestringGeometrya Linestring Geometry will be returned representing the segment connecting pt1 to pt2
"); html += wxT("NULL will be returned if any error is encountered
MakeLine( geom PointGeometry ) : LinestringGeometrya Linestring Geometry will be returned connecting all the input Points (accordingly to input sequence)
"); html += wxT("aggregate function
"); html += wxT("NULL will be returned if any error is encountered
MakeLine( geom MultiPointGeometry , direction Boolean ) : LinestringGeometrya Linestring Geometry will be returned connecting all the input Points (accordingly to input sequence); \"direction=FALSE\" implies reverse order.
"); html += wxT ("Please note: similar to the previuous one, but this one is an ordinary (not aggregate) function; a MultiPoint input is always expected.
"); html += wxT("NULL will be returned if any error is encountered
MakeCircle( cx Double , cy Double , radius Double [ , SRID Integer [ , step Double ] ] ) : LinestringGeometrywill return a closed LINESTRING approximating the Circle defined by \"cx\", \"cy\" and \"radius\".
"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the circumference; a point will be set every \"step\" degrees.
"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.
MakeEllipse( cx Double , cy Double , x_axis Double , y_axus Double [ , SRID Integer [ , step Double ] ] ) : LinestringGeometrywill return a closed LINESTRING approximating the Ellipsee defined by \"cx\", \"cy\" and \"x_axis\", \"y_axis\".
"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the ellipse; a point will be set every \"step\" degrees.
"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.
MakeArc( cx Double , cy Double , radius Double , start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : LinestringGeometrywill return a LINESTRING approximating the Circular Arc defined by \"cx\", \"cy\" and \"radius\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.
"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the circumference; a point will be set every \"step\" degrees.
"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.
MakeEllipticArc( cx Double , cy Double , x_axis Double , y_axis Double, start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : LinestringGeometrywill return a LINESTRING approximating the Elliptic Arc defined by \"cx\", \"cy\" and \"x_axis\", \"y_axis\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.
"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the ellipse; a point will be set every \"step\" degrees.
"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.
MakeCircularSector( cx Double , cy Double , radius Double , start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : PolygonGeometrywill return a POLYGON approximating the Circular Sector defined by \"cx\", \"cy\" and \"radius\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.
"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the circumference; a point will be set every \"step\" degrees.
"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.
MakeEllipticSector( cx Double , cy Double , x_axis Double , y_axis Double, start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : PolygonGeometrywill return a POLYGON approximating the Elliptic Sector defined by \"cx\", \"cy\" and \"x_axis\", \"y_axis\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.
"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the ellipse; a point will be set every \"step\" degrees.
"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.
MakeCircularStripe( cx Double , cy Double , radius_1 Double , radius_2 Double, start Double , stop Double [ , SRID Integer [ , step Double ] ] ) : PolygonGeometrywill return a POLYGON approximating the Circular Stripe delimited by two arcs sharing the same Centre \"cx\", \"cy\" "); html += wxT ("but having different radii \"radius_1\", \"radius_2\"; the arc's extremities will be defined by \"start\", \"stop\" angles expressed in degrees.
"); html += wxT ("The optional argument \"step\" if specified defines how many points will be interpolated on the circumference; a point will be set every \"step\" degrees.
"); html += wxT ("The implicit default setting corresponds to a point every 10 degrees.
Collect( geom1 Geometry , geom2 Geometry ) : Geometry
"); html += wxT("ST_Collect( geom1 Geometry , geom2 Geometry ) : Geometry
a generic Geometry (possibly a GEOMETRYCOLLECTION) will be returned merging geom1 and geom2
"); html += wxT("NULL will be returned if any error is encountered
Collect( geom Geometry ) : Geometry
"); html += wxT("ST_Collect( geom1 Geometry , geom2 Geometry ) : Geometry
a generic Geometry (possibly a GEOMETRYCOLLECTION) will be returned merging input Geometries all together
"); html += wxT("aggregate function
"); html += wxT("NULL will be returned if any error is encountered
BuildArea( geom Geometry ) : Geometry
"); html += wxT("ST_BuildArea( geom Geometry ) : Geometry
a Geometry (actually corresponding to a POLYGON or MULTIPOLYGON) will be returned.
"); html += wxT ("The input Geometry is expected to represent a LINESTRING or a MULTILINESTRING.
The input Geometry can be an arbitrary collection "); html += wxT ("of sparse Linestrings: this function will then try to (possibly) reassemble them into one (or more) polygon(s)."); html += wxT ("
If the second [optional] argument is TRUE then a MULTIPOLYGON will be returned anyway.
"); html += wxT("NULL will be returned if any error is encountered
Polygonize( geom Geometry ) : Geometry
"); html += wxT("ST_Polygonize( geom Geometry ) : Geometry
Exactly the same as ST_BuildArea, but implemented as an aggregate function.
"); html += wxT("NULL will be returned if any error is encountered
LineMerge( geom Geometry ) : Geometry
"); html += wxT("ST_LineMerge( geom Geometry ) : Geometry
a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned.
"); html += wxT ("The input Geometry is expected to represent a LINESTRING or a MULTILINESTRING.
The input Geometry can be an arbitrary collection "); html += wxT ("of sparse Linestrings: this function will then try to (possibly) reassemble them into one (or more) polygon(s)."); html += wxT ("
If the second [optional] argument is TRUE then a MULTIPOLYGON will be returned anyway.
"); html += wxT("NULL will be returned if any error is encountered
MakePolygon( geom1 Geometry [ , geom2 Geometry ] ) : Geometry
"); html += wxT ("ST_MakePolygon( geom1 Geometry [ , geom2 Geometry ] ) : Geometry
Kind of lightweight/simplified ST_BuildArea: the first input Geometry is always "); html += wxT ("expected to represent a closed LINESTRING assumed to identify the output polygon's Exterior Ring.
"); html += wxT ("The second input Geometry (if any) is expected to be a LINESTRING or MULTILINESTRING identifying any "); html += wxT ("polygon's Interior Ring (and all them are expected to be correctly closed).
"); html += wxT ("Please note well: this function doesn't perform any internal topology check, so it could "); html += wxT ("possibly return an invalid polygon on invalid input.
NULL will be returned if any error is encountered
LinesFromRings( geom Geometry ) : Geometry
"); html += wxT("ST_LinesFromRings( geom Geometry ) : Geometry
a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned.
"); html += wxT ("The input Geometry is expected to be a POLYGON or MULTIPOLYGON; any RING will then be transformed into the corresponding LINESTRING.
"); html += wxT("NULL will be returned if any error is encountered
LinesCutAtNodes( geom1 Geometry , geom2 Geometry ) : Geometry
"); html += wxT ("ST_LinesCutAtNodes( geom1 Geometry , geom2 Geometry ) : Geometry
a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned.
"); html += wxT ("The first input Geometry is expected to be a LINESTRING or MULTILINESTRING (Lines); "); html += wxT ("the second input Geometry is expected to be a POINT or MULTIPOINT (Nodes).
"); html += wxT ("any Line will then be possibly split in two halves where some vertex exactely intercepts a Node.
"); html += wxT("NULL will be returned if any error is encountered
RingsCutAtNodes( geom Geometry ) : Geometry
"); html += wxT("ST_RingsCutAtNodes( geom Geometry ) : Geometry
a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned.
"); html += wxT ("The input Geometry is expected to be a POLYGON or MULTIPOLYGON (Rings); "); html += wxT ("any self-intersection or intersection between Rings is assumed to represent a Node.
"); html += wxT ("any Ring will then be possibly split in two halves where some vertex exactely intercepts a Node.
"); html += wxT("NULL will be returned if any error is encountered
DissolveSegments( geom Geometry ) : Geometry
"); html += wxT("ST_DissolveSegments( geom Geometry ) : Geometry
a Geometry (actually corresponding to a LINESTRING, MULTILINESTRING or GEOMETRYCOLLECTION) will be returned.
"); html += wxT ("The input Geometry is arbitrary: any POINT will remain unaffected, but any LINESTRING or RING will be dissolved into elementary segments.
"); html += wxT("NULL will be returned if any error is encountered
DissolvePoints( geom Geometry ) : Geometry
"); html += wxT("ST_DissolvePoints( geom Geometry ) : Geometry
a Geometry (actually corresponding to a POINT or MULTIPOINT) will be returned.
"); html += wxT ("The input Geometry is arbitrary: any POINT will remain unaffected, but any LINESTRING or RING will be dissolved into elementary Points corresponding to each Vertex.
"); html += wxT("NULL will be returned if any error is encountered
CollectionExtract( geom Geometry, type Integer ) : Geometry
"); html += wxT("ST_CollectionExtract( geom Geometry, type Integer ) : Geometry
Given a GEOMETRYCOLLECTION, returns a MULTI* geometry consisting only of the specified type.
"); html += wxT ("Sub-geometries that are not the specified type are ignored.
(1=POINT-type, 2=LINESTRING-type, 3=POLYGON-type)
"); html += wxT ("NULL will be returned if any error is encountered (or when no item of required type is found)
ST_Locate_Along_Measure( geom Geometry, m_value Double precision ) : GeometryReturn a derived geometry collection value with elements that match the specified measure.
"); html += wxT ("NULL will be returned if any error is encountered (or when no element corresponding to the given measure is found).
"); html += wxT ("Please note: NULL will be returned anyway if Geometry doesn't support M-dimension, or if it contains any Polygon, or if it's of the GeometryCollection type.
ST_Locate_Between_Measures( geom Geometry, m_start Double precision , m_end Double precision ) : GeometryReturn a derived geometry collection value with elements that match the specified range of measures.
"); html += wxT ("NULL will be returned if any error is encountered (or when no element corresponding to the given range if measures is found).
"); html += wxT ("Please note: NULL will be returned anyway if Geometry doesn't support M-dimension, or if it contains any Polygon, or if it's of the GeometryCollection type.
SquareGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry
"); html += wxT ("ST_SquareGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry
return a grid of square cells (having the edge length of size) precisely covering the input Geometry (expected to be a Polygon or MultiPolygon).
"); html += wxT ("The returned Geometry will usually be of the MultiPolygon type (a collection of Squares), but will be a MultiLinestring if the optional edges_only argument is set to TRUE
"); html += wxT ("If the optional origin argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.
"); html += wxT("NULL will be returned if any error is encountered.
TriangularGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry
"); html += wxT ("ST_TriangularGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry
return a grid of square cells (having the edge length of size) precisely covering the input Geometry (expected to be a Polygon or MultiPolygon).
"); html += wxT ("The returned Geometry will usually be of the MultiPolygon type (a collection of Triangles), but will be a MultiLinestring if the optional edges_only argument is set to TRUE
"); html += wxT ("If the optional origin argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.
"); html += wxT("NULL will be returned if any error is encountered.
HexagonalGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry
"); html += wxT ("ST_HexagonalGrid( geom Geometry [ , size Double precision [ , edges_only Boolean [ , origin Geometry ]] ) : Geometry
return a grid of square cells (having the edge length of size) precisely covering the input Geometry (expected to be a Polygon or MultiPolygon).
"); html += wxT ("The returned Geometry will usually be of the MultiPolygon type (a collection of Hexagons), but will be a MultiLinestring if the optional edges_only argument is set to TRUE
"); html += wxT ("If the optional origin argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.
"); html += wxT("NULL will be returned if any error is encountered.
DelaunayTriangulation( geom Geometry [ , edges_only Boolean [ , tolerance Double precision ]] ) : Geometry
"); html += wxT ("ST_DelaunayTriangulation( geom Geometry [ , edges_only Boolean [ , tolerance Double precision ]] ) : Geometry
Return the Delaunay Triangulation corresponding to the input Geometry.
"); html += wxT("NULL will be returned if any error is encountered.
VoronojDiagram( geom Geometry [ , edges_only Boolean [ , extra_frame_size Double precision [ , tolerance Double precision ]]] ) : Geometry
"); html += wxT ("ST_VoronojDiagram( geom Geometry [ , edges_only Boolean [ , extra_frame_size Double precision [ , tolerance Double precision ]]] ) : Geometry
Return the Voronoj Diagram corresponding to the input Geometry.
"); html += wxT("NULL will be returned if any error is encountered.
ConcaveHull( geom Geometry [ , factor Double precision [ , allow_hols Boolean [ , tolerance Double precision ]]] ) : Geometry
"); html += wxT ("ST_ConcaveHull( geom Geometry [ , factor Double precision [ , allow_hols Boolean [ , tolerance Double precision ]]] ) : Geometry
Return the ConcaveHull corresponding to the input Geometry.
"); html += wxT("NULL will be returned if any error is encountered.
MakeValid( geom Geometry ) : Geometry
"); html += wxT("ST_MakeValid( geom Geometry ) : Geometry
Return a surely valid version of the input Geometry.
"); html += wxT ("If the input Geometry was already valid, then it will be returned exactly as it was.
"); html += wxT("NULL will be returned if any error is encountered.
MakeValidDiscarded( geom Geometry ) : Geometry
"); html += wxT("ST_MakeValidDiscarded( geom Geometry ) : Geometry
Return all elements that would be eventually discarded by ST_MakeValid() while validating the same input Geometry.
"); html += wxT ("NULL will be returned if any error is encountered, or if no discarded item exists.
Segmentize( geom Geometry , dist Double precision ) : Geometry
"); html += wxT ("ST_Segmentize( geom Geometry , dist Double precision ) : Geometry
return a new Geometry corresponding to the input Geometry; as much Linestring / Ring vertices "); html += wxT ("as required will be eventually interpolated so to ensure that no segment will be longer than dist.
"); html += wxT("NULL will be returned if any error is encountered.
Split( geom Geometry , blade Geometry ) : Geometry
"); html += wxT("ST_Split( geom Geometry , blade Geometry ) : Geometry
return a new Geometry collecting all items resulting by splitting the input Geometry by the blade.
"); html += wxT("NULL will be returned if any error is encountered.
SplitLeft( geom Geometry , blade Geometry ) : Geometry
"); html += wxT("ST_SplitLeft( geom Geometry , blade Geometry ) : Geometry
return a new Geometry collecting all items resulting by splitting the input Geometry by the blade and falling on the left side.
"); html += wxT ("All items not affected by the split operation (i.e. not intersecting the blade) will be returned into the left collection.
"); html += wxT("NULL will be returned if any error is encountered.
SplitRight( geom Geometry , blade Geometry ) : Geometry
"); html += wxT("ST_SplitRight( geom Geometry , blade Geometry ) : Geometry
return a new Geometry collecting all items resulting by splitting the input Geometry by the blade and falling on the right side.
"); html += wxT ("NULL will be returned if any error is encountered (or if the right side is empty).
Azimuth( pt1 Geometry , pt2 Geometry ) : Double precision
"); html += wxT("ST_Azimuth( pt1 Geometry , pt2 Geometry ) : Double precision
return the angle (in radians) from the horizontal of the vector defined by pt1 and pt2.
"); html += wxT("Both pt1 and pt2 are expected to be simple Points.
"); html += wxT ("Starting since 4.1.0 if both points supports \"long/lat\" coords the returned Azimuth will be precisely computed on the ellipsoid.
"); html += wxT("NULL will be returned if any error is encountered.
"); html += wxT("On the clock: 12=0; 3=PI/2; 6=PI; 9=3PI/2
Project( start_point Geometry, distance Double precision, azimuth Double precision ) : Geometry
"); html += wxT ("Project( start_point Geometry, distance Double precision, azimuth Double precision ) : Geometry
return a new Point projected from a start point using a bearing and distance.
"); html += wxT ("start_point is expected to be simple long/lat Point.
distance is expected to be measured in meters; "); html += wxT ("azimuth (aka bearing or heading) has the same identical meaning as in ST_Azimuth().
"); html += wxT("NULL is returned on failure or on invalid arguments.
SnapToGrid( geom Geometry , size Double precision ) : Geometry
"); html += wxT ("SnapToGrid( geom Geometry , size_x Double precision , size_y Double precision ) : Geometry
"); html += wxT ("SnapToGrid( geom Geometry , origin_x Double precision , origin_y Double precision , size_x Double precision , size_y Double precision ) : Geometry
"); html += wxT ("SnapToGrid( geom Geometry , origin Geometry , size_x Double precision , size_y Double precision , size_z Double precision , size_m Double precision ) : Geometry
"); html += wxT ("ST_SnapToGrid( geom Geometry , size Double precision ) : Geometry
"); html += wxT ("ST_SnapToGrid( geom Geometry , size_x Double precision , size_y Double precision ) ) : Geometry
"); html += wxT ("ST_SnapToGrid( geom Geometry , origin_x Double precision , origin_y Double precision , size_x Double precision , size_y Double precision ) ) : Geometry
"); html += wxT ("ST_SnapToGrid( geom Geometry , origin Geometry , size_x Double precision , size_y Double precision, size_z Double precision , size_m Double precision ) : Geometry
return a new Geometry corresponding to the input Geometry; all points and vertices will be snapped to the grid defined by its origin and size(s).
"); html += wxT("Removes all consecutive points falling on the same cell.
"); html += wxT ("All collapsed geometries will be stripped from the returned Geometry.
"); html += wxT("NULL will be returned if any error is encountered.
GeoHash( geom Geometry ) : String
"); html += wxT("ST_GeoHash( geom Geometry ) : String
Return a GeoHash representation (geohash.org) of the geometry.
"); html += wxT ("A GeoHash encodes a point into a text form that is sortable and searchable based on prefixing.
"); html += wxT ("ST_GeoHash will not work with geometries that are not in geographic (lon/lat) coordinates
AsX3D( geom Geometry [ , precision Integer [ , options Integer [ , refid String ]]] ) : String
"); html += wxT ("ST_AsX3D( geom Geometry [ , precision Integer [ , options Integer [ , refid String ]]] ) : String
Returns a geometry as an X3D XML formatted node element
MaxDistance( geom1 Geometry , geom2 Geometry ) : Double precision
"); html += wxT ("ST_MaxDistance( geom1 Geometry , geom2 Geometry ) : Double precision
return the max distance between geom1 and geom2
ST_3DDistance( geom1 Geometry , geom2 Geometry ) : Double precisionreturn the 3D-distance between geom1 and geom2 (considering Z coordinates)
ST_Max3DDistance( geom1 Geometry , geom2 Geometry ) : Double precisionreturn the max 3D-distance between geom1 and geom2 (considering Z coordinates)
ST_Node( geom Geometry ) : GeometryFully nodes a set of linestrings using the least possible number of nodes while preserving all of the input ones.
"); html += wxT ("NULL will be returned if the input Geometry isn't a set of linestrings or if any other error occurs.
SelfIntersections( geom Geometry ) : Geometry
ST_SelffIntersections( geom Geometry ) : Geometry
Returns a MultiPoint Geometry representing any self-intersection found within the input geometry "); html += wxT("[Expected to be of the Linestring or MultiLinestring type].
"); html += wxT ("NULL will be returned for invalid arguments, or when no self-intersections were found.
BuildMbr( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision, [ , SRID Integer] ) : Geometry[x1 y1] and [x2 y2] are assumed to be Points identifying a line segment;"); html += wxT ("then a Geometry will be returned representing the MBR for this line segment
BuildCircleMbr( x Double precision , y Double precision , radius Double precision [ , SRID Integer] ) : Geometry[x y] is assumed to be the center of a circle of given radius; then a Geometry will be returned representing the MBR for this circle
Extent( geom Geometry ) : Geometryreturn a geometric object representing the bounding box that encloses a set of input values
"); html += wxT("aggregate function
ToGARS( geom Geometry ) : Stringgeom is expected to represent a POINT (longitude and latitude coords); "); html += wxT("the corresponding GARS area designation code will be returned.
"); html += wxT("NULL will be returned if any error is encountered.
GARSMbr( GARS_code String ) : Geometrycode is assumed to represent a valid GARS area designation code; "); html += wxT ("a Geometry will be returned representing the MBR for the corresponding GARS area.
"); html += wxT("NULL will be returned if any error is encountered.
MbrMinX( geom Geometry) : Double precision
"); html += wxT("ST_MinX( geom Geometry) : Double precision
return the x-coordinate for geom MBR's leftmost side as a double precision number.
"); html += wxT("NULL will be returned if geom isn't a valid Geometry.
MbrMinY( geom Geometry) : Double precision
"); html += wxT("ST_MinY( geom Geometry) : Double precision
return the y-coordinate for geom MBR's lowermost side as a double precision number.
"); html += wxT("NULL will be returned if geom isn't a valid Geometry.
MbrMaxX( geom Geometry) : Double precision
"); html += wxT("ST_MaxX( geom Geometry) : Double precision
return the x-coordinate for geom MBR's rightmost side as a double precision number.
"); html += wxT("NULL will be returned if geom isn't a valid Geometry.
MbrMaxY( geom Geometry) : Double precision
"); html += wxT("ST_MaxY( geom Geometry) : Double precision
return the y-coordinate for geom MBR's uppermost side as a double precision number.
"); html += wxT("NULL will be returned if geom isn't a valid Geometry.
ST_MinZ( geom Geometry) : Double precisionreturn the minimum Z-coordinate value for geom as a double precision number.
"); html += wxT ("NULL will be returned if geom isn't a valid Geometry or if geom has no Z dimension.
ST_MaxZ( geom Geometry) : Double precisionreturn the maximum Z-coordinate value for geom as a double precision number.
"); html += wxT ("NULL will be returned if geom isn't a valid Geometry or if geom has no Z dimension.
ST_MinM( geom Geometry) : Double precisionreturn the minimum M-coordinate value for geom as a double precision number.
"); html += wxT ("NULL will be returned if geom isn't a valid Geometry or if geom has no M dimension.
ST_MaxM( geom Geometry) : Double precisionreturn the maximum M-coordinate value for geom as a double precision number.
"); html += wxT ("NULL will be returned if geom isn't a valid Geometry or if geom has no M dimension.
functions for constructing a geometric object given its Well-known Text Representation"); html += wxT("
back to index
GeomFromText( wkt String [ , SRID Integer] ) : Geometry
"); html += wxT("ST_GeomFromText( wkt String [ , SRID Integer] ) : Geometry
construct a geometric object given its Well-known text Representation
ST_WKTToSQL( wkt String ) : GeometrySQL/MM alias name for ST_GeomFromText: SRID=0 is assumed.
PointFromText( wktPoint String [ , SRID Integer] ) : Point
"); html += wxT("ST_PointFromText( wktPoint String [ , SRID Integer] ) : Point
construct a Point
LineFromText( wktLineString String [ , SRID Integer] ) : Linestring
"); html += wxT ("ST_LineFromText( wktLineString String [ , SRID Integer] ) : Linestring
"); html += wxT ("LineStringFromText( wktLineString String [ , SRID Integer] ) : Linestring
"); html += wxT ("ST_LineStringFromText( wktLineString String [ , SRID Integer] ) : Linestring
construct a Linestring
PolyFromText( wktPolygon String [ , SRID Integer] ) : Polygon
"); html += wxT("ST_PolyFromText( wktPolygon String [ , SRID Integer] ) : Polygon
"); html += wxT("PolygonFromText( wktPolygon String [ , SRID Integer] ) : Polygon
"); html += wxT ("ST_PolygonFromText( wktPolygon String [ , SRID Integer] ) : Polygon
construct a Polygon
MPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint
"); html += wxT ("ST_MPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint
"); html += wxT ("MultiPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint
"); html += wxT ("ST_MultiPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint
construct a MultiPoint
MLineFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring
"); html += wxT ("ST_MLineFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring
"); html += wxT ("MultiLineStringFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring
"); html += wxT ("ST_MultiLineStringFromText( wktMultiLineString String [ , SRID Integer] ) : MultiLinestring
construct a MultiLinestring
MPolyFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon
"); html += wxT ("ST_MPolyFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon
"); html += wxT ("MultiPolygonFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon
"); html += wxT ("ST_MultiPolygonFromText( wktMultiPolygon String [ , SRID Integer] ) : MultiPolygon
construct a MultiPolygon
GeomCollFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection
"); html += wxT ("ST_GeomCollFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection
"); html += wxT ("GeometryCollectionFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection
"); html += wxT ("ST_GeometryCollectionFromText( wktGeometryCollection String [ , SRID Integer] ) : GeometryCollection
construct a GeometryCollection
BdPolyFromText( wktMultilinestring String [ , SRID Integer] ) : Polygon
"); html += wxT ("ST_BdPolyFromText( wktMultilinestring String [ , SRID Integer] ) : Polygon
Construct a Polygon given an arbitrary collection of closed "); html += wxT ("linestrings as a MultiLineString text representation.
see also: BuildArea(), Polygonize()
BdMPolyFromText( wktMultilinestring String [ , SRID Integer] ) : MultiPolygon
"); html += wxT ("ST_BdMPolyFromText( wktMultilinestring String [ , SRID Integer] ) : MultiPolygon
Construct a MultiPolygon given an arbitrary collection of closed "); html += wxT ("linestrings as a MultiLineString text representation.
see also: BuildArea(), Polygonize()
functions for constructing a geometric object given its Well-known Binary Representation"); html += wxT("
back to index
GeomFromWKB( wkbGeometry Binary [ , SRID Integer] ) : Geometry
"); html += wxT ("ST_GeomFromWKB( wkbGeometry Binary [ , SRID Integer] ) : Geometry
construct a geometric object given its Well-known binary Representation
ST_WKBToSQL( wkbGeometry Binary ) : GeometrySQL/MM alias name for ST_GeomFromWKB: SRID=0 is assumed.
PointFromWKB( wkbPoint Binary [ , SRID Integer] ) : Point
"); html += wxT("ST_PointFromWKB( wkbPoint Binary [ , SRID Integer] ) : Point
construct a Point
LineFromWKB( wkbLineString Binary [ , SRID Integer] ) : Linestring
"); html += wxT ("ST_LineFromWKB( wkbLineString Binary [ , SRID Integer] ) : Linestring
"); html += wxT ("LineStringFromWKB( wkbLineString Binary [ , SRID Integer] ) : Linestring
"); html += wxT ("ST_LineStringFromWKB ( wkbLineString Binary [ , SRID Integer] ) : Linestring
construct a Linestring
PolyFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon
"); html += wxT("ST_PolyFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon
"); html += wxT("PolygonFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon
"); html += wxT ("ST_PolygonFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon
construct a Polygon
MPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint
"); html += wxT ("ST_MPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint
"); html += wxT ("MultiPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint
"); html += wxT ("ST_MultiPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint
construct a MultiPoint
MLineFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring
"); html += wxT ("ST_MLineFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring
"); html += wxT ("MultiLineStringFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring
"); html += wxT ("ST_MultiLineStringFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring
construct a MultiLinestring
MPolyFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon
"); html += wxT ("ST_MPolyFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon
"); html += wxT ("MultiPolygonFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon
"); html += wxT ("ST_MultiPolygonFromWKB( wkbMultiPolygon Binary [ , SRID Integer] ) : MultiPolygon
construct a MultiPolygon
GeomCollFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection
"); html += wxT ("ST_GeomCollFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection
"); html += wxT ("GeometryCollectionFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection
"); html += wxT ("ST_GeometryCollectionFromWKB( wkbGeometryCollection Binary [ , SRID Integer] ) : GeometryCollection
construct a GeometryCollection
BdPolyFromWKB( wkbMultilinestring Binary [ , SRID Integer] ) : Polygon
"); html += wxT ("ST_BdPolyFromWKB( wkbMultilinestring Binary [ , SRID Integer] ) : Polygon
Construct a Polygon given an arbitrary collection of closed "); html += wxT ("linestrings as a MultiLineString binary representation.
see also: BuildArea(), Polygonize()
BdMPolyFromWKB( wkbMultilinestring Binary [ , SRID Integer] ) : MultiPolygon
"); html += wxT ("ST_BdMPolyFromWKB( wkbMultilinestring Binary [ , SRID Integer] ) : MultiPolygon
Construct a MultiPolygon given an arbitrary collection of closed "); html += wxT ("linestrings as a MultiLineString binary representation.
see also: BuildArea(), Polygonize()
functions for obtaining the Well-known Text / Well-known Binary Representation of a geometric object"); html += wxT("
back to index
AsText( geom Geometry ) : String
"); html += wxT ("ST_AsText( geom Geometry ) : String
return the Well-known Text representation
AsWKT( geom Geometry [ , precision Integer ] ) : Stringreturn the Well-known Text representation
always return strictly conformant 2D WKT
AsBinary( geom Geometry ) : Binary
"); html += wxT ("ST_AsBinary( geom Geometry ) : Binary
return the Well-known Binary representation
SQL functions supporting exotic geometric formats"); html += wxT("
back to index
AsSVG( geom Geometry, [ , relative Integer [ , precision Integer ] ] ) : Stringreturns the SVG [Scalable Vector Graphics] representation
AsKML( geom Geometry [ , precision Integer ] ) : String
"); html += wxT ("AsKML( name String, description String, geom Geometry [ , precision Integer ] ) : String
returns the KML [Keyhole Markup Language] representation
GeomFromKml( KmlGeometry String ) : Geometryconstruct a geometric object given its KML Representation
AsGML( geom Geometry [ , precision Integer ] ) : String
"); html += wxT ("AsGML( version Integer, geom Geometry [ , precision Integer ] ) : String
returns the GML [Geography Markup Language] representation
GeomFromGML( gmlGeometry String ) : Geometryconstruct a geometric object given its GML Representation
AsGeoJSON( geom Geometry [ , precision Integer [ , options Integer ] ] ) : Stringreturns the GeoJSON [Geographic JavaScript Object Notation] representation
GeomFromGeoJSON( GeoJSONGeometry String ) : Geometryconstruct a geometric object given its GeoJSON Representation
AsEWKB( geom Geometry ) : Stringreturns the EWKB [Extended Well Known Binary] representation
GeomFromEWKB( ewkbGeometry String ) : Geometryconstruct a geometric object given its EWKB Representation
AsEWKT( geom Geometry ) : Stringreturns the EWKT [Extended Well Known Text] representation
GeomFromEWKT( ewktGeometry String ) : Geometryconstruct a geometric object given its EWKT Representation
AsFGF( geom Geometry ) : Stringreturns the FGF [FDO Geometry Binary Format] representation
GeomFromFGF( fgfGeometry Binary [ , SRID Integer] ) : Geometryconstruct a geometric object given its FGF binary Representation
ExportDXF( out_dir String , filename String , sql_query String , layer_col_name String , "); html += wxT ("geom_col_name String , label_col_name String , text_height_col_name String , text_rotation_col_name String , geom_filter Geometry [ , precision Integer ] ) : IntegerExports a whole DXF file.
Will return 0 (i.e. FALSE) on failure, any other value (i.e. TRUE) on success.
"); html += wxT ("Please note this SQL function open the doors to many potential security issues, and thus is always disabled by default.
"); html += wxT ("Explicitly setting the environment variable SPATIALITE_SECURITY=relaxed is absolutely required in order to effectively enable this function.
functions on type Geometry"); html += wxT("
back to index
Dimension( geom Geometry ) : Integer
"); html += wxT("ST_Dimension( geom Geometry ) : Integer
return the dimension of the geometric object, which is less than or equal to the dimension of the coordinate space
CoordDimension( geom Geometry ) : Stringreturn the dimension model used by the geometric object as:
'XY', 'XYZ', 'XYM' or 'XYZM'
ST_NDims( geom Geometry ) : Integerreturn the number of dimensions used by the geometric object as:
2, 3 or 4
ST_Is3D( geom Geometry ) : IntegerChecks if geom has the Z dimension.
"); html += wxT ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a "); html += wxT("function invocation on invalid arguments.
ST_IsMeasured( geom Geometry ) : IntegerChecks if geom has the M dimension.
"); html += wxT ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a "); html += wxT("function invocation on invalid arguments.
GeometryType( geom Geometry ) : String
"); html += wxT("ST_GeometryType( geom Geometry ) : String
return the name of the instantiable subtype of Geometry of which this geometric object is a member, as a string
SRID( geom Geometry ) : Integer
"); html += wxT("ST_SRID( geom Geometry ) : Integer
return the Spatial Reference System ID for this geometric object
SetSRID( geom Geometry , SRID Integer ) : Integerdirectly sets the Spatial Reference System ID for this geometric object [no reprojection is applied].
"); html += wxT ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a "); html += wxT("function invocation on NULL arguments
IsEmpty( geom Geometry ) : Integer
"); html += wxT("ST_IsEmpty( geom Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if this geometric object corresponds to the empty set
IsSimple( geom Geometry ) : Integer
"); html += wxT("ST_IsSimple( geom Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if this geometric object is simple, as defined in the Geometry Model
IsValid( geom Geometry ) : Integer
"); html += wxT("ST_IsValid( geom Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if this geometric object does not contains any topological error
Boundary( geom Geometry ) : Geometry
"); html += wxT("ST_Boundary( geom Geometry ) : Geometry
return a geometric object that is the combinatorial boundary of g as defined in the Geometry Model
Envelope( geom Geometry ) : Geometry
"); html += wxT("ST_Envelope( geom Geometry ) : Geometry
return the rectangle bounding g as a Polygon. "); html += wxT ("The Polygon is defined by the corner points of the bounding box [(MINX, MINY),(MAXX, MINY), (MAXX, MAXY), (MINX, MAXY), (MINX, MINY)].
ST_Expand( geom Geometry , amount Double ) : Geometryreturn the rectangle bounding g as a Polygon.
"); html += wxT ("The bounding rectangle is expanded in all directions by an amount specified by the second argument.
ST_NPoints( geom Geometry ) : Integerreturn the total number of Points (this including any Linestring/Polygon vertex)
ST_NRings( geom Geometry ) : Integerreturn the total number of Rings (this including both Exterior and Interior Rings)
ST_Reverse( geom Geometry ) : geom Geometryreturns a new Geometry [if possible] or NULL
"); html += wxT("Any Linestring or Ring will be in reverse order.
ST_ForceLHR( geom Geometry ) : geom Geometryreturns a new Geometry [if possible] or NULL
"); html += wxT ("Any Polygon will be oriented accordingly to Left Hand Rule (Exterior Ring clockwise, "); html += wxT("Interior Rings counter-clockwise).
AddPoint( line Linestring , point Point [ , position Integer ] ) : Linestring
"); html += wxT ("ST_AddPoint( line Linestring , point Point [ , position Integer ] ) : Linestring
Adds a new Point into the input Linestring immediately before \"position\" (zero-based index)
"); html += wxT ("A negative \"position\" (default) means appending the new Point to the end of the input Linestring.
"); html += wxT("NULL will be returned if any error is encountered.
SetPoint( line Linestring , position Integer , point Point ) : Linestring
"); html += wxT ("ST_SetPoint( line Linestring , position Integer , point Point ) : Linestring
Replaces the Point into the input Linestring at \"position\" (zero-based index)
"); html += wxT("NULL will be returned if any error is encountered.
Replaces the StartPoint into the input Linestring
"); html += wxT("NULL will be returned if any error is encountered.
Replaces the EndPoint into the input Linestring
"); html += wxT("NULL will be returned if any error is encountered.
RemovePoint( line Linestring , position Integer ) : Linestring
"); html += wxT ("ST_RemovePoint( line Linestring , position Integer ) : Linestring
Removes the Point into the input Linestring at \"position\" (zero-based index)
"); html += wxT("NULL will be returned if any error is encountered.
Functions attempting to repair malformed Geometries"); html += wxT("
back to index
SanitizeGeometry( geom Geometry ) : geom Geometryreturns a (possibly) sanitized Geometry or NULL
Geometry-compression functions"); html += wxT("
back to index
CompressGeometry( geom Geometry ) : geom Geometryreturns a compressed Geometry or NULL
UncompressGeometry( geom Geometry ) : geom Geometryreturns an uncompressed Geometry or NULL
Geometry-type casting functions"); html += wxT("
back to index
CastToPoint( geom Geometry ) : geom Geometryreturns a POINT-type Geometry [if possible] or NULL
CastToLinestring( geom Geometry ) : geom Geometryreturns a LINESTRING-type Geometry [if possible] or NULL
CastToPolygon( geom Geometry ) : geom Geometryreturns a POLYGON-type Geometry [if possible] or NULL
CastToMultiPoint( geom Geometry ) : geom Geometryreturns a MULTIPOINT-type Geometry [if possible] or NULL
CastToMultiLinestring( geom Geometry ) : geom Geometryreturns a MULTILINESTRING-type Geometry [if possible] or NULL
CastToMultiPolygon( geom Geometry ) : geom Geometryreturns a MULTIPOLYGON-type Geometry [if possible] or NULL
CastToGeometryCollection( geom Geometry ) : geom Geometryreturns a GEOMETRYCOLLECTION-type Geometry [if possible] or NULL
CastToMulti( geom Geometry ) : geom Geometry
"); html += wxT("ST_Multi( geom Geometry ) : geom Geometry
returns a MULTIPOINT-, MULTILINESTRING- or MULTIPOLYGON-type Geometry [if possible]: NULL in any other case
CastToSingle( geom Geometry ) : geom Geometryreturns a POINT-, LINESTRING- or POLYGON-type Geometry [if possible]: NULL in any other case
Space-dimensions casting functions"); html += wxT("
back to index
CastToXY( geom Geometry ) : geom Geometryreturns a Geometry using the [XY] space dimension
CastToXYZ( geom Geometry ) : geom Geometryreturns a Geometry using the [XYZ] space dimension
CastToXYM( geom Geometry ) : geom Geometryreturns a Geometry using the [XYM] space dimension
CastToXYZM( geom Geometry ) : geom Geometryreturns a Geometry using the [XYZM] space dimension
functions on type Point"); html += wxT("
back to index
X( pt Point ) : Double precision
"); html += wxT ("ST_X( pt Point ) : Double precision
return the x-coordinate of Point p as a double precision number
Y( pt Point ) : Double precision
"); html += wxT ("ST_Y( pt Point ) : Double precision
return the y-coordinate of Point p as a double precision number
Z( pt Point ) : Double precision
"); html += wxT ("ST_Z( pt Point ) : Double precision
return the z-coordinate of Point p as a double precision number"); html += wxT("or NULL if no z-coordinate is available
M( pt Point ) : Double precision
"); html += wxT ("ST_M( pt Point ) : Double precision
return the m-coordinate of Point p as a double precision number
"); html += wxT("or NULL if no m-coordinate is available
functions on type Curve [Linestring or Ring]
StartPoint( c Curve ) : Point
"); html += wxT ("ST_StartPoint( c Curve ) : Point
return a Point containing the first Point of c
EndPoint( c Curve ) : Point
"); html += wxT ("ST_EndPoint( c Curve ) : Point
return a Point containing the last Point of c
NumPoints( line LineString ) : Integer
"); html += wxT ("ST_NumPoints( line LineString ) : Integer
return the number of Points in the LineString
PointN( line LineString , n Integer ) : Point
"); html += wxT ("ST_PointN( line LineString , n Integer ) : Point
return a Point containing Point n of line
GLength( c Curve [ , use_ellipsoid Boolean ] ) : Double precision
"); html += wxT ("ST_Length( c Curve [ , use_ellipsoid Boolean ] ) : Double precision
return the length of c
Perimeter( s Surface [ , use_ellipsoid Boolean ] ) : Double precision
"); html += wxT ("ST_Perimeter( s Surface [ , use_ellipsoid Boolean ] ) : Double precision
return the perimeter of s
GeodesicLength( c Curve ) : Double precisionreturn the geodesic length of c"); html += wxT (" measured on the Ellipsoid [only for geographic SRIDs]
GreatCircleLength( c Curve ) : Double precisionreturn the Great Circle length of c"); html += wxT(" [only for geographic SRIDs]
IsClosed( c Curve ) : Integer
"); html += wxT("ST_IsClosed( c Curve ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); html += wxT ("return TRUE if c is closed, i.e., if StartPoint(c) = EndPoint(c)
IsRing( c Curve ) : Integer
"); html += wxT("ST_IsRing( c Curve ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); html += wxT ("return TRUE if c is a ring, i.e., if c is closed and simple. A simple Curve does not pass through the same Point more than once.
PointOnSurface( s Surface/Curve ) : Point
"); html += wxT ("ST_PointOnSurface( s Surface ) : Point
return a Point guaranteed to lie on the Surface (or Curve)
Simplify( c Curve , tolerance Double precision ) : Curve
"); html += wxT("ST_Simplify( c Curve , tolerance Double precision ) : Curve
"); html += wxT("ST_Generalize( c Curve , tolerance Double precision ) : Curve
return a geometric object representing a simplified version of c applying the Douglas-Peukert algorithm with given tolerance
SimplifyPreserveTopology( c Curve , tolerance Double precision ) : Curve
"); html += wxT ("ST_SimplifyPreserveTopology( c Curve , tolerance Double precision ) : Curve
return a geometric object representing a simplified version of c "); html += wxT ("applying the Douglas-Peukert algorithm with given tolerance and respecting topology
functions on type Surface [Polygon or Ring]"); html += wxT("
back to index
Centroid( s Surface ) : Point
"); html += wxT ("ST_Centroid( s Surface ) : Point
return the centroid of s, which may lie outside s
Area( s Surface [ , use_ellipsoid Boolean ] ) : Double precision
"); html += wxT ("ST_Area( s Surface [ , use_ellipsoid Boolean ] ) : Double precision
return the area of s
functions on type Polygon"); html += wxT("
back to index
ExteriorRing( polyg Polygon ) : LineString
"); html += wxT ("ST_ExteriorRing( polyg Polygon ) : LineString
return the exteriorRing of p
NumInteriorRing( polyg Polygon ) : Integer
NumInteriorRings( polyg Polygon ) : Integer
"); html += wxT("ST_NumInteriorRing( polyg Polygon ) : Integer
return the number of interiorRings
InteriorRingN( polyg Polygon , n Integer ) : LineString
"); html += wxT("ST_InteriorRingN( polyg Polygon , n Integer ) : LineString
return the nth interiorRing. The order of Rings is not geometrically significant.
functions on type GeomCollection"); html += wxT("
back to index
NumGeometries( geom GeomCollection ) : Integer
"); html += wxT ("ST_NumGeometries( geom GeomCollection ) : Integer
return the number of geometries
GeometryN( geom GeomCollection , n Integer ) : Geometry
"); html += wxT("ST_GeometryN( geom GeomCollection , n Integer ) : Geometry
return the nth geometric object in the collection. The order of the elements in the collection is not geometrically significant.
functions testing approximative spatial relationships via MBRs"); html += wxT("
back to index
MbrEqual( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if g1 and g2 have equal MBRs
MbrDisjoint( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if the intersection of g1 and g2 MBRs is the empty set
MbrTouches( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if the only Points in common between g1 and g2 MBRs lie in the union of the boundaries of g1 and g2
MbrWithin( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if g1 MBR is completely contained in g2 MBR
MbrOverlaps( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if the intersection of g1 and g2 MBRs results in a value of the same dimension as g1 and g2 that is different from both g1 and g2
MbrIntersects( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); html += wxT ("convenience predicate: TRUE if the intersection of g1 and g2 MBRs is not empty
ST_EnvIntersects( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT ("ST_EnvelopesIntersects( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT ("ST_EnvIntersects( geom1 Geometry , x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer
"); html += wxT ("ST_EnvelopesIntersects( geom1 Geometry , x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer
The first form simply is an alias name for MbrIntersects; the other form allows to define the second MBR by two extreme points [x1, y1] and [x2, y2].
"); html += wxT ("The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on invalid arguments
"); html += wxT ("convenience predicate: TRUE if the intersection of both MBRs is not empty
MbrContains( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); html += wxT ("convenience predicate: TRUE if g2 MBR is completely contained in g1 MBR
functions testing spatial relationships"); html += wxT("
back to index
Equals( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT("ST_Equals( geom1 Geometry , geom2 Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if g1 and g2 are equal
Disjoint( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT("ST_Disjoint( geom1 Geometry , geom2 Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if the intersection of g1 and g2 is the empty set
Touches( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT("ST_Touches( geom1 Geometry , geom2 Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if the only Points in common between g1 and g2 lie in the union of the boundaries of g1 and g2
Within( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT("ST_Within( geom1 Geometry , geom2 Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT("TRUE if g1 is completely contained in g2
Overlaps( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT("ST_Overlaps( geom1 Geometry , geom2 Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if the intersection of g1 and g2 results in a value of the same dimension as g1 and g2 that is different from both g1 and g2
Crosses( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT("ST_Crosses( geom1 Geometry , geom2 Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("TRUE if the intersection of g1 and g2 results in a value whose dimension is less than the maximum dimension of g1 and g2 "); html += wxT ("and the intersection value includes Points interior to both g1 and g2, and the intersection value is not equal to either g1 or g2
Intersects( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT("ST_Intersects( geom1 Geometry , geom2 Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); html += wxT ("convenience predicate: TRUE if the intersection of g1 and g2 is not empty
Contains( geom1 Geometry , geom2 Geometry ) : Integer
"); html += wxT("ST_Contains( geom1 Geometry , geom2 Geometry ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); html += wxT ("convenience predicate: TRUE if g2 is completely contained in g1
Covers( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); html += wxT("convenience predicate: TRUE if g1 completely covers g2
CoveredBy( geom1 Geometry , geom2 Geometry ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments
"); html += wxT ("convenience predicate: TRUE if g1 is completely covered by g2
Relate( geom1 Geometry , geom2 Geometry , patternMatrix String ) : Integer
"); html += wxT ("ST_Relate( geom1 Geometry , geom2 Geometry , patternMatrix String ) : Integer
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
"); html += wxT ("return TRUE if the spatial relationship specified by the patternMatrix holds
Distance( geom1 Geometry , geom2 Geometry [ , use_ellipsoid Boolean ] ) : Double precision
"); html += wxT ("ST_Distance( geom1 Geometry , geom2 Geometry [ , use_ellipsoid Boolean ] ) : Double precision
return the distance between geom1 and geom2
HausdorffDistance( geom1 Geometry , geom2 Geometry ) : Double precision
"); html += wxT ("ST_HausdorffDistance( geom1 Geometry , geom2 Geometry ) : Double precision
return the Hausdorff Distance between geom1 and geom2
PtDistWithin( geom1 Geometry , geom2 Geometry , range Double precision [ , use_spheroid Integer ] ) : Integerchecks if the distance between geom1 and geom2 is within the given range.
"); html += wxT ("As a special case if both geoms are simple WGS84 POINTs (SRID=4326) distances are expessed in meters.
functions implementing spatial operators"); html += wxT("
back to index
Intersection( geom1 Geometry , geom2 Geometry ) : Geometry
"); html += wxT("ST_Intersection( geom1 Geometry , geom2 Geometry ) : Geometry
return a geometric object that is the intersection of geometric objects geom1 and geom2
Difference( geom1 Geometry , geom2 Geometry ) : Geometry
"); html += wxT("ST_Difference( geom1 Geometry , geom2 Geometry ) : Geometry
return a geometric object that is the closure of the set difference of geom1 and geom2
GUnion( geom1 Geometry , geom2 Geometry ) : Geometry
"); html += wxT("ST_Union( geom1 Geometry , geom2 Geometry ) : Geometry
return a geometric object that is the set union of geom1 and geom2
GUnion( geom Geometry ) : Geometry
"); html += wxT("ST_Union( geom Geometry ) : Geometry
return a geometric object that is the set union of input values
"); html += wxT("aggregate function
SymDifference( geom1 Geometry , geom2 Geometry ) : Geometry
"); html += wxT("ST_SymDifference( geom1 Geometry , geom2 Geometry ) : Geometry
return a geometric object that is the closure of the set symmetric difference of geom1 and geom2 (logical XOR of space)
Buffer( geom Geometry , dist Double precision ) : Geometry
"); html += wxT("ST_Buffer( geom Geometry , dist Double precision ) : Geometry
return a geometric object defined by buffering a distance d around geom, "); html += wxT ("where dist is in the distance units for the Spatial Reference of geom
ConvexHull( geom Geometry ) : Geometry
"); html += wxT("ST_ConvexHull( geom Geometry ) : Geometry
return a geometric object that is the convex hull of geom
OffsetCurve( geom Curve , radius Double precision, left_or_right Integer ) : Curve
"); html += wxT ("ST_OffsetCurve( geom Curve , radius Double precision, left_or_right Integer ) : Curve
return a geometric object representing the corresponding left- (or right-sided) offset curve
"); html += wxT ("NULL if returned whenever is not possible deriving an offset curve from the original geometry
"); html += wxT("[a single not-closed LINESTRING is expected as input]
SingleSidedBuffer( geom Curve , radius Double precision, left_or_right Integer ) : Curve
"); html += wxT ("ST_SingleSidedBuffer( geom Curve , radius Double precision, left_or_right Integer ) : Curve
return a geometric object representing the corresponding left- (or right-sided) single-sided buffer
"); html += wxT ("NULL if returned whenever is not possible deriving a single-sided buffer from the original geometry
"); html += wxT("[a single not-closed LINESTRING is expected as input]
SharedPaths( geom1 Geometry , geom2 Geometry ) : Geometry
"); html += wxT("ST_SharedPaths( geom1 Geometry , geom2 Geometry ) : Geometry
return a geometric object (of the MULTILINESTRING type) representing any common edge shared by both geometries
"); html += wxT("NULL if returned is no common edge exists
Line_Interpolate_Point( line Curve , fraction Double precision ) : Point
"); html += wxT ("ST_Line_Interpolate_Point( line Curve , fraction Double precision ) : Point
return a point interpolated along a line.
Second argument (between 0.0 and 1.0) representing fraction"); html += wxT("of total length of linestring the point has to be located.
"); html += wxT("NULL if returned for invalid arguments
Line_Interpolate_Equidistant_Points( line Curve , distance Double precision ) : Point
"); html += wxT ("ST_Line_Interpolate_Equidistant_Points( line Curve , distance Double precision ) : Point
return a set of equidistant points interpolated along a line; the returned geometry "); html += wxT ("always corresponds to a MULTIPOINT supporting the M coordinate (representing the progressive distance for each interpolated Point).
"); html += wxT ("Second argument represents the regular distance between interpolated points.
"); html += wxT("NULL if returned for invalid arguments
Line_Locatate_Point( line Curve , point Point ) : Double precision
"); html += wxT ("ST_Line_Locate_Point( line Curve , point Point ) : Double precision
return a number (between 0.0 and 1.0) representing the location of the closest point on LineString"); html += wxT("to the given Point, as a fraction of total 2d line length.
"); html += wxT("NULL if returned for invalid arguments
Line_Substring( line Curve , start_fraction Double precision , end_fraction Double precision ) : Curve
"); html += wxT ("ST_Line_Substring( line Curve , start_fraction Double precision , end_fraction Double precision ) : Curve
Return a Linestring being a substring of the input one starting and ending at the given fractions of total 2d length.
"); html += wxT ("Second and third arguments are expected to be in the range between 0.0 and 1.0.
"); html += wxT("NULL if returned for invalid arguments
ClosestPoint( geom1 Geometry , geom2 Geometry ) : Point
"); html += wxT("ST_ClosestPoint( geom1 Geometry , geom2 Geometry ) : Point
Returns the Point on geom1 that is closest to geom2.
"); html += wxT ("NULL is returned for invalid arguments (or if distance is ZERO)
ShortestLine( geom1 Geometry , geom2 Geometry ) : Curve
"); html += wxT("ST_ShortestLine( geom1 Geometry , geom2 Geometry ) : Curve
Returns the shortest line between two geometries.
"); html += wxT ("NULL is returned for invalid arguments (or if distance is ZERO)
Snap( geom1 Geometry , geom2 Geometry , tolerance Double precision ) : Geometry
"); html += wxT ("ST_Snap( geom1 Geometry , geom2 Geometry , tolerance Double precision ) : Geometry
Returns a new Geometry representing a modified geom1, so to \"snap\" vertices "); html += wxT ("and segments to geom2 vertices; a snap distance tolerance is used to control where snapping is performed.
"); html += wxT("NULL is returned for invalid arguments
LineMerge( geom Geometry ) : Geometry
"); html += wxT("ST_LineMerge( geom Geometry ) : Geometry
a Geometry (actually corresponding to a LINESTRING or MULTILINESTRING) will be returned."); html += wxT ("The input Geometry is expected to represent a LINESTRING or a MULTILINESTRING.
The input Geometry can be an "); html += wxT ("arbitrary collection of sparse line fragments: this function will then try to (possibly) reassemble them into one"); html += wxT("(or more) Linestring(s).
"); html += wxT("NULL is returned for invalid arguments
UnaryUnion( geom Geometry ) : Geometry
"); html += wxT("ST_UnaryUnion( geom Geometry ) : Geometry
Exactely the same as ST_Union, but applied to a single Geometry.
"); html += wxT ("(set union of elementary Geometries within a MULTI- or GEOMETRYCOLLECTION complex Geometry).
"); html += wxT("NULL will be returned if any error is encountered
functions for coordinate transformations"); html += wxT("
back to index
Transform( geom Geometry , newSRID Integer ) : Geometry
"); html += wxT("ST_Transform( geom Geometry , newSRID Integer ) : Geometry
return a geometric object obtained by reprojecting coordinates into the Reference System identified by newSRID
SridFromAuthCRS( auth_name String , auth_SRID Integer ) : Integerreturn the internal SRID corresponding to auth_name and auth_SRID
-1 will be returned if no such CRS is defined
ShiftCoords( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry
"); html += wxT ("ShiftCoordinates( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry
return a geometric object obtained by translating coordinates according to shiftX and shiftY values
ST_Translate( geom Geometry , shiftX Double precision , shiftY Double precision , shiftZ Double Precision ) : Geometryreturn a geometric object obtained by translating coordinates according to shiftX, shiftY and shiftZ values
ST_Shift_Longitude( geom Geometry ) : Geometryreturn a geometric object obtained by translating any negative longitude by 360.
"); html += wxT ("Only meaningful for geographic (longitude/latitude) coordinates.
NormalizeLonLat( geom Geometry ) : Geometryreturn a geometric object obtained by normalizing any longitude in the range"); html += wxT("[-180 / +180] and any latitude in the range [-90 / + 90].
"); html += wxT ("Only meaningful for geographic (longitude/latitude) coordinates.
ScaleCoords( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry
"); html += wxT ("ScaleCoordinates( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry
return a geometric object obtained by scaling coordinates according to scaleX and scaleY values
"); html += wxT ("if only one scale factor is specified, then an isotropic scaling occurs [i.e. the same scale factor is applied to both axis]"); html += wxT ("otherwise an anisotropic scaling occurs [i.e. each axis is scaled according to its own scale factor]
RotateCoords( geom Geometry , angleInDegrees Double precision ) : Geometry
"); html += wxT ("RotateCoordinates( geom Geometry , angleInDegrees Double precision ) : Geometry
return a geometric object obtained by rotating coordinates according to angleInDegrees value
"); html += wxT("Positive angle = clockwise rotation
ReflectCoords( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry
"); html += wxT ("ReflectCoordinates( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry
return a geometric object obtained by reflecting coordinates according to xAxis and yAxis switches
"); html += wxT ("i.e. if xAxis is 0 (FALSE), then x-coordinates remains untouched; otherwise x-coordinates will be reflected
SwapCoords( geom Geometry ) : Geometry
SwapCoordinates( geom Geometry ) : Geometry
return a geometric object obtained by swapping x- and y-coordinates
functions for Spatial-MetaData and Spatial-Index handling"); html += wxT("
back to index
InitSpatialMetaData( void ) : Integer
"); html += wxT("InitSpatialMetaData( transaction Integer ) : Integer
"); html += wxT("InitSpatialMetaData( mode String ) : Integer
"); html += wxT ("InitSpatialMetaData( transaction Integer , mode String ) : Integer
Creates the geometry_columns and spatial_ref_sys metadata tables"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
"); html += wxT ("the first form (no args) will automatically populate spatial_ref_sys inserting any possible ESPG SRID definition
"); html += wxT ("if the arg 'WGS84' (alias 'WGS84_ONLY') is specified, then only WGS84-releated EPSG SRIDs will be inserted
"); html += wxT ("if the arg 'NONE' (alias 'EMPTY') is specified, no EPSG SRID will be inserted at all
InsertEpsgSrid( srid Integer ) : IntegerAttempts to insert into spatial_ref_sys the EPSG definition uniquely identified by srid
"); html += wxT ("[the corresponding EPSG SRID definition will be copied from the inlined dataset defined in libspatialite
"); html += wxT ("the return type is Integer, with a return value of 1 for success or 0 for failure
AddGeometryColumn( table String , column String , srid Integer , geom_type String , dimension String [ , not_null Integer ] ) : IntegerCreates a new geometry column updating the Spatial Metadata tables and creating any required trigger in order to enforce constraints
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
RecoverGeometryColumn( table String , column String , srid Integer , geom_type String , dimension String ) : IntegerValidates an existing ordinary column in order to possibly transform it in a real geometry column, "); html += wxT ("thus updating the Spatial Metadata tables and creating any required trigger in order to enforce constraints
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
DiscardGeometryColumn( table String , column String ) : IntegerRemoves a geometry column from Spatial MetaData tables and drops any related trigger
"); html += wxT ("the column itself still continues to exist untouched as an ordinary, unconstrained column
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
RegisterVirtualGeometry( table String ) : IntegerRegisters a VirtualShape table into Spatial MetaData tables; the VirtualShape table should be already created in some previous step.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
DropVirtualGeometry( table String ) : IntegerRemoves a VirtualShape table from Spatial MetaData tables, dropping the VirtualShape table as well.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
CreateSpatialIndex( table String , column String ) : IntegerBuilds an RTree Spatial Index on a geometry column, "); html += wxT ("creating any required trigger required in order to enforce full data coherency between the main table and Spatial Index
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
DisableSpatialIndex( table String , column String ) : IntegerDisables an RTree Spatial Index, removing any related trigger
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
CheckShadowedRowid( table String ) : IntegerChecks if some table has a physical column named \"rowid\" (caseless) shadowing the real ROWID.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
CheckSpatialIndex( void ) : Integer
"); html += wxT("CheckSpatialIndex( table String , column String ) : Integer
Checks an RTree Spatial Index for validity and consistency
"); html += wxT ("- if no arguments are passed, then any RTree defined into geometry_columns will be checked
"); html += wxT ("- otherwise only the RTree corresponding to table and column will be checked
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
RecoverSpatialIndex( [ no_check Integer ] ) : Integer
"); html += wxT ("RecoverSpatialIndex( table String , column String [ , no_check Integer ] ) : Integer
Recovers a (possibly broken) RTree Spatial Index
"); html += wxT ("- if no arguments are passed, then any RTree defined into geometry_columns will be recovered
"); html += wxT ("- otherwise only the RTree corresponding to table and column will be recovered
"); html += wxT("- the optional argument no_check will be interpreted as follows:
"); html += wxT ("  * if no_check = FALSE (default) the RTree will be checked first: "); html += wxT("and only an invalid RTree will be then actually rebuilt
"); html += wxT ("  * if no_check = TRUE the RTree will be unconditionally rebuilt from scratch anyway
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
InvalidateLayerStatistics( void ) : Integer
"); html += wxT ("InvalidateLayerStatistics( table String [, column String ] ) : Integer
Immediately and unconditionally invalidates the internal Layer Statistics
"); html += wxT ("- if no arguments are passed, then internal statics will be invalidated for any possible Geometry Column "); html += wxT("defined in the current DB
"); html += wxT ("- otherwise statistics will be invalidated only for Geometry Columns corresponding to the given table
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
UpdateLayerStatistics( void ) : Integer
"); html += wxT ("UpdateLayerStatistics( table String [, column String ] ) : Integer
Updates the internal Layer Statistics [Feature Count and Total Extent]
"); html += wxT ("- if no arguments are passed, then internal statics will be updated for any possible Geometry Column "); html += wxT("defined in the current DB
"); html += wxT ("- otherwise statistics will be updated only for Geometry Columns corresponding to the given table
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
GetLayerExtent( table String [ , column String [ , mode Boolean] ] ) : GeometryReturn the Envelope corresponding to the Total Extent of some Layer; "); html += wxT ("if the Table/Layer only contains a single Geometry column passing the column name isn't strictly required.
"); html += wxT ("NULL will be returned if any error occurs or if the required table isn't a Layer.
CreateTopologyTables( SRID Integer , dims String ) : Integer
"); html += wxT ("CreateTopologyTables( prefix String , SRID Integer , dims String ) : Integer
Creates a set of Topology tables.
"); html += wxT ("
  • the SRIDargument is mandatory
  • the dims argument must be 'XY' or 'XYZ': 2 or 3 are valid aliases
  • "); html += wxT ("
  • the optionalargument prefix can be used to support more Topology sets on the same DB: "); html += wxT ("if omitted a \"topo_\" prefix will be assumed by default

"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure).
CreateRasterCoveragesTable( void ) : IntegerCreates the raster_coverages table required by RasterLite-2
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE (failure).
functions for MetaCatalog and related Statistics"); html += wxT("
back to index
CreateMetaCatalogTables( transaction Integer ) : IntegerCreates both splite_metacatalog and splite_metacatalog_statistics tables; "); html += wxT ("splite_metacatalog will be populated so to describe every table/column currently defined within the DB.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE
UpdateMetaCatalogTables( transaction Integer , table_name String, column_name String ) : Integer"); html += wxT ("UpdateMetaCatalogTables( transaction Integer , master_table String , table_name String, column_name String ) : IntegerUpdates the splite_metacatalog_statistics table by computing the statistic summary for the required table/column.
"); html += wxT ("the second form (four args) will use a MasterTable in order to identify all table/columns to be updated.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE
functions supporting SLD/SE Styled Layers"); html += wxT("
back to index
CreateStylingTables( ) : Integer
"); html += wxT("CreateStylingTables( relaxed Integer ) : Integer
Creates a set of tables supporting SLD/SE Styled Layers.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.
RegisterExternalGraphic( xlink_href String , resource BLOB ) : Integer
"); html += wxT ("RagisterExternalGraphic( xlink_href String , resource BLOB , title String , abstract String , file_name String ) : Integer
Inserts (or updates) an External Graphic Resource.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.
RegisterVectorStyledLayer( f_table_name String , f_geometry_column String , style BLOB ) : Integer
"); html += wxT ("RegisterVectorStyledLayer( f_table_name String , f_geometry_column String , style_id Integer , style BLOB ) : Integer
Inserts (or updates) a Vector Styled Layer definition.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.
RegisterRasterStyledLayer( coverage_name String , style BLOB ) : Integer
"); html += wxT ("RegisterRasterStyledLayer( coverage_name String , style_id Integer , style BLOB ) : Integer
Inserts (or updates) a Raster Styled Layer definition.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.
RegisterStyledGroup( group_name String , f_table_name String , f_geometry_colum String [ , paint_order Integer ] ) : Integer
"); html += wxT ("RegisterStyledGroup( group_name String, coverage_name String [ , paint_order Integer ] ) : Integer
Inserts (or updates) a Styled Group definition.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.
SetStyledGroupInfos( group_name String , title String , abstract String ) : IntegerInserts (or updates) the descriptive infos associated to a Styled Group
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.
RegisterGroupStyle( group_name String , style BLOB ) : Integer
"); html += wxT ("RegisterGroupStyle( group_name String , style_id Integer , style BLOB ) : Integer
Inserts (or updates) a Group Style definition.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.
functions implementing ISO Metadata"); html += wxT("
back to index
CreateIsoMetadataTables( ) : Integer
"); html += wxT("CreateIsoMetadataTables( relaxed Integer ) : Integer
Creates a set of tables supporting ISO Metadata.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.
RegisterIsoMetadata( scope String , metadata BLOB ) : Integer
"); html += wxT ("RegisterIsoMetadata( scope String , metadata BLOB , id Integer ) : Integer
"); html += wxT ("RagisterIsoMetadata( scope String , metadata BLOB , fileIdentifier String ) : Integer
Inserts (or updates) an ISO Metadata definition.
"); html += wxT ("The first form (two arguments only) always performs an INSERT; if one the optional arguments \"id\" or \"fileIdentifier\" an UPDATE could be eventually performed if a corresponding metadata row is already defined.
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE (success) or 0 for FALSE "); html += wxT("(failure): -1 will be returned on invalid arguments.
GetIsoMetadataId( fileIdentifier String ) : IntegerReturn the unique \"id\" corresponding to the ISO Metadata definition identified by fileIdentifier.
"); html += wxT ("If no corresponding ISO Metadata definition exists, this function will always return ZERO; -1 will be returned for invalid arguments.
functions implementing FDO/OGR compatibily"); html += wxT("
back to index
CheckSpatialMetaData( void ) : IntegerChecks the Spatial Metadata type, then returning:
"); html += wxT ("0 if the geometry_columns and spatial_ref_sys table does not exist, "); html += wxT ("or if their actual layout doesn't corresponds to any known implementation
"); html += wxT ("1 if both tables exist, and their layout is the one used by SpatiaLite legacy (older versions including 3.0.1)
"); html += wxT ("2 if both tables exist, and their layout is the one used by FDO/OGR
"); html += wxT ("3 if both tables exist, and their layout is the one currently used by SpatiaLite (3.1.0 or any subsequent version)
AutoFDOStart( void ) : IntegerThis function will inspect the Spatial Metadata, then automatically creating/refreshing a VirtualFDO"); html += wxT (" wrapper for each FDO/OGR geometry table
the return type is Integer [how many VirtualFDO tables have been created]
AutoFDOStop( void ) : IntegerThis function will inspect the Spatial Metadata, then automatically destroying any VirtualFDO"); html += wxT (" wrapper found
the return type is Integer [how many VirtualFDO tables have been destroyed]
InitFDOSpatialMetaData( void ) : IntegerCreates the geometry_columns and spatial_ref_sys metadata tables"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
"); html += wxT ("Please note: Spatial Metadata created using this function will have the FDO/OGR layout, and not the SpatiaLite's own
AddFDOGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer , geometry_type String ) : IntegerCreates a new geometry column updating the FDO/OGR Spatial Metadata tables
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
RecoverFDOGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer , geometry_type String ) : IntegerValidates an existing ordinary column in order to possibly transform it in a real geometry column, "); html += wxT("thus updating the FDO/OGR Spatial Metadata tables
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
DiscardFDOGeometryColumn( table String , column String ) : IntegerRemoves a geometry column from FDO/OGR Spatial MetaData tables
"); html += wxT ("the column itself still continues to exist untouched as an ordinary column
"); html += wxT ("the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
functions for MbrCache-based queries"); html += wxT("
back to index
FilterMbrWithin( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : IntegerRetrieves from an MbrCache any entity whose MBR falls within"); html += wxT (" the rectangle identified by extreme points x1 y1 and x2 y2
FilterMbrContains( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : IntegerRetrieves from an MbrCache any entity whose MBR contains"); html += wxT (" the rectangle identified by extreme points x1 y1 and x2 y2
FilterMbrIntersects( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : IntegerRetrieves from an MbrCache any entity whose MBR intersects"); html += wxT (" the rectangle identified by extreme points x1 y1 and x2 y2
functions for R*Tree-based queries (Geometry Callbacks)"); html += wxT("
back to index
RTreeWithin( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer*DEPRECATED* (alias-name for RTreeIntersects)
RTreeContains( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : Integer*DEPRECATED* (alias-name for RTreeIntersects)
RTreeIntersects( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) : IntegerRetrieves from an R*Tree any entity whose MBR intersects"); html += wxT (" the rectangle identified by extreme points x1 y1 and x2 y2
RTreeDistWithin( x Double precision , y Double precision , radius Double precision ) : IntegerRetrieves from an R*Tree any entity whose MBR intersects"); html += wxT (" the square square circumscribed on the given circle (x y center, radius)
SQL functions supporting XmlBLOB"); html += wxT("
back to index
XB_Create( xmlPayload BLOB ) : XmlBLOB
"); html += wxT("XB_Create( xmlPayload BLOB , compressed Boolean ) : XmlBLOB
"); html += wxT ("XB_Create( xmlPayload BLOB , compressed Boolean , schemaURI Text ) : XmlBLOB
"); html += wxT ("XB_Create( xmlPayload BLOB , compressed Boolean , internalSchemaURI Boolean ) : XmlBLOB
Construct an XmlBLOB object starting from an XmlDocument.
"); html += wxT ("NULL will be returned for not well-formed XmlDocuments, or when XML validation is required but XmlDocument fails to pass validation for any reason.
XB_GetPayload( xmlObject BLOB [ , indent Integer ] ) : StringExtracts a generic BLOB from an XmlBLOB object, exactly corresponding to the original XmlDocument and fully preserving the original character encoding.
XB_GetDocument( xmlObject BLOB [ , indent Integer ] ) : StringExtracts an XmlDocument from an XmlBLOB object; the returned XmlDocument will always be UTF-8 encoded (TEXT), irrespectively from the original internal encoding declaration.
XB_SchemaValidate( xmlObject BLOB , schemaURI Text [ , compressed Boolean ] ) : XmlBLOB
"); html += wxT ("XB_SchemaValidate( xmlObject BLOB , internalSchemaURI Boolean [ , compressed Boolean ] ) : XmlBLOB
Construct an XML validated XmlBLOB object starting from an XmlDocument.
"); html += wxT ("NULL will be returned if the input XmlBLOB fails to pass validation for any reason.
XB_Compress( xmlObject BLOB ) : XmlBLOBA new compressed XmlBLOB object will be returned.
XB_Uncompress( xmlObject BLOB ) : XmlBLOBA new uncompressed XmlBLOB object will be returned.
XB_IsValid( xmlObject BLOB ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
XB_IsCompressed( xmlObject BLOB ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
XB_IsSchemaValidated( xmlObject BLOB ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
XB_IsIsoMetadata( xmlObject BLOB ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
XB_IsSldSeVectorStyle( xmlObject BLOB ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
XB_IsSldSeRasterStyle( xmlObject BLOB ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
XB_IsSvg( xmlObject BLOB ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
XB_GetDocumentSize( xmlObject BLOB ) : IntegerWill return the size in bytes of the corresponding uncompressed XmlDocument.
XB_GetEncoding( xmlObject BLOB ) : StringWill return the character encoding internally declared by the XmlDocument corresponding to the input XmlBLOB.
XB_GetSchemaURI( xmlObject BLOB ) : StringWill return the Schema URI effectively used to validate an XmlBLOB.
XB_GetInternalSchemaURI( xmlPayload BLOB ) : StringWill return the Schema URI internally declared by the input XmlDocument.
XB_GetFileId( xmlObject BLOB ) : StringWill return the FileId defined within the XmlBLOB (if any).
XB_SetFileId( xmlObject BLOB , fileId String ) : XmlBLOBWill return a new XmlBLOB by replacing the FileIdentifier value.
XB_AddFileId( xmlObject BLOB , fileId String , IdNameSpacePrefix String , IdNameSpaceURI String , CsNameSpacePrefix String , CsNameSpaceURI String ) : XmlBLOBWill return a new XmlBLOB by inserting a FileIdentifier value.
XB_GetParentId( xmlObject BLOB ) : StringWill return the ParentId defined within the XmlBLOB (if any).
XB_SetParentId( xmlObject BLOB , parentId String ) : XmlBLOBWill return a new XmlBLOB by replacing the ParentIdentifier value.
XB_AddParentId( xmlObject BLOB , parentId String , IdNameSpacePrefix String , IdNameSpaceURI String , CsNameSpacePrefix String , CsNameSpaceURI String ) : XmlBLOBWill return a new XmlBLOB by inserting a ParentIdentifier value.
XB_GetTitle( xmlObject BLOB ) : StringWill return the Title defined within the XmlBLOB (if any).
XB_GetAbstract( xmlObject BLOB ) : StringWill return the Abstract defined within the XmlBLOB (if any).
XB_GetGeometry( xmlObject BLOB ) : GeometryWill return the Geometry defined within the XmlBLOB (if any).
XB_GetLastParseError( void ) : StringWill return the most recent XML parsing error (if any).
XB_GetLastValidateError( void ) : StringWill return the most recent XML validating error (if any).
XB_IsValidXPathExpression( expr Text ) : IntegerThe return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, "); html += wxT ("and -1 for UNKNOWN corresponding to a function invocation on NULL arguments.
XB_GetLastXPathError( void ) : StringWill return the most recent XPath error (if any).
XB_CacheFlush( void ) : BooleanReset the internal XML Schema cache to its initial empty state.
XB_CacheFlush( void ) : BooleanReset the internal XML Schema cache to its initial empty state.
XB_LoadXML( filepath-or-URL String ) : BLOBIf \"filepath-or-URL\" corresponds to some valid local pathname, and the corresponding file (expected to contain a well-formed XML Document) "); html += wxT ("can be actually accessed in read mode, then the whole file content will be returned as a BLOB value.
"); html += wxT ("This function is even able to acces a remote XML Document identified by an URL.
Otherwise NULL will be returned.
"); html += wxT ("Please note: SQLite doesn't support BLOB values bigger than SQLITE_MAX_LENGTH (usually, 1 GB).
"); html += wxT ("Please note well: this SQL function open the doors to many potential security issues, and thus is always disabled by default.
"); html += wxT ("Explicitly setting the environment variable \"SPATIALITE_SECURITY=relaxed\" is absolutely required in order to effectively enable this function.
"); html += wxT("Please see: CountUnsafeTriggers().
XB_StoreXML( XmlObject XmlBLOB , filepath String ) : Integer
"); html += wxT ("XB_StoreXML( XmlObject XmlBLOB , filepath String , indent Integer ) : Integer
If \"XmlObject\" is of the XmlBLOB-type, and if \"filepath\" corresponds to some valid pathname "); html += wxT ("(accessible in write/create mode), then the corresponding file will be created/overwritten so to "); html += wxT ("contain the corresponding XML Document (fully preserving the original character encoding).
"); html += wxT ("If the optional argument \"indent\" is set to some positive value then the returned XmlDocument will be nicely formatted and properly indented by the required factor; "); html += wxT ("ZERO will cause the whole XmlDocument to be returned as a single line. (default setting is negative indenting, i.e. not reformatting at all).
"); html += wxT ("The return type is Integer, with a return value of 1 for success, 0 for failure and -1 for invalid arguments.
"); html += wxT ("Please note well: this SQL function open the doors to many potential security issues, and thus is always disabled by default.
"); html += wxT ("Explicitly setting the environment variable \"SPATIALITE_SECURITY=relaxed\" is absolutely required in order to effectively enable this function.
"); html += wxT("Please see: CountUnsafeTriggers().
"); html += wxT("back to index"); html += wxT(""); html += wxT(""); } spatialite_gui-2.0.0-devel/Makefile-static-MacOsX0000664000175000017500000000532212543275035016621 00000000000000# SandroFurieri (c) 2008 # Makefile ( wxwidgets MacOsX) for spatialite-GUI SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ Dialogs.cpp Shapefiles.cpp Network.cpp Exif.cpp TextCsv.cpp \ Objects.cpp QueryViewComposer.cpp MalformedGeoms.cpp DialogsGraph.cpp OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o Dialogs.o \ Shapefiles.o Network.o Exif.o TextCsv.o Objects.o QueryViewComposer.o \ MalformedGeoms.o DialogsGraph.o EXE = ./static_bin/spatialite_gui INCLUDE = Classdef.h # Define default flags: CXXFLAGS = $(shell wx-config --cxxflags) -DSPATIALITE_AMALGAMATION LIB = $(shell wx-config --libs) EXTRAFLAGS = -Wall -Wextra -Wno-ctor-dtor-privacy \ -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILE=1 \ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 EXTRALIBS = /usr/local/lib/libspatialite.a /opt/local/lib/libgeos_c.a \ /opt/local/lib/libgeos.a /opt/local/lib/libproj.a \ /opt/local/lib/libgeotiff.a \ /opt/local/lib/libsqlite3.a /opt/local/lib/libcairo.a \ /opt/local/lib/libpixman-1.a /opt/local/lib/libfontconfig.a \ /opt/local/lib/libfreetype.a /opt/local/lib/libexpat.a \ /opt/local/lib/libtiff.a /opt/local/lib/libpng.a \ /opt/local/lib/libz.a /opt/local/lib/libjpeg.a \ /usr/local/lib/libfreexl.a \ /opt/local/lib/libcharset.a /opt/local/lib/libiconv.a all: $(EXE) $(EXE): $(OBJ) $(EXTRALIBS) $(CXX) $(OBJ) -o $(EXE) $(LIB) $(EXTRALIBS) $(EXTRALIB2) strip $(EXE) clean : $(RM) $(OBJ) $(EXE) Main.o: Main.cpp $(INCLUDE) $(CXX) -c Main.cpp $(CXXFLAGS) $(EXTRAFLAGS) TableTree.o: TableTree.cpp $(INCLUDE) $(CXX) -c TableTree.cpp $(CXXFLAGS) $(EXTRAFLAGS) QueryView.o: QueryView.cpp $(INCLUDE) $(CXX) -c QueryView.cpp $(CXXFLAGS) $(EXTRAFLAGS) ResultSetView.o: ResultSetView.cpp $(INCLUDE) $(CXX) -c ResultSetView.cpp $(CXXFLAGS) $(EXTRAFLAGS) BlobExplorer.o: BlobExplorer.cpp $(INCLUDE) $(CXX) -c BlobExplorer.cpp $(CXXFLAGS) $(EXTRAFLAGS) Dialogs.o: Dialogs.cpp $(INCLUDE) $(CXX) -c Dialogs.cpp $(CXXFLAGS) $(EXTRAFLAGS) DialogsGraph.o: DialogsGraph.cpp $(INCLUDE) $(CXX) -c DialogsGraph.cpp $(CXXFLAGS) $(EXTRAFLAGS) Shapefiles.o: Shapefiles.cpp $(INCLUDE) $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) Network.o: Network.cpp $(INCLUDE) $(CXX) -c Network.cpp $(CXXFLAGS) $(EXTRAFLAGS) Exif.o: Exif.cpp $(INCLUDE) $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) TextCsv.o: TextCsv.cpp $(INCLUDE) $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) Objects.o: Objects.cpp $(INCLUDE) $(CXX) -c Objects.cpp $(CXXFLAGS) $(EXTRAFLAGS) QueryViewComposer.o: QueryViewComposer.cpp $(INCLUDE) $(CXX) -c QueryViewComposer.cpp $(CXXFLAGS) $(EXTRAFLAGS) MalformedGeoms.o: MalformedGeoms.cpp $(INCLUDE) $(CXX) -c MalformedGeoms.cpp $(CXXFLAGS) $(EXTRAFLAGS) spatialite_gui-2.0.0-devel/ResultSetView.cpp0000664000175000017500000026525712544026240016045 00000000000000/* / ResultSetView.cpp / a panel to show SQL query results / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/clipbrd.h" #include "wx/filename.h" #ifdef _WIN32 #include #include #include #else #include #include #endif // // ICONs in XPM format [universally portable] // #include "icons/rs_first.xpm" #include "icons/rs_last.xpm" #include "icons/rs_next.xpm" #include "icons/rs_previous.xpm" #include "icons/refresh.xpm" #if defined(_WIN32) || defined (__MINGW32__) #define FORMAT_64 "%I64d" #else #define FORMAT_64 "%lld" #endif MyResultSetView::MyResultSetView(MyFrame * parent, wxWindowID id): wxPanel(parent, id, wxDefaultPosition, wxSize(440, 480), wxBORDER_SUNKEN) { // // constructor: a frame for SQL Result Sets // RsBlock = 500; // the ResultSet block size RowIds = new sqlite3_int64[RsBlock]; ReadOnly = true; CoverageTiles = false; InsertRow = NULL; MainFrame = parent; BtnRsFirst = new wxBitmapButton(this, ID_RS_FIRST, wxBitmap(rs_first_xpm), wxPoint(5, 400), wxSize(32, 32)); BtnRsFirst->SetToolTip(wxT("ResultSet: go to first row")); BtnRsPrevious = new wxBitmapButton(this, ID_RS_PREVIOUS, wxBitmap(rs_previous_xpm), wxPoint(55, 400), wxSize(32, 32)); BtnRsPrevious->SetToolTip(wxT("ResultSet: go to previous block")); BtnRefresh = new wxBitmapButton(this, ID_REFRESH, wxBitmap(refresh_xpm), wxPoint(55, 400), wxSize(32, 32)); BtnRefresh->SetToolTip(wxT("ResultSet: refresh")); BtnRsNext = new wxBitmapButton(this, ID_RS_NEXT, wxBitmap(rs_next_xpm), wxPoint(105, 400), wxSize(32, 32)); BtnRsNext->SetToolTip(wxT("ResultSet: go to next block")); BtnRsLast = new wxBitmapButton(this, ID_RS_LAST, wxBitmap(rs_last_xpm), wxPoint(155, 400), wxSize(32, 32)); BtnRsLast->SetToolTip(wxT("ResultSet: go to last row")); RsCurrentBlock = new wxStaticText(this, ID_RS_BLOCK, wxT(""), wxPoint(210, 400), wxSize(200, 18)); TableView = NULL; TableBlobs = NULL; TableValues = NULL; CurrentBlob = NULL; // setting up event handlers Connect(ID_RS_FIRST, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyResultSetView::OnRsFirst); Connect(ID_RS_PREVIOUS, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyResultSetView::OnRsPrevious); Connect(ID_RS_NEXT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyResultSetView::OnRsNext); Connect(ID_RS_LAST, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyResultSetView::OnRsLast); Connect(ID_REFRESH, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyResultSetView::OnRefresh); Connect(ID_RS_THREAD_FINISHED, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyResultSetView::OnThreadFinished); Connect(ID_RS_STATS_UPDATE, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyResultSetView::OnStatsUpdate); Connect(wxID_ANY, wxEVT_SIZE, (wxObjectEventFunction) & MyResultSetView::OnSize); Connect(wxID_ANY, wxEVT_GRID_SELECT_CELL, (wxObjectEventFunction) & MyResultSetView::OnCellSelected); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & MyResultSetView::OnRightClick); Connect(wxID_ANY, wxEVT_GRID_CELL_CHANGE, (wxObjectEventFunction) & MyResultSetView::OnCellChanged); Connect(Grid_Delete, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdDelete); Connect(Grid_TilePreview, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdTilePreview); Connect(Grid_Insert, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdInsert); Connect(Grid_Abort, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdAbort); Connect(Grid_Clear, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdClearSelection); Connect(Grid_All, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdSelectAll); Connect(Grid_Row, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdSelectRow); Connect(Grid_Column, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdSelectColumn); Connect(Grid_Copy, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdCopy); Connect(Grid_Blob, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdBlob); Connect(Grid_BlobIn, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdBlobIn); Connect(Grid_BlobOut, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdBlobOut); Connect(Grid_BlobNull, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdBlobNull); Connect(Grid_XmlBlobIn, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdXmlBlobIn); Connect(Grid_XmlBlobOut, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdXmlBlobOut); Connect(Grid_XmlBlobOutIndented, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdXmlBlobOutIndented); Connect(Grid_ExpTxtTab, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdExpTxtTab); Connect(Grid_ExpCsv, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdExpCsv); Connect(Grid_ExpHtml, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdExpHtml); Connect(Grid_ExpShp, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdExpShp); Connect(Grid_ExpDif, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdExpDif); Connect(Grid_ExpSylk, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdExpSylk); Connect(Grid_ExpDbf, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyResultSetView::OnCmdExpDbf); } MyResultSetView::~MyResultSetView() { // destructor if (RowIds) delete[]RowIds; if (InsertRow) delete InsertRow; if (TableBlobs) delete TableBlobs; if (TableValues) delete TableValues; } void MyResultSetView::ShowControls() { // // making all ResultSet controls to be visible // BtnRsFirst->Show(true); BtnRsPrevious->Show(true); BtnRsNext->Show(true); BtnRsLast->Show(true); BtnRefresh->Show(true); } void MyResultSetView::HideControls() { // // making all controls to be invisible // BtnRsFirst->Show(false); BtnRsPrevious->Show(false); BtnRsNext->Show(false); BtnRsLast->Show(false); BtnRefresh->Show(false); } void MyResultSetView::EditTable(wxString & sql, int *primaryKeys, int *blobCols, wxString & table) { // // starting the edit table sequence // int i; for (i = 0; i < 1024; i++) { PrimaryKeys[i] = *(primaryKeys + i); BlobColumns[i] = *(blobCols + i); } ReadOnly = false; TableName = table; MainFrame->GetQueryView()->GetSqlCtrl()->SetValue(sql); if (ExecuteSqlPre(sql, 0, ReadOnly, false, TileDataTable, true) == false) wxMessageBox(SqlErrorMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } void MyResultSetView::FormatElapsedTime(double seconds, char *elapsed, bool simple) { /* well formatting elapsed time */ int int_time = (int) seconds; int millis = (int) ((seconds - (double) int_time) * 1000.0); int secs = int_time % 60; int_time /= 60; int mins = int_time % 60; int_time /= 60; int hh = int_time; if (simple == true) { if (hh == 0 && mins == 0) sprintf(elapsed, "%d.%03d", secs, millis); else if (hh == 0) sprintf(elapsed, "%d:%02d.%03d", mins, secs, millis); else sprintf(elapsed, "%d:%02d:%02d.%03d", hh, mins, secs, millis); } else sprintf(elapsed, "%02d:%02d:%02d.%03d", hh, mins, secs, millis); } void SqlThreadParams::Reset(void) { // // thread params: resetting to empty state // Mother = NULL; Sql = wxT(""); Stmt = NULL; FromRow = 0; EndRow = 0; MaxRow = 0; List.Reset(); Sqlite = NULL; Start = 0; LastGuiUpdate = 0; Error = false; FetchedRows = 0; StatFullscanStep = 0; StatSort = 0; StatAutoindex = 0; ElapsedTime = 0.0; AbortRequested = false; Valid = false; } void SqlThreadParams::Initialize(MyResultSetView * mother, wxString & sql, sqlite3_stmt * stmt, int from, sqlite3 * sqlite, clock_t start) { // // thread params: initializing // Reset(); Mother = mother; Sql = sql; Stmt = stmt; FromRow = from; EndRow = 0; MaxRow = 0; Sqlite = sqlite; Start = start; LastGuiUpdate = start; Error = false; FetchedRows = 0; StatFullscanStep = 0; StatSort = 0; StatAutoindex = 0; ElapsedTime = 0.0; AbortRequested = false; Valid = true; } void SqlThreadParams::UpdateStats(int fullscan, int sort, int autoindex, clock_t now) { // // updading Stats (SQL query progress handler callback) // StatFullscanStep = fullscan; StatSort = sort; StatAutoindex = autoindex; ElapsedTime = (double) (now - Start) / (double) CLOCKS_PER_SEC; } bool SqlThreadParams::GuiHasToBeUpdated(clock_t now, int millisecs) { // // checking if a GUI update is required (Stats) // double interval = (double) (now - LastGuiUpdate) / (double) CLOCKS_PER_SEC; if (interval >= ((double) millisecs / 1000.0)) return true; return false; } int SqlProgressCallback(void *arg) { // // SQL query progress handler callback function // int fullscan; int sort; int autoindex; clock_t clock_end; wxString currentBlock; SqlThreadParams *params = (SqlThreadParams *) arg; if (params->IsValid() == false) return 0; if (params->IsAbortRequested() == true) { // aborting the SQL query sqlite3_interrupt(params->GetSqlite()); return 0; } // updating query stats if (params->GetStmt() != NULL) { fullscan = sqlite3_stmt_status(params->GetStmt(), SQLITE_STMTSTATUS_FULLSCAN_STEP, 0); sort = sqlite3_stmt_status(params->GetStmt(), SQLITE_STMTSTATUS_SORT, 0); #ifdef OMIT_SQLITE_STMTSTATUS_AUTOINXED autoindex = -1; #else autoindex = sqlite3_stmt_status(params->GetStmt(), SQLITE_STMTSTATUS_AUTOINDEX, 0); #endif } clock_end = clock(); params->UpdateStats(fullscan, sort, autoindex, clock_end); if (params->GuiHasToBeUpdated(clock_end, 500) == true) { // requesting a GUI update wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_RS_STATS_UPDATE); params->GetMother()->GetEventHandler()->AddPendingEvent(event); params->SetLastGuiUpdate(clock_end); } return 0; } #ifdef _WIN32 DWORD WINAPI DoExecuteSqlThread(void *arg) #else void *DoExecuteSqlThread(void *arg) #endif { // // threaded function: processing an SQL query // int ret; int i_col; int i_row = 0; int end_row = 0; int columns; char err_msg[2048]; // setting up the sqlite's progress handler callback SqlThreadParams *params = (SqlThreadParams *) arg; sqlite3_progress_handler(params->GetSqlite(), 1000, SqlProgressCallback, arg); while (1) { // // fetching the result set rows // if (params->IsValid() == false) goto error; ret = sqlite3_step(params->GetStmt()); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // if (params->IsAbortRequested() == true) { // aborting the SQL query sqlite3_interrupt(params->GetSqlite()); continue; } params->FetchedRow(); if ((params->GetFetchedRows() % 1000) == 0) SqlProgressCallback(params); if (i_row < params->GetFromRow()) { i_row++; continue; } if ((i_row - params->GetFromRow()) >= params->GetMother()->GetRsBlock()) break; end_row = i_row; columns = sqlite3_column_count(params->GetStmt()); MyRowVariant *rowVariant = params->GetList()->Add(columns); for (i_col = 0; i_col < columns; i_col++) { sqlite3_int64 int_value; double dbl_value; const unsigned char *txt_value; const void *blob_value; int blobSize; params->GetList()->SetColumnName(i_col, sqlite3_column_name (params->GetStmt(), i_col)); switch (sqlite3_column_type(params->GetStmt(), i_col)) { case SQLITE_INTEGER: int_value = sqlite3_column_int64(params->GetStmt(), i_col); rowVariant->Set(i_col, int_value); break; case SQLITE_FLOAT: dbl_value = sqlite3_column_double(params->GetStmt(), i_col); rowVariant->Set(i_col, dbl_value); break; case SQLITE_TEXT: txt_value = sqlite3_column_text(params->GetStmt(), i_col); rowVariant->Set(i_col, txt_value); break; case SQLITE_BLOB: blob_value = sqlite3_column_blob(params->GetStmt(), i_col); blobSize = sqlite3_column_bytes(params->GetStmt(), i_col); rowVariant->Set(i_col, blob_value, blobSize); break; case SQLITE_NULL: default: break; }; } i_row++; } else { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(params->GetSqlite())); sqlite3_finalize(params->GetStmt()); wxString msg = wxString::FromUTF8(err_msg); params->GetMother()->SetSqlErrorMsg(msg); goto error; } } params->Finalize(); params->SetEndRow(end_row); params->SetMaxRow(i_row); goto ok; error: params->SetError(); ok: wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_RS_THREAD_FINISHED); params->GetMother()->GetEventHandler()->AddPendingEvent(event); #ifdef _WIN32 return 0; #else pthread_exit(NULL); #endif } void MyResultSetView::AbortRequested() { // // attempting to abort the current SQL query // if (ThreadParams.IsValid() == true) ThreadParams.Abort(); } const char *MyResultSetView::CleanSqlTail(const char *dirty) { // strips any leading white-space const char *p = dirty; while (p != '\0') { if (*p == ' ') { p++; continue; } if (*p == '\t') { p++; continue; } if (*p == '\n') { p++; continue; } if (*p == '\r') { p++; continue; } break; } return p; } void MyResultSetView::UpdateMaxRow(wxString & sql) { // // updating the max row value // char *xSql = NULL; char err_msg[2048]; sqlite3 *sqlite = MainFrame->GetSqlite(); sqlite3_stmt *stmt; int i_row = 0; int ret; if (IsMaxAlreadySet) return; xSql = new char[(sql.Len() * 4) + 1]; strcpy(xSql, sql.ToUTF8()); const char *pSql = xSql; ::wxBeginBusyCursor(); while (1) { const char *sql_tail; ret = sqlite3_prepare_v2(sqlite, pSql, strlen(pSql), &stmt, &sql_tail); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(sqlite)); SqlErrorMsg = wxString::FromUTF8(err_msg); ::wxEndBusyCursor(); return; } pSql = CleanSqlTail(sql_tail); if (strlen(pSql) == 0) { // this is the latest SQL statement in a (possibly) multiple // request; enabling GUI processing of the resultset break; } // silently consuming an intermediate SQL statement ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(sqlite)); SqlErrorMsg = wxString::FromUTF8(err_msg); ::wxEndBusyCursor(); sqlite3_finalize(stmt); return; } sqlite3_finalize(stmt); } delete[]xSql; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) i_row++; } sqlite3_finalize(stmt); RsMaxRow = i_row; ::wxEndBusyCursor(); IsMaxAlreadySet = true; } bool MyResultSetView::ExecuteSqlPre(wxString & sql, int from, bool read_only, bool coverage_tile_data, wxString & tile_data_table, bool reset) { // // executing some SQL statement // ReadOnly = read_only; CoverageTiles = false; if (coverage_tile_data == true) { ReadOnly = true; CoverageTiles = true; TileDataTable = tile_data_table; } char *xSql = NULL; char err_msg[2048]; int i_row; clock_t clock_start; sqlite3_stmt *stmt; sqlite3 *sqlite = MainFrame->GetSqlite(); SqlErrorMsg = wxT(""); if (TableView) TableView->Destroy(); TableView = NULL; if (TableBlobs) delete TableBlobs; if (TableValues) delete TableValues; TableBlobs = NULL; TableValues = NULL; CurrentBlob = NULL; HideControls(); RsBeginRow = 0; RsEndRow = 0; if (reset == true) { RsMaxRow = 0; IsMaxAlreadySet = false; } #ifdef _WIN32 HANDLE thread_handle; DWORD dwThreadId; #else pthread_t thread_id; #endif for (i_row = 0; i_row < RsBlock; i_row++) RowIds[i_row] = -1; i_row = 0; xSql = new char[(sql.Len() * 4) + 1]; strcpy(xSql, sql.ToUTF8()); const char *pSql = xSql; clock_start = clock(); ::wxBeginBusyCursor(); while (1) { const char *sql_tail; int ret = sqlite3_prepare_v2(sqlite, pSql, strlen(pSql), &stmt, &sql_tail); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(sqlite)); SqlErrorMsg = wxString::FromUTF8(err_msg); ::wxEndBusyCursor(); delete[]xSql; return false; } pSql = CleanSqlTail(sql_tail); if (strlen(pSql) == 0) { // this is the latest SQL statement in a (possibly) multiple // request; enabling GUI processing of the resultset break; } // silently consuming an intermediate SQL statement ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(sqlite)); SqlErrorMsg = wxString::FromUTF8(err_msg); ::wxEndBusyCursor(); sqlite3_finalize(stmt); delete[]xSql; return false; } sqlite3_finalize(stmt); } delete[]xSql; CreateStatsGrid(); MainFrame->DisableAllTools(); ThreadParams.Initialize(this, sql, stmt, from, sqlite, clock_start); #ifdef _WIN32 thread_handle = CreateThread(NULL, 0, DoExecuteSqlThread, &ThreadParams, 0, &dwThreadId); SetThreadPriority(thread_handle, THREAD_PRIORITY_IDLE); #else int ok_prior = 0; int policy; int min_prio; pthread_attr_t attr; struct sched_param sp; pthread_attr_init(&attr); if (pthread_attr_setschedpolicy(&attr, SCHED_RR) == 0) { // attempting to set the lowest priority if (pthread_attr_getschedpolicy(&attr, &policy) == 0) { min_prio = sched_get_priority_min(policy); sp.sched_priority = min_prio; if (pthread_attr_setschedparam(&attr, &sp) == 0) { // ok, setting the lowest priority ok_prior = 1; pthread_create(&thread_id, &attr, DoExecuteSqlThread, &ThreadParams); } } } if (!ok_prior) { // failure: using standard priority pthread_create(&thread_id, NULL, DoExecuteSqlThread, &ThreadParams); } #endif MainFrame->GetQueryView()->EnableAbortButton(); return true; } bool MyResultSetView::ExecuteSqlPost() { char dummy[1024]; int i_col; int i_row; double seconds; clock_t clock_end; char elapsed[64]; MyRowVariant *row; MyVariant *value; wxString blobType; int type; wxString cellValue; wxString currentBlock; MyVariantList *list; int decimal_precision = MainFrame->GetDecimalPrecision(); MainFrame->GetQueryView()->DisableAbortButton(); if (TableView) TableView->Destroy(); TableView = NULL; if (TableBlobs) delete TableBlobs; if (TableValues) delete TableValues; TableBlobs = NULL; TableValues = NULL; CurrentBlob = NULL; if (ThreadParams.IsValid() == false) { if (SqlErrorMsg.Len() > 0) { wxMessageBox(SqlErrorMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); ::wxEndBusyCursor(); ThreadParams.Reset(); return true; } goto error; } if (ThreadParams.IsError() == true) { if (SqlErrorMsg.Len() > 0) { wxMessageBox(SqlErrorMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); ::wxEndBusyCursor(); ThreadParams.Reset(); return true; } goto error; } list = ThreadParams.GetList(); clock_end = clock(); seconds = (double) (clock_end - ThreadParams.GetStart()) / (double) CLOCKS_PER_SEC; RsBeginRow = ThreadParams.GetFromRow(); RsEndRow = ThreadParams.GetEndRow(); if (ThreadParams.GetMaxRow() > RsMaxRow) RsMaxRow = ThreadParams.GetMaxRow(); if (list->GetRows() == 0) { // // this one is an EMPTY Result Set // if (ReadOnly == false) { // preparing the insert row int numCols = 0; wxString *colNames = MainFrame->GetColumnNames(TableName, &numCols); CreateGrid(0, numCols + 1); TableView->SetColLabelValue(0, wxT("ROWID")); for (i_col = 0; i_col < numCols; i_col++) TableView->SetColLabelValue(i_col + 1, *(colNames + i_col)); TableView->EnableEditing(true); delete[]colNames; } else { // simply showing a warning message CreateGrid(1, 1); TableView->SetColLabelValue(0, wxT("Message")); TableView->SetRowLabelValue(0, wxT("Message")); TableView->SetCellValue(0, 0, wxT ("SQL query returned an empty ResultSet\n\nThis is not an error")); } } else { // // preparing the Grid to show the result set // CreateGrid(list->GetRows(), list->GetColumns()); if (ReadOnly == true) TableView->EnableEditing(false); else TableView->EnableEditing(true); for (i_col = 0; i_col < list->GetColumns(); i_col++) TableView->SetColLabelValue(i_col, list->GetColumnName(i_col)); if (ReadOnly == false) TableView->SetColLabelValue(0, wxT("ROWID")); i_row = 0; row = list->GetFirst(); while (row) { sprintf(dummy, "%d", i_row + RsBeginRow + 1); cellValue = wxString::FromUTF8(dummy); TableView->SetRowLabelValue(i_row, cellValue); if (ReadOnly == false) { // storing the ROWID value into the RowIds array value = row->GetColumn(0); if (value->GetType() == MY_INT_VARIANT) RowIds[i_row] = value->GetIntValue(); } for (i_col = 0; i_col < row->GetNumCols(); i_col++) { value = row->GetColumn(i_col); if (value) { switch (value->GetType()) { case MY_INT_VARIANT: sprintf(dummy, FORMAT_64, value->GetIntValue()); cellValue = wxString::FromUTF8(dummy); TableView->SetCellValue(i_row, i_col, cellValue); if (ReadOnly == false) TableValues->SetValue(i_row, i_col, value->GetIntValue()); TableView->SetCellAlignment(i_row, i_col, wxALIGN_RIGHT, wxALIGN_TOP); break; case MY_DBL_VARIANT: if (decimal_precision >= 0) { char fmt[64]; sprintf(fmt, "%%1.%df", decimal_precision); sprintf(dummy, fmt, value->GetDblValue()); } else sprintf(dummy, "%1.6f", value->GetDblValue()); cellValue = wxString::FromUTF8(dummy); TableView->SetCellValue(i_row, i_col, cellValue); if (ReadOnly == false) TableValues->SetValue(i_row, i_col, value->GetDblValue()); TableView->SetCellAlignment(i_row, i_col, wxALIGN_RIGHT, wxALIGN_TOP); break; case MY_TXT_VARIANT: TableView->SetCellValue(i_row, i_col, value->GetTxtValue()); if (ReadOnly == false) TableValues->SetValue(i_row, i_col, value->GetTxtValue()); break; case MY_BLOB_VARIANT: blobType = wxT("UNKNOWN type"); type = gaiaGuessBlobType(value->GetBlob(), value->GetBlobSize()); switch (type) { case GAIA_GEOMETRY_BLOB: blobType = wxT("GEOMETRY"); break; case GAIA_GPB_BLOB: blobType = wxT("GeoPackegeGEOMETRY"); break; case GAIA_XML_BLOB: blobType = wxT("XmlBLOB"); break; case GAIA_JPEG_BLOB: blobType = wxT("JPEG image"); break; case GAIA_EXIF_BLOB: blobType = wxT("JPEG-EXIF image"); break; case GAIA_EXIF_GPS_BLOB: blobType = wxT("JPEG-EXIF-GPS image"); break; case GAIA_PNG_BLOB: blobType = wxT("PNG image"); break; case GAIA_GIF_BLOB: blobType = wxT("GIF image"); break; case GAIA_TIFF_BLOB: blobType = wxT("TIFF image"); break; case GAIA_WEBP_BLOB: blobType = wxT("WEBP image"); break; case GAIA_JP2_BLOB: blobType = wxT("JP2 image (Jpeg2000)"); break; case GAIA_PDF_BLOB: blobType = wxT("PDF document"); break; case GAIA_ZIP_BLOB: blobType = wxT("ZIP archive"); break; default: // testing for an eventual Text Font int ret = rl2_is_valid_encoded_font(value->GetBlob(), value->GetBlobSize()); if (ret == RL2_OK) blobType = wxT("TrueType Font"); break; }; if (type == GAIA_XML_BLOB) { #ifdef ENABLE_LIBXML2 /* only if LIBXML2 is enabled */ int doc_size = gaiaXmlBlobGetDocumentSize(value->GetBlob(), value->GetBlobSize()); if (gaiaIsSvgXmlBlob (value->GetBlob(), value->GetBlobSize())) sprintf(dummy, "XmlBLOB-SVG sz=%d (XMLsz=%d) ", value->GetBlobSize(), doc_size); else if (gaiaIsIsoMetadataXmlBlob (value->GetBlob(), value->GetBlobSize())) sprintf(dummy, "XmlBLOB-ISOmetadata sz=%d (XMLsz=%d) ", value->GetBlobSize(), doc_size); else if (gaiaIsSldSeVectorStyleXmlBlob (value->GetBlob(), value->GetBlobSize())) sprintf(dummy, "XmlBLOB-VectorStyle sz=%d (XMLsz=%d) ", value->GetBlobSize(), doc_size); else if (gaiaIsSldSeRasterStyleXmlBlob (value->GetBlob(), value->GetBlobSize())) sprintf(dummy, "XmlBLOB-RasterStyle sz=%d (XMLsz=%d) ", value->GetBlobSize(), doc_size); else sprintf(dummy, "XmlBLOB sz=%d (XMLsz=%d) ", value->GetBlobSize(), doc_size); cellValue = wxString::FromUTF8(dummy); if (gaiaIsSchemaValidatedXmlBlob (value->GetBlob(), value->GetBlobSize())) cellValue += wxT(" SchemaValidated"); #endif /* end LIBXML2 conditionals */ } else { sprintf(dummy, "BLOB sz=%d ", value->GetBlobSize()); cellValue = wxString::FromUTF8(dummy); cellValue += blobType; } TableView->SetCellValue(i_row, i_col, cellValue); TableView->SetReadOnly(i_row, i_col); TableBlobs->SetBlob(i_row, i_col, value); break; case MY_NULL_VARIANT: default: TableView->SetCellValue(i_row, i_col, wxT("NULL")); break; }; } else TableView->SetCellValue(i_row, i_col, wxT("NULL")); if (ReadOnly == false) { if (IsPrimaryKey(i_col) == true) TableView->SetReadOnly(i_row, i_col); if (IsBlobColumn(i_col) == true) TableView->SetReadOnly(i_row, i_col); } } i_row++; row = row->GetNext(); } } if (ReadOnly == false) { // prepearing the insert row TableView->SetRowLabelValue(TableView->GetNumberRows() - 1, wxT("Insert row")); InsertPending = false; for (i_col = 0; i_col < TableView->GetNumberCols(); i_col++) { TableView->SetCellValue(TableView->GetNumberRows() - 1, i_col, wxT("")); TableView->SetCellBackgroundColour(TableView->GetNumberRows() - 1, i_col, wxColour(0, 0, 0)); TableView->SetReadOnly(TableView->GetNumberRows() - 1, i_col); } } TableView->SetRowLabelSize(wxGRID_AUTOSIZE); TableView->AutoSize(); ResizeView(); FormatElapsedTime(seconds, elapsed); sprintf(dummy, "current block: %d / %d [%d rows] [fetched in %s]", RsBeginRow + 1, RsEndRow + 1, RsMaxRow, elapsed); currentBlock = wxString::FromUTF8(dummy); RsCurrentBlock->SetLabel(currentBlock); ShowControls(); MainFrame->GetQueryView()->AddToHistory(ThreadParams.GetSql()); ThreadParams.Reset(); ::wxEndBusyCursor(); return true; error: ::wxEndBusyCursor(); ThreadParams.Reset(); return false; } bool MyResultSetView::IsPrimaryKey(int column) { // // checks if this column is a Primary Key one // int i; for (i = 0; i < 1024; i++) { if (PrimaryKeys[i] == column) return true; } return false; } bool MyResultSetView::IsBlobColumn(int column) { // // checks if this column is a BLOB-type column // int i; for (i = 0; i < 1024; i++) { if (BlobColumns[i] == column) return true; } return false; } void MyResultSetView::CreateGrid(int rows, int cols) { // // creating a new Grid to show the result set // int extra = 0; if (ReadOnly == false) extra = 1; TableView = new wxGrid(this, wxID_ANY, wxPoint(5, 5), wxSize(200, 200)); TableView->Show(false); TableView->CreateGrid(rows + extra, cols); TableBlobs = new MyBlobs(rows, cols); if (ReadOnly == false) TableValues = new MyValues(rows, cols); } void MyResultSetView::CreateStatsGrid() { // // creating a new Grid to show the SQL query stats (progress handler) // wxSize sz = GetClientSize(); TableView = new wxGrid(this, wxID_ANY, wxPoint(5, 5), wxSize(200, 200)); TableView->Show(false); TableView->CreateGrid(5, 2); TableView->EnableEditing(false); TableView->SetColLabelValue(0, wxT("Progress Counter")); TableView->SetColLabelValue(1, wxT("Current Value")); TableView->SetCellValue(0, 0, wxT("FullscanStep")); TableView->SetCellValue(1, 0, wxT("Sort")); TableView->SetCellValue(2, 0, wxT("Autoindex")); TableView->SetCellValue(3, 0, wxT("FetchedRows")); TableView->SetCellValue(4, 0, wxT("ElapsedTime")); TableView->SetCellBackgroundColour(4, 0, wxColour(128, 255, 128)); TableView->SetCellValue(0, 1, wxT("0")); TableView->SetCellAlignment(0, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); TableView->SetCellValue(1, 1, wxT("0")); TableView->SetCellAlignment(1, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); TableView->SetCellValue(2, 1, wxT("0")); TableView->SetCellAlignment(2, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); TableView->SetCellValue(3, 1, wxT("0")); TableView->SetCellAlignment(3, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); TableView->SetCellValue(4, 1, wxT("0")); TableView->SetCellAlignment(4, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); TableView->SetRowLabelSize(wxGRID_AUTOSIZE); TableView->AutoSize(); TableView->SetSize(sz.GetWidth() - 10, sz.GetHeight() - 45); TableView->Show(true); TableView->Disable(); wxString msg = wxT("... wait please: SQL query in progress ..."); RsCurrentBlock->SetLabel(msg); } void MyResultSetView::ResizeView() { // // resizing the Grid to show the result set // wxSize sz = GetClientSize(); if (TableView) { TableView->SetSize(sz.GetWidth() - 10, sz.GetHeight() - 45); TableView->Show(true); } } void MyResultSetView::OnSize(wxSizeEvent & WXUNUSED(event)) { // // this window has changed its size // wxSize sz = GetClientSize(); if (TableView) TableView->SetSize(sz.GetWidth() - 10, sz.GetHeight() - 45); BtnRsFirst->Move(5, sz.GetHeight() - 35); BtnRsPrevious->Move(40, sz.GetHeight() - 35); BtnRefresh->Move(75, sz.GetHeight() - 35); BtnRsNext->Move(110, sz.GetHeight() - 35); BtnRsLast->Move(145, sz.GetHeight() - 35); RsCurrentBlock->Move(180, sz.GetHeight() - 25); } void MyResultSetView::OnRsFirst(wxCommandEvent & WXUNUSED(event)) { // // scrolling to the result set beginning // wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); if (ExecuteSqlPre(sql, 0, ReadOnly, CoverageTiles, TileDataTable, false) == false) wxMessageBox(SqlErrorMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } void MyResultSetView::OnRsPrevious(wxCommandEvent & WXUNUSED(event)) { // // scrolling to the result set previous block // wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); int start = RsBeginRow - RsBlock; if (start < 0) start = 0; if (ExecuteSqlPre(sql, start, ReadOnly, CoverageTiles, TileDataTable, false) == false) wxMessageBox(SqlErrorMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } void MyResultSetView::OnRsNext(wxCommandEvent & WXUNUSED(event)) { // // scrolling to the result set next block // wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); int start = RsEndRow + 1; if (ExecuteSqlPre(sql, start, ReadOnly, CoverageTiles, TileDataTable, false) == false) wxMessageBox(SqlErrorMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } void MyResultSetView::OnRsLast(wxCommandEvent & WXUNUSED(event)) { // // scrolling to the result set ending // wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); UpdateMaxRow(sql); int start = RsMaxRow - RsBlock; if (start < 0) start = 0; if (ExecuteSqlPre(sql, start, ReadOnly, CoverageTiles, TileDataTable, false) == false) wxMessageBox(SqlErrorMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } void MyResultSetView::OnRefresh(wxCommandEvent & WXUNUSED(event)) { // // refreshing the result set // wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); int start = RsBeginRow; if (ExecuteSqlPre(sql, start, ReadOnly, CoverageTiles, TileDataTable, false) == false) wxMessageBox(SqlErrorMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } void MyResultSetView::OnThreadFinished(wxCommandEvent & WXUNUSED(event)) { // // the SQL thread signals termination // MainFrame->EnableAllTools(); if (ExecuteSqlPost() == false) wxMessageBox(wxT("An error occurred while showing the ResultSet"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } void MyResultSetView::OnStatsUpdate(wxCommandEvent & WXUNUSED(event)) { // // updating SQL stats (progress handler) // char elapsed[64]; char dummy[1024]; wxString cellValue; if (ThreadParams.IsValid() == false) return; FormatElapsedTime(ThreadParams.GetElapsedTime(), elapsed, true); sprintf(dummy, "%d", ThreadParams.GetStatFullscanStep()); cellValue = wxString::FromUTF8(dummy); TableView->SetCellValue(0, 1, cellValue); sprintf(dummy, "%d", ThreadParams.GetStatSort()); cellValue = wxString::FromUTF8(dummy); TableView->SetCellValue(1, 1, cellValue); sprintf(dummy, "%d", ThreadParams.GetStatAutoindex()); cellValue = wxString::FromUTF8(dummy); TableView->SetCellValue(2, 1, cellValue); sprintf(dummy, "%d", ThreadParams.GetFetchedRows()); cellValue = wxString::FromUTF8(dummy); TableView->SetCellValue(3, 1, cellValue); sprintf(dummy, "%s", elapsed); cellValue = wxString::FromUTF8(dummy); TableView->SetCellValue(4, 1, cellValue); TableView->ForceRefresh(); } void MyResultSetView::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // int blob_type; MyVariant *blobVar; wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); if (ReadOnly == false && event.GetRow() == TableView->GetNumberRows() - 1) { // this is the INSERT ROW if (InsertPending == true) { menuItem = new wxMenuItem(&menu, Grid_Insert, wxT("&Confirm insertion")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_Abort, wxT("&Abort insertion")); menu.Append(menuItem); } else { menuItem = new wxMenuItem(&menu, Grid_Insert, wxT("&Insert new row")); menu.Append(menuItem); } TableView->PopupMenu(&menu, pt); return; } if (CoverageTiles == true) { // supporting Tile Preview wxString value = TableView->GetCellValue(event.GetRow(), 0); long tile_id; value.ToLong(&tile_id); CurrentTileId = tile_id; menuItem = new wxMenuItem(&menu, Grid_TilePreview, wxT("Raster &Tile Preview")); menu.Append(menuItem); goto done; } CurrentEvtRow = event.GetRow(); CurrentEvtColumn = event.GetCol(); blobVar = TableBlobs->GetBlob(CurrentEvtRow, CurrentEvtColumn); if (blobVar) { // this one is a BLOB cell if (ReadOnly == false) { MyRowVariant *varRow = TableValues->GetRow(CurrentEvtRow); if (varRow->IsDeleted() == false) { menuItem = new wxMenuItem(&menu, Grid_Delete, wxT("&Delete row")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_Insert, wxT("&Insert new row")); menu.Append(menuItem); menu.AppendSeparator(); } } menuItem = new wxMenuItem(&menu, Grid_Blob, wxT("BLOB &explore")); menu.Append(menuItem); blob_type = gaiaGuessBlobType(blobVar->GetBlob(), blobVar->GetBlobSize()); if (blob_type == GAIA_GEOMETRY_BLOB) ; else if (blob_type == GAIA_XML_BLOB) { menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Grid_XmlBlobIn, wxT("XmlBLOB &import")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_XmlBlobOut, wxT("XmlBLOB &export (not indented)")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_XmlBlobOutIndented, wxT("XmlBLOB export (i&ndented)")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_BlobNull, wxT("Set BLOB as &NULL")); menu.Append(menuItem); } else { menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Grid_BlobIn, wxT("BLOB &import")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_BlobOut, wxT("BLOB &export")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_BlobNull, wxT("Set BLOB as &NULL")); menu.Append(menuItem); } CurrentBlob = blobVar; } else { // this one is an ordinary cell CurrentBlob = NULL; if (ReadOnly == false) { MyRowVariant *varRow = TableValues->GetRow(CurrentEvtRow); if (varRow->IsDeleted() == false) { menuItem = new wxMenuItem(&menu, Grid_Delete, wxT("&Delete row")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_Insert, wxT("&Insert new row")); menu.Append(menuItem); if (IsBlobColumn(CurrentEvtColumn) == true) { menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Grid_BlobIn, wxT("BLOB &import")); menu.Append(menuItem); } menu.AppendSeparator(); } } menuItem = new wxMenuItem(&menu, Grid_Clear, wxT("&Clear selection")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_All, wxT("Select &all")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_Row, wxT("Select &row")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Grid_Column, wxT("&Select column")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Grid_Copy, wxT("&Copy")); menu.Append(menuItem); if (TableView->IsSelection() == false) menuItem->Enable(false); } done: menu.AppendSeparator(); wxMenu *exportMenu = new wxMenu(); menuItem = new wxMenuItem(exportMenu, Grid_ExpTxtTab, wxT("as &Txt/Tab")); exportMenu->Append(menuItem); menuItem = new wxMenuItem(exportMenu, Grid_ExpCsv, wxT("as &CSV")); exportMenu->Append(menuItem); menuItem = new wxMenuItem(exportMenu, Grid_ExpHtml, wxT("as &HTML")); exportMenu->Append(menuItem); menuItem = new wxMenuItem(exportMenu, Grid_ExpShp, wxT("as &Shapefile")); exportMenu->Append(menuItem); menuItem = new wxMenuItem(exportMenu, Grid_ExpDif, wxT("as &DIF spreadsheet")); exportMenu->Append(menuItem); menuItem = new wxMenuItem(exportMenu, Grid_ExpSylk, wxT("as &SYLK spreadsheet")); exportMenu->Append(menuItem); menuItem = new wxMenuItem(exportMenu, Grid_ExpDbf, wxT("as &DBF archive")); exportMenu->Append(menuItem); menu.AppendSubMenu(exportMenu, wxT("&Export ResultSet")); TableView->PopupMenu(&menu, pt); } void MyResultSetView::OnCellSelected(wxGridEvent & event) { // // cell selection changed // if (InsertPending == true) { // an INSERT row is still pending if (event.GetRow() != TableView->GetNumberRows() - 1) DoInsert(false); } event.Skip(); } void MyResultSetView::OnCellChanged(wxGridEvent & event) { // // user changed value in some cell // MyVariant *oldValue; MyVariant *insValue; wxString value; wxString numValue; wxString newValue = wxT("NULL"); wxString sql; wxString rowid; char *errMsg = NULL; bool error = false; sqlite3_int64 int64_value; long long_value; bool okIntValue = false; double dbl_value; bool okDblValue = false; int ret; char dummy[256]; int row = event.GetRow(); int column = event.GetCol(); char xname[1024]; int decimal_precision = MainFrame->GetDecimalPrecision(); value = TableView->GetCellValue(row, column); if (InsertPending == true) { // an INSERT row is still pending insValue = InsertRow->GetColumn(column); numValue = value; numValue.Replace(wxT(","), wxT(".")); okIntValue = numValue.ToLong(&long_value); okDblValue = numValue.ToDouble(&dbl_value); if (okIntValue == true) { int64_value = long_value; insValue->Set(int64_value); } else if (okDblValue == true) insValue->Set(dbl_value); else insValue->Set(value); if (row != TableView->GetNumberRows() - 1) DoInsert(false); return; } if (value.Len() > 0) { numValue = value; numValue.Replace(wxT(","), wxT(".")); okIntValue = numValue.ToLong(&long_value); okDblValue = numValue.ToDouble(&dbl_value); if (okIntValue == true) { int64_value = long_value; sprintf(dummy, FORMAT_64, int64_value); newValue = wxString::FromUTF8(dummy); } else if (okDblValue == true) { if (decimal_precision >= 0) { char fmt[64]; sprintf(fmt, "%%1.%df", decimal_precision); sprintf(dummy, fmt, dbl_value); } else sprintf(dummy, "%1.6f", dbl_value); newValue = wxString::FromUTF8(dummy); } else { value.Replace(wxT("'"), wxT("''")); newValue = wxT("'") + value + wxT("'"); } } oldValue = TableValues->GetValue(row, 0); sprintf(dummy, FORMAT_64, oldValue->GetIntValue()); rowid = wxString::FromUTF8(dummy); sql = wxT("UPDATE "); strcpy(xname, TableName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" SET "); strcpy(xname, TableView->GetColLabelValue(column).ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" = ") + newValue + wxT(" WHERE ROWID = ") + rowid; ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); error = true; } oldValue = TableValues->GetValue(row, column); if (error == true) { // update failed; restorig old cell value value = wxT("NULL"); if (oldValue) { if (oldValue->GetType() == MY_INT_VARIANT) { sprintf(dummy, FORMAT_64, oldValue->GetIntValue()); value = wxString::FromUTF8(dummy); } if (oldValue->GetType() == MY_DBL_VARIANT) { if (decimal_precision >= 0) { char fmt[64]; sprintf(fmt, "%%1.%df", decimal_precision); sprintf(dummy, fmt, oldValue->GetDblValue()); } else sprintf(dummy, "%1.6f", oldValue->GetDblValue()); value = wxString::FromUTF8(dummy); } if (oldValue->GetType() == MY_TXT_VARIANT) value = oldValue->GetTxtValue(); } TableView->SetCellValue(row, column, value); TableView->ForceRefresh(); } else { // marking cell as modified TableView->SetCellTextColour(row, column, wxColour(0, 0, 192)); TableView->SetCellBackgroundColour(row, column, wxColour(255, 255, 204)); TableView->ForceRefresh(); } } void MyResultSetView::DoInsert(bool confirmed) { // // performing actual row INSERT // int i; int ret; MyVariant *var; wxString value; wxString strValue; wxString sql; char dummy[256]; char *errMsg = NULL; char xname[1024]; int decimal_precision = MainFrame->GetDecimalPrecision(); if (confirmed == false) { ret = wxMessageBox(wxT("A new row is ready for insertion\n\nConfirm ?"), wxT("spatialite_gui"), wxYES_NO | wxICON_QUESTION, this); if (ret != wxYES) goto close_insert; } sql = wxT("INSERT INTO "); strcpy(xname, TableName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" ("); for (i = 1; i < TableView->GetNumberCols(); i++) { if (i > 1) sql += wxT(", "); strcpy(xname, TableView->GetColLabelValue(i).ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); } sql += wxT(") VALUES ("); for (i = 1; i < InsertRow->GetNumCols(); i++) { if (i > 1) sql += wxT(", "); var = InsertRow->GetColumn(i); value = wxT("NULL"); if (var->GetType() == MY_INT_VARIANT) { sprintf(dummy, FORMAT_64, var->GetIntValue()); value = wxString::FromUTF8(dummy); } if (var->GetType() == MY_DBL_VARIANT) { if (decimal_precision >= 0) { char fmt[64]; sprintf(fmt, "%%1.%df", decimal_precision); sprintf(dummy, fmt, var->GetDblValue()); } else sprintf(dummy, "%1.6f", var->GetDblValue()); value = wxString::FromUTF8(dummy); } if (var->GetType() == MY_TXT_VARIANT) { strValue = var->GetTxtValue(); strValue.Replace(wxT("'"), wxT("''")); value = wxT("'") + strValue + wxT("'"); } sql += value; } sql += wxT(")"); ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } close_insert: // // closing insert row // InsertPending = false; delete InsertRow; InsertRow = NULL; for (i = 0; i < TableView->GetNumberCols(); i++) { TableView->SetCellValue(TableView->GetNumberRows() - 1, i, wxT("")); TableView->SetCellBackgroundColour(TableView->GetNumberRows() - 1, i, wxColour(0, 0, 0)); TableView->SetReadOnly(TableView->GetNumberRows() - 1, i); } } void MyResultSetView::OnCmdDelete(wxCommandEvent & WXUNUSED(event)) { // // user required row deletion // char *errMsg = NULL; bool error = false; int ret; int i; wxString sql; wxString rowid; MyVariant *value; char dummy[256]; char xname[1024]; MyRowVariant *varRow = TableValues->GetRow(CurrentEvtRow); if (varRow->IsDeleted() == true) return; value = TableValues->GetValue(CurrentEvtRow, 0); sprintf(dummy, FORMAT_64, value->GetIntValue()); rowid = wxString::FromUTF8(dummy); ret = wxMessageBox(wxT("Requested deletion for row identified by RowId = ") + rowid + wxT("\n\nConfirm ?"), wxT("spatialite_gui"), wxYES_NO | wxICON_QUESTION, this); if (ret != wxYES) return; strcpy(xname, TableName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql = wxT("DELETE FROM ") + wxString::FromUTF8(xname) + wxT(" WHERE ROWID = ") + rowid; ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); error = true; } if (error == false) { // marking row as deleted varRow->SetDeleted(); for (i = 0; i < TableView->GetNumberCols(); i++) { TableView->SetCellTextColour(CurrentEvtRow, i, wxColour(0, 0, 0)); TableView->SetCellBackgroundColour(CurrentEvtRow, i, wxColour(128, 128, 128)); TableView->SetReadOnly(CurrentEvtRow, i); } TableView->ForceRefresh(); } } void MyResultSetView::OnCmdInsert(wxCommandEvent & WXUNUSED(event)) { // // user required row insertion // int i; if (ReadOnly == true) return; if (InsertPending == true) { // an INSERT is still pending, and the user required actual insertion DoInsert(true); return; } InsertRow = new MyRowVariant(TableView->GetNumberCols()); TableView->MakeCellVisible(TableView->GetNumberRows() - 1, 1); InsertPending = true; for (i = 1; i < TableView->GetNumberCols(); i++) { TableView->SetCellValue(TableView->GetNumberRows() - 1, i, wxT("")); TableView->SetCellBackgroundColour(TableView->GetNumberRows() - 1, i, wxColour(255, 255, 255)); TableView->SetReadOnly(TableView->GetNumberRows() - 1, i, false); } } void MyResultSetView::OnCmdAbort(wxCommandEvent & WXUNUSED(event)) { // // user cancelled current row insertion // int i; if (InsertPending) { InsertPending = false; delete InsertRow; InsertRow = NULL; for (i = 0; i < TableView->GetNumberCols(); i++) { TableView->SetCellValue(TableView->GetNumberRows() - 1, i, wxT("")); TableView->SetCellBackgroundColour(TableView->GetNumberRows() - 1, i, wxColour(0, 0, 0)); TableView->SetReadOnly(TableView->GetNumberRows() - 1, i); } } } void MyResultSetView::OnCmdClearSelection(wxCommandEvent & WXUNUSED(event)) { // // clearing current selection // TableView->ClearSelection(); } void MyResultSetView::OnCmdSelectAll(wxCommandEvent & WXUNUSED(event)) { // // selecting all // TableView->SelectAll(); } void MyResultSetView::OnCmdSelectRow(wxCommandEvent & WXUNUSED(event)) { // // selecting the current row // TableView->SelectRow(CurrentEvtRow); } void MyResultSetView::OnCmdSelectColumn(wxCommandEvent & WXUNUSED(event)) { // // selecting column // TableView->SelectCol(CurrentEvtColumn); } void MyResultSetView::OnCmdCopy(wxCommandEvent & WXUNUSED(event)) { // // copying the selection into the clipboard // wxString copyData; int row; int col; bool newRow; bool firstRow = true; for (row = 0; row < TableView->GetNumberRows(); row++) { newRow = true; for (col = 0; col < TableView->GetNumberCols(); col++) { if (TableView->IsInSelection(row, col) == true) { // ok, this cell is included into the selection to copy if (firstRow == true) { newRow = false; firstRow = false; } else if (newRow == true) { newRow = false; copyData += wxT("\n"); } else copyData += wxT("\t"); copyData += TableView->GetCellValue(row, col); } } } if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(copyData)); wxTheClipboard->Close(); } } void MyResultSetView::OnCmdBlob(wxCommandEvent & WXUNUSED(event)) { // // exploring some BLOB value // if (!CurrentBlob) return; BlobExplorerDialog dlg; dlg.Create(MainFrame, CurrentBlob->GetBlobSize(), CurrentBlob->GetBlob()); dlg.ShowModal(); } void MyResultSetView::OnCmdTilePreview(wxCommandEvent & WXUNUSED(event)) { // // showing a Raster Tile Preview // unsigned char *blob; int blobSize; if (MainFrame->GetTilePreview(TileDataTable, CurrentTileId, &blob, &blobSize) != true) return; TilePreviewDialog dlg; dlg.Create(MainFrame, TileDataTable, CurrentTileId, blobSize, blob); dlg.ShowModal(); } void MyResultSetView::OnCmdBlobIn(wxCommandEvent & WXUNUSED(event)) { // importing an external file into a BLOB-value FILE *in = NULL; char path[2048]; int rd; int maxSize = 1024 * 1024; // limit BLOB size to 1MB wxString fileList; wxString rowid; wxString sql; wxString blobValue; wxString hex; MyVariant *value; char dummy[1024]; bool error = false; unsigned char *buffer = NULL; int ret; char *errMsg = NULL; wxString lastDir; char xname[1024]; fileList = wxT ("BLOB Document (*.jpg;*.jpeg;*.jp2;*.png;*.gif;*.tif;*.pdf;*.zip)|*.jpg;*.jpeg;*.jp2;*.png;*.gif;*.tif;*.pdf;*.zip|"); fileList += wxT ("Image (*.jpg;*.jpeg;*.jp2;*.png;*.gif;*.tif;*.webp)|*.jpg;*.jpeg;*.jp2;*.png;*.gif;*.tif;*.webp|"); fileList += wxT ("JPEG Image (*.jpg;*.jpeg)|*.jpg;*.jpeg|Jpeg2000 Image (*.jp2)|*.jp2|PNG Image (*.png)|*.png|GIF Image (*.gif)|*.gif"); fileList += wxT("|TIFF Image (*.tif)|*.tif|WEBP Image (*.webp)|*.webp|"); fileList += wxT("PDF Document (*.pdf)|*.pdf|ZIP Archive|(*.zip)|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("loading a BLOB value"), wxT(""), wxT(""), fileList, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { strcpy(path, fileDialog.GetPath().ToUTF8()); in = fopen(path, "rb"); if (!in) { wxMessageBox(wxT("Cannot open '") + fileDialog.GetPath() + wxT("' for reading"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); buffer = new unsigned char[maxSize]; rd = fread(buffer, 1, maxSize, in); if (rd == maxSize && !(feof(in))) { // exceding 1MB; it's too big for a BLOB wxMessageBox(wxT ("Selected file excedes 1MB; cowardly refusing to load it as a BLOB value ..."), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto end; } if (ferror(in)) { // I/O error wxMessageBox(wxT("an I/O error occurred"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto end; } // // preparing the SQL UPDATE statement // value = TableValues->GetValue(CurrentEvtRow, 0); sprintf(dummy, FORMAT_64, value->GetIntValue()); rowid = wxString::FromUTF8(dummy); HexBlobValue(buffer, rd, hex); sql = wxT("UPDATE "); strcpy(xname, TableName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" SET "); strcpy(xname, TableView->GetColLabelValue(CurrentEvtColumn).ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" = ") + hex + wxT(" WHERE ROWID = ") + rowid; ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); error = true; } value = TableValues->GetValue(CurrentEvtRow, CurrentEvtColumn); if (error == false) { // updating the Grid cell sprintf(dummy, "BLOB sz=%d ", rd); blobValue = wxString::FromUTF8(dummy); switch (gaiaGuessBlobType(buffer, rd)) { case GAIA_JPEG_BLOB: blobValue += wxT("JPEG image"); break; case GAIA_EXIF_BLOB: blobValue += wxT("JPEG-EXIF image"); break; case GAIA_EXIF_GPS_BLOB: blobValue += wxT("JPEG-EXIF-GPS image"); break; case GAIA_PNG_BLOB: blobValue += wxT("PNG image"); break; case GAIA_GIF_BLOB: blobValue += wxT("GIF image"); break; case GAIA_TIFF_BLOB: blobValue += wxT("TIFF image"); break; case GAIA_WEBP_BLOB: blobValue += wxT("WEBP image"); break; case GAIA_JP2_BLOB: blobValue += wxT("JP2 image (Jpeg2000)"); case GAIA_PDF_BLOB: blobValue += wxT("PDF document"); break; case GAIA_ZIP_BLOB: blobValue += wxT("ZIP archive"); break; default: // testing for an eventual Text Font int ret = rl2_is_valid_encoded_font(buffer, rd); if (ret == RL2_OK) blobValue += wxT("TrueType Font"); else blobValue += wxT("UNKNOWN type"); break; }; TableView->SetCellValue(CurrentEvtRow, CurrentEvtColumn, blobValue); TableView->SetCellTextColour(CurrentEvtRow, CurrentEvtColumn, wxColour(0, 0, 192)); TableView->SetCellBackgroundColour(CurrentEvtRow, CurrentEvtColumn, wxColour(255, 255, 204)); TableView->ForceRefresh(); } } end: // clean-up ::wxEndBusyCursor(); if (in) fclose(in); if (buffer) delete[]buffer; } void MyResultSetView::HexBlobValue(unsigned char *blob, int size, wxString & hex) { // // builds the HEX BLOB as X'01234567890abcdef' // int i; char digit[16]; hex = wxT("X'"); for (i = 0; i < size; i++) { sprintf(digit, "%02x", *(blob + i)); hex += wxString::FromUTF8(digit); } hex += wxT("'"); } void MyResultSetView::OnCmdBlobOut(wxCommandEvent & WXUNUSED(event)) { // exporting to external file a BLOB-value int blobType; wxString fileName; wxString fileType; int ret; wxString path; FILE *out = NULL; char xpath[2048]; int wr; wxString lastDir; if (!CurrentBlob) return; blobType = gaiaGuessBlobType(CurrentBlob->GetBlob(), CurrentBlob->GetBlobSize()); switch (blobType) { case GAIA_JPEG_BLOB: case GAIA_EXIF_BLOB: case GAIA_EXIF_GPS_BLOB: fileName = wxT("image.jpg"); fileType = wxT("File JPEG (*.jpg;*.jpeg)|*.jpg"); break; case GAIA_JP2_BLOB: fileName = wxT("image.jp2"); fileType = wxT("File Jpeg2000 (*.jp2)|*.jp2"); break; case GAIA_PNG_BLOB: fileName = wxT("image.png"); fileType = wxT("File PNG (*.png)|*.png"); break; case GAIA_GIF_BLOB: fileName = wxT("image.gif"); fileType = wxT("File GIF (*.gif)|*.gif"); break; case GAIA_TIFF_BLOB: fileName = wxT("image.tiff"); fileType = wxT("File TIFF (*.tif)|*.tif"); break; case GAIA_PDF_BLOB: fileName = wxT("document.pdf"); fileType = wxT("PDF document (*.pdf)|*.pdf"); break; case GAIA_ZIP_BLOB: fileName = wxT("archive.zip"); fileType = wxT("ZIP Archive (*.zip)|*.zip"); break; default: fileName = wxT("file"); }; fileType += wxT("|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("exporting a BLOB value to file"), wxT(""), fileName, fileType, wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); switch (blobType) { case GAIA_JPEG_BLOB: case GAIA_EXIF_BLOB: case GAIA_EXIF_GPS_BLOB: path += wxT(".jpg"); break; case GAIA_JP2_BLOB: path += wxT(".jp2"); break; case GAIA_PNG_BLOB: path += wxT(".png"); break; case GAIA_GIF_BLOB: path += wxT(".gif"); break; case GAIA_TIFF_BLOB: path += wxT(".tif"); break; case GAIA_PDF_BLOB: path += wxT(".pdf"); break; case GAIA_ZIP_BLOB: path += wxT(".zip"); break; default: path += file.GetExt(); }; strcpy(xpath, path.ToUTF8()); out = fopen(xpath, "wb"); if (!out) { wxMessageBox(wxT("Cannot open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); wr = fwrite(CurrentBlob->GetBlob(), 1, CurrentBlob->GetBlobSize(), out); if (wr != CurrentBlob->GetBlobSize()) { wxMessageBox(wxT("an I/O error occurred"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } fclose(out); ::wxEndBusyCursor(); } } void MyResultSetView::OnCmdXmlBlobIn(wxCommandEvent & WXUNUSED(event)) { // importing an external XMLDocument into an XmlBLOB-value #ifdef ENABLE_LIBXML2 /* only if LIBXML2 is enabled */ FILE *in = NULL; char path[2048]; int rd; int maxSize = 1024 * 1024; // limit XmlBLOB size to 1MB wxString fileList; wxString rowid; wxString sql; wxString blobValue; wxString hex; MyVariant *value; char dummy[1024]; bool error = false; unsigned char *buffer = NULL; int ret; char *errMsg = NULL; wxString lastDir; char xname[1024]; unsigned char *xml = NULL; int xml_size; int compressed; char *schemaURI; char xschema[8192]; fileList = wxT("XML Document (*.xml)|*.xml|All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("loading an XmlBLOB value"), wxT(""), wxT(""), fileList, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { strcpy(path, fileDialog.GetPath().ToUTF8()); in = fopen(path, "rb"); if (!in) { wxMessageBox(wxT("Cannot open '") + fileDialog.GetPath() + wxT("' for reading"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); buffer = new unsigned char[maxSize]; rd = fread(buffer, 1, maxSize, in); if (rd == maxSize && !(feof(in))) { // exceding 1MB; it's too big for a BLOB wxMessageBox(wxT ("Selected file excedes 1MB; cowardly refusing to load it as an XmlBLOB value ..."), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto end; } if (ferror(in)) { // I/O error wxMessageBox(wxT("an I/O error occurred"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto end; } LoadXmlDialog dlg; wxString inPath = fileDialog.GetPath(); dlg.Create(MainFrame, inPath); ret = dlg.ShowModal(); if (ret == wxID_OK) { if (dlg.IsCompressed() == true) compressed = 1; else compressed = 0; wxString schema = dlg.GetSchemaURI(); if (schema.Len() == 0) schemaURI = NULL; else { strcpy(xschema, schema.ToUTF8()); schemaURI = xschema; } } else goto end; // attempting to parse (and possibly validate) the XML gaiaXmlToBlob(MainFrame->GetSpliteInternalCache(), buffer, rd, compressed, schemaURI, &xml, &xml_size, NULL, NULL); if (xml == NULL) { wxMessageBox(wxT("Invalid XML ... unable to parse or validate"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto end; } // // preparing the SQL UPDATE statement // value = TableValues->GetValue(CurrentEvtRow, 0); sprintf(dummy, FORMAT_64, value->GetIntValue()); rowid = wxString::FromUTF8(dummy); HexBlobValue(xml, xml_size, hex); sql = wxT("UPDATE "); strcpy(xname, TableName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" SET "); strcpy(xname, TableView->GetColLabelValue(CurrentEvtColumn).ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" = ") + hex + wxT(" WHERE ROWID = ") + rowid; ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); error = true; } value = TableValues->GetValue(CurrentEvtRow, CurrentEvtColumn); if (error == false) { // updating the Grid cell int doc_size = gaiaXmlBlobGetDocumentSize(xml, xml_size); sprintf(dummy, "XmlBLOB sz=%d (XMLsz=%d) ", xml_size, doc_size); blobValue = wxString::FromUTF8(dummy); if (gaiaIsSchemaValidatedXmlBlob(xml, xml_size)) blobValue += wxT(" SchemaValidated"); TableView->SetCellValue(CurrentEvtRow, CurrentEvtColumn, blobValue); TableView->SetCellTextColour(CurrentEvtRow, CurrentEvtColumn, wxColour(0, 0, 192)); TableView->SetCellBackgroundColour(CurrentEvtRow, CurrentEvtColumn, wxColour(255, 255, 204)); TableView->ForceRefresh(); } } end: // clean-up ::wxEndBusyCursor(); if (in) fclose(in); if (buffer) delete[]buffer; if (xml) free(xml); #else wxMessageBox(wxT ("Sorry, spatialite_gui was built disabling LIBXML2\n\nUnsupported operation"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); #endif /* end LIBXML2 conditionals */ } void MyResultSetView::XmlBlobOut(bool indented) { // exporting to external file an XmlBLOB-value #ifdef ENABLE_LIBXML2 /* only if LIBXML2 is enabled */ wxString fileName; wxString fileType; int ret; wxString path; FILE *out = NULL; char xpath[2048]; int wr; wxString lastDir; unsigned char *xml; int xml_size; wxString title = wxT("exporting an XmlBLOB value to file "); if (!CurrentBlob) return; if (indented) { title += wxT("(not indented)"); gaiaXmlFromBlob(CurrentBlob->GetBlob(), CurrentBlob->GetBlobSize(), 0, &xml, &xml_size); } else { title += wxT("(indented)"); gaiaXmlFromBlob(CurrentBlob->GetBlob(), CurrentBlob->GetBlobSize(), 1, &xml, &xml_size); } if (xml == NULL) return; fileName = wxT("document.xml"); fileType = wxT("XML Document (*.xml)|*.xml"); fileType += wxT("|All files (*.*)|*.*"); wxFileDialog fileDialog(this, title, wxT(""), fileName, fileType, wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".xml"); strcpy(xpath, path.ToUTF8()); out = fopen(xpath, "wb"); if (!out) { wxMessageBox(wxT("Cannot open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); free(xml); return; } lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); wr = fwrite(xml, 1, xml_size, out); if (wr != xml_size) { wxMessageBox(wxT("an I/O error occurred"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } fclose(out); ::wxEndBusyCursor(); } free(xml); #else wxMessageBox(wxT ("Sorry, spatialite_gui was built disabling LIBXML2\n\nUnsupported operation"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); #endif /* end LIBXML2 conditionals */ } void MyResultSetView::OnCmdXmlBlobOut(wxCommandEvent & WXUNUSED(event)) { // exporting to external file an XmlBLOB-value (not indented) XmlBlobOut(false); } void MyResultSetView::OnCmdXmlBlobOutIndented(wxCommandEvent & WXUNUSED(event)) { // exporting to external file an XmlBLOB-value (indented) XmlBlobOut(true); } void MyResultSetView::OnCmdBlobNull(wxCommandEvent & WXUNUSED(event)) { // setting to NULL a BLOB-value wxString rowid; wxString sql; int ret; char *errMsg = NULL; bool error = false; MyVariant *value; char dummy[256]; char xname[1024]; value = TableValues->GetValue(CurrentEvtRow, 0); sprintf(dummy, FORMAT_64, value->GetIntValue()); rowid = wxString::FromUTF8(dummy); sql = wxT("UPDATE "); strcpy(xname, TableName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" SET "); strcpy(xname, TableView->GetColLabelValue(CurrentEvtColumn).ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" = NULL WHERE ROWID = ") + rowid; ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); error = true; } if (error == false) { // updating the Grid cell TableView->SetCellValue(CurrentEvtRow, CurrentEvtColumn, wxT("NULL")); TableView->SetCellTextColour(CurrentEvtRow, CurrentEvtColumn, wxColour(0, 0, 192)); TableView->SetCellBackgroundColour(CurrentEvtRow, CurrentEvtColumn, wxColour(255, 255, 204)); TableView->ForceRefresh(); } } void MyResultSetView::OnCmdExpTxtTab(wxCommandEvent & WXUNUSED(event)) { // // exporting the ResultSet as TXT-TAB // int ret; wxString path; wxString lastDir; wxString target; wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); wxFileDialog fileDialog(this, wxT("Exporting the ResultSet as Txt/Tab file"), wxT(""), wxT("result_set.txt"), wxT("Txt/Tab file (*.txt)|*.txt|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".txt"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsTxtTab(path, sql, MainFrame->GetDefaultCharset()); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("TXT / TAB"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsTxtTab(path, sql, dlg.GetCharset()); ::wxEndBusyCursor(); } } } } void MyResultSetView::OnCmdExpCsv(wxCommandEvent & WXUNUSED(event)) { // // exporting the ResultSet as CSV // int ret; wxString path; wxString lastDir; wxString target; wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); wxFileDialog fileDialog(this, wxT("Exporting the ResultSet as CSV"), wxT(""), wxT("result_set.csv"), wxT("CSV file (*.csv)|*.csv|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".csv"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsCsv(path, sql, MainFrame->GetDefaultCharset()); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("CSV"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsCsv(path, sql, dlg.GetCharset()); ::wxEndBusyCursor(); } } } } void MyResultSetView::OnCmdExpHtml(wxCommandEvent & WXUNUSED(event)) { // // exporting the ResultSet as HTML // int ret; wxString path; wxString lastDir; wxString target; wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); wxFileDialog fileDialog(this, wxT("Exporting the ResultSet as HTML"), wxT(""), wxT("result_set.html"), wxT ("HTML web page (*.html)|*.html|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".html"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsHtml(path, sql, MainFrame->GetSqlitePath(), MainFrame->GetDefaultCharset()); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("HTML"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsHtml(path, sql, MainFrame->GetSqlitePath(), dlg.GetCharset()); ::wxEndBusyCursor(); } } } } void MyResultSetView::OnCmdExpShp(wxCommandEvent & WXUNUSED(event)) { // // exporting the ResultSet as Shapefile // int ret; wxString path; wxString lastDir; wxString target; wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); wxFileDialog fileDialog(this, wxT("Exporting the ResultSet as Shapefile"), wxT(""), wxT("shapefile.shp"), wxT ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsShp(path, sql, MainFrame->GetDefaultCharset()); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("Shapefile"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsShp(path, sql, dlg.GetCharset()); ::wxEndBusyCursor(); } } } } void MyResultSetView::OnCmdExpDif(wxCommandEvent & WXUNUSED(event)) { // // exporting the ResultSet as DIF spreadsheet // int ret; wxString path; wxString lastDir; wxString target; wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); // asking Decimal Point / Date-Times params DumpSpreadsheetDialog sheet_dlg; char decimal_point; bool date_times; sheet_dlg.Create(MainFrame); ret = sheet_dlg.ShowModal(); if (ret == wxID_OK) { decimal_point = sheet_dlg.GetDecimalPoint(); date_times = sheet_dlg.IsDateTimes(); } else return; wxFileDialog fileDialog(this, wxT("Exporting the ResultSet as DIF spreadsheet"), wxT(""), wxT("spreadsheet.dif"), wxT ("DIF spreadsheet document (*.dif)|*.dif|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".dif"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsDif(path, sql, MainFrame->GetDefaultCharset(), decimal_point, date_times); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("DIF spreadsheet"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsDif(path, sql, dlg.GetCharset(), decimal_point, date_times); ::wxEndBusyCursor(); } } } } void MyResultSetView::OnCmdExpSylk(wxCommandEvent & WXUNUSED(event)) { // // exporting the ResultSet as SYLK spreadsheet // int ret; wxString path; wxString lastDir; wxString target; wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); // asking Decimal Point / Date-Times params DumpSpreadsheetDialog sheet_dlg; bool date_times; sheet_dlg.Create(MainFrame); ret = sheet_dlg.ShowModal(); if (ret == wxID_OK) date_times = sheet_dlg.IsDateTimes(); else return; wxFileDialog fileDialog(this, wxT("Exporting the ResultSet as SYLK spreadsheet"), wxT(""), wxT("spreadsheet.slk"), wxT ("SYLK spreadsheet document (*.slk)|*.slk|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".slk"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsSylk(path, sql, MainFrame->GetDefaultCharset(), date_times); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("SYLK spreadsheet"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsSylk(path, sql, dlg.GetCharset(), date_times); ::wxEndBusyCursor(); } } } } void MyResultSetView::OnCmdExpDbf(wxCommandEvent & WXUNUSED(event)) { // // exporting the ResultSet as DBF archive // int ret; wxString path; wxString lastDir; wxString target; wxString sql = MainFrame->GetQueryView()->GetSqlCtrl()->GetValue(); wxFileDialog fileDialog(this, wxT("Exporting the ResultSet as DBF archive"), wxT(""), wxT("archive.dbf"), wxT ("DBF archive (*.dbf)|*.dbf|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".dbf"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsDbf(path, sql, MainFrame->GetDefaultCharset()); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("DBF archive"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->ExportResultSetAsDbf(path, sql, dlg.GetCharset()); ::wxEndBusyCursor(); } } } } spatialite_gui-2.0.0-devel/Exif.cpp0000664000175000017500000020315612544026240014141 00000000000000/* / Exif.cpp / methods related to EXIF import and XmlBLOB import/export / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include #if defined(_WIN32) && !defined(__MINGW32__) #include #include #else #include #endif #include #include #include #if defined(_WIN32) && !defined(__MINGW32__) #define strcasecmp _stricmp #endif void MyFrame::ImportExifPhotos(wxString & path, bool folder, bool metadata, bool gps_only) { // // trying to import EXIF photos // int cnt; char msg[256]; ::wxBeginBusyCursor(); if (CheckExifTables() == false) { ::wxEndBusyCursor(); wxMessageBox(wxT ("An EXIF table is already defined, but has incompatibles columns"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } if (folder == true) cnt = ExifLoadDir(path, gps_only, metadata); else cnt = ExifLoadFile(path, gps_only, metadata); ::wxEndBusyCursor(); sprintf(msg, "%d EXIF photo%s successfully inserted into the DB\n", cnt, (cnt > 1) ? "s where" : " was"); wxMessageBox(wxString::FromUTF8(msg), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); } bool MyFrame::CheckExifTables() { // // creates the EXIF DB tables / or checks existing ones for validity // int ret; wxString sql; char xsql[1024]; char *errMsg; bool ok_photoId; bool ok_photo; bool ok_pixelX; bool ok_pixelY; bool ok_cameraMake; bool ok_cameraModel; bool ok_shotDateTime; bool ok_gpsGeometry; bool ok_gpsDirection; bool ok_gpsTimestamp; bool ok_fromPath; bool ok_tagId; bool ok_tagName; bool ok_gpsTag; bool ok_valueType; bool ok_typeName; bool ok_countValues; bool ok_valueIndex; bool ok_byteValue; bool ok_stringValue; bool ok_numValue; bool ok_numValueBis; bool ok_doubleValue; bool ok_humanReadable; bool err_pk; bool ok_photoIdPk; bool ok_tagIdPk; bool ok_valueIndexPk; bool pKey; const char *name; int i; char **results; int rows; int columns; // creating the ExifPhoto table sql = wxT("CREATE TABLE IF NOT EXISTS ExifPhoto (\n"); sql += wxT("PhotoId INTEGER PRIMARY KEY AUTOINCREMENT,\n"); sql += wxT("Photo BLOB NOT NULL,\n"); sql += wxT("PixelX INTEGER,\n"); sql += wxT("PixelY INTEGER,\n"); sql += wxT("CameraMake TEXT,\n"); sql += wxT("CameraModel TEXT,\n"); sql += wxT("ShotDateTime DOUBLE,\n"); sql += wxT("GpsGeometry BLOB,\n"); sql += wxT("GpsDirection DOUBLE, "); sql += wxT("GpsSatellites TEXT,\n"); sql += wxT("GpsTimestamp DOUBLE,\n"); sql += wxT("FromPath TEXT"); sql += wxT(")"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TABLE ExifPhoto error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // checking the ExifPhoto table for sanity ok_photoId = false; ok_photo = false; ok_pixelX = false; ok_pixelY = false; ok_cameraMake = false; ok_cameraModel = false; ok_shotDateTime = false; ok_gpsGeometry = false; ok_gpsDirection = false; ok_gpsTimestamp = false; ok_fromPath = false; ok_photoIdPk = false; err_pk = false; strcpy(xsql, "PRAGMA table_info(ExifPhoto)"); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("PRAGMA table_info(ExifPhoto) error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (atoi(results[(i * columns) + 5]) == 0) pKey = false; else pKey = true; if (strcasecmp(name, "PhotoId") == 0) ok_photoId = true; if (strcasecmp(name, "Photo") == 0) ok_photo = true; if (strcasecmp(name, "PixelX") == 0) ok_pixelX = true; if (strcasecmp(name, "PixelY") == 0) ok_pixelY = true; if (strcasecmp(name, "CameraMake") == 0) ok_cameraMake = true; if (strcasecmp(name, "CameraModel") == 0) ok_cameraModel = true; if (strcasecmp(name, "ShotDateTime") == 0) ok_shotDateTime = true; if (strcasecmp(name, "GpsGeometry") == 0) ok_gpsGeometry = true; if (strcasecmp(name, "GpsDirection") == 0) ok_gpsDirection = true; if (strcasecmp(name, "GpsTimestamp") == 0) ok_gpsTimestamp = true; if (strcasecmp(name, "FromPath") == 0) ok_fromPath = true; if (pKey == true) { if (strcasecmp(name, "PhotoId") == 0) ok_photoIdPk = true; else err_pk = true; } } } sqlite3_free_table(results); if (ok_photoId == true && ok_photo == true && ok_pixelX == true && ok_pixelY == true && ok_cameraMake == true && ok_cameraModel == true && ok_shotDateTime == true && ok_gpsGeometry == true && ok_gpsDirection == true && ok_gpsTimestamp == true && ok_fromPath == true && ok_photoIdPk == true && err_pk == false) ; else { wxMessageBox(wxT ("ERROR: table ExifPhoto already exists, but has incompatible columns"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // creating the ExifTags table sql = wxT("CREATE TABLE IF NOT EXISTS ExifTags (\n"); sql += wxT("PhotoId INTEGER NOT NULL,\n"); sql += wxT("TagId INTEGER NOT NULL,\n"); sql += wxT("TagName TEXT NOT NULL,\n"); sql += wxT("GpsTag INTEGER NOT NULL CHECK (GpsTag IN (0, 1)),\n"); sql += wxT ("ValueType INTEGER NOT NULL CHECK (ValueType IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)),\n"); sql += wxT("TypeName TEXT NOT NULL,\n"); sql += wxT("CountValues INTEGER NOT NULL,\n"); sql += wxT("PRIMARY KEY (PhotoId, TagId)"); sql += wxT(")"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TABLE ExifTags error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // checking the ExifTags table for sanity ok_photoId = false; ok_tagId = false; ok_tagName = false; ok_gpsTag = false; ok_valueType = false; ok_typeName = false; ok_countValues = false; ok_photoIdPk = false; ok_tagIdPk = false; err_pk = false; strcpy(xsql, "PRAGMA table_info(ExifTags)"); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("PRAGMA table_info(ExifTags) error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (atoi(results[(i * columns) + 5]) == 0) pKey = false; else pKey = true; if (strcasecmp(name, "PhotoId") == 0) ok_photoId = true; if (strcasecmp(name, "TagId") == 0) ok_tagId = true; if (strcasecmp(name, "TagName") == 0) ok_tagName = true; if (strcasecmp(name, "GpsTag") == 0) ok_gpsTag = true; if (strcasecmp(name, "ValueType") == 0) ok_valueType = true; if (strcasecmp(name, "TypeName") == 0) ok_typeName = true; if (strcasecmp(name, "CountValues") == 0) ok_countValues = true; if (pKey == true) { if (strcasecmp(name, "PhotoId") == 0) ok_photoIdPk = true; else if (strcasecmp(name, "TagId") == 0) ok_tagIdPk = true; else err_pk = true; } } } sqlite3_free_table(results); if (ok_photoId == true && ok_tagId == true && ok_tagName == true && ok_gpsTag == true && ok_valueType == true && ok_typeName == true && ok_countValues == true && ok_photoIdPk == true && ok_tagIdPk == true && err_pk == false) ; else { wxMessageBox(wxT ("ERROR: table ExifTags already exists, but has incompatible columns"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // creating the ExifValues table sql = wxT("CREATE TABLE IF NOT EXISTS ExifValues (\n"); sql += wxT("PhotoId INTEGER NOT NULL,\n"); sql += wxT("TagId INTEGER NOT NULL,\n"); sql += wxT("ValueIndex INTEGER NOT NULL,\n"); sql += wxT("ByteValue BLOB,\n"); sql += wxT("StringValue TEXT,\n"); sql += wxT("NumValue INTEGER,\n"); sql += wxT("NumValueBis INTEGER,\n"); sql += wxT("DoubleValue DOUBLE,\n"); sql += wxT("HumanReadable TEXT,\n"); sql += wxT("PRIMARY KEY (PhotoId, TagId, ValueIndex)"); sql += wxT(")"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TABLE ExifValues error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // checking the ExifValues table for sanity ok_photoId = false; ok_tagId = false; ok_valueIndex = false; ok_byteValue = false; ok_stringValue = false; ok_numValue = false; ok_numValueBis = false; ok_doubleValue = false; ok_humanReadable = false; ok_photoIdPk = false; ok_tagIdPk = false; ok_valueIndexPk = false; err_pk = false; strcpy(xsql, "PRAGMA table_info(ExifValues)"); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("PRAGMA table_info(ExifValues) error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (atoi(results[(i * columns) + 5]) == 0) pKey = false; else pKey = true; if (strcasecmp(name, "PhotoId") == 0) ok_photoId = true; if (strcasecmp(name, "TagId") == 0) ok_tagId = true; if (strcasecmp(name, "ValueIndex") == 0) ok_valueIndex = true; if (strcasecmp(name, "ByteValue") == 0) ok_byteValue = true; if (strcasecmp(name, "StringValue") == 0) ok_stringValue = true; if (strcasecmp(name, "NumValue") == 0) ok_numValue = true; if (strcasecmp(name, "NumValueBis") == 0) ok_numValueBis = true; if (strcasecmp(name, "DoubleValue") == 0) ok_doubleValue = true; if (strcasecmp(name, "HumanReadable") == 0) ok_humanReadable = true; if (pKey == true) { if (strcasecmp(name, "PhotoId") == 0) ok_photoIdPk = true; else if (strcasecmp(name, "TagId") == 0) ok_tagIdPk = true; else if (strcasecmp(name, "ValueIndex") == 0) ok_valueIndexPk = true; else err_pk = true; } } } sqlite3_free_table(results); if (ok_photoId == true && ok_tagId == true && ok_valueIndex == true && ok_byteValue == true && ok_stringValue == true && ok_numValue == true && ok_numValueBis == true && ok_doubleValue == true && ok_humanReadable == true && ok_photoIdPk == true && ok_tagIdPk == true && ok_valueIndexPk == true && err_pk == false) ; else { wxMessageBox(wxT ("ERROR: table ExifValues already exists, but has incompatible columns"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // creating the ExifView view sql = wxT("CREATE VIEW IF NOT EXISTS ExifMetadata AS\n"); sql += wxT("SELECT p.PhotoId AS PhotoId, "); sql += wxT("t.TagId AS TagId, "); sql += wxT("t.TagName AS TagName,"); sql += wxT("t.GpsTag AS GpsTag,\n"); sql += wxT("t.ValueType AS ValueType,"); sql += wxT("t.TypeName AS TypeName, "); sql += wxT("t.CountValues AS CountValues, "); sql += wxT("v.ValueIndex AS ValueIndex,\n"); sql += wxT("v.ByteValue AS ByteValue, "); sql += wxT("v.StringValue AS StringValue, "); sql += wxT("v.NumValue AS NumValue, "); sql += wxT("v.NumValueBis AS NumValueBis,\n"); sql += wxT("v.DoubleValue AS DoubleValue, "); sql += wxT("v.HumanReadable AS HumanReadable\n"); sql += wxT("FROM ExifPhoto AS p, ExifTags AS t, ExifValues AS v\n"); sql += wxT ("WHERE t.PhotoId = p.PhotoId AND v.PhotoId = t.PhotoId AND v.TagId = t.TagId"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE VIEW ExifMetadata error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } return true; abort: return false; } int MyFrame::ExifLoadDir(wxString & path, bool gps_only, bool metadata) { // // importing EXIF files from a whole DIRECTORY // #if defined(_WIN32) && !defined(__MINGW32__) /* Visual Studio .NET */ struct _finddata_t c_file; intptr_t hFile; int cnt = 0; wxString filePath; if (_chdir(path.ToUTF8()) < 0) return 0; if ((hFile = _findfirst("*.*", &c_file)) == -1L) ; else { while (1) { if ((c_file.attrib & _A_RDONLY) == _A_RDONLY || (c_file.attrib & _A_NORMAL) == _A_NORMAL) { filePath = path; filePath += wxT("/") + wxString::FromUTF8(c_file.name); cnt += ExifLoadFile(filePath, gps_only, metadata); } if (_findnext(hFile, &c_file) != 0) break; }; _findclose(hFile); } return cnt; #else /* not Visual Studio .NET */ int cnt = 0; wxString filePath; struct dirent *entry; DIR *dir = opendir(path.ToUTF8()); if (!dir) return 0; while (1) { // scanning dir-entries entry = readdir(dir); if (!entry) break; filePath = path; filePath += wxT("/") + wxString::FromUTF8(entry->d_name); cnt += ExifLoadFile(filePath, gps_only, metadata); } closedir(dir); return cnt; #endif } int MyFrame::ExifLoadFile(wxString & path, bool gps_only, bool metadata) { // // importing a single EXIF file // FILE *fl; int sz = 0; int rd; int loaded = 0; unsigned char *blob = NULL; gaiaExifTagListPtr tag_list = NULL; fl = fopen(path.ToUTF8(), "rb"); if (!fl) return 0; if (fseek(fl, 0, SEEK_END) == 0) sz = ftell(fl); if (sz > 14) { blob = (unsigned char *) malloc(sz); rewind(fl); rd = fread(blob, 1, sz, fl); if (rd == sz) { tag_list = gaiaGetExifTags(blob, sz); if (tag_list) { if (gps_only && IsExifGps(tag_list) == false) goto stop; if (UpdateExifTables(blob, sz, tag_list, metadata, path) == false) goto stop; loaded = 1; } } } stop: if (blob) free(blob); if (tag_list) gaiaExifTagsFree(tag_list); fclose(fl); return loaded; } bool MyFrame::IsExifGps(gaiaExifTagListPtr tag_list) { // // checks if this one is a GPS-tagged EXIF // bool gps_lat = false; bool gps_long = false; gaiaExifTagPtr pT = tag_list->First; while (pT) { if (pT->Gps && pT->TagId == 0x04) gps_long = true; if (pT->Gps && pT->TagId == 0x02) gps_lat = true; if (gps_long == true && gps_lat == true) return true; pT = pT->Next; } return false; } bool MyFrame::UpdateExifTables(unsigned char *blob, int sz, gaiaExifTagListPtr tag_list, bool metadata, wxString & path) { // // inserting an EXIF photo into the DB // int i; int iv; bool ok; int xok; int ok_human; char tag_name[128]; gaiaExifTagPtr pT; int ret; char sql[1024]; char human[1024]; wxString make; wxString model; wxString satellites; wxString date; wxString timestamp; char *errMsg = NULL; sqlite3_stmt *stmt; sqlite3_int64 pk = 0; sqlite3_int64 val64; double dblval; const char *type_desc; double longitude; double latitude; gaiaGeomCollPtr geom; unsigned char *geoblob; int geosize; // starts a transaction strcpy(sql, "BEGIN"); ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // feeding the ExifPhoto table; preparing the SQL statement strcpy(sql, "INSERT INTO ExifPhoto (PhotoId, Photo, PixelX, PixelY, CameraMake, CameraModel, "); strcat(sql, "ShotDateTime, GpsGeometry, GpsDirection, GpsSatellites, GpsTimestamp, FromPath) "); strcat(sql, "VALUES (NULL, ?, ?, ?, ?, ?, JulianDay(?), ?, ?, ?, JulianDay(?), ?)"); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { wxMessageBox(wxT("INSERT INTO ExifPhoto error: ") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } sqlite3_bind_blob(stmt, 1, blob, sz, SQLITE_STATIC); val64 = GetPixelX(tag_list, &ok); if (ok == true) sqlite3_bind_int64(stmt, 2, val64); else sqlite3_bind_null(stmt, 2); val64 = GetPixelY(tag_list, &ok); if (ok == true) sqlite3_bind_int64(stmt, 3, val64); else sqlite3_bind_null(stmt, 3); GetMake(tag_list, make, &ok); if (ok == true) sqlite3_bind_text(stmt, 4, make.ToUTF8(), make.Len(), SQLITE_TRANSIENT); else sqlite3_bind_null(stmt, 4); GetModel(tag_list, model, &ok); if (ok == true) sqlite3_bind_text(stmt, 5, model.ToUTF8(), model.Len(), SQLITE_TRANSIENT); else sqlite3_bind_null(stmt, 5); GetDate(tag_list, date, &ok); if (ok == true) sqlite3_bind_text(stmt, 6, date.ToUTF8(), date.Len(), SQLITE_TRANSIENT); else sqlite3_bind_text(stmt, 6, "0000-00-00 00:00:00", 19, SQLITE_TRANSIENT); GetGpsCoords(tag_list, &longitude, &latitude, &ok); if (ok == true) { geom = gaiaAllocGeomColl(); geom->Srid = 4326; gaiaAddPointToGeomColl(geom, longitude, latitude); gaiaToSpatiaLiteBlobWkb(geom, &geoblob, &geosize); gaiaFreeGeomColl(geom); sqlite3_bind_blob(stmt, 7, geoblob, geosize, SQLITE_TRANSIENT); free(geoblob); } else sqlite3_bind_null(stmt, 7); dblval = GetGpsDirection(tag_list, &ok); if (ok == true) sqlite3_bind_double(stmt, 8, dblval); else sqlite3_bind_null(stmt, 8); GetGpsSatellites(tag_list, satellites, &ok); if (ok == true) sqlite3_bind_text(stmt, 9, satellites.ToUTF8(), satellites.Len(), SQLITE_TRANSIENT); else sqlite3_bind_null(stmt, 9); GetGpsTimestamp(tag_list, timestamp, &ok); if (ok == true) sqlite3_bind_text(stmt, 10, timestamp.ToUTF8(), timestamp.Len(), SQLITE_TRANSIENT); else sqlite3_bind_text(stmt, 10, "0000-00-00 00:00:00", 19, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 11, path.ToUTF8(), path.Len(), SQLITE_TRANSIENT); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxMessageBox(wxT("sqlite3_step() error: ") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } sqlite3_finalize(stmt); pk = sqlite3_last_insert_rowid(SqliteHandle); if (metadata) { // feeding the ExifTags table; preparing the SQL statement strcpy(sql, "INSERT OR IGNORE INTO ExifTags (PhotoId, TagId, TagName, GpsTag, ValueType, "); strcat(sql, "TypeName, CountValues) VALUES (?, ?, ?, ?, ?, ?, ?)"); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { wxMessageBox(wxT("INSERT INTO ExifTags error: ") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } for (i = 0; i < gaiaGetExifTagsCount(tag_list); i++) { pT = gaiaGetExifTagByPos(tag_list, i); if (pT) { gaiaExifTagGetName(pT, tag_name, 128); switch (gaiaExifTagGetValueType(pT)) { case 1: type_desc = "BYTE"; break; case 2: type_desc = "STRING"; break; case 3: type_desc = "SHORT"; break; case 4: type_desc = "LONG"; break; case 5: type_desc = "RATIONAL"; break; case 6: type_desc = "SBYTE"; break; case 7: type_desc = "UNDEFINED"; break; case 8: type_desc = "SSHORT"; break; case 9: type_desc = "SLONG"; break; case 10: type_desc = "SRATIONAL"; break; case 11: type_desc = "FLOAT"; break; case 12: type_desc = "DOUBLE"; break; default: type_desc = "UNKNOWN"; break; }; // INSERTing an Exif Tag sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_int(stmt, 2, gaiaExifTagGetId(pT)); sqlite3_bind_text(stmt, 3, tag_name, strlen(tag_name), SQLITE_STATIC); sqlite3_bind_int(stmt, 4, gaiaIsExifGpsTag(pT)); sqlite3_bind_int(stmt, 5, gaiaExifTagGetValueType(pT)); sqlite3_bind_text(stmt, 6, type_desc, strlen(type_desc), SQLITE_STATIC); sqlite3_bind_int(stmt, 7, gaiaExifTagGetNumValues(pT)); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxMessageBox(wxT("sqlite3_step() error: ") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } } sqlite3_finalize(stmt); // feeding the ExifValues table; preparing the SQL statement strcpy(sql, "INSERT OR IGNORE INTO ExifValues (PhotoId, TagId, ValueIndex, ByteValue, "); strcat(sql, "StringValue, NumValue, NumValueBis, DoubleValue, HumanReadable) VALUES "); strcat(sql, "(?, ?, ?, ?, ?, ?, ?, ?, ?)"); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { wxMessageBox(wxT("NSERT INTO ExifValues error: ") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } for (i = 0; i < gaiaGetExifTagsCount(tag_list); i++) { pT = gaiaGetExifTagByPos(tag_list, i); if (pT) { gaiaExifTagGetHumanReadable(pT, human, 1024, &ok_human); for (iv = 0; iv < gaiaExifTagGetNumValues(pT); iv++) { // INSERTing an Exif Tag sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_int(stmt, 2, gaiaExifTagGetId(pT)); sqlite3_bind_int(stmt, 3, iv); if (gaiaExifTagGetValueType(pT) == 1 || gaiaExifTagGetValueType(pT) == 6 || gaiaExifTagGetValueType(pT) == 7) { sqlite3_bind_blob(stmt, 4, pT->ByteValue, pT->Count, SQLITE_STATIC); sqlite3_bind_null(stmt, 5); sqlite3_bind_null(stmt, 6); sqlite3_bind_null(stmt, 7); sqlite3_bind_null(stmt, 8); } if (gaiaExifTagGetValueType(pT) == 2) { sqlite3_bind_null(stmt, 4); sqlite3_bind_text(stmt, 5, pT->StringValue, strlen(pT->StringValue), SQLITE_STATIC); sqlite3_bind_null(stmt, 6); sqlite3_bind_null(stmt, 7); sqlite3_bind_null(stmt, 8); } if (gaiaExifTagGetValueType(pT) == 3) { sqlite3_bind_null(stmt, 4); sqlite3_bind_null(stmt, 5); val64 = gaiaExifTagGetShortValue(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 6); else sqlite3_bind_int64(stmt, 6, val64); sqlite3_bind_null(stmt, 7); sqlite3_bind_null(stmt, 8); } if (gaiaExifTagGetValueType(pT) == 4) { sqlite3_bind_null(stmt, 4); sqlite3_bind_null(stmt, 5); val64 = gaiaExifTagGetLongValue(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 6); else sqlite3_bind_int64(stmt, 6, val64); sqlite3_bind_null(stmt, 7); sqlite3_bind_null(stmt, 8); } if (gaiaExifTagGetValueType(pT) == 5) { sqlite3_bind_null(stmt, 4); sqlite3_bind_null(stmt, 5); val64 = gaiaExifTagGetRational1Value(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 6); else sqlite3_bind_int64(stmt, 6, val64); val64 = gaiaExifTagGetRational2Value(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 7); else sqlite3_bind_int64(stmt, 7, val64); dblval = gaiaExifTagGetRationalValue(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 8); else sqlite3_bind_double(stmt, 8, dblval); } if (gaiaExifTagGetValueType(pT) == 9) { sqlite3_bind_null(stmt, 4); sqlite3_bind_null(stmt, 5); val64 = gaiaExifTagGetSignedLongValue(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 6); else sqlite3_bind_int64(stmt, 6, val64); sqlite3_bind_null(stmt, 7); sqlite3_bind_null(stmt, 8); } if (gaiaExifTagGetValueType(pT) == 10) { sqlite3_bind_null(stmt, 4); sqlite3_bind_null(stmt, 5); val64 = gaiaExifTagGetSignedRational1Value(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 6); else sqlite3_bind_int64(stmt, 6, val64); val64 = gaiaExifTagGetSignedRational2Value(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 7); else sqlite3_bind_int64(stmt, 7, val64); dblval = gaiaExifTagGetSignedRationalValue(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 8); else sqlite3_bind_double(stmt, 8, dblval); } if (gaiaExifTagGetValueType(pT) == 11) { sqlite3_bind_null(stmt, 4); sqlite3_bind_null(stmt, 5); sqlite3_bind_null(stmt, 6); sqlite3_bind_null(stmt, 7); dblval = gaiaExifTagGetFloatValue(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 8); else sqlite3_bind_double(stmt, 8, dblval); } if (gaiaExifTagGetValueType(pT) == 12) { sqlite3_bind_null(stmt, 4); sqlite3_bind_null(stmt, 5); sqlite3_bind_null(stmt, 6); sqlite3_bind_null(stmt, 7); dblval = gaiaExifTagGetDoubleValue(pT, iv, &xok); if (!ok) sqlite3_bind_null(stmt, 8); else sqlite3_bind_double(stmt, 8, dblval); } if (!ok_human) sqlite3_bind_null(stmt, 9); else sqlite3_bind_text(stmt, 9, human, strlen(human), SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxMessageBox(wxT("sqlite3_step() error: ") + wxString::FromUTF8(sqlite3_errmsg (SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } if (gaiaExifTagGetValueType(pT) == 1 || gaiaExifTagGetValueType(pT) == 2 || gaiaExifTagGetValueType(pT) == 6 || gaiaExifTagGetValueType(pT) == 7) break; ok_human = 0; } } } sqlite3_finalize(stmt); } // commits the transaction strcpy(sql, "COMMIT"); ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } return true; abort: // rolling back the transaction strcpy(sql, "ROLLBACK"); ret = sqlite3_exec(SqliteHandle, sql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("ROLLBACK error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } return false; } sqlite3_int64 MyFrame::GetPixelX(gaiaExifTagListPtr tag_list, bool * ok) { // // trying to retrieve the ExifImageWidth // *ok = false; if (!tag_list) return 0; gaiaExifTagPtr tag = tag_list->First; while (tag) { if (tag->TagId == 0xA002) { // ok, this one is the ExifImageWidth tag if (tag->Type == 3 && tag->Count == 1) { *ok = true; return *(tag->ShortValues + 0); } else if (tag->Type == 4 && tag->Count == 1) { *ok = true; return *(tag->LongValues + 0); } } tag = tag->Next; } return false; } sqlite3_int64 MyFrame::GetPixelY(gaiaExifTagListPtr tag_list, bool * ok) { // // trying to retrieve the ExifImageLength // *ok = false; if (!tag_list) return 0; gaiaExifTagPtr tag = tag_list->First; while (tag) { if (tag->TagId == 0xA003) { // ok, this one is the ExifImageLength tag if (tag->Type == 3 && tag->Count == 1) { *ok = true; return *(tag->ShortValues + 0); } else if (tag->Type == 4 && tag->Count == 1) { *ok = true; return *(tag->LongValues + 0); } } tag = tag->Next; } return false; } void MyFrame::GetMake(gaiaExifTagListPtr tag_list, wxString & str, bool * ok) { // // trying to retrieve the Make // *ok = false; if (!tag_list) return; gaiaExifTagPtr tag = tag_list->First; while (tag) { if (tag->TagId == 0x010F) { // ok, this one is the Make tag if (tag->Type == 2) { *ok = true; str = wxString::FromUTF8(tag->StringValue); return; } } tag = tag->Next; } return; } void MyFrame::GetModel(gaiaExifTagListPtr tag_list, wxString & str, bool * ok) { // // trying to retrieve the Model // *ok = false; if (!tag_list) return; gaiaExifTagPtr tag = tag_list->First; while (tag) { if (tag->TagId == 0x0110) { // ok, this one is the Model tag if (tag->Type == 2) { *ok = true; str = wxString::FromUTF8(tag->StringValue); return; } } tag = tag->Next; } return; } void MyFrame::GetDate(gaiaExifTagListPtr tag_list, wxString & str, bool * ok) { // // trying to retrieve the Date // *ok = false; if (!tag_list) return; gaiaExifTagPtr tag = tag_list->First; while (tag) { if (tag->TagId == 0x9003) { // ok, this one is the DateTimeOriginal tag if (tag->Type == 2) { *ok = true; str = wxString::FromUTF8(tag->StringValue); if (str.Len() >= 19) { str.SetChar(4, '-'); str.SetChar(7, '-'); } return; } } tag = tag->Next; } return; } void MyFrame::GetGpsCoords(gaiaExifTagListPtr tag_list, double *longitude, double *latitude, bool * ok) { // // trying to retrieve the GPS coordinates // char lat_ref = '\0'; char long_ref = '\0'; double lat_degs = DBL_MIN; double lat_mins = DBL_MIN; double lat_secs = DBL_MIN; double long_degs = DBL_MIN; double long_mins = DBL_MIN; double long_secs = DBL_MIN; double dblval; double sign; double dblLatitude = DBL_MIN; double dblLongitude = DBL_MIN; int xok; wxString str; *ok = false; if (!tag_list) return; gaiaExifTagPtr tag = tag_list->First; while (tag) { if (tag->Gps && tag->TagId == 0x01) { // ok, this one is the GPSLatitudeRef tag if (tag->Type == 2) lat_ref = *(tag->StringValue); } if (tag->Gps && tag->TagId == 0x03) { // ok, this one is the GPSLongitudeRef tag if (tag->Type == 2) long_ref = *(tag->StringValue); } if (tag->Gps && tag->TagId == 0x02) { // ok, this one is the GPSLatitude tag if (tag->Type == 5 && tag->Count == 3) { dblval = gaiaExifTagGetRationalValue(tag, 0, &xok); if (xok) lat_degs = dblval; dblval = gaiaExifTagGetRationalValue(tag, 1, &xok); if (xok) lat_mins = dblval; dblval = gaiaExifTagGetRationalValue(tag, 2, &xok); if (xok) lat_secs = dblval; } if (tag->Type == 2) { str = wxString::FromUTF8(tag->StringValue); if (str.ToDouble(&dblval) == true) dblLatitude = dblval; } } if (tag->Gps && tag->TagId == 0x04) { // ok, this one is the GPSLongitude tag if (tag->Type == 5 && tag->Count == 3) { dblval = gaiaExifTagGetRationalValue(tag, 0, &xok); if (xok) long_degs = dblval; dblval = gaiaExifTagGetRationalValue(tag, 1, &xok); if (xok) long_mins = dblval; dblval = gaiaExifTagGetRationalValue(tag, 2, &xok); if (xok) long_secs = dblval; } if (tag->Type == 2) { str = wxString::FromUTF8(tag->StringValue); if (str.ToDouble(&dblval) == true) dblLongitude = dblval; } } tag = tag->Next; } if ((lat_ref == 'N' || lat_ref == 'S' || long_ref == 'E' || long_ref == 'W') && lat_degs != DBL_MIN && lat_mins != DBL_MIN && lat_secs != DBL_MIN && long_degs != DBL_MIN && long_mins != DBL_MIN && long_secs != DBL_MIN) { *ok = true; if (lat_ref == 'S') sign = -1.0; else sign = 1.0; lat_degs = math_round(lat_degs * 1000000.0); lat_mins = math_round(lat_mins * 1000000.0); lat_secs = math_round(lat_secs * 1000000.0); dblval = math_round(lat_degs + (lat_mins / 60.0) + (lat_secs / 3600.0)) * (sign / 1000000.0); *latitude = dblval; if (long_ref == 'W') sign = -1.0; else sign = 1.0; long_degs = math_round(long_degs * 1000000.0); long_mins = math_round(long_mins * 1000000.0); long_secs = math_round(long_secs * 1000000.0); dblval = math_round(long_degs + (long_mins / 60.0) + (long_secs / 3600.0)) * (sign / 1000000.0); *longitude = dblval; } else if (dblLatitude != DBL_MIN && dblLongitude != DBL_MIN) { *ok = true; *latitude = dblLatitude; *longitude = dblLongitude; } return; } void MyFrame::GetGpsSatellites(gaiaExifTagListPtr tag_list, wxString & str, bool * ok) { // // trying to retrieve the GPSSatellites // *ok = false; if (!tag_list) return; gaiaExifTagPtr tag = tag_list->First; while (tag) { if (tag->Gps && tag->TagId == 0x08) { // ok, this one is the GPSSatellites tag if (tag->Type == 2) { *ok = true; str = wxString::FromUTF8(tag->StringValue); return; } } tag = tag->Next; } return; } double MyFrame::GetGpsDirection(gaiaExifTagListPtr tag_list, bool * ok) { // // trying to retrieve the GPS direction // char dir_ref = '\0'; double direction = DBL_MIN; double dblval; int xok; *ok = false; if (!tag_list) return direction; gaiaExifTagPtr tag = tag_list->First; while (tag) { if (tag->Gps && tag->TagId == 0x10) { // ok, this one is the GPSDirectionRef tag if (tag->Type == 2) dir_ref = *(tag->StringValue); } if (tag->Gps && tag->TagId == 0x11) { // ok, this one is the GPSDirection tag if (tag->Type == 5 && tag->Count == 1) { dblval = gaiaExifTagGetRationalValue(tag, 0, &xok); if (xok) direction = dblval; } } tag = tag->Next; } if ((dir_ref == 'T' || dir_ref == 'M') && direction != DBL_MIN) *ok = true; return direction; } void MyFrame::GetGpsTimestamp(gaiaExifTagListPtr tag_list, wxString & str, bool * ok) { // // trying to retrieve the GPS Timestamp // char date[16]; char timestamp[32]; double hours = DBL_MIN; double mins = DBL_MIN; double secs = DBL_MIN; double dblval; int xok; int hh; int mm; int ss; int millis; *ok = false; if (!tag_list) return; strcpy(date, "0000-00-00"); gaiaExifTagPtr tag = tag_list->First; while (tag) { if (tag->Gps && tag->TagId == 0x1D) { // ok, this one is the GPSDateStamp tag if (tag->Type == 2) { strcpy(date, tag->StringValue); date[4] = '-'; date[7] = '-'; } } if (tag->Gps && tag->TagId == 0x07) { // ok, this one is the GPSTimeStamp tag if (tag->Type == 5 && tag->Count == 3) { dblval = gaiaExifTagGetRationalValue(tag, 0, &xok); if (xok) hours = dblval; dblval = gaiaExifTagGetRationalValue(tag, 1, &xok); if (xok) mins = dblval; dblval = gaiaExifTagGetRationalValue(tag, 2, &xok); if (xok) secs = dblval; } } tag = tag->Next; } if (hours != DBL_MIN && mins != DBL_MIN && secs != DBL_MIN) { *ok = true; hh = (int) floor(hours); mm = (int) floor(mins); ss = (int) floor(secs); millis = (int) ((secs - ss) * 1000); sprintf(timestamp, "%s %02d:%02d:%02d.%03d", date, hh, mm, ss, millis); str = wxString::FromUTF8(timestamp); } return; } void MyFrame::ImportXmlDocuments(wxString & path, bool folder, wxString & suffix, wxString & table, wxString & pkName, wxString & xmlColumn, wxString & inPathColumn, wxString & schemaUriColumn, wxString & parseErrColumn, wxString & validateErrColumn, int compressed, const char *schemaURI, bool isInternalSchemaUri) { // // trying to import XML Documents // int cnt; char msg[256]; wxString sql; sqlite3_stmt *stmt; char *errMsg; char xsql[8192]; char *qname; int ret; int failed; if (CheckOrCreateXmlTable (table, pkName, xmlColumn, inPathColumn, schemaUriColumn, parseErrColumn, validateErrColumn) == false) return; // preparing the SQL INSERT statement sql = wxT("INSERT OR IGNORE INTO \""); strcpy(xsql, table.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\" (\""); strcpy(xsql, pkName.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\", \""); strcpy(xsql, xmlColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); if (inPathColumn.Len() > 0) { // appending the InPath column sql += wxT("\", \""); strcpy(xsql, inPathColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); } if (schemaUriColumn.Len() > 0) { // appending the SchemaURI column sql += wxT("\", \""); strcpy(xsql, schemaUriColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); } if (parseErrColumn.Len() > 0) { // appending the ParseError column sql += wxT("\", \""); strcpy(xsql, parseErrColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); } if (validateErrColumn.Len() > 0) { // appending the ValidateError column sql += wxT("\", \""); strcpy(xsql, validateErrColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); } sql += wxT("\") VALUES (NULL, ?"); if (inPathColumn.Len() > 0) sql += wxT(", ?"); if (schemaUriColumn.Len() > 0) sql += wxT(", ?"); if (parseErrColumn.Len() > 0) sql += wxT(", ?"); if (validateErrColumn.Len() > 0) sql += wxT(", ?"); sql += wxT(")"); ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) { wxMessageBox(wxT("INSERT INTO XML target table error: ") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } // stating a transaction ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } if (folder == true) cnt = XmlDocumentLoadDir(path, suffix, compressed, schemaURI, isInternalSchemaUri, inPathColumn, parseErrColumn, validateErrColumn, schemaUriColumn, stmt, &failed); else cnt = XmlDocumentLoadFile(path, compressed, schemaURI, isInternalSchemaUri, inPathColumn, schemaUriColumn, parseErrColumn, validateErrColumn, stmt, &failed); // commits the transaction ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } sqlite3_finalize(stmt); sprintf(msg, "%d XML Document%s processed\n\n", cnt, (cnt > 1) ? "s were" : " was"); wxString message = wxString::FromUTF8(msg); sprintf(msg, "Valid XMLDocuments: %d\n", cnt - failed); message += wxString::FromUTF8(msg); sprintf(msg, "Failures: %d\n", failed); message += wxString::FromUTF8(msg); wxMessageBox(message, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } bool MyFrame::InsertIntoXmlTable(sqlite3_stmt * stmt, char *blob, int sz, wxString & inPathColumn, wxString & path, wxString & schemaUriColumn, const char *schemaUri, wxString & parseErrColumn, const char *parseError, wxString & validateErrColumn, const char *validateError) { // // attemping to insert into the XML target table // int ret; int i_col = 2; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, blob, sz, free); if (inPathColumn.Len() > 0) { // binding the InPath value char x_path[1024]; wxFileName fn = wxFileName(path); wxString name = fn.GetName(); if (fn.GetExt().Len() > 0) name += wxT(".") + fn.GetExt(); strcpy(x_path, name.ToUTF8()); sqlite3_bind_text(stmt, i_col++, x_path, strlen(x_path), SQLITE_TRANSIENT); } if (schemaUriColumn.Len() > 0) { // binding the SchemaURI value if (schemaUri == NULL) sqlite3_bind_null(stmt, i_col++); else sqlite3_bind_text(stmt, i_col++, schemaUri, strlen(schemaUri), SQLITE_STATIC); } if (parseErrColumn.Len() > 0) { // binding the ParseError value if (parseError == NULL) sqlite3_bind_null(stmt, i_col++); else sqlite3_bind_text(stmt, i_col++, parseError, strlen(parseError), SQLITE_STATIC); } if (validateErrColumn.Len() > 0) { // binding the ValidateError value if (validateError == NULL) sqlite3_bind_null(stmt, i_col++); else sqlite3_bind_text(stmt, i_col++, validateError, strlen(validateError), SQLITE_STATIC); } ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) return true; wxMessageBox(wxT("XML-INSERT: sqlite3_step() error: ") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return false; } bool MyFrame::CheckOrCreateXmlTable(wxString & table, wxString & pkName, wxString & xmlColumn, wxString & inPathColumn, wxString & schemaUriColumn, wxString & parseErrColumn, wxString & validateErrColumn) { // // creates the XML DB table / or checks an existing one for validity // int ret; wxString sql; char *errMsg; char xsql[8192]; char *qname; bool ok_xmlblob = false; bool ok_inPath = false; bool ok_schemaURI = false; bool ok_parseErr = false; bool ok_validateErr = false; const char *name; int i; char **results; int rows; int columns; sql = wxT("CREATE TABLE IF NOT EXISTS \""); strcpy(xsql, table.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\" (\n\""); strcpy(xsql, pkName.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\" INTEGER PRIMARY KEY AUTOINCREMENT,\n\""); strcpy(xsql, xmlColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\" BLOB NOT NULL"); if (inPathColumn.Len() > 0) { // adding the InPath Column sql += wxT("\n,\""); strcpy(xsql, inPathColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\" TEXT NOT NULL"); } if (schemaUriColumn.Len() > 0) { // adding the SchemaURI Column sql += wxT("\n,\""); strcpy(xsql, schemaUriColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\" TEXT"); } if (parseErrColumn.Len() > 0) { // adding the ParseError Column sql += wxT("\n,\""); strcpy(xsql, parseErrColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\" TEXT"); } if (validateErrColumn.Len() > 0) { // adding the validateError Column sql += wxT("\n,\""); strcpy(xsql, validateErrColumn.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\" TEXT"); } sql += wxT(")"); ret = sqlite3_exec(SqliteHandle, sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE XML Target Table error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } sql = wxT("PRAGMA table_info(\""); strcpy(xsql, table.ToUTF8()); qname = gaiaDoubleQuotedSql(xsql); sql += wxString::FromUTF8(qname); free(qname); sql += wxT("\")"); ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("PRAGMA table_info(xmlTargetTable) error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (rows < 1) ; else { strcpy(xsql, xmlColumn.ToUTF8()); for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (strcasecmp(name, xsql) == 0) ok_xmlblob = true; } if (schemaUriColumn.Len() == 0) ok_schemaURI = true; else { strcpy(xsql, schemaUriColumn.ToUTF8()); for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (strcasecmp(name, xsql) == 0) ok_schemaURI = true; } } if (inPathColumn.Len() == 0) ok_inPath = true; else { strcpy(xsql, inPathColumn.ToUTF8()); for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (strcasecmp(name, xsql) == 0) ok_inPath = true; } } if (parseErrColumn.Len() == 0) ok_parseErr = true; else { strcpy(xsql, parseErrColumn.ToUTF8()); for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (strcasecmp(name, xsql) == 0) ok_parseErr = true; } } if (validateErrColumn.Len() == 0) ok_validateErr = true; else { strcpy(xsql, validateErrColumn.ToUTF8()); for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (strcasecmp(name, xsql) == 0) ok_validateErr = true; } } } sqlite3_free_table(results); if (ok_xmlblob == true && ok_inPath == true && ok_schemaURI == true && ok_parseErr == true && ok_validateErr == true) ; else { wxMessageBox(wxT ("ERROR: XML target table already exists, but has incompatible columns"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } return true; abort: return false; } int MyFrame::XmlDocumentLoadDir(wxString & path, wxString & suffix, int compressed, const char *schemaURI, bool isInternalSchemaUri, wxString & inPathColumn, wxString & schemaUriColumn, wxString & parseErrColumn, wxString & validateErrColumn, sqlite3_stmt * stmt, int *failed) { // // importing XML Document files from a whole DIRECTORY // int fails; *failed = 0; #if defined(_WIN32) && !defined(__MINGW32__) /* Visual Studio .NET */ struct _finddata_t c_file; intptr_t hFile; int cnt = 0; wxString filePath; if (_chdir(path.ToUTF8()) < 0) return 0; if ((hFile = _findfirst("*.*", &c_file)) == -1L) ; else { while (1) { if ((c_file.attrib & _A_RDONLY) == _A_RDONLY || (c_file.attrib & _A_NORMAL) == _A_NORMAL) { if (IsValidSuffix(c_file.name, suffix)) { filePath = path; filePath += wxT("/") + wxString::FromUTF8(c_file.name); cnt += XmlDocumentLoadFile(filePath, compressed, schemaURI, isInternalSchemaUri, inPathColumn, schemaUriColumn, parseErrColumn, validateErrColumn, stmt, &fails); *failed += fails; } } if (_findnext(hFile, &c_file) != 0) break; }; _findclose(hFile); } return cnt; #else /* not Visual Studio .NET */ int cnt = 0; wxString filePath; struct dirent *entry; DIR *dir = opendir(path.ToUTF8()); if (!dir) return 0; while (1) { // scanning dir-entries entry = readdir(dir); if (!entry) break; if (IsValidSuffix(entry->d_name, suffix)) { filePath = path; filePath += wxT("/") + wxString::FromUTF8(entry->d_name); cnt += XmlDocumentLoadFile(filePath, compressed, schemaURI, isInternalSchemaUri, inPathColumn, schemaUriColumn, parseErrColumn, validateErrColumn, stmt, &fails); *failed += fails; } } closedir(dir); return cnt; #endif } bool MyFrame::IsValidSuffix(const char *fileName, wxString & suffix) { // testing if a FileName ends with the expected suffix if (suffix.Len() == 0) return true; char suf[1024]; strcpy(suf, suffix.ToUTF8()); int len1 = strlen(fileName); int len2 = strlen(suf); int off = len1 - len2; if (off >= 1) { if (strcasecmp(fileName + off, suf) == 0) return true; } return false; } int MyFrame::XmlDocumentLoadFile(wxString & path, int compressed, const char *schemaURI, bool isInternalSchemaUri, wxString & inPathColumn, wxString & schemaUriColumn, wxString & parseErrColumn, wxString & validateErrColumn, sqlite3_stmt * stmt, int *failed) { // // importing a single XML Document file // #ifdef ENABLE_LIBXML2 /* only if LIBXML2 is enabled */ FILE *fl; int sz = 0; int rd; int loaded = 0; unsigned char *blob = NULL; char *xml = NULL; int xml_size; char *parseError = NULL; char *validateError = NULL; char *p_schemaURI = NULL; int len; *failed = 0; fl = fopen(path.ToUTF8(), "rb"); if (!fl) return 0; if (fseek(fl, 0, SEEK_END) == 0) sz = ftell(fl); blob = (unsigned char *) malloc(sz); rewind(fl); rd = fread(blob, 1, sz, fl); if (rd == sz) { // attempting to parse (and possibly validate) the XMLDocument if (isInternalSchemaUri) { // attempting to retrieve an internally defined SchemaURI char *internalSchemaURI = gaiaXmlGetInternalSchemaURI(SpliteInternalCache, blob, rd); if (internalSchemaURI == NULL) { // unable to identify the SchemaURI xml = NULL; } else { // ok, attempting to validate using the internal SchemaURI len = strlen(internalSchemaURI); p_schemaURI = (char *) malloc(len + 1); strcpy(p_schemaURI, internalSchemaURI); gaiaXmlToBlob(SpliteInternalCache, blob, rd, compressed, internalSchemaURI, (unsigned char **) (&xml), &xml_size, &parseError, &validateError); free(internalSchemaURI); } } else { // possibly validating against the externally defined SchemaURI if (schemaURI) { len = strlen(schemaURI); p_schemaURI = (char *) malloc(len + 1); strcpy(p_schemaURI, schemaURI); } gaiaXmlToBlob(SpliteInternalCache, blob, rd, compressed, schemaURI, (unsigned char **) (&xml), &xml_size, &parseError, &validateError); } if (xml == NULL) { /* creating an empty BLOB as a placeholder */ xml_size = 1; xml = (char *) malloc(xml_size); *xml = '\0'; *failed = 1; } if (InsertIntoXmlTable (stmt, xml, xml_size, inPathColumn, path, schemaUriColumn, p_schemaURI, parseErrColumn, parseError, validateErrColumn, validateError) == false) goto stop; loaded = 1; } stop: if (p_schemaURI) free(p_schemaURI); if (blob) free(blob); fclose(fl); return loaded; #else wxMessageBox(wxT ("Sorry, spatialite_gui was built disabling LIBXML2\n\nUnsupported operation"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); #endif /* end LIBXML2 conditionals */ } void MyFrame::ImportDXFfiles(wxString & path, bool folder, wxString & prefix, wxString & layer, int srid, bool force2d, bool force3d, bool mixed, bool linked, bool unlinked, bool append) { // // trying to import DXF drawing files // int cnt; int failed; char msg[256]; if (folder == true) cnt = DxfLoadDir(path, prefix, layer, srid, force2d, force3d, mixed, linked, unlinked, append, &failed); else cnt = DxfLoadFile(path, prefix, layer, srid, force2d, force3d, mixed, linked, unlinked, append, &failed); wxString message = wxString::FromUTF8(msg); sprintf(msg, "Imported DXF files: %d\n", cnt - failed); message += wxString::FromUTF8(msg); sprintf(msg, "Failures: %d\n", failed); message += wxString::FromUTF8(msg); wxMessageBox(message, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } int MyFrame::DxfLoadDir(wxString & path, wxString & prefix, wxString & layer, int srid, bool force2d, bool force3d, bool mixed, bool linked, bool unlinked, bool append, int *failed) { // // importing DXF files from a whole DIRECTORY // wxString suffix = wxT(".dxf"); int fails; *failed = 0; #if defined(_WIN32) && !defined(__MINGW32__) /* Visual Studio .NET */ struct _finddata_t c_file; intptr_t hFile; int cnt = 0; wxString filePath; if (_chdir(path.ToUTF8()) < 0) return 0; if ((hFile = _findfirst("*.*", &c_file)) == -1L) ; else { while (1) { if ((c_file.attrib & _A_RDONLY) == _A_RDONLY || (c_file.attrib & _A_NORMAL) == _A_NORMAL) { if (IsValidSuffix(entry->d_name, suffix)) { filePath = path; filePath += wxT("/") + wxString::FromUTF8(c_file.name); cnt += DxfLoadFile(filePath, prefix, layer, srid, force2d, force3d, mixed, linked, unlinked, append, &fails); *failed += fails; } } if (_findnext(hFile, &c_file) != 0) break; }; _findclose(hFile); } return cnt; #else /* not Visual Studio .NET */ int cnt = 0; wxString filePath; struct dirent *entry; DIR *dir = opendir(path.ToUTF8()); if (!dir) return 0; while (1) { // scanning dir-entries entry = readdir(dir); if (!entry) break; if (IsValidSuffix(entry->d_name, suffix)) { filePath = path; filePath += wxT("/") + wxString::FromUTF8(entry->d_name); cnt += DxfLoadFile(filePath, prefix, layer, srid, force2d, force3d, mixed, linked, unlinked, append, &fails); *failed += fails; } } closedir(dir); return cnt; #endif } int MyFrame::DxfLoadFile(wxString & path, wxString & prefix, wxString & layer, int srid, bool force2d, bool force3d, bool mixed, bool linked, bool unlinked, bool append, int *failed) { // // importing a single DXF file // int force_dims = GAIA_DXF_AUTO_2D_3D; int special_rings = GAIA_DXF_RING_NONE; char dxf_path[1024]; char xprefix[1024]; const char *xxprefix = NULL; char selected_layer[1024]; const char *xselected_layer = NULL; gaiaDxfParserPtr dxf; *failed = 0; // creating a DXF parser if (prefix.Len() > 0) { strcpy(xprefix, prefix.ToUTF8()); xxprefix = xprefix; } if (layer.Len() > 0) { strcpy(selected_layer, layer.ToUTF8()); xselected_layer = selected_layer; } if (force2d) force_dims = GAIA_DXF_FORCE_2D; else if (force3d) force_dims = GAIA_DXF_FORCE_3D; if (linked) special_rings = GAIA_DXF_RING_LINKED; else if (unlinked) special_rings = GAIA_DXF_RING_UNLINKED; dxf = gaiaCreateDxfParser(srid, force_dims, xxprefix, xselected_layer, special_rings); if (dxf == NULL) { *failed = 1; goto stop; } // attempting to parse the DXF input file strcpy(dxf_path, path.ToUTF8()); if (gaiaParseDxfFile_r(GetSpliteInternalCache(), dxf, dxf_path)) { // loading into the DB int mode = GAIA_DXF_IMPORT_BY_LAYER; if (mixed) mode = GAIA_DXF_IMPORT_MIXED; if (!gaiaLoadFromDxfParser(GetSqlite(), dxf, mode, append)) { wxMessageBox(wxT("DB error while loading: ") + path, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); *failed = 1; } } else { wxMessageBox(wxT("Unable to parse: ") + path, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); *failed = 1; } stop: // destroying the DXF parser gaiaDestroyDxfParser(dxf); return 1; } spatialite_gui-2.0.0-devel/Makefile.in0000664000175000017500000010410612544013516014604 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = spatialite_gui$(EXEEXT) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_spatialite_gui_OBJECTS = BlobExplorer.$(OBJEXT) Dialogs.$(OBJEXT) \ DialogsGraph.$(OBJEXT) Exif.$(OBJEXT) Main.$(OBJEXT) \ MalformedGeoms.$(OBJEXT) Network.$(OBJEXT) Objects.$(OBJEXT) \ QueryView.$(OBJEXT) QueryViewComposer.$(OBJEXT) \ ResultSetView.$(OBJEXT) Shapefiles.$(OBJEXT) \ TableTree.$(OBJEXT) TextCsv.$(OBJEXT) Wfs.$(OBJEXT) \ Raster.$(OBJEXT) Styles.$(OBJEXT) RasterSymbolizers.$(OBJEXT) \ VectorSymbolizers1.$(OBJEXT) VectorSymbolizers2.$(OBJEXT) spatialite_gui_OBJECTS = $(am_spatialite_gui_OBJECTS) spatialite_gui_LDADD = $(LDADD) spatialite_gui_DEPENDENCIES = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(spatialite_gui_SOURCES) DIST_SOURCES = $(spatialite_gui_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README compile config.guess \ config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip GZIP_ENV = --best DIST_TARGETS = dist-gzip dist-zip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GEOSCONFIG = @GEOSCONFIG@ GEOS_CPPFLAGS = @GEOS_CPPFLAGS@ GEOS_LDFLAGS = @GEOS_LDFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEXL_CFLAGS = @LIBFREEXL_CFLAGS@ LIBFREEXL_LIBS = @LIBFREEXL_LIBS@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS = @OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WXCONFIG = @WXCONFIG@ WX_LIBS = @WX_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir) spatialite_gui_SOURCES = Classdef.h BlobExplorer.cpp \ Dialogs.cpp DialogsGraph.cpp Exif.cpp \ Main.cpp MalformedGeoms.cpp Network.cpp \ Objects.cpp QueryView.cpp QueryViewComposer.cpp \ ResultSetView.cpp Shapefiles.cpp TableTree.cpp \ TextCsv.cpp Wfs.cpp Raster.cpp Styles.cpp \ RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp LDADD = @WX_LIBS@ @LIBSPATIALITE_LIBS@ \ @LIBRASTERLITE2_LIBS@ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ -lgeos_c EXTRA_DIST = Makefile-static-MinGW \ Makefile-static-Linux \ Makefile-static-MacOsX \ indent_me AUTOMAKE_OPTIONS = dist-zip foreign SUBDIRS = icons win_resource mac_resource gnome_resource all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list spatialite_gui$(EXEEXT): $(spatialite_gui_OBJECTS) $(spatialite_gui_DEPENDENCIES) $(EXTRA_spatialite_gui_DEPENDENCIES) @rm -f spatialite_gui$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(spatialite_gui_OBJECTS) $(spatialite_gui_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BlobExplorer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Dialogs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DialogsGraph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Exif.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MalformedGeoms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Network.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Objects.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueryView.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueryViewComposer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Raster.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RasterSymbolizers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ResultSetView.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Shapefiles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Styles.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TableTree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TextCsv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VectorSymbolizers1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VectorSymbolizers2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Wfs.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-binPROGRAMS \ clean-cscope clean-generic clean-libtool cscope cscopelist-am \ ctags ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: spatialite_gui-2.0.0-devel/indent_me0000775000175000017500000000014112543275035014426 00000000000000indent -npsl -nbfda -l80 -i2 -ci2 -cbi2 -cp2 -ts2 -cli2 -bl -ce -lp -npcs -nut Classdef.h *.cpp spatialite_gui-2.0.0-devel/Wfs.cpp0000664000175000017500000013520512544026240014004 00000000000000/* / Wfs.cpp / WFS load data / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/clipbrd.h" bool WfsDialog::Create(MyFrame * parent, wxString & wfs_url, wxString & proxy) { // // creating the dialog // MainFrame = parent; if (wxDialog::Create(parent, wxID_ANY, wxT("Load data from WFS datasource")) == false) return false; CurrentEvtRow = -1; CurrentEvtColumn = -1; WfsGetCapabilitiesURL = wfs_url; if (WfsGetCapabilitiesURL.Len() == 0) WfsGetCapabilitiesURL = wxT("http://"); HttpProxy = proxy; if (HttpProxy.Len() == 0) ProxyEnabled = false; else ProxyEnabled = true; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); ProgressTimer = new wxTimer(this, ID_WFS_TIMER); ProgressTimer->Stop(); return true; } void WfsDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // HTTP Proxy wxStaticBox *proxyBox = new wxStaticBox(this, wxID_STATIC, wxT("HTTP Proxy"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *proxyBoxSizer = new wxStaticBoxSizer(proxyBox, wxHORIZONTAL); boxSizer->Add(proxyBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxCheckBox *enableProxyCtrl = new wxCheckBox(this, ID_WFS_ENABLE_PROXY, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableProxyCtrl->SetValue(ProxyEnabled); proxyBoxSizer->Add(enableProxyCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *proxyCtrl = new wxTextCtrl(this, ID_WFS_PROXY, HttpProxy, wxDefaultPosition, wxSize(600, 22)); proxyBoxSizer->Add(proxyCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); proxyCtrl->Enable(ProxyEnabled); // URL group box wxStaticBox *urlBox = new wxStaticBox(this, wxID_STATIC, wxT("WFS URL - GetCapabilities"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *urlBoxSizer = new wxStaticBoxSizer(urlBox, wxVERTICAL); boxSizer->Add(urlBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // First row: GetCapabilities URL wxBoxSizer *urlSizer = new wxBoxSizer(wxVERTICAL); urlBoxSizer->Add(urlSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *urlCtrl = new wxTextCtrl(this, ID_WFS_URL, WfsGetCapabilitiesURL, wxDefaultPosition, wxSize(680, 22)); urlSizer->Add(urlCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // command buttons wxBoxSizer *url2Sizer = new wxBoxSizer(wxHORIZONTAL); urlSizer->Add(url2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *catBox = new wxStaticBox(this, wxID_STATIC, wxT("WFS Catalog"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *catBoxSizer = new wxStaticBoxSizer(catBox, wxVERTICAL); url2Sizer->Add(catBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); catBoxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *query = new wxButton(this, ID_WFS_CATALOG, wxT("&Load")); okCancelBox->Add(query, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *reset = new wxButton(this, ID_WFS_RESET, wxT("&Reset")); reset->Enable(false); okCancelBox->Add(reset, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *quit = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(quit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // Keywords group box wxStaticBox *keyBox = new wxStaticBox(this, wxID_STATIC, wxT("Filter WFS Layers by Keyword"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *keyBoxSizer = new wxStaticBoxSizer(keyBox, wxVERTICAL); url2Sizer->Add(keyBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *keySizer = new wxBoxSizer(wxHORIZONTAL); keyBoxSizer->Add(keySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxComboBox *keyList = new wxComboBox(this, ID_WFS_KEYWORD, wxT(""), wxDefaultPosition, wxSize(200, 21), 0, NULL, wxCB_DROPDOWN); keyList->Enable(false); keySizer->Add(keyList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *filter = new wxButton(this, ID_WFS_KEYFILTER, wxT("&Apply")); filter->Enable(false); keySizer->Add(filter, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *keyReset = new wxButton(this, ID_WFS_KEYRESET, wxT("&Reset")); keyReset->Enable(false); keySizer->Add(keyReset, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // the Catalog Grid wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); WfsView = new wxGrid(this, wxID_ANY, wxPoint(5, 5), wxSize(700, 250)); WfsView->CreateGrid(1, 3); WfsView->EnableEditing(false); WfsView->SetColLabelValue(0, wxT("Name")); WfsView->SetColLabelValue(1, wxT("Title")); WfsView->SetColLabelValue(2, wxT("Abstract")); gridSizer->Add(WfsView, 0, wxALIGN_RIGHT | wxALL, 5); // seleted Layer group box wxStaticBox *lyrBox = new wxStaticBox(this, wxID_STATIC, wxT("Selected WFS Layer"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *lyrBoxSizer = new wxStaticBoxSizer(lyrBox, wxVERTICAL); boxSizer->Add(lyrBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // First row: WFS options wxBoxSizer *wfsSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(wfsSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString ver[4]; ver[0] = wxT("&1.0.0"); ver[1] = wxT("&1.1.0"); ver[2] = wxT("&2.0.0"); ver[3] = wxT("&2.0.2"); wxRadioBox *versionBox = new wxRadioBox(this, ID_WFS_VERSION, wxT("WFS &Version"), wxDefaultPosition, wxDefaultSize, 4, ver, 2, wxRA_SPECIFY_ROWS); versionBox->Enable(false); versionBox->SetSelection(1); wfsSizer->Add(versionBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString mode[2]; mode[0] = wxT("&single WFS request"); mode[1] = wxT("&using WFS paging"); wxRadioBox *pagingBox = new wxRadioBox(this, ID_WFS_PAGING, wxT("WFS &request"), wxDefaultPosition, wxDefaultSize, 2, mode, 2, wxRA_SPECIFY_ROWS); pagingBox->Enable(false); pagingBox->SetSelection(0); wfsSizer->Add(pagingBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *pageBox = new wxStaticBox(this, ID_WFS_PAGE, wxT("Monolithic WFS Request"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *pageBoxSizer = new wxStaticBoxSizer(pageBox, wxHORIZONTAL); wfsSizer->Add(pageBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticText *maxLabel = new wxStaticText(this, ID_WFS_LABEL, wxT("Max &Features limit:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); pageBoxSizer->Add(maxLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxCtrl = new wxTextCtrl(this, ID_WFS_MAX, wxT("-1"), wxDefaultPosition, wxSize(60, 22), wxTE_RIGHT); maxCtrl->Enable(false); pageBoxSizer->Add(maxCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *swapBox = new wxStaticBox(this, wxID_ANY, wxT("Swap Axes"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *swapBoxSizer = new wxStaticBoxSizer(swapBox, wxHORIZONTAL); wfsSizer->Add(swapBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *swapCtrl = new wxCheckBox(this, ID_WFS_SWAP, wxT("Swap Y,X"), wxDefaultPosition, wxDefaultSize); swapCtrl->SetValue(false); swapCtrl->Enable(false); swapBoxSizer->Add(swapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Second row: Layer and Srid wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(nameSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("WFS &Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_WFS_NAME, wxT(""), wxDefaultPosition, wxSize(400, 22), wxTE_READONLY); nameSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); nameSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxComboBox *sridList = new wxComboBox(this, ID_WFS_SRID, wxT(""), wxDefaultPosition, wxSize(100, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); sridList->Enable(false); nameSizer->Add(sridList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row: extra URL args wxBoxSizer *extraSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(extraSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *extraLabel = new wxStaticText(this, wxID_STATIC, wxT("&URL extra options:")); extraSizer->Add(extraLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *extraCtrl = new wxTextCtrl(this, ID_WFS_EXTRA, wxT(""), wxDefaultPosition, wxSize(550, 22)); extraCtrl->Enable(false); extraSizer->Add(extraCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: DB Table [target] wxBoxSizer *dbSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(dbSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table:")); dbSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_WFS_TABLE, wxT(""), wxDefaultPosition, wxSize(150, 22)); tableCtrl->Enable(false); dbSizer->Add(tableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticText *pkLabel = new wxStaticText(this, wxID_STATIC, wxT("Primary &Key:")); dbSizer->Add(pkLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxComboBox *pkList = new wxComboBox(this, ID_WFS_PK, wxT(""), wxDefaultPosition, wxSize(250, 21), 0, NULL, wxCB_DROPDOWN); pkList->Enable(false); dbSizer->Add(pkList, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *rtreeCtrl = new wxCheckBox(this, ID_WFS_RTREE, wxT("Spatial Index"), wxDefaultPosition, wxDefaultSize); rtreeCtrl->SetValue(false); rtreeCtrl->Enable(false); dbSizer->Add(rtreeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fifth row: status and start button wxBoxSizer *statusSizer = new wxBoxSizer(wxHORIZONTAL); lyrBoxSizer->Add(statusSizer, 0, wxALIGN_LEFT | wxALL, 0); wxButton *load = new wxButton(this, ID_WFS_LOAD, wxT("&Load data")); load->Enable(false); statusSizer->Add(load, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); Progress = new wxGauge(this, wxID_ANY, 20, wxDefaultPosition, wxSize(200, 21)); statusSizer->Add(Progress, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticText *statusLabel = new wxStaticText(this, ID_WFS_STATUS, wxT(""), wxDefaultPosition, wxSize(300, 21)); statusSizer->Add(statusLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handlers Connect(wxID_ANY, wxEVT_GRID_CELL_LEFT_CLICK, (wxObjectEventFunction) & WfsDialog::OnLeftClick); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & WfsDialog::OnRightClick); Connect(ID_WFS_ENABLE_PROXY, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & WfsDialog::OnProxy); Connect(ID_WFS_PAGING, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & WfsDialog::OnPagingChanged); Connect(ID_WFS_CATALOG, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WfsDialog::OnCatalog); Connect(ID_WFS_RESET, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WfsDialog::OnReset); Connect(ID_WFS_KEYFILTER, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WfsDialog::OnKeyFilter); Connect(ID_WFS_KEYRESET, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WfsDialog::OnKeyReset); Connect(ID_WFS_LOAD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WfsDialog::OnLoadFromWfs); Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WfsDialog::OnQuit); Connect(Wfs_Copy, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & WfsDialog::OnCmdCopy); Connect(Wfs_Layer, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & WfsDialog::OnCmdSelectLayer); Connect(ID_WFS_THREAD_FINISHED, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & WfsDialog::OnThreadFinished); // // setting up a Timer event handler for Refresh // Connect(ID_WFS_TIMER, wxEVT_TIMER, wxTimerEventHandler(WfsDialog::OnRefreshTimer), NULL, this); } void WfsDialog::OnRefreshTimer(wxTimerEvent & WXUNUSED(event)) { // // Refreshing the Progress status // if (Params.GetProgressCount() > Params.GetLastProgressCount()) { Params.SetLastProgressCount(); ProgressUpdate(Params.GetProgressCount()); } Progress->Show(true); Progress->Pulse(); // // restarting the timer // ProgressTimer->Start(500, wxTIMER_ONE_SHOT); } void WfsDialog::OnCmdCopy(wxCommandEvent & WXUNUSED(event)) { // // copying all WFS Layer definitions into the clipboard // wxString copyData; int row; int col; for (row = 0; row < WfsView->GetNumberRows(); row++) { for (col = 0; col < WfsView->GetNumberCols(); col++) { if (col != 0) copyData += wxT("\t"); copyData += WfsView->GetCellValue(row, col); } copyData += wxT("\n"); } if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(copyData)); wxTheClipboard->Close(); } } void WfsDialog::OnCmdSelectLayer(wxCommandEvent & WXUNUSED(event)) { // // setting the currently selected WFS Layer // SelectLayer(); } void WfsDialog::SelectLayer() { // // setting the currently selected WFS Layer // WfsView->Show(false); WfsView->ClearSelection(); WfsView->SelectRow(CurrentEvtRow); WfsView->Show(true); wxString name = WfsView->GetCellValue(CurrentEvtRow, 0); gaiaWFSitemPtr layer = FindLayerByName(name); if (layer == NULL) return; wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_WFS_NAME); wxString lyr_name; const char *x_name = get_wfs_item_name(layer); lyr_name = wxString::FromUTF8(x_name); nameCtrl->SetValue(lyr_name); wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID); comboCtrl->Clear(); int maxSrid = get_wfs_layer_srid_count(layer); for (int s = 0; s < maxSrid; s++) { wxString str; str.Printf(wxT("%d"), get_wfs_layer_srid(layer, s)); comboCtrl->Append(str); } comboCtrl->SetSelection(0); comboCtrl->Enable(true); wxRadioBox *versionBox = (wxRadioBox *) FindWindow(ID_WFS_VERSION); const char *version = get_wfs_version(Catalog); versionBox->Enable(true); if (version == NULL) versionBox->SetSelection(1); else { if (strcmp(version, "1.0.0") == 0) versionBox->SetSelection(0); else if (strcmp(version, "2.0.0") == 0) versionBox->SetSelection(2); else if (strcmp(version, "2.0.2") == 0) versionBox->SetSelection(3); else versionBox->SetSelection(1); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX); maxCtrl->SetValue(wxT("100")); maxCtrl->Enable(true); wxStaticText *maxLabel = (wxStaticText *) FindWindow(ID_WFS_LABEL); maxLabel->SetLabel(wxT("FeaturesPerPage")); wxStaticBox *pageBox = (wxStaticBox *) FindWindow(ID_WFS_PAGE); pageBox->SetLabel(wxT("Multiple WFS Paged Requests")); wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING); pagingCtrl->SetSelection(1); pagingCtrl->Enable(true); wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_WFS_TABLE); tableCtrl->SetValue(wxT("")); tableCtrl->Enable(true); wxTextCtrl *extraCtrl = (wxTextCtrl *) FindWindow(ID_WFS_EXTRA); extraCtrl->SetValue(wxT("")); extraCtrl->Enable(true); wxComboBox *pkList = (wxComboBox *) FindWindow(ID_WFS_PK); pkList->Clear(); pkList->Append(wxT("")); char *url = get_wfs_describe_url(Catalog, x_name, NULL); if (url != NULL) { gaiaWFSschemaPtr schema = create_wfs_schema(url, (char *) x_name, NULL); if (schema != NULL) { int maxCol = get_wfs_schema_column_count(schema); for (int c = 0; c < maxCol; c++) { gaiaWFScolumnPtr column = get_wfs_schema_column(schema, c); if (column != NULL) { const char *name; int type; int nillable; if (get_wfs_schema_column_info (column, &name, &type, &nillable) != 0) { wxString str = wxString::FromUTF8(name); pkList->Append(str); } } } destroy_wfs_schema(schema); } free(url); } pkList->SetSelection(0); pkList->Enable(true); wxCheckBox *rtreeCtrl = (wxCheckBox *) FindWindow(ID_WFS_RTREE); rtreeCtrl->SetValue(true); rtreeCtrl->Enable(true); wxCheckBox *swapCtrl = (wxCheckBox *) FindWindow(ID_WFS_SWAP); long srid = -1; comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID); int idSel = comboCtrl->GetSelection(); if (idSel != wxNOT_FOUND) { if (comboCtrl->GetString(idSel).ToLong(&srid) == false) srid = -1; } if (srid > 0) { int flipped = 0; if (!srid_has_flipped_axes(MainFrame->GetSqlite(), srid, &flipped)) swapCtrl->SetValue(false); else { if (flipped) swapCtrl->SetValue(true); else swapCtrl->SetValue(false); } } else swapCtrl->SetValue(false); swapCtrl->Enable(true); wxButton *load = (wxButton *) FindWindow(ID_WFS_LOAD); load->Enable(true); } gaiaWFSitemPtr WfsDialog::FindLayerByName(wxString & name) { // // retrieving a WFS Layer from the Catalog by its name // int nLayers = get_wfs_catalog_count(Catalog); for (int i = 0; i < nLayers; i++) { gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i); wxString lyr_name; const char *x_name = get_wfs_item_name(layer); lyr_name = wxString::FromUTF8(x_name); if (name.Cmp(lyr_name) == 0) return layer; } return NULL; } void WfsDialog::OnLeftClick(wxGridEvent & event) { // // left click on some cell [mouse action] // int previous = CurrentEvtRow; CurrentEvtRow = event.GetRow(); CurrentEvtColumn = event.GetCol(); if (CurrentEvtRow != previous) SelectLayer(); } void WfsDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentEvtRow = event.GetRow(); CurrentEvtColumn = event.GetCol(); menuItem = new wxMenuItem(&menu, Wfs_Layer, wxT("Select as the current WFS &Layer")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Wfs_Copy, wxT("&Copy the whole WFS Catalog")); menu.Append(menuItem); WfsView->PopupMenu(&menu, pt); } void WfsDialog::OnPagingChanged(wxCommandEvent & WXUNUSED(event)) { // // Monolithic / Paged selection changed // wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX); wxStaticText *maxLabel = (wxStaticText *) FindWindow(ID_WFS_LABEL); wxStaticBox *pageBox = (wxStaticBox *) FindWindow(ID_WFS_PAGE); switch (pagingCtrl->GetSelection()) { case 0: maxCtrl->SetValue(wxT("-1")); maxLabel->SetLabel(wxT("Max &Features limit:")); pageBox->SetLabel(wxT("Monolithic WFS Request")); break; case 1: maxCtrl->SetValue(wxT("100")); maxLabel->SetLabel(wxT("FeaturesPerPage:")); pageBox->SetLabel(wxT("Multiple WFS Paged Requests")); break; }; } void WfsDialog::ResetProgress() { // resetting the Progress label wxStaticText *status = (wxStaticText *) FindWindow(ID_WFS_STATUS); status->SetLabel(wxT("")); status->Refresh(); status->Update(); } void WfsDialog::ProgressWait() { // monolithic download wxStaticText *status = (wxStaticText *) FindWindow(ID_WFS_STATUS); status->SetLabel(wxT(" Please wait ... WFS download in progress")); status->Refresh(); status->Update(); } void WfsDialog::ProgressUpdate(int rows) { // updating the current status (WFS paging) wxStaticText *status = (wxStaticText *) FindWindow(ID_WFS_STATUS); wxString msg; msg.Printf(wxT(" WFS Features loaded since now: %d"), rows); status->SetLabel(msg); status->Refresh(); status->Update(); } void WfsCallback(int rows, void *ptr) { // progress callback supporting WFS Paging int *p = (int *) ptr; *p = rows; } #ifdef _WIN32 DWORD WINAPI DoExecuteWfs(void *arg) #else void *DoExecuteWfs(void *arg) #endif { // // threaded function: processing a WFS download // WfsParams *params = (WfsParams *) arg; char *err_msg = NULL; int rows; char url[8196]; char alt_describe[4192]; char layer_name[1024]; char table[1024]; char pk[1024]; char *pk_ref = pk; wxString wUrl = params->GetUrl(); wxString altDescribe = params->GetAltDescribeUri(); if (params->GetExtra().Len() > 0) { // appending extra arguments to URL */ if (wUrl.EndsWith(wxT("&")) == true || params->GetExtra().StartsWith(wxT("&")) == true) wUrl += params->GetExtra(); else wUrl += wxT("&") + params->GetExtra(); } strcpy(url, wUrl.ToUTF8()); strcpy(alt_describe, altDescribe.ToUTF8()); strcpy(layer_name, params->GetLayerName().ToUTF8()); strcpy(table, params->GetTable().ToUTF8()); wxString pkey = params->GetPrimaryKey(); if (pkey.Len() == 0) pk_ref = NULL; else strcpy(pk, pkey.ToUTF8()); int ret = load_from_wfs_paged(params->GetSqlite(), url, alt_describe, layer_name, params->GetSwapAxes(), table, pk_ref, params->GetSpatialIndex(), params->GetPageSize(), &rows, &err_msg, params->GetCallback(), params->GetProgressCountPtr()); params->SetRet(ret); params->SetErrMsg(err_msg); params->SetRows(rows); wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_WFS_THREAD_FINISHED); params->GetMother()->GetEventHandler()->AddPendingEvent(event); #ifdef _WIN32 return 0; #else pthread_exit(NULL); #endif } void WfsDialog::OnLoadFromWfs(wxCommandEvent & WXUNUSED(event)) { // // attempting to load data from WFS // #ifdef _WIN32 HANDLE thread_handle; DWORD dwThreadId; #else pthread_t thread_id; #endif wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_WFS_NAME); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX); wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_WFS_TABLE); wxString name = nameCtrl->GetValue(); wxTextCtrl *extraCtrl = (wxTextCtrl *) FindWindow(ID_WFS_EXTRA); wxString extra = extraCtrl->GetValue(); wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING); long max = -1; long page = 100; if (pagingCtrl->GetSelection() == 1) { max = -1; if (maxCtrl->GetValue().ToLong(&page) == false) page = 100; } else { page = -1; if (maxCtrl->GetValue().ToLong(&max) == false) max = -1; } long srid = -1; wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID); int idSel = comboCtrl->GetSelection(); if (idSel != wxNOT_FOUND) { if (comboCtrl->GetString(idSel).ToLong(&srid) == false) srid = -1; } wxRadioBox *versionCtrl = (wxRadioBox *) FindWindow(ID_WFS_VERSION); const char *version = "1.1.0"; if (versionCtrl->GetSelection() == 0) version = "1.0.0"; else if (versionCtrl->GetSelection() == 2) version = "2.0.0"; else if (versionCtrl->GetSelection() == 3) version = "2.0.2"; wxString table = tableCtrl->GetValue(); if (table.Len() < 1) { wxMessageBox(wxT ("You must specify some DB Table name [destination target] !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxComboBox *pkList = (wxComboBox *) FindWindow(ID_WFS_PK); wxString pk = pkList->GetValue(); char xname[1024]; strcpy(xname, name.ToUTF8()); int rtree = 0; wxCheckBox *rtreeCtrl = (wxCheckBox *) FindWindow(ID_WFS_RTREE); if (rtreeCtrl->GetValue()) rtree = 1; int swap_axes = 0; wxCheckBox *swapCtrl = (wxCheckBox *) FindWindow(ID_WFS_SWAP); if (swapCtrl->GetValue()) swap_axes = 1; char *xurl = get_wfs_request_url(Catalog, xname, version, srid, max); wxString url = wxString::FromUTF8(xurl); free(xurl); char *xalt_describe = get_wfs_describe_url(Catalog, xname, version); wxString alt_describe = wxString::FromUTF8(xalt_describe); free(xalt_describe); ::wxBeginBusyCursor(); ProgressWait(); Params.Initialize(this, MainFrame->GetSqlite(), url, alt_describe, name, swap_axes, table, pk, rtree, page, extra, WfsCallback); ProgressTimer->Start(500, wxTIMER_ONE_SHOT); Enable(false); if (ProxyEnabled == true && HttpProxy.Len() > 0) { // setting up the HTTP Proxy #ifdef _WIN32 char *p = new char[HttpProxy.Len() + 1]; strcpy(p, HttpProxy.ToUTF8()); char *proxy_str = sqlite3_mprintf("http_proxy=%s", p); delete[]p; PreviousHttpProxy = wxString::FromUTF8(getenv("http_proxy")); _putenv(proxy_str); sqlite3_free(proxy_str); #else /* not Windows */ char *proxy_str = new char[HttpProxy.Len() + 1]; strcpy(proxy_str, HttpProxy.ToUTF8()); PreviousHttpProxy = wxString::FromUTF8(getenv("http_proxy")); setenv("http_proxy", proxy_str, 1); delete[]proxy_str; #endif } #ifdef _WIN32 thread_handle = CreateThread(NULL, 0, DoExecuteWfs, &Params, 0, &dwThreadId); SetThreadPriority(thread_handle, THREAD_PRIORITY_IDLE); #else int ok_prior = 0; int policy; int min_prio; pthread_attr_t attr; struct sched_param sp; pthread_attr_init(&attr); if (pthread_attr_setschedpolicy(&attr, SCHED_RR) == 0) { // attempting to set the lowest priority if (pthread_attr_getschedpolicy(&attr, &policy) == 0) { min_prio = sched_get_priority_min(policy); sp.sched_priority = min_prio; if (pthread_attr_setschedparam(&attr, &sp) == 0) { // ok, setting the lowest priority ok_prior = 1; pthread_create(&thread_id, &attr, DoExecuteWfs, &Params); } } } if (!ok_prior) { // failure: using standard priority pthread_create(&thread_id, NULL, DoExecuteWfs, &Params); } #endif } void WfsDialog::OnThreadFinished(wxCommandEvent & WXUNUSED(event)) { // resuming execution when WFS thread quits char url[1024]; char xtable[1024]; int ret = Params.GetRet(); char *err_msg = Params.GetErrMsg(); int rows = Params.GetRows(); strcpy(url, Params.GetUrl().ToUTF8()); strcpy(xtable, Params.GetTable().ToUTF8()); Enable(true); ProgressTimer->Stop(); Progress->SetValue(0); Progress->Hide(); ResetProgress(); ::wxEndBusyCursor(); if (ret == 0) { char *xmsg; if (err_msg == NULL) xmsg = sqlite3_mprintf("Unable to load data from WFS:\nUnkwnon cause"); else xmsg = sqlite3_mprintf("Unable to load data from WFS:\n%s", err_msg); wxString msg = wxString::FromUTF8(xmsg); sqlite3_free(xmsg); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { MainFrame->InitTableTree(); char *xmsg = sqlite3_mprintf("inserted %d rows from WFS into table \"%s\"", rows, xtable); wxString msg = wxString::FromUTF8(xmsg); sqlite3_free(xmsg); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } if (err_msg) free(err_msg); if (ProxyEnabled == true) { #ifdef _WIN32 _putenv("http_proxy="); #else /* not Windows */ unsetenv("http_proxy"); #endif if (PreviousHttpProxy.Len() > 0) { #ifdef _WIN32 char *p = new char[PreviousHttpProxy.Len() + 1]; strcpy(p, PreviousHttpProxy.ToUTF8()); char *proxy_str = sqlite3_mprintf("http_proxy=%s", p); delete[]p; _putenv(proxy_str); sqlite3_free(proxy_str); #else /* not Windows */ char *proxy_str = new char[PreviousHttpProxy.Len() + 1]; strcpy(proxy_str, PreviousHttpProxy.ToUTF8()); setenv("http_proxy", proxy_str, 1); delete[]proxy_str; #endif } } } void WfsDialog::OnCatalog(wxCommandEvent & WXUNUSED(event)) { // // attempting to create a WFS Catalog from GetCapabilities // wxCheckBox *enableProxyCtrl = (wxCheckBox *) FindWindow(ID_WFS_ENABLE_PROXY); wxTextCtrl *proxyCtrl = (wxTextCtrl *) FindWindow(ID_WFS_PROXY); if (ProxyEnabled == true) { HttpProxy = proxyCtrl->GetValue(); if (HttpProxy.Len() == 0) { wxMessageBox(wxT("You must specify some HTTP Proxy URL !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } wxTextCtrl *urlCtrl = (wxTextCtrl *) FindWindow(ID_WFS_URL); wxButton *catalogBtn = (wxButton *) FindWindow(ID_WFS_CATALOG); wxButton *resetBtn = (wxButton *) FindWindow(ID_WFS_RESET); WfsGetCapabilitiesURL = urlCtrl->GetValue(); if (WfsGetCapabilitiesURL.Len() < 1) { wxMessageBox(wxT("You must specify some WFS GetCapabilities URL !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (WfsGetCapabilitiesURL.EndsWith(wxT("?"))) { // auto-completing the GetCapabilities URL WfsGetCapabilitiesURL += wxT("SERVICE=WFS&REQUEST=GetCapabilities"); urlCtrl->SetValue(WfsGetCapabilitiesURL); } char xurl[1024]; char *err_msg; if (ProxyEnabled == true && HttpProxy.Len() > 0) { // setting up the HTTP Proxy #ifdef _WIN32 char *p = new char[HttpProxy.Len() + 1]; strcpy(p, HttpProxy.ToUTF8()); char *proxy_str = sqlite3_mprintf("http_proxy=%s", p); delete[]p; PreviousHttpProxy = wxString::FromUTF8(getenv("http_proxy")); _putenv(proxy_str); sqlite3_free(proxy_str); #else /* not Windows */ char *proxy_str = new char[HttpProxy.Len() + 1]; strcpy(proxy_str, HttpProxy.ToUTF8()); PreviousHttpProxy = wxString::FromUTF8(getenv("http_proxy")); setenv("http_proxy", proxy_str, 1); delete[]proxy_str; #endif } strcpy(xurl, WfsGetCapabilitiesURL.ToUTF8()); Catalog = create_wfs_catalog(xurl, &err_msg); if (Catalog == NULL) { wxString msg = wxString::FromUTF8(err_msg); wxMessageBox(wxT("unable to get a WFS Catalog\n\n") + msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { enableProxyCtrl->Enable(false); proxyCtrl->Enable(false); int nLayers = get_wfs_catalog_count(Catalog); WfsView->Show(false); WfsView->ClearSelection(); CurrentEvtRow = -1; CurrentEvtColumn = -1; if (nLayers > 1) WfsView->AppendRows(nLayers - 1); for (int i = 0; i < nLayers; i++) { // populating the WFS Catalog gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i); wxString name; wxString title; wxString abstract; const char *x_name = get_wfs_item_name(layer); const char *x_title = get_wfs_item_title(layer); const char *x_abstract = get_wfs_item_abstract(layer); name = wxString::FromUTF8(x_name); if (x_title != NULL) title = wxString::FromUTF8(x_title); if (x_abstract != NULL) abstract = wxString::FromUTF8(x_abstract); WfsView->SetCellValue(i, 0, name); WfsView->SetCellValue(i, 1, title); WfsView->SetCellValue(i, 2, abstract); } WfsView->SetRowLabelSize(wxGRID_AUTOSIZE); WfsView->AutoSize(); WfsView->SetSize(690, 240); WfsView->Show(true); urlCtrl->Enable(false); catalogBtn->Enable(false); resetBtn->Enable(true); Keywords = new WfsKeywords(); for (int i = 0; i < nLayers; i++) { // populating the Keywords dictionary gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i); int kw = get_wfs_keyword_count(layer); for (int k = 0; k < kw; k++) Keywords->Add(get_wfs_keyword(layer, k)); } Keywords->Sort(); wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_KEYWORD); comboCtrl->Clear(); comboCtrl->Append(wxT("")); int maxKey = Keywords->GetMaxSorted(); for (int i = 0; i < maxKey; i++) { WfsKey *key = Keywords->GetKey(i); if (key != NULL) { // populating the Keywords ComboBox comboCtrl->Append(key->GetKeyword()); } } comboCtrl->Enable(true); wxButton *filterBtn = (wxButton *) FindWindow(ID_WFS_KEYFILTER); filterBtn->Enable(true); wxButton *keyResetBtn = (wxButton *) FindWindow(ID_WFS_KEYRESET); keyResetBtn->Enable(true); } if (err_msg != NULL) free(err_msg); if (ProxyEnabled == true) { #ifdef _WIN32 _putenv("http_proxy="); #else /* not Windows */ unsetenv("http_proxy"); #endif if (PreviousHttpProxy.Len() > 0) { #ifdef _WIN32 char *p = new char[PreviousHttpProxy.Len() + 1]; strcpy(p, PreviousHttpProxy.ToUTF8()); char *proxy_str = sqlite3_mprintf("http_proxy=%s", p); delete[]p; _putenv(proxy_str); sqlite3_free(proxy_str); #else /* not Windows */ char *proxy_str = new char[PreviousHttpProxy.Len() + 1]; strcpy(proxy_str, PreviousHttpProxy.ToUTF8()); setenv("http_proxy", proxy_str, 1); delete[]proxy_str; #endif } } MainFrame->SetHttpProxy(HttpProxy); MainFrame->SetWfsGetCapabilitiesURL(WfsGetCapabilitiesURL); } void WfsDialog::OnReset(wxCommandEvent & WXUNUSED(event)) { // // resetting to initial empty state // wxTextCtrl *urlCtrl = (wxTextCtrl *) FindWindow(ID_WFS_URL); wxButton *catalogBtn = (wxButton *) FindWindow(ID_WFS_CATALOG); wxButton *resetBtn = (wxButton *) FindWindow(ID_WFS_RESET); wxCheckBox *enableProxyCtrl = (wxCheckBox *) FindWindow(ID_WFS_ENABLE_PROXY); wxTextCtrl *proxyCtrl = (wxTextCtrl *) FindWindow(ID_WFS_PROXY); enableProxyCtrl->Enable(true); if (ProxyEnabled == true) proxyCtrl->Enable(true); if (Catalog != NULL) destroy_wfs_catalog(Catalog); Catalog = NULL; urlCtrl->Enable(true); catalogBtn->Enable(true); resetBtn->Enable(false); WfsView->DeleteRows(1, WfsView->GetNumberRows() - 1); WfsView->Show(false); WfsView->ClearSelection(); WfsView->SetCellValue(0, 0, wxT("")); WfsView->SetCellValue(0, 1, wxT("")); WfsView->SetCellValue(0, 2, wxT("")); WfsView->SetRowLabelSize(wxGRID_AUTOSIZE); WfsView->AutoSize(); WfsView->SetSize(690, 240); WfsView->Show(true); CurrentEvtRow = -1; CurrentEvtColumn = -1; if (Keywords != NULL) delete Keywords; Keywords = NULL; wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_KEYWORD); comboCtrl->Enable(false); wxButton *filterBtn = (wxButton *) FindWindow(ID_WFS_KEYFILTER); filterBtn->Enable(false); wxButton *keyResetBtn = (wxButton *) FindWindow(ID_WFS_KEYRESET); keyResetBtn->Enable(false); wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_WFS_NAME); nameCtrl->SetValue(wxT("")); comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID); comboCtrl->Clear(); comboCtrl->SetSelection(wxNOT_FOUND); comboCtrl->Enable(false); wxRadioBox *versionBox = (wxRadioBox *) FindWindow(ID_WFS_VERSION); versionBox->Enable(false); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX); maxCtrl->SetValue(wxT("-1")); maxCtrl->Enable(false); wxStaticText *maxLabel = (wxStaticText *) FindWindow(ID_WFS_LABEL); maxLabel->SetLabel(wxT("Max &Features limit:")); wxStaticBox *pageBox = (wxStaticBox *) FindWindow(ID_WFS_PAGE); pageBox->SetLabel(wxT("Monolithic WFS Request")); wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING); pagingCtrl->SetSelection(0); pagingCtrl->Enable(false); wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_WFS_TABLE); tableCtrl->SetValue(wxT("")); tableCtrl->Enable(false); comboCtrl = (wxComboBox *) FindWindow(ID_WFS_PK); comboCtrl->Clear(); comboCtrl->SetSelection(wxNOT_FOUND); comboCtrl->Enable(false); wxCheckBox *rtreeCtrl = (wxCheckBox *) FindWindow(ID_WFS_RTREE); rtreeCtrl->SetValue(false); rtreeCtrl->Enable(false); wxCheckBox *swapCtrl = (wxCheckBox *) FindWindow(ID_WFS_SWAP); swapCtrl->SetValue(false); swapCtrl->Enable(false); wxButton *load = (wxButton *) FindWindow(ID_WFS_LOAD); load->Enable(false); ResetProgress(); } void WfsDialog::OnKeyFilter(wxCommandEvent & WXUNUSED(event)) { // // filtering by Keywords // wxString key; wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_KEYWORD); key = comboCtrl->GetValue(); if (key.Len() == 0) { wxMessageBox(wxT("You must specify some Keyword to be searched !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } // resetting the Grid WfsView->Show(false); WfsView->ClearSelection(); WfsView->DeleteRows(1, WfsView->GetNumberRows() - 1); WfsView->SetCellValue(0, 0, wxT("")); WfsView->SetCellValue(0, 1, wxT("")); WfsView->SetCellValue(0, 2, wxT("")); WfsView->Show(true); CurrentEvtRow = -1; CurrentEvtColumn = -1; int filtered_rows = 0; int nLayers = get_wfs_catalog_count(Catalog); for (int i = 0; i < nLayers; i++) { // searching matching Keywords - pass #1 gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i); bool match = false; int kw = get_wfs_keyword_count(layer); for (int k = 0; k < kw; k++) { wxString str = wxString::FromUTF8(get_wfs_keyword(layer, k)); if (key.Len() > 0 && str.Cmp(key) == 0) match = true; } if (match) filtered_rows++; } if (filtered_rows > 1) WfsView->AppendRows(filtered_rows - 1); int irow = 0; for (int i = 0; i < nLayers; i++) { // searching matching Keywords - pass #2 gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i); bool match = false; int kw = get_wfs_keyword_count(layer); for (int k = 0; k < kw; k++) { wxString str = wxString::FromUTF8(get_wfs_keyword(layer, k)); if (key.Len() > 0 && str.Cmp(key) == 0) match = true; } if (match) { // inserting a filterd layer wxString name; wxString title; wxString abstract; const char *x_name = get_wfs_item_name(layer); const char *x_title = get_wfs_item_title(layer); const char *x_abstract = get_wfs_item_abstract(layer); name = wxString::FromUTF8(x_name); if (x_title != NULL) title = wxString::FromUTF8(x_title); if (x_abstract != NULL) abstract = wxString::FromUTF8(x_abstract); WfsView->SetCellValue(irow, 0, name); WfsView->SetCellValue(irow, 1, title); WfsView->SetCellValue(irow, 2, abstract); irow++; } } WfsView->SetRowLabelSize(wxGRID_AUTOSIZE); WfsView->AutoSize(); WfsView->SetSize(690, 240); WfsView->Show(true); } void WfsDialog::OnKeyReset(wxCommandEvent & WXUNUSED(event)) { // // resetting any filter by Keywords // WfsView->Show(false); WfsView->DeleteRows(1, WfsView->GetNumberRows() - 1); WfsView->SetCellValue(0, 0, wxT("")); WfsView->SetCellValue(0, 1, wxT("")); WfsView->SetCellValue(0, 2, wxT("")); int nLayers = get_wfs_catalog_count(Catalog); WfsView->Show(false); CurrentEvtRow = -1; CurrentEvtColumn = -1; if (nLayers > 1) WfsView->AppendRows(nLayers - 1); for (int i = 0; i < nLayers; i++) { // populating the WFS Catalog gaiaWFSitemPtr layer = get_wfs_catalog_item(Catalog, i); wxString name; wxString title; wxString abstract; const char *x_name = get_wfs_item_name(layer); const char *x_title = get_wfs_item_title(layer); const char *x_abstract = get_wfs_item_abstract(layer); name = wxString::FromUTF8(x_name); if (x_title != NULL) title = wxString::FromUTF8(x_title); if (x_abstract != NULL) abstract = wxString::FromUTF8(x_abstract); WfsView->SetCellValue(i, 0, name); WfsView->SetCellValue(i, 1, title); WfsView->SetCellValue(i, 2, abstract); } WfsView->SetRowLabelSize(wxGRID_AUTOSIZE); WfsView->AutoSize(); WfsView->SetSize(690, 240); WfsView->Show(true); wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_WFS_KEYWORD); comboCtrl->SetSelection(wxNOT_FOUND); wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_WFS_NAME); nameCtrl->SetValue(wxT("")); comboCtrl = (wxComboBox *) FindWindow(ID_WFS_SRID); comboCtrl->Clear(); comboCtrl->SetSelection(wxNOT_FOUND); comboCtrl->Enable(false); wxRadioBox *versionBox = (wxRadioBox *) FindWindow(ID_WFS_VERSION); versionBox->Enable(false); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_WFS_MAX); maxCtrl->SetValue(wxT("-1")); maxCtrl->Enable(false); wxStaticText *maxLabel = (wxStaticText *) FindWindow(ID_WFS_LABEL); maxLabel->SetLabel(wxT("Max &Features limit:")); wxStaticBox *pageBox = (wxStaticBox *) FindWindow(ID_WFS_PAGE); pageBox->SetLabel(wxT("Monolithic WFS Request")); wxRadioBox *pagingCtrl = (wxRadioBox *) FindWindow(ID_WFS_PAGING); pagingCtrl->SetSelection(0); pagingCtrl->Enable(false); wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_WFS_TABLE); tableCtrl->SetValue(wxT("")); tableCtrl->Enable(false); comboCtrl = (wxComboBox *) FindWindow(ID_WFS_PK); comboCtrl->Clear(); comboCtrl->SetSelection(wxNOT_FOUND); comboCtrl->Enable(false); wxCheckBox *rtreeCtrl = (wxCheckBox *) FindWindow(ID_WFS_RTREE); rtreeCtrl->SetValue(false); rtreeCtrl->Enable(false); wxCheckBox *swapCtrl = (wxCheckBox *) FindWindow(ID_WFS_SWAP); swapCtrl->SetValue(false); swapCtrl->Enable(false); wxButton *load = (wxButton *) FindWindow(ID_WFS_LOAD); load->Enable(false); ResetProgress(); } void WfsDialog::OnProxy(wxCommandEvent & WXUNUSED(event)) { // // enabling/disabling HTTP Proxy // wxTextCtrl *proxy = (wxTextCtrl *) FindWindow(ID_WFS_PROXY); if (ProxyEnabled == false) ProxyEnabled = true; else ProxyEnabled = false; proxy->Enable(ProxyEnabled); if (ProxyEnabled == false) { HttpProxy = wxT(""); proxy->SetValue(wxT("")); } // resetting the libxml2 "nano HTTP" before changing HTTP_PROXY reset_wfs_http_connection(); } void WfsDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_CANCEL); } WfsKeywords::~WfsKeywords() { // destructor WfsKey *key; WfsKey *n_key; if (SortedArray != NULL) delete[]SortedArray; key = First; while (key != NULL) { n_key = key->GetNext(); delete key; key = n_key; } } void WfsKeywords::Add(const char *key) { // adding a new Keyword into the dictionary (if not already defined) if (key == NULL) return; wxString keyword = wxString::FromUTF8(key); WfsKey *pKey = First; while (pKey != NULL) { if (keyword.CmpNoCase(pKey->GetKeyword()) == 0) return; pKey = pKey->GetNext(); } // inserting a new Keyword pKey = new WfsKey(keyword); if (First == NULL) First = pKey; if (Last != NULL) Last->SetNext(pKey); Last = pKey; } void WfsKeywords::Sort() { // creating the sorted array of Keywords int count = 0; WfsKey *key; WfsKey *key_prev; bool ok = true; if (SortedArray != NULL) delete[]SortedArray; SortedArray = NULL; key = First; while (key != NULL) { // counting how many Keywords are there count++; key = key->GetNext(); } MaxSorted = count; if (MaxSorted == 0) return; SortedArray = new WfsKey *[MaxSorted]; count = 0; key = First; while (key != NULL) { // inserting pointers into the Array *(SortedArray + count++) = key; key = key->GetNext(); } while (ok) { // bubble sorting ok = false; for (count = 1; count < MaxSorted; count++) { key_prev = *(SortedArray + count - 1); key = *(SortedArray + count); if (key_prev->GetKeyword().CmpNoCase(key->GetKeyword()) > 0) { // swapping pointers *(SortedArray + count) = key_prev; *(SortedArray + count - 1) = key; ok = true; } } } } WfsKey *WfsKeywords::GetKey(int index) { // returning the Nth sorted Keyword if (SortedArray == NULL) return NULL; if (index >= 0 && index < MaxSorted) return *(SortedArray + index); return NULL; } spatialite_gui-2.0.0-devel/VectorSymbolizers1.cpp0000664000175000017500000131713012544026240017033 00000000000000/* / VectorSymbolizers1.cpp / various dialog classes / / version 1.8, 2015 March 28 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/filename.h" #include "wx/colordlg.h" #include "wx/tokenzr.h" #include "wx/clipbrd.h" #include #include #include SimpleLineSymbolizerDialog::SimpleLineSymbolizerDialog() { // ctor Stroke1DashArray = NULL; Stroke2DashArray = NULL; Stroke3DashArray = NULL; List = NULL; } SimpleLineSymbolizerDialog::~SimpleLineSymbolizerDialog() { // dtor if (Stroke1DashArray != NULL) delete[]Stroke1DashArray; if (Stroke2DashArray != NULL) delete[]Stroke2DashArray; if (Stroke3DashArray != NULL) delete[]Stroke3DashArray; if (List) delete List; } bool SimpleLineSymbolizerDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Uom = GUI_UOM_PIXEL; MinScale = false; MaxScale = false; PerpendicularOffset1 = 0.0; Stroke1Opacity = 1.0; HasGraphic1 = false; Stroke1Color = wxT("#000000"); EnableStroke1Replacement = false; Stroke1ColorReplacement = wxT("#000000"); Stroke1Width = 1.0; Stroke1LineJoin = RL2_PEN_JOIN_ROUND; Stroke1LineCap = RL2_PEN_CAP_ROUND; Stroke1DashCount = 0; Stroke1DashOffset = 0.0; EnableStroke2 = false; PerpendicularOffset2 = 0.0; Stroke2Opacity = 1.0; HasGraphic2 = false; Stroke2Color = wxT("#000000"); EnableStroke2Replacement = false; Stroke2ColorReplacement = wxT("#000000"); Stroke2Width = 1.0; Stroke2LineJoin = RL2_PEN_JOIN_ROUND; Stroke2LineCap = RL2_PEN_CAP_ROUND; Stroke2DashCount = 0; Stroke2DashOffset = 0.0; EnableStroke3 = false; PerpendicularOffset3 = 0.0; Stroke3Opacity = 1.0; HasGraphic3 = false; Stroke3Color = wxT("#000000"); EnableStroke3Replacement = false; Stroke3ColorReplacement = wxT("#000000"); Stroke3Width = 1.0; Stroke3LineJoin = RL2_PEN_JOIN_ROUND; Stroke3LineCap = RL2_PEN_CAP_ROUND; Stroke3DashCount = 0; Stroke3DashOffset = 0.0; PreviewBackground = GUI_PREVIEW_BACKGROUND_CHECKED; List = MainFrame->FindExternalGraphic(true); if (wxPropertySheetDialog::Create (parent, wxID_ANY, wxT("Simple Line Symbolizer")) == false) return false; wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels wxPanel *mainPage = CreateMainPage(book); book->AddPage(mainPage, wxT("General"), true); wxPanel *stroke1Page = CreateStroke1Page(book); book->AddPage(stroke1Page, wxT("Stroke #1"), false); wxPanel *stroke2Page = CreateStroke2Page(book); book->AddPage(stroke2Page, wxT("Stroke #2"), false); wxPanel *stroke3Page = CreateStroke3Page(book); book->AddPage(stroke3Page, wxT("Stroke #3"), false); wxPanel *previewPage = CreatePreviewPage(book); book->AddPage(previewPage, wxT("Preview"), false); CreateButtons(); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnPageChanging); Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnPageChanged); // appends event handler for buttons Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCopy); // centers the dialog window Centre(); UpdateMainPage(); return true; } wxPanel *SimpleLineSymbolizerDialog::CreateMainPage(wxWindow * parent) { // // creating the MAIN page // wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the LineSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the LineSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the LineSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: UOM and Visibility Range boxSizer->AddSpacer(50); wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // fourth row A: Unit Of Measure - UOM wxString uom[3]; uom[0] = wxT("&Pixel"); uom[1] = wxT("&Metre"); uom[2] = wxT("&Inch"); wxRadioBox *uomBox = new wxRadioBox(panel, ID_SYMBOLIZER_UOM, wxT("&Unit Of Measure"), wxDefaultPosition, wxDefaultSize, 3, uom, 1, wxRA_SPECIFY_ROWS); miscSizer->Add(uomBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); uomBox->SetSelection(0); // fourth row B: optional Visibility Range miscSizer->AddSpacer(50); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_UOM, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdUomChanged); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdScaleChanged); return panel; } void SimpleLineSymbolizerDialog:: OnCmdUomChanged(wxCommandEvent & WXUNUSED(event)) { // // UOM selection changed // wxRadioBox *uomCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_UOM); switch (uomCtrl->GetSelection()) { case 1: Uom = GUI_UOM_METRE; break; case 2: Uom = GUI_UOM_INCH; break; default: Uom = GUI_UOM_PIXEL; break; }; } void SimpleLineSymbolizerDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } wxPanel *SimpleLineSymbolizerDialog::CreateStroke1Page(wxWindow * parent) { // // creating the STROKE #1 page // wxPanel *panel = new wxPanel(parent, ID_PANE_STROKE1); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: the Stroke #1 Opacity and Perpendicular Offset wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(300, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); opacityBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive to the left-hand side. Negative numbers mean right.")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Stroke color or Graphic wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(strokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Stroke Type wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxVERTICAL); strokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString type[2]; type[0] = wxT("&Color"); type[1] = wxT("&Graphic"); wxRadioBox *typeBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE1_TYPE, wxT("&Stroke Type"), wxDefaultPosition, wxDefaultSize, 2, type, 1, wxRA_SPECIFY_ROWS); stroke1Sizer->Add(typeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); typeBox->SetSelection(0); // second row B: Stroke Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); stroke1Sizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_COLOR, Stroke1Color, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(0, 0, 0); sampleCtrl->SetBackgroundColour(back); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // second row C: GRID to select an External Graphic wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); strokeSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *gridBox = new wxStaticBox(panel, wxID_STATIC, wxT("External Graphic resources"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxHORIZONTAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl1 = new wxGrid(panel, ID_SYMBOLIZER_STROKE1_GRAPHIC, wxDefaultPosition, wxSize(420, 150), wxALWAYS_SHOW_SB); int count = 0; ExternalGraphic *pE = List->GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl1->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl1->SetColLabelValue(0, wxT("Graphic")); GridCtrl1->SetColLabelValue(1, wxT("Title")); GridCtrl1->SetColLabelValue(2, wxT("Abstract")); GridCtrl1->SetColLabelValue(3, wxT("MimeType")); count = 0; pE = List->GetFirst(); while (pE) { // feeding grid rows MyGraphicCellRenderer *renderer = new MyGraphicCellRenderer; renderer->SetGraphic(pE->GetGraphic()); GridCtrl1->SetCellRenderer(count, 0, renderer); GridCtrl1->SetCellValue(count, 1, pE->GetTitle()); GridCtrl1->SetCellValue(count, 2, pE->GetAbstract()); GridCtrl1->SetCellValue(count, 3, pE->GetMimeType()); count++; pE = pE->GetNext(); } GridCtrl1->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl1->AutoSize(); GridCtrl1->EnableEditing(false); gridSizer->Add(GridCtrl1, 0, wxALIGN_RIGHT | wxALL, 5); GridCtrl1->Enable(false); // second row C: Color Replacement wxBoxSizer *replacementBoxSizer = new wxBoxSizer(wxVERTICAL); GridSizer->Add(replacementBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *replacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color Replacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *replacementSizer = new wxStaticBoxSizer(replacementBox, wxVERTICAL); replacementBoxSizer->Add(replacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableReplacementCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableReplacementCtrl->SetValue(false); enableReplacementCtrl->Enable(false); replacementSizer->Add(enableReplacementCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *replacement1Sizer = new wxBoxSizer(wxHORIZONTAL); replacementSizer->Add(replacement1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *replacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_REPLACEMENT, Stroke1ColorReplacement, wxDefaultPosition, wxSize(80, 22)); replacement1Sizer->Add(replacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); replacementCtrl->Enable(false); wxTextCtrl *sampleReplacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_REPLACEMENT_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); back = wxColour(0, 0, 0); sampleReplacementCtrl->SetBackgroundColour(back); replacement1Sizer->Add(sampleReplacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Stroke-Width, Stroke-LineJoin, Stroke-LineCap and Stroke-Dasharray wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: LineJoin wxString join[3]; join[0] = wxT("&Mitre"); join[1] = wxT("&Round"); join[2] = wxT("&Bevel"); wxRadioBox *joinBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE1_LINEJOIN, wxT("&Line Join"), wxDefaultPosition, wxDefaultSize, 3, join, 1, wxRA_SPECIFY_COLS); miscSizer->Add(joinBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); joinBox->SetSelection(1); // third row C: LineCap wxString cap[3]; cap[0] = wxT("&Butt"); cap[1] = wxT("&Round"); cap[2] = wxT("&Square"); wxRadioBox *capBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE1_LINECAP, wxT("&Line Cap"), wxDefaultPosition, wxDefaultSize, 3, cap, 1, wxRA_SPECIFY_COLS); miscSizer->Add(capBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); capBox->SetSelection(1); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *dashBox = new wxStaticBox(panel, wxID_STATIC, wxT("Dashed/Dotted Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *dashSizer = new wxStaticBoxSizer(dashBox, wxVERTICAL); dashBoxSizer->Add(dashSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *dash1Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *dash1Label = new wxStaticText(panel, wxID_STATIC, wxT("Dash Array:")); dash1Sizer->Add(dash1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashArrayCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_DASHARRAY, wxT(""), wxDefaultPosition, wxSize(200, 22)); dash1Sizer->Add(dashArrayCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticText *dash2Label = new wxStaticText(panel, wxID_STATIC, wxT("e.g. 10,3,2,3")); dash2Label->SetForegroundColour(wxColour(255, 0, 0)); dash1Sizer->Add(dash2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *dash2Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash2Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *dashOffsetLabel = new wxStaticText(panel, wxID_STATIC, wxT("Dash Offset:")); dash2Sizer->Add(dashOffsetLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashOffsetCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_DASHOFFSET, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); dash2Sizer->Add(dashOffsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE1_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdStroke1TypeChanged); Connect(ID_SYMBOLIZER_STROKE1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdColor1Changed); Connect(ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdColor1Picker); Connect(ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdStroke1EnableReplacementChanged); Connect(ID_SYMBOLIZER_STROKE1_REPLACEMENT, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdReplacement1Changed); Connect(ID_SYMBOLIZER_STROKE1_LINEJOIN, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdLineJoin1Changed); Connect(ID_SYMBOLIZER_STROKE1_LINECAP, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdLineCap1Changed); return panel; } void SimpleLineSymbolizerDialog:: OnCmdStroke1TypeChanged(wxCommandEvent & WXUNUSED(event)) { // // stroke type changed: updating the visual sample // wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_BTN); if (typeBox->GetSelection() == 0) HasGraphic1 = false; else HasGraphic1 = true; RetrieveStroke1Page(false); UpdateStroke1Page(); } void SimpleLineSymbolizerDialog:: OnCmdColor1Changed(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimpleLineSymbolizerDialog:: OnCmdColor1Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimpleLineSymbolizerDialog:: OnCmdStroke1EnableReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke #1 ColorReplacement enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT); if (enableCtrl->IsChecked() == true) EnableStroke1Replacement = true; else EnableStroke1Replacement = false; RetrieveStroke1Page(false); UpdateStroke1Page(); } void SimpleLineSymbolizerDialog:: OnCmdReplacement1Changed(wxCommandEvent & WXUNUSED(event)) { // // Color Replacement changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimpleLineSymbolizerDialog:: OnCmdLineJoin1Changed(wxCommandEvent & WXUNUSED(event)) { // // LineJoin selection changed // wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_LINEJOIN); switch (lineJoinCtrl->GetSelection()) { case 0: Stroke1LineJoin = RL2_PEN_JOIN_MITER; break; case 2: Stroke1LineJoin = RL2_PEN_JOIN_BEVEL; break; default: Stroke1LineJoin = RL2_PEN_JOIN_ROUND; break; }; } void SimpleLineSymbolizerDialog:: OnCmdLineCap1Changed(wxCommandEvent & WXUNUSED(event)) { // // LineCap selection changed // wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_LINECAP); switch (lineCapCtrl->GetSelection()) { case 0: Stroke1LineCap = RL2_PEN_CAP_BUTT; break; case 2: Stroke1LineCap = RL2_PEN_CAP_SQUARE; break; default: Stroke1LineCap = RL2_PEN_CAP_ROUND; break; }; } wxPanel *SimpleLineSymbolizerDialog::CreateStroke2Page(wxWindow * parent) { // // creating the STROKE #2 page // wxPanel *panel = new wxPanel(parent, ID_PANE_STROKE2); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: the Stroke #2 Opacity and Perpendicular Offset wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *enableBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke #2"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *enableSizer = new wxStaticBoxSizer(enableBox, wxVERTICAL); opacityBoxSizer->Add(enableSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(false); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(300, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityCtrl->Enable(false); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); opacityBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perpendicularCtrl->Enable(false); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perpendicularSizer->Add(perp1Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Stroke color or Graphic wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(strokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Stroke Type wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxVERTICAL); strokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString type[2]; type[0] = wxT("&Color"); type[1] = wxT("&Graphic"); wxRadioBox *typeBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE2_TYPE, wxT("&Stroke Type"), wxDefaultPosition, wxDefaultSize, 2, type, 1, wxRA_SPECIFY_ROWS); stroke1Sizer->Add(typeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); typeBox->SetSelection(0); typeBox->Enable(false); // second row B: Stroke Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); stroke1Sizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_COLOR, Stroke2Color, wxDefaultPosition, wxSize(80, 22)); colorCtrl->Enable(false); color1Sizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(0, 0, 0); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Enable(false); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxT("&Pick a color")); pick->Enable(false); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // second row C: GRID to select an External Graphic wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); strokeSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *gridBox = new wxStaticBox(panel, wxID_STATIC, wxT("External Graphic resources"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxHORIZONTAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl2 = new wxGrid(panel, ID_SYMBOLIZER_STROKE2_GRAPHIC, wxDefaultPosition, wxSize(420, 150), wxALWAYS_SHOW_SB); int count = 0; ExternalGraphic *pE = List->GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl2->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl2->SetColLabelValue(0, wxT("Graphic")); GridCtrl2->SetColLabelValue(1, wxT("Title")); GridCtrl2->SetColLabelValue(2, wxT("Abstract")); GridCtrl2->SetColLabelValue(3, wxT("MimeType")); count = 0; pE = List->GetFirst(); while (pE) { // feeding grid rows MyGraphicCellRenderer *renderer = new MyGraphicCellRenderer; renderer->SetGraphic(pE->GetGraphic()); GridCtrl2->SetCellRenderer(count, 0, renderer); GridCtrl2->SetCellValue(count, 1, pE->GetTitle()); GridCtrl2->SetCellValue(count, 2, pE->GetAbstract()); GridCtrl2->SetCellValue(count, 3, pE->GetMimeType()); count++; pE = pE->GetNext(); } GridCtrl2->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl2->AutoSize(); GridCtrl2->EnableEditing(false); gridSizer->Add(GridCtrl2, 0, wxALIGN_RIGHT | wxALL, 5); GridCtrl2->Enable(false); // second row C: Color Replacement wxBoxSizer *replacementBoxSizer = new wxBoxSizer(wxVERTICAL); GridSizer->Add(replacementBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *replacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color Replacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *replacementSizer = new wxStaticBoxSizer(replacementBox, wxVERTICAL); replacementBoxSizer->Add(replacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableReplacementCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableReplacementCtrl->SetValue(false); enableReplacementCtrl->Enable(false); replacementSizer->Add(enableReplacementCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *replacement1Sizer = new wxBoxSizer(wxHORIZONTAL); replacementSizer->Add(replacement1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *replacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_REPLACEMENT, Stroke2ColorReplacement, wxDefaultPosition, wxSize(80, 22)); replacement1Sizer->Add(replacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); replacementCtrl->Enable(false); wxTextCtrl *sampleReplacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_REPLACEMENT_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); back = wxColour(0, 0, 0); sampleReplacementCtrl->SetBackgroundColour(back); replacement1Sizer->Add(sampleReplacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Stroke-Width, Stroke-LineJoin, Stroke-LineCap and Stroke-Dasharray wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthCtrl->Enable(false); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: LineJoin wxString join[3]; join[0] = wxT("&Mitre"); join[1] = wxT("&Round"); join[2] = wxT("&Bevel"); wxRadioBox *joinBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE2_LINEJOIN, wxT("&Line Join"), wxDefaultPosition, wxDefaultSize, 3, join, 1, wxRA_SPECIFY_COLS); miscSizer->Add(joinBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); joinBox->SetSelection(1); joinBox->Enable(false); // third row C: LineCap wxString cap[3]; cap[0] = wxT("&Butt"); cap[1] = wxT("&Round"); cap[2] = wxT("&Square"); wxRadioBox *capBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE2_LINECAP, wxT("&Line Cap"), wxDefaultPosition, wxDefaultSize, 3, cap, 1, wxRA_SPECIFY_COLS); miscSizer->Add(capBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); capBox->SetSelection(1); capBox->Enable(false); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *dashBox = new wxStaticBox(panel, wxID_STATIC, wxT("Dashed/Dotted Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *dashSizer = new wxStaticBoxSizer(dashBox, wxVERTICAL); dashBoxSizer->Add(dashSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *dash1Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *dash1Label = new wxStaticText(panel, wxID_STATIC, wxT("Dash Array:")); dash1Sizer->Add(dash1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashArrayCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_DASHARRAY, wxT(""), wxDefaultPosition, wxSize(200, 22)); dashArrayCtrl->Enable(false); dash1Sizer->Add(dashArrayCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticText *dash2Label = new wxStaticText(panel, wxID_STATIC, wxT("e.g. 10,3,2,3")); dash2Label->SetForegroundColour(wxColour(255, 0, 0)); dash1Sizer->Add(dash2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *dash2Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash2Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *dashOffsetLabel = new wxStaticText(panel, wxID_STATIC, wxT("Dash Offset:")); dash2Sizer->Add(dashOffsetLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashOffsetCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_DASHOFFSET, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); dashOffsetCtrl->Enable(false); dash2Sizer->Add(dashOffsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdStroke2Changed); Connect(ID_SYMBOLIZER_STROKE2_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdStroke2TypeChanged); Connect(ID_SYMBOLIZER_STROKE2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdColor2Changed); Connect(ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdColor2Picker); Connect(ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdStroke2EnableReplacementChanged); Connect(ID_SYMBOLIZER_STROKE2_REPLACEMENT, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdReplacement2Changed); Connect(ID_SYMBOLIZER_STROKE2_LINEJOIN, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdLineJoin2Changed); Connect(ID_SYMBOLIZER_STROKE2_LINECAP, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdLineCap2Changed); return panel; } void SimpleLineSymbolizerDialog:: OnCmdStroke2Changed(wxCommandEvent & WXUNUSED(event)) { // // Stroke #2 enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); if (enableCtrl->IsChecked() == true) EnableStroke2 = true; else EnableStroke2 = false; RetrieveStroke2Page(false); UpdateStroke2Page(); } void SimpleLineSymbolizerDialog:: OnCmdStroke2TypeChanged(wxCommandEvent & WXUNUSED(event)) { // // stroke type changed: updating the visual sample // wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN); if (typeBox->GetSelection() == 0) HasGraphic2 = false; else HasGraphic2 = true; RetrieveStroke2Page(false); UpdateStroke2Page(); } void SimpleLineSymbolizerDialog:: OnCmdColor2Changed(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimpleLineSymbolizerDialog:: OnCmdColor2Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimpleLineSymbolizerDialog:: OnCmdStroke2EnableReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke #2 ColorReplacement enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT); if (enableCtrl->IsChecked() == true) EnableStroke2Replacement = true; else EnableStroke2Replacement = false; RetrieveStroke2Page(false); UpdateStroke2Page(); } void SimpleLineSymbolizerDialog:: OnCmdReplacement2Changed(wxCommandEvent & WXUNUSED(event)) { // // Color Replacement changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimpleLineSymbolizerDialog:: OnCmdLineJoin2Changed(wxCommandEvent & WXUNUSED(event)) { // // LineJoin selection changed // wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_LINEJOIN); switch (lineJoinCtrl->GetSelection()) { case 0: Stroke2LineJoin = RL2_PEN_JOIN_MITER; break; case 2: Stroke2LineJoin = RL2_PEN_JOIN_BEVEL; break; default: Stroke2LineJoin = RL2_PEN_JOIN_ROUND; break; }; } void SimpleLineSymbolizerDialog:: OnCmdLineCap2Changed(wxCommandEvent & WXUNUSED(event)) { // // LineCap selection changed // wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_LINECAP); switch (lineCapCtrl->GetSelection()) { case 0: Stroke2LineCap = RL2_PEN_CAP_BUTT; break; case 2: Stroke2LineCap = RL2_PEN_CAP_SQUARE; break; default: Stroke2LineCap = RL2_PEN_CAP_ROUND; break; }; } wxPanel *SimpleLineSymbolizerDialog::CreateStroke3Page(wxWindow * parent) { // // creating the STROKE #3 page // wxPanel *panel = new wxPanel(parent, ID_PANE_STROKE3); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: the Stroke #3 Opacity and Perpendicular Offset wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *enableBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke #3"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *enableSizer = new wxStaticBoxSizer(enableBox, wxVERTICAL); opacityBoxSizer->Add(enableSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE3_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(false); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE3_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(300, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityCtrl->Enable(false); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); opacityBoxSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE3_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perpendicularCtrl->Enable(false); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perpendicularSizer->Add(perp1Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Stroke color or Graphic wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(strokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Stroke Type wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxVERTICAL); strokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString type[2]; type[0] = wxT("&Color"); type[1] = wxT("&Graphic"); wxRadioBox *typeBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE3_TYPE, wxT("&Stroke Type"), wxDefaultPosition, wxDefaultSize, 2, type, 1, wxRA_SPECIFY_ROWS); stroke1Sizer->Add(typeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); typeBox->SetSelection(0); typeBox->Enable(false); // second row B: Stroke Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); stroke1Sizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE3_COLOR, Stroke3Color, wxDefaultPosition, wxSize(80, 22)); colorCtrl->Enable(false); color1Sizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE3_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(0, 0, 0); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Enable(false); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_STROKE3_PICKER_BTN, wxT("&Pick a color")); pick->Enable(false); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // second row C: GRID to select an External Graphic wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); strokeSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *gridBox = new wxStaticBox(panel, wxID_STATIC, wxT("External Graphic resources"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxHORIZONTAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl3 = new wxGrid(panel, ID_SYMBOLIZER_STROKE3_GRAPHIC, wxDefaultPosition, wxSize(420, 150), wxALWAYS_SHOW_SB); int count = 0; ExternalGraphic *pE = List->GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl3->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl3->SetColLabelValue(0, wxT("Graphic")); GridCtrl3->SetColLabelValue(1, wxT("Title")); GridCtrl3->SetColLabelValue(2, wxT("Abstract")); GridCtrl3->SetColLabelValue(3, wxT("MimeType")); count = 0; pE = List->GetFirst(); while (pE) { // feeding grid rows MyGraphicCellRenderer *renderer = new MyGraphicCellRenderer; renderer->SetGraphic(pE->GetGraphic()); GridCtrl3->SetCellRenderer(count, 0, renderer); GridCtrl3->SetCellValue(count, 1, pE->GetTitle()); GridCtrl3->SetCellValue(count, 2, pE->GetAbstract()); GridCtrl3->SetCellValue(count, 3, pE->GetMimeType()); count++; pE = pE->GetNext(); } GridCtrl3->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl3->AutoSize(); GridCtrl3->EnableEditing(false); gridSizer->Add(GridCtrl3, 0, wxALIGN_RIGHT | wxALL, 5); GridCtrl3->Enable(false); // second row C: Color Replacement wxBoxSizer *replacementBoxSizer = new wxBoxSizer(wxVERTICAL); GridSizer->Add(replacementBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *replacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color Replacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *replacementSizer = new wxStaticBoxSizer(replacementBox, wxVERTICAL); replacementBoxSizer->Add(replacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableReplacementCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE3_ENABLE_REPLACEMENT, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableReplacementCtrl->SetValue(false); enableReplacementCtrl->Enable(false); replacementSizer->Add(enableReplacementCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *replacement1Sizer = new wxBoxSizer(wxHORIZONTAL); replacementSizer->Add(replacement1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *replacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE3_REPLACEMENT, Stroke3ColorReplacement, wxDefaultPosition, wxSize(80, 22)); replacement1Sizer->Add(replacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); replacementCtrl->Enable(false); wxTextCtrl *sampleReplacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE3_REPLACEMENT_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); back = wxColour(0, 0, 0); sampleReplacementCtrl->SetBackgroundColour(back); replacement1Sizer->Add(sampleReplacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Stroke-Width, Stroke-LineJoin, Stroke-LineCap and Stroke-Dasharray wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE3_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthCtrl->Enable(false); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: LineJoin wxString join[3]; join[0] = wxT("&Mitre"); join[1] = wxT("&Round"); join[2] = wxT("&Bevel"); wxRadioBox *joinBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE3_LINEJOIN, wxT("&Line Join"), wxDefaultPosition, wxDefaultSize, 3, join, 1, wxRA_SPECIFY_COLS); miscSizer->Add(joinBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); joinBox->SetSelection(1); joinBox->Enable(false); // third row C: LineCap wxString cap[3]; cap[0] = wxT("&Butt"); cap[1] = wxT("&Round"); cap[2] = wxT("&Square"); wxRadioBox *capBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE3_LINECAP, wxT("&Line Cap"), wxDefaultPosition, wxDefaultSize, 3, cap, 1, wxRA_SPECIFY_COLS); miscSizer->Add(capBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); capBox->SetSelection(1); capBox->Enable(false); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *dashBox = new wxStaticBox(panel, wxID_STATIC, wxT("Dashed/Dotted Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *dashSizer = new wxStaticBoxSizer(dashBox, wxVERTICAL); dashBoxSizer->Add(dashSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *dash1Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *dash1Label = new wxStaticText(panel, wxID_STATIC, wxT("Dash Array:")); dash1Sizer->Add(dash1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashArrayCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE3_DASHARRAY, wxT(""), wxDefaultPosition, wxSize(200, 22)); dashArrayCtrl->Enable(false); dash1Sizer->Add(dashArrayCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticText *dash2Label = new wxStaticText(panel, wxID_STATIC, wxT("e.g. 10,3,2,3")); dash2Label->SetForegroundColour(wxColour(255, 0, 0)); dash1Sizer->Add(dash2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *dash2Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash2Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *dashOffsetLabel = new wxStaticText(panel, wxID_STATIC, wxT("Dash Offset:")); dash2Sizer->Add(dashOffsetLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashOffsetCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE3_DASHOFFSET, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); dashOffsetCtrl->Enable(false); dash2Sizer->Add(dashOffsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE3_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdStroke3Changed); Connect(ID_SYMBOLIZER_STROKE3_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdStroke3TypeChanged); Connect(ID_SYMBOLIZER_STROKE3_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdColor3Changed); Connect(ID_SYMBOLIZER_STROKE3_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdColor3Picker); Connect(ID_SYMBOLIZER_STROKE3_ENABLE_REPLACEMENT, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdStroke3EnableReplacementChanged); Connect(ID_SYMBOLIZER_STROKE3_REPLACEMENT, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdReplacement3Changed); Connect(ID_SYMBOLIZER_STROKE3_LINEJOIN, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdLineJoin3Changed); Connect(ID_SYMBOLIZER_STROKE3_LINECAP, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdLineCap3Changed); return panel; } void SimpleLineSymbolizerDialog:: OnCmdStroke3Changed(wxCommandEvent & WXUNUSED(event)) { // // Stroke #3 enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE3_ENABLE); if (enableCtrl->IsChecked() == true) EnableStroke3 = true; else EnableStroke3 = false; RetrieveStroke3Page(false); UpdateStroke3Page(); } void SimpleLineSymbolizerDialog:: OnCmdStroke3TypeChanged(wxCommandEvent & WXUNUSED(event)) { // // stroke type changed: updating the visual sample // wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE3_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE3_PICKER_BTN); if (typeBox->GetSelection() == 0) HasGraphic3 = false; else HasGraphic3 = true; RetrieveStroke3Page(false); UpdateStroke3Page(); } void SimpleLineSymbolizerDialog:: OnCmdColor3Changed(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimpleLineSymbolizerDialog:: OnCmdColor3Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimpleLineSymbolizerDialog:: OnCmdStroke3EnableReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke #3 ColorReplacement enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE3_ENABLE_REPLACEMENT); if (enableCtrl->IsChecked() == true) EnableStroke3Replacement = true; else EnableStroke3Replacement = false; RetrieveStroke3Page(false); UpdateStroke3Page(); } void SimpleLineSymbolizerDialog:: OnCmdReplacement3Changed(wxCommandEvent & WXUNUSED(event)) { // // Color Replacement changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_REPLACEMENT); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_REPLACEMENT_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimpleLineSymbolizerDialog:: OnCmdLineJoin3Changed(wxCommandEvent & WXUNUSED(event)) { // // LineJoin selection changed // wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE3_LINEJOIN); switch (lineJoinCtrl->GetSelection()) { case 0: Stroke3LineJoin = RL2_PEN_JOIN_MITER; break; case 2: Stroke3LineJoin = RL2_PEN_JOIN_BEVEL; break; default: Stroke3LineJoin = RL2_PEN_JOIN_ROUND; break; }; } void SimpleLineSymbolizerDialog:: OnCmdLineCap3Changed(wxCommandEvent & WXUNUSED(event)) { // // LineCap selection changed // wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE3_LINECAP); switch (lineCapCtrl->GetSelection()) { case 0: Stroke3LineCap = RL2_PEN_CAP_BUTT; break; case 2: Stroke3LineCap = RL2_PEN_CAP_SQUARE; break; default: Stroke3LineCap = RL2_PEN_CAP_ROUND; break; }; } wxPanel *SimpleLineSymbolizerDialog::CreatePreviewPage(wxWindow * parent) { // // creating the Preview page // wxPanel *panel = new wxPanel(parent, ID_PANE_PREVIEW); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *previewBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(previewBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // creating a control to show the LineSymbolizer Preview wxStaticBox *previewBox = new wxStaticBox(panel, wxID_STATIC, wxT("LineSymbolizer Preview"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *previewSizer = new wxStaticBoxSizer(previewBox, wxVERTICAL); previewBoxSizer->Add(previewSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); DrawPreview(500, 300); SymbolizerPreview *previewCtrl = new SymbolizerPreview(this, panel, ID_SYMBOLIZER_PREVIEW, PreviewBackBitmap, wxSize(500, 300)); previewSizer->Add(previewCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // Background selector wxString back[3]; back[0] = wxT("&Checked"); back[1] = wxT("&White"); back[2] = wxT("&Black"); wxRadioBox *backBox = new wxRadioBox(panel, ID_SYMBOLIZER_BACKGROUND, wxT("&Background"), wxDefaultPosition, wxDefaultSize, 3, back, 1, wxRA_SPECIFY_COLS); boxSizer->Add(backBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); backBox->SetSelection(0); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_BACKGROUND, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleLineSymbolizerDialog::OnCmdBackgroundChanged); return panel; } void SimpleLineSymbolizerDialog:: OnCmdBackgroundChanged(wxCommandEvent & WXUNUSED(event)) { // // Preview Background selection changed // wxRadioBox *backCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BACKGROUND); switch (backCtrl->GetSelection()) { case 1: PreviewBackground = GUI_PREVIEW_BACKGROUND_WHITE; break; case 2: PreviewBackground = GUI_PREVIEW_BACKGROUND_BLACK; break; default: PreviewBackground = GUI_PREVIEW_BACKGROUND_CHECKED; break; }; UpdatePreviewPage(); } void SimpleLineSymbolizerDialog::DrawPreview(int horz, int vert) { // // drawing a Symbolizer Preview // PreviewBackBitmap.Create(horz, vert); wxMemoryDC dc(PreviewBackBitmap); // // background filling // wxImage img(24, 24); for (int y = 0; y < 24; y++) { // creating a checked background for (int x = 0; x < 24; x++) { if (y < 12) { if (x < 12) img.SetRGB(x, y, 176, 176, 176); else img.SetRGB(x, y, 208, 208, 208); } else { if (x < 12) img.SetRGB(x, y, 208, 208, 208); else img.SetRGB(x, y, 176, 176, 176); } } } wxBrush stipple(img); dc.SetBrush(stipple); dc.DrawRectangle(0, 0, horz, vert); } void SimpleLineSymbolizerDialog::CreateButtons() { // // adding the common Buttons // wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer()); wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); } bool SimpleLineSymbolizerDialog::FinalValidityCheck() { // // last check before generating the SLD/SE Style // if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the LineSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (Title.Len() < 1) { wxString msg = wxT("Setting some LineSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } if (Abstract.Len() < 1) { wxString msg = wxT("Setting some LineSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } return true; } bool SimpleLineSymbolizerDialog::RetrieveMainPage() { // // retrieving params from the MAIN page // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } void SimpleLineSymbolizerDialog::UpdateMainPage() { // // updating the MAIN page // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); nameCtrl->SetValue(Name); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); titleCtrl->SetValue(Title); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); absCtrl->SetValue(Abstract); wxRadioBox *uomBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_UOM); switch (Uom) { case GUI_UOM_METRE: uomBox->SetSelection(1); break; case GUI_UOM_INCH: uomBox->SetSelection(2); break; default: uomBox->SetSelection(0); break; }; wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); if (MinScale != true && MaxScale != true) rangeBox->SetSelection(0); else if (MinScale == true && MaxScale != true) rangeBox->SetSelection(1); else if (MinScale != true && MaxScale == true) rangeBox->SetSelection(2); else rangeBox->SetSelection(3); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); char dummy[64]; wxString str; if (MinScale == true) { sprintf(dummy, "%1.2f", MinScaleDenominator); str = wxString::FromUTF8(dummy); minCtrl->SetValue(str); minCtrl->Enable(true); } else { str = wxT("0.0"); minCtrl->SetValue(str); minCtrl->Enable(false); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); if (MaxScale == true) { sprintf(dummy, "%1.2f", MaxScaleDenominator); str = wxString::FromUTF8(dummy); maxCtrl->SetValue(str); maxCtrl->Enable(true); } else { str = wxT("+Infinite"); maxCtrl->SetValue(str); maxCtrl->Enable(false); } } bool SimpleLineSymbolizerDialog::DoParseDashArray(wxString & str, int which) { // // attempting to parse a Stroke DashArray string // if (which == 0) { Stroke1DashCount = 0; if (Stroke1DashArray != NULL) delete[]Stroke1DashArray; Stroke1DashArray = NULL; } if (which == 1) { Stroke2DashCount = 0; if (Stroke2DashArray != NULL) delete[]Stroke2DashArray; Stroke2DashArray = NULL; } if (which == 2) { Stroke3DashCount = 0; if (Stroke3DashArray != NULL) delete[]Stroke3DashArray; Stroke3DashArray = NULL; } if (str.Len() == 0) return true; int count = 0; double interval; wxStringTokenizer tkz(str, wxT(",")); while (tkz.HasMoreTokens()) { wxString token = tkz.GetNextToken(); if (token.ToDouble(&interval) != true) return false; if (interval <= 0.0) return false; count++; } if (count == 0) return true; double *array; if (which == 0) { Stroke1DashCount = count; Stroke1DashArray = new double[Stroke1DashCount]; array = Stroke1DashArray; } if (which == 1) { Stroke2DashCount = count; Stroke2DashArray = new double[Stroke2DashCount]; array = Stroke2DashArray; } if (which == 2) { Stroke3DashCount = count; Stroke3DashArray = new double[Stroke3DashCount]; array = Stroke3DashArray; } count = 0; wxStringTokenizer tkz2(str, wxT(",")); while (tkz2.HasMoreTokens()) { wxString token = tkz2.GetNextToken(); token.ToDouble(&interval); *(array + count++) = interval; } return true; } void SimpleLineSymbolizerDialog::NormalizedDashArray(wxString & str, int which, char delimiter) { // // creating a normalized DashArray string // int count; double *array; if (which == 0) { count = Stroke1DashCount; array = Stroke1DashArray; } if (which == 1) { count = Stroke2DashCount; array = Stroke2DashArray; } if (which == 2) { count = Stroke3DashCount; array = Stroke3DashArray; } str = wxT(""); if (count == 0) return; for (int i = 0; i < count; i++) { char dummy[64]; if (i == 0) sprintf(dummy, "%1.2f", *(array + i)); else if (delimiter == ' ') sprintf(dummy, " %1.2f", *(array + i)); else sprintf(dummy, "%c %1.2f", delimiter, *(array + i)); str += wxString::FromUTF8(dummy); } } bool SimpleLineSymbolizerDialog::RetrieveStroke1Page(bool check) { // // retrieving params from the STROKE #1 page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); Stroke1Opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); wxString value = perpCtrl->GetValue(); if (value.ToDouble(&PerpendicularOffset1) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (HasGraphic1 == false) { wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke1Color = color; } else { int selCount = 0; int selected = -1; for (int i = 0; i < GridCtrl1->GetNumberRows(); i++) { if (GridCtrl1->IsInSelection(i, 0) == true) { selected = i; selCount++; } } if (selCount < 1) { if (check == true) { wxMessageBox(wxT ("You must select an External Graphic resource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (selCount > 1) { if (check == true) { wxString msg = wxT ("You must select just a single External Graphic resource !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } List->FindByIndex(selected, Stroke1XLinkHref, Stroke1MimeType); if (EnableStroke1Replacement == true) { wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT); wxString color = replacementCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("COLOR-REPACEMENT isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke1ColorReplacement = color; } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); value = widthCtrl->GetValue(); if (value.ToDouble(&Stroke1Width) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Stroke1Width <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_DASHARRAY); value = dashArrayCtrl->GetValue(); if (DoParseDashArray(value, 0) == false) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-ARRAY: invalid expression !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } else { NormalizedDashArray(value, 0); dashArrayCtrl->SetValue(value); } if (Stroke1DashCount == 0) Stroke1DashOffset = 0.0; else { wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_DASHOFFSET); wxString value = offsetCtrl->GetValue(); if (value.ToDouble(&Stroke1DashOffset) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } } return true; } bool SimpleLineSymbolizerDialog::RetrieveStroke2Page(bool check) { // // retrieving params from the STROKE #2 page // if (EnableStroke2 == false) return true; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); Stroke2Opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_PERPENDICULAR); wxString value = perpCtrl->GetValue(); if (value.ToDouble(&PerpendicularOffset2) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (HasGraphic2 == false) { wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke2Color = color; } else { int selCount = 0; int selected = -1; for (int i = 0; i < GridCtrl2->GetNumberRows(); i++) { if (GridCtrl2->IsInSelection(i, 0) == true) { selected = i; selCount++; } } if (selCount < 1) { if (check == true) { wxMessageBox(wxT ("You must select an External Graphic resource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (selCount > 1) { if (check == true) { wxString msg = wxT ("You must select just a single External Graphic resource !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } List->FindByIndex(selected, Stroke2XLinkHref, Stroke2MimeType); if (EnableStroke2Replacement == true) { wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT); wxString color = replacementCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("COLOR-REPACEMENT isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke2ColorReplacement = color; } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); value = widthCtrl->GetValue(); if (value.ToDouble(&Stroke2Width) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Stroke2Width <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_DASHARRAY); value = dashArrayCtrl->GetValue(); if (DoParseDashArray(value, 1) == false) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-ARRAY: invalid expression !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } else { NormalizedDashArray(value, 1); dashArrayCtrl->SetValue(value); } if (Stroke2DashCount == 0) Stroke2DashOffset = 0.0; else { wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_DASHOFFSET); wxString value = offsetCtrl->GetValue(); if (value.ToDouble(&Stroke2DashOffset) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } } return true; } bool SimpleLineSymbolizerDialog::RetrieveStroke3Page(bool check) { // // retrieving params from the STROKE #3 page // if (EnableStroke2 == false) return true; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE3_OPACITY); Stroke3Opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_PERPENDICULAR); wxString value = perpCtrl->GetValue(); if (value.ToDouble(&PerpendicularOffset3) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (HasGraphic3 == false) { wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke3Color = color; } else { int selCount = 0; int selected = -1; for (int i = 0; i < GridCtrl3->GetNumberRows(); i++) { if (GridCtrl3->IsInSelection(i, 0) == true) { selected = i; selCount++; } } if (selCount < 1) { if (check == true) { wxMessageBox(wxT ("You must select an External Graphic resource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (selCount > 1) { if (check == true) { wxString msg = wxT ("You must select just a single External Graphic resource !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } List->FindByIndex(selected, Stroke3XLinkHref, Stroke3MimeType); if (EnableStroke3Replacement == true) { wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_REPLACEMENT); wxString color = replacementCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("COLOR-REPACEMENT isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke3ColorReplacement = color; } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_WIDTH); value = widthCtrl->GetValue(); if (value.ToDouble(&Stroke3Width) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Stroke3Width <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_DASHARRAY); value = dashArrayCtrl->GetValue(); if (DoParseDashArray(value, 2) == false) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-ARRAY: invalid expression !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } else { NormalizedDashArray(value, 2); dashArrayCtrl->SetValue(value); } if (Stroke3DashCount == 0) Stroke3DashOffset = 0.0; else { wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_DASHOFFSET); wxString value = offsetCtrl->GetValue(); if (value.ToDouble(&Stroke3DashOffset) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } } return true; } void SimpleLineSymbolizerDialog::UpdateStroke1Page() { // // updating the STROKE #1 page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacityCtrl->SetValue(Stroke1Opacity * 100.0); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PERPENDICULAR); char dummy[64]; sprintf(dummy, "%1.2f", PerpendicularOffset1); wxString str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_HEX); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_BTN); wxCheckBox *enableReplacement = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT); wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT); wxTextCtrl *sampleReplacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT_HEX); if (HasGraphic1 == false) { typeBox->SetSelection(0); colorCtrl->Enable(true); sampleCtrl->Enable(true); pick->Enable(true); GridCtrl1->Enable(false); GridCtrl1->ClearSelection(); wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke1Color, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } enableReplacement->Enable(false); replacementCtrl->Enable(false); } else { typeBox->SetSelection(1); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl1->Enable(true); int sel = List->FindByXLinkHref(Stroke1XLinkHref); if (sel >= 0) GridCtrl1->SelectRow(sel); enableReplacement->Enable(true); if (EnableStroke1Replacement == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke1ColorReplacement, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); replacementCtrl->SetValue(str); replacementCtrl->Enable(true); } else replacementCtrl->Enable(false); } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); sprintf(dummy, "%1.2f", Stroke1Width); str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_LINEJOIN); switch (Stroke1LineJoin) { case RL2_PEN_JOIN_MITER: lineJoinCtrl->SetSelection(0); break; case RL2_PEN_JOIN_BEVEL: lineJoinCtrl->SetSelection(2); break; default: lineJoinCtrl->SetSelection(1); break; }; wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_LINECAP); switch (Stroke1LineCap) { case RL2_PEN_CAP_BUTT: lineCapCtrl->SetSelection(0); break; case RL2_PEN_CAP_SQUARE: lineCapCtrl->SetSelection(2); break; default: lineCapCtrl->SetSelection(1); break; }; wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_DASHARRAY); wxString value; NormalizedDashArray(value, 0); dashArrayCtrl->SetValue(value); wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_DASHOFFSET); if (Stroke1DashCount == 0) offsetCtrl->SetValue(wxT("0.0")); else { sprintf(dummy, "%1.2f", Stroke1DashOffset); str = wxString::FromUTF8(dummy); offsetCtrl->SetValue(str); } } void SimpleLineSymbolizerDialog::UpdateStroke2Page() { // // updating the STROKE #2 page // wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); if (EnableStroke2 == true) enableBox->SetValue(true); else enableBox->SetValue(false); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); opacityCtrl->SetValue(Stroke2Opacity * 100.0); if (EnableStroke2 == false) opacityCtrl->Enable(false); else opacityCtrl->Enable(true); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_PERPENDICULAR); char dummy[64]; sprintf(dummy, "%1.2f", PerpendicularOffset2); wxString str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); if (EnableStroke2 == false) perpCtrl->Enable(false); else perpCtrl->Enable(true); wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN); wxCheckBox *enableReplacement = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT); wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT); wxTextCtrl *sampleReplacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT_HEX); if (EnableStroke2 == false) { typeBox->Enable(false); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); enableReplacement->Enable(false); replacementCtrl->Enable(false); } else { typeBox->Enable(true); if (HasGraphic2 == false) { typeBox->SetSelection(0); colorCtrl->Enable(true); sampleCtrl->Enable(true); pick->Enable(true); GridCtrl2->Enable(false); GridCtrl2->ClearSelection(); wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke2Color, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } enableReplacement->Enable(false); replacementCtrl->Enable(false); } else { typeBox->SetSelection(1); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl2->Enable(true); int sel = List->FindByXLinkHref(Stroke2XLinkHref); if (sel >= 0) GridCtrl2->SelectRow(sel); enableReplacement->Enable(true); if (EnableStroke2Replacement == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke2ColorReplacement, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); replacementCtrl->SetValue(str); replacementCtrl->Enable(true); } else replacementCtrl->Enable(false); } } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); sprintf(dummy, "%1.2f", Stroke2Width); str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); if (EnableStroke2 == false) widthCtrl->Enable(false); else widthCtrl->Enable(true); wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_LINEJOIN); switch (Stroke2LineJoin) { case RL2_PEN_JOIN_MITER: lineJoinCtrl->SetSelection(0); break; case RL2_PEN_JOIN_BEVEL: lineJoinCtrl->SetSelection(2); break; default: lineJoinCtrl->SetSelection(1); break; }; if (EnableStroke2 == false) lineJoinCtrl->Enable(false); else lineJoinCtrl->Enable(true); wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_LINECAP); switch (Stroke2LineCap) { case RL2_PEN_CAP_BUTT: lineCapCtrl->SetSelection(0); break; case RL2_PEN_CAP_SQUARE: lineCapCtrl->SetSelection(2); break; default: lineCapCtrl->SetSelection(1); break; }; if (EnableStroke2 == false) lineCapCtrl->Enable(false); else lineCapCtrl->Enable(true); wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_DASHARRAY); wxString value; NormalizedDashArray(value, 1); dashArrayCtrl->SetValue(value); if (EnableStroke2 == false) dashArrayCtrl->Enable(false); else dashArrayCtrl->Enable(true); wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_DASHOFFSET); if (Stroke2DashCount == 0) offsetCtrl->SetValue(wxT("0.0")); else { char dummy[64]; sprintf(dummy, "%1.2f", Stroke2DashOffset); wxString str = wxString::FromUTF8(dummy); offsetCtrl->SetValue(str); } if (EnableStroke2 == false) offsetCtrl->Enable(false); else offsetCtrl->Enable(true); } void SimpleLineSymbolizerDialog::UpdateStroke3Page() { // // updating the STROKE #3 page // wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE3_ENABLE); if (EnableStroke3 == true) enableBox->SetValue(true); else enableBox->SetValue(false); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE3_OPACITY); opacityCtrl->SetValue(Stroke3Opacity * 100.0); if (EnableStroke3 == false) opacityCtrl->Enable(false); else opacityCtrl->Enable(true); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_PERPENDICULAR); char dummy[64]; sprintf(dummy, "%1.2f", PerpendicularOffset3); wxString str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); if (EnableStroke3 == false) perpCtrl->Enable(false); else perpCtrl->Enable(true); wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE3_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_PICKER_HEX); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE3_PICKER_BTN); wxCheckBox *enableReplacement = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE3_ENABLE_REPLACEMENT); wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_REPLACEMENT); wxTextCtrl *sampleReplacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_REPLACEMENT_HEX); if (EnableStroke3 == false) { typeBox->Enable(false); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); enableReplacement->Enable(false); replacementCtrl->Enable(false); } else { typeBox->Enable(true); if (HasGraphic3 == false) { typeBox->SetSelection(0); colorCtrl->Enable(true); sampleCtrl->Enable(true); pick->Enable(true); GridCtrl3->Enable(false); GridCtrl3->ClearSelection(); wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke3Color, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } enableReplacement->Enable(false); replacementCtrl->Enable(false); } else { typeBox->SetSelection(1); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl3->Enable(true); int sel = List->FindByXLinkHref(Stroke3XLinkHref); if (sel >= 0) GridCtrl3->SelectRow(sel); enableReplacement->Enable(true); if (EnableStroke3Replacement == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke3ColorReplacement, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); replacementCtrl->SetValue(str); replacementCtrl->Enable(true); } else replacementCtrl->Enable(false); } } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_WIDTH); sprintf(dummy, "%1.2f", Stroke3Width); str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); if (EnableStroke3 == false) widthCtrl->Enable(false); else widthCtrl->Enable(true); wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE3_LINEJOIN); switch (Stroke3LineJoin) { case RL2_PEN_JOIN_MITER: lineJoinCtrl->SetSelection(0); break; case RL2_PEN_JOIN_BEVEL: lineJoinCtrl->SetSelection(2); break; default: lineJoinCtrl->SetSelection(1); break; }; if (EnableStroke3 == false) lineJoinCtrl->Enable(false); else lineJoinCtrl->Enable(true); wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE3_LINECAP); switch (Stroke3LineCap) { case RL2_PEN_CAP_BUTT: lineCapCtrl->SetSelection(0); break; case RL2_PEN_CAP_SQUARE: lineCapCtrl->SetSelection(2); break; default: lineCapCtrl->SetSelection(1); break; }; if (EnableStroke3 == false) lineCapCtrl->Enable(false); else lineCapCtrl->Enable(true); wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_DASHARRAY); wxString value; NormalizedDashArray(value, 2); dashArrayCtrl->SetValue(value); if (EnableStroke3 == false) dashArrayCtrl->Enable(false); else dashArrayCtrl->Enable(true); wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE3_DASHOFFSET); if (Stroke3DashCount == 0) offsetCtrl->SetValue(wxT("0.0")); else { char dummy[64]; sprintf(dummy, "%1.2f", Stroke3DashOffset); wxString str = wxString::FromUTF8(dummy); offsetCtrl->SetValue(str); } if (EnableStroke3 == false) offsetCtrl->Enable(false); else offsetCtrl->Enable(true); } bool SimpleLineSymbolizerDialog::RetrievePreviewPage() { // // retrieving params from the PREVIEW page // return true; } void SimpleLineSymbolizerDialog::PrepareLinestringPath(void *xctx, double perpendicular_offset) { // Visual Preview gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine(); gaiaAppendPointToDynamicLine(dyn, 210.0, 80.0); gaiaAppendPointToDynamicLine(dyn, 210.0, 150.0); gaiaAppendPointToDynamicLine(dyn, 175.0, 150.0); double pi = 3.14159265359; for (double rads = (2.0 * pi) - (pi / 2.0); rads >= 0.0; rads -= 0.666666) { double x = 135.0 + (115.0 * cos(rads)); double y = 150.0 + (115.0 * sin(rads)); gaiaAppendPointToDynamicLine(dyn, x, y); } for (double rads = pi; rads <= (pi * 2.0) + (pi / 2.0); rads += 0.1) { double x = 365.0 + (115.0 * cos(rads)); double y = 150.0 + (115.0 * sin(rads)); gaiaAppendPointToDynamicLine(dyn, x, y); } gaiaAppendPointToDynamicLine(dyn, 365.0, 150.0); gaiaAppendPointToDynamicLine(dyn, 340.0, 200.0); gaiaAppendPointToDynamicLine(dyn, 310.0, 200.0); gaiaAppendPointToDynamicLine(dyn, 310.0, 100.0); gaiaAppendPointToDynamicLine(dyn, 410.0, 100.0); gaiaAppendPointToDynamicLine(dyn, 410.0, 200.0); int points = 0; gaiaPointPtr pt = dyn->First; while (pt != NULL) { // counting how many Points are there points++; pt = pt->Next; } gaiaGeomCollPtr geom = gaiaAllocGeomColl(); gaiaLinestringPtr ln = gaiaAddLinestringToGeomColl(geom, points); int iv = 0; pt = dyn->First; while (pt != NULL) { // preparing the Linestring gaiaSetPoint(ln->Coords, iv, pt->X, pt->Y); iv++; pt = pt->Next; } gaiaFreeDynamicLine(dyn); gaiaGeomCollPtr geom2; if (perpendicular_offset != 0.0) { // Offset Curve geom2 = gaiaOffsetCurve_r(MainFrame->GetSpliteInternalCache(), geom, perpendicular_offset, 16, 0); gaiaFreeGeomColl(geom); } else { // unchanged geom2 = geom; } // preparing the Line Path ln = geom2->FirstLinestring; rl2GraphicsContextPtr ctx = (rl2GraphicsContextPtr) xctx; for (iv = 0; iv < ln->Points; iv++) { double x; double y; gaiaGetPoint(ln->Coords, iv, &x, &y); if (iv == 0) rl2_graph_move_to_point(ctx, x, y); else rl2_graph_add_line_to_path(ctx, x, y); } gaiaFreeGeomColl(geom2); } void SimpleLineSymbolizerDialog::UpdatePreviewPage() { // // updating the PREVIEW page // rl2GraphicsPatternPtr pattern1 = NULL; rl2GraphicsPatternPtr pattern2 = NULL; rl2GraphicsPatternPtr pattern3 = NULL; wxRadioBox *backCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BACKGROUND); switch (PreviewBackground) { case GUI_PREVIEW_BACKGROUND_WHITE: backCtrl->SetSelection(1); break; case GUI_PREVIEW_BACKGROUND_BLACK: backCtrl->SetSelection(2); break; default: backCtrl->SetSelection(0); break; }; rl2GraphicsContextPtr ctx = NULL; ctx = rl2_graph_create_context(500, 300); if (ctx == NULL) return; // transparent background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 0); rl2_graph_draw_rectangle(ctx, -1, -1, 501, 301); if (HasGraphic1 == false) { // preparing a Color-based Pen double aleph = 255.0 * Stroke1Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke1Color, color); if (Stroke1DashCount == 0) rl2_graph_set_solid_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke1Width, Stroke1LineCap, Stroke1LineJoin); else rl2_graph_set_dashed_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke1Width, Stroke1LineCap, Stroke1LineJoin, Stroke1DashCount, Stroke1DashArray, Stroke1DashOffset); } else { // preparing a Pattern-based Pen pattern1 = rl2_create_pattern_from_external_graphic(MainFrame->GetSqlite(), Stroke1XLinkHref.ToUTF8(), 1); if (pattern1 != NULL) { if (EnableStroke1Replacement) { // attempting to recolor the External Graphic resource wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke1ColorReplacement, color); rl2_graph_pattern_recolor(pattern1, color.Red(), color.Green(), color.Blue()); } if (Stroke1Opacity < 1.0) { // setting up the required transparency double aleph = 255.0 * Stroke1Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; rl2_graph_pattern_transparency(pattern1, alpha); } if (Stroke1DashCount == 0) rl2_graph_set_pattern_solid_pen(ctx, pattern1, Stroke1Width, Stroke1LineCap, Stroke1LineJoin); else rl2_graph_set_pattern_dashed_pen(ctx, pattern1, Stroke1Width, Stroke1LineCap, Stroke1LineJoin, Stroke1DashCount, Stroke1DashArray, Stroke1DashOffset); } else { // invalid Pattern: defaulting to a black Pen if (Stroke1DashCount == 0) rl2_graph_set_solid_pen(ctx, 0, 0, 0, 255, Stroke1Width, Stroke1LineCap, Stroke1LineJoin); else rl2_graph_set_dashed_pen(ctx, 0, 0, 0, 255, Stroke1Width, Stroke1LineCap, Stroke1LineJoin, Stroke1DashCount, Stroke1DashArray, Stroke1DashOffset); } } // applying the Stroke #1 PrepareLinestringPath(ctx, PerpendicularOffset1); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); if (EnableStroke2 == true) { // applying the Stroke #2 if (HasGraphic2 == false) { // preparing a Color-based Pen double aleph = 255.0 * Stroke2Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke2Color, color); if (Stroke2DashCount == 0) rl2_graph_set_solid_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke2Width, Stroke2LineCap, Stroke2LineJoin); else rl2_graph_set_dashed_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke2Width, Stroke2LineCap, Stroke2LineJoin, Stroke2DashCount, Stroke2DashArray, Stroke2DashOffset); } else { // preparing a Pattern-based Pen pattern2 = rl2_create_pattern_from_external_graphic(MainFrame->GetSqlite(), Stroke2XLinkHref.ToUTF8(), 1); if (pattern2 != NULL) { if (EnableStroke2Replacement) { // attempting to recolor the External Graphic resource wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke2ColorReplacement, color); rl2_graph_pattern_recolor(pattern2, color.Red(), color.Green(), color.Blue()); } if (Stroke2Opacity < 1.0) { // setting up the required transparency double aleph = 255.0 * Stroke2Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; rl2_graph_pattern_transparency(pattern2, alpha); } if (Stroke2DashCount == 0) rl2_graph_set_pattern_solid_pen(ctx, pattern2, Stroke2Width, Stroke2LineCap, Stroke2LineJoin); else rl2_graph_set_pattern_dashed_pen(ctx, pattern2, Stroke2Width, Stroke2LineCap, Stroke2LineJoin, Stroke2DashCount, Stroke2DashArray, Stroke2DashOffset); } else { // invalid Pattern: defaulting to a black Pen if (Stroke2DashCount == 0) rl2_graph_set_solid_pen(ctx, 0, 0, 0, 255, Stroke2Width, Stroke2LineCap, Stroke2LineJoin); else rl2_graph_set_dashed_pen(ctx, 0, 0, 0, 255, Stroke2Width, Stroke2LineCap, Stroke2LineJoin, Stroke2DashCount, Stroke2DashArray, Stroke2DashOffset); } } PrepareLinestringPath(ctx, PerpendicularOffset2); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); } if (EnableStroke3 == true) { // applying the Stroke #3 if (HasGraphic3 == false) { // preparing a Color-based Pen double aleph = 255.0 * Stroke3Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke3Color, color); if (Stroke3DashCount == 0) rl2_graph_set_solid_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke3Width, Stroke3LineCap, Stroke3LineJoin); else rl2_graph_set_dashed_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke3Width, Stroke3LineCap, Stroke3LineJoin, Stroke3DashCount, Stroke3DashArray, Stroke3DashOffset); } else { // preparing a Pattern-based Pen pattern3 = rl2_create_pattern_from_external_graphic(MainFrame->GetSqlite(), Stroke3XLinkHref.ToUTF8(), 1); if (pattern3 != NULL) { if (EnableStroke3Replacement) { // attempting to recolor the External Graphic resource wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke3ColorReplacement, color); rl2_graph_pattern_recolor(pattern3, color.Red(), color.Green(), color.Blue()); } if (Stroke3Opacity < 1.0) { // setting up the required transparency double aleph = 255.0 * Stroke3Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; rl2_graph_pattern_transparency(pattern3, alpha); } if (Stroke3DashCount == 0) rl2_graph_set_pattern_solid_pen(ctx, pattern3, Stroke3Width, Stroke3LineCap, Stroke3LineJoin); else rl2_graph_set_pattern_dashed_pen(ctx, pattern3, Stroke3Width, Stroke3LineCap, Stroke3LineJoin, Stroke3DashCount, Stroke3DashArray, Stroke3DashOffset); } else { // invalid Pattern: defaulting to a black Pen if (Stroke3DashCount == 0) rl2_graph_set_solid_pen(ctx, 0, 0, 0, 255, Stroke3Width, Stroke3LineCap, Stroke3LineJoin); else rl2_graph_set_dashed_pen(ctx, 0, 0, 0, 255, Stroke3Width, Stroke3LineCap, Stroke3LineJoin, Stroke3DashCount, Stroke3DashArray, Stroke3DashOffset); } } PrepareLinestringPath(ctx, PerpendicularOffset3); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); } // creating the RGB and Alpha arrays int half_transparency = 0; unsigned char *rgb_array = rl2_graph_get_context_rgb_array(ctx); unsigned char *alpha_array = rl2_graph_get_context_alpha_array(ctx, &half_transparency); rl2_graph_destroy_context(ctx); if (pattern1 != NULL) rl2_graph_destroy_pattern(pattern1); if (pattern2 != NULL) rl2_graph_destroy_pattern(pattern2); if (pattern3 != NULL) rl2_graph_destroy_pattern(pattern3); if (rgb_array == NULL || alpha_array == NULL) { if (rgb_array != NULL) free(rgb_array); if (alpha_array != NULL) free(alpha_array); return; } // creating the Preview from RGB and Alpha arrays wxImage img(500, 300); img.SetData(rgb_array); img.SetAlpha(alpha_array); wxBitmap bmp(img); wxBitmap bmp2; wxBrush brush; wxMemoryDC dc; wxBitmap white = wxBitmap(500, 300); wxBitmap black = wxBitmap(500, 300); switch (PreviewBackground) { case GUI_PREVIEW_BACKGROUND_WHITE: dc.SelectObject(white); brush = wxBrush(wxColour(255, 255, 255)); dc.SetBrush(brush); dc.DrawRectangle(0, 0, 500, 300); dc.SelectObject(wxNullBitmap); bmp2 = white.GetSubBitmap(wxRect(0, 0, white.GetWidth(), white.GetHeight())); break; case GUI_PREVIEW_BACKGROUND_BLACK: dc.SelectObject(black); brush = wxBrush(wxColour(0, 0, 0)); dc.SetBrush(brush); dc.DrawRectangle(0, 0, 500, 300); dc.SelectObject(wxNullBitmap); bmp2 = black.GetSubBitmap(wxRect(0, 0, black.GetWidth(), black.GetHeight())); break; default: bmp2 = PreviewBackBitmap.GetSubBitmap(wxRect (0, 0, PreviewBackBitmap.GetWidth(), PreviewBackBitmap.GetHeight())); break; }; // printing the Preview over the currently selected background dc.SelectObject(bmp2); dc.DrawBitmap(bmp, 0, 0, true); dc.SelectObject(wxNullBitmap); // updating the GUI Preview SymbolizerPreview *previewCtrl = (SymbolizerPreview *) FindWindow(ID_SYMBOLIZER_PREVIEW); previewCtrl->SetBitmap(bmp2); } void SimpleLineSymbolizerDialog::OnPageChanging(wxNotebookEvent & event) { // // TAB/PAGE selection changing // bool ret; switch (event.GetOldSelection()) { case 0: ret = RetrieveMainPage(); break; case 1: ret = RetrieveStroke1Page(); break; case 2: ret = RetrieveStroke2Page(); break; case 3: ret = RetrieveStroke3Page(); break; case 4: ret = RetrievePreviewPage(); break; }; if (ret != true) event.Veto(); } void SimpleLineSymbolizerDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // switch (event.GetSelection()) { case 0: UpdateMainPage(); break; case 1: UpdateStroke1Page(); break; case 2: UpdateStroke2Page(); break; case 3: UpdateStroke3Page(); break; case 4: UpdatePreviewPage(); break; }; } char *SimpleLineSymbolizerDialog::DoCreateFeatureTypeXML() { // // creating the SLD/SE (XML) code - Feature Type // char *str; const char *cstr; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } switch (Uom) { case GUI_UOM_METRE: cstr = "http://www.opengeospatial.org/se/units/metre"; break; case GUI_UOM_INCH: cstr = "http://www.opengeospatial.org/se/units/inch"; break; default: cstr = "http://www.opengeospatial.org/se/units/pixel"; break; }; xml = sqlite3_mprintf("%s\t\t\r\n", prev, cstr); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphic1 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1XLinkHref.ToUTF8()) + 1]; strcpy(str, Stroke1XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1MimeType.ToUTF8()) + 1]; strcpy(str, Stroke1MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableStroke1Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1ColorReplacement.ToUTF8()) + 1]; strcpy(str, Stroke1ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Stroke1Color.ToUTF8()) + 1]; strcpy(str, Stroke1Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke1Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke1Width); sqlite3_free(prev); prev = xml; switch (Stroke1LineJoin) { case RL2_PEN_JOIN_MITER: xml = sqlite3_mprintf ("%s\t\t\t\tmitre\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_JOIN_BEVEL: xml = sqlite3_mprintf ("%s\t\t\t\tbevel\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; switch (Stroke1LineCap) { case RL2_PEN_CAP_BUTT: xml = sqlite3_mprintf ("%s\t\t\t\tbutt\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_CAP_SQUARE: xml = sqlite3_mprintf ("%s\t\t\t\tsquare\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; if (Stroke1DashCount > 0 && Stroke1DashArray != NULL) { wxString dash; NormalizedDashArray(dash, 0, ' '); str = new char[strlen(dash.ToUTF8()) + 1]; strcpy(str, dash.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Stroke1DashOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke1DashOffset); sqlite3_free(prev); prev = xml; } } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (PerpendicularOffset1 != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t%1.2f\r\n", prev, PerpendicularOffset1); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (EnableStroke2 == true) { // Stroke #2 switch (Uom) { case GUI_UOM_METRE: cstr = "http://www.opengeospatial.org/se/units/metre"; break; case GUI_UOM_INCH: cstr = "http://www.opengeospatial.org/se/units/inch"; break; default: cstr = "http://www.opengeospatial.org/se/units/pixel"; break; }; xml = sqlite3_mprintf("%s\t\t\r\n", prev, cstr); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphic2 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke2XLinkHref.ToUTF8()) + 1]; strcpy(str, Stroke2XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke2MimeType.ToUTF8()) + 1]; strcpy(str, Stroke2MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableStroke2Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke2ColorReplacement.ToUTF8()) + 1]; strcpy(str, Stroke2ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Stroke2Color.ToUTF8()) + 1]; strcpy(str, Stroke2Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke2Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke2Width); sqlite3_free(prev); prev = xml; switch (Stroke2LineJoin) { case RL2_PEN_JOIN_MITER: xml = sqlite3_mprintf ("%s\t\t\t\tmitre\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_JOIN_BEVEL: xml = sqlite3_mprintf ("%s\t\t\t\tbevel\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; switch (Stroke2LineCap) { case RL2_PEN_CAP_BUTT: xml = sqlite3_mprintf ("%s\t\t\t\tbutt\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_CAP_SQUARE: xml = sqlite3_mprintf ("%s\t\t\t\tsquare\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; if (Stroke2DashCount > 0 && Stroke2DashArray != NULL) { wxString dash; NormalizedDashArray(dash, 1, ' '); str = new char[strlen(dash.ToUTF8()) + 1]; strcpy(str, dash.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Stroke2DashOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke2DashOffset); sqlite3_free(prev); prev = xml; } } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (PerpendicularOffset2 != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t%1.2f\r\n", prev, PerpendicularOffset2); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (EnableStroke3 == true) { // Stroke #3 switch (Uom) { case GUI_UOM_METRE: cstr = "http://www.opengeospatial.org/se/units/metre"; break; case GUI_UOM_INCH: cstr = "http://www.opengeospatial.org/se/units/inch"; break; default: cstr = "http://www.opengeospatial.org/se/units/pixel"; break; }; xml = sqlite3_mprintf("%s\t\t\r\n", prev, cstr); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphic3 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke3XLinkHref.ToUTF8()) + 1]; strcpy(str, Stroke3XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke3MimeType.ToUTF8()) + 1]; strcpy(str, Stroke3MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableStroke3Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke3ColorReplacement.ToUTF8()) + 1]; strcpy(str, Stroke3ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Stroke3Color.ToUTF8()) + 1]; strcpy(str, Stroke3Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke3Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke3Width); sqlite3_free(prev); prev = xml; switch (Stroke3LineJoin) { case RL2_PEN_JOIN_MITER: xml = sqlite3_mprintf ("%s\t\t\t\tmitre\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_JOIN_BEVEL: xml = sqlite3_mprintf ("%s\t\t\t\tbevel\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; switch (Stroke3LineCap) { case RL2_PEN_CAP_BUTT: xml = sqlite3_mprintf ("%s\t\t\t\tbutt\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_CAP_SQUARE: xml = sqlite3_mprintf ("%s\t\t\t\tsquare\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; if (Stroke3DashCount > 0 && Stroke3DashArray != NULL) { wxString dash; NormalizedDashArray(dash, 0, ' '); str = new char[strlen(dash.ToUTF8()) + 1]; strcpy(str, dash.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Stroke3DashOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke1DashOffset); sqlite3_free(prev); prev = xml; } } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (PerpendicularOffset3 != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t%1.2f\r\n", prev, PerpendicularOffset3); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *SimpleLineSymbolizerDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - LineSymbolizer // char *str; const char *cstr; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev, cstr); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphic1 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1XLinkHref.ToUTF8()) + 1]; strcpy(str, Stroke1XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1MimeType.ToUTF8()) + 1]; strcpy(str, Stroke1MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableStroke1Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1ColorReplacement.ToUTF8()) + 1]; strcpy(str, Stroke1ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Stroke1Color.ToUTF8()) + 1]; strcpy(str, Stroke1Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, Stroke1Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, Stroke1Width); sqlite3_free(prev); prev = xml; switch (Stroke1LineJoin) { case RL2_PEN_JOIN_MITER: xml = sqlite3_mprintf ("%s\t\tmitre\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_JOIN_BEVEL: xml = sqlite3_mprintf ("%s\t\tbevel\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; switch (Stroke1LineCap) { case RL2_PEN_CAP_BUTT: xml = sqlite3_mprintf ("%s\t\tbutt\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_CAP_SQUARE: xml = sqlite3_mprintf ("%s\t\tsquare\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; if (Stroke1DashCount > 0 && Stroke1DashArray != NULL) { wxString dash; NormalizedDashArray(dash, 0, ' '); str = new char[strlen(dash.ToUTF8()) + 1]; strcpy(str, dash.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Stroke1DashOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, Stroke1DashOffset); sqlite3_free(prev); prev = xml; } } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (PerpendicularOffset1 != 0.0) { xml = sqlite3_mprintf ("%s\t%1.2f\r\n", prev, PerpendicularOffset1); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void SimpleLineSymbolizerDialog::OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the VectorSymbolizer into the DBMS // switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrieveStroke1Page(); break; case 2: RetrieveStroke2Page(); break; case 3: RetrieveStroke3Page(); break; case 4: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } char *xml; if (MinScale == true || MaxScale == true || EnableStroke2 == true || EnableStroke3 == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertVectorSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE VectorSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void SimpleLineSymbolizerDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the VectorSymbolizer as an external file // int ret; wxString path; wxString lastDir; switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrieveStroke1Page(); break; case 2: RetrieveStroke2Page(); break; case 3: RetrieveStroke3Page(); break; case 4: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE LineSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true || EnableStroke2 == true || EnableStroke3 == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE LineSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void SimpleLineSymbolizerDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the VectorSymbolizer into the Clipboard // switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrieveStroke1Page(); break; case 2: RetrieveStroke2Page(); break; case 3: RetrieveStroke3Page(); break; case 4: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } char *xml; if (MinScale == true || MaxScale == true || EnableStroke2 == true || EnableStroke3 == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void SimpleLineSymbolizerDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool MyFrame::ValidateVectorStyle(void **blob, int *blob_size, const char *xml) { // // attempting to parse and validate a Vector Style // int ret; sqlite3_stmt *stmt; void *xblob = NULL; int xblob_size; int valid = 0; // Schema validation const char *sql = "SELECT XB_Create(?, 1, 1)"; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, xml, strlen(xml), SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { const void *xxblob = sqlite3_column_blob(stmt, 0); xblob_size = sqlite3_column_bytes(stmt, 0); xblob = malloc(xblob_size); memcpy(xblob, xxblob, xblob_size); } } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (xblob == NULL) return false; // Checking if really is a Vector Style stmt = NULL; sql = "SELECT XB_IsSldSEVectorStyle(?)"; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) goto invalid; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, xblob, xblob_size, SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else goto invalid; } sqlite3_finalize(stmt); stmt = NULL; if (!valid) goto invalid; *blob = xblob; *blob_size = xblob_size; return true; invalid: if (stmt != NULL) sqlite3_finalize(stmt); free(xblob); *blob = NULL; *blob_size = 0; return false; } bool MyFrame::DoInsertVectorSymbolizer(char *xml) { // // attempting to register a VectorSymbolizer // void *blob = NULL; int blob_size; ::wxBeginBusyCursor(); if (ValidateVectorStyle(&blob, &blob_size, xml) != true) { ::wxEndBusyCursor(); wxMessageBox(wxT("Error: not a valid SLD/SE VectorSymbolizer"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(xml); return false; } ::wxEndBusyCursor(); sqlite3_free(xml); sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_RegisterVectorStyle(?)"; int ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, blob, blob_size, free); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { sqlite3_finalize(stmt); return false; } sqlite3_finalize(stmt); return true; } ExternalGraphic::ExternalGraphic(wxString & xlink_href, wxString & title, wxString & abstract, wxString & mime_type, const void *blob, int blob_sz) { // ctor XLinkHref = xlink_href; Title = title; Abstract = abstract; MimeType = mime_type; if (DoBuildGraphic(mime_type, blob, blob_sz) != true) DoBuildDefaultGraphic(); Next = NULL; } bool ExternalGraphic::DoBuildGraphic(wxString & mime_type, const void *blob, int blob_sz) { // attempting to build an Image from BLOB rl2RasterPtr raster = NULL; if (mime_type.CmpNoCase(wxT("image/png")) == 0) raster = rl2_raster_from_png((const unsigned char *) blob, blob_sz, 1); if (mime_type.CmpNoCase(wxT("image/gif")) == 0) raster = rl2_raster_from_gif((const unsigned char *) blob, blob_sz); if (mime_type.CmpNoCase(wxT("image/jpeg")) == 0) raster = rl2_raster_from_jpeg((const unsigned char *) blob, blob_sz); if (mime_type.CmpNoCase(wxT("image/svg+xml")) == 0) { // preparing an SVG icon char *svg = gaiaXmlTextFromBlob((const unsigned char *) blob, blob_sz, 0); int svg_sz = strlen(svg); rl2SvgPtr svg_handle = rl2_create_svg((const unsigned char *) svg, svg_sz); if (svg_handle != NULL) { double SvgWidth; double SvgHeight; if (rl2_get_svg_size(svg_handle, &SvgWidth, &SvgHeight) == RL2_OK) { double w = SvgWidth; double h = SvgHeight; if (SvgWidth > 48.0 || SvgHeight > 24.0) { while (w > 48.0 || h > 24.0) { // rescaling w *= 0.999; h *= 0.999; } } else { while (w < 47.0 && h < 23.0) { // rescaling w *= 1.001; h *= 1.001; } } double sz = w; if (h > sz) sz = h; raster = rl2_raster_from_svg(svg_handle, sz); } rl2_destroy_svg(svg_handle); } free(svg); } if (raster == NULL) return false; // ok, building a wxImage unsigned int width; unsigned int height; unsigned char *rgbaArray = NULL; int rgbaSize; if (rl2_get_raster_size(raster, &width, &height) == RL2_OK) { if (rl2_raster_data_to_RGBA(raster, &rgbaArray, &rgbaSize) != RL2_OK) rgbaArray = NULL; } rl2_destroy_raster(raster); if (rgbaArray == NULL) return false; // creating the Image from RGB array unsigned int x; unsigned int y; wxImage img = wxImage(width, height); unsigned char *p = rgbaArray; img.SetAlpha(); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { unsigned char r = *p++; unsigned char g = *p++; unsigned char b = *p++; unsigned char alpha = *p++; img.SetRGB(x, y, r, g, b); img.SetAlpha(x, y, alpha); } } free(rgbaArray); // normalized rescaling int norm_width = width; int norm_height = height; double incr; double ww = width; double hh = height; if (width > 48 || height > 24) { incr = 0.999; while (1) { ww *= incr; hh *= incr; if (ww > 47.0 || hh > 23.0) { norm_width = ww; norm_height = hh; } else break; } } else { incr = 1.001; while (1) { ww *= incr; hh *= incr; if (ww <= 48.0 && hh <= 24.0) { norm_width = ww; norm_height = hh; } else break; } } Graphic = img.Rescale(norm_width, norm_height); return true; } void ExternalGraphic::DoBuildDefaultGraphic() { // building a default gray image Graphic = wxImage(48, 24); for (int y = 0; y < 24; y++) { for (int x = 0; x < 48; x++) Graphic.SetRGB(x, y, 128, 128, 128); } } ExternalGraphicList::~ExternalGraphicList() { // dtor ExternalGraphic *pE; ExternalGraphic *pEn; pE = First; while (pE != NULL) { pEn = pE->GetNext(); delete pE; pE = pEn; } } void ExternalGraphicList::Add(wxString & xlink_href, wxString & title, wxString & abstract, wxString & mime_type, const void *blob, int blob_sz) { // inserting a new External Graphic into the list ExternalGraphic *pE = new ExternalGraphic(xlink_href, title, abstract, mime_type, blob, blob_sz); if (First == NULL) First = pE; if (Last != NULL) Last->SetNext(pE); Last = pE; } void ExternalGraphicList::FindByIndex(int idx, wxString & xlink_href, wxString & mime_type) { // searching an entry by its position ExternalGraphic *pE; int count = 0; pE = First; while (pE != NULL) { if (idx == count) { xlink_href = pE->GetXLinkHref(); mime_type = pE->GetMimeType(); return; } count++; pE = pE->GetNext(); } xlink_href = wxT(""); } int ExternalGraphicList::FindByXLinkHref(wxString & xlink_href) { // searching an entry by XLinkHref value ExternalGraphic *pE; int count = 0; pE = First; while (pE != NULL) { if (xlink_href.CmpNoCase(pE->GetXLinkHref()) == 0) return count; count++; pE = pE->GetNext(); } return -1; } ExternalGraphicList *MyFrame::FindExternalGraphic(bool no_svg) { // will retrieve all registered External Graphics ExternalGraphicList *list = new ExternalGraphicList(); sqlite3_stmt *stmt = NULL; const char *sql; sql = "SELECT xlink_href, title, abstract, GetMimeType(resource), resource " "FROM SE_external_graphics"; int ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { delete list; return NULL; } while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { wxString xlink_href; wxString title; wxString abstract; wxString mime_type; const void *blob = NULL; int blob_sz = 0; const char *str = (const char *) sqlite3_column_text(stmt, 0); xlink_href = wxString::FromUTF8(str); str = (const char *) sqlite3_column_text(stmt, 1); title = wxString::FromUTF8(str); str = (const char *) sqlite3_column_text(stmt, 2); abstract = wxString::FromUTF8(str); str = (const char *) sqlite3_column_text(stmt, 3); if (no_svg == true && strcasecmp(str, "image/svg+xml") == 0) continue; mime_type = wxString::FromUTF8(str); if (sqlite3_column_type(stmt, 4) == SQLITE_BLOB) { blob = sqlite3_column_blob(stmt, 4); blob_sz = sqlite3_column_bytes(stmt, 4); } list->Add(xlink_href, title, abstract, mime_type, blob, blob_sz); } else { sqlite3_finalize(stmt); delete list; return NULL; } } sqlite3_finalize(stmt); return list; } void MyGraphicCellRenderer::Draw(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc, const wxRect & rect, int row, int col, bool isSelected) { // drawing a Graphic cell wxBitmap bmp = wxBitmap(*Graphic); wxColour color = attr.GetBackgroundColour(); if (grid.IsEnabled() == false) { color = wxSystemSettings::GetColour(wxSYS_COLOUR_MENU); wxImage img = Graphic->ConvertToGreyscale(); bmp = wxBitmap(img); } dc.SetBrush(wxBrush(color)); dc.SetPen(*wxTRANSPARENT_PEN); dc.DrawRectangle(rect); int x = (rect.GetWidth() - bmp.GetWidth()) / 2; int y = (rect.GetHeight() - bmp.GetHeight()) / 2; dc.DrawBitmap(bmp, rect.x + x, rect.y + y, true); } SymbolizerPreview::SymbolizerPreview(wxPropertySheetDialog * parent, wxWindow * panel, wxWindowID id, const wxBitmap & bmp, const wxSize & size):wxStaticBitmap(panel, id, bmp, wxDefaultPosition, size) { Parent = parent; } SimplePolygonSymbolizerDialog::SimplePolygonSymbolizerDialog() { // ctor Stroke1DashArray = NULL; Stroke2DashArray = NULL; List = NULL; } SimplePolygonSymbolizerDialog::~SimplePolygonSymbolizerDialog() { // dtor if (Stroke1DashArray != NULL) delete[]Stroke1DashArray; if (Stroke2DashArray != NULL) delete[]Stroke2DashArray; if (List) delete List; } bool SimplePolygonSymbolizerDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Uom = GUI_UOM_PIXEL; MinScale = false; MaxScale = false; DisplacementX1 = 0.0; DisplacementY1 = 0.0; PerpendicularOffset1 = 0.0; EnableStroke1 = true; HasGraphicStroke1 = false; Stroke1Opacity = 1.0; Stroke1Color = wxT("#000000"); EnableStroke1Replacement = false; Stroke1ColorReplacement = wxT("#000000"); Stroke1Width = 1.0; Stroke1LineJoin = RL2_PEN_JOIN_ROUND; Stroke1LineCap = RL2_PEN_CAP_ROUND; Stroke1DashCount = 0; Stroke1DashOffset = 0.0; EnableFill1 = true; HasGraphicFill1 = false; Fill1Opacity = 1.0; Fill1Color = wxT("#808080"); EnableFill1Replacement = false; Fill1ColorReplacement = wxT("#000000"); EnablePolygon2 = false; EnableStroke2 = false; DisplacementX2 = 0.0; DisplacementY2 = 0.0; PerpendicularOffset2 = 0.0; Stroke2Opacity = 1.0; HasGraphicStroke2 = false; Stroke2Color = wxT("#000000"); EnableStroke2Replacement = false; Stroke2ColorReplacement = wxT("#000000"); Stroke2Width = 1.0; Stroke2LineJoin = RL2_PEN_JOIN_ROUND; Stroke2LineCap = RL2_PEN_CAP_ROUND; Stroke2DashCount = 0; Stroke2DashOffset = 0.0; EnableFill2 = false; HasGraphicFill2 = false; Fill2Opacity = 1.0; Fill2Color = wxT("#808080"); EnableFill2Replacement = false; Fill2ColorReplacement = wxT("#000000"); PreviewBackground = GUI_PREVIEW_BACKGROUND_CHECKED; List = MainFrame->FindExternalGraphic(true); if (wxPropertySheetDialog::Create (parent, wxID_ANY, wxT("Simple Polygon Symbolizer")) == false) return false; wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels wxPanel *mainPage = CreateMainPage(book); book->AddPage(mainPage, wxT("General"), true); wxPanel *fill1Page = CreateFill1Page(book); book->AddPage(fill1Page, wxT("Polygon #1 Fill"), false); wxPanel *stroke1Page = CreateStroke1Page(book); book->AddPage(stroke1Page, wxT("Polygon #1 Stroke"), false); wxPanel *fill2Page = CreateFill2Page(book); book->AddPage(fill2Page, wxT("Polygon #2 Fill"), false); wxPanel *stroke2Page = CreateStroke2Page(book); book->AddPage(stroke2Page, wxT("Polygon #2 Stroke"), false); wxPanel *previewPage = CreatePreviewPage(book); book->AddPage(previewPage, wxT("Preview"), false); CreateButtons(); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnPageChanging); Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnPageChanged); // appends event handler for buttons Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCopy); // centers the dialog window Centre(); UpdateMainPage(); return true; } wxPanel *SimplePolygonSymbolizerDialog::CreateMainPage(wxWindow * parent) { // // creating the MAIN page // wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the PolygonSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the PolygonSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the PolygonSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: UOM and Visibility Range boxSizer->AddSpacer(50); wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // fourth row A: Unit Of Measure - UOM wxString uom[3]; uom[0] = wxT("&Pixel"); uom[1] = wxT("&Metre"); uom[2] = wxT("&Inch"); wxRadioBox *uomBox = new wxRadioBox(panel, ID_SYMBOLIZER_UOM, wxT("&Unit Of Measure"), wxDefaultPosition, wxDefaultSize, 3, uom, 1, wxRA_SPECIFY_ROWS); miscSizer->Add(uomBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); uomBox->SetSelection(0); // fourth row B: optional Visibility Range miscSizer->AddSpacer(50); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_UOM, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdUomChanged); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdScaleChanged); return panel; } void SimplePolygonSymbolizerDialog:: OnCmdUomChanged(wxCommandEvent & WXUNUSED(event)) { // // UOM selection changed // wxRadioBox *uomCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_UOM); switch (uomCtrl->GetSelection()) { case 1: Uom = GUI_UOM_METRE; break; case 2: Uom = GUI_UOM_INCH; break; default: Uom = GUI_UOM_PIXEL; break; }; } void SimplePolygonSymbolizerDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } wxPanel *SimplePolygonSymbolizerDialog::CreateFill1Page(wxWindow * parent) { // // creating the Polygon #1 Fill page // wxPanel *panel = new wxPanel(parent, ID_PANE_FILL1); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the Polygon #1 Displacement and Perpendicular Offset wxBoxSizer *polygonBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(polygonBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *polygonBox = new wxStaticBox(panel, wxID_STATIC, wxT("Polygon #1"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *polygonSizer = new wxStaticBoxSizer(polygonBox, wxHORIZONTAL); polygonBoxSizer->Add(polygonSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Displacement wxBoxSizer *displacementBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonSizer->Add(displacementBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); displacementBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON1_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive: larger. / Negative: smaller.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Drawing polygons smaller or larger than their actual geometry (Buffer).")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Fill#1 Opacity wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Polygon #1 Fill"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxVERTICAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL1_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(true); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); enableSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_FILL1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: Fill color or Graphic wxBoxSizer *fillSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(fillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Fill Type wxBoxSizer *fill1Sizer = new wxBoxSizer(wxVERTICAL); fillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString type[2]; type[0] = wxT("&Color"); type[1] = wxT("&Graphic"); wxRadioBox *typeBox = new wxRadioBox(panel, ID_SYMBOLIZER_FILL1_TYPE, wxT("&Fill Type"), wxDefaultPosition, wxDefaultSize, 2, type, 1, wxRA_SPECIFY_ROWS); fill1Sizer->Add(typeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); typeBox->SetSelection(0); // third row B: Fill Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); fill1Sizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL1_COLOR, Fill1Color, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL1_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(0, 0, 0); sampleCtrl->SetBackgroundColour(back); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_FILL1_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row C: GRID to select an External Graphic wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); fillSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *gridBox = new wxStaticBox(panel, wxID_STATIC, wxT("External Graphic resources"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxHORIZONTAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl1 = new wxGrid(panel, ID_SYMBOLIZER_FILL1_GRAPHIC, wxDefaultPosition, wxSize(420, 150), wxALWAYS_SHOW_SB); int count = 0; ExternalGraphic *pE = List->GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl1->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl1->SetColLabelValue(0, wxT("Graphic")); GridCtrl1->SetColLabelValue(1, wxT("Title")); GridCtrl1->SetColLabelValue(2, wxT("Abstract")); GridCtrl1->SetColLabelValue(3, wxT("MimeType")); count = 0; pE = List->GetFirst(); while (pE) { // feeding grid rows MyGraphicCellRenderer *renderer = new MyGraphicCellRenderer; renderer->SetGraphic(pE->GetGraphic()); GridCtrl1->SetCellRenderer(count, 0, renderer); GridCtrl1->SetCellValue(count, 1, pE->GetTitle()); GridCtrl1->SetCellValue(count, 2, pE->GetAbstract()); GridCtrl1->SetCellValue(count, 3, pE->GetMimeType()); count++; pE = pE->GetNext(); } GridCtrl1->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl1->AutoSize(); GridCtrl1->EnableEditing(false); gridSizer->Add(GridCtrl1, 0, wxALIGN_RIGHT | wxALL, 5); GridCtrl1->Enable(false); panel->SetSizer(topSizer); topSizer->Fit(panel); // second row C: Color Replacement wxBoxSizer *replacementBoxSizer = new wxBoxSizer(wxVERTICAL); GridSizer->Add(replacementBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *replacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color Replacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *replacementSizer = new wxStaticBoxSizer(replacementBox, wxVERTICAL); replacementBoxSizer->Add(replacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableReplacementCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL1_ENABLE_REPLACEMENT, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableReplacementCtrl->SetValue(false); enableReplacementCtrl->Enable(false); replacementSizer->Add(enableReplacementCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *replacement1Sizer = new wxBoxSizer(wxHORIZONTAL); replacementSizer->Add(replacement1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *replacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL1_REPLACEMENT, Fill1ColorReplacement, wxDefaultPosition, wxSize(80, 22)); replacement1Sizer->Add(replacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); replacementCtrl->Enable(false); wxTextCtrl *sampleReplacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL1_REPLACEMENT_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); back = wxColour(0, 0, 0); sampleReplacementCtrl->SetBackgroundColour(back); replacement1Sizer->Add(sampleReplacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // appends event handlers Connect(ID_SYMBOLIZER_FILL1_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdFill1Changed); Connect(ID_SYMBOLIZER_FILL1_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdFill1TypeChanged); Connect(ID_SYMBOLIZER_FILL1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdColor1Changed); Connect(ID_SYMBOLIZER_FILL1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdColor1Picker); Connect(ID_SYMBOLIZER_FILL1_ENABLE_REPLACEMENT, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdFill1EnableReplacementChanged); Connect(ID_SYMBOLIZER_FILL1_REPLACEMENT, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdFill1ReplacementChanged); return panel; } void SimplePolygonSymbolizerDialog:: OnCmdFill1Changed(wxCommandEvent & WXUNUSED(event)) { // // Fill #1 enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL1_ENABLE); if (enableCtrl->IsChecked() == true) EnableFill1 = true; else EnableFill1 = false; RetrieveFill1Page(false); UpdateFill1Page(); } void SimplePolygonSymbolizerDialog:: OnCmdFill1TypeChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill Type changed: updating the visual sample // wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL1_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL1_PICKER_BTN); if (typeBox->GetSelection() == 0) HasGraphicFill1 = false; else HasGraphicFill1 = true; RetrieveFill1Page(false); UpdateFill1Page(); } void SimplePolygonSymbolizerDialog:: OnCmdColor1Changed(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimplePolygonSymbolizerDialog:: OnCmdColor1Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimplePolygonSymbolizerDialog:: OnCmdFill1EnableReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Polygon #1 Fill ColorReplacement enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL1_ENABLE_REPLACEMENT); if (enableCtrl->IsChecked() == true) EnableFill1Replacement = true; else EnableFill1Replacement = false; RetrieveFill1Page(false); UpdateFill1Page(); } void SimplePolygonSymbolizerDialog:: OnCmdFill1ReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Color Replacement changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_REPLACEMENT); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_REPLACEMENT_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } wxPanel *SimplePolygonSymbolizerDialog::CreateStroke1Page(wxWindow * parent) { // // creating the STROKE #1 page // wxPanel *panel = new wxPanel(parent, ID_PANE_STROKE1); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: the Stroke #1 Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *enableBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *enableSizer = new wxStaticBoxSizer(enableBox, wxVERTICAL); opacityBoxSizer->Add(enableSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE1_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(true); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE1_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityCtrl->Enable(false); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row: Stroke color or Graphic wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(strokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Stroke Type wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxVERTICAL); strokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString type[2]; type[0] = wxT("&Color"); type[1] = wxT("&Graphic"); wxRadioBox *typeBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE1_TYPE, wxT("&Stroke Type"), wxDefaultPosition, wxDefaultSize, 2, type, 1, wxRA_SPECIFY_ROWS); stroke1Sizer->Add(typeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); typeBox->SetSelection(0); typeBox->Enable(false); // second row B: Stroke Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); stroke1Sizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_COLOR, Stroke1Color, wxDefaultPosition, wxSize(80, 22)); colorCtrl->Enable(false); color1Sizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(0, 0, 0); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Enable(false); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxT("&Pick a color")); pick->Enable(false); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // second row C: GRID to select an External Graphic wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); strokeSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *gridBox = new wxStaticBox(panel, wxID_STATIC, wxT("External Graphic resources"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxHORIZONTAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl2 = new wxGrid(panel, ID_SYMBOLIZER_STROKE1_GRAPHIC, wxDefaultPosition, wxSize(420, 150), wxALWAYS_SHOW_SB); int count = 0; ExternalGraphic *pE = List->GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl2->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl2->SetColLabelValue(0, wxT("Graphic")); GridCtrl2->SetColLabelValue(1, wxT("Title")); GridCtrl2->SetColLabelValue(2, wxT("Abstract")); GridCtrl2->SetColLabelValue(3, wxT("MimeType")); count = 0; pE = List->GetFirst(); while (pE) { // feeding grid rows MyGraphicCellRenderer *renderer = new MyGraphicCellRenderer; renderer->SetGraphic(pE->GetGraphic()); GridCtrl2->SetCellRenderer(count, 0, renderer); GridCtrl2->SetCellValue(count, 1, pE->GetTitle()); GridCtrl2->SetCellValue(count, 2, pE->GetAbstract()); GridCtrl2->SetCellValue(count, 3, pE->GetMimeType()); count++; pE = pE->GetNext(); } GridCtrl2->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl2->AutoSize(); GridCtrl2->EnableEditing(false); gridSizer->Add(GridCtrl2, 0, wxALIGN_RIGHT | wxALL, 5); GridCtrl2->Enable(false); // second row C: Color Replacement wxBoxSizer *replacementBoxSizer = new wxBoxSizer(wxVERTICAL); GridSizer->Add(replacementBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *replacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color Replacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *replacementSizer = new wxStaticBoxSizer(replacementBox, wxVERTICAL); replacementBoxSizer->Add(replacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableReplacementCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableReplacementCtrl->SetValue(false); enableReplacementCtrl->Enable(false); replacementSizer->Add(enableReplacementCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *replacement1Sizer = new wxBoxSizer(wxHORIZONTAL); replacementSizer->Add(replacement1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *replacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_REPLACEMENT, Stroke1ColorReplacement, wxDefaultPosition, wxSize(80, 22)); replacement1Sizer->Add(replacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); replacementCtrl->Enable(false); wxTextCtrl *sampleReplacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_REPLACEMENT_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); back = wxColour(0, 0, 0); sampleReplacementCtrl->SetBackgroundColour(back); replacement1Sizer->Add(sampleReplacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Stroke-Width, Stroke-LineJoin, Stroke-LineCap and Stroke-Dasharray wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthCtrl->Enable(false); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: LineJoin wxString join[3]; join[0] = wxT("&Mitre"); join[1] = wxT("&Round"); join[2] = wxT("&Bevel"); wxRadioBox *joinBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE1_LINEJOIN, wxT("&Line Join"), wxDefaultPosition, wxDefaultSize, 3, join, 1, wxRA_SPECIFY_COLS); miscSizer->Add(joinBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); joinBox->SetSelection(1); joinBox->Enable(false); // third row C: LineCap wxString cap[3]; cap[0] = wxT("&Butt"); cap[1] = wxT("&Round"); cap[2] = wxT("&Square"); wxRadioBox *capBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE1_LINECAP, wxT("&Line Cap"), wxDefaultPosition, wxDefaultSize, 3, cap, 1, wxRA_SPECIFY_COLS); miscSizer->Add(capBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); capBox->SetSelection(1); capBox->Enable(false); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *dashBox = new wxStaticBox(panel, wxID_STATIC, wxT("Dashed/Dotted Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *dashSizer = new wxStaticBoxSizer(dashBox, wxVERTICAL); dashBoxSizer->Add(dashSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *dash1Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *dash1Label = new wxStaticText(panel, wxID_STATIC, wxT("Dash Array:")); dash1Sizer->Add(dash1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashArrayCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_DASHARRAY, wxT(""), wxDefaultPosition, wxSize(200, 22)); dashArrayCtrl->Enable(false); dash1Sizer->Add(dashArrayCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticText *dash2Label = new wxStaticText(panel, wxID_STATIC, wxT("e.g. 10,3,2,3")); dash2Label->SetForegroundColour(wxColour(255, 0, 0)); dash1Sizer->Add(dash2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *dash2Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash2Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *dashOffsetLabel = new wxStaticText(panel, wxID_STATIC, wxT("Dash Offset:")); dash2Sizer->Add(dashOffsetLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashOffsetCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE1_DASHOFFSET, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); dashOffsetCtrl->Enable(false); dash2Sizer->Add(dashOffsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE1_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdStroke1Changed); Connect(ID_SYMBOLIZER_STROKE1_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdStroke1TypeChanged); Connect(ID_SYMBOLIZER_STROKE1_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdColor2Changed); Connect(ID_SYMBOLIZER_STROKE1_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdColor2Picker); Connect(ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdStroke1EnableReplacementChanged); Connect(ID_SYMBOLIZER_STROKE1_REPLACEMENT, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdStroke1ReplacementChanged); Connect(ID_SYMBOLIZER_STROKE1_LINEJOIN, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdLineJoin1Changed); Connect(ID_SYMBOLIZER_STROKE1_LINECAP, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdLineCap1Changed); return panel; } void SimplePolygonSymbolizerDialog:: OnCmdStroke1Changed(wxCommandEvent & WXUNUSED(event)) { // // Stroke #1 enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE1_ENABLE); if (enableCtrl->IsChecked() == true) EnableStroke1 = true; else EnableStroke1 = false; RetrieveStroke1Page(false); UpdateStroke1Page(); } void SimplePolygonSymbolizerDialog:: OnCmdStroke1TypeChanged(wxCommandEvent & WXUNUSED(event)) { // // stroke type changed: updating the visual sample // wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_BTN); if (typeBox->GetSelection() == 0) HasGraphicStroke1 = false; else HasGraphicStroke1 = true; RetrieveStroke1Page(false); UpdateStroke1Page(); } void SimplePolygonSymbolizerDialog:: OnCmdColor2Changed(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimplePolygonSymbolizerDialog:: OnCmdColor2Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimplePolygonSymbolizerDialog:: OnCmdStroke1EnableReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Polygon #1 Stroke ColorReplacement enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT); if (enableCtrl->IsChecked() == true) EnableStroke1Replacement = true; else EnableStroke1Replacement = false; RetrieveStroke1Page(false); UpdateStroke1Page(); } void SimplePolygonSymbolizerDialog:: OnCmdStroke1ReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Color Replacement changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimplePolygonSymbolizerDialog:: OnCmdLineJoin1Changed(wxCommandEvent & WXUNUSED(event)) { // // LineJoin selection changed // wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_LINEJOIN); switch (lineJoinCtrl->GetSelection()) { case 0: Stroke1LineJoin = RL2_PEN_JOIN_MITER; break; case 2: Stroke1LineJoin = RL2_PEN_JOIN_BEVEL; break; default: Stroke1LineJoin = RL2_PEN_JOIN_ROUND; break; }; } void SimplePolygonSymbolizerDialog:: OnCmdLineCap1Changed(wxCommandEvent & WXUNUSED(event)) { // // LineCap selection changed // wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_LINECAP); switch (lineCapCtrl->GetSelection()) { case 0: Stroke1LineCap = RL2_PEN_CAP_BUTT; break; case 2: Stroke1LineCap = RL2_PEN_CAP_SQUARE; break; default: Stroke1LineCap = RL2_PEN_CAP_ROUND; break; }; } wxPanel *SimplePolygonSymbolizerDialog::CreateFill2Page(wxWindow * parent) { // // creating the Polygon #2 Fill page // wxPanel *panel = new wxPanel(parent, ID_PANE_FILL2); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the Polygon #2 Displacement and Perpendicular Offset wxBoxSizer *polygonBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(polygonBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *polygonBox = new wxStaticBox(panel, wxID_STATIC, wxT("Polygon #2"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *polygonSizer = new wxStaticBoxSizer(polygonBox, wxHORIZONTAL); polygonBoxSizer->Add(polygonSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *polygon2Ctrl = new wxCheckBox(panel, ID_SYMBOLIZER_POLYGON2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); polygon2Ctrl->SetValue(false); polygonSizer->Add(polygon2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row A: Displacement wxBoxSizer *displacementBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonSizer->Add(displacementBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); displacementBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); displacementXCtrl->Enable(false); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); displacementYCtrl->Enable(false); // first row B: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); polygonSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_POLYGON2_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); perpendicularCtrl->Enable(false); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive: larger. / Negative: smaller.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Drawing polygons smaller or larger than their actual geometry (Buffer).")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: Fill#1 Opacity wxBoxSizer *auxBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(auxBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *auxBox = new wxStaticBox(panel, wxID_STATIC, wxT("Polygon #2 Fill"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *auxSizer = new wxStaticBoxSizer(auxBox, wxVERTICAL); auxBoxSizer->Add(auxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *enableSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(enableSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(false); enableCtrl->Enable(false); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); enableSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_FILL2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: Fill color or Graphic wxBoxSizer *fillSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(fillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Fill Type wxBoxSizer *fill1Sizer = new wxBoxSizer(wxVERTICAL); fillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString type[2]; type[0] = wxT("&Color"); type[1] = wxT("&Graphic"); wxRadioBox *typeBox = new wxRadioBox(panel, ID_SYMBOLIZER_FILL2_TYPE, wxT("&Fill Type"), wxDefaultPosition, wxDefaultSize, 2, type, 1, wxRA_SPECIFY_ROWS); fill1Sizer->Add(typeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); typeBox->SetSelection(0); // third row B: Fill Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); fill1Sizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL2_COLOR, Fill2Color, wxDefaultPosition, wxSize(80, 22)); color1Sizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL2_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(0, 0, 0); sampleCtrl->SetBackgroundColour(back); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_FILL2_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // third row C: GRID to select an External Graphic wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); fillSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *gridBox = new wxStaticBox(panel, wxID_STATIC, wxT("External Graphic resources"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxHORIZONTAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl3 = new wxGrid(panel, ID_SYMBOLIZER_FILL2_GRAPHIC, wxDefaultPosition, wxSize(420, 150), wxALWAYS_SHOW_SB); int count = 0; ExternalGraphic *pE = List->GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl3->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl3->SetColLabelValue(0, wxT("Graphic")); GridCtrl3->SetColLabelValue(1, wxT("Title")); GridCtrl3->SetColLabelValue(2, wxT("Abstract")); GridCtrl3->SetColLabelValue(3, wxT("MimeType")); count = 0; pE = List->GetFirst(); while (pE) { // feeding grid rows MyGraphicCellRenderer *renderer = new MyGraphicCellRenderer; renderer->SetGraphic(pE->GetGraphic()); GridCtrl3->SetCellRenderer(count, 0, renderer); GridCtrl3->SetCellValue(count, 1, pE->GetTitle()); GridCtrl3->SetCellValue(count, 2, pE->GetAbstract()); GridCtrl3->SetCellValue(count, 3, pE->GetMimeType()); count++; pE = pE->GetNext(); } GridCtrl3->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl3->AutoSize(); GridCtrl3->EnableEditing(false); gridSizer->Add(GridCtrl3, 0, wxALIGN_RIGHT | wxALL, 5); GridCtrl3->Enable(false); panel->SetSizer(topSizer); topSizer->Fit(panel); // second row C: Color Replacement wxBoxSizer *replacementBoxSizer = new wxBoxSizer(wxVERTICAL); GridSizer->Add(replacementBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *replacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color Replacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *replacementSizer = new wxStaticBoxSizer(replacementBox, wxVERTICAL); replacementBoxSizer->Add(replacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableReplacementCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL2_ENABLE_REPLACEMENT, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableReplacementCtrl->SetValue(false); enableReplacementCtrl->Enable(false); replacementSizer->Add(enableReplacementCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *replacement1Sizer = new wxBoxSizer(wxHORIZONTAL); replacementSizer->Add(replacement1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *replacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL2_REPLACEMENT, Fill2ColorReplacement, wxDefaultPosition, wxSize(80, 22)); replacement1Sizer->Add(replacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); replacementCtrl->Enable(false); wxTextCtrl *sampleReplacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL2_REPLACEMENT_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); back = wxColour(0, 0, 0); sampleReplacementCtrl->SetBackgroundColour(back); replacement1Sizer->Add(sampleReplacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // appends event handlers Connect(ID_SYMBOLIZER_POLYGON2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdPolygon2Changed); Connect(ID_SYMBOLIZER_FILL2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdFill2Changed); Connect(ID_SYMBOLIZER_FILL2_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdFill2TypeChanged); Connect(ID_SYMBOLIZER_FILL2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdColor3Changed); Connect(ID_SYMBOLIZER_FILL2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdColor3Picker); Connect(ID_SYMBOLIZER_FILL2_ENABLE_REPLACEMENT, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdFill2EnableReplacementChanged); Connect(ID_SYMBOLIZER_FILL2_REPLACEMENT, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdFill2ReplacementChanged); return panel; } void SimplePolygonSymbolizerDialog:: OnCmdPolygon2Changed(wxCommandEvent & WXUNUSED(event)) { // // Polygon #2 enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_POLYGON2_ENABLE); if (enableCtrl->IsChecked() == true) EnablePolygon2 = true; else EnablePolygon2 = false; RetrieveFill2Page(false); UpdateFill2Page(); } void SimplePolygonSymbolizerDialog:: OnCmdFill2Changed(wxCommandEvent & WXUNUSED(event)) { // // Fill #2 enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); if (enableCtrl->IsChecked() == true) EnableFill2 = true; else EnableFill2 = false; RetrieveFill2Page(false); UpdateFill2Page(); } void SimplePolygonSymbolizerDialog:: OnCmdFill2TypeChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill Type changed: updating the visual sample // wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL2_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_BTN); if (typeBox->GetSelection() == 0) HasGraphicFill2 = false; else HasGraphicFill2 = true; RetrieveFill2Page(false); UpdateFill2Page(); } void SimplePolygonSymbolizerDialog:: OnCmdColor3Changed(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimplePolygonSymbolizerDialog:: OnCmdColor3Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimplePolygonSymbolizerDialog:: OnCmdFill2EnableReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Polygon #2 Stroke ColorReplacement enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE_REPLACEMENT); if (enableCtrl->IsChecked() == true) EnableFill2Replacement = true; else EnableFill2Replacement = false; RetrieveFill2Page(false); UpdateFill2Page(); } void SimplePolygonSymbolizerDialog:: OnCmdFill2ReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Color Replacement changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_REPLACEMENT); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_REPLACEMENT_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } wxPanel *SimplePolygonSymbolizerDialog::CreateStroke2Page(wxWindow * parent) { // // creating the STROKE #2 page // wxPanel *panel = new wxPanel(parent, ID_PANE_STROKE2); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: the Stroke #1 Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *enableBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *enableSizer = new wxStaticBoxSizer(enableBox, wxVERTICAL); opacityBoxSizer->Add(enableSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *enableCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE2_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableCtrl->SetValue(false); enableCtrl->Enable(false); enableSizer->Add(enableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_STROKE2_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityCtrl->Enable(false); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row: Stroke color or Graphic wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(strokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Stroke Type wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxVERTICAL); strokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString type[2]; type[0] = wxT("&Color"); type[1] = wxT("&Graphic"); wxRadioBox *typeBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE2_TYPE, wxT("&Stroke Type"), wxDefaultPosition, wxDefaultSize, 2, type, 1, wxRA_SPECIFY_ROWS); stroke1Sizer->Add(typeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); typeBox->SetSelection(0); typeBox->Enable(false); // second row B: Stroke Color wxBoxSizer *colorBoxSizer = new wxBoxSizer(wxVERTICAL); stroke1Sizer->Add(colorBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *colorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorSizer = new wxStaticBoxSizer(colorBox, wxVERTICAL); colorBoxSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *color1Sizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(color1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_COLOR, Stroke2Color, wxDefaultPosition, wxSize(80, 22)); colorCtrl->Enable(false); color1Sizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(0, 0, 0); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Enable(false); color1Sizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); colorSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxT("&Pick a color")); pick->Enable(false); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // second row C: GRID to select an External Graphic wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); strokeSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *gridBox = new wxStaticBox(panel, wxID_STATIC, wxT("External Graphic resources"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxHORIZONTAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl4 = new wxGrid(panel, ID_SYMBOLIZER_STROKE2_GRAPHIC, wxDefaultPosition, wxSize(420, 150), wxALWAYS_SHOW_SB); int count = 0; ExternalGraphic *pE = List->GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl4->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl4->SetColLabelValue(0, wxT("Graphic")); GridCtrl4->SetColLabelValue(1, wxT("Title")); GridCtrl4->SetColLabelValue(2, wxT("Abstract")); GridCtrl4->SetColLabelValue(3, wxT("MimeType")); count = 0; pE = List->GetFirst(); while (pE) { // feeding grid rows MyGraphicCellRenderer *renderer = new MyGraphicCellRenderer; renderer->SetGraphic(pE->GetGraphic()); GridCtrl4->SetCellRenderer(count, 0, renderer); GridCtrl4->SetCellValue(count, 1, pE->GetTitle()); GridCtrl4->SetCellValue(count, 2, pE->GetAbstract()); GridCtrl4->SetCellValue(count, 3, pE->GetMimeType()); count++; pE = pE->GetNext(); } GridCtrl4->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl4->AutoSize(); GridCtrl4->EnableEditing(false); gridSizer->Add(GridCtrl4, 0, wxALIGN_RIGHT | wxALL, 5); GridCtrl4->Enable(false); // second row C: Color Replacement wxBoxSizer *replacementBoxSizer = new wxBoxSizer(wxVERTICAL); GridSizer->Add(replacementBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *replacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color Replacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *replacementSizer = new wxStaticBoxSizer(replacementBox, wxVERTICAL); replacementBoxSizer->Add(replacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableReplacementCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableReplacementCtrl->SetValue(false); enableReplacementCtrl->Enable(false); replacementSizer->Add(enableReplacementCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *replacement1Sizer = new wxBoxSizer(wxHORIZONTAL); replacementSizer->Add(replacement1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *replacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_REPLACEMENT, Stroke2ColorReplacement, wxDefaultPosition, wxSize(80, 22)); replacement1Sizer->Add(replacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); replacementCtrl->Enable(false); wxTextCtrl *sampleReplacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_REPLACEMENT_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); back = wxColour(0, 0, 0); sampleReplacementCtrl->SetBackgroundColour(back); replacement1Sizer->Add(sampleReplacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Stroke-Width, Stroke-LineJoin, Stroke-LineCap and Stroke-Dasharray wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: StrokeWidth wxBoxSizer *widthBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(widthBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); widthBoxSizer->Add(widthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthCtrl->Enable(false); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: LineJoin wxString join[3]; join[0] = wxT("&Mitre"); join[1] = wxT("&Round"); join[2] = wxT("&Bevel"); wxRadioBox *joinBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE2_LINEJOIN, wxT("&Line Join"), wxDefaultPosition, wxDefaultSize, 3, join, 1, wxRA_SPECIFY_COLS); miscSizer->Add(joinBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); joinBox->SetSelection(1); joinBox->Enable(false); // third row C: LineCap wxString cap[3]; cap[0] = wxT("&Butt"); cap[1] = wxT("&Round"); cap[2] = wxT("&Square"); wxRadioBox *capBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE2_LINECAP, wxT("&Line Cap"), wxDefaultPosition, wxDefaultSize, 3, cap, 1, wxRA_SPECIFY_COLS); miscSizer->Add(capBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); capBox->SetSelection(1); capBox->Enable(false); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *dashBox = new wxStaticBox(panel, wxID_STATIC, wxT("Dashed/Dotted Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *dashSizer = new wxStaticBoxSizer(dashBox, wxVERTICAL); dashBoxSizer->Add(dashSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *dash1Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *dash1Label = new wxStaticText(panel, wxID_STATIC, wxT("Dash Array:")); dash1Sizer->Add(dash1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashArrayCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_DASHARRAY, wxT(""), wxDefaultPosition, wxSize(200, 22)); dashArrayCtrl->Enable(false); dash1Sizer->Add(dashArrayCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticText *dash2Label = new wxStaticText(panel, wxID_STATIC, wxT("e.g. 10,3,2,3")); dash2Label->SetForegroundColour(wxColour(255, 0, 0)); dash1Sizer->Add(dash2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *dash2Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash2Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *dashOffsetLabel = new wxStaticText(panel, wxID_STATIC, wxT("Dash Offset:")); dash2Sizer->Add(dashOffsetLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashOffsetCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE2_DASHOFFSET, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); dashOffsetCtrl->Enable(false); dash2Sizer->Add(dashOffsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_STROKE2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdStroke2Changed); Connect(ID_SYMBOLIZER_STROKE2_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdStroke2TypeChanged); Connect(ID_SYMBOLIZER_STROKE2_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdColor4Changed); Connect(ID_SYMBOLIZER_STROKE2_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdColor4Picker); Connect(ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdStroke2EnableReplacementChanged); Connect(ID_SYMBOLIZER_STROKE2_REPLACEMENT, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdStroke2ReplacementChanged); Connect(ID_SYMBOLIZER_STROKE2_LINEJOIN, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdLineJoin2Changed); Connect(ID_SYMBOLIZER_STROKE2_LINECAP, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdLineCap2Changed); return panel; } void SimplePolygonSymbolizerDialog:: OnCmdStroke2Changed(wxCommandEvent & WXUNUSED(event)) { // // Stroke #2 enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); if (enableCtrl->IsChecked() == true) EnableStroke2 = true; else EnableStroke2 = false; RetrieveStroke2Page(false); UpdateStroke2Page(); } void SimplePolygonSymbolizerDialog:: OnCmdStroke2TypeChanged(wxCommandEvent & WXUNUSED(event)) { // // stroke type changed: updating the visual sample // wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN); if (typeBox->GetSelection() == 0) HasGraphicStroke2 = false; else HasGraphicStroke2 = true; RetrieveStroke2Page(false); UpdateStroke2Page(); } void SimplePolygonSymbolizerDialog:: OnCmdColor4Changed(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimplePolygonSymbolizerDialog:: OnCmdColor4Picker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimplePolygonSymbolizerDialog:: OnCmdStroke2EnableReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Polygon #2 Stroke ColorReplacement enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT); if (enableCtrl->IsChecked() == true) EnableStroke2Replacement = true; else EnableStroke2Replacement = false; RetrieveStroke2Page(false); UpdateStroke2Page(); } void SimplePolygonSymbolizerDialog:: OnCmdStroke2ReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Color Replacement changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimplePolygonSymbolizerDialog:: OnCmdLineJoin2Changed(wxCommandEvent & WXUNUSED(event)) { // // LineJoin selection changed // wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_LINEJOIN); switch (lineJoinCtrl->GetSelection()) { case 0: Stroke2LineJoin = RL2_PEN_JOIN_MITER; break; case 2: Stroke2LineJoin = RL2_PEN_JOIN_BEVEL; break; default: Stroke2LineJoin = RL2_PEN_JOIN_ROUND; break; }; } void SimplePolygonSymbolizerDialog:: OnCmdLineCap2Changed(wxCommandEvent & WXUNUSED(event)) { // // LineCap selection changed // wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_LINECAP); switch (lineCapCtrl->GetSelection()) { case 0: Stroke2LineCap = RL2_PEN_CAP_BUTT; break; case 2: Stroke2LineCap = RL2_PEN_CAP_SQUARE; break; default: Stroke2LineCap = RL2_PEN_CAP_ROUND; break; }; } wxPanel *SimplePolygonSymbolizerDialog::CreatePreviewPage(wxWindow * parent) { // // creating the Preview page // wxPanel *panel = new wxPanel(parent, ID_PANE_PREVIEW); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *previewBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(previewBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // creating a control to show the LineSymbolizer Preview wxStaticBox *previewBox = new wxStaticBox(panel, wxID_STATIC, wxT("PolygonSymbolizer Preview"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *previewSizer = new wxStaticBoxSizer(previewBox, wxVERTICAL); previewBoxSizer->Add(previewSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); DrawPreview(500, 300); SymbolizerPreview *previewCtrl = new SymbolizerPreview(this, panel, ID_SYMBOLIZER_PREVIEW, PreviewBackBitmap, wxSize(500, 300)); previewSizer->Add(previewCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // Background selector wxString back[3]; back[0] = wxT("&Checked"); back[1] = wxT("&White"); back[2] = wxT("&Black"); wxRadioBox *backBox = new wxRadioBox(panel, ID_SYMBOLIZER_BACKGROUND, wxT("&Background"), wxDefaultPosition, wxDefaultSize, 3, back, 1, wxRA_SPECIFY_COLS); boxSizer->Add(backBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); backBox->SetSelection(0); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_BACKGROUND, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePolygonSymbolizerDialog::OnCmdBackgroundChanged); return panel; } void SimplePolygonSymbolizerDialog:: OnCmdBackgroundChanged(wxCommandEvent & WXUNUSED(event)) { // // Preview Background selection changed // wxRadioBox *backCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BACKGROUND); switch (backCtrl->GetSelection()) { case 1: PreviewBackground = GUI_PREVIEW_BACKGROUND_WHITE; break; case 2: PreviewBackground = GUI_PREVIEW_BACKGROUND_BLACK; break; default: PreviewBackground = GUI_PREVIEW_BACKGROUND_CHECKED; break; }; UpdatePreviewPage(); } void SimplePolygonSymbolizerDialog::DrawPreview(int horz, int vert) { // // drawing a Symbolizer Preview // PreviewBackBitmap.Create(horz, vert); wxMemoryDC dc(PreviewBackBitmap); // // background filling // wxImage img(24, 24); for (int y = 0; y < 24; y++) { // creating a checked background for (int x = 0; x < 24; x++) { if (y < 12) { if (x < 12) img.SetRGB(x, y, 176, 176, 176); else img.SetRGB(x, y, 208, 208, 208); } else { if (x < 12) img.SetRGB(x, y, 208, 208, 208); else img.SetRGB(x, y, 176, 176, 176); } } } wxBrush stipple(img); dc.SetBrush(stipple); dc.DrawRectangle(0, 0, horz, vert); } void SimplePolygonSymbolizerDialog::CreateButtons() { // // adding the common Buttons // wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer()); wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); } bool SimplePolygonSymbolizerDialog::FinalValidityCheck() { // // last check before generating the SLD/SE Style // if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the PolygonSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (Title.Len() < 1) { wxString msg = wxT("Setting some PolygonSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } if (Abstract.Len() < 1) { wxString msg = wxT("Setting some PolygonSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } if (EnableFill1 == false && EnableStroke1 == false) { wxString msg = wxT ("Effectless Polygon #1 Style: both Fill and Stroke are disabled\n\n"); msg += wxT("Do you really confirm leaving an effectless Polygon #1 Style ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } if (EnablePolygon2 == true && EnableFill2 == false && EnableStroke2 == false) { wxString msg = wxT ("Effectless Polygon #2 Style: both Fill and Stroke are disabled\n\n"); msg += wxT("Do you really confirm leaving an effectless Polygon #2 Style ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } return true; } bool SimplePolygonSymbolizerDialog::RetrieveMainPage() { // // retrieving params from the MAIN page // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } void SimplePolygonSymbolizerDialog::UpdateMainPage() { // // updating the MAIN page // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); nameCtrl->SetValue(Name); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); titleCtrl->SetValue(Title); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); absCtrl->SetValue(Abstract); wxRadioBox *uomBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_UOM); switch (Uom) { case GUI_UOM_METRE: uomBox->SetSelection(1); break; case GUI_UOM_INCH: uomBox->SetSelection(2); break; default: uomBox->SetSelection(0); break; }; wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); if (MinScale != true && MaxScale != true) rangeBox->SetSelection(0); else if (MinScale == true && MaxScale != true) rangeBox->SetSelection(1); else if (MinScale != true && MaxScale == true) rangeBox->SetSelection(2); else rangeBox->SetSelection(3); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); char dummy[64]; wxString str; if (MinScale == true) { sprintf(dummy, "%1.2f", MinScaleDenominator); str = wxString::FromUTF8(dummy); minCtrl->SetValue(str); minCtrl->Enable(true); } else { str = wxT("0.0"); minCtrl->SetValue(str); minCtrl->Enable(false); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); if (MaxScale == true) { sprintf(dummy, "%1.2f", MaxScaleDenominator); str = wxString::FromUTF8(dummy); maxCtrl->SetValue(str); maxCtrl->Enable(true); } else { str = wxT("+Infinite"); maxCtrl->SetValue(str); maxCtrl->Enable(false); } } bool SimplePolygonSymbolizerDialog::RetrieveFill1Page(bool check) { // // retrieving params from the Polygon #1 Fill page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL1_OPACITY); Fill1Opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); wxString value = displXCtrl->GetValue(); if (value.ToDouble(&DisplacementX1) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&DisplacementY1) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); value = perpCtrl->GetValue(); if (value.ToDouble(&PerpendicularOffset1) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (HasGraphicFill1 == false) { wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Fill1Color = color; } else { int selCount = 0; int selected = -1; for (int i = 0; i < GridCtrl1->GetNumberRows(); i++) { if (GridCtrl1->IsInSelection(i, 0) == true) { selected = i; selCount++; } } if (selCount < 1) { if (check == true) { wxMessageBox(wxT ("You must select an External Graphic resource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (selCount > 1) { if (check == true) { wxString msg = wxT ("You must select just a single External Graphic resource !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } List->FindByIndex(selected, Fill1XLinkHref, Fill1MimeType); if (EnableFill1Replacement == true) { wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_REPLACEMENT); wxString color = replacementCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("COLOR-REPACEMENT isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Fill1ColorReplacement = color; } } return true; } void SimplePolygonSymbolizerDialog::UpdateFill1Page() { // // updating the Polygon #1 Fill page // wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL1_ENABLE); if (EnableFill1 == true) enableBox->SetValue(true); else enableBox->SetValue(false); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL1_OPACITY); opacityCtrl->SetValue(Fill1Opacity * 100.0); if (EnableFill1 == false) opacityCtrl->Enable(false); else opacityCtrl->Enable(true); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X); char dummy[64]; sprintf(dummy, "%1.2f", DisplacementX1); wxString str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", DisplacementY1); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON1_PERPENDICULAR); sprintf(dummy, "%1.2f", PerpendicularOffset1); str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL1_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_PICKER_HEX); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL1_PICKER_BTN); wxCheckBox *enableReplacement = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL1_ENABLE_REPLACEMENT); wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_REPLACEMENT); wxTextCtrl *sampleReplacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL1_REPLACEMENT_HEX); if (EnableFill1 == false) { typeBox->Enable(false); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl1->Enable(false); enableReplacement->Enable(false); replacementCtrl->Enable(false); } else if (HasGraphicFill1 == false) { typeBox->SetSelection(0); typeBox->Enable(true); colorCtrl->Enable(true); sampleCtrl->Enable(true); pick->Enable(true); GridCtrl1->Enable(false); GridCtrl1->ClearSelection(); enableReplacement->Enable(false); replacementCtrl->Enable(false); wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Fill1Color, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } else { typeBox->SetSelection(1); typeBox->Enable(true); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl1->Enable(true); int sel = List->FindByXLinkHref(Fill1XLinkHref); if (sel >= 0) GridCtrl1->SelectRow(sel); enableReplacement->Enable(true); if (EnableFill1Replacement == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Fill1ColorReplacement, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); replacementCtrl->SetValue(str); replacementCtrl->Enable(true); } else replacementCtrl->Enable(false); } } } bool SimplePolygonSymbolizerDialog::DoParseDashArray(wxString & str, int which) { // // attempting to parse a Stroke DashArray string // if (which == 0) { Stroke1DashCount = 0; if (Stroke1DashArray != NULL) delete[]Stroke1DashArray; Stroke1DashArray = NULL; } if (which == 1) { Stroke2DashCount = 0; if (Stroke2DashArray != NULL) delete[]Stroke2DashArray; Stroke2DashArray = NULL; } if (str.Len() == 0) return true; int count = 0; double interval; wxStringTokenizer tkz(str, wxT(",")); while (tkz.HasMoreTokens()) { wxString token = tkz.GetNextToken(); if (token.ToDouble(&interval) != true) return false; if (interval <= 0.0) return false; count++; } if (count == 0) return true; double *array; if (which == 0) { Stroke1DashCount = count; Stroke1DashArray = new double[Stroke1DashCount]; array = Stroke1DashArray; } if (which == 1) { Stroke2DashCount = count; Stroke2DashArray = new double[Stroke2DashCount]; array = Stroke2DashArray; } count = 0; wxStringTokenizer tkz2(str, wxT(",")); while (tkz2.HasMoreTokens()) { wxString token = tkz2.GetNextToken(); token.ToDouble(&interval); *(array + count++) = interval; } return true; } void SimplePolygonSymbolizerDialog::NormalizedDashArray(wxString & str, int which, char delimiter) { // // creating a normalized DashArray string // int count; double *array; if (which == 0) { count = Stroke1DashCount; array = Stroke1DashArray; } if (which == 1) { count = Stroke2DashCount; array = Stroke2DashArray; } str = wxT(""); if (count == 0) return; for (int i = 0; i < count; i++) { char dummy[64]; if (i == 0) sprintf(dummy, "%1.2f", *(array + i)); else if (delimiter == ' ') sprintf(dummy, " %1.2f", *(array + i)); else sprintf(dummy, "%c %1.2f", delimiter, *(array + i)); str += wxString::FromUTF8(dummy); } } bool SimplePolygonSymbolizerDialog::RetrieveStroke1Page(bool check) { // // retrieving params from the STROKE #1 page // if (EnableStroke1 == false) return true; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); Stroke1Opacity = opacityCtrl->GetValue() / 100.0; if (HasGraphicStroke1 == false) { wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke1Color = color; } else { int selCount = 0; int selected = -1; for (int i = 0; i < GridCtrl2->GetNumberRows(); i++) { if (GridCtrl2->IsInSelection(i, 0) == true) { selected = i; selCount++; } } if (selCount < 1) { if (check == true) { wxMessageBox(wxT ("You must select an External Graphic resource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (selCount > 1) { if (check == true) { wxString msg = wxT ("You must select just a single External Graphic resource !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } List->FindByIndex(selected, Stroke1XLinkHref, Stroke1MimeType); if (EnableStroke1Replacement == true) { wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT); wxString color = replacementCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("COLOR-REPACEMENT isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke1ColorReplacement = color; } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); wxString value = widthCtrl->GetValue(); if (value.ToDouble(&Stroke1Width) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Stroke1Width <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_DASHARRAY); value = dashArrayCtrl->GetValue(); if (DoParseDashArray(value, 0) == false) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-ARRAY: invalid expression !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } else { NormalizedDashArray(value, 0); dashArrayCtrl->SetValue(value); } if (Stroke1DashCount == 0) Stroke1DashOffset = 0.0; else { wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_DASHOFFSET); wxString value = offsetCtrl->GetValue(); if (value.ToDouble(&Stroke1DashOffset) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } } return true; } void SimplePolygonSymbolizerDialog::UpdateStroke1Page() { // // updating the STROKE #1 page // wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE1_ENABLE); if (EnableStroke1 == true) enableBox->SetValue(true); else enableBox->SetValue(false); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE1_OPACITY); opacityCtrl->SetValue(Stroke1Opacity * 100.0); if (EnableStroke1 == false) opacityCtrl->Enable(false); else opacityCtrl->Enable(true); wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_HEX); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE1_PICKER_BTN); wxCheckBox *enableReplacement = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT); wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT); wxTextCtrl *sampleReplacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_REPLACEMENT_HEX); if (EnableStroke1 == false) { typeBox->Enable(false); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl2->Enable(false); enableReplacement->Enable(false); replacementCtrl->Enable(false); } else { typeBox->Enable(true); if (HasGraphicStroke1 == false) { typeBox->SetSelection(0); typeBox->Enable(true); colorCtrl->Enable(true); sampleCtrl->Enable(true); pick->Enable(true); GridCtrl2->Enable(false); GridCtrl2->ClearSelection(); enableReplacement->Enable(false); replacementCtrl->Enable(false); wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke1Color, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } else { typeBox->SetSelection(1); typeBox->Enable(true); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl2->Enable(true); int sel = List->FindByXLinkHref(Stroke1XLinkHref); if (sel >= 0) GridCtrl2->SelectRow(sel); enableReplacement->Enable(true); if (EnableStroke1Replacement == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke1ColorReplacement, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); replacementCtrl->SetValue(str); replacementCtrl->Enable(true); } else replacementCtrl->Enable(false); } } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_WIDTH); char dummy[64]; sprintf(dummy, "%1.2f", Stroke1Width); wxString str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); if (EnableStroke1 == false) widthCtrl->Enable(false); else widthCtrl->Enable(true); wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_LINEJOIN); switch (Stroke1LineJoin) { case RL2_PEN_JOIN_MITER: lineJoinCtrl->SetSelection(0); break; case RL2_PEN_JOIN_BEVEL: lineJoinCtrl->SetSelection(2); break; default: lineJoinCtrl->SetSelection(1); break; }; if (EnableStroke1 == false) lineJoinCtrl->Enable(false); else lineJoinCtrl->Enable(true); wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE1_LINECAP); switch (Stroke1LineCap) { case RL2_PEN_CAP_BUTT: lineCapCtrl->SetSelection(0); break; case RL2_PEN_CAP_SQUARE: lineCapCtrl->SetSelection(2); break; default: lineCapCtrl->SetSelection(1); break; }; if (EnableStroke1 == false) lineCapCtrl->Enable(false); else lineCapCtrl->Enable(true); wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_DASHARRAY); wxString value; NormalizedDashArray(value, 0); dashArrayCtrl->SetValue(value); if (EnableStroke1 == false) dashArrayCtrl->Enable(false); else dashArrayCtrl->Enable(true); wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE1_DASHOFFSET); if (Stroke1DashCount == 0) offsetCtrl->SetValue(wxT("0.0")); else { char dummy[64]; sprintf(dummy, "%1.2f", Stroke1DashOffset); wxString str = wxString::FromUTF8(dummy); offsetCtrl->SetValue(str); } if (EnableStroke1 == false) offsetCtrl->Enable(false); else offsetCtrl->Enable(true); } bool SimplePolygonSymbolizerDialog::RetrieveFill2Page(bool check) { // // retrieving params from the Polygon #2 Fill page // if (EnablePolygon2 == false) return true; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); Fill2Opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_X); wxString value = displXCtrl->GetValue(); if (value.ToDouble(&DisplacementX2) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&DisplacementY2) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON2_PERPENDICULAR); value = perpCtrl->GetValue(); if (value.ToDouble(&PerpendicularOffset2) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (HasGraphicFill2 == false) { wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Fill2Color = color; } else { int selCount = 0; int selected = -1; for (int i = 0; i < GridCtrl3->GetNumberRows(); i++) { if (GridCtrl3->IsInSelection(i, 0) == true) { selected = i; selCount++; } } if (selCount < 1) { if (check == true) { wxMessageBox(wxT ("You must select an External Graphic resource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (selCount > 1) { if (check == true) { wxString msg = wxT ("You must select just a single External Graphic resource !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } List->FindByIndex(selected, Fill2XLinkHref, Fill2MimeType); if (EnableFill2Replacement == true) { wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_REPLACEMENT); wxString color = replacementCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("COLOR-REPACEMENT isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Fill2ColorReplacement = color; } } return true; } void SimplePolygonSymbolizerDialog::UpdateFill2Page() { // // updating the Polygon #2 Fill page // wxCheckBox *polygonBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_POLYGON2_ENABLE); if (EnablePolygon2 == true) polygonBox->SetValue(true); else polygonBox->SetValue(false); if (EnablePolygon2 == false) EnableFill2 = false; wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE); if (EnableFill2 == true) enableBox->SetValue(true); else enableBox->SetValue(false); if (EnablePolygon2 == true) enableBox->Enable(true); else enableBox->Enable(false); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FILL2_OPACITY); opacityCtrl->SetValue(Fill2Opacity * 100.0); if (EnablePolygon2 == true) { if (EnableFill2 == false) opacityCtrl->Enable(false); else opacityCtrl->Enable(true); } else opacityCtrl->Enable(false); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_X); char dummy[64]; sprintf(dummy, "%1.2f", DisplacementX2); wxString str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); if (EnablePolygon2 == true) displXCtrl->Enable(true); else displXCtrl->Enable(false); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", DisplacementY2); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); if (EnablePolygon2 == true) displYCtrl->Enable(true); else displYCtrl->Enable(false); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_POLYGON2_PERPENDICULAR); sprintf(dummy, "%1.2f", PerpendicularOffset2); str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); if (EnablePolygon2 == true) perpCtrl->Enable(true); else perpCtrl->Enable(false); wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_FILL2_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_HEX); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL2_PICKER_BTN); wxCheckBox *enableReplacement = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL2_ENABLE_REPLACEMENT); wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_REPLACEMENT); wxTextCtrl *sampleReplacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL2_REPLACEMENT_HEX); if (EnablePolygon2 == false) { typeBox->Enable(false); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl3->Enable(false); } else if (EnableFill2 == false) { typeBox->Enable(false); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl3->Enable(false); enableReplacement->Enable(false); replacementCtrl->Enable(false); } else if (HasGraphicFill2 == false) { typeBox->SetSelection(0); typeBox->Enable(true); colorCtrl->Enable(true); sampleCtrl->Enable(true); pick->Enable(true); GridCtrl1->Enable(false); GridCtrl1->ClearSelection(); enableReplacement->Enable(false); replacementCtrl->Enable(false); wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Fill2Color, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } else { typeBox->SetSelection(1); typeBox->Enable(true); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl3->Enable(true); int sel = List->FindByXLinkHref(Fill2XLinkHref); if (sel >= 0) GridCtrl3->SelectRow(sel); enableReplacement->Enable(true); if (EnableFill2Replacement == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Fill2ColorReplacement, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); replacementCtrl->SetValue(str); replacementCtrl->Enable(true); } else replacementCtrl->Enable(false); } } } bool SimplePolygonSymbolizerDialog::RetrieveStroke2Page(bool check) { // // retrieving params from the STROKE #2 page // if (EnableStroke2 == false || EnablePolygon2 == false) return true; wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); Stroke2Opacity = opacityCtrl->GetValue() / 100.0; if (HasGraphicStroke2 == false) { wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke2Color = color; } else { int selCount = 0; int selected = -1; for (int i = 0; i < GridCtrl4->GetNumberRows(); i++) { if (GridCtrl4->IsInSelection(i, 0) == true) { selected = i; selCount++; } } if (selCount < 1) { if (check == true) { wxMessageBox(wxT ("You must select an External Graphic resource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (selCount > 1) { if (check == true) { wxString msg = wxT ("You must select just a single External Graphic resource !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } List->FindByIndex(selected, Stroke2XLinkHref, Stroke2MimeType); if (EnableStroke2Replacement == true) { wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT); wxString color = replacementCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("COLOR-REPACEMENT isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } Stroke2ColorReplacement = color; } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); wxString value = widthCtrl->GetValue(); if (value.ToDouble(&Stroke2Width) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Stroke2Width <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_DASHARRAY); value = dashArrayCtrl->GetValue(); if (DoParseDashArray(value, 1) == false) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-ARRAY: invalid expression !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } else { NormalizedDashArray(value, 1); dashArrayCtrl->SetValue(value); } if (Stroke2DashCount == 0) Stroke2DashOffset = 0.0; else { wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_DASHOFFSET); wxString value = offsetCtrl->GetValue(); if (value.ToDouble(&Stroke2DashOffset) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } } return true; } void SimplePolygonSymbolizerDialog::UpdateStroke2Page() { // // updating the STROKE #1 page // if (EnablePolygon2 == false) EnableStroke2 = false; wxCheckBox *enableBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE); if (EnableStroke2 == true) enableBox->SetValue(true); else enableBox->SetValue(false); if (EnablePolygon2 == true) enableBox->Enable(true); else enableBox->Enable(false); wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_STROKE2_OPACITY); opacityCtrl->SetValue(Stroke2Opacity * 100.0); if (EnableStroke2 == false) opacityCtrl->Enable(false); else opacityCtrl->Enable(true); wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_TYPE); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_HEX); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE2_PICKER_BTN); wxCheckBox *enableReplacement = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT); wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT); wxTextCtrl *sampleReplacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_REPLACEMENT_HEX); if (EnableStroke2 == false) { typeBox->Enable(false); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl4->Enable(false); enableReplacement->Enable(false); replacementCtrl->Enable(false); } else { typeBox->Enable(true); if (HasGraphicStroke2 == false) { typeBox->SetSelection(0); typeBox->Enable(true); colorCtrl->Enable(true); sampleCtrl->Enable(true); pick->Enable(true); GridCtrl4->Enable(false); GridCtrl4->ClearSelection(); enableReplacement->Enable(false); replacementCtrl->Enable(false); wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke2Color, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } else { typeBox->SetSelection(1); typeBox->Enable(true); colorCtrl->Enable(false); sampleCtrl->Enable(false); pick->Enable(false); GridCtrl4->Enable(true); int sel = List->FindByXLinkHref(Stroke2XLinkHref); if (sel >= 0) GridCtrl4->SelectRow(sel); enableReplacement->Enable(true); if (EnableStroke2Replacement == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke2ColorReplacement, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); replacementCtrl->SetValue(str); replacementCtrl->Enable(true); } else replacementCtrl->Enable(false); } } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_WIDTH); char dummy[64]; sprintf(dummy, "%1.2f", Stroke2Width); wxString str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); if (EnableStroke2 == false) widthCtrl->Enable(false); else widthCtrl->Enable(true); wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_LINEJOIN); switch (Stroke2LineJoin) { case RL2_PEN_JOIN_MITER: lineJoinCtrl->SetSelection(0); break; case RL2_PEN_JOIN_BEVEL: lineJoinCtrl->SetSelection(2); break; default: lineJoinCtrl->SetSelection(1); break; }; if (EnableStroke2 == false) lineJoinCtrl->Enable(false); else lineJoinCtrl->Enable(true); wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE2_LINECAP); switch (Stroke2LineCap) { case RL2_PEN_CAP_BUTT: lineCapCtrl->SetSelection(0); break; case RL2_PEN_CAP_SQUARE: lineCapCtrl->SetSelection(2); break; default: lineCapCtrl->SetSelection(1); break; }; if (EnableStroke2 == false) lineCapCtrl->Enable(false); else lineCapCtrl->Enable(true); wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_DASHARRAY); wxString value; NormalizedDashArray(value, 1); dashArrayCtrl->SetValue(value); if (EnableStroke2 == false) dashArrayCtrl->Enable(false); else dashArrayCtrl->Enable(true); wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE2_DASHOFFSET); if (Stroke2DashCount == 0) offsetCtrl->SetValue(wxT("0.0")); else { char dummy[64]; sprintf(dummy, "%1.2f", Stroke2DashOffset); wxString str = wxString::FromUTF8(dummy); offsetCtrl->SetValue(str); } if (EnableStroke2 == false) offsetCtrl->Enable(false); else offsetCtrl->Enable(true); } bool SimplePolygonSymbolizerDialog::RetrievePreviewPage() { // // retrieving params from the PREVIEW page // return true; } void SimplePolygonSymbolizerDialog::PreparePolygonPath(void *xctx, double perpendicular_offset, double displacement_x, double displacement_y) { // Visual Preview // exterior ring gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine(); gaiaAppendPointToDynamicLine(dyn, 190.0, 40.0); double pi = 3.14159265359; for (double rads = (2.0 * pi) - (pi / 2.0); rads >= 0.1; rads -= 0.666666) { double x = 135.0 + (115.0 * cos(rads)); double y = 150.0 + (115.0 * sin(rads)); gaiaAppendPointToDynamicLine(dyn, x, y); } gaiaAppendPointToDynamicLine(dyn, 230.0, 200.0); gaiaAppendPointToDynamicLine(dyn, 250.0, 200.0); gaiaAppendPointToDynamicLine(dyn, 270.0, 220.0); gaiaAppendPointToDynamicLine(dyn, 290.0, 200.0); gaiaAppendPointToDynamicLine(dyn, 310.0, 220.0); gaiaAppendPointToDynamicLine(dyn, 330.0, 200.0); gaiaAppendPointToDynamicLine(dyn, 350.0, 220.0); gaiaAppendPointToDynamicLine(dyn, 350.0, 260.0); for (double rads = (pi * 2.0) + (pi / 2.0); rads >= pi + (pi / 4.0); rads -= 0.1) { double x = 365.0 + (115.0 * cos(rads)); double y = 150.0 + (115.0 * sin(rads)); gaiaAppendPointToDynamicLine(dyn, x, y); } gaiaAppendPointToDynamicLine(dyn, 250.0, 40.0); gaiaAppendPointToDynamicLine(dyn, 250.0, 80.0); gaiaAppendPointToDynamicLine(dyn, 200.0, 80.0); int points = 0; gaiaPointPtr pt = dyn->First; while (pt != NULL) { // counting how many Points are there points++; pt = pt->Next; } gaiaGeomCollPtr geom = gaiaAllocGeomColl(); gaiaPolygonPtr pg = gaiaAddPolygonToGeomColl(geom, points + 1, 1); gaiaRingPtr rng = pg->Exterior; int iv = 0; pt = dyn->First; while (pt != NULL) { // preparing the Exterior Ring gaiaSetPoint(rng->Coords, iv, pt->X, pt->Y); iv++; pt = pt->Next; } gaiaSetPoint(rng->Coords, points, dyn->First->X, dyn->Last->Y); gaiaFreeDynamicLine(dyn); // interior ring dyn = gaiaAllocDynamicLine(); gaiaAppendPointToDynamicLine(dyn, 350.0, 160.0); gaiaAppendPointToDynamicLine(dyn, 380.0, 160.0); gaiaAppendPointToDynamicLine(dyn, 380.0, 130.0); for (double rads = (pi * 2.0) + (pi / 4.0); rads >= pi + (pi / 4.0); rads -= 0.1) { double x = 370.0 + (55.0 * cos(rads)); double y = 140.0 + (55.0 * sin(rads)); gaiaAppendPointToDynamicLine(dyn, x, y); } points = 0; pt = dyn->First; while (pt != NULL) { // counting how many Points are there points++; pt = pt->Next; } rng = gaiaAddInteriorRing(pg, 0, points + 1); iv = 0; pt = dyn->First; while (pt != NULL) { // preparing the Interior Ring gaiaSetPoint(rng->Coords, iv, pt->X, pt->Y); iv++; pt = pt->Next; } gaiaSetPoint(rng->Coords, points, dyn->First->X, dyn->Last->Y); gaiaFreeDynamicLine(dyn); gaiaGeomCollPtr geom2; if (perpendicular_offset != 0.0) { // buffering geom2 = gaiaGeomCollBuffer_r(MainFrame->GetSpliteInternalCache(), geom, perpendicular_offset, 16); gaiaFreeGeomColl(geom); } else { // unchanged geom2 = geom; } if (displacement_x != 0.0 || displacement_y != 0.0) { // displacing gaiaShiftCoords(geom2, displacement_x, displacement_y); } // preparing the Stroke Path pg = geom2->FirstPolygon; rng = pg->Exterior; rl2GraphicsContextPtr ctx = (rl2GraphicsContextPtr) xctx; for (iv = 0; iv < rng->Points; iv++) { double x; double y; gaiaGetPoint(rng->Coords, iv, &x, &y); if (iv == 0) rl2_graph_move_to_point(ctx, x, y); else rl2_graph_add_line_to_path(ctx, x, y); } rl2_graph_close_subpath(ctx); rng = pg->Interiors; for (iv = 0; iv < rng->Points; iv++) { double x; double y; gaiaGetPoint(rng->Coords, iv, &x, &y); if (iv == 0) rl2_graph_move_to_point(ctx, x, y); else rl2_graph_add_line_to_path(ctx, x, y); } rl2_graph_close_subpath(ctx); gaiaFreeGeomColl(geom2); } void SimplePolygonSymbolizerDialog::UpdatePreviewPage() { // // updating the PREVIEW page // rl2GraphicsPatternPtr pattern1 = NULL; rl2GraphicsPatternPtr pattern2 = NULL; rl2GraphicsPatternPtr pattern3 = NULL; rl2GraphicsPatternPtr pattern4 = NULL; wxRadioBox *backCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BACKGROUND); switch (PreviewBackground) { case GUI_PREVIEW_BACKGROUND_WHITE: backCtrl->SetSelection(1); break; case GUI_PREVIEW_BACKGROUND_BLACK: backCtrl->SetSelection(2); break; default: backCtrl->SetSelection(0); break; }; rl2GraphicsContextPtr ctx = NULL; ctx = rl2_graph_create_context(500, 300); if (ctx == NULL) return; // transparent background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 0); rl2_graph_draw_rectangle(ctx, -1, -1, 501, 301); if (EnableFill1 == true || EnableStroke1 == true) { if (EnableFill1 == true) { if (HasGraphicFill1 == false) { // preparing a Color-based Brush double aleph = 255.0 * Fill1Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Fill1Color, color); rl2_graph_set_brush(ctx, color.Red(), color.Green(), color.Blue(), alpha); } else { // preparing a Pattern-based Brush pattern1 = rl2_create_pattern_from_external_graphic(MainFrame->GetSqlite(), Fill1XLinkHref.ToUTF8 (), 1); if (pattern1 != NULL) { if (EnableFill1Replacement) { // attempting to recolor the External Graphic resource wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Fill1ColorReplacement, color); rl2_graph_pattern_recolor(pattern1, color.Red(), color.Green(), color.Blue()); } if (Fill1Opacity < 1.0) { // setting up the required transparency double aleph = 255.0 * Fill1Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; rl2_graph_pattern_transparency(pattern1, alpha); } rl2_graph_set_pattern_brush(ctx, pattern1); } else { // invalid Pattern: defaulting to a Gray brush rl2_graph_set_brush(ctx, 128, 128, 128, 255); } } } if (EnableStroke1 == true) { if (HasGraphicStroke1 == false) { // preparing a Color-based Pen double aleph = 255.0 * Stroke1Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke1Color, color); if (Stroke1DashCount == 0) rl2_graph_set_solid_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke1Width, Stroke1LineCap, Stroke1LineJoin); else rl2_graph_set_dashed_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke1Width, Stroke1LineCap, Stroke1LineJoin, Stroke1DashCount, Stroke1DashArray, Stroke1DashOffset); } else { // preparing a Pattern-based Pen pattern2 = rl2_create_pattern_from_external_graphic(MainFrame->GetSqlite(), Stroke1XLinkHref.ToUTF8 (), 1); if (pattern2 != NULL) { if (EnableStroke1Replacement) { // attempting to recolor the External Graphic resource wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke1ColorReplacement, color); rl2_graph_pattern_recolor(pattern2, color.Red(), color.Green(), color.Blue()); } if (Stroke1Opacity < 1.0) { // setting up the required transparency double aleph = 255.0 * Stroke1Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; rl2_graph_pattern_transparency(pattern2, alpha); } if (Stroke1DashCount == 0) rl2_graph_set_pattern_solid_pen(ctx, pattern2, Stroke1Width, Stroke1LineCap, Stroke1LineJoin); else rl2_graph_set_pattern_dashed_pen(ctx, pattern2, Stroke1Width, Stroke1LineCap, Stroke1LineJoin, Stroke1DashCount, Stroke1DashArray, Stroke1DashOffset); } else { // invalid Pattern: defaulting to a black Pen if (Stroke1DashCount == 0) rl2_graph_set_solid_pen(ctx, 0, 0, 0, 255, Stroke1Width, Stroke1LineCap, Stroke1LineJoin); else rl2_graph_set_dashed_pen(ctx, 0, 0, 0, 255, Stroke1Width, Stroke1LineCap, Stroke1LineJoin, Stroke1DashCount, Stroke1DashArray, Stroke1DashOffset); } } } PreparePolygonPath(ctx, PerpendicularOffset1, DisplacementX1, DisplacementY1); if (EnableFill1 == true && EnableStroke1) { // applying both Fill and Stroke rl2_graph_fill_path(ctx, RL2_PRESERVE_PATH); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); } else if (EnableFill1 == true) { // applying Fill only rl2_graph_fill_path(ctx, RL2_CLEAR_PATH); } else if (EnableStroke1 == true) { // applying Stroke only rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); } } if (EnablePolygon2 == true && (EnableFill2 == true || EnableStroke2 == true)) { if (EnableFill2 == true) { if (HasGraphicFill2 == false) { // preparing a Color-based Brush double aleph = 255.0 * Fill2Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Fill2Color, color); rl2_graph_set_brush(ctx, color.Red(), color.Green(), color.Blue(), alpha); } else { // preparing a Pattern-based Brush pattern3 = rl2_create_pattern_from_external_graphic(MainFrame->GetSqlite(), Fill2XLinkHref.ToUTF8 (), 1); if (pattern3 != NULL) { if (EnableFill2Replacement) { // attempting to recolor the External Graphic resource wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Fill2ColorReplacement, color); rl2_graph_pattern_recolor(pattern3, color.Red(), color.Green(), color.Blue()); } if (Fill2Opacity < 1.0) { // setting up the required transparency double aleph = 255.0 * Fill2Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; rl2_graph_pattern_transparency(pattern3, alpha); } rl2_graph_set_pattern_brush(ctx, pattern3); } else { // invalid Pattern: defaulting to a Gray brush rl2_graph_set_brush(ctx, 128, 128, 128, 255); } } } if (EnableStroke2 == true) { if (HasGraphicStroke2 == false) { // preparing a Color-based Pen double aleph = 255.0 * Stroke2Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke2Color, color); if (Stroke2DashCount == 0) rl2_graph_set_solid_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke2Width, Stroke2LineCap, Stroke2LineJoin); else rl2_graph_set_dashed_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, Stroke2Width, Stroke2LineCap, Stroke2LineJoin, Stroke2DashCount, Stroke2DashArray, Stroke2DashOffset); } else { // preparing a Pattern-based Pen pattern4 = rl2_create_pattern_from_external_graphic(MainFrame->GetSqlite(), Stroke2XLinkHref.ToUTF8 (), 1); if (pattern4 != NULL) { if (EnableStroke2Replacement) { // attempting to recolor the External Graphic resource wxColour color = wxNullColour; ColorMapEntry::GetWxColor(Stroke2ColorReplacement, color); rl2_graph_pattern_recolor(pattern4, color.Red(), color.Green(), color.Blue()); } if (Stroke2Opacity < 1.0) { // setting up the required transparency double aleph = 255.0 * Stroke2Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; rl2_graph_pattern_transparency(pattern4, alpha); } if (Stroke2DashCount == 0) rl2_graph_set_pattern_solid_pen(ctx, pattern4, Stroke2Width, Stroke2LineCap, Stroke2LineJoin); else rl2_graph_set_pattern_dashed_pen(ctx, pattern4, Stroke2Width, Stroke2LineCap, Stroke2LineJoin, Stroke2DashCount, Stroke2DashArray, Stroke2DashOffset); } else { // invalid Pattern: defaulting to a black Pen if (Stroke2DashCount == 0) rl2_graph_set_solid_pen(ctx, 0, 0, 0, 255, Stroke2Width, Stroke2LineCap, Stroke2LineJoin); else rl2_graph_set_dashed_pen(ctx, 0, 0, 0, 255, Stroke2Width, Stroke2LineCap, Stroke2LineJoin, Stroke2DashCount, Stroke2DashArray, Stroke2DashOffset); } } } PreparePolygonPath(ctx, PerpendicularOffset2, DisplacementX2, DisplacementY2); if (EnableFill2 == true && EnableStroke2) { // applying both Fill and Stroke rl2_graph_fill_path(ctx, RL2_PRESERVE_PATH); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); } else if (EnableFill2 == true) { // applying Fill only rl2_graph_fill_path(ctx, RL2_CLEAR_PATH); } else if (EnableStroke2 == true) { // applying Stroke only rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); } } // creating the RGB and Alpha arrays int half_transparency = 0; unsigned char *rgb_array = rl2_graph_get_context_rgb_array(ctx); unsigned char *alpha_array = rl2_graph_get_context_alpha_array(ctx, &half_transparency); rl2_graph_destroy_context(ctx); if (pattern1 != NULL) rl2_graph_destroy_pattern(pattern1); if (pattern2 != NULL) rl2_graph_destroy_pattern(pattern2); if (pattern3 != NULL) rl2_graph_destroy_pattern(pattern3); if (pattern4 != NULL) rl2_graph_destroy_pattern(pattern4); if (rgb_array == NULL || alpha_array == NULL) { if (rgb_array != NULL) free(rgb_array); if (alpha_array != NULL) free(alpha_array); return; } // creating the Preview from RGB and Alpha arrays wxImage img(500, 300); img.SetData(rgb_array); img.SetAlpha(alpha_array); wxBitmap bmp(img); wxBitmap bmp2; wxBrush brush; wxMemoryDC dc; wxBitmap white = wxBitmap(500, 300); wxBitmap black = wxBitmap(500, 300); switch (PreviewBackground) { case GUI_PREVIEW_BACKGROUND_WHITE: dc.SelectObject(white); brush = wxBrush(wxColour(255, 255, 255)); dc.SetBrush(brush); dc.DrawRectangle(0, 0, 500, 300); dc.SelectObject(wxNullBitmap); bmp2 = white.GetSubBitmap(wxRect(0, 0, white.GetWidth(), white.GetHeight())); break; case GUI_PREVIEW_BACKGROUND_BLACK: dc.SelectObject(black); brush = wxBrush(wxColour(0, 0, 0)); dc.SetBrush(brush); dc.DrawRectangle(0, 0, 500, 300); dc.SelectObject(wxNullBitmap); bmp2 = black.GetSubBitmap(wxRect(0, 0, black.GetWidth(), black.GetHeight())); break; default: bmp2 = PreviewBackBitmap.GetSubBitmap(wxRect (0, 0, PreviewBackBitmap.GetWidth(), PreviewBackBitmap.GetHeight())); break; }; // printing the Preview over the currently selected background dc.SelectObject(bmp2); dc.DrawBitmap(bmp, 0, 0, true); dc.SelectObject(wxNullBitmap); // updating the GUI Preview SymbolizerPreview *previewCtrl = (SymbolizerPreview *) FindWindow(ID_SYMBOLIZER_PREVIEW); previewCtrl->SetBitmap(bmp2); } void SimplePolygonSymbolizerDialog::OnPageChanging(wxNotebookEvent & event) { // // TAB/PAGE selection changing // bool ret; switch (event.GetOldSelection()) { case 0: ret = RetrieveMainPage(); break; case 1: ret = RetrieveFill1Page(); break; case 2: ret = RetrieveStroke1Page(); break; case 3: ret = RetrieveFill2Page(); break; case 4: ret = RetrieveStroke2Page(); break; case 5: ret = RetrievePreviewPage(); break; }; if (ret != true) event.Veto(); } void SimplePolygonSymbolizerDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // switch (event.GetSelection()) { case 0: UpdateMainPage(); break; case 1: UpdateFill1Page(); break; case 2: UpdateStroke1Page(); break; case 3: UpdateFill2Page(); break; case 4: UpdateStroke2Page(); break; case 5: UpdatePreviewPage(); break; }; } char *SimplePolygonSymbolizerDialog::DoCreateFeatureTypeXML() { // // creating the SLD/SE (XML) code - Feature Type // char *str; const char *cstr; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } switch (Uom) { case GUI_UOM_METRE: cstr = "http://www.opengeospatial.org/se/units/metre"; break; case GUI_UOM_INCH: cstr = "http://www.opengeospatial.org/se/units/inch"; break; default: cstr = "http://www.opengeospatial.org/se/units/pixel"; break; }; xml = sqlite3_mprintf("%s\t\t\r\n", prev, cstr); sqlite3_free(prev); prev = xml; if (EnableFill1 == true) { // Polygon Fill xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphicFill1 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Fill1XLinkHref.ToUTF8()) + 1]; strcpy(str, Fill1XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Fill1MimeType.ToUTF8()) + 1]; strcpy(str, Fill1MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableFill1Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Fill1ColorReplacement.ToUTF8()) + 1]; strcpy(str, Fill1ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Fill1Color.ToUTF8()) + 1]; strcpy(str, Fill1Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Fill1Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (EnableStroke1 == true) { // Polygon Stroke xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphicStroke1 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1XLinkHref.ToUTF8()) + 1]; strcpy(str, Stroke1XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1MimeType.ToUTF8()) + 1]; strcpy(str, Stroke1MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableStroke1Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1ColorReplacement.ToUTF8()) + 1]; strcpy(str, Stroke1ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Stroke1Color.ToUTF8()) + 1]; strcpy(str, Stroke1Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke1Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke1Width); sqlite3_free(prev); prev = xml; switch (Stroke1LineJoin) { case RL2_PEN_JOIN_MITER: xml = sqlite3_mprintf ("%s\t\t\t\tmitre\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_JOIN_BEVEL: xml = sqlite3_mprintf ("%s\t\t\t\tbevel\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; switch (Stroke1LineCap) { case RL2_PEN_CAP_BUTT: xml = sqlite3_mprintf ("%s\t\t\t\tbutt\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_CAP_SQUARE: xml = sqlite3_mprintf ("%s\t\t\t\tsquare\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; if (Stroke1DashCount > 0 && Stroke1DashArray != NULL) { wxString dash; NormalizedDashArray(dash, 0, ' '); str = new char[strlen(dash.ToUTF8()) + 1]; strcpy(str, dash.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Stroke1DashOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke1DashOffset); sqlite3_free(prev); prev = xml; } } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (DisplacementX1 != 0.0 || DisplacementY1 != 0.0) { xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t%1.4f\r\n", prev, DisplacementX1); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t%1.4f\r\n", prev, DisplacementY1); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (PerpendicularOffset1 != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t%1.4f\r\n", prev, PerpendicularOffset1); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (EnablePolygon2 == true) { // Polygon #2 switch (Uom) { case GUI_UOM_METRE: cstr = "http://www.opengeospatial.org/se/units/metre"; break; case GUI_UOM_INCH: cstr = "http://www.opengeospatial.org/se/units/inch"; break; default: cstr = "http://www.opengeospatial.org/se/units/pixel"; break; }; xml = sqlite3_mprintf("%s\t\t\r\n", prev, cstr); sqlite3_free(prev); prev = xml; if (EnableFill2 == true) { // Polygon Fill xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphicFill2 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Fill2XLinkHref.ToUTF8()) + 1]; strcpy(str, Fill2XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Fill2MimeType.ToUTF8()) + 1]; strcpy(str, Fill2MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableFill2Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Fill2ColorReplacement.ToUTF8()) + 1]; strcpy(str, Fill2ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Fill2Color.ToUTF8()) + 1]; strcpy(str, Fill2Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Fill2Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (EnableStroke2 == true) { // Polygon Stroke xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphicStroke2 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke2XLinkHref.ToUTF8()) + 1]; strcpy(str, Stroke2XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke2MimeType.ToUTF8()) + 1]; strcpy(str, Stroke2MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableStroke2Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke2ColorReplacement.ToUTF8()) + 1]; strcpy(str, Stroke2ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Stroke2Color.ToUTF8()) + 1]; strcpy(str, Stroke2Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke2Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke2Width); sqlite3_free(prev); prev = xml; switch (Stroke2LineJoin) { case RL2_PEN_JOIN_MITER: xml = sqlite3_mprintf ("%s\t\t\t\tmitre\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_JOIN_BEVEL: xml = sqlite3_mprintf ("%s\t\t\t\tbevel\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; switch (Stroke2LineCap) { case RL2_PEN_CAP_BUTT: xml = sqlite3_mprintf ("%s\t\t\t\tbutt\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_CAP_SQUARE: xml = sqlite3_mprintf ("%s\t\t\t\tsquare\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; if (Stroke2DashCount > 0 && Stroke2DashArray != NULL) { wxString dash; NormalizedDashArray(dash, 1, ' '); str = new char[strlen(dash.ToUTF8()) + 1]; strcpy(str, dash.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Stroke2DashOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Stroke2DashOffset); sqlite3_free(prev); prev = xml; } } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (DisplacementX2 != 0.0 || DisplacementY2 != 0.0) { xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.4f\r\n", prev, DisplacementX2); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.4f\r\n", prev, DisplacementY2); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (PerpendicularOffset2 != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t%1.4f\r\n", prev, PerpendicularOffset2); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *SimplePolygonSymbolizerDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - LineSymbolizer // char *str; const char *cstr; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev, cstr); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (EnableFill1 == true) { // Polygon Fill xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphicFill1 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Fill1XLinkHref.ToUTF8()) + 1]; strcpy(str, Fill1XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Fill1MimeType.ToUTF8()) + 1]; strcpy(str, Fill1MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableFill1Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Fill1ColorReplacement.ToUTF8()) + 1]; strcpy(str, Fill1ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Fill1Color.ToUTF8()) + 1]; strcpy(str, Fill1Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, Fill1Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (EnableStroke1 == true) { // Polygon Stroke xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphicStroke1 == true) { // using an External Graphic xml = sqlite3_mprintf ("%s\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1XLinkHref.ToUTF8()) + 1]; strcpy(str, Stroke1XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1MimeType.ToUTF8()) + 1]; strcpy(str, Stroke1MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableStroke1Replacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Stroke1ColorReplacement.ToUTF8()) + 1]; strcpy(str, Stroke1ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // using a Solid Color str = new char[strlen(Stroke1Color.ToUTF8()) + 1]; strcpy(str, Stroke1Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, Stroke1Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, Stroke1Width); sqlite3_free(prev); prev = xml; switch (Stroke1LineJoin) { case RL2_PEN_JOIN_MITER: xml = sqlite3_mprintf ("%s\t\tmitre\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_JOIN_BEVEL: xml = sqlite3_mprintf ("%s\t\tbevel\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; switch (Stroke1LineCap) { case RL2_PEN_CAP_BUTT: xml = sqlite3_mprintf ("%s\t\tbutt\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_CAP_SQUARE: xml = sqlite3_mprintf ("%s\t\tsquare\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; if (Stroke1DashCount > 0 && Stroke1DashArray != NULL) { wxString dash; NormalizedDashArray(dash, 0, ' '); str = new char[strlen(dash.ToUTF8()) + 1]; strcpy(str, dash.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Stroke1DashOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, Stroke1DashOffset); sqlite3_free(prev); prev = xml; } } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (DisplacementX1 != 0.0 || DisplacementY1 != 0.0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t%1.4f\r\n", prev, DisplacementX1); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t%1.4f\r\n", prev, DisplacementY1); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (PerpendicularOffset1 != 0.0) { xml = sqlite3_mprintf ("%s\t%1.4f\r\n", prev, PerpendicularOffset1); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void SimplePolygonSymbolizerDialog::OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the VectorSymbolizer into the DBMS // switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrieveFill1Page(); break; case 2: RetrieveStroke1Page(); break; case 3: RetrieveFill2Page(); break; case 4: RetrieveStroke2Page(); break; case 5: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } char *xml; if (MinScale == true || MaxScale == true || EnablePolygon2 == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertVectorSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE VectorSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); wxDialog::EndModal(wxID_OK); } void SimplePolygonSymbolizerDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the VectorSymbolizer as an external file // int ret; wxString path; wxString lastDir; switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrieveFill1Page(); break; case 2: RetrieveStroke1Page(); break; case 3: RetrieveFill2Page(); break; case 4: RetrieveStroke2Page(); break; case 5: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } wxFileDialog fileDialog(this, wxT ("Exporting an SLD/SE PolygonSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true || EnablePolygon2 == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE PolygonSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void SimplePolygonSymbolizerDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the VectorSymbolizer into the Clipboard // switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrieveFill1Page(); break; case 2: RetrieveStroke1Page(); break; case 3: RetrieveFill2Page(); break; case 4: RetrieveStroke2Page(); break; case 5: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } char *xml; if (MinScale == true || MaxScale == true || EnablePolygon2 == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void SimplePolygonSymbolizerDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } spatialite_gui-2.0.0-devel/Raster.cpp0000664000175000017500000035766312544026240014523 00000000000000/* / Raster.cpp / various dialog classes supporting Raster datasources / / version 1.8, 2015 March 10 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/tokenzr.h" bool CreateRasterCoverageDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; SampleType = RL2_SAMPLE_UINT8; PixelType = RL2_PIXEL_RGB; NumBands = 3; RedBand = -1; GreenBand = -1; BlueBand = -1; NIRband = -1; AutoNDVI = false; Compression = RL2_COMPRESSION_NONE; Quality = 100; TileWidth = 512; TileHeight = 512; NotGeoreferenced = false; Srid = -1; HorzResolution = 1.0; VertResolution = 1.0; StrictResolution = false; MixedResolutions = false; InputPaths = true; MD5 = true; Summary = true; if (wxDialog::Create(parent, wxID_ANY, wxT("Creating a new Raster Coverage")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void CreateRasterCoverageDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Coverage Name wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("&Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, ID_CVG_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the Coverage Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, ID_CVG_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the Coverage Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, ID_CVG_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: main attributes wxBoxSizer *typeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(typeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // fourth row, column #1: Pixel Type wxString pixel[6]; pixel[0] = wxT("&Monochrome"); pixel[1] = wxT("&Palette"); pixel[2] = wxT("&Grayscale"); pixel[3] = wxT("&RGB"); pixel[4] = wxT("&MultiBand"); pixel[5] = wxT("&DataGrid"); wxRadioBox *pixelBox = new wxRadioBox(this, ID_CVG_PIXEL, wxT("&Pixel Type"), wxDefaultPosition, wxDefaultSize, 6, pixel, 1, wxRA_SPECIFY_COLS); typeSizer->Add(pixelBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); pixelBox->SetSelection(3); // fourth row, column #2: Sample Type wxString sample[11]; sample[0] = wxT("&1-BIT"); sample[1] = wxT("&2-BIT"); sample[2] = wxT("&4-BIT"); sample[3] = wxT("INT8"); sample[4] = wxT("UINT8"); sample[5] = wxT("INT16"); sample[6] = wxT("UINT16"); sample[7] = wxT("INT32"); sample[8] = wxT("UINT32"); sample[9] = wxT("FLOAT"); sample[10] = wxT("DOUBLE"); wxRadioBox *sampleBox = new wxRadioBox(this, ID_CVG_SAMPLE, wxT("&Sample Type"), wxDefaultPosition, wxDefaultSize, 11, sample, 2, wxRA_SPECIFY_COLS); typeSizer->Add(sampleBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sampleBox->SetSelection(4); sampleBox->Enable(0, false); sampleBox->Enable(1, false); sampleBox->Enable(2, false); sampleBox->Enable(3, false); sampleBox->Enable(5, false); sampleBox->Enable(7, false); sampleBox->Enable(8, false); sampleBox->Enable(9, false); sampleBox->Enable(10, false); // fourth row, column #3a: NumBands / Compression Quality wxBoxSizer *bndqtySizer = new wxBoxSizer(wxVERTICAL); typeSizer->Add(bndqtySizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *bndBoxSizer = new wxBoxSizer(wxHORIZONTAL); bndqtySizer->Add(bndBoxSizer, 0, wxALIGN_TOP | wxALL, 0); wxStaticBox *bndBox = new wxStaticBox(this, wxID_STATIC, wxT("Bands"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *bndSizer = new wxStaticBoxSizer(bndBox, wxVERTICAL); bndBoxSizer->Add(bndSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxSpinCtrl *bandCtrl = new wxSpinCtrl(this, ID_CVG_BANDS, wxEmptyString, wxDefaultPosition, wxSize(60, 20), wxSP_ARROW_KEYS, 1, 255, 3); bandCtrl->Enable(false); bndSizer->Add(bandCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row, column #3b: Compression Quality bndqtySizer->AddSpacer(30); wxBoxSizer *qtyBoxSizer = new wxBoxSizer(wxHORIZONTAL); bndqtySizer->Add(qtyBoxSizer, 0, wxALIGN_BOTTOM | wxALL, 0); wxStaticBox *qtyBox = new wxStaticBox(this, wxID_STATIC, wxT("Quality"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *qtySizer = new wxStaticBoxSizer(qtyBox, wxVERTICAL); qtyBoxSizer->Add(qtySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxSpinCtrl *qualityCtrl = new wxSpinCtrl(this, ID_CVG_QUALITY, wxEmptyString, wxDefaultPosition, wxSize(60, 20), wxSP_ARROW_KEYS, 1, 100, 100); qualityCtrl->Enable(false); qtySizer->Add(qualityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row, column #4: Compression wxString compression[13]; compression[0] = wxT("&Deflate [Zip]"); compression[1] = wxT("&LZMA [7zip]"); compression[2] = wxT("&PNG"); compression[3] = wxT("&JPEG"); compression[4] = wxT("&WebP (lossy)"); compression[5] = wxT("&WebP (lossless)"); compression[6] = wxT("&Jpeg2000 (lossy)"); compression[7] = wxT("&Jpeg2000 (lossless)"); compression[8] = wxT("&CharLS (lossless)"); compression[9] = wxT("&CCITT FAX4"); compression[10] = wxT("&Deflate-NoDelta"); compression[11] = wxT("&LZMA-NoDelta"); compression[12] = wxT("&None"); wxRadioBox *compressionBox = new wxRadioBox(this, ID_CVG_COMPRESSION, wxT("&Compression Type"), wxDefaultPosition, wxDefaultSize, 13, compression, 2, wxRA_SPECIFY_COLS); typeSizer->Add(compressionBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); compressionBox->SetSelection(12); compressionBox->Enable(9, false); // fifth row: default bands and AutoNDVI int spacer_sz = 30; wxBoxSizer *defBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(defBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *defBox = new wxStaticBox(this, wxID_STATIC, wxT("Default bands selection"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *defSizer = new wxStaticBoxSizer(defBox, wxVERTICAL); defBoxSizer->Add(defSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *defbdsSizer = new wxBoxSizer(wxHORIZONTAL); defSizer->Add(defbdsSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *redLabel = new wxStaticText(this, wxID_STATIC, wxT("Red:")); defbdsSizer->Add(redLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxSpinCtrl *redCtrl = new wxSpinCtrl(this, ID_CVG_RED, wxEmptyString, wxDefaultPosition, wxSize(60, 20), wxSP_ARROW_KEYS, -1, -1); RedBand = -1; redCtrl->SetValue(RedBand); redCtrl->Enable(false); defbdsSizer->Add(redCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); defbdsSizer->AddSpacer(spacer_sz); wxStaticText *greenLabel = new wxStaticText(this, wxID_STATIC, wxT("Green:")); defbdsSizer->Add(greenLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxSpinCtrl *greenCtrl = new wxSpinCtrl(this, ID_CVG_GREEN, wxEmptyString, wxDefaultPosition, wxSize(60, 20), wxSP_ARROW_KEYS, -1, -1); GreenBand = -1; greenCtrl->SetValue(GreenBand); greenCtrl->Enable(false); defbdsSizer->Add(greenCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); defbdsSizer->AddSpacer(spacer_sz); wxStaticText *blueLabel = new wxStaticText(this, wxID_STATIC, wxT("Blue:")); defbdsSizer->Add(blueLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxSpinCtrl *blueCtrl = new wxSpinCtrl(this, ID_CVG_BLUE, wxEmptyString, wxDefaultPosition, wxSize(60, 20), wxSP_ARROW_KEYS, -1, -1); BlueBand = -1; blueCtrl->SetValue(BlueBand); blueCtrl->Enable(false); defbdsSizer->Add(blueCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); defbdsSizer->AddSpacer(spacer_sz); wxStaticText *nirLabel = new wxStaticText(this, wxID_STATIC, wxT("NIR:")); defbdsSizer->Add(nirLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxSpinCtrl *nirCtrl = new wxSpinCtrl(this, ID_CVG_NIR, wxEmptyString, wxDefaultPosition, wxSize(60, 20), wxSP_ARROW_KEYS, -1, -1); NIRband = -1; nirCtrl->SetValue(NIRband); nirCtrl->Enable(false); defbdsSizer->Add(nirCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); defbdsSizer->AddSpacer(spacer_sz); wxCheckBox *autoNDVIctrl = new wxCheckBox(this, ID_CVG_AUTO_NDVI, wxT("Auto NDVI"), wxDefaultPosition, wxDefaultSize); autoNDVIctrl->SetValue(false); autoNDVIctrl->Enable(false); defbdsSizer->Add(autoNDVIctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); // fifth row: NO-DATA value Name wxBoxSizer *ndBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(ndBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *ndBox = new wxStaticBox(this, wxID_STATIC, wxT("NO-DATA Pixel"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *ndSizer = new wxStaticBoxSizer(ndBox, wxVERTICAL); ndBoxSizer->Add(ndSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *nodataSizer = new wxBoxSizer(wxHORIZONTAL); ndSizer->Add(nodataSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *nodataCtrl = new wxTextCtrl(this, ID_CVG_NODATA, wxT(""), wxDefaultPosition, wxSize(200, 22)); nodataSizer->Add(nodataCtrl, 0, wxALIGN_RIGHT | wxALL, 1); wxStaticText *nodataLabel = new wxStaticText(this, wxID_STATIC, wxT (" (list of comma-separated sample values) e.g.: ")); nodataSizer->Add(nodataLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxStaticText *nodata2Label = new wxStaticText(this, wxID_STATIC, wxT("255,255,255 ")); nodata2Label->SetForegroundColour(wxColour(255, 0, 0)); nodataSizer->Add(nodata2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); // sixth row: other attributes wxBoxSizer *mixSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(mixSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // sixth row, column #1: Tile Size wxBoxSizer *tileBoxSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(tileBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *tileBox = new wxStaticBox(this, wxID_STATIC, wxT("Tile Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *tileSizer = new wxStaticBoxSizer(tileBox, wxVERTICAL); tileBoxSizer->Add(tileSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *tileWSizer = new wxBoxSizer(wxHORIZONTAL); tileSizer->Add(tileWSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticText *tileWLabel = new wxStaticText(this, wxID_STATIC, wxT("&Width:")); tileWSizer->Add(tileWLabel, 0, wxALIGN_RIGHT | wxALL, 5); wxSpinCtrl *widthCtrl = new wxSpinCtrl(this, ID_CVG_WIDTH, wxEmptyString, wxDefaultPosition, wxSize(60, 20), wxSP_ARROW_KEYS, 256, 1024, 512); tileWSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *tileXSizer = new wxBoxSizer(wxHORIZONTAL); tileSizer->Add(tileXSizer, 0, wxALIGN_RIGHT | wxALL, 2); wxCheckBox *squareTileCtrl = new wxCheckBox(this, ID_CVG_SQTILE, wxT("square tile"), wxDefaultPosition, wxDefaultSize); squareTileCtrl->SetValue(true); tileXSizer->Add(squareTileCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *tileHSizer = new wxBoxSizer(wxHORIZONTAL); tileSizer->Add(tileHSizer, 0, wxALIGN_RIGHT | wxALL, 2); wxStaticText *tileHLabel = new wxStaticText(this, wxID_STATIC, wxT("&Height:")); tileHSizer->Add(tileHLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *heightCtrl = new wxSpinCtrl(this, ID_CVG_HEIGHT, wxEmptyString, wxDefaultPosition, wxSize(60, 20), wxSP_ARROW_KEYS, 256, 1024, 512); heightCtrl->Enable(false); tileHSizer->Add(heightCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // sixth row, column #2: SRID wxBoxSizer *sridBoxSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *sridBox = new wxStaticBox(this, wxID_STATIC, wxT("Georeferencing"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *geoSizer = new wxStaticBoxSizer(sridBox, wxVERTICAL); sridBoxSizer->Add(geoSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *norefSizer = new wxBoxSizer(wxHORIZONTAL); geoSizer->Add(norefSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxCheckBox *norefCtrl = new wxCheckBox(this, ID_CVG_NOREF, wxT("none"), wxDefaultPosition, wxDefaultSize); norefCtrl->SetValue(false); norefSizer->Add(norefCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); geoSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); int srid = 0; wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_CVG_SRID, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, -1, 1000000, srid); sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // sixth row, column #3: Pixel Resolution wxBoxSizer *resBoxSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(resBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *resBox = new wxStaticBox(this, wxID_STATIC, wxT("Pixel Resolution"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *resSizer = new wxStaticBoxSizer(resBox, wxVERTICAL); resBoxSizer->Add(resSizer, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *resHSizer = new wxBoxSizer(wxHORIZONTAL); resSizer->Add(resHSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticText *resHLabel = new wxStaticText(this, wxID_STATIC, wxT("&Horz:")); resHSizer->Add(resHLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *horzCtrl = new wxTextCtrl(this, ID_CVG_HORZ_RES, wxT("1.0"), wxDefaultPosition, wxSize(80, 22)); resHSizer->Add(horzCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *resXSizer = new wxBoxSizer(wxHORIZONTAL); resSizer->Add(resXSizer, 0, wxALIGN_RIGHT | wxALL, 2); wxCheckBox *sameResCtrl = new wxCheckBox(this, ID_CVG_SAME_RES, wxT("same resolution"), wxDefaultPosition, wxDefaultSize); sameResCtrl->SetValue(true); resXSizer->Add(sameResCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *resVSizer = new wxBoxSizer(wxHORIZONTAL); resSizer->Add(resVSizer, 0, wxALIGN_RIGHT | wxALL, 2); wxStaticText *resVLabel = new wxStaticText(this, wxID_STATIC, wxT("&Vert:")); resVSizer->Add(resVLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *vertCtrl = new wxTextCtrl(this, ID_CVG_VERT_RES, wxT("1.0"), wxDefaultPosition, wxSize(80, 22)); vertCtrl->Enable(false); resVSizer->Add(vertCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // sixth row, column #4: Policies mixSizer->AddSpacer(50); wxBoxSizer *polBoxSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(polBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *polBox = new wxStaticBox(this, wxID_STATIC, wxT("Policies"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *polSizer = new wxStaticBoxSizer(polBox, wxVERTICAL); polBoxSizer->Add(polSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *strictCtrl = new wxCheckBox(this, ID_CVG_STRICT_RES, wxT("Strict Resolution"), wxDefaultPosition, wxDefaultSize); strictCtrl->SetValue(false); polSizer->Add(strictCtrl, 0, wxALIGN_LEFT | wxALL, 2); wxCheckBox *mixedCtrl = new wxCheckBox(this, ID_CVG_MIXED_RES, wxT("Mixed Resolutions"), wxDefaultPosition, wxDefaultSize); mixedCtrl->SetValue(false); polSizer->Add(mixedCtrl, 0, wxALIGN_LEFT | wxALL, 2); wxCheckBox *pathsCtrl = new wxCheckBox(this, ID_CVG_PATHS, wxT("Input Paths"), wxDefaultPosition, wxDefaultSize); pathsCtrl->SetValue(true); polSizer->Add(pathsCtrl, 0, wxALIGN_LEFT | wxALL, 2); wxCheckBox *md5Ctrl = new wxCheckBox(this, ID_CVG_MD5, wxT("MD5 Checksum"), wxDefaultPosition, wxDefaultSize); md5Ctrl->SetValue(true); polSizer->Add(md5Ctrl, 0, wxALIGN_LEFT | wxALL, 2); wxCheckBox *summaryCtrl = new wxCheckBox(this, ID_CVG_SUMMARY, wxT("XML Summary"), wxDefaultPosition, wxDefaultSize); summaryCtrl->SetValue(true); polSizer->Add(summaryCtrl, 0, wxALIGN_LEFT | wxALL, 2); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnOk); Connect(ID_CVG_PIXEL, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnPixelChanged); Connect(ID_CVG_SAMPLE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnSampleChanged); Connect(ID_CVG_COMPRESSION, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnCompressionChanged); Connect(ID_CVG_BANDS, wxEVT_COMMAND_SPINCTRL_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnNumBandsChanged); Connect(ID_CVG_BANDS, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnNumBandsChanged); Connect(ID_CVG_RED, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnRedBandChanged); Connect(ID_CVG_GREEN, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnGreenBandChanged); Connect(ID_CVG_BLUE, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnBlueBandChanged); Connect(ID_CVG_NIR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnNIRbandChanged); Connect(ID_CVG_AUTO_NDVI, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnAutoNDVIchanged); Connect(ID_CVG_SQTILE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnSquareTileChanged); Connect(ID_CVG_WIDTH, wxEVT_COMMAND_SPINCTRL_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnTileWidthChanged); Connect(ID_CVG_WIDTH, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnTileWidthChanged); Connect(ID_CVG_HEIGHT, wxEVT_COMMAND_SPINCTRL_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnTileHeightChanged); Connect(ID_CVG_HEIGHT, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnTileHeightChanged); Connect(ID_CVG_NOREF, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnNoGeorefChanged); Connect(ID_CVG_SAME_RES, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnSameResChanged); Connect(ID_CVG_HORZ_RES, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnHorzResChanged); Connect(ID_CVG_STRICT_RES, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnStrictChanged); Connect(ID_CVG_MIXED_RES, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnMixedChanged); Connect(ID_CVG_PATHS, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnPathsChanged); Connect(ID_CVG_MD5, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnMD5Changed); Connect(ID_CVG_SUMMARY, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & CreateRasterCoverageDialog::OnSummaryChanged); } void CreateRasterCoverageDialog:: OnPixelChanged(wxCommandEvent & WXUNUSED(event)) { // // Pixel Type selection changed // bool is_8_bit = false; bool is_16_bit = false; unsigned char num_bands; wxRadioBox *pixelCtrl = (wxRadioBox *) FindWindow(ID_CVG_PIXEL); wxRadioBox *sampleCtrl = (wxRadioBox *) FindWindow(ID_CVG_SAMPLE); wxRadioBox *compressionCtrl = (wxRadioBox *) FindWindow(ID_CVG_COMPRESSION); wxSpinCtrl *bandCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_BANDS); wxSpinCtrl *redBand = (wxSpinCtrl *) FindWindow(ID_CVG_RED); wxSpinCtrl *greenBand = (wxSpinCtrl *) FindWindow(ID_CVG_GREEN); wxSpinCtrl *blueBand = (wxSpinCtrl *) FindWindow(ID_CVG_BLUE); wxSpinCtrl *nirBand = (wxSpinCtrl *) FindWindow(ID_CVG_NIR); wxCheckBox *autoNDVIctrl = (wxCheckBox *) FindWindow(ID_CVG_AUTO_NDVI); switch (pixelCtrl->GetSelection()) { case 0: PixelType = RL2_PIXEL_MONOCHROME; break; case 1: PixelType = RL2_PIXEL_PALETTE; break; case 2: PixelType = RL2_PIXEL_GRAYSCALE; break; case 3: PixelType = RL2_PIXEL_RGB; break; case 4: PixelType = RL2_PIXEL_MULTIBAND; break; case 5: PixelType = RL2_PIXEL_DATAGRID; break; }; if (sampleCtrl->GetSelection() == 4) is_8_bit = true; if (sampleCtrl->GetSelection() == 6) is_16_bit = true; num_bands = bandCtrl->GetValue(); switch (PixelType) { case RL2_PIXEL_MONOCHROME: sampleCtrl->Enable(0, true); sampleCtrl->Enable(1, false); sampleCtrl->Enable(2, false); sampleCtrl->Enable(3, false); sampleCtrl->Enable(4, false); sampleCtrl->Enable(5, false); sampleCtrl->Enable(6, false); sampleCtrl->Enable(7, false); sampleCtrl->Enable(8, false); sampleCtrl->Enable(9, false); sampleCtrl->Enable(10, false); sampleCtrl->SetSelection(0); bandCtrl->SetValue(1); bandCtrl->Enable(false); RedBand = -1; GreenBand = -1; BlueBand = -1; NIRband = -1; AutoNDVI = false; redBand->SetValue(-1); redBand->Enable(false); greenBand->SetValue(-1); greenBand->Enable(false); blueBand->SetValue(-1); blueBand->Enable(false); nirBand->SetValue(-1); nirBand->Enable(false); autoNDVIctrl->SetValue(false); autoNDVIctrl->Enable(false); compressionCtrl->Enable(0, false); compressionCtrl->Enable(1, false); compressionCtrl->Enable(2, true); compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); compressionCtrl->Enable(6, false); compressionCtrl->Enable(7, false); compressionCtrl->Enable(8, false); compressionCtrl->Enable(9, true); compressionCtrl->Enable(10, false); compressionCtrl->Enable(11, false); compressionCtrl->Enable(12, true); if (compressionCtrl->GetSelection() == 12 || compressionCtrl->GetSelection() == 2 || compressionCtrl->GetSelection() == 9) ; else compressionCtrl->SetSelection(9); break; case RL2_PIXEL_PALETTE: sampleCtrl->Enable(0, true); sampleCtrl->Enable(1, true); sampleCtrl->Enable(2, true); sampleCtrl->Enable(3, false); sampleCtrl->Enable(4, true); sampleCtrl->Enable(5, false); sampleCtrl->Enable(6, false); sampleCtrl->Enable(7, false); sampleCtrl->Enable(8, false); sampleCtrl->Enable(9, false); sampleCtrl->Enable(10, false); if (sampleCtrl->GetSelection() == 0 || sampleCtrl->GetSelection() == 1 || sampleCtrl->GetSelection() == 2 || sampleCtrl->GetSelection() == 4) ; else sampleCtrl->SetSelection(4); bandCtrl->SetValue(1); bandCtrl->Enable(false); RedBand = -1; GreenBand = -1; BlueBand = -1; NIRband = -1; AutoNDVI = false; redBand->SetValue(-1); redBand->Enable(false); greenBand->SetValue(-1); greenBand->Enable(false); blueBand->SetValue(-1); blueBand->Enable(false); nirBand->SetValue(-1); nirBand->Enable(false); autoNDVIctrl->SetValue(false); autoNDVIctrl->Enable(false); compressionCtrl->Enable(0, false); compressionCtrl->Enable(1, false); compressionCtrl->Enable(2, true); compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); compressionCtrl->Enable(6, false); compressionCtrl->Enable(7, false); compressionCtrl->Enable(8, false); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, false); compressionCtrl->Enable(11, false); compressionCtrl->Enable(12, true); if (compressionCtrl->GetSelection() == 12 || compressionCtrl->GetSelection() == 2) ; else compressionCtrl->SetSelection(2); break; case RL2_PIXEL_GRAYSCALE: sampleCtrl->Enable(0, false); sampleCtrl->Enable(1, true); sampleCtrl->Enable(2, true); sampleCtrl->Enable(3, false); sampleCtrl->Enable(4, true); sampleCtrl->Enable(5, false); sampleCtrl->Enable(6, false); sampleCtrl->Enable(7, false); sampleCtrl->Enable(8, false); sampleCtrl->Enable(9, false); sampleCtrl->Enable(10, false); if (sampleCtrl->GetSelection() == 1 || sampleCtrl->GetSelection() == 2 || sampleCtrl->GetSelection() == 4) ; else sampleCtrl->SetSelection(4); bandCtrl->SetValue(1); bandCtrl->Enable(false); RedBand = -1; GreenBand = -1; BlueBand = -1; NIRband = -1; AutoNDVI = false; redBand->SetValue(-1); redBand->Enable(false); greenBand->SetValue(-1); greenBand->Enable(false); blueBand->SetValue(-1); blueBand->Enable(false); nirBand->SetValue(-1); nirBand->Enable(false); autoNDVIctrl->SetValue(false); autoNDVIctrl->Enable(false); compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, true); compressionCtrl->Enable(3, true); compressionCtrl->Enable(4, true); compressionCtrl->Enable(5, true); compressionCtrl->Enable(6, true); compressionCtrl->Enable(7, true); compressionCtrl->Enable(8, true); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); break; case RL2_PIXEL_RGB: sampleCtrl->Enable(0, false); sampleCtrl->Enable(1, false); sampleCtrl->Enable(2, false); sampleCtrl->Enable(3, false); sampleCtrl->Enable(4, true); sampleCtrl->Enable(5, false); sampleCtrl->Enable(6, true); sampleCtrl->Enable(7, false); sampleCtrl->Enable(8, false); sampleCtrl->Enable(9, false); sampleCtrl->Enable(10, false); if (sampleCtrl->GetSelection() == 4 || sampleCtrl->GetSelection() == 6) ; else sampleCtrl->SetSelection(4); bandCtrl->SetValue(3); bandCtrl->Enable(false); RedBand = -1; GreenBand = -1; BlueBand = -1; NIRband = -1; AutoNDVI = false; redBand->SetValue(-1); redBand->Enable(false); greenBand->SetValue(-1); greenBand->Enable(false); blueBand->SetValue(-1); blueBand->Enable(false); nirBand->SetValue(-1); nirBand->Enable(false); autoNDVIctrl->SetValue(false); autoNDVIctrl->Enable(false); compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, true); if (is_8_bit) { compressionCtrl->Enable(3, true); compressionCtrl->Enable(4, true); compressionCtrl->Enable(5, true); } else { compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); } compressionCtrl->Enable(6, true); compressionCtrl->Enable(7, true); compressionCtrl->Enable(8, true); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (is_8_bit) { if (compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } else { if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 4 || compressionCtrl->GetSelection() == 5 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } break; case RL2_PIXEL_MULTIBAND: sampleCtrl->Enable(0, false); sampleCtrl->Enable(1, false); sampleCtrl->Enable(2, false); sampleCtrl->Enable(3, false); sampleCtrl->Enable(4, true); sampleCtrl->Enable(5, false); sampleCtrl->Enable(6, true); sampleCtrl->Enable(7, false); sampleCtrl->Enable(8, false); sampleCtrl->Enable(9, false); sampleCtrl->Enable(10, false); if (sampleCtrl->GetSelection() == 4 || sampleCtrl->GetSelection() == 6) ; else sampleCtrl->SetSelection(4); bandCtrl->Enable(true); if (num_bands == 3 || num_bands == 4) { compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, true); compressionCtrl->Enable(3, false); if (is_8_bit) { compressionCtrl->Enable(4, true); compressionCtrl->Enable(5, true); } else { compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); } compressionCtrl->Enable(6, true); compressionCtrl->Enable(7, true); compressionCtrl->Enable(8, true); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (is_8_bit) { if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } else { if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 4 || compressionCtrl->GetSelection() == 5 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } } else { compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, false); compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); compressionCtrl->Enable(6, false); compressionCtrl->Enable(7, false); compressionCtrl->Enable(8, false); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (compressionCtrl->GetSelection() == 12 || compressionCtrl->GetSelection() == 0 || compressionCtrl->GetSelection() == 1) ; else compressionCtrl->SetSelection(0); } redBand->SetRange(-1, num_bands - 1); redBand->SetValue(-1); RedBand = -1; redBand->Enable(true); greenBand->SetRange(-1, num_bands - 1); greenBand->SetValue(-1); GreenBand = -1; greenBand->Enable(true); blueBand->SetRange(-1, num_bands - 1); blueBand->SetValue(-1); BlueBand = -1; blueBand->Enable(true); nirBand->SetRange(-1, num_bands - 1); nirBand->SetValue(-1); NIRband = -1; nirBand->Enable(true); autoNDVIctrl->SetValue(false); autoNDVIctrl->Enable(true); break; case RL2_PIXEL_DATAGRID: sampleCtrl->Enable(0, false); sampleCtrl->Enable(1, false); sampleCtrl->Enable(2, false); sampleCtrl->Enable(3, true); sampleCtrl->Enable(4, true); sampleCtrl->Enable(5, true); sampleCtrl->Enable(6, true); sampleCtrl->Enable(7, true); sampleCtrl->Enable(8, true); sampleCtrl->Enable(9, true); sampleCtrl->Enable(10, true); if (sampleCtrl->GetSelection() == 0 || sampleCtrl->GetSelection() == 1 || sampleCtrl->GetSelection() == 2) sampleCtrl->SetSelection(10); bandCtrl->SetValue(1); bandCtrl->Enable(false); RedBand = -1; GreenBand = -1; BlueBand = -1; NIRband = -1; AutoNDVI = false; redBand->SetValue(-1); redBand->Enable(false); greenBand->SetValue(-1); greenBand->Enable(false); blueBand->SetValue(-1); blueBand->Enable(false); nirBand->SetValue(-1); nirBand->Enable(false); autoNDVIctrl->SetValue(false); autoNDVIctrl->Enable(false); if (is_8_bit || is_16_bit) { compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, true); compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); compressionCtrl->Enable(6, true); compressionCtrl->Enable(7, true); compressionCtrl->Enable(8, true); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 4 || compressionCtrl->GetSelection() == 5 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } else { compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, false); compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); compressionCtrl->Enable(6, false); compressionCtrl->Enable(7, false); compressionCtrl->Enable(8, false); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (compressionCtrl->GetSelection() == 12 || compressionCtrl->GetSelection() == 0 || compressionCtrl->GetSelection() == 1) ; else compressionCtrl->SetSelection(0); } break; }; } void CreateRasterCoverageDialog:: OnSampleChanged(wxCommandEvent & WXUNUSED(event)) { // // Sample Type selection changed // bool is_8_bit = false; bool is_16_bit = false; unsigned char num_bands; wxRadioBox *pixelCtrl = (wxRadioBox *) FindWindow(ID_CVG_PIXEL); wxRadioBox *sampleCtrl = (wxRadioBox *) FindWindow(ID_CVG_SAMPLE); wxRadioBox *compressionCtrl = (wxRadioBox *) FindWindow(ID_CVG_COMPRESSION); wxSpinCtrl *bandCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_BANDS); switch (sampleCtrl->GetSelection()) { case 0: SampleType = RL2_SAMPLE_1_BIT; break; case 1: SampleType = RL2_SAMPLE_2_BIT; break; case 2: SampleType = RL2_SAMPLE_4_BIT; break; case 3: SampleType = RL2_SAMPLE_INT8; break; case 4: SampleType = RL2_SAMPLE_UINT8; is_8_bit = true; break; case 5: SampleType = RL2_SAMPLE_INT16; break; case 6: SampleType = RL2_SAMPLE_UINT16; is_16_bit = true; break; case 7: SampleType = RL2_SAMPLE_INT32; break; case 8: SampleType = RL2_SAMPLE_UINT32; break; case 9: SampleType = RL2_SAMPLE_FLOAT; break; case 10: SampleType = RL2_SAMPLE_DOUBLE; break; }; num_bands = bandCtrl->GetValue(); if (pixelCtrl->GetSelection() == 3) { // RGB pixel if (is_8_bit) { compressionCtrl->Enable(3, true); compressionCtrl->Enable(4, true); compressionCtrl->Enable(5, true); } else { compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); } if (is_8_bit) { if (compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } else { if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 4 || compressionCtrl->GetSelection() == 5 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } } if (pixelCtrl->GetSelection() == 4) { // MULTIBAND pixel if (num_bands == 3 || num_bands == 4) { compressionCtrl->Enable(2, true); if (is_8_bit) { compressionCtrl->Enable(4, true); compressionCtrl->Enable(5, true); } else { compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); } compressionCtrl->Enable(6, true); compressionCtrl->Enable(7, true); compressionCtrl->Enable(8, true); if (is_8_bit) { if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } else { if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 4 || compressionCtrl->GetSelection() == 5 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } } else { compressionCtrl->Enable(2, false); compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); compressionCtrl->Enable(6, false); compressionCtrl->Enable(7, false); compressionCtrl->Enable(8, false); if (compressionCtrl->GetSelection() == 12 || compressionCtrl->GetSelection() == 0 || compressionCtrl->GetSelection() == 1) ; else compressionCtrl->SetSelection(0); } } if (pixelCtrl->GetSelection() == 5) { // DATAGRID pixel if (is_8_bit || is_16_bit) { compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, true); compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); compressionCtrl->Enable(6, true); compressionCtrl->Enable(7, true); compressionCtrl->Enable(8, true); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 4 || compressionCtrl->GetSelection() == 5 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } else { compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, false); compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); compressionCtrl->Enable(6, false); compressionCtrl->Enable(7, false); compressionCtrl->Enable(8, false); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (compressionCtrl->GetSelection() == 12 || compressionCtrl->GetSelection() == 0 || compressionCtrl->GetSelection() == 1) ; else compressionCtrl->SetSelection(0); } } } void CreateRasterCoverageDialog:: OnCompressionChanged(wxCommandEvent & WXUNUSED(event)) { // // Compression selection changed // bool lossy = false; wxRadioBox *compressionCtrl = (wxRadioBox *) FindWindow(ID_CVG_COMPRESSION); wxSpinCtrl *qualityCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_QUALITY); switch (compressionCtrl->GetSelection()) { case 0: Compression = RL2_COMPRESSION_DEFLATE; break; case 1: Compression = RL2_COMPRESSION_LZMA; break; case 2: Compression = RL2_COMPRESSION_PNG; break; case 3: Compression = RL2_COMPRESSION_JPEG; lossy = true; break; case 4: Compression = RL2_COMPRESSION_LOSSY_WEBP; lossy = true; break; case 5: Compression = RL2_COMPRESSION_LOSSLESS_WEBP; break; case 6: Compression = RL2_COMPRESSION_LOSSY_JP2; lossy = true; break; case 7: Compression = RL2_COMPRESSION_LOSSLESS_JP2; break; case 8: Compression = RL2_COMPRESSION_CHARLS; break; case 9: Compression = RL2_COMPRESSION_CCITTFAX4; break; case 10: Compression = RL2_COMPRESSION_DEFLATE_NO; break; case 11: Compression = RL2_COMPRESSION_LZMA_NO; break; case 12: Compression = RL2_COMPRESSION_NONE; break; }; if (lossy) { if (qualityCtrl->GetValue() == 100) { if (Compression == RL2_COMPRESSION_LOSSY_JP2) qualityCtrl->SetValue(25); else qualityCtrl->SetValue(80); } qualityCtrl->Enable(true); } else { qualityCtrl->SetValue(100); qualityCtrl->Enable(false); } } void CreateRasterCoverageDialog:: OnNumBandsChanged(wxCommandEvent & WXUNUSED(event)) { // // NumBands changed // bool is_8_bit = false; bool is_16_bit = false; wxRadioBox *compressionCtrl = (wxRadioBox *) FindWindow(ID_CVG_COMPRESSION); wxRadioBox *sampleCtrl = (wxRadioBox *) FindWindow(ID_CVG_SAMPLE); wxSpinCtrl *bandsCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_BANDS); wxSpinCtrl *redBand = (wxSpinCtrl *) FindWindow(ID_CVG_RED); wxSpinCtrl *greenBand = (wxSpinCtrl *) FindWindow(ID_CVG_GREEN); wxSpinCtrl *blueBand = (wxSpinCtrl *) FindWindow(ID_CVG_BLUE); wxSpinCtrl *nirBand = (wxSpinCtrl *) FindWindow(ID_CVG_NIR); unsigned char num_bands = bandsCtrl->GetValue(); if (sampleCtrl->GetSelection() == 4) is_8_bit = true; if (sampleCtrl->GetSelection() == 6) is_16_bit = true; redBand->SetRange(-1, num_bands - 1); if (RedBand >= 0 && RedBand < num_bands) redBand->SetValue(RedBand); else { RedBand = -1; redBand->SetValue(-1); } greenBand->SetRange(-1, num_bands - 1); if (GreenBand >= 0 && GreenBand < num_bands) greenBand->SetValue(GreenBand); else { GreenBand = -1; greenBand->SetValue(-1); } blueBand->SetRange(-1, num_bands - 1); if (BlueBand >= 0 && BlueBand < num_bands) blueBand->SetValue(BlueBand); else { BlueBand = -1; blueBand->SetValue(-1); } nirBand->SetRange(-1, num_bands - 1); if (NIRband >= 0 && NIRband < num_bands) nirBand->SetValue(NIRband); else { NIRband = -1; nirBand->SetValue(-1); } if (num_bands == 3 || num_bands == 4) { compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, true); compressionCtrl->Enable(3, false); if (is_8_bit) { compressionCtrl->Enable(4, true); compressionCtrl->Enable(5, true); } else { compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); } compressionCtrl->Enable(6, true); compressionCtrl->Enable(7, true); compressionCtrl->Enable(8, true); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (is_8_bit) { if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } else { if (compressionCtrl->GetSelection() == 3 || compressionCtrl->GetSelection() == 4 || compressionCtrl->GetSelection() == 5 || compressionCtrl->GetSelection() == 9) compressionCtrl->SetSelection(0); } } else { compressionCtrl->Enable(0, true); compressionCtrl->Enable(1, true); compressionCtrl->Enable(2, false); compressionCtrl->Enable(3, false); compressionCtrl->Enable(4, false); compressionCtrl->Enable(5, false); compressionCtrl->Enable(6, false); compressionCtrl->Enable(7, false); compressionCtrl->Enable(8, false); compressionCtrl->Enable(9, false); compressionCtrl->Enable(10, true); compressionCtrl->Enable(11, true); compressionCtrl->Enable(12, true); if (compressionCtrl->GetSelection() == 12 || compressionCtrl->GetSelection() == 0 || compressionCtrl->GetSelection() == 1) ; else compressionCtrl->SetSelection(0); } } void CreateRasterCoverageDialog:: OnRedBandChanged(wxCommandEvent & WXUNUSED(event)) { // // default Red Band changed // wxSpinCtrl *redCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_RED); RedBand = redCtrl->GetValue(); } void CreateRasterCoverageDialog:: OnGreenBandChanged(wxCommandEvent & WXUNUSED(event)) { // // default Green Band changed // wxSpinCtrl *greenCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_GREEN); GreenBand = greenCtrl->GetValue(); } void CreateRasterCoverageDialog:: OnBlueBandChanged(wxCommandEvent & WXUNUSED(event)) { // // default Blue Band changed // wxSpinCtrl *blueCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_BLUE); BlueBand = blueCtrl->GetValue(); } void CreateRasterCoverageDialog:: OnNIRbandChanged(wxCommandEvent & WXUNUSED(event)) { // // default NIR Band changed // wxSpinCtrl *nirCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_NIR); NIRband = nirCtrl->GetValue(); } void CreateRasterCoverageDialog:: OnAutoNDVIchanged(wxCommandEvent & WXUNUSED(event)) { // // changed Auto NDVI (on/off): // wxCheckBox *autoNDVIctrl = (wxCheckBox *) FindWindow(ID_CVG_AUTO_NDVI); if (autoNDVIctrl->IsChecked() == true) AutoNDVI = true; else AutoNDVI = false; } void CreateRasterCoverageDialog:: OnSquareTileChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Square Tile (on/off): // wxCheckBox *squareCtrl = (wxCheckBox *) FindWindow(ID_CVG_SQTILE); wxSpinCtrl *widthCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_WIDTH); wxSpinCtrl *heightCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_HEIGHT); if (squareCtrl->IsChecked() == true) { heightCtrl->SetValue(widthCtrl->GetValue()); heightCtrl->Enable(false); } else heightCtrl->Enable(true); } void CreateRasterCoverageDialog:: OnTileWidthChanged(wxCommandEvent & WXUNUSED(event)) { // // Tile Width changed // wxCheckBox *squareCtrl = (wxCheckBox *) FindWindow(ID_CVG_SQTILE); wxSpinCtrl *widthCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_WIDTH); wxSpinCtrl *heightCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_HEIGHT); int width = widthCtrl->GetValue(); if ((width % 8) != 0) { // ensuring to be am exact multiple of 8 if (width > TileWidth) TileWidth = ((width / 8) + 1) * 8; else TileWidth = (width / 8) * 8; } else TileWidth = width; widthCtrl->SetValue(TileWidth); if (squareCtrl->IsChecked() == true) { TileHeight = TileWidth; heightCtrl->SetValue(TileHeight); } } void CreateRasterCoverageDialog:: OnTileHeightChanged(wxCommandEvent & WXUNUSED(event)) { // // Tile Height changed // wxSpinCtrl *heightCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_HEIGHT); int height = heightCtrl->GetValue(); if ((height % 8) != 0) { // ensuring to be an exact multiple of 8 if (height > TileHeight) TileHeight = ((height / 8) + 1) * 8; else TileHeight = (height / 8) * 8; } else TileHeight = height; heightCtrl->SetValue(TileHeight); } void CreateRasterCoverageDialog:: OnNoGeorefChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Not Georeferenced (on/off): // wxCheckBox *norefCtrl = (wxCheckBox *) FindWindow(ID_CVG_NOREF); wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_SRID); if (norefCtrl->IsChecked() == true) { sridCtrl->SetValue(-1); sridCtrl->Enable(false); } else sridCtrl->Enable(true); } void CreateRasterCoverageDialog:: OnSameResChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Square Tile (on/off): // wxCheckBox *sameresCtrl = (wxCheckBox *) FindWindow(ID_CVG_SAME_RES); wxTextCtrl *horzCtrl = (wxTextCtrl *) FindWindow(ID_CVG_HORZ_RES); wxTextCtrl *vertCtrl = (wxTextCtrl *) FindWindow(ID_CVG_VERT_RES); if (sameresCtrl->IsChecked() == true) { vertCtrl->SetValue(horzCtrl->GetValue()); vertCtrl->Enable(false); } else vertCtrl->Enable(true); } void CreateRasterCoverageDialog:: OnHorzResChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Horz Resolution // wxCheckBox *sameresCtrl = (wxCheckBox *) FindWindow(ID_CVG_SAME_RES); wxTextCtrl *horzCtrl = (wxTextCtrl *) FindWindow(ID_CVG_HORZ_RES); wxTextCtrl *vertCtrl = (wxTextCtrl *) FindWindow(ID_CVG_VERT_RES); if (sameresCtrl->IsChecked() == true) vertCtrl->SetValue(horzCtrl->GetValue()); } void CreateRasterCoverageDialog:: OnStrictChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Mixed Resolutions (on/off): // wxCheckBox *strictCtrl = (wxCheckBox *) FindWindow(ID_CVG_STRICT_RES); wxCheckBox *mixedCtrl = (wxCheckBox *) FindWindow(ID_CVG_MIXED_RES); if (strictCtrl->IsChecked() == true) StrictResolution = true; else StrictResolution = false; if (StrictResolution) mixedCtrl->SetValue(false); } void CreateRasterCoverageDialog:: OnMixedChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Mixed Resolutions (on/off): // wxCheckBox *strictCtrl = (wxCheckBox *) FindWindow(ID_CVG_STRICT_RES); wxCheckBox *mixedCtrl = (wxCheckBox *) FindWindow(ID_CVG_MIXED_RES); if (mixedCtrl->IsChecked() == true) MixedResolutions = true; else MixedResolutions = false; if (MixedResolutions) strictCtrl->SetValue(false); } void CreateRasterCoverageDialog:: OnPathsChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Input Paths (on/off): // wxCheckBox *pathsCtrl = (wxCheckBox *) FindWindow(ID_CVG_PATHS); if (pathsCtrl->IsChecked() == true) InputPaths = true; else InputPaths = false; } void CreateRasterCoverageDialog::OnMD5Changed(wxCommandEvent & WXUNUSED(event)) { // // changed MD5 (on/off): // wxCheckBox *md5Ctrl = (wxCheckBox *) FindWindow(ID_CVG_MD5); if (md5Ctrl->IsChecked() == true) MD5 = true; else MD5 = false; } void CreateRasterCoverageDialog:: OnSummaryChanged(wxCommandEvent & WXUNUSED(event)) { // // changed XML Summary (on/off): // wxCheckBox *summaryCtrl = (wxCheckBox *) FindWindow(ID_CVG_SUMMARY); if (summaryCtrl->IsChecked() == true) Summary = true; else Summary = false; } bool CreateRasterCoverageDialog::IsValidNoData(wxString & no_data, int sample, int num_bands) { // // checking a NO-DATA value // int count = 0; int error = 0; char dummy[128]; if (no_data.Len() == 0) return true; wxStringTokenizer tokenizer(no_data, wxT(",")); while (tokenizer.HasMoreTokens()) { count++; wxString token = tokenizer.GetNextToken(); if (sample == RL2_SAMPLE_FLOAT || sample == RL2_SAMPLE_DOUBLE) { double v; if (token.ToDouble(&v) == false) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); error++; } } else { long v; if (token.ToLong(&v) == false) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); error++; } else { int err = 0; switch (sample) { case RL2_SAMPLE_1_BIT: if (v < 0 || v > 1) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); err = 1; } break; case RL2_SAMPLE_2_BIT: if (v < 0 || v > 3) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); err = 1; } break; case RL2_SAMPLE_4_BIT: if (v < 0 || v > 15) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); err = 1; } break; case RL2_SAMPLE_INT8: if (v < CHAR_MIN || v > CHAR_MAX) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); err = 1; } break; case RL2_SAMPLE_UINT8: if (v < 0 || v > UCHAR_MAX) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); err = 1; } break; case RL2_SAMPLE_INT16: if (v < SHRT_MIN || v > SHRT_MAX) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); err = 1; } break; case RL2_SAMPLE_UINT16: if (v < 0 || v > USHRT_MAX) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); err = 1; } break; case RL2_SAMPLE_INT32: if (v < INT_MIN || v > INT_MAX) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); err = 1; } break; case RL2_SAMPLE_UINT32: if (v < 0 || v > UINT_MAX) { sprintf(dummy, "#%d) ", count); wxMessageBox(wxT("NO-DATA - invalid sample value: ") + wxString::FromUTF8(dummy) + token, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); err = 1; } break; }; if (err) error++; } } } if (error) return false; if (count != num_bands) { sprintf(dummy, "expected %d, found #%d", num_bands, count); wxMessageBox(wxT("NO-DATA - invalid samples count: ") + wxString::FromUTF8(dummy), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } return true; } void CreateRasterCoverageDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_CVG_NAME); CoverageName = nameCtrl->GetValue(); if (CoverageName.Len() < 1) { wxMessageBox(wxT("You must specify the COVERAGE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (MainFrame->CoverageAlreadyExists(CoverageName) == true) { wxMessageBox(wxT("a Coverage name '") + CoverageName + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_CVG_TITLE); Title = titleCtrl->GetValue(); if (Title.Len() < 1) { wxMessageBox(wxT("You must specify some TITLE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_CVG_ABSTRACT); Abstract = absCtrl->GetValue(); if (Abstract.Len() < 1) { wxMessageBox(wxT("You must specify some ABSTRACT !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxSpinCtrl *bandsCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_BANDS); NumBands = bandsCtrl->GetValue(); if (PixelType == RL2_PIXEL_MULTIBAND && NumBands < 2) { wxMessageBox(wxT("Invalid number of Bands"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (PixelType == RL2_PIXEL_MULTIBAND) { if (RedBand >= 0) { if (RedBand >= NumBands) { wxMessageBox(wxT("Invalid default Red Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } if (GreenBand >= 0) { if (GreenBand >= NumBands) { wxMessageBox(wxT("Invalid default Green Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } if (BlueBand >= 0) { if (BlueBand >= NumBands) { wxMessageBox(wxT("Invalid default Blue Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } if (NIRband >= 0) { if (NIRband >= NumBands) { wxMessageBox(wxT("Invalid default NIR Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } if (RedBand == GreenBand) { wxMessageBox(wxT("default Red and Green are the same Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (RedBand == BlueBand) { wxMessageBox(wxT("default Red and Blue are the same Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (RedBand == NIRband) { wxMessageBox(wxT("default Red and NIR are the same Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (GreenBand == BlueBand) { wxMessageBox(wxT("default Green and Blue are the same Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (GreenBand == NIRband) { wxMessageBox(wxT("default Green and NIR are the same Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (BlueBand == NIRband) { wxMessageBox(wxT("default Blue and NIR are the same Band"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } else { RedBand = -1; GreenBand = -1; BlueBand = -1; NIRband = -1; AutoNDVI = false; } wxCheckBox *norefCtrl = (wxCheckBox *) FindWindow(ID_CVG_NOREF); if (norefCtrl->IsChecked() == true) { NotGeoreferenced = true; Srid = -1; } else { wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_SRID); Srid = sridCtrl->GetValue(); if (Srid <= 0) { wxMessageBox(wxT("You must specify some SRID value !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } else if (MainFrame->SridNotExists(Srid) == true) { wxMessageBox(wxT("invalid SRID value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } wxSpinCtrl *qtyCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_QUALITY); Quality = qtyCtrl->GetValue(); wxSpinCtrl *widthCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_WIDTH); TileWidth = widthCtrl->GetValue(); wxSpinCtrl *heightCtrl = (wxSpinCtrl *) FindWindow(ID_CVG_HEIGHT); TileHeight = heightCtrl->GetValue(); wxTextCtrl *horzCtrl = (wxTextCtrl *) FindWindow(ID_CVG_HORZ_RES); wxString v = horzCtrl->GetValue(); if (v.ToDouble(&HorzResolution) == false) { wxMessageBox(wxT("invalid HORIZONTAL resolution value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (HorzResolution <= 0.0) { wxMessageBox(wxT("HORIZONTAL resolution should be a positive value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *vertCtrl = (wxTextCtrl *) FindWindow(ID_CVG_VERT_RES); v = vertCtrl->GetValue(); if (v.ToDouble(&VertResolution) == false) { wxMessageBox(wxT("invalid VERTICAL resolution value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (VertResolution <= 0.0) { wxMessageBox(wxT("VERTICAL resolution should be a positive value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *ndCtrl = (wxTextCtrl *) FindWindow(ID_CVG_NODATA); NoData = ndCtrl->GetValue(); if (IsValidNoData(NoData, SampleType, NumBands) == false) return; wxCheckBox *strictCtrl = (wxCheckBox *) FindWindow(ID_CVG_STRICT_RES); if (strictCtrl->IsChecked() == true) StrictResolution = true; else StrictResolution = false; wxCheckBox *mixedCtrl = (wxCheckBox *) FindWindow(ID_CVG_MIXED_RES); if (mixedCtrl->IsChecked() == true) MixedResolutions = true; else MixedResolutions = false; wxCheckBox *pathsCtrl = (wxCheckBox *) FindWindow(ID_CVG_PATHS); if (pathsCtrl->IsChecked() == true) InputPaths = true; else InputPaths = false; wxCheckBox *md5Ctrl = (wxCheckBox *) FindWindow(ID_CVG_MD5); if (md5Ctrl->IsChecked() == true) MD5 = true; else MD5 = false; wxCheckBox *summaryCtrl = (wxCheckBox *) FindWindow(ID_CVG_SUMMARY); if (summaryCtrl->IsChecked() == true) Summary = true; else Summary = false; wxDialog::EndModal(wxID_OK); return; end: wxDialog::EndModal(wxID_CANCEL); } bool ImportRasterDialog::Create(MyFrame * parent, wxString & coverage, wxArrayString & paths, wxString & path, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression, int srid) { // // creating the dialog // MainFrame = parent; CoverageName = coverage; Paths = paths; Path = path; Title = title; Abstract = abstract; Sample = sample; Pixel = pixel; Compression = compression; Srid = srid; ForceSrid = false; WithWorldFile = false; Pyramidize = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Loading external files into a Raster Coverage")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ImportRasterDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Coverage Name wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("Coverage &Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the Coverage Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, wxID_ANY, Title, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the Coverage Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, wxID_ANY, Abstract, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the Sample Type wxBoxSizer *sampleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sampleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *sampleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Sample Type:")); sampleSizer->Add(sampleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(this, wxID_ANY, Sample, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); sampleSizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fifth row: the Pixel Type wxBoxSizer *pixelSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pixelSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pixelLabel = new wxStaticText(this, wxID_STATIC, wxT("&Pixel Type:")); pixelSizer->Add(pixelLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pixelCtrl = new wxTextCtrl(this, wxID_ANY, Pixel, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); pixelSizer->Add(pixelCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // sixth row: the Compression Type wxBoxSizer *comprSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(comprSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *comprLabel = new wxStaticText(this, wxID_STATIC, wxT("&Compression:")); comprSizer->Add(comprLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *comprCtrl = new wxTextCtrl(this, wxID_ANY, Compression, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); comprSizer->Add(comprCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // seventh row: files to be imported wxBoxSizer *fileSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(fileSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *fileLabel = new wxStaticText(this, wxID_STATIC, wxT("Import &File(s):")); fileSizer->Add(fileLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *filesCtrl = new wxTextCtrl(this, wxID_ANY, Path, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); fileSizer->Add(filesCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // eighth row: Import Options int space_sz = 35; wxBoxSizer *optBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(optBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *optBox = new wxStaticBox(this, wxID_STATIC, wxT("Import Options"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxHORIZONTAL); optBoxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); optSizer->Add(sridSizer, 0, wxALIGN_LEFT | wxALL, 0); optSizer->AddSpacer(space_sz); wxCheckBox *forceSridCtrl = new wxCheckBox(this, ID_LOAD_FORCE_SRID, wxT("Forced SRID value"), wxDefaultPosition, wxDefaultSize); forceSridCtrl->SetValue(false); sridSizer->Add(forceSridCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_LOAD_SRID, wxEmptyString, wxDefaultPosition, wxSize(60, 20), wxSP_ARROW_KEYS, -1, 1000000, Srid); sridCtrl->Enable(false); sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxCheckBox *worldCtrl = new wxCheckBox(this, ID_LOAD_WITH_WORLDFILE, wxT("With WorldFile support"), wxDefaultPosition, wxDefaultSize); worldCtrl->SetValue(false); optSizer->Add(worldCtrl, 0, wxALIGN_LEFT | wxALL, 5); optSizer->AddSpacer(space_sz); wxCheckBox *pyrCtrl = new wxCheckBox(this, ID_LOAD_PYRAMIDIZE, wxT ("Immediately build Section Pyramids"), wxDefaultPosition, wxDefaultSize); pyrCtrl->SetValue(false); optSizer->Add(pyrCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxTextCtrl *doneCtrl = new wxTextCtrl(this, ID_LOAD_LIST_DONE, ListDone, wxDefaultPosition, wxSize(650, 100), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2); optBoxSizer->Add(doneCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Import")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *abort = new wxButton(this, ID_LOAD_ABORT, wxT("&Abort")); abort->Enable(false); okCancelBox->Add(abort, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ImportRasterDialog::OnOk); Connect(ID_LOAD_ABORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ImportRasterDialog::OnCmdAbort); Connect(ID_LOAD_FORCE_SRID, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ImportRasterDialog::OnCmdForceSridChanged); Connect(ID_LOAD_RASTER_START, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ImportRasterDialog::OnRequestStart); Connect(ID_LOAD_RASTER_STOP, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ImportRasterDialog::OnRequestStop); Connect(ID_LOAD_RASTER_THREAD_FINISHED, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ImportRasterDialog::OnThreadFinished); } void ImportRasterDialog::OnCmdForceSridChanged(wxCommandEvent & WXUNUSED(event)) { // // Force SRID selection changed // wxCheckBox *forceSridCtrl = (wxCheckBox *) FindWindow(ID_LOAD_FORCE_SRID); wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_LOAD_SRID); if (forceSridCtrl->IsChecked() == true) { sridCtrl->SetValue(Srid); sridCtrl->Enable(true); } else sridCtrl->Enable(false); } void ImportRasterDialog::OnCmdAbort(wxCommandEvent & WXUNUSED(event)) { // // aborting the Raster Import process // if (Params.IsAbortPending() == true) return; Params.RequestAbort(); wxString report = wxT("\nan ABORT request is now pending and will be accepted ASAP"); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_LIST_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(192, 0, 0); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(report); } void ImportRasterDialog::OnRequestStart(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_LIST_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(0, 0, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(msg); doneCtrl->MarkDirty(); } void ImportRasterDialog::OnRequestStop(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_LIST_DONE); ListDone += msg; doneCtrl->Clear(); wxColour fore = wxColour(0, 0, 0); wxColour back = wxColour(255, 255, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(ListDone); doneCtrl->MarkDirty(); } #ifdef _WIN32 DWORD WINAPI DoExecuteRasterLoad(void *arg) #else void *DoExecuteRasterLoad(void *arg) #endif { // // threaded function: processing a Raster Import operation // RasterLoadParams *params = (RasterLoadParams *) arg; const char *sql; int ret; sqlite3_stmt *stmt = NULL; int count = params->GetPathsCount(); int i; clock_t clock_start; clock_t clock_end; double seconds; char elapsed[64]; char ordinal[64]; wxString report; wxString path; wxCommandEvent evt_start(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_RASTER_START); wxCommandEvent evt_stop(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_RASTER_STOP); sql = "SELECT RL2_LoadRaster(?, ?, ?, ?, ?, 1)"; ret = sqlite3_prepare_v2(params->GetMainFrame()->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { params->SetError(); goto error; } for (i = 0; i < count; i++) { // loading each Raster File if (params->IsAbortPending() == true) { report = wxT("STOP .... aborted by the user !!!!"); evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); break; } path = params->GetPathByIndex(i); params->SetCurrentPath(path); report = wxT("Loading: ") + path; evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); clock_start = clock(); if (params->GetMainFrame()->DoImportRaster (stmt, params->GetCoverageName(), path, params->GetSrid(), params->IsWithWorldFile(), params->IsPyramidize()) != true) { params->SetError(); goto error; } clock_end = clock(); seconds = (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC; MyResultSetView::FormatElapsedTime(seconds, elapsed); sprintf(ordinal, "done %d/%d: ", i + 1, count); report = wxString::FromUTF8(ordinal) + path + wxT(" [") + wxString::FromUTF8(elapsed) + wxT("]\n"); evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->Done(); } sqlite3_finalize(stmt); goto end; error: sqlite3_finalize(stmt); report = wxT("FAILED: ") + path; evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->SetError(); end: wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_RASTER_THREAD_FINISHED); params->GetDlg()->GetEventHandler()->AddPendingEvent(event); #ifdef _WIN32 return 0; #else pthread_exit(NULL); #endif } void ImportRasterDialog::OnThreadFinished(wxCommandEvent & WXUNUSED(event)) { // resuming execution when the Import Raster thread quits ::wxEndBusyCursor(); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); quitBtn->Enable(true); abortBtn->Enable(false); if (Params.GetError() == true) { char dummy[80]; sprintf(dummy, "%d Raster files have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nA fatal error occurred while loading:\n") + Params.GetCurrentPath(), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else if (Params.IsAbortPending() == true) { char dummy[80]; sprintf(dummy, "%d Raster files have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nStopped by an Abort user request"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } else { char dummy[80]; sprintf(dummy, "%d Raster files have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } void ImportRasterDialog::DoRunLoad() { // // executing the Load Raster(s) process in a separate Thread // #ifdef _WIN32 HANDLE thread_handle; DWORD dwThreadId; #else pthread_t thread_id; #endif Params.Initialize(MainFrame, this, CoverageName, Paths, Srid, WithWorldFile, Pyramidize); #ifdef _WIN32 thread_handle = CreateThread(NULL, 0, DoExecuteRasterLoad, &Params, 0, &dwThreadId); SetThreadPriority(thread_handle, THREAD_PRIORITY_IDLE); #else int ok_prior = 0; int policy; int min_prio; pthread_attr_t attr; struct sched_param sp; pthread_attr_init(&attr); if (pthread_attr_setschedpolicy(&attr, SCHED_RR) == 0) { // attempting to set the lowest priority if (pthread_attr_getschedpolicy(&attr, &policy) == 0) { min_prio = sched_get_priority_min(policy); sp.sched_priority = min_prio; if (pthread_attr_setschedparam(&attr, &sp) == 0) { // ok, setting the lowest priority ok_prior = 1; pthread_create(&thread_id, &attr, DoExecuteRasterLoad, &Params); } } } if (!ok_prior) { // failure: using standard priority pthread_create(&thread_id, NULL, DoExecuteRasterLoad, &Params); } #endif } void ImportRasterDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxCheckBox *forceSridCtrl = (wxCheckBox *) FindWindow(ID_LOAD_FORCE_SRID); wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_LOAD_SRID); wxCheckBox *worldCtrl = (wxCheckBox *) FindWindow(ID_LOAD_WITH_WORLDFILE); wxCheckBox *pyramidCtrl = (wxCheckBox *) FindWindow(ID_LOAD_PYRAMIDIZE); wxButton *loadBtn = (wxButton *) FindWindow(wxID_OK); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); if (forceSridCtrl->IsChecked() == true) { ForceSrid = true; Srid = sridCtrl->GetValue(); } else { ForceSrid = false; Srid = -1; } if (worldCtrl->IsChecked() == true) WithWorldFile = true; else WithWorldFile = false; if (pyramidCtrl->IsChecked() == true) Pyramidize = true; else Pyramidize = false; forceSridCtrl->Enable(false); sridCtrl->Enable(false); worldCtrl->Enable(false); pyramidCtrl->Enable(false); loadBtn->Enable(false); quitBtn->Enable(false); abortBtn->Enable(true); ::wxBeginBusyCursor(); DoRunLoad(); } bool PyramidizeDialog::Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression) { // // creating the dialog // MainFrame = parent; CoverageName = coverage; Title = title; Abstract = abstract; Sample = sample; Pixel = pixel; Compression = compression; if (wxDialog::Create(parent, wxID_ANY, wxT ("Building MultiResolution Pyramid Levels (by Section)")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void PyramidizeDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Coverage Name wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("Coverage &Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the Coverage Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, wxID_ANY, Title, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the Coverage Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, wxID_ANY, Abstract, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the Sample Type wxBoxSizer *sampleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sampleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *sampleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Sample Type:")); sampleSizer->Add(sampleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(this, wxID_ANY, Sample, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); sampleSizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fifth row: the Pixel Type wxBoxSizer *pixelSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pixelSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pixelLabel = new wxStaticText(this, wxID_STATIC, wxT("&Pixel Type:")); pixelSizer->Add(pixelLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pixelCtrl = new wxTextCtrl(this, wxID_ANY, Pixel, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); pixelSizer->Add(pixelCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // sixth row: the Compression Type wxBoxSizer *comprSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(comprSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *comprLabel = new wxStaticText(this, wxID_STATIC, wxT("&Compression:")); comprSizer->Add(comprLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *comprCtrl = new wxTextCtrl(this, wxID_ANY, Compression, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); comprSizer->Add(comprCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // seventh row, mode force all wxString mode[2]; mode[0] = wxT("&Only build missing Section Pyramids"); mode[1] = wxT("&Unconditionally re-build all Section Pyramids"); wxRadioBox *modeBox = new wxRadioBox(this, ID_PYRAMID_MODE, wxT("&Mode selection"), wxDefaultPosition, wxDefaultSize, 2, mode, 1, wxRA_SPECIFY_COLS); boxSizer->Add(modeBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); modeBox->SetSelection(0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Pyramidize")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & PyramidizeDialog::OnOk); } bool PyramidizeDialog::DoPyramidize() { // // Building Section Pyramid levels */ // int ret; bool force = false; wxRadioBox *mode = (wxRadioBox *) FindWindow(ID_PYRAMID_MODE); if (mode->GetSelection() == 1) force = true; ::wxBeginBusyCursor(); ret = rl2_build_all_section_pyramids(MainFrame->GetSqlite(), MainFrame->GetRL2MaxThreads(), CoverageName.ToUTF8(), force, 1); ::wxEndBusyCursor(); if (ret == RL2_OK) return true; else return false; } void PyramidizeDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // if (DoPyramidize() == true) wxMessageBox(wxT ("Section Pyramids successfully built on Raster Coverage \"") + CoverageName + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("Failure: some unexpected error occurred"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); wxDialog::EndModal(wxID_CANCEL); } bool PyramidizeMonolithicDialog::Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression) { // // creating the dialog // MainFrame = parent; CoverageName = coverage; Title = title; Abstract = abstract; Sample = sample; Pixel = pixel; Compression = compression; if (wxDialog::Create(parent, wxID_ANY, wxT ("Building MultiResolution Pyramid Levels (Monolithic)")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void PyramidizeMonolithicDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Coverage Name wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("Coverage &Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the Coverage Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, wxID_ANY, Title, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the Coverage Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, wxID_ANY, Abstract, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the Sample Type wxBoxSizer *sampleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sampleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *sampleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Sample Type:")); sampleSizer->Add(sampleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(this, wxID_ANY, Sample, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); sampleSizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fifth row: the Pixel Type wxBoxSizer *pixelSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pixelSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pixelLabel = new wxStaticText(this, wxID_STATIC, wxT("&Pixel Type:")); pixelSizer->Add(pixelLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pixelCtrl = new wxTextCtrl(this, wxID_ANY, Pixel, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); pixelSizer->Add(pixelCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // sixth row: the Compression Type wxBoxSizer *comprSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(comprSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *comprLabel = new wxStaticText(this, wxID_STATIC, wxT("&Compression:")); comprSizer->Add(comprLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *comprCtrl = new wxTextCtrl(this, wxID_ANY, Compression, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); comprSizer->Add(comprCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // seventh row, mode force all wxString mode[3]; mode[0] = wxT("All Pyramid Levels are &Physical, there are no Virtual Levels"); mode[1] = wxT("Interleave-1: every Physical Level supports a &Virtual Level"); mode[2] = wxT("Interleave-2: every Physical Level supports &two Virtual Levels"); wxRadioBox *modeBox = new wxRadioBox(this, ID_PYRAMID_MODE, wxT("&Mode selection"), wxDefaultPosition, wxDefaultSize, 3, mode, 1, wxRA_SPECIFY_COLS); boxSizer->Add(modeBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); if (Sample == wxT("1-BIT") || Sample == wxT("2-BIT") || Sample == wxT("4-BIT")) modeBox->SetSelection(0); else modeBox->SetSelection(2); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Pyramidize")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & PyramidizeMonolithicDialog::OnOk); } bool PyramidizeMonolithicDialog::DoPyramidizeMonolithic() { // // Building Monolithic Pyramid levels */ // int ret; int num_levels = 0; wxRadioBox *mode = (wxRadioBox *) FindWindow(ID_PYRAMID_MODE); if (mode->GetSelection() == 0) num_levels = 1; if (mode->GetSelection() == 1) num_levels = 2; if (mode->GetSelection() == 2) num_levels = 3; ::wxBeginBusyCursor(); ret = rl2_build_monolithic_pyramid(MainFrame->GetSqlite(), CoverageName.ToUTF8(), num_levels, 1); ::wxEndBusyCursor(); if (ret == RL2_OK) return true; else return false; } void PyramidizeMonolithicDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // // if (DoPyramidizeMonolithic() == true) wxMessageBox(wxT ("Monolithic Pyramid successfully built on Raster Coverage \"") + CoverageName + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("Failure: some unexpected error occurred"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); wxDialog::EndModal(wxID_CANCEL); } bool DePyramidizeDialog::Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression) { // // creating the dialog // MainFrame = parent; CoverageName = coverage; Title = title; Abstract = abstract; Sample = sample; Pixel = pixel; Compression = compression; if (wxDialog::Create(parent, wxID_ANY, wxT("Removing MultiResolution Pyramid Levels")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void DePyramidizeDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Coverage Name wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("Coverage &Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the Coverage Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, wxID_ANY, Title, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the Coverage Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, wxID_ANY, Abstract, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the Sample Type wxBoxSizer *sampleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sampleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *sampleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Sample Type:")); sampleSizer->Add(sampleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(this, wxID_ANY, Sample, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); sampleSizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fifth row: the Pixel Type wxBoxSizer *pixelSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pixelSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pixelLabel = new wxStaticText(this, wxID_STATIC, wxT("&Pixel Type:")); pixelSizer->Add(pixelLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pixelCtrl = new wxTextCtrl(this, wxID_ANY, Pixel, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); pixelSizer->Add(pixelCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // sixth row: the Compression Type wxBoxSizer *comprSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(comprSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *comprLabel = new wxStaticText(this, wxID_STATIC, wxT("&Compression:")); comprSizer->Add(comprLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *comprCtrl = new wxTextCtrl(this, wxID_ANY, Compression, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); comprSizer->Add(comprCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // seventh row: confirm message wxBoxSizer *msgSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(msgSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 10); wxString confirm = wxT ("All multi-resolution Pyramid Levels supporting this Raster Coverage will be irreversibly destroyed"); wxStaticText *msg1Label = new wxStaticText(this, wxID_STATIC, confirm); msgSizer->Add(msg1Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); confirm = wxT("Do you really confirm De-Pyramidizing the Raster Coverage ?"); wxStaticText *msg2Label = new wxStaticText(this, wxID_STATIC, confirm); msgSizer->Add(msg2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&DePyramidize")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DePyramidizeDialog::OnOk); } bool DePyramidizeDialog::DoDePyramidize() { // // Deleting all Pyramid levels */ // int ret; ::wxBeginBusyCursor(); ret = rl2_delete_all_pyramids(MainFrame->GetSqlite(), CoverageName.ToUTF8()); ::wxEndBusyCursor(); if (ret == RL2_OK) return true; else return false; } void DePyramidizeDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // if (DoDePyramidize() == true) wxMessageBox(wxT ("Pyramid Levels successfully removed from Raster Coverage \"") + CoverageName + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("Failure: some unexpected error occurred"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); wxDialog::EndModal(wxID_CANCEL); } bool RasterDropDialog::Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression) { // // creating the dialog // MainFrame = parent; CoverageName = coverage; Title = title; Abstract = abstract; Sample = sample; Pixel = pixel; Compression = compression; if (wxDialog::Create(parent, wxID_ANY, wxT("Drop Raster Coverage")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterDropDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Coverage Name wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("Coverage &Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the Coverage Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, wxID_ANY, Title, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the Coverage Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, wxID_ANY, Abstract, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the Sample Type wxBoxSizer *sampleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sampleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *sampleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Sample Type:")); sampleSizer->Add(sampleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(this, wxID_ANY, Sample, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); sampleSizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fifth row: the Pixel Type wxBoxSizer *pixelSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pixelSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pixelLabel = new wxStaticText(this, wxID_STATIC, wxT("&Pixel Type:")); pixelSizer->Add(pixelLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pixelCtrl = new wxTextCtrl(this, wxID_ANY, Pixel, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); pixelSizer->Add(pixelCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // sixth row: the Compression Type wxBoxSizer *comprSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(comprSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *comprLabel = new wxStaticText(this, wxID_STATIC, wxT("&Compression:")); comprSizer->Add(comprLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *comprCtrl = new wxTextCtrl(this, wxID_ANY, Compression, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); comprSizer->Add(comprCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // seventh row: confirm message wxBoxSizer *msgSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(msgSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 10); wxString confirm = wxT ("This Raster Coverage will be completely and irreversibly removed from the DBMS"); wxStaticText *msg1Label = new wxStaticText(this, wxID_STATIC, confirm); msgSizer->Add(msg1Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); confirm = wxT("Do you really confirm dropping the Raster Coverage ?"); wxStaticText *msg2Label = new wxStaticText(this, wxID_STATIC, confirm); msgSizer->Add(msg2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Drop")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterDropDialog::OnOk); } bool RasterDropDialog::DoDropCoverage() { // // Dropping a Raster Coverage // rl2CoveragePtr cvg = NULL; ::wxBeginBusyCursor(); cvg = rl2_create_coverage_from_dbms(MainFrame->GetSqlite(), CoverageName.ToUTF8()); if (cvg == NULL) goto error; if (rl2_drop_dbms_coverage(MainFrame->GetSqlite(), CoverageName.ToUTF8()) != RL2_OK) goto error; rl2_destroy_coverage(cvg); ::wxEndBusyCursor(); return true; error: if (cvg != NULL) rl2_destroy_coverage(cvg); ::wxEndBusyCursor(); return false; } void RasterDropDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // if (DoDropCoverage() == true) wxMessageBox(wxT("Raster Coverage \"") + CoverageName + wxT("\" successfully removed from the DBMS\n\n") + wxT ("You could now eventually consider to execute VACUUM in order to reclaim the unused disk space."), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("Failure: some unexpected error occurred"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); wxDialog::EndModal(wxID_CANCEL); } bool VectorUnregisterDialog::Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & type) { // // creating the dialog // MainFrame = parent; CoverageName = coverage; Title = title; Abstract = abstract; Type = type; if (wxDialog::Create(parent, wxID_ANY, wxT("Unregister Vector Coverage")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void VectorUnregisterDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Coverage Name wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("Coverage &Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the Coverage Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, wxID_ANY, Title, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the Coverage Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, wxID_ANY, Abstract, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the Geometry Type wxBoxSizer *sampleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sampleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *sampleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Geometry Type:")); sampleSizer->Add(sampleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(this, wxID_ANY, Type, wxDefaultPosition, wxSize(600, 22), wxTE_READONLY); sampleSizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // seventh row: confirm message wxBoxSizer *msgSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(msgSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 10); wxString confirm = wxT ("This Vector Coverage will be UnRegistered preserving the underlying Spatial Table"); wxStaticText *msg1Label = new wxStaticText(this, wxID_STATIC, confirm); msgSizer->Add(msg1Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); confirm = wxT("Do you really confirm unregistering the Vector Coverage ?"); wxStaticText *msg2Label = new wxStaticText(this, wxID_STATIC, confirm); msgSizer->Add(msg2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&UnRegister")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorUnregisterDialog::OnOk); } bool VectorUnregisterDialog::DoVectorUnregister() { // // UnRegistering a Vector Coverage // sqlite3_stmt *stmt = NULL; int valid = 0; ::wxBeginBusyCursor(); const char *sql = "SELECT SE_UnRegisterVectorStyle(?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) goto error; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else goto error; } sqlite3_finalize(stmt); stmt = NULL; if (!valid) goto error; ::wxEndBusyCursor(); return true; error: ::wxEndBusyCursor(); return false; } void VectorUnregisterDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // if (DoVectorUnregister() == true) wxMessageBox(wxT("Vector Coverage \"") + CoverageName + wxT("\" successfully UnRegistered."), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("Failure: some unexpected error occurred"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); wxDialog::EndModal(wxID_CANCEL); } spatialite_gui-2.0.0-devel/config.sub0000775000175000017500000010316712543275035014535 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: spatialite_gui-2.0.0-devel/Shapefiles.cpp0000664000175000017500000030160612544026240015330 00000000000000/* / Shapefiles.cpp / methods related to Shapefile loading and saving / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #if defined(_WIN32) && !defined(__MINGW32__) #define strcasecmp _stricmp #endif void MyFrame::CleanTxtTab(char *buf) { // well-formatting a string to be used as a Txt/Tab string char tmp[65536]; char *in = tmp; char *out = buf; strcpy(tmp, buf); while (*in != '\0') { if (*in == '\t' || *in == '\r' || *in == '\n') { in++; *out++ = ' '; } else *out++ = *in++; } *out = '\0'; } void MyFrame::CleanCsv(char *buf) { // well-formatting a string to be used as a Csv string char tmp[65536]; char *in = tmp; char *out = buf; bool special = false; strcpy(tmp, buf); while (*in != '\0') { if (*in == ',' || *in == '\r' || *in == '\n') special = true; if (*in == '"') *out++ = '"'; *out++ = *in++; } *out = '\0'; if (special == true) { sprintf(tmp, "\"%s\"", buf); strcpy(buf, tmp); } } void MyFrame::CleanHtml(char *buf) { // well-formatting a string to be used as an Html string char tmp[65536]; char *in = tmp; char *out = buf; strcpy(tmp, buf); while (*in != '\0') { if (*in == '<') { *out++ = '&'; *out++ = 'l'; *out++ = 't'; *out++ = ';'; in++; continue; } if (*in == '>') { *out++ = '&'; *out++ = 'g'; *out++ = 't'; *out++ = ';'; in++; continue; } if (*in == ' ') { *out++ = '&'; *out++ = 'n'; *out++ = 'b'; *out++ = 's'; *out++ = 'p'; *out++ = ';'; in++; continue; } if (*in == '"') { *out++ = '&'; *out++ = 'q'; *out++ = 'u'; *out++ = 'o'; *out++ = 't'; *out++ = ';'; in++; continue; } if (*in == '&') { *out++ = '&'; *out++ = 'a'; *out++ = 'm'; *out++ = 'p'; *out++ = ';'; in++; continue; } *out++ = *in++; } *out = '\0'; } bool MyFrame::TableAlreadyExists(wxString & name) { // // checks if a table of this name already exists // char **results; int rows; int columns; int i; char *errMsg = NULL; bool already_exists = false; char xname[1024]; wxString sql = wxT ("SELECT name FROM sqlite_master WHERE type = 'table' AND Lower(name) = Lower('"); strcpy(xname, name.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) already_exists = true; } sqlite3_free_table(results); return already_exists; } bool MyFrame::CoverageAlreadyExists(wxString & name) { // // checks if a Raster Coverage of this name already exists // wxString table = name + wxT("_levels"); if (TableAlreadyExists(table) == true) return true; table = name + wxT("_sections"); if (TableAlreadyExists(table) == true) return true; table = name + wxT("_tile_data"); if (TableAlreadyExists(table) == true) return true; table = name + wxT("_tiles"); if (TableAlreadyExists(table) == true) return true; table = name + wxT("_section_levels"); if (TableAlreadyExists(table) == true) return true; return false; } bool MyFrame::SridNotExists(int srid) { // // checks if a SRID value is a valid one // char **results; int rows; int columns; int i; char *errMsg = NULL; bool constrained = false; bool not_exists = true; wxString RefSysName; char xsql[128]; wxString sql = wxT ("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'spatial_ref_sys'"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) constrained = true; } sqlite3_free_table(results); if (constrained == false) return false; sprintf(xsql, "SELECT ref_sys_name FROM spatial_ref_sys WHERE srid = %d", srid); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) not_exists = false; } sqlite3_free_table(results); return not_exists; } bool MyFrame::CheckMetadata() { // // checking if METADATA tables are defined // char **results; int rows; int columns; int i; char *errMsg = NULL; bool constrained = false; if (IsConnected() == false) return false; if (SpatiaLiteMetadata == false) return false; wxString sql = wxT ("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'geometry_columns'"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) constrained = true; } sqlite3_free_table(results); return constrained; } bool MyFrame::CheckMetadata(wxString & dbAlias) { // // checking if METADATA tables are defined [Attached DB] // char **results; int rows; int columns; int i; char *errMsg = NULL; bool constrained = false; if (IsConnected() == false) return false; wxString sql = wxT("SELECT name FROM ") + dbAlias; sql += wxT(".sqlite_master WHERE type = 'table' AND name = 'geometry_columns'"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) constrained = true; } sqlite3_free_table(results); return constrained; } void MyFrame::CleanSqlString(char *value) { // // returns a well formatted TEXT value for SQL // 1] strips trailing spaces // 2] masks any ' inside the string, appending another ' // char new_value[65536]; char *p; int len; int i; len = strlen(value); for (i = (len - 1); i >= 0; i--) { // stripping trailing spaces if (value[i] == ' ') value[i] = '\0'; else break; } p = new_value; for (i = 0; i < len; i++) { if (value[i] == '\'') *(p++) = '\''; *(p++) = value[i]; } *p = '\0'; strcpy(value, new_value); } gaiaDbfFieldPtr MyFrame::GetDbfField(gaiaDbfListPtr list, int index) { // // find a DBF attribute by name // int count = 0; gaiaDbfFieldPtr fld = list->First; while (fld) { if (count == index) return fld; count++; fld = fld->Next; } return NULL; } void MyFrame::OutputPrjFile(wxString & path, int srid) { // // exporting [if possible] a .PRJ file // char **results; int rows; int columns; int i; char *errMsg = NULL; char sql[1024]; int ret; bool rs_srid = false; bool rs_srs_wkt = false; bool rs_srtext = false; bool is_srs = false; const char *name; wxString srsWkt; char dummy[8192]; // step I: checking if the SRS_WKT column actually exists ret = sqlite3_get_table(SqliteHandle, "PRAGMA table_info(spatial_ref_sys)", &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("dump shapefile error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (strcasecmp(name, "srid") == 0) rs_srid = true; if (strcasecmp(name, "srs_wkt") == 0) rs_srs_wkt = true; if (strcasecmp(name, "srtext") == 0) rs_srtext = true; } } sqlite3_free_table(results); if (rs_srs_wkt == true || rs_srtext == true) is_srs = true; if (rs_srid == false || is_srs == false) return; // step II: fetching WKT SRS if (rs_srtext == true) sprintf(sql, "SELECT srtext FROM spatial_ref_sys WHERE srid = %d AND srtext IS NOT NULL", srid); else sprintf(sql, "SELECT srs_wkt FROM spatial_ref_sys WHERE srid = %d AND srs_wkt IS NOT NULL", srid); ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("dump shapefile error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; srsWkt = wxString::FromUTF8(name); } } sqlite3_free_table(results); if (srsWkt.Len() == 0) return; // step IV: generating the .PRJ file strcpy(dummy, path.ToUTF8()); strcat(dummy, ".prj"); FILE *out = fopen(dummy, "wb"); if (!out) goto no_file; strcpy(dummy, srsWkt.ToUTF8()); fprintf(out, "%s\r\n", dummy); fclose(out); no_file: return; } void MyFrame::DumpTxtTab(wxString & path, wxString & table, wxString & charset) { // // dumping a table as Txt/Tab // wxString sql; sqlite3_stmt *stmt; int ret; int rows = 0; int i; int n_cols; char xpath[1024]; char dummy[65536]; char outCs[128]; char *pDummy; char xname[1024]; wxString msg; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); FILE *out = fopen(xpath, "w"); if (!out) goto no_file; // // preparing SQL statement // sql = wxT("SELECT * FROM "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (rows == 0) { // outputting the column titles for (i = 0; i < n_cols; i++) { if (i == 0) fprintf(out, "%s", sqlite3_column_name(stmt, i)); else fprintf(out, "\t%s", sqlite3_column_name(stmt, i)); } fprintf(out, "\n"); } rows++; for (i = 0; i < n_cols; i++) { if (i > 0) fprintf(out, "\t"); if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) fprintf(out, "%d", sqlite3_column_int(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) fprintf(out, "%1.6f", sqlite3_column_double(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); CleanTxtTab(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, "UTF-8", outCs)) goto encoding_error; fprintf(out, "%s", dummy); } } fprintf(out, "\n"); } else goto sql_error; } sqlite3_finalize(stmt); fclose(out); sprintf(dummy, "Exported %d rows into Txt/Tab file", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump Txt/Tab error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET converion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump Txt/Tab: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::ExportResultSetAsTxtTab(wxString & path, wxString & sql, wxString & charset) { // // exporting a ResultSet as Txt/Tab // sqlite3_stmt *stmt; int ret; int rows = 0; int i; int n_cols; char xpath[1024]; char dummy[65536]; char outCs[128]; char *pDummy; wxString msg; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); FILE *out = fopen(xpath, "w"); if (!out) goto no_file; // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (rows == 0) { // outputting the column titles for (i = 0; i < n_cols; i++) { if (i == 0) fprintf(out, "%s", sqlite3_column_name(stmt, i)); else fprintf(out, "\t%s", sqlite3_column_name(stmt, i)); } fprintf(out, "\n"); } rows++; for (i = 0; i < n_cols; i++) { if (i > 0) fprintf(out, "\t"); if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) fprintf(out, "%d", sqlite3_column_int(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) fprintf(out, "%1.6f", sqlite3_column_double(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); CleanTxtTab(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, "UTF-8", outCs)) goto encoding_error; fprintf(out, "%s", dummy); } } fprintf(out, "\n"); } else goto sql_error; } sqlite3_finalize(stmt); fclose(out); sprintf(dummy, "Exported %d rows into Txt/Tab file", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump Txt/Tab error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET converion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump Txt/Tab: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::DumpCsv(wxString & path, wxString & table, wxString & charset) { // // dumping a table as CSV // wxString sql; sqlite3_stmt *stmt; int ret; int rows = 0; int i; int n_cols; char xpath[1024]; char dummy[65536]; char outCs[128]; char *pDummy; wxString msg; char xname[1024]; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); FILE *out = fopen(xpath, "w"); if (!out) goto no_file; // // preparing SQL statement // sql = wxT("SELECT * FROM "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (rows == 0) { // outputting the column titles for (i = 0; i < n_cols; i++) { if (i == 0) { strcpy(dummy, sqlite3_column_name(stmt, i)); CleanCsv(dummy); fprintf(out, "%s", dummy); } else { strcpy(dummy, sqlite3_column_name(stmt, i)); CleanCsv(dummy); fprintf(out, ",%s", dummy); } } fprintf(out, "\n"); } rows++; for (i = 0; i < n_cols; i++) { if (i > 0) fprintf(out, ","); if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) fprintf(out, "%d", sqlite3_column_int(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) fprintf(out, "%1.6f", sqlite3_column_double(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); CleanCsv(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "%s", dummy); } } fprintf(out, "\n"); } else goto sql_error; } sqlite3_finalize(stmt); fclose(out); sprintf(dummy, "Exported %d rows into CSV file", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump CSV error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET converion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump CSV: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::ExportResultSetAsCsv(wxString & path, wxString & sql, wxString & charset) { // // exporting a ResultSet as CSV // sqlite3_stmt *stmt; int ret; int rows = 0; int i; int n_cols; char xpath[1024]; char dummy[65536]; char outCs[128]; char *pDummy; wxString msg; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); FILE *out = fopen(xpath, "w"); if (!out) goto no_file; // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (rows == 0) { // outputting the column titles for (i = 0; i < n_cols; i++) { if (i == 0) { strcpy(dummy, sqlite3_column_name(stmt, i)); CleanCsv(dummy); fprintf(out, "%s", dummy); } else { strcpy(dummy, sqlite3_column_name(stmt, i)); CleanCsv(dummy); fprintf(out, ",%s", dummy); } } fprintf(out, "\n"); } rows++; for (i = 0; i < n_cols; i++) { if (i > 0) fprintf(out, ","); if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) fprintf(out, "%d", sqlite3_column_int(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) fprintf(out, "%1.6f", sqlite3_column_double(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); CleanCsv(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "%s", dummy); } } fprintf(out, "\n"); } else goto sql_error; } sqlite3_finalize(stmt); fclose(out); sprintf(dummy, "Exported %d rows into CSV file", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump CSV error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET converion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump CSV: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::DumpHtml(wxString & path, wxString & table, wxString & sqlite_path, wxString & charset) { // // dumping a table as HTML // wxString sql; sqlite3_stmt *stmt; int ret; int rows = 0; int i; int n_cols; char xpath[1024]; char sqlpath[1024]; char xtable[1024]; char dummy[65536]; char outCs[128]; char *pDummy; wxString msg; char xname[1024]; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); strcpy(sqlpath, sqlite_path.ToUTF8()); strcpy(xtable, table.ToUTF8()); FILE *out = fopen(xpath, "w"); if (!out) goto no_file; fprintf(out, "\n"); fprintf(out, "\n\t\n"); fprintf(out, "\t\t\n", outCs); fprintf(out, "\t\t\nTable '%s': from SQLite/SpatiaLite DB '%s'\n", xtable, sqlpath); fprintf(out, "\t\t\n"); fprintf(out, "\t\t\n\t\n\t\n\t\t\n"); // // preparing SQL statement // sql = wxT("SELECT * FROM "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if ((rows % 20) == 0) { // outputting the column titles fprintf(out, "\t\t\t\n"); for (i = 0; i < n_cols; i++) { strcpy(dummy, sqlite3_column_name(stmt, i)); CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "\t\t\t\t\n", dummy); } fprintf(out, "\t\t\t\n"); } rows++; fprintf(out, "\t\t\t\n", (rows % 2) ? "d0" : "d1"); for (i = 0; i < n_cols; i++) { if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) fprintf(out, "\t\t\t\t\n", sqlite3_column_int(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) fprintf(out, "\t\t\t\t\n", sqlite3_column_double(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "\t\t\t\t\n", dummy); } } fprintf(out, "\t\t\t\n"); } else goto sql_error; } sqlite3_finalize(stmt); fprintf(out, "\t\t
%s
%d%1.6f%s
\n\t\n\n"); fclose(out); sprintf(dummy, "Exported %d rows into HTML file", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump HTML error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET convertion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump HTML: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::DifQuote(char *buf) { // well-formatting a string to be used as a DIF string char tmp[65536]; char *in = tmp; char *out = buf; strcpy(tmp, buf); *out++ = '"'; while (*in != '\0') { if (*in == '"') *out++ = '"'; *out++ = *in++; } *out++ = '"'; *out = '\0'; } void MyFrame::DecimalNumber(double num, char *str, char decimal_point) { // well-formatting a decimal number char dummy[128]; char *out = str; int i; sprintf(dummy, "%1.18f", num); for (i = strlen(dummy) - 1; i >= 0; i--) { if (dummy[i] == '0') dummy[i] = '\0'; else break; } if (dummy[strlen(dummy) - 1] == '.') strcat(dummy, "0"); for (i = 0; i < (int) strlen(dummy); i++) { if (dummy[i] == '.') { /* replacing LOCALE decimal point */ *out++ = decimal_point; continue; } *out++ = dummy[i]; } *out = '\0'; } bool MyFrame::TestDateValue(char *date) { // testing for DATE char buf[8]; int dd; int mm; int yy; if (strlen(date) != 10) return false; if (date[4] == '-' && date[7] == '-') ; else return false; if (!isdigit(date[0])) return false; buf[0] = date[0]; if (!isdigit(date[1])) return false; buf[1] = date[1]; if (!isdigit(date[2])) return false; buf[2] = date[2]; if (!isdigit(date[3])) return false; buf[3] = date[3]; buf[4] = '\0'; yy = atoi(buf); if (yy < 1901 || yy > 2099) return false; if (!isdigit(date[5])) return false; buf[0] = date[5]; if (!isdigit(date[6])) return false; buf[1] = date[6]; buf[2] = '\0'; mm = atoi(buf); if (!isdigit(date[8])) return false; buf[0] = date[8]; if (!isdigit(date[9])) return false; buf[1] = date[9]; buf[2] = '\0'; dd = atoi(buf); if (mm < 1 || mm > 12) return false; if (dd < 1) return false; switch (mm) { case 2: if ((yy % 4) == 0) { // leap year, according to M$ :-) if (dd > 29) return false; } else { if (dd > 28) return false; } break; case 4: case 6: case 9: case 11: if (dd > 30) return false; break; default: if (dd > 31) return false; break; } return true; } bool MyFrame::TestDateTimeValue(char *datetime) { // testing for DATETIME char buf[8]; int dd; int mm; int yy; int hh; int min; int ss = 0; if (strlen(datetime) < 16) return false; if (datetime[4] == '-' && datetime[7] == '-' && datetime[13] == ':') ; else return false; if (!isdigit(datetime[0])) return false; buf[0] = datetime[0]; if (!isdigit(datetime[1])) return false; buf[1] = datetime[1]; if (!isdigit(datetime[2])) return false; buf[2] = datetime[2]; if (!isdigit(datetime[3])) return false; buf[3] = datetime[3]; buf[4] = '\0'; yy = atoi(buf); if (yy < 1901 || yy > 2099) return false; if (!isdigit(datetime[5])) return false; buf[0] = datetime[5]; if (!isdigit(datetime[6])) return false; buf[1] = datetime[6]; buf[2] = '\0'; mm = atoi(buf); if (!isdigit(datetime[8])) return false; buf[0] = datetime[8]; if (!isdigit(datetime[9])) return false; buf[1] = datetime[9]; buf[2] = '\0'; dd = atoi(buf); if (mm < 1 || mm > 12) return false; if (dd < 1) return false; switch (mm) { case 2: if ((yy % 4) == 0) { // leap year, according to M$ :-) if (dd > 29) return false; } else { if (dd > 28) return false; } break; case 4: case 6: case 9: case 11: if (dd > 30) return false; break; default: if (dd > 31) return false; break; } if (!isdigit(datetime[11])) return false; buf[0] = datetime[11]; if (!isdigit(datetime[12])) return false; buf[1] = datetime[12]; buf[2] = '\0'; hh = atoi(buf); if (hh < 0 || hh > 23) return false; if (!isdigit(datetime[14])) return false; buf[0] = datetime[14]; if (!isdigit(datetime[15])) return false; buf[1] = datetime[15]; buf[2] = '\0'; min = atoi(buf); if (min < 0 || hh > 59) return false; if (strlen(datetime) >= 19) { if (datetime[16] != ':') return false; if (!isdigit(datetime[17])) return false; buf[0] = datetime[17]; if (!isdigit(datetime[18])) return false; buf[1] = datetime[18]; buf[2] = '\0'; ss = atoi(buf); if (ss < 0 || ss > 59) return false; } return true; } bool MyFrame::TestTimeValue(char *time) { // testing for TIME char buf[8]; int hh; int min; int ss = 0; if (strlen(time) < 5) return false; if (time[2] == ':') ; else return false; if (!isdigit(time[0])) return false; buf[0] = time[0]; if (!isdigit(time[1])) return false; buf[1] = time[1]; buf[2] = '\0'; hh = atoi(buf); if (hh < 0 || hh > 23) return false; if (!isdigit(time[3])) return false; buf[0] = time[3]; if (!isdigit(time[4])) return false; buf[1] = time[4]; buf[2] = '\0'; min = atoi(buf); if (min < 0 || hh > 59) return false; if (strlen(time) >= 8) { if (time[5] != ':') return false; if (!isdigit(time[6])) return false; buf[0] = time[6]; if (!isdigit(time[7])) return false; buf[1] = time[7]; buf[2] = '\0'; ss = atoi(buf); if (ss < 0 || ss > 59) return false; } return true; } int MyFrame::ComputeSpreadsheetDate(int yy, int mm, int dd) { // computing a DATE value (Spreadsheet style) int y = 1900; int m = 1; int d = 1; int day_count = 1; while (1) { // // computing how many days intercurs between this date and // 1901-01-01 (reference date: day #1) // if (y == yy && m == mm && d == dd) break; day_count++; switch (m) { case 2: if ((y % 4) == 0) { // leap year, according to M$ :-) if (d == 29) { d = 1; m++; } else d++; } else { if (d == 28) { d = 1; m++; } else d++; } break; case 4: case 6: case 9: case 11: if (d == 30) { d = 1; m++; } else d++; break; default: if (d == 31) { if (m == 12) { d = 1; m = 1; y++; } else { d = 1; m++; } } else d++; break; }; } return day_count; } double MyFrame::ComputeSpreadsheetTime(int hh, int mm, int ss) { // computing a TIME value (Spreadsheet style) double now = (hh * 3600) + (mm * 60) + ss; // seconds since midnight double day = 86400.0; // seconds in a day return now / day; } int MyFrame::GetDateValue(char *date) { // computing a DATE value char buf[8]; int dd; int mm; int yy; buf[0] = date[0]; buf[1] = date[1]; buf[2] = date[2]; buf[3] = date[3]; buf[4] = '\0'; yy = atoi(buf); buf[0] = date[5]; buf[1] = date[6]; buf[2] = '\0'; mm = atoi(buf); buf[0] = date[8]; buf[1] = date[9]; buf[2] = '\0'; dd = atoi(buf); return ComputeSpreadsheetDate(yy, mm, dd); } double MyFrame::GetDateTimeValue(char *datetime) { // computing a DATETIME value char buf[8]; int dd; int mm; int yy; int hh; int min; int ss = 0; int date; buf[0] = datetime[0]; buf[1] = datetime[1]; buf[2] = datetime[2]; buf[3] = datetime[3]; buf[4] = '\0'; yy = atoi(buf); buf[0] = datetime[5]; buf[1] = datetime[6]; buf[2] = '\0'; mm = atoi(buf); buf[0] = datetime[8]; buf[1] = datetime[9]; buf[2] = '\0'; dd = atoi(buf); date = ComputeSpreadsheetDate(yy, mm, dd); buf[0] = datetime[11]; buf[1] = datetime[12]; buf[2] = '\0'; hh = atoi(buf); buf[0] = datetime[14]; buf[1] = datetime[15]; buf[2] = '\0'; min = atoi(buf); if (strlen(datetime) >= 19) { buf[0] = datetime[17]; buf[1] = datetime[18]; buf[2] = '\0'; ss = atoi(buf); } return (double) date + ComputeSpreadsheetTime(hh, min, ss); } double MyFrame::GetTimeValue(char *time) { // computing a TIME value char buf[8]; int hh; int min; int ss = 0; buf[0] = time[0]; buf[1] = time[1]; buf[2] = '\0'; hh = atoi(buf); buf[0] = time[3]; buf[1] = time[4]; buf[2] = '\0'; min = atoi(buf); if (strlen(time) >= 8) { buf[0] = time[6]; buf[1] = time[7]; buf[2] = '\0'; ss = atoi(buf); } return ComputeSpreadsheetTime(hh, min, ss); } void MyFrame::DumpDif(wxString & path, wxString & table, wxString & charset, char decimal_point, bool date_times) { // // dumping a table as DIF // wxString sql; sqlite3_stmt *stmt; int ret; int rows = 0; int i; int n_cols; int tot_cols = 0; int tot_rows = 0; char xpath[1024]; char xtable[1024]; char dummy[65536]; char outCs[128]; char *pDummy; wxString msg; char xname[1024]; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); strcpy(xtable, table.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (!out) goto no_file; // // preparing SQL statement // sql = wxT("SELECT * FROM "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; while (1) { /* first pass: we must compute #cols and #rows first of all */ ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (n_cols > tot_cols) tot_cols = n_cols; tot_rows++; } else goto sql_error; } // DIF header fprintf(out, "TABLE\r\n0,1\r\n\"Sheet1\"\r\n"); fprintf(out, "VECTORS\r\n0,%d\r\n\"\"\r\n", tot_cols); fprintf(out, "TUPLES\r\n0,%d\r\n\"\"\r\n", tot_rows); fprintf(out, "DATA\r\n0,0\r\n\"\"\r\n-1,0\r\n"); sqlite3_reset(stmt); while (1) { /* final pass: real output */ ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (rows == 0) { // column titles fprintf(out, "BOT\r\n"); for (i = 0; i < n_cols; i++) { strcpy(dummy, sqlite3_column_name(stmt, i)); DifQuote(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "1,0\r\n%s\r\n", dummy); } // DIF row footer fprintf(out, "-1,0\r\n"); } // DIF row header fprintf(out, "BOT\r\n"); for (i = 0; i < n_cols; i++) { if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) fprintf(out, "0,%d\r\nV\r\n", sqlite3_column_int(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) { char num[128]; DecimalNumber(sqlite3_column_double(stmt, i), num, decimal_point); fprintf(out, "0,%s\r\nV\r\n", num); } else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); if (date_times && TestDateValue(dummy) == true) { fprintf(out, "0,%d\r\nV\r\n", GetDateValue(dummy)); } else if (date_times && TestDateTimeValue(dummy) == true) { char num[128]; DecimalNumber(GetDateTimeValue(dummy), num, decimal_point); fprintf(out, "0,%s\r\nV\r\n", num); } else if (date_times && TestTimeValue(dummy) == true) { char num[128]; DecimalNumber(GetTimeValue(dummy), num, decimal_point); fprintf(out, "0,%s\r\nV\r\n", num); } else { // plain text string DifQuote(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "1,0\r\n%s\r\n", dummy); } } else fprintf(out, "1,0\r\n\"\"\r\n"); } // DIF row footer fprintf(out, "-1,0\r\n"); rows++; } else goto sql_error; } sqlite3_finalize(stmt); // DIF footer fprintf(out, "EOD\r\n"); fclose(out); sprintf(dummy, "Exported %d rows into DIF spreadsheet", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump DIF error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET convertion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump DIF: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::ExportResultSetAsDif(wxString & path, wxString & sql, wxString & charset, char decimal_point, bool date_times) { // // exporting a ResultSet as DIF // sqlite3_stmt *stmt; int ret; int rows = 0; int i; int n_cols; int tot_cols = 0; int tot_rows = 0; char xpath[1024]; char dummy[65536]; char outCs[128]; char *pDummy; wxString msg; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (!out) goto no_file; // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; rows = 0; while (1) { /* first pass: we must compute #cols and #rows first of all */ ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (n_cols > tot_cols) tot_cols = n_cols; tot_rows++; } else goto sql_error; } // DIF header fprintf(out, "TABLE\r\n0,1\r\n\"Sheet1\"\r\n"); fprintf(out, "VECTORS\r\n0,%d\r\n\"\"\r\n", tot_cols); fprintf(out, "TUPLES\r\n0,%d\r\n\"\"\r\n", tot_rows); fprintf(out, "DATA\r\n0,0\r\n\"\"\r\n-1,0\r\n"); sqlite3_reset(stmt); while (1) { /* final pass: real output */ ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (rows == 0) { // column titles fprintf(out, "BOT\r\n"); for (i = 0; i < n_cols; i++) { strcpy(dummy, sqlite3_column_name(stmt, i)); DifQuote(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "1,0\r\n%s\r\n", dummy); } // DIF row footer fprintf(out, "-1,0\r\n"); } // DIF row header fprintf(out, "BOT\r\n"); for (i = 0; i < n_cols; i++) { if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) fprintf(out, "0,%d\r\nV\r\n", sqlite3_column_int(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) { char num[128]; DecimalNumber(sqlite3_column_double(stmt, i), num, decimal_point); fprintf(out, "0,%s\r\nV\r\n", num); } else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); if (date_times && TestDateValue(dummy) == true) { fprintf(out, "0,%d\r\nV\r\n", GetDateValue(dummy)); } else if (date_times && TestDateTimeValue(dummy) == true) { char num[128]; DecimalNumber(GetDateTimeValue(dummy), num, decimal_point); fprintf(out, "0,%s\r\nV\r\n", num); } else if (date_times && TestTimeValue(dummy) == true) { char num[128]; DecimalNumber(GetTimeValue(dummy), num, decimal_point); fprintf(out, "0,%s\r\nV\r\n", num); } else { // plain text string DifQuote(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "1,0\r\n%s\r\n", dummy); } } else fprintf(out, "1,0\r\n\"\"\r\n"); } // DIF row footer fprintf(out, "-1,0\r\n"); rows++; } else goto sql_error; } sqlite3_finalize(stmt); // DIF footer fprintf(out, "EOD\r\n"); fclose(out); sprintf(dummy, "Exported %d rows into DIF spreadsheet", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump DIF error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET convertion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump DIF: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::SylkQuote(char *buf) { // well-formatting a string to be used as a SYLK string char tmp[65536]; char *in = tmp; char *out = buf; strcpy(tmp, buf); *out++ = '"'; while (*in != '\0') *out++ = *in++; *out++ = '"'; *out = '\0'; } void MyFrame::DumpSylk(wxString & path, wxString & table, wxString & charset, bool date_times) { // // dumping a table as SYLK // wxString sql; sqlite3_stmt *stmt; int ret; int i; int n_cols; int eff_row = 1; char format[16]; char xpath[1024]; char xtable[1024]; char dummy[65536]; char outCs[128]; char *pDummy; wxString msg; char xname[1024]; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); strcpy(xtable, table.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (!out) goto no_file; // // preparing SQL statement // sql = wxT("SELECT * FROM "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; // SYLK header fprintf(out, "ID;PCALC001\r\n"); fprintf(out, "P;PGeneral\r\n"); fprintf(out, "P;P0.00\r\n"); fprintf(out, "P;Pdd/mm/yyyy\r\n"); fprintf(out, "P;Ph:mm:ss\r\n"); fprintf(out, "P;Pdd/mm/yyyy\\ h:mm\r\n"); while (1) { /* exporting data */ ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (eff_row == 1) { // column titles for (i = 0; i < n_cols; i++) { strcpy(dummy, sqlite3_column_name(stmt, i)); SylkQuote(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "C;X%d;Y%d;K%s\r\n", i + 1, eff_row, dummy); fprintf(out, "F;X%d;Y%d;FG0L\r\n", i + 1, eff_row); } eff_row++; } for (i = 0; i < n_cols; i++) { if (sqlite3_column_type(stmt, i) == SQLITE_NULL) continue; else if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) { sprintf(dummy, "%d", sqlite3_column_int(stmt, i)); strcpy(format, "FI0G"); } else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) { sprintf(dummy, "%1.15f", sqlite3_column_double(stmt, i)); strcpy(format, "P1;FF2G"); } else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); if (date_times && TestDateValue(dummy) == true) { sprintf(dummy, "%d", GetDateValue(dummy)); strcpy(format, "P2;FG0R"); } else if (date_times && TestDateTimeValue(dummy) == true) { sprintf(dummy, "%1.15f", GetDateTimeValue(dummy)); strcpy(format, "P4;FG0R"); } else if (date_times && TestTimeValue(dummy) == true) { sprintf(dummy, "%1.15f", GetTimeValue(dummy)); strcpy(format, "P3;FG0R"); } else { // plain text string SylkQuote(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; sprintf(dummy, "%s", dummy); strcpy(format, "FG0G"); } } fprintf(out, "C;X%d;Y%d;K%s\r\n", i + 1, eff_row, dummy); fprintf(out, "F;X%d;Y%d;%s\r\n", i + 1, eff_row, format); } eff_row++; } else goto sql_error; } sqlite3_finalize(stmt); fclose(out); sprintf(dummy, "Exported %d rows into SYLK spreadsheet", eff_row - 1); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump SYLK error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET convertion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump SYLK: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::ExportResultSetAsSylk(wxString & path, wxString & sql, wxString & charset, bool date_times) { // // exporting a ResultSet as SYLK // sqlite3_stmt *stmt; int ret; int i; int n_cols; int eff_row = 1; char format[16]; char xpath[1024]; char dummy[65536]; char outCs[128]; char *pDummy; wxString msg; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (!out) goto no_file; // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; // SYLK header fprintf(out, "ID;PCALC001\r\n"); fprintf(out, "P;PGeneral\r\n"); fprintf(out, "P;P0.00\r\n"); fprintf(out, "P;Pdd/mm/yyyy\r\n"); fprintf(out, "P;Ph:mm:ss\r\n"); fprintf(out, "P;Pdd/mm/yyyy\\ h:mm\r\n"); while (1) { /* exporting data */ ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (eff_row == 1) { // column titles for (i = 0; i < n_cols; i++) { strcpy(dummy, sqlite3_column_name(stmt, i)); SylkQuote(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "C;X%d;Y%d;K%s\r\n", i + 1, eff_row, dummy); fprintf(out, "F;X%d;Y%d;FG0L\r\n", i + 1, eff_row); } eff_row++; } for (i = 0; i < n_cols; i++) { if (sqlite3_column_type(stmt, i) == SQLITE_NULL) continue; else if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) { sprintf(dummy, "%d", sqlite3_column_int(stmt, i)); strcpy(format, "FI0G"); } else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) { sprintf(dummy, "%1.15f", sqlite3_column_double(stmt, i)); strcpy(format, "P1;FF2G"); } else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); if (date_times && TestDateValue(dummy) == true) { sprintf(dummy, "%d", GetDateValue(dummy)); strcpy(format, "P2;FG0R"); } else if (date_times && TestDateTimeValue(dummy) == true) { sprintf(dummy, "%1.15f", GetDateTimeValue(dummy)); strcpy(format, "P4;FG0R"); } else if (date_times && TestTimeValue(dummy) == true) { sprintf(dummy, "%1.15f", GetTimeValue(dummy)); strcpy(format, "P3;FG0R"); } else { // plain text string SylkQuote(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; sprintf(dummy, "%s", dummy); strcpy(format, "FG0G"); } } fprintf(out, "C;X%d;Y%d;K%s\r\n", i + 1, eff_row, dummy); fprintf(out, "F;X%d;Y%d;%s\r\n", i + 1, eff_row, format); } eff_row++; } else goto sql_error; } sqlite3_finalize(stmt); fclose(out); sprintf(dummy, "Exported %d rows into SYLK spreadsheet", eff_row - 1); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump SYLK error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET convertion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump SYLK: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } bool MyFrame::ExportHtmlColorSqlSyntax(FILE * out, wxString & sql, char *outCs) { // // exporting SQL color syntax as HTML // wxString right = sql; int from; int to = 0; int i; char c; char next_c; SqlTokenizer tokenizer(sql); while (tokenizer.HasMoreTokens()) { wxString token = tokenizer.GetNextToken(); from = to + right.Find(token); to = from + token.Len(); // exporting any leading delimiter for (i = 0; i < right.Find(token); i++) { c = right.GetChar(i); switch (c) { case '\r': break; case '\n': fprintf(out, "
\n"); break; case ' ': fprintf(out, " "); break; case '\t': fprintf(out, "    "); break; default: fprintf(out, "%c", c); break; }; } // extracting the unparsed portion of the SQL string right = sql.Mid(to); next_c = '\0'; for (i = 0; i < (int) right.Len(); i++) { c = right.GetChar(i); if (c == ' ' || c == '\t' || c == '\r' || c == '\n') continue; next_c = c; break; } char dummy[4096]; char *pDummy; strcpy(dummy, token.ToUTF8()); if (gaiaIsReservedSqliteName(dummy)) { // setting the SQL keyword style CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, (const char *) "UTF-8", outCs)) return false; fprintf(out, "%s", dummy); } else if (MyQueryView::IsSqliteExtra(token)) { // setting the SQL keyword style CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, (const char *) "UTF-8", outCs)) return false; fprintf(out, "%s", dummy); } else if (MyQueryView::IsSqlString(token) == true) { // setting the SQL string constant style CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, (const char *) "UTF-8", outCs)) return false; fprintf(out, "%s", dummy); } else if (MyQueryView::IsSqlNumber(token) == true) { // setting the SQL numeric constant style CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, (const char *) "UTF-8", outCs)) return false; fprintf(out, "%s", dummy); } else if (MyQueryView::IsSqlFunction(token, next_c) == true) { // setting the SQL function style CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, (const char *) "UTF-8", outCs)) return false; fprintf(out, "%s", dummy); } else if (MyQueryView::IsSqlGeoFunction(token, next_c) == true) { // setting the SQL geo-function style CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, (const char *) "UTF-8", outCs)) return false; fprintf(out, "%s", dummy); } else if (MyQueryView::IsSqlRasterFunction(token, next_c) == true) { // setting the SQL raster-function style CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, (const char *) "UTF-8", outCs)) return false; fprintf(out, "%s", dummy); } else { // setting normal style CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset(&pDummy, (const char *) "UTF-8", outCs)) return false; fprintf(out, "%s", dummy); } } fprintf(out, "\n"); return true; } void MyFrame::ExportResultSetAsHtml(wxString & path, wxString & sql, wxString & sqlite_path, wxString & charset) { // // exporting a ResultSet as HTML // sqlite3_stmt *stmt; int ret; int rows = 0; int i; int n_cols; char xpath[1024]; char sqlpath[1024]; char dummy[65536]; char outCs[128]; char *pDummy; wxString msg; strcpy(outCs, charset.ToUTF8()); strcpy(xpath, path.ToUTF8()); strcpy(sqlpath, sqlite_path.ToUTF8()); FILE *out = fopen(xpath, "w"); if (!out) goto no_file; fprintf(out, "\n"); fprintf(out, "\n\t\n"); fprintf(out, "\t\t\n", outCs); fprintf(out, "\t\t\nResultSet from SQLite/SpatiaLite DB '%s'\n", sqlpath); fprintf(out, "\t\t\n"); fprintf(out, "\t\t\n\t\n\t\n"); fprintf(out, "\t\t

ResultSet returned by SQL query statement:

\n"); fprintf(out, "\t\t\n\t\t\t\n\t\t
\n"); if (ExportHtmlColorSqlSyntax(out, sql, outCs) == false) goto encoding_error; fprintf(out, "\t\t\t
\n\t\t
\n\t\t
\n\t\t\n"); // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if ((rows % 20) == 0) { // outputting the column titles fprintf(out, "\t\t\t\n"); for (i = 0; i < n_cols; i++) { strcpy(dummy, sqlite3_column_name(stmt, i)); CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "\t\t\t\t\n", dummy); } fprintf(out, "\t\t\t\n"); } rows++; fprintf(out, "\t\t\t\n", (rows % 2) ? "d0" : "d1"); for (i = 0; i < n_cols; i++) { if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) fprintf(out, "\t\t\t\t\n", sqlite3_column_int(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) fprintf(out, "\t\t\t\t\n", sqlite3_column_double(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); CleanHtml(dummy); pDummy = dummy; if (!gaiaConvertCharset (&pDummy, (const char *) "UTF-8", outCs)) goto encoding_error; fprintf(out, "\t\t\t\t\n", dummy); } } fprintf(out, "\t\t\t\n"); } else goto sql_error; } sqlite3_finalize(stmt); fprintf(out, "\t\t
%s
%d%1.6f%s
\n\t\n\n"); fclose(out); sprintf(dummy, "Exported %d rows into HTML file", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump HTML error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; encoding_error: // // some CHARSET convertion occurred // sqlite3_finalize(stmt); wxMessageBox(wxT("dump HTML: charset conversion reported an error"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (out) fclose(out); return; no_file: // // output file can't be created/opened // wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyFrame::ExportResultSetAsDbf(wxString & path, wxString & sql, wxString & charset) { // // exporting a ResultSet as DBF // int rows; int i; char xpath[1024]; char xsql[4096]; sqlite3_stmt *stmt; int row1 = 0; int n_cols = 0; int offset = 0; int type; gaiaDbfPtr dbf = NULL; gaiaDbfListPtr dbf_export_list = NULL; gaiaDbfListPtr dbf_list = NULL; gaiaDbfListPtr dbf_write; gaiaDbfFieldPtr dbf_field; int *max_length = NULL; int *sql_type = NULL; char dummy[1024]; int len; wxString msg; int ret; // // compiling SQL prepared statement // strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; while (1) { // // Pass I - scrolling the result set to compute real DBF attributes' sizes and types // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // processing a result set row row1++; if (n_cols == 0) { // this one is the first row, so we are going to prepare the DBF Fields list n_cols = sqlite3_column_count(stmt); dbf_export_list = gaiaAllocDbfList(); max_length = (int *) malloc(sizeof(int) * n_cols); sql_type = (int *) malloc(sizeof(int) * n_cols); for (i = 0; i < n_cols; i++) { // initializes the DBF export fields strcpy(dummy, sqlite3_column_name(stmt, i)); gaiaAddDbfField(dbf_export_list, dummy, '\0', 0, 0, 0); max_length[i] = 0; sql_type[i] = SQLITE_NULL; } } for (i = 0; i < n_cols; i++) { // update the DBF export fields analyzing fetched data type = sqlite3_column_type(stmt, i); if (type == SQLITE_NULL || type == SQLITE_BLOB) continue; if (type == SQLITE_TEXT) { len = sqlite3_column_bytes(stmt, i); if (len > 254) { // DBF C type: max allowed length len = 254; } sql_type[i] = SQLITE_TEXT; if (len > max_length[i]) max_length[i] = len; } else if (type == SQLITE_FLOAT && sql_type[i] != SQLITE_TEXT) sql_type[i] = SQLITE_FLOAT; // promoting a numeric column to be DOUBLE else if (type == SQLITE_INTEGER && (sql_type[i] == SQLITE_NULL || sql_type[i] == SQLITE_INTEGER)) sql_type[i] = SQLITE_INTEGER; // promoting a null column to be INTEGER if (type == SQLITE_INTEGER && max_length[i] < 18) max_length[i] = 18; if (type == SQLITE_FLOAT && max_length[i] < 24) max_length[i] = 24; } } else goto sql_error; } if (!row1) goto empty_result_set; i = 0; offset = 0; dbf_list = gaiaAllocDbfList(); dbf_field = dbf_export_list->First; while (dbf_field) { // preparing the final DBF attribute list if (sql_type[i] == SQLITE_NULL || sql_type[i] == SQLITE_BLOB) { i++; dbf_field = dbf_field->Next; continue; } if (sql_type[i] == SQLITE_TEXT) { gaiaAddDbfField(dbf_list, dbf_field->Name, 'C', offset, max_length[i], 0); offset += max_length[i]; } if (sql_type[i] == SQLITE_FLOAT) { gaiaAddDbfField(dbf_list, dbf_field->Name, 'N', offset, 24, 6); offset += 24; } if (sql_type[i] == SQLITE_INTEGER) { gaiaAddDbfField(dbf_list, dbf_field->Name, 'N', offset, 18, 0); offset += 18; } i++; dbf_field = dbf_field->Next; } free(max_length); free(sql_type); gaiaFreeDbfList(dbf_export_list); dbf_export_list = NULL; // resetting SQLite query ret = sqlite3_reset(stmt); if (ret != SQLITE_OK) goto sql_error; // trying to open the DBF file dbf = gaiaAllocDbf(); // xfering export-list ownership dbf->Dbf = dbf_list; dbf_list = NULL; strcpy(xpath, path.ToUTF8()); gaiaOpenDbfWrite(dbf, xpath, "UTF-8", charset.ToUTF8()); if (!(dbf->Valid)) goto no_file; while (1) { // Pass II - scrolling the result set to dump data into DBF ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { rows++; dbf_write = gaiaCloneDbfEntity(dbf->Dbf); for (i = 0; i < n_cols; i++) { dbf_field = GetDbfField(dbf_write, i); if (!dbf_field) continue; if (sqlite3_column_type(stmt, i) == SQLITE_NULL || sqlite3_column_type(stmt, i) == SQLITE_BLOB) { // handling NULL values gaiaSetNullValue(dbf_field); } else { switch (dbf_field->Type) { case 'N': if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) gaiaSetIntValue(dbf_field, sqlite3_column_int64(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) gaiaSetDoubleValue(dbf_field, sqlite3_column_double(stmt, i)); else gaiaSetNullValue(dbf_field); break; case 'C': if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); gaiaSetStrValue(dbf_field, dummy); } else if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) { #if defined(_WIN32) || defined(__MINGW32__) /* CAVEAT - M$ runtime doesn't supports %lld for 64 bits */ sprintf(dummy, "%I64d", sqlite3_column_int64(stmt, i)); #else sprintf(dummy, "%lld", sqlite3_column_int64(stmt, i)); #endif gaiaSetStrValue(dbf_field, dummy); } else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) { sprintf(dummy, "%1.6f", sqlite3_column_double(stmt, i)); gaiaSetStrValue(dbf_field, dummy); } else gaiaSetNullValue(dbf_field); break; }; } } if (!gaiaWriteDbfEntity(dbf, dbf_write)) { wxMessageBox(wxT("DBF write error"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } gaiaFreeDbfList(dbf_write); } else goto sql_error; } sqlite3_finalize(stmt); gaiaFlushDbfHeader(dbf); gaiaFreeDbf(dbf); sprintf(dummy, "Exported %d rows into the DBF file", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); if (dbf_export_list) gaiaFreeDbfList(dbf_export_list); if (dbf_list) gaiaFreeDbfList(dbf_list); if (dbf) gaiaFreeDbf(dbf); wxMessageBox(wxT("dump DBF file error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; no_file: // // DBF file can't be created/opened // if (dbf_export_list) gaiaFreeDbfList(dbf_export_list); if (dbf_list) gaiaFreeDbfList(dbf_list); if (dbf) gaiaFreeDbf(dbf); wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; empty_result_set: // // the result set is empty - nothing to do // sqlite3_finalize(stmt); if (dbf_export_list) gaiaFreeDbfList(dbf_export_list); if (dbf_list) gaiaFreeDbfList(dbf_list); if (dbf) gaiaFreeDbf(dbf); wxMessageBox(wxT ("The SQL SELECT returned an empty result set\n... there is nothing to export ..."), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } void MyFrame::DumpKml(wxString & path, wxString & table, wxString & column, int precision, wxString & name, bool isNameConst, wxString & desc, bool isDescConst) { // // dumping a geometry table as KML // char xtable[1024]; char xcolumn[1024]; char xsql[4096]; char xname[1024]; char xdesc[1024]; char clean[1024]; char xpath[1024]; sqlite3_stmt *stmt = NULL; FILE *out = NULL; int ret; int rows = 0; // opening/creating the KML file strcpy(xpath, path.ToUTF8()); out = fopen(xpath, "wb"); if (!out) goto no_file; // // preparing SQL statement // strcpy(xtable, table.ToUTF8()); DoubleQuotedSql(xtable); strcpy(xcolumn, column.ToUTF8()); DoubleQuotedSql(xcolumn); if (isNameConst == true) { strcpy(clean, name.ToUTF8()); CleanSqlString(clean); sprintf(xname, "'%s'", clean); } else { strcpy(xname, name.ToUTF8()); DoubleQuotedSql(xname); } if (isDescConst == true) { strcpy(clean, desc.ToUTF8()); CleanSqlString(clean); sprintf(xdesc, "'%s'", clean); } else { strcpy(xdesc, desc.ToUTF8()); DoubleQuotedSql(xdesc); } sprintf(xsql, "SELECT AsKML(%s, %s, %s, %d) FROM %s ", xname, xdesc, xcolumn, precision, xtable); // excluding NULL Geometries strcat(xsql, "WHERE "); strcat(xsql, xcolumn); strcat(xsql, " IS NOT NULL"); // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; while (1) { // // scrolling the result set // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // processing a result set row if (rows == 0) { fprintf(out, "\r\n"); fprintf(out, "\r\n"); fprintf(out, "\r\n"); } rows++; fprintf(out, "\t%s\r\n", sqlite3_column_text(stmt, 0)); } else goto sql_error; } if (!rows) goto empty_result_set; fprintf(out, "\r\n"); fprintf(out, "\r\n"); sqlite3_finalize(stmt); fclose(out); return; sql_error: // // some SQL error occurred // if (stmt) sqlite3_finalize(stmt); if (out) fclose(out); sqlite3_finalize(stmt); wxMessageBox(wxT("dump KML error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; no_file: // // KML file can't be created/opened // if (stmt) sqlite3_finalize(stmt); if (out) fclose(out); wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; empty_result_set: // // the result set is empty - nothing to do // if (stmt) sqlite3_finalize(stmt); if (out) fclose(out); wxMessageBox(wxT ("The SQL SELECT returned an empty result set\n... there is nothing to export ..."), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } void MyFrame::ExportResultSetAsShp(wxString & path, wxString & sql, wxString & charset) { // // exporting a ResultSet as Shapefile // int rows; int i; int shape = -1; char xpath[1024]; char xsql[4096]; sqlite3_stmt *stmt; int row1 = 0; int n_cols = 0; int offset = 0; int type; int dbf_col; const void *blob_value; gaiaShapefilePtr shp = NULL; gaiaDbfListPtr dbf_list = NULL; gaiaDbfListPtr dbf_write; gaiaDbfFieldPtr dbf_field; gaiaGeomCollPtr geom; char dummy[1024]; int len; wxString msg; int ret; ResultSetShapefileAnalyzer analyzer; ResultSetShapefileColumn *pGeom; // // compiling SQL prepared statement // strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; rows = 0; while (1) { // // Pass I - scrolling the result set to compute real DBF attributes' sizes and types // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // processing a result set row row1++; if (n_cols == 0) { // this one is the first row, so we are going to prepare the DBF Fields list n_cols = sqlite3_column_count(stmt); analyzer.Init(n_cols); for (i = 0; i < n_cols; i++) { // initializes the column names analyzer.SetColumnName(i, sqlite3_column_name(stmt, i)); } } for (i = 0; i < n_cols; i++) { // update the DBF export fields analyzing fetched data type = sqlite3_column_type(stmt, i); if (type == SQLITE_BLOB) { // // we need to check if this one actually corresponds to some Geometry // blob_value = sqlite3_column_blob(stmt, i); len = sqlite3_column_bytes(stmt, i); geom = gaiaFromSpatiaLiteBlobWkb((unsigned char *) blob_value, len); if (geom) { analyzer.UpdateGeometry(i, geom); gaiaFreeGeomColl(geom); } else analyzer.UpdateBlob(i); } if (type == SQLITE_NULL) analyzer.UpdateNull(i); if (type == SQLITE_TEXT) { len = sqlite3_column_bytes(stmt, i); if (len > 254) { // DBF C: max allowed length len = 254; } analyzer.UpdateText(i, len); } if (type == SQLITE_INTEGER) analyzer.UpdateInteger(i); if (type == SQLITE_FLOAT) analyzer.UpdateDouble(i); } } else goto sql_error; } if (!row1) goto empty_result_set; if (analyzer.Validate() == false) goto invalid_result_set; offset = 0; dbf_list = gaiaAllocDbfList(); for (i = 0; i < analyzer.GetColumnCount(); i++) { // preparing the final DBF attribute list ResultSetShapefileColumn *pCol = analyzer.GetColumn(i); if (pCol == NULL) continue; if (pCol->GetDbfType() == SQLITE_TEXT) { gaiaAddDbfField(dbf_list, pCol->GetName(), 'C', offset, pCol->GetMaxTextLen(), 0); offset += pCol->GetMaxTextLen(); } if (pCol->GetDbfType() == SQLITE_FLOAT) { gaiaAddDbfField(dbf_list, pCol->GetName(), 'N', offset, 24, 6); offset += 24; } if (pCol->GetDbfType() == SQLITE_INTEGER) { gaiaAddDbfField(dbf_list, pCol->GetName(), 'N', offset, 18, 0); offset += 18; } } pGeom = analyzer.GetColumn(analyzer.GetGeometryColumn()); if (pGeom == NULL) goto invalid_geometry; if (pGeom->GetFirst()->GetDims() == GAIA_XY_M) { switch (pGeom->GetFirst()->GetType()) { case GAIA_POINT: shape = GAIA_POINTM; break; case GAIA_LINESTRING: case GAIA_MULTILINESTRING: shape = GAIA_LINESTRINGM; break; case GAIA_POLYGON: case GAIA_MULTIPOLYGON: shape = GAIA_POLYGONM; break; case GAIA_MULTIPOINT: shape = GAIA_MULTIPOINTM; break; }; } if (pGeom->GetFirst()->GetDims() == GAIA_XY_Z) { switch (pGeom->GetFirst()->GetType()) { case GAIA_POINT: shape = GAIA_POINTZ; break; case GAIA_LINESTRING: case GAIA_MULTILINESTRING: shape = GAIA_LINESTRINGZ; break; case GAIA_POLYGON: case GAIA_MULTIPOLYGON: shape = GAIA_POLYGONZ; break; case GAIA_MULTIPOINT: shape = GAIA_MULTIPOINTZ; break; }; } if (pGeom->GetFirst()->GetDims() == GAIA_XY_Z_M) { switch (pGeom->GetFirst()->GetType()) { case GAIA_POINT: shape = GAIA_POINTZM; break; case GAIA_LINESTRING: case GAIA_MULTILINESTRING: shape = GAIA_LINESTRINGZM; break; case GAIA_POLYGON: case GAIA_MULTIPOLYGON: shape = GAIA_POLYGONZM; break; case GAIA_MULTIPOINT: shape = GAIA_MULTIPOINTZM; break; }; } if (pGeom->GetFirst()->GetDims() == GAIA_XY) { switch (pGeom->GetFirst()->GetType()) { case GAIA_POINT: shape = GAIA_POINT; break; case GAIA_LINESTRING: case GAIA_MULTILINESTRING: shape = GAIA_LINESTRING; break; case GAIA_POLYGON: case GAIA_MULTIPOLYGON: shape = GAIA_POLYGON; break; case GAIA_MULTIPOINT: shape = GAIA_MULTIPOINT; break; }; } if (shape < 0) goto invalid_geometry; // resetting SQLite query ret = sqlite3_reset(stmt); if (ret != SQLITE_OK) goto sql_error; // trying to open shapefile files shp = gaiaAllocShapefile(); strcpy(xpath, path.ToUTF8()); gaiaOpenShpWrite(shp, xpath, shape, dbf_list, "UTF-8", charset.ToUTF8()); if (!(shp->Valid)) goto no_file; // trying to export the .PRJ file OutputPrjFile(path, pGeom->GetFirst()->GetSrid()); while (1) { // Pass II - scrolling the result set to dump data into shapefile ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { rows++; geom = NULL; dbf_write = gaiaCloneDbfEntity(dbf_list); dbf_col = -1; for (i = 0; i < n_cols; i++) { if (strcasecmp (pGeom->GetName(), (char *) sqlite3_column_name(stmt, i)) == 0) { // this one is the internal BLOB encoded GEOMETRY to be exported if (sqlite3_column_type(stmt, i) != SQLITE_BLOB) { // this one is a NULL Geometry dbf_write->Geometry = NULL; } else { blob_value = sqlite3_column_blob(stmt, i); len = sqlite3_column_bytes(stmt, i); dbf_write->Geometry = gaiaFromSpatiaLiteBlobWkb((unsigned char *) blob_value, len); } continue; } dbf_col++; dbf_field = GetDbfField(dbf_write, dbf_col); if (!dbf_field) continue; if (sqlite3_column_type(stmt, i) == SQLITE_NULL) { // handling NULL values gaiaSetNullValue(dbf_field); } else { switch (dbf_field->Type) { case 'N': if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) gaiaSetIntValue(dbf_field, sqlite3_column_int64(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) gaiaSetDoubleValue(dbf_field, sqlite3_column_double(stmt, i)); else gaiaSetNullValue(dbf_field); break; case 'C': if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) { strcpy(dummy, (char *) sqlite3_column_text(stmt, i)); gaiaSetStrValue(dbf_field, dummy); } else if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) { #if defined(_WIN32) || defined(__MINGW32__) // CAVEAT - M$ runtime doesn't supports %lld for 64 bits sprintf(dummy, "%I64d", sqlite3_column_int64(stmt, i)); #else sprintf(dummy, "%lld", sqlite3_column_int64(stmt, i)); #endif gaiaSetStrValue(dbf_field, dummy); } else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) { sprintf(dummy, "%1.6f", sqlite3_column_double(stmt, i)); gaiaSetStrValue(dbf_field, dummy); } else gaiaSetNullValue(dbf_field); break; }; } } if (!gaiaWriteShpEntity(shp, dbf_write)) { wxMessageBox(wxT("Shapefile write error"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } gaiaFreeDbfList(dbf_write); } else goto sql_error; } sqlite3_finalize(stmt); gaiaFlushShpHeaders(shp); gaiaFreeShapefile(shp); sprintf(dummy, "Exported %d rows into Shapefile", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); if (dbf_list) gaiaFreeDbfList(dbf_list); if (shp) gaiaFreeShapefile(shp); wxMessageBox(wxT("dump shapefile error:") + wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; no_file: // // shapefile can't be created/opened // if (dbf_list) gaiaFreeDbfList(dbf_list); if (shp) gaiaFreeShapefile(shp); wxMessageBox(wxT("ERROR: unable to open '") + path + wxT("' for writing"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; empty_result_set: // // the result set is empty - nothing to do // sqlite3_finalize(stmt); if (dbf_list) gaiaFreeDbfList(dbf_list); if (shp) gaiaFreeShapefile(shp); wxMessageBox(wxT ("The SQL SELECT returned an empty result set\n... there is nothing to export ..."), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; invalid_result_set: // // the result set is invalid - nothing to do // sqlite3_finalize(stmt); if (dbf_list) gaiaFreeDbfList(dbf_list); if (shp) gaiaFreeShapefile(shp); wxMessageBox(wxT ("The SQL SELECT returned an invalid result set\n... [not corresponding to the Shapefile format] ..."), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; invalid_geometry:sqlite3_finalize(stmt); if (dbf_list) gaiaFreeDbfList(dbf_list); if (shp) gaiaFreeShapefile(shp); wxMessageBox(wxT("Invalid GeometryType"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } ResultSetShapefileColumn::ResultSetShapefileColumn() { // constructor Name = NULL; NullCount = 0; TextCount = 0; MaxTextLen = 0; IntCount = 0; DoubleCount = 0; BlobCount = 0; DbfType = -1; First = NULL; Last = NULL; } ResultSetShapefileColumn::~ResultSetShapefileColumn() { // destructor ResultSetShapefileGeometry *pG; ResultSetShapefileGeometry *pGn; pG = First; while (pG) { pGn = pG->GetNext(); delete pG; pG = pGn; } if (Name) delete[]Name; } void ResultSetShapefileColumn::SetName(const char *name) { // setting the Column Name int len = strlen(name); if (Name) delete[]Name; Name = new char[len + 1]; strcpy(Name, name); } void ResultSetShapefileColumn::UpdateGeometry(gaiaGeomCollPtr geom) { // updating Geometry stats ResultSetShapefileGeometry *pG = First; while (pG) { if (pG->GetType() == geom->DeclaredType && pG->GetDims() == geom->DimensionModel && pG->GetSrid() == geom->Srid) { // updating an existing Geometry class pG->Update(); return; } pG = pG->GetNext(); } // inserting a new Geometry class pG = new ResultSetShapefileGeometry(geom->DeclaredType, geom->DimensionModel, geom->Srid); if (First == NULL) First = pG; if (Last != NULL) Last->SetNext(pG); Last = pG; } bool ResultSetShapefileColumn::Validate() { // validating a possible Shapefile column if (First == NULL) { // for sure, not a Geometry if (IntCount > 0 && DoubleCount == 0 && TextCount == 0 && BlobCount == 0) { // INTEGER DbfType = SQLITE_INTEGER; return true; } if (IntCount >= 0 && DoubleCount > 0 && TextCount == 0 && BlobCount == 0) { // DOUBLE DbfType = SQLITE_FLOAT; return true; } if (TextCount > 0) { DbfType = SQLITE_TEXT; if (IntCount > 0 && MaxTextLen < 18) MaxTextLen = 18; if (DoubleCount > 0 && MaxTextLen < 24) MaxTextLen = 24; return true; } DbfType = SQLITE_TEXT; MaxTextLen = 1; return true; } else { // this one is a Geometry if (First == Last) { switch (First->GetType()) { case GAIA_POINT: case GAIA_LINESTRING: case GAIA_POLYGON: case GAIA_MULTIPOINT: case GAIA_MULTILINESTRING: case GAIA_MULTIPOLYGON: DbfType = SQLITE_BLOB; return true; default: return false; }; } return false; } return false; } ResultSetShapefileAnalyzer::~ResultSetShapefileAnalyzer() { // destructor if (Columns) delete[]Columns; } void ResultSetShapefileAnalyzer::Init(int count) { // initializing columns if (Columns) delete[]Columns; ColumnCount = count; Columns = NULL; GeometryColumn = -1; if (count > 0) Columns = new ResultSetShapefileColumn[count]; } void ResultSetShapefileAnalyzer::SetColumnName(int column, const char *name) { // setting the name corresponding to some column if (column >= 0 && column < ColumnCount) Columns[column].SetName(name); } void ResultSetShapefileAnalyzer::UpdateNull(int column) { // updating stats for some Column if (column >= 0 && column < ColumnCount) Columns[column].UpdateNull(); } void ResultSetShapefileAnalyzer::UpdateText(int column, int len) { // updating stats for some Column if (column >= 0 && column < ColumnCount) Columns[column].UpdateText(len); } void ResultSetShapefileAnalyzer::UpdateInteger(int column) { // updating stats for some Column if (column >= 0 && column < ColumnCount) Columns[column].UpdateInteger(); } void ResultSetShapefileAnalyzer::UpdateDouble(int column) { // updating stats for some Column if (column >= 0 && column < ColumnCount) Columns[column].UpdateDouble(); } void ResultSetShapefileAnalyzer::UpdateBlob(int column) { // updating stats for some Column if (column >= 0 && column < ColumnCount) Columns[column].UpdateBlob(); } void ResultSetShapefileAnalyzer::UpdateGeometry(int column, gaiaGeomCollPtr geom) { // updating stats for some Column if (column >= 0 && column < ColumnCount) Columns[column].UpdateGeometry(geom); } ResultSetShapefileColumn *ResultSetShapefileAnalyzer::GetColumn(int column) { // retrieving a given Column by index if (column >= 0 && column < ColumnCount) return Columns + column; return NULL; } bool ResultSetShapefileAnalyzer::Validate() { // validating the ResultSet as Shapefile int i; int geoms = 0; int idx = -1; for (i = 0; i < ColumnCount; i++) { if (Columns[i].Validate() == false) return false; } for (i = 0; i < ColumnCount; i++) { if (Columns[i].GetDbfType() == SQLITE_BLOB) { // this one is a valid Geometry column geoms++; idx = i; } } if (geoms != 1) return false; GeometryColumn = idx; return true; } spatialite_gui-2.0.0-devel/RasterSymbolizers.cpp0000664000175000017500000063231212544026240016751 00000000000000/* / RasterSymbolizers.cpp / various dialog classes / / version 1.8, 2015 March 23 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/filename.h" #include "wx/colordlg.h" #include "wx/clipbrd.h" bool RasterSymbolizerContrastDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Normalize = true; Histogram = false; Gamma = false; MinScale = false; MaxScale = false; if (wxDialog::Create(parent, wxID_ANY, wxT("RasterSymbolizer: ContrastEnhancement")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterSymbolizerContrastDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the RasterSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the RasterSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the RasterSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the RasterSymbolizer Opacity wxBoxSizer *opacitySizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacitySizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *opacityLabel = new wxStaticText(this, wxID_STATIC, wxT("&Opacity:")); opacitySizer->Add(opacityLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(this, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fifth row: Contrast Enhancement wxBoxSizer *contrastSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(contrastSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString contrast[3]; contrast[0] = wxT("&Normalize/Stretch"); contrast[1] = wxT("&Histogram"); contrast[2] = wxT("&GammaValue"); wxRadioBox *contrastBox = new wxRadioBox(this, ID_SYMBOLIZER_CONTRAST, wxT("&Contrast Enhancement Method"), wxDefaultPosition, wxDefaultSize, 3, contrast, 1, wxRA_SPECIFY_ROWS); contrastSizer->Add(contrastBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); contrastBox->SetSelection(0); wxBoxSizer *gammaSizer = new wxBoxSizer(wxHORIZONTAL); contrastSizer->Add(gammaSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *gammaLabel = new wxStaticText(this, wxID_STATIC, wxT("&GammaValue [x100]:")); gammaSizer->Add(gammaLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *gammaCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_GAMMA, wxT("100"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 100, 500, 100); gammaCtrl->Enable(false); gammaSizer->Add(gammaCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // sixth row: optional Visibility Range wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(this, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(this, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerContrastDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerContrastDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerContrastDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerContrastDialog::OnCopy); Connect(ID_SYMBOLIZER_CONTRAST, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerContrastDialog::OnCmdModeChanged); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerContrastDialog::OnCmdScaleChanged); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerContrastDialog::OnCmdScaleChanged); } void RasterSymbolizerContrastDialog:: OnCmdModeChanged(wxCommandEvent & WXUNUSED(event)) { // // Contrast Enhancement Method selection changed // wxRadioBox *contrastCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_CONTRAST); wxSpinCtrl *gammaCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GAMMA); switch (contrastCtrl->GetSelection()) { case 0: Normalize = true; Histogram = false; Gamma = false; gammaCtrl->Enable(false); break; case 1: Normalize = false; Histogram = true; Gamma = false; gammaCtrl->Enable(false); break; case 2: Normalize = false; Histogram = false; Gamma = true; gammaCtrl->Enable(true); break; }; } void RasterSymbolizerContrastDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } bool RasterSymbolizerContrastDialog::RetrieveParams() { // // retrieving the RasterSymbolizer params // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the RasterSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); if (Title.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (Abstract.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); Opacity = opacityCtrl->GetValue() / 100.0; if (Gamma == true) { wxSpinCtrl *gammaCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GAMMA); GammaValue = gammaCtrl->GetValue() / 100.0; } else GammaValue = 1.0; if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } char *RasterSymbolizerContrastDialog::DoCreateCoverageXML() { // // creating the SLD/SE (XML) code - CoverageStyle // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Histogram == true) { xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else if (Gamma == true) { xml = sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev, GammaValue); sqlite3_free(prev); prev = xml; } else { xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *RasterSymbolizerContrastDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - RasterSymbolizer // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Histogram == true) { xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else if (Gamma == true) { xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, GammaValue); sqlite3_free(prev); prev = xml; } else { xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void RasterSymbolizerContrastDialog::OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the RasterSymbolizer into the DBMS // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertRasterSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void RasterSymbolizerContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the RasterSymbolizer as an external file // int ret; wxString path; wxString lastDir; if (RetrieveParams() == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE RasterSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void RasterSymbolizerContrastDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the RasterSymbolizer into the Clipboard // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void RasterSymbolizerContrastDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool MyFrame::ValidateRasterStyle(void **blob, int *blob_size, const char *xml) { // // attempting to parse and validate a Raster Style // int ret; sqlite3_stmt *stmt; void *xblob = NULL; int xblob_size; int valid = 0; // Schema validation const char *sql = "SELECT XB_Create(?, 1, 1)"; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, xml, strlen(xml), SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { const void *xxblob = sqlite3_column_blob(stmt, 0); xblob_size = sqlite3_column_bytes(stmt, 0); xblob = malloc(xblob_size); memcpy(xblob, xxblob, xblob_size); } } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (xblob == NULL) return false; // Checking if really is a Raster Style stmt = NULL; sql = "SELECT XB_IsSldSERasterStyle(?)"; ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) goto invalid; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, xblob, xblob_size, SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else goto invalid; } sqlite3_finalize(stmt); stmt = NULL; if (!valid) goto invalid; *blob = xblob; *blob_size = xblob_size; return true; invalid: if (stmt != NULL) sqlite3_finalize(stmt); free(xblob); *blob = NULL; *blob_size = 0; return false; } bool MyFrame::DoInsertRasterSymbolizer(char *xml) { // // attempting to register a RasterSymbolizer // void *blob = NULL; int blob_size; ::wxBeginBusyCursor(); if (ValidateRasterStyle(&blob, &blob_size, xml) != true) { ::wxEndBusyCursor(); wxMessageBox(wxT("Error: not a valid SLD/SE RasterSymbolizer"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(xml); return false; } ::wxEndBusyCursor(); sqlite3_free(xml); sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_RegisterRasterStyle(?)"; int ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, blob, blob_size, free); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { sqlite3_finalize(stmt); return false; } sqlite3_finalize(stmt); return true; } bool RasterSymbolizerChannelRgbDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Normalize = false; Histogram = false; Gamma = false; MinScale = false; MaxScale = false; if (wxDialog::Create(parent, wxID_ANY, wxT ("RasterSymbolizer: ChannelSelection (RGB: false-colors)")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterSymbolizerChannelRgbDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the RasterSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the RasterSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the RasterSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the RasterSymbolizer Opacity wxBoxSizer *opacitySizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacitySizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *opacityLabel = new wxStaticText(this, wxID_STATIC, wxT("&Opacity:")); opacitySizer->Add(opacityLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(this, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fifth row: ChannelSelection wxBoxSizer *channelBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(channelBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *channelBox = new wxStaticBox(this, wxID_STATIC, wxT ("Channel Selection (first Band is #1)"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *channelSizer = new wxStaticBoxSizer(channelBox, wxVERTICAL); channelBoxSizer->Add(channelSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *bandSizer = new wxBoxSizer(wxVERTICAL); channelSizer->Add(bandSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *redSizer = new wxBoxSizer(wxHORIZONTAL); bandSizer->Add(redSizer, 0, wxALIGN_RIGHT | wxALL, 3); wxStaticText *redLabel = new wxStaticText(this, wxID_STATIC, wxT("&Red Channel is Band #")); redSizer->Add(redLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *redCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_RED, wxT("1"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 1, 256, 1); redSizer->Add(redCtrl, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *greenSizer = new wxBoxSizer(wxHORIZONTAL); bandSizer->Add(greenSizer, 0, wxALIGN_RIGHT | wxALL, 3); wxStaticText *greenLabel = new wxStaticText(this, wxID_STATIC, wxT("&Green Channel is Band #")); greenSizer->Add(greenLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *greenCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_GREEN, wxT("2"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 1, 256, 2); greenSizer->Add(greenCtrl, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *blueSizer = new wxBoxSizer(wxHORIZONTAL); bandSizer->Add(blueSizer, 0, wxALIGN_RIGHT | wxALL, 3); wxStaticText *blueLabel = new wxStaticText(this, wxID_STATIC, wxT("&Blue Channel is Band #")); blueSizer->Add(blueLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *blueCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_BLUE, wxT("3"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 1, 256, 3); blueSizer->Add(blueCtrl, 0, wxALIGN_RIGHT | wxALL, 0); // sixth row: Contrast Enhancement wxBoxSizer *contrastSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(contrastSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString contrast[4]; contrast[0] = wxT("&None"); contrast[1] = wxT("Normalize/&Stretch"); contrast[2] = wxT("&Histogram"); contrast[3] = wxT("&GammaValue"); wxRadioBox *contrastBox = new wxRadioBox(this, ID_SYMBOLIZER_CONTRAST, wxT("&Contrast Enhancement Method"), wxDefaultPosition, wxDefaultSize, 4, contrast, 2, wxRA_SPECIFY_COLS); contrastSizer->Add(contrastBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); contrastBox->SetSelection(0); wxBoxSizer *gammaSizer = new wxBoxSizer(wxHORIZONTAL); contrastSizer->Add(gammaSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *gammaLabel = new wxStaticText(this, wxID_STATIC, wxT("&GammaValue [x100]:")); gammaSizer->Add(gammaLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *gammaCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_GAMMA, wxT("100"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 100, 500, 100); gammaCtrl->Enable(false); gammaSizer->Add(gammaCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // seventh row: optional Visibility Range wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(this, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(this, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerChannelRgbDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerChannelRgbDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerChannelRgbDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerChannelRgbDialog::OnCopy); Connect(ID_SYMBOLIZER_CONTRAST, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerChannelRgbDialog::OnCmdModeChanged); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerChannelRgbDialog::OnCmdScaleChanged); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerChannelRgbDialog::OnCmdScaleChanged); } void RasterSymbolizerChannelRgbDialog:: OnCmdModeChanged(wxCommandEvent & WXUNUSED(event)) { // // Contrast Enhancement Method selection changed // wxRadioBox *contrastCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_CONTRAST); wxSpinCtrl *gammaCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GAMMA); switch (contrastCtrl->GetSelection()) { case 0: Normalize = false; Histogram = false; Gamma = false; gammaCtrl->Enable(false); break; case 1: Normalize = true; Histogram = false; Gamma = false; gammaCtrl->Enable(false); break; case 2: Normalize = false; Histogram = true; Gamma = false; gammaCtrl->Enable(false); break; case 3: Normalize = false; Histogram = false; Gamma = true; gammaCtrl->Enable(true); break; }; } void RasterSymbolizerChannelRgbDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } bool RasterSymbolizerChannelRgbDialog::RetrieveParams() { // // retrieving the RasterSymbolizer params // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the RasterSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); if (Title.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (Abstract.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); Opacity = opacityCtrl->GetValue() / 100.0; wxSpinCtrl *redCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RED); RedBand = redCtrl->GetValue(); wxSpinCtrl *greenCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GREEN); GreenBand = greenCtrl->GetValue(); wxSpinCtrl *blueCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_BLUE); BlueBand = blueCtrl->GetValue(); if (Gamma == true) { wxSpinCtrl *gammaCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GAMMA); GammaValue = gammaCtrl->GetValue() / 100.0; } else GammaValue = 1.0; if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } char *RasterSymbolizerChannelRgbDialog::DoCreateCoverageXML() { // // creating the SLD/SE (XML) code - CoverageStyle // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\r\n\t\t\t\t\t%d", prev, RedBand); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t%d", prev, GreenBand); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t%d", prev, BlueBand); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Normalize == true || Histogram == true || Gamma == true) { xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Histogram == true) { xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else if (Gamma == true) { xml = sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev, GammaValue); sqlite3_free(prev); prev = xml; } else { xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *RasterSymbolizerChannelRgbDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - RasterSymbolizer // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n\t\t\t%d", prev, RedBand); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n\t\t\t%d", prev, GreenBand); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n\t\t\t%d", prev, BlueBand); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Normalize == true || Histogram == true || Gamma == true) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Histogram == true) { xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else if (Gamma == true) { xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, GammaValue); sqlite3_free(prev); prev = xml; } else { xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void RasterSymbolizerChannelRgbDialog:: OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the RasterSymbolizer into the DBMS // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertRasterSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void RasterSymbolizerChannelRgbDialog:: OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the RasterSymbolizer as an external file // int ret; wxString path; wxString lastDir; if (RetrieveParams() == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE RasterSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void RasterSymbolizerChannelRgbDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the RasterSymbolizer into the Clipboard // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void RasterSymbolizerChannelRgbDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool RasterSymbolizerChannelGrayDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Normalize = false; Histogram = false; Gamma = false; if (wxDialog::Create(parent, wxID_ANY, wxT ("RasterSymbolizer: ChannelSelection (single band, Grayscale)")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterSymbolizerChannelGrayDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the RasterSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the RasterSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the RasterSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the RasterSymbolizer Opacity wxBoxSizer *opacitySizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacitySizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *opacityLabel = new wxStaticText(this, wxID_STATIC, wxT("&Opacity:")); opacitySizer->Add(opacityLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(this, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fifth row: ChannelSelection wxBoxSizer *channelBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(channelBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *channelBox = new wxStaticBox(this, wxID_STATIC, wxT ("Channel Selection (first Band is #1)"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *channelSizer = new wxStaticBoxSizer(channelBox, wxVERTICAL); channelBoxSizer->Add(channelSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *bandSizer = new wxBoxSizer(wxVERTICAL); channelSizer->Add(bandSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *graySizer = new wxBoxSizer(wxHORIZONTAL); bandSizer->Add(graySizer, 0, wxALIGN_RIGHT | wxALL, 3); wxStaticText *grayLabel = new wxStaticText(this, wxID_STATIC, wxT("&Gray Channel is Band #")); graySizer->Add(grayLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *grayCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_GRAY, wxT("1"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 1, 256, 1); graySizer->Add(grayCtrl, 0, wxALIGN_RIGHT | wxALL, 0); // sixth row: Contrast Enhancement wxBoxSizer *contrastSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(contrastSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString contrast[4]; contrast[0] = wxT("&None"); contrast[1] = wxT("Normalize/&Stretch"); contrast[2] = wxT("&Histogram"); contrast[3] = wxT("&GammaValue"); wxRadioBox *contrastBox = new wxRadioBox(this, ID_SYMBOLIZER_CONTRAST, wxT("&Contrast Enhancement Method"), wxDefaultPosition, wxDefaultSize, 4, contrast, 2, wxRA_SPECIFY_COLS); contrastSizer->Add(contrastBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); contrastBox->SetSelection(0); wxBoxSizer *gammaSizer = new wxBoxSizer(wxHORIZONTAL); contrastSizer->Add(gammaSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *gammaLabel = new wxStaticText(this, wxID_STATIC, wxT("&GammaValue [x100]:")); gammaSizer->Add(gammaLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *gammaCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_GAMMA, wxT("100"), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 100, 500, 100); gammaCtrl->Enable(false); gammaSizer->Add(gammaCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // seventh row: optional Visibility Range wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(this, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(this, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerChannelGrayDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerChannelGrayDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerChannelGrayDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerChannelGrayDialog::OnCopy); Connect(ID_SYMBOLIZER_CONTRAST, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerChannelGrayDialog::OnCmdModeChanged); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerChannelGrayDialog::OnCmdScaleChanged); } void RasterSymbolizerChannelGrayDialog:: OnCmdModeChanged(wxCommandEvent & WXUNUSED(event)) { // // Contrast Enhancement Method selection changed // wxRadioBox *contrastCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_CONTRAST); wxSpinCtrl *gammaCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GAMMA); switch (contrastCtrl->GetSelection()) { case 0: Normalize = false; Histogram = false; Gamma = false; gammaCtrl->Enable(false); break; case 1: Normalize = true; Histogram = false; Gamma = false; gammaCtrl->Enable(false); break; case 2: Normalize = false; Histogram = true; Gamma = false; gammaCtrl->Enable(false); break; case 3: Normalize = false; Histogram = false; Gamma = true; gammaCtrl->Enable(true); break; }; } void RasterSymbolizerChannelGrayDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } bool RasterSymbolizerChannelGrayDialog::RetrieveParams() { // // retrieving the RasterSymbolizer params // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the RasterSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); if (Title.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (Abstract.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); Opacity = opacityCtrl->GetValue() / 100.0; wxSpinCtrl *grayCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GRAY); GrayBand = grayCtrl->GetValue(); if (Gamma == true) { wxSpinCtrl *gammaCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_GAMMA); GammaValue = gammaCtrl->GetValue() / 100.0; } else GammaValue = 1.0; if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } char *RasterSymbolizerChannelGrayDialog::DoCreateCoverageXML() { // // creating the SLD/SE (XML) code - CoverageStyle // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\r\n\t\t\t\t\t%d", prev, GrayBand); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Normalize == true || Histogram == true || Gamma == true) { xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Histogram == true) { xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else if (Gamma == true) { xml = sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev, GammaValue); sqlite3_free(prev); prev = xml; } else { xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *RasterSymbolizerChannelGrayDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - RasterSymbolizer // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n\t\t\t%d", prev, GrayBand); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Normalize == true || Histogram == true || Gamma == true) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Histogram == true) { xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else if (Gamma == true) { xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, GammaValue); sqlite3_free(prev); prev = xml; } else { xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void RasterSymbolizerChannelGrayDialog:: OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the RasterSymbolizer into the DBMS // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertRasterSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void RasterSymbolizerChannelGrayDialog:: OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the RasterSymbolizer as an external file // int ret; wxString path; wxString lastDir; if (RetrieveParams() == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE RasterSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void RasterSymbolizerChannelGrayDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the RasterSymbolizer into the Clipboard // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void RasterSymbolizerChannelGrayDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool RasterSymbolizerShadedReliefDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; MinScale = false; MaxScale = false; if (wxDialog::Create(parent, wxID_ANY, wxT ("RasterSymbolizer: Shaded Relief (brightness only)")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterSymbolizerShadedReliefDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the RasterSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the RasterSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the RasterSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the RasterSymbolizer Opacity wxBoxSizer *opacitySizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacitySizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *opacityLabel = new wxStaticText(this, wxID_STATIC, wxT("&Opacity:")); opacitySizer->Add(opacityLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(this, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fifth row: the Relief Factor wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *shadedBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(shadedBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *shadedBox = new wxStaticBox(this, wxID_STATIC, wxT("Shaded Relief"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *shadedSizer = new wxStaticBoxSizer(shadedBox, wxHORIZONTAL); shadedBoxSizer->Add(shadedSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *reliefSizer = new wxBoxSizer(wxVERTICAL); shadedSizer->Add(reliefSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *reliefLabel = new wxStaticText(this, wxID_STATIC, wxT("&Relief Factor:")); reliefSizer->Add(reliefLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *reliefCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_RELIEF, wxT(""), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 1, 200, 25); reliefSizer->Add(reliefCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // sixth row: optional Visibility Range miscSizer->AddSpacer(25); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(this, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(this, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerShadedReliefDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerShadedReliefDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerShadedReliefDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerShadedReliefDialog::OnCopy); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerShadedReliefDialog::OnCmdScaleChanged); } bool RasterSymbolizerShadedReliefDialog::RetrieveParams() { // // retrieving the RasterSymbolizer params // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the RasterSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); if (Title.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (Abstract.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); Opacity = opacityCtrl->GetValue() / 100.0; wxSpinCtrl *reliefCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RELIEF); ReliefFactor = reliefCtrl->GetValue(); if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } void RasterSymbolizerShadedReliefDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } char *RasterSymbolizerShadedReliefDialog::DoCreateCoverageXML() { // // creating the SLD/SE (XML) code - CoverageStyle // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t1\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev, ReliefFactor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *RasterSymbolizerShadedReliefDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - RasterSymbolizer // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t1\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, ReliefFactor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void RasterSymbolizerShadedReliefDialog:: OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the RasterSymbolizer into the DBMS // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertRasterSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void RasterSymbolizerShadedReliefDialog:: OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the RasterSymbolizer as an external file // int ret; wxString path; wxString lastDir; if (RetrieveParams() == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE RasterSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void RasterSymbolizerShadedReliefDialog:: OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the RasterSymbolizer into the Clipboard // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void RasterSymbolizerShadedReliefDialog:: OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool ColorMapEntry::IsValidColor(wxString & color) { // testing an HexRGB color for validity if (color.Len() != 7) return false; char hex[64]; strcpy(hex, color.ToUTF8()); if (*(hex + 0) != '#') return false; for (int i = 1; i <= 6; i++) { char x = *(hex + i); if (x >= '0' && x <= '9') continue; if (x >= 'a' && x <= 'f') continue; if (x >= 'A' && x <= 'F') continue; return false; } return true; } unsigned char ColorMapEntry::ParseHex(unsigned char hi, unsigned char lo) { // parsing an HEX color unsigned char byte; switch (hi) { case '0': byte = 16 * 0; break; case '1': byte = 16 * 1; break; case '2': byte = 16 * 2; break; case '3': byte = 16 * 3; break; case '4': byte = 16 * 4; break; case '5': byte = 16 * 5; break; case '6': byte = 16 * 6; break; case '7': byte = 16 * 7; break; case '8': byte = 16 * 8; break; case '9': byte = 16 * 9; break; case 'a': case 'A': byte = 16 * 10; break; case 'b': case 'B': byte = 16 * 11; break; case 'c': case 'C': byte = 16 * 12; break; case 'd': case 'D': byte = 16 * 13; break; case 'e': case 'E': byte = 16 * 14; break; case 'f': case 'F': byte = 16 * 15; break; }; switch (lo) { case '0': byte += 0; break; case '1': byte += 1; break; case '2': byte += 2; break; case '3': byte += 3; break; case '4': byte += 4; break; case '5': byte += 5; break; case '6': byte += 6; break; case '7': byte += 7; break; case '8': byte += 8; break; case '9': byte += 9; break; case 'a': case 'A': byte += 10; break; case 'b': case 'B': byte += 11; break; case 'c': case 'C': byte += 12; break; case 'd': case 'D': byte += 13; break; case 'e': case 'E': byte += 14; break; case 'f': case 'F': byte += 15; break; }; return byte; } void ColorMapEntry::GetWxColor(wxString & color, wxColour & clr) { // return a wxWidger color from an HexRGB color if (IsValidColor(color) == false) { clr = wxColour(0, 0, 0); return; } char hex[64]; strcpy(hex, color.ToUTF8()); unsigned char red = ParseHex(*(hex + 1), *(hex + 2)); unsigned char green = ParseHex(*(hex + 3), *(hex + 4)); unsigned char blue = ParseHex(*(hex + 5), *(hex + 6)); clr = wxColour(red, green, blue); } ColorMapCategorize::~ColorMapCategorize() { // dtor ColorMapEntry *pE; ColorMapEntry *pEn; pE = First; while (pE != NULL) { pEn = pE->GetNext(); delete pE; pE = pEn; } } void ColorMapCategorize::Add(double value, wxString & color) { // adding a new Entry into the Map by searching the appropriate position // or updating an already existing Entry ColorMapEntry *pE; ColorMapEntry *pEnew; pE = First; while (pE != NULL) { if (pE->GetValue() == value) { // updating an already defined Entry pE->SetColor(color); return; } pE = pE->GetNext(); } // inserting a new Entry bool is_first = false; if (First == NULL) is_first = true; else if (value < First->GetValue()) is_first = true; if (is_first == true) { // inserting at the beginning of the Map pEnew = new ColorMapEntry(value, color); if (First == NULL) { First = pEnew; Last = pEnew; return; } First->SetPrev(pEnew); pEnew->SetNext(First); First = pEnew; return; } pE = First; while (pE != NULL) { // searching the appropriate position into the Map if (value < pE->GetValue()) { pEnew = new ColorMapEntry(value, color); pE->GetPrev()->SetNext(pEnew); pEnew->SetPrev(pE->GetPrev()); pEnew->SetNext(pE); pE->SetPrev(pEnew); return; } pE = pE->GetNext(); } // last item pEnew = new ColorMapEntry(value, color); pEnew->SetPrev(Last); Last->SetNext(pEnew); Last = pEnew; } void ColorMapCategorize::Remove(double value) { // removing an Entry from the Map ColorMapEntry *pE; pE = First; while (pE != NULL) { if (pE->GetValue() == value) { if (pE == First && pE == Last) { // removing the unique Entry First = NULL; Last = NULL; delete pE; } else if (pE == First) { // removing the first Entry pE->GetNext()->SetPrev(NULL); First = pE->GetNext(); delete pE; } else if (pE == Last) { // removing the last Entry pE->GetPrev()->SetNext(NULL); Last = pE->GetPrev(); delete pE; } else { // removing any other Entry pE->GetPrev()->SetNext(pE->GetNext()); pE->GetNext()->SetPrev(pE->GetPrev()); delete pE; } break; } pE = pE->GetNext(); } } bool RasterSymbolizerCategorizeDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; ShadedRelief = false; MinScale = false; MaxScale = false; if (wxDialog::Create(parent, wxID_ANY, wxT ("RasterSymbolizer: Color Map - Categorize")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterSymbolizerCategorizeDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the RasterSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the RasterSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the RasterSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the RasterSymbolizer Opacity wxBoxSizer *opacitySizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacitySizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *opacityLabel = new wxStaticText(this, wxID_STATIC, wxT("&Opacity:")); opacitySizer->Add(opacityLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(this, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: GRID to show the Color Map wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Color Map"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SYMBOLIZER_MAP, wxDefaultPosition, wxSize(380, 250), wxALWAYS_SHOW_SB); GridCtrl->CreateGrid(1, 4, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Min Value")); GridCtrl->SetColLabelValue(1, wxT("Max Value")); GridCtrl->SetColLabelValue(2, wxT("Color")); GridCtrl->SetColLabelValue(3, wxT("Sample")); GridCtrl->SetRowLabelValue(0, wxT("1")); wxString cell = wxT("-Infinite"); GridCtrl->SetCellValue(0, 0, cell); GridCtrl->SetCellAlignment(0, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); cell = wxT("+Infinite"); GridCtrl->SetCellValue(0, 1, cell); GridCtrl->SetCellAlignment(0, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(0, 2, Map.GetFirstColor()); wxColour color; ColorMapEntry::GetWxColor(Map.GetFirstColor(), color); GridCtrl->SetCellBackgroundColour(0, 3, color); GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // extra Map items wxBoxSizer *extraBoxSizer = new wxBoxSizer(wxVERTICAL); gridSizer->Add(extraBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *entryBox = new wxStaticBox(this, wxID_STATIC, wxT("Map Entry"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *entrySizer = new wxStaticBoxSizer(entryBox, wxHORIZONTAL); extraBoxSizer->Add(entrySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *entry1Sizer = new wxBoxSizer(wxVERTICAL); entrySizer->Add(entry1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *entry2Sizer = new wxBoxSizer(wxVERTICAL); entrySizer->Add(entry2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *valueSizer = new wxBoxSizer(wxHORIZONTAL); entry1Sizer->Add(valueSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *valueLabel = new wxStaticText(this, wxID_STATIC, wxT("&Threshold:")); valueSizer->Add(valueLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *valueCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_VALUE, wxT("0.00"), wxDefaultPosition, wxSize(100, 22)); valueSizer->Add(valueCtrl, 0, wxALIGN_RIGHT | wxALL, 2); wxBoxSizer *colorSizer = new wxBoxSizer(wxHORIZONTAL); entry1Sizer->Add(colorSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colorLabel = new wxStaticText(this, wxID_STATIC, wxT("&Color:")); colorSizer->Add(colorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *colorCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_COLOR, wxT("#000000"), wxDefaultPosition, wxSize(100, 22)); colorSizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 2); wxButton *add = new wxButton(this, ID_SYMBOLIZER_ADD, wxT("&Update Map")); entry2Sizer->Add(add, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *pickerBox = new wxStaticBox(this, wxID_STATIC, wxT("Color Picker"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); wxBoxSizer *pickerSizer = new wxStaticBoxSizer(pickerBox, wxHORIZONTAL); extraBoxSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *pick = new wxButton(this, ID_SYMBOLIZER_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *pickerCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_PICKER_HEX, wxT(""), wxDefaultPosition, wxSize(100, 22)); pickerSizer->Add(pickerCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // sixth row: optional Shaded Relief wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *shadedBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(shadedBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *shadedBox = new wxStaticBox(this, wxID_STATIC, wxT("Shaded Relief"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *shadedSizer = new wxStaticBoxSizer(shadedBox, wxHORIZONTAL); shadedBoxSizer->Add(shadedSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *reliefSizer = new wxBoxSizer(wxVERTICAL); shadedSizer->Add(reliefSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxCheckBox *shadedCtrl = new wxCheckBox(this, ID_SYMBOLIZER_SHADED, wxT("Shaded Relief"), wxDefaultPosition, wxDefaultSize); reliefSizer->Add(shadedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *relief2Sizer = new wxBoxSizer(wxHORIZONTAL); reliefSizer->Add(relief2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *reliefLabel = new wxStaticText(this, wxID_STATIC, wxT("&Relief Factor:")); relief2Sizer->Add(reliefLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *reliefCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_RELIEF, wxT(""), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 0, 0, 0); reliefCtrl->Enable(false); relief2Sizer->Add(reliefCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // seventh row: optional Visibility Range miscSizer->AddSpacer(75); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(this, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(this, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Export to file")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnCopy); Connect(ID_SYMBOLIZER_SHADED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnShadedChanged); Connect(ID_SYMBOLIZER_ADD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnCmdAdd); Connect(ID_SYMBOLIZER_REMOVE, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnCmdRemove); Connect(ID_SYMBOLIZER_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnCmdColorPicker); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnRightClick); Connect(wxID_ANY, wxEVT_GRID_SELECT_CELL, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnCellSelected); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerCategorizeDialog::OnCmdScaleChanged); } void RasterSymbolizerCategorizeDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } void RasterSymbolizerCategorizeDialog::RefreshGrid() { // // refreshing the Grid // int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); int count = 1; ColorMapEntry *pE = Map.GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl->AppendRows(count); count = 1; char dummy[1024]; wxString cell; wxString last = wxT("-Infinite"); GridCtrl->SetCellValue(0, 0, last); GridCtrl->SetCellAlignment(0, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); pE = Map.GetFirst(); if (pE != NULL) { sprintf(dummy, "%1.6f", pE->GetValue()); cell = wxString::FromUTF8(dummy); } else cell = wxT("+Infinite"); GridCtrl->SetCellValue(0, 1, cell); last = cell; GridCtrl->SetCellAlignment(0, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(0, 2, Map.GetFirstColor()); wxColour color; ColorMapEntry::GetWxColor(Map.GetFirstColor(), color); GridCtrl->SetCellBackgroundColour(0, 3, color); pE = Map.GetFirst(); while (pE) { // feeding grid rows GridCtrl->SetCellValue(count, 0, last); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); ColorMapEntry *pEn = pE->GetNext(); if (pEn == NULL) cell = wxT("+Infinite"); else { sprintf(dummy, "%1.6f", pEn->GetValue()); cell = wxString::FromUTF8(dummy); } GridCtrl->SetCellValue(count, 1, cell); last = cell; GridCtrl->SetCellAlignment(count, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 2, pE->GetColor()); ColorMapEntry::GetWxColor(pE->GetColor(), color); GridCtrl->SetCellBackgroundColour(count, 3, color); count++; pE = pE->GetNext(); } GridCtrl->AutoSizeColumns(); } void RasterSymbolizerCategorizeDialog::OnCellSelected(wxGridEvent & event) { // // cell selection changed // CurrentRow = event.GetRow(); wxString value = GridCtrl->GetCellValue(CurrentRow, 0); wxString color = GridCtrl->GetCellValue(CurrentRow, 2); wxTextCtrl *valueCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_VALUE); valueCtrl->SetValue(value); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR); colorCtrl->SetValue(color); if (CurrentRow == 0) valueCtrl->Enable(false); } void RasterSymbolizerCategorizeDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentRow = event.GetRow(); if (CurrentRow == 0) return; GridCtrl->SelectRow(CurrentRow); wxString value = GridCtrl->GetCellValue(CurrentRow, 0); double val; value.ToDouble(&val); CurrentValue = val; menuItem = new wxMenuItem(&menu, ID_SYMBOLIZER_REMOVE, wxT("&Remove Entry")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void RasterSymbolizerCategorizeDialog:: OnCmdAdd(wxCommandEvent & WXUNUSED(event)) { // // adding a new Map Entry // wxTextCtrl *valueCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_VALUE); wxString value = valueCtrl->GetValue(); double val; if (valueCtrl->IsEnabled() == true) { if (value.ToDouble(&val) != true) { wxMessageBox(wxT ("VALUE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { wxMessageBox(wxT ("COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (valueCtrl->IsEnabled() == true) Map.Add(val, color); else Map.SetFirstColor(color); RefreshGrid(); valueCtrl->SetValue(wxT("")); valueCtrl->Enable(true); colorCtrl->SetValue(wxT("")); } void RasterSymbolizerCategorizeDialog:: OnCmdRemove(wxCommandEvent & WXUNUSED(event)) { // // removing a Map Entry // Map.Remove(CurrentValue); RefreshGrid(); } void RasterSymbolizerCategorizeDialog:: OnShadedChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Shaded Relief (on/off): // wxCheckBox *shadedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_SHADED); wxSpinCtrl *reliefCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RELIEF); if (shadedCtrl->IsChecked() == true) { reliefCtrl->SetRange(1, 200); reliefCtrl->SetValue(25); reliefCtrl->Enable(true); ShadedRelief = true; } else { reliefCtrl->SetRange(0, 0); reliefCtrl->SetValue(0); reliefCtrl->Enable(false); ShadedRelief = false; } } void RasterSymbolizerCategorizeDialog:: OnCmdColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *pickerCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_PICKER_HEX); wxColour clr = wxNullColour; wxString str = pickerCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); pickerCtrl->SetValue(str); } } bool RasterSymbolizerCategorizeDialog::RetrieveParams() { // // retrieving the RasterSymbolizer params // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the RasterSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); if (Title.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (Abstract.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); Opacity = opacityCtrl->GetValue() / 100.0; if (ShadedRelief == true) { wxSpinCtrl *reliefCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RELIEF); ReliefFactor = reliefCtrl->GetValue(); } if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } char *RasterSymbolizerCategorizeDialog::DoCreateCoverageXML() { // // creating the SLD/SE (XML) code - CoverageStyle // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\tRasterdata\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Map.GetFirstColor().ToUTF8()) + 1]; strcpy(str, Map.GetFirstColor().ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; ColorMapEntry *pE = Map.GetFirst(); while (pE != NULL) { xml = sqlite3_mprintf("%s\t\t\t\t\t%1.6f\r\n", prev, pE->GetValue()); sqlite3_free(prev); prev = xml; str = new char[strlen(pE->GetColor().ToUTF8()) + 1]; strcpy(str, pE->GetColor().ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; pE = pE->GetNext(); } xml = sqlite3_mprintf("%s\t\t\t\t\r\n\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (ShadedRelief == true) { xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev, ReliefFactor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *RasterSymbolizerCategorizeDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - RasterSymbolizer // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\r\n\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\tRasterdata\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Map.GetFirstColor().ToUTF8()) + 1]; strcpy(str, Map.GetFirstColor().ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; ColorMapEntry *pE = Map.GetFirst(); while (pE != NULL) { xml = sqlite3_mprintf("%s\t\t\t%1.6f\r\n", prev, pE->GetValue()); sqlite3_free(prev); prev = xml; str = new char[strlen(pE->GetColor().ToUTF8()) + 1]; strcpy(str, pE->GetColor().ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; pE = pE->GetNext(); } xml = sqlite3_mprintf("%s\t\t\r\n\t\r\n", prev); sqlite3_free(prev); prev = xml; if (ShadedRelief == true) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, ReliefFactor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void RasterSymbolizerCategorizeDialog:: OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the RasterSymbolizer into the DBMS // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertRasterSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void RasterSymbolizerCategorizeDialog:: OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the RasterSymbolizer as an external file // int ret; wxString path; wxString lastDir; if (RetrieveParams() == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE RasterSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void RasterSymbolizerCategorizeDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the RasterSymbolizer into the Clipboard // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void RasterSymbolizerCategorizeDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } ColorMapInterpolate::~ColorMapInterpolate() { // dtor ColorMapEntry *pE; ColorMapEntry *pEn; pE = First; while (pE != NULL) { pEn = pE->GetNext(); delete pE; pE = pEn; } } void ColorMapInterpolate::Add(double value, wxString & color) { // adding a new Entry into the Map by searching the appropriate position // or updating an already existing Entry ColorMapEntry *pE; ColorMapEntry *pEnew; pE = First; while (pE != NULL) { if (pE->GetValue() == value) { // updating an already defined Entry pE->SetColor(color); return; } pE = pE->GetNext(); } // inserting a new Entry bool is_first = false; if (First == NULL) is_first = true; else if (value < First->GetValue()) is_first = true; if (is_first == true) { // inserting at the beginning of the Map pEnew = new ColorMapEntry(value, color); if (First == NULL) { First = pEnew; Last = pEnew; return; } First->SetPrev(pEnew); pEnew->SetNext(First); First = pEnew; return; } pE = First; while (pE != NULL) { // searching the appropriate position into the Map if (value < pE->GetValue()) { pEnew = new ColorMapEntry(value, color); pE->GetPrev()->SetNext(pEnew); pEnew->SetPrev(pE->GetPrev()); pEnew->SetNext(pE); pE->SetPrev(pEnew); return; } pE = pE->GetNext(); } // last item pEnew = new ColorMapEntry(value, color); pEnew->SetPrev(Last); Last->SetNext(pEnew); Last = pEnew; } void ColorMapInterpolate::Remove(double value) { // removing an Entry from the Map ColorMapEntry *pE; pE = First; while (pE != NULL) { if (pE->GetValue() == value) { if (pE == First && pE == Last) { // removing the unique Entry First = NULL; Last = NULL; delete pE; } else if (pE == First) { // removing the first Entry pE->GetNext()->SetPrev(NULL); First = pE->GetNext(); delete pE; } else if (pE == Last) { // removing the last Entry pE->GetPrev()->SetNext(NULL); Last = pE->GetPrev(); delete pE; } else { // removing any other Entry pE->GetPrev()->SetNext(pE->GetNext()); pE->GetNext()->SetPrev(pE->GetPrev()); delete pE; } break; } pE = pE->GetNext(); } } bool RasterSymbolizerInterpolateDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Fallback = wxT("#ffffff"); ShadedRelief = false; MinScale = false; MaxScale = false; if (wxDialog::Create(parent, wxID_ANY, wxT ("RasterSymbolizer: Color Map - Interpolate")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterSymbolizerInterpolateDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the RasterSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the RasterSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the RasterSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the RasterSymbolizer Opacity wxBoxSizer *opacitySizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacitySizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *opacityLabel = new wxStaticText(this, wxID_STATIC, wxT("&Opacity:")); opacitySizer->Add(opacityLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(this, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: GRID to show the Color Map wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Color Map"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SYMBOLIZER_MAP, wxDefaultPosition, wxSize(280, 250), wxALWAYS_SHOW_SB); GridCtrl->CreateGrid(1, 3, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Value")); GridCtrl->SetColLabelValue(1, wxT("Color")); GridCtrl->SetColLabelValue(2, wxT("Sample")); GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // extra Map items wxBoxSizer *extraBoxSizer = new wxBoxSizer(wxVERTICAL); gridSizer->Add(extraBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *baseBox = new wxStaticBox(this, wxID_STATIC, wxT("Fallback Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *baseSizer = new wxStaticBoxSizer(baseBox, wxHORIZONTAL); extraBoxSizer->Add(baseSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fallbackSizer = new wxBoxSizer(wxHORIZONTAL); baseSizer->Add(fallbackSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *fallbackCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_FALLBACK, Fallback, wxDefaultPosition, wxSize(100, 22)); fallbackSizer->Add(fallbackCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticBox *entryBox = new wxStaticBox(this, wxID_STATIC, wxT("Color Map Entry"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *entrySizer = new wxStaticBoxSizer(entryBox, wxHORIZONTAL); extraBoxSizer->Add(entrySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *entry1Sizer = new wxBoxSizer(wxVERTICAL); entrySizer->Add(entry1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *entry2Sizer = new wxBoxSizer(wxVERTICAL); entrySizer->Add(entry2Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *valueSizer = new wxBoxSizer(wxHORIZONTAL); entry1Sizer->Add(valueSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *valueLabel = new wxStaticText(this, wxID_STATIC, wxT("&Value:")); valueSizer->Add(valueLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *valueCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_VALUE, wxT("0.00"), wxDefaultPosition, wxSize(100, 22)); valueSizer->Add(valueCtrl, 0, wxALIGN_RIGHT | wxALL, 2); wxBoxSizer *colorSizer = new wxBoxSizer(wxHORIZONTAL); entry1Sizer->Add(colorSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colorLabel = new wxStaticText(this, wxID_STATIC, wxT("&Color:")); colorSizer->Add(colorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *colorCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_COLOR, wxT("#000000"), wxDefaultPosition, wxSize(100, 22)); colorSizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 2); wxButton *add = new wxButton(this, ID_SYMBOLIZER_ADD, wxT("&Update Map")); entry2Sizer->Add(add, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticBox *pickerBox = new wxStaticBox(this, wxID_STATIC, wxT("Color Picker"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); wxBoxSizer *pickerSizer = new wxStaticBoxSizer(pickerBox, wxHORIZONTAL); extraBoxSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *pick = new wxButton(this, ID_SYMBOLIZER_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *pickerCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_PICKER_HEX, wxT(""), wxDefaultPosition, wxSize(100, 22)); pickerSizer->Add(pickerCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // sixth row: optional Shaded Relief wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *shadedBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(shadedBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *shadedBox = new wxStaticBox(this, wxID_STATIC, wxT("Shaded Relief"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *shadedSizer = new wxStaticBoxSizer(shadedBox, wxHORIZONTAL); shadedBoxSizer->Add(shadedSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *reliefSizer = new wxBoxSizer(wxVERTICAL); shadedSizer->Add(reliefSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxCheckBox *shadedCtrl = new wxCheckBox(this, ID_SYMBOLIZER_SHADED, wxT("Shaded Relief"), wxDefaultPosition, wxDefaultSize); reliefSizer->Add(shadedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *relief2Sizer = new wxBoxSizer(wxHORIZONTAL); reliefSizer->Add(relief2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *reliefLabel = new wxStaticText(this, wxID_STATIC, wxT("&Relief Factor:")); relief2Sizer->Add(reliefLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *reliefCtrl = new wxSpinCtrl(this, ID_SYMBOLIZER_RELIEF, wxT(""), wxDefaultPosition, wxSize(80, 22), wxSP_ARROW_KEYS, 0, 0, 0); reliefCtrl->Enable(false); relief2Sizer->Add(reliefCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // seventh row: optional Visibility Range miscSizer->AddSpacer(50); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(this, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(this, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnCopy); Connect(ID_SYMBOLIZER_SHADED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnShadedChanged); Connect(ID_SYMBOLIZER_ADD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnCmdAdd); Connect(ID_SYMBOLIZER_REMOVE, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnCmdRemove); Connect(ID_SYMBOLIZER_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnCmdColorPicker); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnRightClick); Connect(wxID_ANY, wxEVT_GRID_SELECT_CELL, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnCellSelected); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerInterpolateDialog::OnCmdScaleChanged); } void RasterSymbolizerInterpolateDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } void RasterSymbolizerInterpolateDialog::RefreshGrid() { // // refreshing the Grid // int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); int count = 0; ColorMapEntry *pE = Map.GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl->AppendRows(count); count = 0; char dummy[1024]; wxString cell; pE = Map.GetFirst(); while (pE) { // feeding grid rows sprintf(dummy, "%1.6f", pE->GetValue()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pE->GetColor()); wxColour color; ColorMapEntry::GetWxColor(pE->GetColor(), color); GridCtrl->SetCellBackgroundColour(count, 2, color); count++; pE = pE->GetNext(); } GridCtrl->AutoSizeColumns(); } void RasterSymbolizerInterpolateDialog::OnCellSelected(wxGridEvent & event) { // // cell selection changed // CurrentRow = event.GetRow(); if (CurrentRow == 0) return; wxString value = GridCtrl->GetCellValue(CurrentRow, 0); wxString color = GridCtrl->GetCellValue(CurrentRow, 1); wxTextCtrl *valueCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_VALUE); valueCtrl->SetValue(value); wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR); colorCtrl->SetValue(color); } void RasterSymbolizerInterpolateDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentRow = event.GetRow(); if (CurrentRow == 0) return; GridCtrl->SelectRow(CurrentRow); wxString value = GridCtrl->GetCellValue(CurrentRow, 0); double val; value.ToDouble(&val); CurrentValue = val; menuItem = new wxMenuItem(&menu, ID_SYMBOLIZER_REMOVE, wxT("&Remove Entry")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void RasterSymbolizerInterpolateDialog:: OnCmdAdd(wxCommandEvent & WXUNUSED(event)) { // // adding a new Map Entry // wxTextCtrl *valueCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_VALUE); wxString value = valueCtrl->GetValue(); double val; if (value.ToDouble(&val) != true) { wxMessageBox(wxT ("VALUE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { wxMessageBox(wxT ("COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } Map.Add(val, color); RefreshGrid(); } void RasterSymbolizerInterpolateDialog:: OnCmdRemove(wxCommandEvent & WXUNUSED(event)) { // // removing a Map Entry // Map.Remove(CurrentValue); RefreshGrid(); } void RasterSymbolizerInterpolateDialog:: OnShadedChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Shaded Relief (on/off): // wxCheckBox *shadedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_SHADED); wxSpinCtrl *reliefCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RELIEF); if (shadedCtrl->IsChecked() == true) { reliefCtrl->SetRange(1, 200); reliefCtrl->SetValue(25); reliefCtrl->Enable(true); ShadedRelief = true; } else { reliefCtrl->SetRange(0, 0); reliefCtrl->SetValue(0); reliefCtrl->Enable(false); ShadedRelief = false; } } void RasterSymbolizerInterpolateDialog:: OnCmdColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *pickerCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_PICKER_HEX); wxColour clr = wxNullColour; wxString str = pickerCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); pickerCtrl->SetValue(str); } } bool RasterSymbolizerInterpolateDialog::RetrieveParams() { // // retrieving the RasterSymbolizer params // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the RasterSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); if (Title.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (Abstract.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); Opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *fallbackCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FALLBACK); Fallback = fallbackCtrl->GetValue(); if (ColorMapEntry::IsValidColor(Fallback) != true) { wxMessageBox(wxT ("FALLBACK isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (ShadedRelief == true) { wxSpinCtrl *reliefCtrl = (wxSpinCtrl *) FindWindow(ID_SYMBOLIZER_RELIEF); ReliefFactor = reliefCtrl->GetValue(); } if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } char *RasterSymbolizerInterpolateDialog::DoCreateCoverageXML() { // // creating the SLD/SE (XML) code - CoverageStyle // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; str = new char[strlen(Fallback.ToUTF8()) + 1]; strcpy(str, Fallback.ToUTF8()); xml = sqlite3_mprintf ("%s\t\r\n\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\tRasterdata\r\n", prev); sqlite3_free(prev); prev = xml; ColorMapEntry *pE = Map.GetFirst(); while (pE != NULL) { xml = sqlite3_mprintf ("%s\t\t\t\r\n\t\t\t\t\t\t%1.6f\r\n", prev, pE->GetValue()); sqlite3_free(prev); prev = xml; str = new char[strlen(pE->GetColor().ToUTF8()) + 1]; strcpy(str, pE->GetColor().ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%s\r\n\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; pE = pE->GetNext(); } xml = sqlite3_mprintf("%s\t\t\t\t\r\n\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (ShadedRelief == true) { xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev, ReliefFactor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *RasterSymbolizerInterpolateDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - RasterSymbolizer // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; str = new char[strlen(Fallback.ToUTF8()) + 1]; strcpy(str, Fallback.ToUTF8()); xml = sqlite3_mprintf ("%s\t\r\n\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\tRasterdata\r\n", prev); sqlite3_free(prev); prev = xml; ColorMapEntry *pE = Map.GetFirst(); while (pE != NULL) { xml = sqlite3_mprintf ("%s\t\t\t\r\n\t\t\t\t%1.6f\r\n", prev, pE->GetValue()); sqlite3_free(prev); prev = xml; str = new char[strlen(pE->GetColor().ToUTF8()) + 1]; strcpy(str, pE->GetColor().ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; pE = pE->GetNext(); } xml = sqlite3_mprintf("%s\t\t\r\n\t\r\n", prev); sqlite3_free(prev); prev = xml; if (ShadedRelief == true) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, ReliefFactor); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void RasterSymbolizerInterpolateDialog:: OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the RasterSymbolizer into the DBMS // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertRasterSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void RasterSymbolizerInterpolateDialog:: OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the RasterSymbolizer as an external file // int ret; wxString path; wxString lastDir; if (RetrieveParams() == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE RasterSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void RasterSymbolizerInterpolateDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the RasterSymbolizer into the Clipboard // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void RasterSymbolizerInterpolateDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool RasterSymbolizerMonochromeDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Color = wxT("#ff0000"); MinScale = false; MaxScale = false; if (wxDialog::Create(parent, wxID_ANY, wxT("RasterSymbolizer: Recolored Monochrome")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterSymbolizerMonochromeDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the RasterSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the RasterSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the RasterSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the RasterSymbolizer Opacity wxBoxSizer *opacitySizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacitySizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *opacityLabel = new wxStaticText(this, wxID_STATIC, wxT("&Opacity:")); opacitySizer->Add(opacityLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSlider *opacityCtrl = new wxSlider(this, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fifth row: the Remapped Color wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *remapBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(remapBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *remapBox = new wxStaticBox(this, wxID_STATIC, wxT("Black remapped Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *remapSizer = new wxStaticBoxSizer(remapBox, wxVERTICAL); remapBoxSizer->Add(remapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *colorSizer = new wxBoxSizer(wxHORIZONTAL); remapSizer->Add(colorSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *colorCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_COLOR, Color, wxDefaultPosition, wxSize(100, 22)); colorSizer->Add(colorCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxTextCtrl *sampleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(44, 22), wxTE_READONLY); wxColour back = wxColour(255, 0, 0); sampleCtrl->SetBackgroundColour(back); colorSizer->Add(sampleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *pickerSizer = new wxBoxSizer(wxHORIZONTAL); remapSizer->Add(pickerSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *pick = new wxButton(this, ID_SYMBOLIZER_PICKER_BTN, wxT("&Pick a color")); pickerSizer->Add(pick, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // sixth row: optional Visibility Range miscSizer->AddSpacer(75); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxVERTICAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(this, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(this, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(this, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnCopy); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnCmdScaleChanged); Connect(ID_SYMBOLIZER_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnCmdColorChanged); Connect(ID_SYMBOLIZER_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSymbolizerMonochromeDialog::OnCmdColorPicker); } void RasterSymbolizerMonochromeDialog:: OnCmdColorChanged(wxCommandEvent & WXUNUSED(event)) { // // remapped color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void RasterSymbolizerMonochromeDialog:: OnCmdColorPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } bool RasterSymbolizerMonochromeDialog::RetrieveParams() { // // retrieving the RasterSymbolizer params // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the RasterSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); if (Title.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (Abstract.Len() < 1) { wxString msg = wxT("Setting some RasterSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); Opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR); Color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(Color) != true) { wxMessageBox(wxT ("REMAPPED_COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } void RasterSymbolizerMonochromeDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } char *RasterSymbolizerMonochromeDialog::DoCreateCoverageXML() { // // creating the SLD/SE (XML) code - CoverageStyle // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\tRasterdata\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t#ffffff\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Color.ToUTF8()) + 1]; strcpy(str, Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t1\r\n\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\r\n\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *RasterSymbolizerMonochromeDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - RasterSymbolizer // char *str; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\r\n\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\tRasterdata\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t#ffffff\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Color.ToUTF8()) + 1]; strcpy(str, Color.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t1\r\n\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void RasterSymbolizerMonochromeDialog:: OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the RasterSymbolizer into the DBMS // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertRasterSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void RasterSymbolizerMonochromeDialog:: OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the RasterSymbolizer as an external file // int ret; wxString path; wxString lastDir; if (RetrieveParams() == false) return; wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE RasterSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE RasterSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void RasterSymbolizerMonochromeDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the RasterSymbolizer into the Clipboard // if (RetrieveParams() == false) return; char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateCoverageXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void RasterSymbolizerMonochromeDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } spatialite_gui-2.0.0-devel/ChangeLog0000664000175000017500000000000012543275035014302 00000000000000spatialite_gui-2.0.0-devel/README0000664000175000017500000000023612543275035013423 00000000000000If you get build (compilation) errors about missing symbols or types starting with wx, then try installing the GTK version of the WxWidgets packages (if any).spatialite_gui-2.0.0-devel/Classdef.h0000664000175000017500000072204212544026240014437 00000000000000/* / Classdef.h / class definitions for spatialite_gui - a SQLite /SpatiaLite GUI tool / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "wx/wx.h" #include "wx/aui/aui.h" #include "wx/treectrl.h" #include "wx/grid.h" #include "wx/listctrl.h" #include "wx/textctrl.h" #include "wx/propdlg.h" #include "wx/generic/propdlg.h" #include "wx/timer.h" #include "config.h" #ifdef SPATIALITE_AMALGAMATION #include #else #include #endif #include #include #include #include #include #include #include #include // // functions for QSORT / BSEARCH // int cmp_prenodes_code(const void *p1, const void *p2); int cmp_prenodes_id(const void *p1, const void *p2); int cmp_nodes2_code(const void *p1, const void *p2); int cmp_nodes2_id(const void *p1, const void *p2); int cmp_nodes1_code(const void *p1, const void *p2); int cmp_nodes1_id(const void *p1, const void *p2); // // functions for threaded queries // int SqlProgressCallback(void *arg); #ifdef _WIN32 DWORD WINAPI DoExecuteSqlThread(void *arg); #else void *DoExecuteSqlThread(void *arg); #endif // // functions for threaded WFS download // void WfsCallback(int rows, void *ptr); #ifdef _WIN32 DWORD WINAPI DoExecuteWfs(void *arg); #else void *DoExecuteWfs(void *arg); #endif // // functions for threaded Raster Import // #ifdef _WIN32 DWORD WINAPI DoExecuteRasterLoad(void *arg); #else void *DoExecuteRasterLoad(void *arg); #endif // // functions for threaded Raster Style Import // #ifdef _WIN32 DWORD WINAPI DoExecuteRasterStylesLoad(void *arg); #else void *DoExecuteRasterStylesLoad(void *arg); #endif // // functions for threaded Vector Style Import // #ifdef _WIN32 DWORD WINAPI DoExecuteVectorStylesLoad(void *arg); #else void *DoExecuteVectorStylesLoad(void *arg); #endif // constants for UOM #define GUI_UOM_PIXEL 0xa0 #define GUI_UOM_METRE 0xb0 #define GUI_UOM_INCH 0xc0 // constants for Preview Background #define GUI_PREVIEW_BACKGROUND_CHECKED 0xfa #define GUI_PREVIEW_BACKGROUND_WHITE 0xfb #define GUI_PREVIEW_BACKGROUND_BLACK 0xfc enum { // control IDs for main window and tree list control ID_Connect = 1, ID_Connect_RO, ID_CreateNew, ID_Disconnect, ID_MemoryDbLoad, ID_MemoryDbNew, ID_MemoryDbClock, ID_MemoryDbSave, ID_Vacuum, ID_SqlScript, ID_QueryViewComposer, ID_LoadShp, ID_LoadTxt, ID_LoadDbf, ID_LoadXL, ID_VirtualShp, ID_VirtualTxt, ID_VirtualDbf, ID_VirtualXL, ID_Network, ID_Exif, ID_LoadXml, ID_Srids, ID_Charset, ID_Help, ID_Attach, ID_SqlLog, ID_DbStatus, ID_CheckGeom, ID_SaneGeom, ID_WFS, ID_DXF, Tree_NewTable, Tree_NewView, Tree_NewIndex, Tree_NewTrigger, Tree_NewColumn, Tree_NewRasterStyle, Tree_ReloadRasterStyle, Tree_UnregisterRasterStyle, Tree_NewVectorStyle, Tree_ReloadVectorStyle, Tree_UnregisterVectorStyle, Tree_QueryViewComposer, Tree_Show, Tree_Drop, Tree_Rename, Tree_Select, Tree_SelectTiles, Tree_Refresh, Tree_RefreshDeferred, Tree_SpatialIndex, Tree_CheckSpatialIndex, Tree_RecoverSpatialIndex, Tree_MbrCache, Tree_RebuildTriggers, Tree_ShowSql, Tree_Recover, Tree_CheckGeometry, Tree_Extent, Tree_UpdateLayerStatistics, Tree_UpdateLayerStatisticsAll, Tree_ElementaryGeoms, Tree_MalformedGeometries, Tree_RepairPolygons, Tree_SetSrid, Tree_DumpShp, Tree_DumpKml, Tree_DumpTxtTab, Tree_DumpCsv, Tree_DumpHtml, Tree_DumpDif, Tree_DumpSylk, Tree_DumpDbf, Tree_DumpPostGIS, Tree_Edit, Tree_DropColumn, Tree_RenameColumn, Tree_GisLayerAuth, Tree_ColumnStats, Tree_MapPreview, Tree_CheckDuplicates, Tree_RemoveDuplicates, Tree_Detach, Tree_CheckGeom, Tree_SaneGeom, Tree_SldSeRasterStyles, Tree_SldSeVectorStyles, Tree_ImportRaster, Tree_Pyramidize, Tree_PyramidizeMonolithic, Tree_DePyramidize, Tree_RasterDrop, Tree_VectorRegister, Tree_VectorUnregister, Tree_CreateRasterCoverage, Tree_UpdateRasterExtent, Tree_UpdateRasterExtentAll, Tree_UpdateVectorExtent, Tree_UpdateVectorExtentAll, Tree_Raster_SRIDs, Tree_Vector_SRIDs, Tree_Raster_Keywords, Tree_Vector_Keywords, Tree_RegisterExternalGraphic, Tree_UnregisterExternalGraphic, Tree_RegisterTextFont, Tree_UnregisterTextFont, Tree_RasterSymbolizerContrast, Tree_RasterSymbolizerChannelRgb, Tree_RasterSymbolizerChannelGray, Tree_RasterSymbolizerCategorize, Tree_RasterSymbolizerInterpolate, Tree_RasterSymbolizerShadedRelief, Tree_RasterSymbolizerMonochrome, Tree_SimplePointSymbolizer, Tree_SimpleLineSymbolizer, Tree_SimplePolygonSymbolizer, Tree_SimpleTextSymbolizer, Grid_Clear, Grid_All, Grid_Column, Grid_Row, Grid_Copy, Grid_Blob, Grid_Delete, Grid_Insert, Grid_Abort, Grid_BlobIn, Grid_BlobOut, Grid_BlobNull, Grid_XmlBlobIn, Grid_XmlBlobOut, Grid_XmlBlobOutIndented, Grid_ExpTxtTab, Grid_ExpCsv, Grid_ExpHtml, Grid_ExpShp, Grid_ExpDif, Grid_ExpSylk, Grid_ExpDbf, Grid_TilePreview, Image_Copy, Wfs_Copy, Wfs_Layer }; enum { // control IDs for dialogs ID_SQL = 10000, ID_SQL_GO, ID_SQL_ABORT, ID_HISTORY_BACK, ID_HISTORY_FORWARD, ID_RS_FIRST, ID_RS_LAST, ID_RS_NEXT, ID_RS_PREVIOUS, ID_REFRESH, ID_RS_BLOCK, ID_RS_THREAD_FINISHED, ID_RS_STATS_UPDATE, ID_PANE_HEXADECIMAL, ID_PANE_GEOMETRY, ID_PANE_WKT, ID_PANE_EWKT, ID_PANE_SVG, ID_PANE_KML, ID_PANE_GML, ID_PANE_GEOJSON, ID_PANE_IMAGE, ID_HEX, ID_GEOM_TABLE, ID_WKT_TABLE, ID_WKT_COPY, ID_EWKT_TABLE, ID_EWKT_COPY, ID_SVG_TABLE, ID_SVG_RELATIVE, ID_SVG_PRECISION, ID_SVG_COPY, ID_KML_TABLE, ID_KML_PRECISION, ID_KML_COPY, ID_GML_TABLE, ID_GML_V2_V3, ID_GML_PRECISION, ID_GML_COPY, ID_GEOJSON_TABLE, ID_GEOJSON_OPTIONS, ID_GEOJSON_PRECISION, ID_GEOJSON_COPY, ID_GEOM_GRAPH, ID_GEOM_BOX, ID_IMAGE_TITLE, ID_IMG_BOX, ID_IMAGE, ID_XML_DOCUMENT_TABLE, ID_XML_DOCUMENT_COPY, ID_XML_INDENTED_TABLE, ID_XML_INDENTED_COPY, ID_VIRTSHP_TABLE, ID_VIRTSHP_SRID, ID_VIRTSHP_CHARSET, ID_VIRTSHP_TEXTDATES, ID_VIRTTXT_TABLE, ID_VIRTTXT_CHARSET, ID_VIRTTXT_TITLES, ID_VIRTTXT_SEPARATOR, ID_VIRTTXT_CHARSEPARATOR, ID_VIRTTXT_QUOTE, ID_VIRTTXT_POINT, ID_VIRTDBF_TABLE, ID_VIRTDBF_CHARSET, ID_VIRTDBF_TEXTDATES, ID_VIRTXL_TABLE, ID_VIRTXL_WORKSHEET, ID_VIRTXL_TITLES, ID_LDSHP_TABLE, ID_LDSHP_COLUMN, ID_LDSHP_SRID, ID_LDSHP_CHARSET, ID_LDSHP_COERCE_2D, ID_LDSHP_COMPRESSED, ID_LDSHP_RTREE, ID_LDSHP_USER_GTYPE, ID_LDSHP_GTYPE, ID_LDSHP_USER_PKEY, ID_LDSHP_PKCOL, ID_LDSHP_TEXTDATES, ID_LDXL_TABLE, ID_LDXL_WORKSHEET, ID_LDXL_TITLES, ID_LDXML_COMPRESSED, ID_LDXML_VALIDATE, ID_LDXML_INTERNAL_SCHEMA, ID_LDXML_SCHEMA_URI, ID_LDTXT_TABLE, ID_LDTXT_CHARSET, ID_LDTXT_TITLES, ID_LDTXT_SEPARATOR, ID_LDTXT_CHARSEPARATOR, ID_LDTXT_QUOTE, ID_LDTXT_POINT, ID_LDDBF_TABLE, ID_LDDBF_CHARSET, ID_LDDBF_USER_PKEY, ID_LDDBF_PKCOL, ID_LDDBF_TEXTDATES, ID_DMPSHP_CHARSET, ID_DMPTXT_CHARSET, ID_NET_TABLE, ID_NET_FROM, ID_NET_TO, ID_NET_NO_GEOM, ID_NET_GEOM, ID_NET_LENGTH, ID_NET_COST, ID_NET_BIDIR, ID_NET_ONEWAY, ID_NET_FROM_TO, ID_NET_TO_FROM, ID_NET_NAME_ENABLE, ID_NET_NAME, ID_NET_A_STAR, ID_NET_DATA, ID_NET_VIRTUAL, ID_EXIF_PATH, ID_EXIF_FOLDER, ID_EXIF_METADATA, ID_EXIF_GPS_ONLY, ID_XML_OK_SUFFIX, ID_XML_SUFFIX, ID_XML_PATH, ID_XML_FOLDER, ID_XML_TARGET_TABLE, ID_XML_PK_NAME, ID_XML_BLOB_COLUMN, ID_XML_OK_PATH, ID_XML_PATH_COLUMN, ID_XML_OK_SCHEMA_URI, ID_XML_SCHEMA_URI_COLUMN, ID_XML_OK_PARSE_ERR, ID_XML_PARSE_ERR_COLUMN, ID_XML_OK_VALIDATE_ERR, ID_XML_VALIDATE_ERR_COLUMN, ID_XML_COMPRESSED, ID_XML_VALIDATED, ID_XML_INTERNAL_SCHEMA, ID_XML_SCHEMA_URI, ID_DXF_OK_PREFIX, ID_DXF_PREFIX, ID_DXF_PATH, ID_DXF_FOLDER, ID_DXF_OK_SINGLE, ID_DXF_SINGLE, ID_DXF_DIMS, ID_DXF_SRID, ID_DXF_RINGS, ID_DXF_MIXED, ID_DXF_APPEND, ID_DFLT_CHARSET, ID_DFLT_ASK, ID_SCRIPT_CHARSET, ID_RCVR_SRID, ID_RCVR_TYPE, ID_RCVR_DIMS, ID_SRID_OLD, ID_SRID_SRID, ID_SEARCH, ID_BY_SRID, ID_HELP_HTML, ID_AUTO_SAVE_PATH, ID_AUTO_SAVE_INTERVAL, ID_AUTO_SAVE_CHANGE_PATH, ID_QVC_SQL, ID_QVC_TAB, ID_QVC_TABLE_2, ID_QVC_TABLE_NAME_1, ID_QVC_TABLE_NAME_2, ID_QVC_TABLE_ALIAS_1, ID_QVC_TABLE_ALIAS_2, ID_QVC_COLUMNS_1, ID_QVC_COLUMNS_2, ID_QVC_JOIN_MODE, ID_QVC_MATCH_1_T1, ID_QVC_MATCH_1_T2, ID_QVC_MATCH_2_ENABLE, ID_QVC_MATCH_2_T1, ID_QVC_MATCH_2_T2, ID_QVC_MATCH_3_ENABLE, ID_QVC_MATCH_3_T1, ID_QVC_MATCH_3_T2, ID_QVC_WHERE_1_ENABLE, ID_QVC_WHERE_1_TABLE, ID_QVC_WHERE_1_COLUMN, ID_QVC_WHERE_1_OPERATOR, ID_QVC_WHERE_1_VALUE, ID_QVC_WHERE_2_ENABLE, ID_QVC_WHERE_2_TABLE, ID_QVC_WHERE_2_COLUMN, ID_QVC_WHERE_2_OPERATOR, ID_QVC_WHERE_2_VALUE, ID_QVC_WHERE_3_ENABLE, ID_QVC_WHERE_3_TABLE, ID_QVC_WHERE_3_COLUMN, ID_QVC_WHERE_3_OPERATOR, ID_QVC_WHERE_3_VALUE, ID_QVC_CONNECTOR_12, ID_QVC_CONNECTOR_23, ID_QVC_ORDER_1_ENABLE, ID_QVC_ORDER_1_TABLE, ID_QVC_ORDER_1_COLUMN, ID_QVC_ORDER_1_DESC, ID_QVC_ORDER_2_ENABLE, ID_QVC_ORDER_2_TABLE, ID_QVC_ORDER_2_COLUMN, ID_QVC_ORDER_2_DESC, ID_QVC_ORDER_3_ENABLE, ID_QVC_ORDER_3_TABLE, ID_QVC_ORDER_3_COLUMN, ID_QVC_ORDER_3_DESC, ID_QVC_ORDER_4_ENABLE, ID_QVC_ORDER_4_TABLE, ID_QVC_ORDER_4_COLUMN, ID_QVC_ORDER_4_DESC, ID_QVC_VIEW_TYPE, ID_QVC_VIEW_NAME, ID_QVC_VIEW_GEOTABLE, ID_QVC_VIEW_GEOMETRY, ID_QVC_WRITABLE_1, ID_QVC_WRITABLE_2, ID_AUTH_RDONLY, ID_AUTH_HIDDEN, ID_MALFORMED_GRID, ID_MALFORMED_CLOSE, ID_MALFORMED_REPAIR, ID_MALFORMED_CLEAR, ID_MALFORMED_ALL, ID_MALFORMED_ROW, ID_MALFORMED_COLUMN, ID_MALFORMED_COPY, ID_MALFORMED_BLOB, ID_DB_STATUS_GRID, ID_DB_STATUS_CLOSE, ID_DB_STATUS_RESET, ID_DB_STATUS_CLEAR, ID_DB_STATUS_ALL, ID_DB_STATUS_ROW, ID_DB_STATUS_COLUMN, ID_DB_STATUS_COPY, ID_STAT_CHART, ID_CHART_TYPE, ID_CHART_SIZE, ID_CHART_MODE, ID_CHART_CLASS, ID_CHART_COPY, ID_CHART_PNG, ID_CHART_SVG, ID_CHART_PDF, ID_MAP_SYMBOL, ID_MAP_SIZE, ID_MAP_SYM_SIZE, ID_MAP_THICKNESS, ID_MAP_FILL, ID_MAP_FILL_COL, ID_MAP_LINE_COL, ID_MAP_COPY, ID_MAP_PNG, ID_MAP_SVG, ID_MAP_PDF, ID_KML_NAME, ID_KML_NAME_K, ID_KML_DESC, ID_KML_DESC_K, ID_SHEET_DECIMAL_POINT, ID_SHEET_DATE_TIME, ID_ELEMGEOM_TABLE, ID_ELEMGEOM_PKEY, ID_ELEMGEOM_MULTI_ID, ID_ELEMGEOM_TYPE, ID_ELEMGEOM_SRID, ID_ELEMGEOM_COORDS, ID_ELEMGEOM_RTREE, ID_POSTGIS_SCHEMA, ID_POSTGIS_TABLE, ID_POSTGIS_LOWER, ID_POSTGIS_CREATE, ID_POSTGIS_SPINDEX, ID_SANEGEOM_PREFIX, ID_WFS_URL, ID_WFS_CATALOG, ID_WFS_RESET, ID_WFS_NAME, ID_WFS_SRID, ID_WFS_VERSION, ID_WFS_LABEL, ID_WFS_PAGE, ID_WFS_MAX, ID_WFS_PAGING, ID_WFS_TABLE, ID_WFS_PK, ID_WFS_RTREE, ID_WFS_SWAP, ID_WFS_LOAD, ID_WFS_EXTRA, ID_WFS_KEYWORD, ID_WFS_KEYFILTER, ID_WFS_KEYRESET, ID_WFS_ENABLE_PROXY, ID_WFS_PROXY, ID_WFS_STATUS, ID_WFS_THREAD_FINISHED, ID_SLD_SE_GRID, ID_SLD_SE_REMOVE, ID_SLD_SE_ADD, ID_WAIT_VALIDATING, ID_CVG_NAME, ID_CVG_TITLE, ID_CVG_ABSTRACT, ID_CVG_SAMPLE, ID_CVG_PIXEL, ID_CVG_BANDS, ID_CVG_COMPRESSION, ID_CVG_QUALITY, ID_CVG_RED, ID_CVG_GREEN, ID_CVG_BLUE, ID_CVG_NIR, ID_CVG_AUTO_NDVI, ID_CVG_NODATA, ID_CVG_WIDTH, ID_CVG_SQTILE, ID_CVG_HEIGHT, ID_CVG_SRID, ID_CVG_NOREF, ID_CVG_HORZ_RES, ID_CVG_SAME_RES, ID_CVG_VERT_RES, ID_CVG_STRICT_RES, ID_CVG_MIXED_RES, ID_CVG_PATHS, ID_CVG_MD5, ID_CVG_SUMMARY, ID_LOAD_FORCE_SRID, ID_LOAD_SRID, ID_LOAD_WITH_WORLDFILE, ID_LOAD_PYRAMIDIZE, ID_LOAD_LIST_DONE, ID_LOAD_ABORT, ID_LOAD_RASTER_THREAD_FINISHED, ID_LOAD_RASTER_START, ID_LOAD_RASTER_STOP, ID_PYRAMID_MODE, ID_LOAD_STYLE_DONE, ID_LOAD_RASTER_STYLE_THREAD_FINISHED, ID_LOAD_RASTER_STYLE_START, ID_LOAD_RASTER_STYLE_STOP, ID_LOAD_RASTER_STYLE_SKIP, ID_LOAD_VECTOR_STYLE_THREAD_FINISHED, ID_LOAD_VECTOR_STYLE_START, ID_LOAD_VECTOR_STYLE_STOP, ID_LOAD_VECTOR_STYLE_SKIP, ID_LOAD_EXTERNAL_THREAD_FINISHED, ID_LOAD_EXTERNAL_DONE, ID_LOAD_EXTERNAL_START, ID_LOAD_EXTERNAL_STOP, ID_LOAD_EXTERNAL_SKIP, ID_LOAD_FONT_THREAD_FINISHED, ID_LOAD_FONT_DONE, ID_LOAD_FONT_START, ID_LOAD_FONT_STOP, ID_LOAD_FONT_SKIP, ID_VECTOR_GRID, ID_VECTOR_COVERAGE, ID_VECTOR_TITLE, ID_VECTOR_ABSTRACT, ID_VECTOR_SRID_ADD, ID_VECTOR_SRID_REMOVE, ID_VECTOR_SRID, ID_VECTOR_SRID_GRID, ID_RASTER_SRID_ADD, ID_RASTER_SRID_REMOVE, ID_RASTER_SRID, ID_RASTER_SRID_GRID, ID_VECTOR_KEYWORD_ADD, ID_VECTOR_KEYWORD_REMOVE, ID_VECTOR_KEYWORD, ID_VECTOR_KEYWORD_GRID, ID_RASTER_KEYWORD_ADD, ID_RASTER_KEYWORD_REMOVE, ID_RASTER_KEYWORD, ID_RASTER_KEYWORD_GRID, ID_SYMBOLIZER_NAME, ID_SYMBOLIZER_TITLE, ID_SYMBOLIZER_ABSTRACT, ID_SYMBOLIZER_OPACITY, ID_SYMBOLIZER_RED, ID_SYMBOLIZER_GREEN, ID_SYMBOLIZER_BLUE, ID_SYMBOLIZER_GRAY, ID_SYMBOLIZER_CONTRAST, ID_SYMBOLIZER_GAMMA, ID_SYMBOLIZER_MAP, ID_SYMBOLIZER_FALLBACK, ID_SYMBOLIZER_VALUE, ID_SYMBOLIZER_COLOR, ID_SYMBOLIZER_PICKER_HEX, ID_SYMBOLIZER_PICKER_BTN, ID_SYMBOLIZER_SHADED, ID_SYMBOLIZER_RELIEF, ID_SYMBOLIZER_MINMAX_SCALE, ID_SYMBOLIZER_MIN_SCALE, ID_SYMBOLIZER_MAX_SCALE, ID_SYMBOLIZER_UOM, ID_SYMBOLIZER_STROKE1_ENABLE, ID_SYMBOLIZER_STROKE1_OPACITY, ID_SYMBOLIZER_STROKE1_PERPENDICULAR, ID_SYMBOLIZER_STROKE1_TYPE, ID_SYMBOLIZER_STROKE1_COLOR, ID_SYMBOLIZER_STROKE1_PICKER_HEX, ID_SYMBOLIZER_STROKE1_PICKER_BTN, ID_SYMBOLIZER_STROKE1_GRAPHIC, ID_SYMBOLIZER_STROKE1_ENABLE_REPLACEMENT, ID_SYMBOLIZER_STROKE1_REPLACEMENT, ID_SYMBOLIZER_STROKE1_REPLACEMENT_HEX, ID_SYMBOLIZER_STROKE1_WIDTH, ID_SYMBOLIZER_STROKE1_LINEJOIN, ID_SYMBOLIZER_STROKE1_LINECAP, ID_SYMBOLIZER_STROKE1_DASHARRAY, ID_SYMBOLIZER_STROKE1_DASHOFFSET, ID_SYMBOLIZER_STROKE2_ENABLE, ID_SYMBOLIZER_STROKE2_OPACITY, ID_SYMBOLIZER_STROKE2_PERPENDICULAR, ID_SYMBOLIZER_STROKE2_TYPE, ID_SYMBOLIZER_STROKE2_COLOR, ID_SYMBOLIZER_STROKE2_PICKER_HEX, ID_SYMBOLIZER_STROKE2_PICKER_BTN, ID_SYMBOLIZER_STROKE2_GRAPHIC, ID_SYMBOLIZER_STROKE2_ENABLE_REPLACEMENT, ID_SYMBOLIZER_STROKE2_REPLACEMENT, ID_SYMBOLIZER_STROKE2_REPLACEMENT_HEX, ID_SYMBOLIZER_STROKE2_WIDTH, ID_SYMBOLIZER_STROKE2_LINEJOIN, ID_SYMBOLIZER_STROKE2_LINECAP, ID_SYMBOLIZER_STROKE2_DASHARRAY, ID_SYMBOLIZER_STROKE2_DASHOFFSET, ID_SYMBOLIZER_STROKE3_ENABLE, ID_SYMBOLIZER_STROKE3_OPACITY, ID_SYMBOLIZER_STROKE3_PERPENDICULAR, ID_SYMBOLIZER_STROKE3_TYPE, ID_SYMBOLIZER_STROKE3_COLOR, ID_SYMBOLIZER_STROKE3_PICKER_HEX, ID_SYMBOLIZER_STROKE3_PICKER_BTN, ID_SYMBOLIZER_STROKE3_GRAPHIC, ID_SYMBOLIZER_STROKE3_ENABLE_REPLACEMENT, ID_SYMBOLIZER_STROKE3_REPLACEMENT, ID_SYMBOLIZER_STROKE3_REPLACEMENT_HEX, ID_SYMBOLIZER_STROKE3_WIDTH, ID_SYMBOLIZER_STROKE3_LINEJOIN, ID_SYMBOLIZER_STROKE3_LINECAP, ID_SYMBOLIZER_STROKE3_DASHARRAY, ID_SYMBOLIZER_STROKE3_DASHOFFSET, ID_SYMBOLIZER_FILL1_ENABLE, ID_SYMBOLIZER_FILL1_OPACITY, ID_SYMBOLIZER_FILL1_TYPE, ID_SYMBOLIZER_FILL1_COLOR, ID_SYMBOLIZER_FILL1_PICKER_HEX, ID_SYMBOLIZER_FILL1_PICKER_BTN, ID_SYMBOLIZER_FILL1_GRAPHIC, ID_SYMBOLIZER_FILL1_ENABLE_REPLACEMENT, ID_SYMBOLIZER_FILL1_REPLACEMENT, ID_SYMBOLIZER_FILL1_REPLACEMENT_HEX, ID_SYMBOLIZER_FILL2_ENABLE, ID_SYMBOLIZER_FILL2_OPACITY, ID_SYMBOLIZER_FILL2_TYPE, ID_SYMBOLIZER_FILL2_COLOR, ID_SYMBOLIZER_FILL2_PICKER_HEX, ID_SYMBOLIZER_FILL2_PICKER_BTN, ID_SYMBOLIZER_FILL2_GRAPHIC, ID_SYMBOLIZER_FILL2_ENABLE_REPLACEMENT, ID_SYMBOLIZER_FILL2_REPLACEMENT, ID_SYMBOLIZER_FILL2_REPLACEMENT_HEX, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_X, ID_SYMBOLIZER_POLYGON1_DISPLACEMENT_Y, ID_SYMBOLIZER_POLYGON1_PERPENDICULAR, ID_SYMBOLIZER_POLYGON2_ENABLE, ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_X, ID_SYMBOLIZER_POLYGON2_DISPLACEMENT_Y, ID_SYMBOLIZER_POLYGON2_PERPENDICULAR, ID_SYMBOLIZER_SIZE, ID_SYMBOLIZER_ROTATION, ID_SYMBOLIZER_DISPLACEMENT_X, ID_SYMBOLIZER_DISPLACEMENT_Y, ID_SYMBOLIZER_ANCHOR_X, ID_SYMBOLIZER_ANCHOR_Y, ID_SYMBOLIZER_TYPE, ID_SYMBOLIZER_GRAPHIC, ID_SYMBOLIZER_MARK, ID_SYMBOLIZER_ENABLE_COLOR_REPLACEMENT, ID_SYMBOLIZER_COLOR_REPLACEMENT, ID_SYMBOLIZER_COLOR_REPLACEMENT_HEX, ID_SYMBOLIZER_REPLACEMENT_PICKER_BTN, ID_ONLY_RESCALE_SVG_SYMBOLS, ID_SYMBOLIZER_FILL_ENABLE, ID_SYMBOLIZER_FILL_COLOR, ID_SYMBOLIZER_FILL_PICKER_HEX, ID_SYMBOLIZER_FILL_PICKER_BTN, ID_SYMBOLIZER_STROKE_ENABLE, ID_SYMBOLIZER_STROKE_COLOR, ID_SYMBOLIZER_STROKE_PICKER_HEX, ID_SYMBOLIZER_STROKE_PICKER_BTN, ID_SYMBOLIZER_STROKE_WIDTH, ID_SYMBOLIZER_STROKE_LINEJOIN, ID_SYMBOLIZER_STROKE_LINECAP, ID_SYMBOLIZER_STROKE_DASHARRAY, ID_SYMBOLIZER_STROKE_DASHOFFSET, ID_SYMBOLIZER_LABEL, ID_SYMBOLIZER_FONT, ID_SYMBOLIZER_FONT_OPACITY, ID_SYMBOLIZER_HALO_ENABLE, ID_SYMBOLIZER_HALO_OPACITY, ID_SYMBOLIZER_HALO_RADIUS, ID_SYMBOLIZER_HALO_COLOR, ID_SYMBOLIZER_HALO_PICKER_HEX, ID_SYMBOLIZER_HALO_PICKER_BTN, ID_SYMBOLIZER_PERPENDICULAR, ID_SYMBOLIZER_IS_REPEATED, ID_SYMBOLIZER_INITIAL_GAP, ID_SYMBOLIZER_GAP, ID_SYMBOLIZER_IS_ALIGNED, ID_SYMBOLIZER_GENERALIZE, ID_SYMBOLIZER_PREVIEW, ID_SYMBOLIZER_BACKGROUND, ID_SYMBOLIZER_CROSSHAIR, ID_SYMBOLIZER_REFLINE, ID_SYMBOLIZER_INSERT, ID_SYMBOLIZER_EXPORT, ID_SYMBOLIZER_COPY, ID_SYMBOLIZER_ADD, ID_SYMBOLIZER_REMOVE, ID_PANE_MAIN, ID_PANE_STROKE1, ID_PANE_STROKE2, ID_PANE_STROKE3, ID_PANE_FILL1, ID_PANE_FILL2, ID_PANE_POSITION, ID_PANE_GRAPHIC, ID_PANE_MARK, ID_PANE_FONT, ID_PANE_PLACEMENT, ID_PANE_PREVIEW }; enum { // tree item data types MY_TABLE = 0, MY_VTABLE, MY_VIEW, MY_TILE_DATA, MY_COLUMN, MY_VIEW_COLUMN, MY_VIRTUAL_COLUMN, MY_GEOMETRY, MY_GEOMETRY_INDEX, MY_GEOMETRY_CACHED, MY_VIEW_GEOMETRY, MY_VIEW_GEOMETRY_INDEX, MY_VIEW_GEOMETRY_CACHED, MY_VIRTUAL_GEOMETRY, MY_VIRTUAL_GPKG_GEOMETRY, MY_INDEX, MY_TRIGGER, MY_ATTACHED, MY_INT_VARIANT, MY_DBL_VARIANT, MY_TXT_VARIANT, MY_BLOB_VARIANT, MY_NULL_VARIANT }; enum { // control IDs for timers ID_AUTO_SAVE_TIMER = 20000, ID_DB_STATUS_TIMER, ID_WFS_TIMER }; enum { // DOT-COMMANDS [SQL scripts] CMD_NONE = 0, CMD_LOADSHP, CMD_LOADDBF, CMD_LOADXL, CMD_DUMPSHP, CMD_DUMPDBF, CMD_SQLLOG }; enum { // METADATA TYPEs METADATA_UNKNOWN = 0, METADATA_LEGACY, METADATA_CURRENT }; class TopologyItem { // // a class wrapping a Topology related Table or View // private: wxString Name; bool Table; bool View; TopologyItem *Next; public: TopologyItem(wxString & name); ~TopologyItem() {; } wxString & GetName() { return Name; } void SetTable() { Table = true; } void SetView() { View = true; } bool IsTable() { return Table; } bool IsView() { return View; } void SetNext(TopologyItem * next) { Next = next; } TopologyItem *GetNext() { return Next; } }; class TopologySet { // // a class representing a full Topology Set // private: wxString Prefix; wxString CoordDims; int Srid; TopologyItem *First; TopologyItem *Last; public: TopologySet(); ~TopologySet(); bool CheckPrefix(); void SetPrefix(wxString & prefix) { Prefix = prefix; } wxString & GetPrefix() { return Prefix; } void SetSrid(int srid) { Srid = srid; } int GetSrid() { return Srid; } void SetCoordDims(const char *coords); void SetCoordDims(wxString & coords) { CoordDims = coords; } wxString & GetCoordDims() { return CoordDims; } void Add(const char *name, bool table, bool view); void AddTable(wxString & name); void AddView(wxString & name); void SetTable(wxString & table_name); void SetView(wxString & view_name); TopologyItem *GetFirst() { return First; } }; class RasterCoverageItem { // // a class wrapping a Raster Coverage related Table or View // private: wxString Name; bool TileData; RasterCoverageItem *Next; public: RasterCoverageItem(wxString & name, bool tile_data); ~RasterCoverageItem() {; } wxString & GetName() { return Name; } bool IsTileData() { return TileData; } void SetNext(RasterCoverageItem * next) { Next = next; } RasterCoverageItem *GetNext() { return Next; } }; class RasterCoverageSet { // // a class representing a full Raster Coverage Set // private: wxString Name; int Srid; public: RasterCoverageSet(const char *name, int srid); ~RasterCoverageSet() {; } wxString & GetName() { return Name; } int GetSrid() { return Srid; } }; class VectorCoverageItem { // // a class wrapping a Vector Coverage related Table or View // private: wxString Name; VectorCoverageItem *Next; public: VectorCoverageItem(wxString & name); ~VectorCoverageItem() {; } wxString & GetName() { return Name; } void SetNext(VectorCoverageItem * next) { Next = next; } VectorCoverageItem *GetNext() { return Next; } }; class VectorCoverageSet { // // a class representing a full Vector Coverage Set // private: wxString Name; int Srid; public: VectorCoverageSet(const char *name, int srid); ~VectorCoverageSet() {; } wxString & GetName() { return Name; } int GetSrid() { return Srid; } }; class MyObject:public wxTreeItemData { // // a class to store TreeItemData // private: int Type; // the object type wxString DbAlias; // the DB alias [Attached DB] wxString Name; // the object name wxString Column; // the column name [optional] bool Temporary; // the TMP switch bool Coverage; // TRUE only if Raster Coverage related public: MyObject(int type, wxString & name); MyObject(int type, wxString & name, bool tmp, bool coverage = false); MyObject(int type, wxString & dbAlias, wxString & name, bool tmp); MyObject(int type, wxString & name, wxString & column); MyObject(int type, bool attached, wxString & dbAlias, wxString & name, bool coverage = false); virtual ~ MyObject() {; } int GetType() { return Type; } wxString & GetDbAlias() { return DbAlias; } wxString & GetName() { return Name; } wxString & GetColumn() { return Column; } bool IsTemporary() { return Temporary; } bool IsAttached() { if (DbAlias.Len() > 0) return true; else return false; } bool IsCoverage() { return Coverage; } }; class MyColumnInfo { // // a class to store a DB column // private: wxString Name; // the column name bool PrimaryKey; // Primary Key column bool Geometry; // Geometry column bool GPKGGeometry; // Geometry column bool GeometryIndex; // Geometry column + SpatialIndex bool MbrCache; // Geometry column + MbrCache MyColumnInfo *Next; // pointer to next element into the linked list public: MyColumnInfo(wxString & name, bool pkey); ~MyColumnInfo() {; } wxString & GetName() { return Name; } bool IsPrimaryKey() { return PrimaryKey; } void SetGeometry() { Geometry = true; } void SetGPKGGeometry() { GPKGGeometry = true; } bool IsGeometry() { return Geometry; } bool IsGPKGGeometry() { return GPKGGeometry; } void SetGeometryIndex() { GeometryIndex = true; } bool IsGeometryIndex() { return GeometryIndex; } void SetMbrCache() { MbrCache = true; } bool IsMbrCache() { return MbrCache; } void SetNext(MyColumnInfo * next) { Next = next; } MyColumnInfo *GetNext() { return Next; } }; class MyIndexInfo { // // a class to store a DB index // private: wxString Name; // the index name MyIndexInfo *Next; // pointer to next element into the linked list public: MyIndexInfo(wxString & name); MyIndexInfo() {; } wxString & GetName() { return Name; } void SetNext(MyIndexInfo * next) { Next = next; } MyIndexInfo *GetNext() { return Next; } bool ContainsOnlyPrimaryKeyColumns(sqlite3 * sqlite, wxString & indexName, MyColumnInfo * first_column); }; class MyTriggerInfo { // // a class to store a DB trigger // private: wxString Name; // the trigger name MyTriggerInfo *Next; // pointer to next element into the linked list public: MyTriggerInfo(wxString & name); ~MyTriggerInfo() {; } wxString & GetName() { return Name; } void SetNext(MyTriggerInfo * next) { Next = next; } MyTriggerInfo *GetNext() { return Next; } }; class MyTableInfo { // // a class to store DB table columns // private: MyColumnInfo * FirstColumn; // first element into the columns linked list MyColumnInfo *LastColumn; // last element into the columns linked list MyIndexInfo *FirstIndex; // first element into the indices linked list MyIndexInfo *LastIndex; // last element into the indices linked list MyTriggerInfo *FirstTrigger; // first element into the triggers linked list MyTriggerInfo *LastTrigger; // last element into the triggers linked list public: MyTableInfo() { FirstColumn = NULL; LastColumn = NULL; FirstIndex = NULL; LastIndex = NULL; FirstTrigger = NULL; LastTrigger = NULL; } ~MyTableInfo(); void AddColumn(wxString & name, bool pkey); void SetGeometry(wxString & name, bool index, bool cached); void AddIndex(wxString & name); void AddTrigger(wxString & name); MyColumnInfo *GetFirstColumn() { return FirstColumn; } MyIndexInfo *GetFirstIndex() { return FirstIndex; } MyTriggerInfo *GetFirstTrigger() { return FirstTrigger; } void CheckGPKG(class MyFrame * MainFrame, sqlite3 * handle, wxString & table); }; class MyViewInfo { // // a class to store DB view columns // private: MyColumnInfo * First; // first element into the columns linked list MyColumnInfo *Last; // last element into the columns linked list MyTriggerInfo *FirstTrigger; // first element into the triggers linked list MyTriggerInfo *LastTrigger; // last element into the triggers linked list public: MyViewInfo() { First = NULL; Last = NULL; FirstTrigger = NULL; LastTrigger = NULL; } ~MyViewInfo(); void AddColumn(wxString & name); void AddTrigger(wxString & name); void SetGeometry(wxString & name, bool index, bool cached); MyColumnInfo *GetFirst() { return First; } MyTriggerInfo *GetFirstTrigger() { return FirstTrigger; } }; class MyVariant { // // a class to store Variant-Type values // private: int Type; // the Variant-Type sqlite3_int64 IntValue; // the Integer value double DblValue; // the Double value wxString TxtValue; // the Text value unsigned char *Blob; // the BLOB value int BlobSize; // the BLOB size public: MyVariant() { Type = MY_NULL_VARIANT; Blob = NULL; } ~MyVariant() { if (Blob) delete[]Blob; } void Clear() { if (Blob) delete[]Blob; Blob = NULL; Type = MY_NULL_VARIANT; } void Set(sqlite3_int64 value) { Type = MY_INT_VARIANT; IntValue = value; } void Set(double value) { Type = MY_DBL_VARIANT; DblValue = value; } void Set(const unsigned char *text); void Set(wxString & string) { Type = MY_TXT_VARIANT; TxtValue = string; } void Set(const void *blob, int size); void Copy(MyVariant * other); int GetType() { return Type; } sqlite3_int64 GetIntValue() { return IntValue; } double GetDblValue() { return DblValue; } wxString & GetTxtValue() { return TxtValue; } int GetBlobSize() { return BlobSize; } unsigned char *GetBlob() { return Blob; } }; class MyRowVariant { // // a class to store a row composed of Variant-Type values // private: int NumCols; // number of columns MyVariant *ColumnArray; // the column as an array bool Deleted; // switch to mark row deletion MyRowVariant *Next; // pointer to next element into the linked list public: MyRowVariant() { NumCols = 0; ColumnArray = NULL; Deleted = false; Next = NULL; } MyRowVariant(int cols) { NumCols = cols; ColumnArray = new MyVariant[cols]; Next = NULL; } ~MyRowVariant() { if (ColumnArray) delete[]ColumnArray; } void Create(int cols); int GetNumCols() { return NumCols; } void Set(int col, sqlite3_int64 value); void Set(int col, double value); void Set(int col, const unsigned char *text); void Set(int col, const void *blob, int size); MyVariant *GetColumn(int col); void SetDeleted() { Deleted = true; } bool IsDeleted() { return Deleted; } void SetNext(MyRowVariant * next) { Next = next; } MyRowVariant *GetNext() { return Next; } }; class MyVariantList { // // a class to store a whole result set // private: int NumCols; // number of columns wxString *ColumnName; // the column names MyRowVariant *First; // first element into the linked list MyRowVariant *Last; // last element into the linked list public: MyVariantList(); ~MyVariantList(); void Reset(void); MyRowVariant *Add(int columns); void SetColumnName(int col, const char *colName); MyRowVariant *GetFirst() { return First; } int GetRows(); int GetColumns() { return NumCols; } wxString & GetColumnName(int col); }; class MyBlobs { // // a class to store BLOBs // private: int NumRows; // the number of rows int NumCols; // the number of columns MyRowVariant *Rows; // pointer to an array of rows public: MyBlobs(int rows, int cols); ~MyBlobs(); void SetBlob(int row, int col, MyVariant * blobVar); MyVariant *GetBlob(int row, int col); }; class MyValues { // // a class to store column values for editing // private: int NumRows; // the number of rows int NumCols; // the number of columns MyRowVariant *Rows; // pointer to an array of rows public: MyValues(int rows, int cols); ~MyValues(); void SetValue(int row, int col, sqlite3_int64 value); void SetValue(int row, int col, double value); void SetValue(int row, int col, wxString & string); MyRowVariant *GetRow(int row); MyVariant *GetValue(int row, int col); }; class MySqlQuery { // // a class to store an SQL query - history // private: wxString Sql; MySqlQuery *Prev; MySqlQuery *Next; public: MySqlQuery(wxString & sql) { Sql = sql; Prev = NULL; Next = NULL; } ~MySqlQuery() {; } wxString & GetSql() { return Sql; } void SetPrev(MySqlQuery * prev) { Prev = prev; } MySqlQuery *GetPrev() { return Prev; } void SetNext(MySqlQuery * next) { Next = next; } MySqlQuery *GetNext() { return Next; } }; class MySqlHistory { // // a class supporting SQL queries history // private: MySqlQuery * First; MySqlQuery *Last; MySqlQuery *Current; public: MySqlHistory() { First = NULL; Last = NULL; Current = NULL; } ~MySqlHistory(); void Prepend(wxString & sql); void Add(wxString & sql); MySqlQuery *GetCurrent() { return Current; } MySqlQuery *GetNext(); MySqlQuery *GetPrev(); bool TestNext(); bool TestPrev(); }; class MyApp:public wxApp { // // the main APP // virtual bool OnInit(); }; class Topology { // // Topology container // private: wxTreeItemId TopologyNode; TopologySet TopologyItems; Topology *Next; public: Topology(class MyTableTree * tree, wxTreeItemId & root, TopologySet * topology); ~Topology() {; } wxTreeItemId *Check(wxString & table); Topology *GetNext() { return Next; } void SetNext(Topology * next) { Next = next; } }; class TopologyList { // // Topology container // private: Topology * First; Topology *Last; int Count; public: TopologyList() { First = NULL; Last = NULL; Count = 0; } ~TopologyList() { Flush(); } void Flush(); void Add(class MyTableTree * tree, wxTreeItemId & root, TopologySet * topology); wxTreeItemId *FindNode(wxString & table); int GetCount() { return Count; } }; class RasterCoverage { // // Raster Coverage container // private: wxString Name; wxTreeItemId CoverageNode; RasterCoverage *Next; public: RasterCoverage(class MyTableTree * tree, wxTreeItemId & root, wxString & coverage, int srid); ~RasterCoverage() {; } wxTreeItemId *Check(wxString & table, bool * tile_data); RasterCoverage *GetNext() { return Next; } void SetNext(RasterCoverage * next) { Next = next; } }; class RasterCoverageList { // // Raster Coverage container // private: RasterCoverage * First; RasterCoverage *Last; int Count; public: RasterCoverageList() { First = NULL; Last = NULL; Count = 0; } ~RasterCoverageList() { Flush(); } void Flush(); void Add(class MyTableTree * tree, wxTreeItemId & root, wxString & coverage, int srid); wxTreeItemId *FindNode(wxString & table, bool * tile_data); int GetCount() { return Count; } }; class VectorCoverage { // // Vector Coverage container // private: wxString Name; wxTreeItemId CoverageNode; VectorCoverage *Next; public: VectorCoverage(class MyTableTree * tree, wxTreeItemId & root, wxString & coverage, int srid); ~VectorCoverage() {; } VectorCoverage *GetNext() { return Next; } void SetNext(VectorCoverage * next) { Next = next; } }; class VectorCoverageList { // // Vector Coverage container // private: VectorCoverage * First; VectorCoverage *Last; int Count; public: VectorCoverageList() { First = NULL; Last = NULL; Count = 0; } ~VectorCoverageList() { Flush(); } void Flush(); void Add(class MyTableTree * tree, wxTreeItemId & root, wxString & coverage, int srid); int GetCount() { return Count; } }; class RootNodes { // // a class wrapping root nodes for an Attached DB // private: wxString dbAlias; wxTreeItemId rootUserData; wxTreeItemId rootTopologies; wxTreeItemId rootRasterCoverages; wxTreeItemId rootVectorCoverages; wxTreeItemId rootStyling; wxTreeItemId rootIsoMetadata; wxTreeItemId rootMetadata; wxTreeItemId rootInternal; wxTreeItemId rootSpatialIndex; public: RootNodes(wxString & alias, wxTreeItemId userData, wxTreeItemId topologies, wxTreeItemId raster_coverages, wxTreeItemId vector_coverages, wxTreeItemId styling, wxTreeItemId isoMetadata, wxTreeItemId metadata, wxTreeItemId internal, wxTreeItemId spatialIndex) { dbAlias = alias; rootUserData = userData; rootTopologies = topologies; rootRasterCoverages = raster_coverages; rootVectorCoverages = vector_coverages; rootStyling = styling; rootIsoMetadata = isoMetadata; rootMetadata = metadata; rootInternal = internal; rootSpatialIndex = spatialIndex; } ~RootNodes() {; } wxString & GetDbAlias() { return dbAlias; } wxTreeItemId & GetRootUserData() { return rootUserData; } wxTreeItemId & GetRootTopologies() { return rootTopologies; } wxTreeItemId & GetRootRasterCoverages() { return rootRasterCoverages; } wxTreeItemId & GetRootVectorCoverages() { return rootVectorCoverages; } wxTreeItemId & GetRootStyling() { return rootStyling; } wxTreeItemId & GetRootIsoMetadata() { return rootIsoMetadata; } wxTreeItemId & GetRootMetadata() { return rootMetadata; } wxTreeItemId & GetRootInternal() { return rootInternal; } wxTreeItemId & GetRootSpatialIndex() { return rootSpatialIndex; } }; class MyTableTree:public wxTreeCtrl { // // a tree-control used for SQLite DB tables // private: class MyFrame * MainFrame; wxTreeItemId Root; // the root node wxTreeItemId RootUserData; wxTreeItemId RootTopologies; wxTreeItemId RootRasterCoverages; wxTreeItemId RootVectorCoverages; wxTreeItemId RootStyling; wxTreeItemId RootIsoMetadata; TopologyList Topologies; RasterCoverageList RasterCoverages; VectorCoverageList VectorCoverages; TopologyList AltTopologies; RasterCoverageList AltRasterCoverages; VectorCoverageList AltVectorCoverages; wxTreeItemId RootMetadata; wxTreeItemId RootInternal; wxTreeItemId RootSpatialIndex; wxImageList *Images; // the images list wxTreeItemId CurrentItem; // the tree item holding the current context menu wxString CurrentRasterCoverageName; wxString CurrentVectorCoverageName; void ExpandTable(wxTreeItemId & item); void ExpandView(wxTreeItemId & item); void ExpandAttachedTable(wxTreeItemId & item); void ExpandAttachedView(wxTreeItemId & item); public: MyTableTree() {; } MyTableTree(class MyFrame * parent, wxWindowID id = wxID_ANY); virtual ~ MyTableTree() {; } void SetPath(wxString & path) { SetItemText(Root, path); } void FlushAll(); wxTreeItemId & GetRootNode(wxString & tableName, bool * is_coverage = NULL, bool * tile_data = NULL); wxTreeItemId & GetAltRootNode(wxString & tableName, RootNodes * nodes, bool * is_coverage = NULL, bool * tile_data = NULL); void AddTable(wxString & tableName, bool virtualTable, bool geometry, bool tmp); void AddView(wxString & viewName, bool geometry, bool tmp); wxTreeItemId & AddAttached(wxString & dbAlias, wxString & path); void AddTable(wxString & dbAlias, wxString & tableName, bool virtualTable, bool geometry, RootNodes * list); void AddView(wxString & dbAlias, wxString & viewName, bool geometry, RootNodes * list); void ExpandRoot() { Expand(Root); Expand(RootUserData); CollapseAllChildren(RootTopologies); CollapseAllChildren(RootRasterCoverages); CollapseAllChildren(RootVectorCoverages); CollapseAllChildren(RootStyling); CollapseAllChildren(RootIsoMetadata); Collapse(RootMetadata); Collapse(RootInternal); Collapse(RootSpatialIndex); } void AddTopology(TopologySet * topology) { Topologies.Add(this, RootTopologies, topology); } void AddAltTopology(wxTreeItemId & rootTopologies, TopologySet * topology) { AltTopologies.Add(this, rootTopologies, topology); } void DeleteTopologies(wxTreeItemId & root_topologies); void DeleteAltTopologies(void) { AltTopologies.Flush(); } void AddRasterCoverage(RasterCoverageSet * coverage) { RasterCoverages.Add(this, RootRasterCoverages, coverage->GetName(), coverage->GetSrid()); } void AddAltRasterCoverage(wxTreeItemId & rootRasterCoverages, RasterCoverageSet * coverage) { AltRasterCoverages.Add(this, rootRasterCoverages, coverage->GetName(), coverage->GetSrid()); } void AddVectorCoverage(VectorCoverageSet * coverage) { VectorCoverages.Add(this, RootVectorCoverages, coverage->GetName(), coverage->GetSrid()); } void AddAltVectorCoverage(wxTreeItemId & rootVectorCoverages, VectorCoverageSet * coverage) { AltVectorCoverages.Add(this, rootVectorCoverages, coverage->GetName(), coverage->GetSrid()); } bool GetCurrentlySelectedTable(wxString & table_name); void DeleteRasterCoverages(wxTreeItemId & root_coverages); void DeleteVectorCoverages(wxTreeItemId & root_coverages); void DeleteAltRasterCoverages(void) { AltRasterCoverages.Flush(); } void DeleteAltVectorCoverages(void) { AltVectorCoverages.Flush(); } void OnSelChanged(wxTreeEvent & event); void OnRightClick(wxTreeEvent & event); void OnCmdQueryViewComposer(wxCommandEvent & event); void OnCmdNewTable(wxCommandEvent & event); void OnCmdNewView(wxCommandEvent & event); void OnCmdNewIndex(wxCommandEvent & event); void OnCmdNewTrigger(wxCommandEvent & event); void OnCmdNewColumn(wxCommandEvent & event); void OnCmdNewRasterStyle(wxCommandEvent & event); void OnCmdReloadRasterStyle(wxCommandEvent & event); void OnCmdUnregisterRasterStyle(wxCommandEvent & event); void OnCmdRegisterExternalGraphic(wxCommandEvent & event); void OnCmdUnregisterExternalGraphic(wxCommandEvent & event); void OnCmdRegisterTextFont(wxCommandEvent & event); void OnCmdUnregisterTextFont(wxCommandEvent & event); void OnCmdNewVectorStyle(wxCommandEvent & event); void OnCmdReloadVectorStyle(wxCommandEvent & event); void OnCmdUnregisterVectorStyle(wxCommandEvent & event); void OnCmdRasterSymbolizerContrast(wxCommandEvent & event); void OnCmdRasterSymbolizerChannelRgb(wxCommandEvent & event); void OnCmdRasterSymbolizerChannelGray(wxCommandEvent & event); void OnCmdRasterSymbolizerCategorize(wxCommandEvent & event); void OnCmdRasterSymbolizerInterpolate(wxCommandEvent & event); void OnCmdRasterSymbolizerShadedRelief(wxCommandEvent & event); void OnCmdRasterSymbolizerMonochrome(wxCommandEvent & event); void OnCmdSimpleLineSymbolizer(wxCommandEvent & event); void OnCmdSimplePolygonSymbolizer(wxCommandEvent & event); void OnCmdSimplePointSymbolizer(wxCommandEvent & event); void OnCmdSimpleTextSymbolizer(wxCommandEvent & event); void OnCmdImportRaster(wxCommandEvent & event); void OnCmdPyramidize(wxCommandEvent & event); void OnCmdPyramidizeMonolithic(wxCommandEvent & event); void OnCmdDePyramidize(wxCommandEvent & event); void OnCmdRasterDrop(wxCommandEvent & event); void OnCmdRasterSRIDs(wxCommandEvent & event); void OnCmdRasterKeywords(wxCommandEvent & event); void OnCmdUpdateRasterExtent(wxCommandEvent & event); void OnCmdUpdateRasterExtentAll(wxCommandEvent & event); void OnCmdVectorUnregister(wxCommandEvent & event); void OnCmdVectorSRIDs(wxCommandEvent & event); void OnCmdVectorKeywords(wxCommandEvent & event); void OnCmdUpdateVectorExtent(wxCommandEvent & event); void OnCmdUpdateVectorExtentAll(wxCommandEvent & event); void OnCmdShow(wxCommandEvent & event); void OnCmdDrop(wxCommandEvent & event); void OnCmdRename(wxCommandEvent & event); void OnCmdSelect(wxCommandEvent & event); void OnCmdSelectTiles(wxCommandEvent & event); void OnCmdRefresh(wxCommandEvent & event); void OnRefreshDeferred(wxCommandEvent & event); void OnCmdRecover(wxCommandEvent & event); void OnCmdShowSql(wxCommandEvent & event); void OnCmdSpatialIndex(wxCommandEvent & event); void OnCmdCheckSpatialIndex(wxCommandEvent & event); void OnCmdRecoverSpatialIndex(wxCommandEvent & event); void OnCmdMbrCache(wxCommandEvent & event); void OnCmdRebuildTriggers(wxCommandEvent & event); void OnCmdCheckGeometry(wxCommandEvent & event); void OnCmdExtent(wxCommandEvent & event); void OnCmdUpdateLayerStatistics(wxCommandEvent & event); void OnCmdUpdateLayerStatisticsAll(wxCommandEvent & event); void OnCmdElementaryGeometries(wxCommandEvent & event); void OnCmdMalformedGeometries(wxCommandEvent & event); void OnCmdRepairPolygons(wxCommandEvent & event); void OnCmdSetSrid(wxCommandEvent & event); void OnCmdDumpShp(wxCommandEvent & event); void OnCmdDumpKml(wxCommandEvent & event); void OnCmdDumpTxtTab(wxCommandEvent & event); void OnCmdDumpCsv(wxCommandEvent & event); void OnCmdDumpHtml(wxCommandEvent & event); void OnCmdDumpDif(wxCommandEvent & event); void OnCmdDumpSylk(wxCommandEvent & event); void OnCmdDumpDbf(wxCommandEvent & event); void OnCmdDumpPostGIS(wxCommandEvent & event); void OnCmdEdit(wxCommandEvent & event); bool DropRenameAux1(MyObject * obj, class GeomColsList * geometries, bool * autoincrement); void DropRenameAux2(MyObject * obj, GeomColsList * geometries, wxString & aliasTable, wxString & new_column, wxString & renameSql, wxString & dropSql, wxString & disableSpatialIdxSql, wxString & dropSpatialIdxSql, wxString & createSpatialIdxSql, wxString & discardGeometrySql); void DropRenameAux3(MyObject * obj, wxString & new_column, GeomColsList * geometries, class TblIndexList * index, wxString & addGeometrySql); void OnCmdDropColumn(wxCommandEvent & event); void OnCmdRenameColumn(wxCommandEvent & event); void OnCmdGisLayerAuth(wxCommandEvent & event); void OnCmdColumnStats(wxCommandEvent & event); void OnCmdMapPreview(wxCommandEvent & event); void OnCmdCheckDuplicates(wxCommandEvent & event); void OnCmdRemoveDuplicates(wxCommandEvent & event); void OnCmdDetachDB(wxCommandEvent & event); void OnCmdCheckGeometries(wxCommandEvent & event); void OnCmdSanitizeGeometries(wxCommandEvent & event); void OnCmdSldSeRasterStyles(wxCommandEvent & event); void OnCmdSldSeVectorStyles(wxCommandEvent & event); void OnCreateRasterCoverage(wxCommandEvent & event); void OnRegisterVectorCoverage(wxCommandEvent & event); void OnItemCollapsed(wxTreeEvent & event); void OnItemExpanding(wxTreeEvent & event); }; class SqlThreadParams { // // an auxiliary class used for SQL threaded queries // private: class MyResultSetView * Mother; wxString Sql; sqlite3_stmt *Stmt; int FromRow; int EndRow; int MaxRow; MyVariantList List; sqlite3 *Sqlite; clock_t Start; clock_t LastGuiUpdate; bool Error; int FetchedRows; int StatFullscanStep; int StatSort; int StatAutoindex; double ElapsedTime; bool AbortRequested; bool Valid; public: SqlThreadParams() { Reset(); } ~SqlThreadParams() {; } void Initialize(MyResultSetView * mother, wxString & sql, sqlite3_stmt * stmt, int from, sqlite3 * sqlite, clock_t start); void Reset(void); bool IsValid() { return Valid; } MyResultSetView *GetMother() { return Mother; } wxString & GetSql() { return Sql; } sqlite3_stmt *GetStmt() { return Stmt; } int GetFromRow() { return FromRow; } void SetEndRow(int end) { EndRow = end; } int GetEndRow() { return EndRow; } void SetMaxRow(int max) { MaxRow = max; } int GetMaxRow() { return MaxRow; } MyVariantList *GetList() { return &List; } sqlite3 *GetSqlite() { return Sqlite; } clock_t GetStart() { return Start; } void FetchedRow() { FetchedRows++; } void UpdateStats(int fullscan, int sort, int autoindex, clock_t now); int GetFetchedRows() { return FetchedRows; } int GetStatFullscanStep() { return StatFullscanStep; } int GetStatSort() { return StatSort; } int GetStatAutoindex() { return StatAutoindex; } double GetElapsedTime() { return ElapsedTime; } bool GuiHasToBeUpdated(clock_t now, int millisecs); void SetLastGuiUpdate(clock_t now) { LastGuiUpdate = now; } void SetError() { Error = true; } bool IsError() { return Error; } void Abort() { AbortRequested = true; } bool IsAbortRequested() { return AbortRequested; } void Finalize() { sqlite3_finalize(Stmt); Stmt = NULL; } }; class MyResultSetView:public wxPanel { // // a panel to be used for SQL Queries // private: class MyFrame * MainFrame; wxBitmapButton *BtnRsFirst; wxBitmapButton *BtnRsLast; wxBitmapButton *BtnRsNext; wxBitmapButton *BtnRsPrevious; wxBitmapButton *BtnRefresh; wxStaticText *RsCurrentBlock; int RsBlock; int RsBeginRow; int RsEndRow; int RsMaxRow; bool IsMaxAlreadySet; int CurrentEvtRow; int CurrentEvtColumn; int CurrentTileId; wxString TileDataTable; MyVariant *CurrentBlob; wxGrid *TableView; MyBlobs *TableBlobs; MyValues *TableValues; bool ReadOnly; bool CoverageTiles; sqlite3_int64 *RowIds; int PrimaryKeys[1024]; int BlobColumns[1024]; wxString TableName; bool InsertPending; MyRowVariant *InsertRow; wxString SqlErrorMsg; SqlThreadParams ThreadParams; void XmlBlobOut(bool indented); const char *CleanSqlTail(const char *dirty); void UpdateMaxRow(wxString & sql); public: MyResultSetView() {; } MyResultSetView(MyFrame * parent, wxWindowID id = wxID_ANY); virtual ~ MyResultSetView(); void HideControls(); void ShowControls(); wxString & GetSqlErrorMsg() { return SqlErrorMsg; } bool IsPrimaryKey(int column); bool IsBlobColumn(int column); void EditTable(wxString & sql, int *primaryKeys, int *blobCols, wxString & tableName); void CreateGrid(int rows, int cols); void CreateStatsGrid(); bool ExecuteSqlPre(wxString & sql, int from, bool read_only, bool coverage, wxString & tile_data_table, bool reset); bool ExecuteSqlPost(void); void AbortRequested(void); wxStaticText *GetCurrentBlock() { return RsCurrentBlock; } static void FormatElapsedTime(double seconds, char *elapsed, bool simple = false); int GetRsBlock() { return RsBlock; } void SetSqlErrorMsg(wxString & msg) { SqlErrorMsg = msg; } void ResizeView(void); void DoInsert(bool confirmed); void HexBlobValue(unsigned char *blob, int size, wxString & hex); void OnSize(wxSizeEvent & event); void OnRsFirst(wxCommandEvent & event); void OnRsLast(wxCommandEvent & event); void OnRsNext(wxCommandEvent & event); void OnRsPrevious(wxCommandEvent & event); void OnRefresh(wxCommandEvent & event); void OnThreadFinished(wxCommandEvent & event); void OnStatsUpdate(wxCommandEvent & event); void OnCellSelected(wxGridEvent & event); void OnRightClick(wxGridEvent & event); void OnCellChanged(wxGridEvent & event); void OnCmdDelete(wxCommandEvent & event); void OnCmdInsert(wxCommandEvent & event); void OnCmdAbort(wxCommandEvent & event); void OnCmdClearSelection(wxCommandEvent & event); void OnCmdSelectAll(wxCommandEvent & event); void OnCmdSelectRow(wxCommandEvent & event); void OnCmdSelectColumn(wxCommandEvent & event); void OnCmdCopy(wxCommandEvent & event); void OnCmdBlob(wxCommandEvent & event); void OnCmdBlobIn(wxCommandEvent & event); void OnCmdBlobOut(wxCommandEvent & event); void OnCmdBlobNull(wxCommandEvent & event); void OnCmdXmlBlobIn(wxCommandEvent & event); void OnCmdXmlBlobOut(wxCommandEvent & event); void OnCmdXmlBlobOutIndented(wxCommandEvent & event); void OnCmdExpTxtTab(wxCommandEvent & event); void OnCmdExpCsv(wxCommandEvent & event); void OnCmdExpHtml(wxCommandEvent & event); void OnCmdExpShp(wxCommandEvent & event); void OnCmdExpDif(wxCommandEvent & event); void OnCmdExpSylk(wxCommandEvent & event); void OnCmdExpDbf(wxCommandEvent & event); void OnCmdTilePreview(wxCommandEvent & event); }; class MySqlControl:public wxTextCtrl { // // the SQL text control // private: class MyQueryView * Parent; public: MySqlControl(MyQueryView * parent, wxWindowID id, const wxString & value, const wxPoint & pos, const wxSize & size, long style); virtual ~ MySqlControl() {; } void OnSqlMousePosition(wxMouseEvent & event); void OnSqlArrowPosition(wxKeyEvent & event); }; class SqlTokenizer { // // a class used for tokenizing SQL statements // private: wxString ** TokenList; int Block; int Max; int Index; void Expand(); void Insert(wxString * token); wxString CurrentToken; public: SqlTokenizer(wxString & sql); ~SqlTokenizer(); bool HasMoreTokens(); wxString & GetNextToken(); }; class MyQueryView:public wxPanel { // // a panel to be used for SQL Queries // private: class MyFrame * MainFrame; MySqlHistory History; MySqlControl *SqlCtrl; wxBitmapButton *BtnSqlGo; wxBitmapButton *BtnSqlAbort; wxBitmapButton *BtnHistoryBack; wxBitmapButton *BtnHistoryForward; int BracketStart; int BracketEnd; bool IgnoreEvent; public: MyQueryView() {; } MyQueryView(MyFrame * parent, wxWindowID id = wxID_ANY); virtual ~ MyQueryView() {; } void HideControls(); void ShowControls(); static bool IsSqliteExtra(wxString & str); static bool IsSqlString(wxString & str); static bool IsSqlNumber(wxString & str); static bool IsSqlFunction(wxString & str, char next_c); static bool IsSqlGeoFunction(wxString & str, char next_c); static bool IsSqlRasterFunction(wxString & str, char next_c); bool IsIgnoreEvent() { return IgnoreEvent; } void EventBrackets(); bool CheckBrackets(int pos, bool reverse_direction, int *on, int *off); void EvidBrackets(int on, int off); void DoSqlSyntaxColor(); void EnableAbortButton() { BtnSqlAbort->Enable(true); } void DisableAbortButton() { BtnSqlAbort->Enable(false); } wxTextCtrl *GetSqlCtrl() { return SqlCtrl; } MySqlHistory *GetHistory() { return &History; } void SetSql(wxString & sql, bool execute); void SetSql(wxString & sql, bool execute, bool coverage, wxString & tile_data_table, bool reset); void SetHistoryStates(); void OnSize(wxSizeEvent & event); void OnSqlGo(wxCommandEvent & event); void OnSqlAbort(wxCommandEvent & event); void OnHistoryBack(wxCommandEvent & event); void OnHistoryForward(wxCommandEvent & event); void OnSqlSyntaxColor(wxCommandEvent & event); void AddToHistory(wxString & sql); }; class MalformedGeom { // // a malformed geometry item // private: sqlite3_int64 RowId; int Severity; wxString Error; wxString GeosMsg; bool CanFix; MalformedGeom *Next; public: MalformedGeom(sqlite3_int64 rowid, int severity, bool canFix, wxString & error); MalformedGeom(sqlite3_int64 rowid, int severity, bool canFix, wxString & error, wxString & geosMsg); ~MalformedGeom() {; } sqlite3_int64 GetRowId() { return RowId; } int GetSeverity() { return Severity; } bool CanBeFixed() { return CanFix; } wxString & GetError() { return Error; } wxString & GetGeosMsg() { return GeosMsg; } void SetNext(MalformedGeom * next) { Next = next; } MalformedGeom *GetNext() { return Next; } }; class MalformedGeomsList { // // a list of malformed geometries // private: MalformedGeom * First; MalformedGeom *Last; public: MalformedGeomsList() { First = NULL; Last = NULL; } ~MalformedGeomsList(); void AddEntity(sqlite3_int64 rowid, int severity, bool canFix, wxString & error); void AddEntity(sqlite3_int64 rowid, int severity, bool CanFix, wxString & error, wxString & geosMsg); MalformedGeom *GetFirst() { return First; } }; class SanitizeAllGeometriesDialog:public wxDialog { // // a dialog supporting Sanitize All Geometries // private: MyFrame * MainFrame; wxString TmpPrefix; public: SanitizeAllGeometriesDialog() {; } virtual ~ SanitizeAllGeometriesDialog() {; } bool Create(MyFrame * parent); void CreateControls(); wxString & GetTmpPrefix() { return TmpPrefix; } void OnYes(wxCommandEvent & event); void OnNo(wxCommandEvent & event); }; class WfsParams { // parameters for WFS download private: class WfsDialog * Mother; wxGauge *ProgressCtrl; sqlite3 *sqlite; wxString url; wxString alt_describe; wxString layer_name; int swap_axes; wxString table; wxString primary_key; int spatial_index; int page_size; wxString extra; void (*callback) (int, void *); int ret; char *err_msg; int rows; int ProgressCount; int LastProgressCount; public: WfsParams() {; } ~WfsParams() {; } void Initialize(WfsDialog * mother, sqlite3 * sqlite, wxString & url, wxString & alt_describe, wxString & layer_name, int swap_axes, wxString & table, wxString & primary_key, int spatial_index, int page_size, wxString & extra, void (*callback) (int, void *)) { Mother = mother; this->sqlite = sqlite; this->url = url; this->alt_describe = alt_describe; this->layer_name = layer_name; this->swap_axes = swap_axes; this->table = table; this->primary_key = primary_key; this->spatial_index = spatial_index; this->page_size = page_size; this->extra = extra; this->callback = callback; ProgressCount = 0; LastProgressCount = 0; } WfsDialog *GetMother() { return Mother; } sqlite3 *GetSqlite() { return sqlite; } wxString & GetUrl() { return url; } wxString & GetAltDescribeUri() { return alt_describe; } wxString & GetLayerName() { return layer_name; } int GetSwapAxes() { return swap_axes; } wxString & GetTable() { return table; } wxString & GetPrimaryKey() { return primary_key; } int GetSpatialIndex() { return spatial_index; } int GetPageSize() { return page_size; } wxString & GetExtra() { return extra; } void (*GetCallback()) (int, void *) { return callback; } void SetRet(int ret) { this->ret = ret; } int GetRet() { return ret; } void SetErrMsg(char *err_msg) { this->err_msg = err_msg; } char *GetErrMsg() { return err_msg; } void SetRows(int rows) { this->rows = rows; } int GetRows() { return rows; } int *GetProgressCountPtr() { return &ProgressCount; } void SetLastProgressCount() { LastProgressCount = 0; } int GetProgressCount() { return ProgressCount; } int GetLastProgressCount() { return LastProgressCount; } }; class WfsKey { // a WFS Keyword private: wxString Keyword; WfsKey *Next; public: WfsKey(wxString key) { Keyword = key; Next = NULL; } ~WfsKey() {; } wxString & GetKeyword() { return Keyword; } void SetNext(WfsKey * next) { Next = next; } WfsKey *GetNext() { return Next; } }; class WfsKeywords { // an ancillary class storing the WFS Keywords dictionary private: WfsKey * First; WfsKey *Last; WfsKey **SortedArray; int MaxSorted; public: WfsKeywords() { First = NULL; Last = NULL; SortedArray = NULL; MaxSorted = 0; } ~WfsKeywords(); void Add(const char *key); void Sort(); int GetMaxSorted() { return MaxSorted; } WfsKey *GetKey(int index); }; class WfsDialog:public wxDialog { // // a dialog supporting data import from a WFS datasource // private: wxTimer * ProgressTimer; MyFrame *MainFrame; WfsParams Params; gaiaWFScatalogPtr Catalog; WfsKeywords *Keywords; wxGrid *WfsView; wxGauge *Progress; int CurrentEvtRow; int CurrentEvtColumn; bool ProxyEnabled; wxString WfsGetCapabilitiesURL; wxString PreviousHttpProxy; wxString HttpProxy; gaiaWFSitemPtr FindLayerByName(wxString & name); void SelectLayer(); public: WfsDialog() { Catalog = NULL; WfsView = NULL; Keywords = NULL; ProxyEnabled = false; ProgressTimer = NULL; } virtual ~ WfsDialog() { if (ProgressTimer) { ProgressTimer->Stop(); delete ProgressTimer; } if (Catalog != NULL) destroy_wfs_catalog(Catalog); if (Keywords != NULL) delete Keywords; } void ResetProgress(); void ProgressWait(); void ProgressUpdate(int rows); bool Create(MyFrame * parent, wxString & wfs_url, wxString & proxy); void CreateControls(); void OnProxy(wxCommandEvent & event); void OnPagingChanged(wxCommandEvent & event); void OnLeftClick(wxGridEvent & event); void OnRightClick(wxGridEvent & event); void OnKeyFilter(wxCommandEvent & event); void OnKeyReset(wxCommandEvent & event); void OnCatalog(wxCommandEvent & event); void OnReset(wxCommandEvent & event); void OnLoadFromWfs(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); void OnCmdCopy(wxCommandEvent & event); void OnCmdSelectLayer(wxCommandEvent & event); void OnThreadFinished(wxCommandEvent & event); void OnRefreshTimer(wxTimerEvent & event); }; class CheckGeometryDialog:public wxDialog { // // a dialog supporting Check Geometry Column // private: MyFrame * MainFrame; wxString Table; wxString Geometry; public: CheckGeometryDialog() {; } virtual ~ CheckGeometryDialog() {; } bool Create(MyFrame * parent, wxString & table, wxString & geom); void CreateControls(); void OnYes(wxCommandEvent & event); void OnNo(wxCommandEvent & event); }; class SanitizeGeometryDialog:public wxDialog { // // a dialog supporting Sanitize Geometry Column // private: MyFrame * MainFrame; wxString TmpPrefix; wxString Table; wxString Geometry; public: SanitizeGeometryDialog() {; } virtual ~ SanitizeGeometryDialog() {; } bool Create(MyFrame * parent, wxString & table, wxString & geom); void CreateControls(); wxString & GetTmpPrefix() { return TmpPrefix; } void OnYes(wxCommandEvent & event); void OnNo(wxCommandEvent & event); }; class MalformedGeomsDialog:public wxDialog { // // a dialog displaying a Malformed Geometries list // private: MyFrame * MainFrame; wxString Table; wxString Geometry; wxGrid *GridCtrl; MalformedGeomsList *List; int CurrentEvtRow; int CurrentEvtColumn; public: MalformedGeomsDialog() { List = NULL; } MalformedGeomsDialog(MyFrame * parent, wxString & table, wxString & column, MalformedGeomsList * list); bool Create(MyFrame * parent, wxString & table, wxString & column, MalformedGeomsList * list); virtual ~ MalformedGeomsDialog() { if (List) delete List; } void CreateControls(); void OnClose(wxCommandEvent & event); void OnRepair(wxCommandEvent & event); void OnRightClick(wxGridEvent & event); void OnCmdClearSelection(wxCommandEvent & event); void OnCmdSelectAll(wxCommandEvent & event); void OnCmdSelectRow(wxCommandEvent & event); void OnCmdSelectColumn(wxCommandEvent & event); void OnCmdCopy(wxCommandEvent & event); void OnCmdBlob(wxCommandEvent & event); }; class TableViewItem { // // an ancillary class wrapping Tables and Views // private: wxString Name; bool View; bool Virtual; bool Geometry; TableViewItem *Next; public: TableViewItem(wxString & name, bool is_view, bool is_virtual); ~TableViewItem() {; } wxString & GetName() { return Name; } bool IsView() { return View; } bool IsVirtual() { return Virtual; } void SetGeometry() { Geometry = true; } bool IsGeometry() { return Geometry; } void SetNext(TableViewItem * next) { Next = next; } TableViewItem *GetNext() { return Next; } }; class TableViewList { // // an ancillary class used to build the Tree Control // private: TableViewItem * First; TableViewItem *Last; int Count; TableViewItem **Sorted; public: TableViewList(); ~TableViewList(); void Add(wxString & name, bool isView, bool isVirtual); void PrepareSorted(); void SetGeometry(wxString & name); TableViewItem *GetFirst() { return First; } }; class DbStatusDialog:public wxDialog { // // a dialog displaying DB Status infos // private: MyFrame * MainFrame; wxGrid *GridCtrl; wxStaticBitmap *Graph; int CurrentEvtRow; int CurrentEvtColumn; int *DynamicIds; int *DynamicModes; wxTimer *RefreshTimer; enum StatusModes { ModeNone, ModeStatusBoth, ModeStatusFirst, ModeStatusSecond, ModeStatusBothBytes, ModeStatusFirstBytes, ModeStatusSecondBytes, ModeDbStatusBoth, ModeDbStatusFirst, ModeDbStatusSecond, ModeDbStatusBothBytes, ModeDbStatusFirstBytes, ModeDbStatusSecondBytes }; public: DbStatusDialog(); bool Create(MyFrame * parent); virtual ~ DbStatusDialog(); void CreateControls(); void OnClose(wxCommandEvent & event); void OnReset(wxCommandEvent & event); void OnRightClick(wxGridEvent & event); void OnCmdClearSelection(wxCommandEvent & event); void OnCmdSelectAll(wxCommandEvent & event); void OnCmdSelectRow(wxCommandEvent & event); void OnCmdSelectColumn(wxCommandEvent & event); void OnCmdCopy(wxCommandEvent & event); void OnRefreshTimer(wxTimerEvent & event); }; class MyStatusBar:public wxStatusBar { // // a StatusBar with an Icon // private: MyFrame * Parent; wxStaticBitmap *Bitmap; public: MyStatusBar(MyFrame * parent); virtual ~ MyStatusBar() {; } void SetSecurityRelaxedIcon(); void SetSecurityStrongIcon(); void SetReadOnlyIcon(); void SetNotConnectedIcon(); void SetText(wxString & msg); void OnSize(wxSizeEvent & event); }; class MyFrame:public wxFrame { // // the main GUI frame // private: char *Old_SPATIALITE_SECURITY_ENV; wxString AutoFDOmsg; wxString AutoGPKGmsg; bool SpatiaLiteMetadata; wxAuiManager Manager; // the GUI manager wxString ConfigLayout; // PERSISTENCY - the layout configuration int ConfigPaneX; // PERSISTENCY - the main pane screen origin X int ConfigPaneY; // PERSISTENCY - the main pane screen origin Y int ConfigPaneWidth; // PERSISTENCY - the main pane screen width int ConfigPaneHeight; // PERSISTENCY - the main pane screen height wxString ConfigDbPath; // PERSISTENCY - the last opened DB path wxString ConfigDir; // PERSISTENCY - the last used directory wxString HttpProxy; // PERSISTENCY - the last used HTTP Proxy wxString WfsGetCapabilitiesURL; // PERSISTENCY - the last used WFS GetCapabilities URL MyTableTree *TableTree; // the tables tree list MyQueryView *QueryView; // the QueryResult panel MyResultSetView *RsView; // the QueryResult panel bool HelpPane; // is the HELP pane already opened ? bool SecurityRelaxed; // is "SPATIALITE_SECURITY=relaxed" currently set ? int RL2MaxThreads; // max concurrent threads for RL2 sqlite3 *SqliteHandle; // handle for SQLite DB wxString SqlitePath; // path of SQLite DB void *SpliteInternalCache; // pointer to the InternalCache supporting the DB connection void *RL2PrivateData; // pointer to RL2 Private Data wxString ExternalSqlitePath; // path of external SQLite DB [LOAD/SAVE MEMORY database] bool MemoryDatabase; // TRUE if we are currently working on the MEMORY database wxString LastDirectory; // path of directory used int CharsetsLen; // # charsets defined wxString *Charsets; // table of charsets [code only] wxString *CharsetsNames; // table of charsets [with description] wxString LocaleCharset; // locale charset wxString DefaultCharset; // default charset bool AskCharset; // switch to set default charset for every output int TablesLen; // # tables defined wxString *TableNames; // array of tables wxBitmap *BtnCreateNew; // button icon for DB CREATE&CONNECT wxBitmap *BtnConnect; // button icon for DB CONNECT wxBitmap *BtnConnectReadOnly; // button icon for DB CONNECT - READ ONLY wxBitmap *BtnDisconnect; // button icon for DB DISCONNECT wxBitmap *BtnMemDbLoad; // button icon for MEMORY DB LOAD wxBitmap *BtnMemDbNew; // button icon for MEMORY DB NEW wxBitmap *BtnMemDbClock; // button icon for MEMORY DB CLOCK wxBitmap *BtnMemDbSave; // button icon for MEMORY DB SAVE wxBitmap *BtnVacuum; // button icon for DB VACUUM wxBitmap *BtnSqlScript; // button icon for Execute SQL SCRIPT wxBitmap *BtnQueryComposer; // button icon for Query/View Composer wxBitmap *BtnCharset; // button icon for Default CHARSET wxBitmap *BtnLoadShp; // button icon for LOAD SHP wxBitmap *BtnLoadTxt; // button icon for LOAD TXT/CSV wxBitmap *BtnLoadDbf; // button icon for LOAD DBF wxBitmap *BtnLoadXL; // button icon for LOAD_XL wxBitmap *BtnVirtualShp; // button icon for VIRTUAL SHP wxBitmap *BtnVirtualTxt; // button icon for VIRTUAL TXT/CSV wxBitmap *BtnVirtualDbf; // button icon for VIRTUAL DBF wxBitmap *BtnVirtualXL; // button icon for VIRTUAL XL wxBitmap *BtnNetwork; // button icon for BUILD NETWORK wxBitmap *BtnExif; // button icon for EXIF LOAD wxBitmap *BtnLoadXml; // button icon for XML LOAD wxBitmap *BtnSrids; // button icon for SEARCH SRIDs wxBitmap *BtnHelp; // button icon for HELP wxBitmap *BtnAbout; // button icon for ABOUT wxBitmap *BtnExit; // button icon for EXIT wxBitmap *BtnAttach; // button icon for ATTACH wxBitmap *BtnSqlLog; // button icon for SQL LOG wxBitmap *BtnDbStatus; // button icon for DB STATUS wxBitmap *BtnCheckGeom; // button icon for CheckGeom wxBitmap *BtnSaneGeom; // button icon for SaneGeom wxBitmap *BtnWFS; // button icon for WFS wxBitmap *BtnDXF; // button icon for DXF bool ReadOnlyConnection; // AutoSave timer int AutoSaveInterval; int LastTotalChanges; wxTimer *TimerAutoSave; gaiaGeomCollPtr GeomFromPoint(gaiaPointPtr pt, int srid); gaiaGeomCollPtr GeomFromLinestring(gaiaLinestringPtr ln, int srid); gaiaGeomCollPtr GeomFromPolygon(gaiaPolygonPtr pg, int srid); sqlite3_int64 LastSqlLogID; bool SqlLogEnabled; bool GetLwGeomVersion(char *buf); bool GetLibXml2Version(char *buf); MyStatusBar *StatusBar; void TestSecurityRelaxed(const char *path); bool IsSafeDB(const char *path); void SetSecurityRelaxed(); void ResetSecurity(); rl2PixelPtr DefaultNoData(unsigned char sample, unsigned char pixel, unsigned char num_bands); rl2PixelPtr ParseNoData(wxString & NoData, int SampleType, int PixelType, int NumBands); char *GetNum(const char *start, const char *end); bool IsValidSqliteFile(wxString & path); void DoUpdateRL2MaxThreads(); public: MyFrame(const wxString & title, const wxPoint & pos, const wxSize & size); virtual ~ MyFrame(); void UpdateStatusBar(bool changeIcon = true); bool IsConnected() { if (SqliteHandle) return true; else return false; } bool IsSecurityLevelRelaxed() { return SecurityRelaxed; } int GetRL2MaxThreads(); static void DoubleQuotedSql(char *str); static void CleanSqlString(char *sql); void InsertIntoLog(wxString & sql); void UpdateLog(void); void UpdateLog(wxString & error_msg); void UpdateAbortedLog(void); void EnableSqlLog(); bool DoAttachDatabase(wxString & path); void GetNextAttachedSymbol(wxString & symbol); void CleanTxtTab(char *str); void CleanCsv(char *str); void CleanHtml(char *str); void DifQuote(char *str); void SylkQuote(char *str); void DecimalNumber(double num, char *str, char decimal_point); bool TestDateValue(char *date); bool TestDateTimeValue(char *datetime); bool TestTimeValue(char *time); int ComputeSpreadsheetDate(int yy, int mm, int dd); double ComputeSpreadsheetTime(int hh, int mm, int ss); int GetDateValue(char *date); double GetDateTimeValue(char *datetime); double GetTimeValue(char *time); wxString & GetSqlitePath() { return SqlitePath; } wxString & GetExternalSqlitePath() { return ExternalSqlitePath; } void SetExternalSqlitePath(wxString & path) { ExternalSqlitePath = path; } sqlite3 *GetSqlite() { return SqliteHandle; } void *GetSpliteInternalCache() { return SpliteInternalCache; } int GetDecimalPrecision(); void *GetRL2PrivateData() { return RL2PrivateData; } bool IsSecurityRelaxed() { return SecurityRelaxed; } void CloseHelpPane() { HelpPane = false; } void OpenHelpPane() { HelpPane = true; } bool OpenDB(bool read_only); bool CreateDB(); void CloseDB(); void InitializeSpatialMetadata(); void AutoFDOStart(); void AutoFDOStop(); void AutoGPKGStart(); void AutoGPKGStop(); void InitTableTree(); void LoadHistory(); bool HasHistory(); void ListAttached(); void InitTableTree(wxString & dbAlias, wxString & path); void ClearTableTree(); int GetMetaDataType(); bool HasViewsMetadata(); bool HasVirtsMetadata(); bool HasViewsMetadata(wxString & dbAlias); bool HasVirtsMetadata(wxString & dbAlias); void FindGeometries(TableViewList * list); void FindGeometries(wxString & dbAlias, TableViewList * list); void GetTableColumns(wxString & tableName, MyTableInfo * list); void GetTableIndices(wxString & tableName, MyTableInfo * list); void GetTableTriggers(wxString & tableName, MyTableInfo * list); void GetViewColumns(wxString & viewName, MyViewInfo * list); void GetViewTriggers(wxString & viewName, MyViewInfo * list); void CheckGPKG(wxString & tableName, MyTableInfo * list); void GetIndexFields(wxString & indexName, wxTreeItemId & node); void GetPrimaryKeyFields(wxString & indexName, wxTreeItemId & node); void GetForeignKeys(wxString & tableName, wxTreeItemId & node); void GetTableColumns(wxString & dbAlias, wxString & tableName, MyTableInfo * list); void GetTableIndices(wxString & dbAlias, wxString & tableName, MyTableInfo * list); void GetTableTriggers(wxString & dbAlias, wxString & tableName, MyTableInfo * list); void GetViewColumns(wxString & dbAlias, wxString & viewName, MyViewInfo * list); void GetViewTriggers(wxString & dbAlias, wxString & viewName, MyViewInfo * list); void GetIndexFields(wxString & dbAlias, wxString & indexName, wxTreeItemId & node); void GetPrimaryKeyFields(wxString & dbAlias, wxString & indexName, wxTreeItemId & node); void GetForeignKeys(wxString & dbAlias, wxString & tableName, wxTreeItemId & node); bool ExistsTopologyMaster(); bool ExistsTopologyMaster(wxString & dbAlias); void GetTopologyColumns(wxString * list); void GetTopologyColumns(wxString & dbAlias, wxString * list); bool ExistsRasterCoverages(); bool ExistsRasterCoverages(wxString & dbAlias); bool ExistsVectorCoverages(); bool ExistsVectorCoverages(wxString & dbAlias); void CheckIfExists(const char *name, bool * table, bool * view); void CheckIfExists(wxString & dbAlias, const char *name, bool * table, bool * view); void ElementaryGeoms(wxString & inTable, wxString & geometry, wxString & outTable, wxString & pKey, wxString & multiID, wxString & type, int *srid, wxString & coordDims, bool * spIdx); bool DoElementaryGeometries(wxString & inTable, wxString & geometry, wxString & outTable, wxString & pKey, wxString & multiID, wxString & type, int srid, wxString & coordDims, bool spIdx); void EditTable(wxString & sql, int *primaryKeys, int *blobCols, wxString & table) { RsView->EditTable(sql, primaryKeys, blobCols, table); } bool IsSpatialIndex(wxString & tableName); bool IsSpatialIndex(wxString & dbAlias, wxString & tableName); void SetSql(wxString & sql, bool execute) { QueryView->SetSql(sql, execute); } void SetSql(wxString & sql, bool execute, bool coverage, wxString & tile_data_table, bool reset) { QueryView->SetSql(sql, execute, coverage, tile_data_table, reset); } bool ExecuteSql(const char *sql, int rowNo); void Rollback(); void DoCreateStylingTables(void); bool TableAlreadyExists(wxString & name); bool CoverageAlreadyExists(wxString & name); bool SridNotExists(int srid); bool CheckMetadata(); bool CheckMetadata(wxString & dbAlias); void SaveConfig(); void LoadConfig(wxString & externalPath); wxString *GetCharsets() { return Charsets; } wxString *GetCharsetsNames() { return CharsetsNames; } int GetCharsetsLen() { return CharsetsLen; } gaiaDbfFieldPtr GetDbfField(gaiaDbfListPtr list, int index); void OutputPrjFile(wxString & path, int srid); void LoadText(wxString & path, wxString & table, wxString & charset, bool first_titles, const char decimal_separator, const char separator, const char text_separator); void DumpTxtTab(wxString & path, wxString & table, wxString & charset); void DumpCsv(wxString & path, wxString & table, wxString & charset); void DumpHtml(wxString & path, wxString & table, wxString & dbPath, wxString & charset); void DumpDif(wxString & path, wxString & table, wxString & charset, char decimal_point, bool date_time); void DumpSylk(wxString & path, wxString & table, wxString & charset, bool date_time); void DumpKml(wxString & path, wxString & table, wxString & column, int precision, wxString & name, bool isNameConst, wxString & desc, bool isDescConst); void ExportResultSetAsTxtTab(wxString & path, wxString & sql, wxString & charset); void ExportResultSetAsCsv(wxString & path, wxString & sql, wxString & charset); void ExportResultSetAsHtml(wxString & path, wxString & sql, wxString & dbPath, wxString & charset); bool ExportHtmlColorSqlSyntax(FILE * out, wxString & sql, char *out_cs); void ExportResultSetAsShp(wxString & path, wxString & sql, wxString & charset); void ExportResultSetAsDif(wxString & path, wxString & sql, wxString & charset, char decimal_point, bool date_time); void ExportResultSetAsSylk(wxString & path, wxString & sql, wxString & charset, bool date_time); void ExportResultSetAsDbf(wxString & path, wxString & sql, wxString & charset); void GetHelp(wxString & html); wxString *GetColumnNames(wxString & table, int *columns); void SetLastDirectory(wxString & path) { LastDirectory = path; } wxString & GetLastDirectory() { return LastDirectory; } void SetHttpProxy(wxString & proxy) { HttpProxy = proxy; } wxString & GetHttpProxy() { return HttpProxy; } void SetWfsGetCapabilitiesURL(wxString & url) { WfsGetCapabilitiesURL = url; } wxString & GetWfsGetCapabilitiesURL() { return WfsGetCapabilitiesURL; } wxString & GetLocaleCharset() { return LocaleCharset; } wxString & GetDefaultCharset() { return DefaultCharset; } wxString & GetCharsetName(wxString & charset); int GetCharsetIndex(wxString & charset); bool IsSetAskCharset() { return AskCharset; } char *ReadSqlLine(FILE * fl, int *len, int *eof); MyQueryView *GetQueryView() { return QueryView; } MyResultSetView *GetRsView() { return RsView; } wxString *GetTables(int *cnt); void BuildNetwork(wxString & table, wxString & from, wxString & to, bool isNoGeometry, wxString & geometry, wxString & name, bool cost_length, wxString & cost, bool bidirectional, bool one_way, wxString & one_way_from_to, wxString & one_way_to_from, bool aStarSupported, wxString & dataTableName, wxString & virtualTableName); void BuildNetwork(wxString & table, wxString & from, wxString & to, wxString & name, wxString & cost, bool bidirectional, bool one_way, wxString & one_way_from_to, wxString & one_way_to_from, wxString & dataTableName, wxString & virtualTableName); bool CreateNetwork(class Network * net, wxString & table, wxString & from, wxString & to, wxString & geometry, wxString & name, bool aStarSupported, double aStarCoeff, wxString & dataTableName, wxString & virtualTableName); bool CreateNetwork(class Network * net, wxString & table, wxString & from, wxString & to, wxString & name, wxString & dataTableName, wxString & virtualTableName); void ImportExifPhotos(wxString & path, bool folder, bool metadata, bool gps_only); void ImportXmlDocuments(wxString & path, bool folder, wxString & suffix, wxString & table, wxString & pkName, wxString & xmlColumn, wxString & inPathColumn, wxString & schemaColumn, wxString & parseErrColumn, wxString & validateErrColumn, int compressed, const char *schemaURI, bool isInternaleSchemaUri); void ImportDXFfiles(wxString & path, bool folder, wxString & prefix, wxString & layer, int srid, bool force2d, bool force3d, bool mixed, bool linked, bool unlinked, bool append); void OutputNetNode(unsigned char *auxbuf, int *size, int ind, bool node_code, int max_node_length, class NetNode * pN, int endian_arch, bool aStarSupported); bool CheckExifTables(); int ExifLoadDir(wxString & path, bool gps_only, bool metadata); int ExifLoadFile(wxString & path, bool gps_only, bool metadata); bool UpdateExifTables(unsigned char *blob, int sz, gaiaExifTagListPtr tag_list, bool metadata, wxString & path); bool IsExifGps(gaiaExifTagListPtr tag_list); int DxfLoadDir(wxString & path, wxString & prefix, wxString & layer, int srid, bool force2d, bool force3d, bool mixed, bool linked, bool unlinked, bool append, int *failed); int DxfLoadFile(wxString & path, wxString & prefix, wxString & layer, int srid, bool force2d, bool force3d, bool mixed, bool linked, bool unlinked, bool append, int *failed); bool CheckOrCreateXmlTable(wxString & table, wxString & pkName, wxString & xmlColumn, wxString & inPathColumn, wxString & schemaUriColumn, wxString & parseErrColumn, wxString & validateErrColumn); bool IsValidSuffix(const char *fileName, wxString & suffix); int XmlDocumentLoadDir(wxString & path, wxString & suffix, int compressed, const char *schemaURI, bool isInternalSchemaUri, wxString & inPathColumn, wxString & schemaUriColumn, wxString & parseErrColumn, wxString & validateErrColumn, sqlite3_stmt * stmt, int *failed); int XmlDocumentLoadFile(wxString & path, int compressed, const char *schemaURI, bool isInternalSchemaUri, wxString & inPathColumn, wxString & parseErrColumn, wxString & validateErrColumn, wxString & schemaUriColumn, sqlite3_stmt * stmt, int *failed); bool InsertIntoXmlTable(sqlite3_stmt * stmt, char *blob, int sz, wxString & inPathColumn, wxString & path, wxString & schemaUriColumn, const char *schemaUri, wxString & parseErrColumn, const char *parseError, wxString & validateErrColumn, const char *validateError); void GetMake(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); void GetModel(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); void GetGpsTimestamp(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); void GetDate(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); double GetGpsDirection(gaiaExifTagListPtr tag_list, bool * ok); void GetGpsSatellites(gaiaExifTagListPtr tag_list, wxString & str, bool * ok); void GetGpsCoords(gaiaExifTagListPtr tag_list, double *longitude, double *latitude, bool * ok); sqlite3_int64 GetPixelX(gaiaExifTagListPtr tag_list, bool * ok); sqlite3_int64 GetPixelY(gaiaExifTagListPtr tag_list, bool * ok); bool MemoryDbSave(); void LastDitchMemoryDbSave(); void QueryViewComposer(); MalformedGeomsList *FindMalformedGeoms(wxString & table, wxString & geom, bool allowRepair); void PreRepairPolygons(wxString & table, wxString & geom, int *count); void RepairPolygons(wxString & table, wxString & geom, int *count); bool IsPrimaryKey(wxString & table, wxString & column); void DbPagesCount(int *total, int *frees); void EnableAllTools(bool mode = true); void DisableAllTools() { EnableAllTools(false); }; int TestDotCommand(const char *stmt); bool IsDotCommandLoadShp(const char *stmt, char *path, char *table, char *charset, char *column, int *srid, bool * coerce2D, bool * compressed); bool IsDotCommandLoadDbf(const char *stmt, char *path, char *table, char *charset); bool IsDotCommandLoadXL(const char *stmt, char *path, char *table, int *worksheetIndex, int *firstTitle); bool IsDotCommandDumpShp(const char *stmt, char *table, char *column, char *path, char *charset, char *type); bool IsViewGeometry(wxString & table, wxString & column); bool GetTilePreview(wxString & currentTileData, int currentTileId, unsigned char **blob, int *blobSize); class RasterCoverageStylesList *FindRasterCoverageStyles(wxString & coverage); class RasterCoverageStylesList *FindRasterStyles(); class VectorCoverageStylesList *FindVectorCoverageStyles(wxString & coverage); class VectorCoverageStylesList *FindVectorStyles(); class CandidateVectorCoveragesList *FindUnregisteredVectorCoverages(); bool DoRegisterVectorCoverage(wxString & name, wxString & table, wxString & geometry, wxString & title, wxString & abstract); bool ValidateRasterStyle(const char *path, void **blob, int *blob_size); bool ValidateRasterStyle(void **blob, int *blob_size, const char *xml); bool DoInsertRasterSymbolizer(char *xml); bool ValidateVectorStyle(const char *path, void **blob, int *blob_size); bool ValidateVectorStyle(void **blob, int *blob_size, const char *xml); bool DoInsertVectorSymbolizer(char *xml); bool ValidateExternalGraphicResource(const char *path, void **blob, int *blob_size, wxString & abstract); class RasterCoverageSRIDsList *FindRasterAlternativeSRIDs(wxString & coverage); class VectorCoverageSRIDsList *FindVectorAlternativeSRIDs(wxString & coverage); class RasterCoverageKeywordsList *FindRasterKeywords(wxString & coverage); class VectorCoverageKeywordsList *FindVectorKeywords(wxString & coverage); class ExternalGraphicList *FindExternalGraphic(bool no_svg); class TextFontList *FindTextFont(void); bool GetCurrentlySelectedTable(wxString & table_name) { return TableTree->GetCurrentlySelectedTable(table_name); } bool DoGetRasterCoverageInfos(wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression, int *srid); bool DoImportRasterFiles(wxString & coverage, wxString & title, wxArrayString & paths, int forced_srid, bool with_worldfile, bool pyramidize); bool DoImportRaster(sqlite3_stmt * stmt, wxString & coverage, wxString & path, int forced_srid, bool with_worldfile, bool pyramidize); bool DoGetVectorCoverageInfos(wxString & coverage, wxString & title, wxString & abstract, wxString & type, int *srid); bool CreateRasterCoverage(wxString & CoverageName, wxString & Title, wxString & Abstract, int SampleType, int PixelType, int NumBands, int Compression, int Quality, int TileWidth, int TileHeight, bool NotGeoreferenced, int Srid, double HorzResolution, double VertResolution, wxString NoData, bool StrictResolution, bool MixedResolutions, bool InputPaths, bool MD5, bool Summary, int RedBand, int GreenBand, int BlueBand, int NIRband, bool AutoNDVI); void OnQuit(wxCommandEvent & event); void OnAbout(wxCommandEvent & event); void OnConnect(wxCommandEvent & event); void OnConnectReadOnly(wxCommandEvent & event); void OnCreateNew(wxCommandEvent & event); void OnDisconnect(wxCommandEvent & event); void OnMemoryDbLoad(wxCommandEvent & event); void OnMemoryDbNew(wxCommandEvent & event); void OnMemoryDbClock(wxCommandEvent & event); void OnMemoryDbSave(wxCommandEvent & event); void OnVacuum(wxCommandEvent & event); void OnSqlScript(wxCommandEvent & event); void OnQueryViewComposer(wxCommandEvent & event); void OnCharset(wxCommandEvent & event); void OnLoadShp(wxCommandEvent & event); void OnLoadTxt(wxCommandEvent & event); void OnLoadDbf(wxCommandEvent & event); void OnLoadXL(wxCommandEvent & event); void OnVirtualShp(wxCommandEvent & event); void OnVirtualTxt(wxCommandEvent & event); void OnVirtualDbf(wxCommandEvent & event); void OnVirtualXL(wxCommandEvent & event); void OnNetwork(wxCommandEvent & event); void OnImportExifPhotos(wxCommandEvent & event); void OnImportXmlDocuments(wxCommandEvent & event); void OnImportWFS(wxCommandEvent & event); void OnImportDXF(wxCommandEvent & event); void OnSrids(wxCommandEvent & event); void OnAttachDatabase(wxCommandEvent & event); void OnSqlLog(wxCommandEvent & event); void OnDbStatus(wxCommandEvent & event); void OnCheckGeometries(wxCommandEvent & event); void OnSanitizeGeometries(wxCommandEvent & event); void OnHelp(wxCommandEvent & event); void OnMouseMove(wxMouseEvent & event); void OnTimerAutoSave(wxTimerEvent & event); }; class HelpDialog:public wxDialog { // // the help dialog // private: MyFrame * MainFrame; public: HelpDialog() { MainFrame = NULL; } HelpDialog(MyFrame * parent) { Create(parent); } bool Create(MyFrame * parent); virtual ~ HelpDialog() {; } void CreateControls(); void OnCancel(wxCommandEvent & event); void OnClose(wxCloseEvent & event); void OnSize(wxSizeEvent & event); }; class SearchSridDialog:public wxDialog { // // a dialog preparing a Search SRID by name // private: MyFrame * MainFrame; wxString String; // search string [name] int Srid; // search id [srid] bool SearchBySrid; public: SearchSridDialog() {; } SearchSridDialog(MyFrame * parent); bool Create(MyFrame * parent); virtual ~ SearchSridDialog() {; } void CreateControls(); wxString & GetString() { return String; } int GetSrid() { return Srid; } bool IsSearchBySrid() { return SearchBySrid; } void OnOk(wxCommandEvent & event); void OnSearchBySrid(wxCommandEvent & event); }; class SetSridDialog:public wxDialog { // // a dialog preparing a SET SRID // private: MyFrame * MainFrame; wxString Table; // the table's name wxString Column; // the column's name to be recovered int OldSrid; // SRID to substitute int Srid; // required SRID public: SetSridDialog() {; } SetSridDialog(MyFrame * parent, wxString & table, wxString & column); bool Create(MyFrame * parent, wxString & table, wxString & column); virtual ~ SetSridDialog() {; } void CreateControls(); int GetOldSrid() { return OldSrid; } int GetSrid() { return Srid; } void OnOk(wxCommandEvent & event); }; class RecoverDialog:public wxDialog { // // a dialog preparing a RECOVER GEOMETRY // private: MyFrame * MainFrame; wxString Table; // the table's name wxString Column; // the column's name to be recovered int Srid; // required SRID wxString Type; // required Geometry Type wxString Dimension; // required CoordDimension public: RecoverDialog() {; } RecoverDialog(MyFrame * parent, wxString & table, wxString & column); bool Create(MyFrame * parent, wxString & table, wxString & column); virtual ~ RecoverDialog() {; } void CreateControls(); wxString & GetType() { return Type; } wxString & GetDimension() { return Dimension; } int GetSrid() { return Srid; } void OnOk(wxCommandEvent & event); }; class ElementaryGeomsDialog:public wxDialog { // // a dialog asking ElementaryGeoms args // private: MyFrame * MainFrame; wxString InTable; wxString Geometry; wxString OutTable; wxString PrimaryKey; wxString MultiID; wxString Type; int Srid; wxString CoordDims; bool SpatialIndex; public: ElementaryGeomsDialog() {; } ElementaryGeomsDialog(MyFrame * parent, wxString & table, wxString & column); bool Create(MyFrame * parent, wxString & table, wxString & column); virtual ~ ElementaryGeomsDialog() {; } wxString & GetOutTable() { return OutTable; } wxString & GetPrimaryKey() { return PrimaryKey; } wxString & GetMultiID() { return MultiID; } wxString & GetType() { return Type; } int GetSrid() { return Srid; } wxString & GetCoordDims() { return CoordDims; } bool IsSpatialIndex() { return SpatialIndex; } void CreateControls(); void OnOk(wxCommandEvent & event); }; class ColumnStatsDialog:public wxDialog { // // a dialog showing Column Stats // private: MyFrame * MainFrame; wxString Table; // the table's name wxString Column; // the column's name int NullValues; int TextValues; int IntegerValues; int RealValues; int BlobValues; double Min; double Max; double Avg; double StdDevPop; double StdDevSamp; double VarPop; double VarSamp; int DistinctValues; void CleanDecimals(char *number); public: ColumnStatsDialog() {; } bool Create(MyFrame * parent, wxString & table, wxString & column, int null_count, int text_count, int integer_count, int real_count, int blob_count, double min, double max, double avg, double stddev_pop, double stddev_samp, double var_pop, double var_samp, int distinct_values); virtual ~ ColumnStatsDialog() {; } void CreateControls(); void OnShowChart(wxCommandEvent & event); void OnExit(wxCommandEvent & event); }; class MyChartIntervalClass { // a Chart interval class private: double Min; double Max; int Count; public: MyChartIntervalClass() {; } ~MyChartIntervalClass() {; } void Create(double min, double max) { Min = min; Max = max; Count = 0; } double GetMin() { return Min; } double GetMax() { return Max; } void Add() { Count++; } int GetCount() { return Count; } }; class MyChartUniqueClass { // a Chart unique-value class private: wxString Value; int Count; MyChartUniqueClass *Next; public: MyChartUniqueClass(wxString & value, int count) { Value = value; Count = count; Next = NULL; } ~MyChartUniqueClass() {; } wxString & GetValue() { return Value; } int GetCount() { return Count; } void SetNext(MyChartUniqueClass * p) { Next = p; } MyChartUniqueClass *GetNext() { return Next; } }; class MyChartData { // a container storing Chart data classes private: bool Initialized; MyChartIntervalClass *Array; double Min; double Max; int MaxFreq; int TotFreq; MyChartUniqueClass *First; MyChartUniqueClass *Last; int MaxClasses; int NumClasses; int OtherUniquesFreq; int OtherUniquesCount; bool Valid; bool ByIntervals; public: MyChartData(); ~MyChartData(); bool Create(int max_classes); bool Create(double min, double max, int classes); void Add(wxString & value, int count); void Add(double value); MyChartUniqueClass *GetFirst() { return First; } int GetMaxFreq() { return MaxFreq; } int GetTotFreq() { return TotFreq; } int GetNumClasses() { return NumClasses; } int GetOtherUniquesFreq() { return OtherUniquesFreq; } int GetOtherUniquesCount() { return OtherUniquesCount; } MyChartIntervalClass *GetClass(int idx); void SetValid() { Valid = true; } bool IsValid() { return Valid; } void CleanData(); bool Check(bool by_intervals, int classes); }; class MyChartScaleLabel { // a Chart Scale label private: wxString Label; double Position; MyChartScaleLabel *Next; public: MyChartScaleLabel(wxString & label, double pos) { Label = label; Position = pos; Next = NULL; } ~MyChartScaleLabel() {; } wxString & GetLabel() { return Label; } double GetPosition() { return Position; } void SetNext(MyChartScaleLabel * p) { Next = p; } MyChartScaleLabel *GetNext() { return Next; } }; class MyPieChartLabel { // a PieChart label private: wxString Label; double X; double Y; MyPieChartLabel *Next; public: MyPieChartLabel(wxString & label, double x, double y) { Label = label; X = x; Y = y; Next = NULL; } ~MyPieChartLabel() {; } wxString & GetLabel() { return Label; } double GetX() { return X; } double GetY() { return Y; } void SetNext(MyPieChartLabel * p) { Next = p; } MyPieChartLabel *GetNext() { return Next; } }; class MyChartScaleLabels { // a container storing Chart Scale labels private: MyChartScaleLabel * First; MyChartScaleLabel *Last; public: MyChartScaleLabels() { First = NULL; Last = NULL; } ~MyChartScaleLabels(); void Initialize(double span, int max_freq); void Add(const char *label, double pos); MyChartScaleLabel *GetFirst() { return First; } }; class MyPieChartLabels { // a container storing PieChart labels private: MyPieChartLabel * First; MyPieChartLabel *Last; MyPieChartLabel **LeftLabels; int NumLeftLabels; MyPieChartLabel **RightLabels; int NumRightLabels; public: MyPieChartLabels(); ~MyPieChartLabels(); void Add(const char *label, double x, double y); void Sort(double cx); int GetNumLeftLabels() { return NumLeftLabels; } MyPieChartLabel *GetLeftLabel(int idx); int GetNumRightLabels() { return NumRightLabels; } MyPieChartLabel *GetRightLabel(int idx); }; class StatsChartDialog:public wxDialog { // // a dialog generating a Stat Chart // private: MyFrame * MainFrame; wxString Table; // the table's name wxString Column; // the column's name bool NumericData; double Min; double Max; wxRadioBox *TypeCtrl; wxRadioBox *SizeCtrl; wxRadioBox *ModeCtrl; wxSpinCtrl *ClassCtrl; wxStaticBitmap *ChartShow; bool Histogram; bool LineChart; bool PieChart; bool ByInterval; int Classes; MyChartData ChartData; wxString ExportPath; enum Targets { CHART_TARGET_IS_PREVIEW, CHART_TARGET_IS_COPY, CHART_TARGET_IS_PNG, CHART_TARGET_IS_SVG, CHART_TARGET_IS_PDF }; public: StatsChartDialog() {; } bool Create(ColumnStatsDialog * parent, MyFrame * granny, wxString & table, wxString & column, bool numeric, double min, double max); virtual ~ StatsChartDialog() {; } void CreateControls(); void CleanDecimals(char *number); void ReloadData(); void UpdatePreview(); void PrepareDataByInterval(int classes); void PrepareDataByUniqueValue(int classes); void DoIntervalHistogram(int hsize, int vsize, int target, int font_size); void DoIntervalLineChart(int hsize, int vsize, int target, int font_size); void DoIntervalPieChart(int hsize, int vsize, int target, int font_size); void DoUniqueHistogram(int hsize, int vsize, int target, int font_size); void DoUniqueLineChart(int hsize, int vsize, int target, int font_size); void DoUniquePieChart(int hsize, int vsize, int target, int font_size); void OnChartTypeChanged(wxCommandEvent & event); void OnChartModeChanged(wxCommandEvent & event); void OnChartClassesChanged(wxCommandEvent & event); void OnChartCopy(wxCommandEvent & event); void OnChartPng(wxCommandEvent & event); void OnChartSvg(wxCommandEvent & event); void OnChartPdf(wxCommandEvent & event); void OnExit(wxCommandEvent & event); }; class MapPreviewDialog:public wxDialog { // // a dialog generating a Map Preview // private: MyFrame * MainFrame; wxString Table; // the table's name wxString Column; // the column's name double MinX; double MinY; double MaxX; double MaxY; wxColour LineColor; wxColour FillColor; wxRadioBox *SizeCtrl; wxRadioBox *SymbolCtrl; wxRadioBox *FillCtrl; wxSpinCtrl *SymSizeCtrl; wxSpinCtrl *ThicknessCtrl; wxBitmapButton *LineColorCtrl; wxBitmapButton *FillColorCtrl; wxStaticBitmap *MapShow; wxString ExportPath; enum Targets { MAP_TARGET_IS_PREVIEW, MAP_TARGET_IS_COPY, MAP_TARGET_IS_PNG, MAP_TARGET_IS_SVG, MAP_TARGET_IS_PDF }; public: MapPreviewDialog() {; } bool Create(MyFrame * parent, wxString & table, wxString & column, double minx, double mixy, double maxx, double maxy); virtual ~ MapPreviewDialog() {; } void CreateControls(); void UpdatePreview(); void DoMap(int hsize, int vsize, int target); void GetButtonBitmap(wxColour & color, wxBitmap & bmp); void OnSizeChanged(wxCommandEvent & event); void OnSymbolTypeChanged(wxCommandEvent & event); void OnFillModeChanged(wxCommandEvent & event); void OnSymbolSizeChanged(wxCommandEvent & event); void OnLineThicknessChanged(wxCommandEvent & event); void OnLineColor(wxCommandEvent & event); void OnFillColor(wxCommandEvent & event); void OnMapCopy(wxCommandEvent & event); void OnMapPng(wxCommandEvent & event); void OnMapSvg(wxCommandEvent & event); void OnMapPdf(wxCommandEvent & event); void OnExit(wxCommandEvent & event); }; class GisLayerAuthDialog:public wxDialog { // // a dialog to set GIS Layer auths // private: MyFrame * MainFrame; wxString Table; // the table's name wxString Geometry; // the geometry column's name bool ReadOnly; bool Hidden; bool IsTable; public: GisLayerAuthDialog() {; } GisLayerAuthDialog(MyFrame * parent, wxString & table, wxString & geom, bool rdOnly, bool hidden, bool is_table); bool Create(MyFrame * parent, wxString & table, wxString & geom, bool rdOnly, bool hidden, bool is_table); virtual ~ GisLayerAuthDialog() {; } void CreateControls(); bool IsReadOnly() { return ReadOnly; } bool IsHidden() { return Hidden; } void OnReadOnlyChanged(wxCommandEvent & event); void OnHiddenChanged(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class VirtualShpDialog:public wxDialog { // // a dialog preparing a CREATE VIRTUAL SHAPE // private: MyFrame * MainFrame; wxString Path; // the SHP base path wxString Table; // the table name wxString Default; // the default charset wxString Charset; // the SHP charset int Srid; // the SRID bool TextDates; public: VirtualShpDialog() {; } VirtualShpDialog(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); bool Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); virtual ~ VirtualShpDialog() {; } void CreateControls(); wxString & GetTable() { return Table; } wxString & GetCharset() { return Charset; } int GetSrid() { return Srid; } bool IsTextDates() { return TextDates; } void OnOk(wxCommandEvent & event); void OnTextDates(wxCommandEvent & event); }; class VirtualTxtDialog:public wxDialog { // // a dialog preparing a CREATE VIRTUAL TEXT // private: MyFrame * MainFrame; wxString Path; // the CSV/TXT base path wxString Table; // the table name wxString Default; // the default charset wxString Charset; // the CSV/TXT charset bool FirstLineTitles; // TRUE if first line stores column titles char Separator; // the character to be used as field separator char TextSeparator; // the character to be used as text separator bool DecimalPointIsComma; // TRUE if decimal separator is COMMA public: VirtualTxtDialog() {; } VirtualTxtDialog(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); bool Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); virtual ~ VirtualTxtDialog() {; } void CreateControls(); wxString & GetTable() { return Table; } wxString & GetCharset() { return Charset; } bool IsFirstLineTitles() { return FirstLineTitles; } char GetSeparator() { return Separator; } char GetTextSeparator() { return TextSeparator; } bool IsDecimalPointComma() { return DecimalPointIsComma; } void OnSeparator(wxCommandEvent & event); void OnDecimalSeparator(wxCommandEvent & event); void OnQuote(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class VirtualDbfDialog:public wxDialog { // // a dialog preparing a CREATE VIRTUAL DBF // private: MyFrame * MainFrame; wxString Path; // the DBF path wxString Table; // the table name wxString Default; // the default charset wxString Charset; // the DBF charset bool TextDates; public: VirtualDbfDialog() {; } VirtualDbfDialog(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); bool Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); virtual ~ VirtualDbfDialog() {; } void CreateControls(); wxString & GetTable() { return Table; } wxString & GetCharset() { return Charset; } bool IsTextDates() { return TextDates; } void OnOk(wxCommandEvent & event); void OnTextDates(wxCommandEvent & event); }; class LoadShpDialog:public wxDialog { // // a dialog preparing a LOAD SHAPE // private: MyFrame * MainFrame; wxString Path; // the SHP base path wxString Table; // the table's name to be created wxString Column; // the column's name for Geometry wxString Default; // the default charset wxString Charset; // the SHP charset int Srid; // the SRID bool Coerce2D; // coercing to 2D [x,y] bool Compressed; // compressed geometries bool SpatialIndex; // building the Spatial Index (or not) bool UserDefinedGType; // mode: automatic / user defined Geometry Type wxString GeometryType; // User Defined Geometry Type bool UserDefinedPKey; // mode: automatic / user defined Primary Key wxString PKColumn; // User Defined Primary Key int PKCount; // # Primary Key Columns wxString *PKFields; // array of Primary Key Columns wxString *PKFieldsEx; // array of Primary Key Columns (full detail) bool TextDates; public: LoadShpDialog() {; } LoadShpDialog(MyFrame * parent, wxString & path, wxString & table, int srid, wxString & column, wxString & defCs); bool Create(MyFrame * parent, wxString & path, wxString & table, int srid, wxString & column, wxString & defCs); virtual ~ LoadShpDialog(); void CreateControls(); wxString & GetTable() { return Table; } wxString & GetColumn() { return Column; } wxString & GetCharset() { return Charset; } int GetSrid() { return Srid; } bool ApplyCoertion2D() { return Coerce2D; } bool ApplyCompression() { return Compressed; } bool CreateSpatialIndex() { return SpatialIndex; } bool IsUserDefinedGType() { return UserDefinedGType; } wxString & GetGeometryType() { return GeometryType; } bool IsUserDefinedPKey() { return UserDefinedPKey; } wxString & GetPKColumn() { return PKColumn; } bool IsTextDates() { return TextDates; } void LoadPKFields(); void OnOk(wxCommandEvent & event); void OnUserGType(wxCommandEvent & event); void OnUserPKey(wxCommandEvent & event); void OnTextDates(wxCommandEvent & event); }; class DumpPostGISDialog:public wxDialog { // // a dialog preparing a SQL DUMP for PostGIS // private: MyFrame * MainFrame; wxString SchemaName; // the PostGIS target schema wxString TableName; // the PostGIS table name bool Lowercase; // column-names to lowercase bool CreateTable; // creating (or not) the PostGIS table bool SpatialIndex; // creating (or not) the PostGIS Spatial Index public: DumpPostGISDialog() {; } DumpPostGISDialog(MyFrame * parent, wxString & table); bool Create(MyFrame * parent, wxString & table); virtual ~ DumpPostGISDialog() {; } void CreateControls(); wxString & GetSchemaName() { return SchemaName; } wxString & GetTableName() { return TableName; } bool IsLowercase() { return Lowercase; } bool IsCreateTable() { return CreateTable; } bool IsSpatialIndex() { return SpatialIndex; } void OnLowercase(wxCommandEvent & event); void OnCreateTable(wxCommandEvent & event); void OnSpatialIndex(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class DumpShpDialog:public wxDialog { // // a dialog preparing a DUMP SHAPE // private: MyFrame * MainFrame; wxString Path; // the SHP base path wxString Table; // the table's name to be created wxString Column; // the column's name for Geometry wxString Default; // the default charset wxString Charset; // the SHP charset public: DumpShpDialog() {; } DumpShpDialog(MyFrame * parent, wxString & path, wxString & table, wxString & column, wxString & defCs); bool Create(MyFrame * parent, wxString & path, wxString & table, wxString & column, wxString & defCs); virtual ~ DumpShpDialog() {; } void CreateControls(); wxString & GetCharset() { return Charset; } void OnOk(wxCommandEvent & event); }; class LoadXLDialog:public wxDialog { // // a dialog preparing a LOAD XL // private: MyFrame * MainFrame; wxString Path; // the XLS path wxString Table; // the table name wxString *Worksheets; // Worksheet array int WorksheetCount; // array items int WorksheetIndex; // selected Worksheet Index bool FirstLineTitles; // first line contains column names bool Invalid; void GetWorksheets(); public: LoadXLDialog() {; } LoadXLDialog(MyFrame * parent, wxString & path, wxString & table); bool Create(MyFrame * parent, wxString & path, wxString & table); virtual ~ LoadXLDialog() {; } void CreateControls(); wxString & GetTable() { return Table; } int GetWorksheetIndex() { return WorksheetIndex; } bool IsFirstLineTitles() { return FirstLineTitles; } void OnOk(wxCommandEvent & event); }; class VirtualXLDialog:public wxDialog { // // a dialog preparing a CREATE VIRTUAL XL // private: MyFrame * MainFrame; wxString Path; // the XLS path wxString Table; // the table name wxString *Worksheets; // Worksheet array int WorksheetCount; // array items int WorksheetIndex; // selected Worksheet Index bool FirstLineTitles; // first line contains column names bool Invalid; void GetWorksheets(); public: VirtualXLDialog() {; } VirtualXLDialog(MyFrame * parent, wxString & path, wxString & table); bool Create(MyFrame * parent, wxString & path, wxString & table); virtual ~ VirtualXLDialog() {; } void CreateControls(); wxString & GetTable() { return Table; } int GetWorksheetIndex() { return WorksheetIndex; } bool IsFirstLineTitles() { return FirstLineTitles; } void OnOk(wxCommandEvent & event); }; class LoadTxtDialog:public wxDialog { // // a dialog preparing a LOAD TXT/CSV // private: MyFrame * MainFrame; wxString Path; // the CSV/TXT base path wxString Table; // the table name wxString Default; // the default charset wxString Charset; // the CSV/TXT charset bool FirstLineTitles; // TRUE if first line stores column titles char Separator; // the character to be used as field separator char TextSeparator; // the character to be used as text separator bool DecimalPointIsComma; // TRUE if decimal separator is COMMA public: LoadTxtDialog() {; } LoadTxtDialog(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); bool Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); virtual ~ LoadTxtDialog() {; } void CreateControls(); wxString & GetTable() { return Table; } wxString & GetCharset() { return Charset; } bool IsFirstLineTitles() { return FirstLineTitles; } char GetSeparator() { return Separator; } char GetTextSeparator() { return TextSeparator; } bool IsDecimalPointComma() { return DecimalPointIsComma; } void OnSeparator(wxCommandEvent & event); void OnDecimalSeparator(wxCommandEvent & event); void OnQuote(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class DumpTxtDialog:public wxDialog { // // a dialog preparing a DUMP generic text // private: MyFrame * MainFrame; wxString Path; // the SHP base path wxString Default; // the default charset wxString Charset; // the target charset public: DumpTxtDialog() {; } DumpTxtDialog(MyFrame * parent, wxString & path, wxString & target, wxString & defCs); bool Create(MyFrame * parent, wxString & path, wxString & target, wxString & defCs); virtual ~ DumpTxtDialog() {; } void CreateControls(); wxString & GetCharset() { return Charset; } void OnOk(wxCommandEvent & event); }; class LoadDbfDialog:public wxDialog { // // a dialog preparing a LOAD DBF // private: MyFrame * MainFrame; wxString Path; // the DBF base path wxString Table; // the table name wxString Default; // the default charset wxString Charset; // the DBF charset bool UserDefinedPKey; // mode: automatic / user defined Primary Key wxString PKColumn; // User Defined Primary Key int PKCount; // # Primary Key Columns wxString *PKFields; // array of Primary Key Columns wxString *PKFieldsEx; // array of Primary Key Columns (full detail) bool TextDates; public: LoadDbfDialog() {; } LoadDbfDialog(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); bool Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs); virtual ~ LoadDbfDialog(); void CreateControls(); wxString & GetTable() { return Table; } wxString & GetCharset() { return Charset; } bool IsUserDefinedPKey() { return UserDefinedPKey; } wxString & GetPKColumn() { return PKColumn; } bool IsTextDates() { return TextDates; } void LoadPKFields(); void OnOk(wxCommandEvent & event); void OnUserPKey(wxCommandEvent & event); void OnTextDates(wxCommandEvent & event); }; class NetworkDialog:public wxDialog { // // a dialog preparing a BUILD NETWORK // private: MyFrame * MainFrame; wxString TableName; // the table name wxString FromColumn; // the NodeFrom column name wxString ToColumn; // the NodeTo column name bool NoGeometry; // no Geometry column wxString GeomColumn; // the Geometry column name bool GeomLength; // Cost is Geometry Length wxString CostColumn; // the Cost column name bool Bidirectional; // Bidirectional arcs bool OneWays; // OneWays columns supported wxString OneWayToFrom; // the OneWay To-From column wxString OneWayFromTo; // the OneWay From-To column bool NameEnabled; // Name column supported wxString NameColumn; // the Name column name bool AStarSupported; // A* algorithm supported wxString DataTable; // name of the binary data table wxString VirtualTable; // name of the VirtualNetwork table public: NetworkDialog() {; } NetworkDialog(MyFrame * parent); bool Create(MyFrame * parent); virtual ~ NetworkDialog() {; } void CreateControls(); wxString & GetTableName() { return TableName; } wxString & GetFromColumn() { return FromColumn; } wxString & GetToColumn() { return ToColumn; } bool IsNoGeometry() { return NoGeometry; } wxString & GetGeomColumn() { return GeomColumn; } wxString & GetNameColumn() { return NameColumn; } bool IsGeomLength() { return GeomLength; } wxString & GetCostColumn() { return CostColumn; } bool IsBidirectional() { return Bidirectional; } bool IsOneWays() { return OneWays; } wxString & GetOneWayFromTo() { return OneWayFromTo; } wxString & GetOneWayToFrom() { return OneWayToFrom; } bool IsNameEnabled() { return NameEnabled; } bool IsAStarSupported() { return AStarSupported; } wxString & GetDataTable() { return DataTable; } wxString & GetVirtualTable() { return VirtualTable; } void OnTable(wxCommandEvent & event); void OnDirection(wxCommandEvent & event); void OnCost(wxCommandEvent & event); void OnOneWay(wxCommandEvent & event); void OnNameEnabled(wxCommandEvent & event); void OnNoGeometry(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class ExifDialog:public wxDialog { // // a dialog preparing an IMPORT EXIF PHOTOS // private: MyFrame * MainFrame; wxString ImgPath; // the file name wxString DirPath; // the folder path bool Folder; // import a whole folder bool Metadata; // feed Metadata tables bool GpsOnly; // import only if GpsExif present public: ExifDialog() {; } ExifDialog(MyFrame * parent, wxString & dir_path, wxString & img_path); bool Create(MyFrame * parent, wxString & dir_path, wxString & img_path); virtual ~ ExifDialog() {; } void CreateControls(); wxString & GetImgPath() { return ImgPath; } wxString & GetDirPath() { return DirPath; } bool IsFolder() { return Folder; } bool IsMetadata() { return Metadata; } bool IsGpsOnly() { return GpsOnly; } void OnFolder(wxCommandEvent & event); void OnMetadata(wxCommandEvent & event); void OnGpsOnly(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class XmlDocumentsDialog:public wxDialog { // // a dialog preparing an IMPORT XML DOCUMENTS // private: MyFrame * MainFrame; wxString XmlPath; // the file name wxString DirPath; // the folder path wxString Suffix; // the optional file suffix wxString TargetTable; // the target Table wxString PkName; // the Primary Key name wxString XmlColumn; // the XML Payload Column wxString SchemaUriColumn; // the SchemaURI Column wxString InPathColumn; // the InPath Column wxString ParseErrorColumn; // the XmlParseError Column wxString ValidateErrorColumn; // the XmlValidateError Column bool Folder; // import a whole folder bool Compressed; // compressed XmlBLOB bool Validated; // apply Schema Validation bool InternalSchema; // apply the Internally declared Schema URI bool OkSuffix; // apply suffix restriction bool OkSchemaColumn; // create a "schemaURI" column bool OkInPathColumn; // create an "inPath" column bool OkParseErrorColumn; // create the "XmlParseError" column bool OkValidateErrorColumn; // create the "XmlSchemaValidateError" column wxString SchemaURI; // the Schema URI for validation public: XmlDocumentsDialog() {; } bool Create(MyFrame * parent, wxString & dir_path, wxString & xml_path); virtual ~ XmlDocumentsDialog() {; } void CreateControls(); wxString & GetXmlPath() { return XmlPath; } wxString & GetDirPath() { return DirPath; } wxString & GetSuffix() { return Suffix; } wxString & GetTargetTable() { return TargetTable; } wxString & GetPkName() { return PkName; } wxString & GetXmlColumn() { return XmlColumn; } bool IsFolder() { return Folder; } bool IsCompressed() { return Compressed; } bool IsInternalSchemaURI() { return InternalSchema; } wxString & GetSchemaURI() { return SchemaURI; } wxString & GetSchemaUriColumn() { return SchemaUriColumn; } wxString & GetInPathColumn() { return InPathColumn; } wxString & GetParseErrorColumn() { return ParseErrorColumn; } wxString & GetValidateErrorColumn() { return ValidateErrorColumn; } void OnFolder(wxCommandEvent & event); void OnSuffixChanged(wxCommandEvent & event); void OnCompressionChanged(wxCommandEvent & event); void OnValidationChanged(wxCommandEvent & event); void OnInternalSchemaChanged(wxCommandEvent & event); void OnSchemaColumnChanged(wxCommandEvent & event); void OnInPathColumnChanged(wxCommandEvent & event); void OnParseErrorColumnChanged(wxCommandEvent & event); void OnValidateErrorColumnChanged(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class DxfDialog:public wxDialog { // // a dialog preparing an IMPORT DXF FILE(s) // private: MyFrame * MainFrame; wxString DxfPath; // the file name wxString DirPath; // the folder path wxString Prefix; // the optional table-name prefix wxString SingleLayer; // filtering a single DXF layer by its name int Srid; // the SRID to be applied bool Folder; // import a whole folder bool OkPrefix; // apply table-name prefix bool OkSingle; // apply single layer filter bool Force2D; // always forcing 2D bool Force3D; // always forcing 3D bool LinkedRings; // special - linked rings bool UnlinkedRings; // special - unlinked rings bool ImportMixed; // mixed layers mode bool AppendMode; // append mode public: DxfDialog() {; } bool Create(MyFrame * parent, wxString & dir_path, wxString & dxf_path); virtual ~ DxfDialog() {; } void CreateControls(); wxString & GetDxfPath() { return DxfPath; } wxString & GetDirPath() { return DirPath; } wxString & GetPrefix() { return Prefix; } wxString & GetSingleLayer() { return SingleLayer; } int GetSrid() { return Srid; } bool IsFolder() { return Folder; } bool IsForce2D() { return Force2D; } bool IsForce3D() { return Force3D; } bool IsLinkedRings() { return LinkedRings; } bool IsUnlinkedRings() { return UnlinkedRings; } bool IsImportMixed() { return ImportMixed; } bool IsAppendMode() { return AppendMode; } void OnFolder(wxCommandEvent & event); void OnPrefixChanged(wxCommandEvent & event); void OnSingleLayerChanged(wxCommandEvent & event); void OnDimensionChanged(wxCommandEvent & event); void OnModeChanged(wxCommandEvent & event); void OnRingsChanged(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class CreateRasterCoverageDialog:public wxDialog { // // a dialog preparing an IMPORT DXF FILE(s) // private: MyFrame * MainFrame; wxString CoverageName; wxString Title; wxString Abstract; int SampleType; int PixelType; int NumBands; int RedBand; int GreenBand; int BlueBand; int NIRband; bool AutoNDVI; int Compression; int Quality; int TileWidth; int TileHeight; bool NotGeoreferenced; int Srid; double HorzResolution; double VertResolution; wxString NoData; bool StrictResolution; bool MixedResolutions; bool InputPaths; bool MD5; bool Summary; bool IsValidNoData(wxString & no_data, int sample, int num_bands); public: CreateRasterCoverageDialog() {; } bool Create(MyFrame * parent); virtual ~ CreateRasterCoverageDialog() {; } void CreateControls(); wxString & GetCoverageName() { return CoverageName; } wxString & GetTitle() { return Title; } wxString & GetAbstract() { return Abstract; } int GetSampleType() { return SampleType; } int GetPixelType() { return PixelType; } int GetNumBands() { return NumBands; } int GetRedBand() { return RedBand; } int GetGreenBand() { return GreenBand; } int GetBlueBand() { return BlueBand; } int GetNIRband() { return NIRband; } bool IsAutoNDVI() { return AutoNDVI; } int GetCompression() { return Compression; } int GetQuality() { return Quality; } int GetTileWidth() { return TileWidth; } int GetTileHeight() { return TileHeight; } bool IsNotGeoreferenced() { return NotGeoreferenced; } int GetSrid() { return Srid; } double GetHorzResolution() { return HorzResolution; } double GetVertResolution() { return VertResolution; } wxString & GetNoData() { return NoData; } bool IsStrictResolution() { return StrictResolution; } bool IsMixedResolutions() { return MixedResolutions; } bool IsInputPaths() { return InputPaths; } bool IsMD5() { return MD5; } bool IsSummary() { return Summary; } void OnSampleChanged(wxCommandEvent & event); void OnPixelChanged(wxCommandEvent & event); void OnCompressionChanged(wxCommandEvent & event); void OnNumBandsChanged(wxCommandEvent & event); void OnRedBandChanged(wxCommandEvent & event); void OnGreenBandChanged(wxCommandEvent & event); void OnBlueBandChanged(wxCommandEvent & event); void OnNIRbandChanged(wxCommandEvent & event); void OnAutoNDVIchanged(wxCommandEvent & event); void OnSquareTileChanged(wxCommandEvent & event); void OnNoGeorefChanged(wxCommandEvent & event); void OnSameResChanged(wxCommandEvent & event); void OnTileWidthChanged(wxCommandEvent & event); void OnTileHeightChanged(wxCommandEvent & event); void OnHorzResChanged(wxCommandEvent & event); void OnStrictChanged(wxCommandEvent & event); void OnMixedChanged(wxCommandEvent & event); void OnPathsChanged(wxCommandEvent & event); void OnMD5Changed(wxCommandEvent & event); void OnSummaryChanged(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class SqlScriptDialog:public wxDialog { // // a dialog preparing an SQL SCRIPT execute // private: MyFrame * MainFrame; wxString Path; // the SHP base path wxString Default; // the default charset wxString Charset; // the target charset public: SqlScriptDialog() {; } SqlScriptDialog(MyFrame * parent, wxString & path, wxString & defCs); bool Create(MyFrame * parent, wxString & path, wxString & defCs); virtual ~ SqlScriptDialog() {; } void CreateControls(); wxString & GetCharset() { return Charset; } void OnOk(wxCommandEvent & event); }; class DefaultCharsetDialog:public wxDialog { // // a dialog for selecting DEFAULT CHARSET // private: MyFrame * MainFrame; wxString Charset; // the default charset bool AskCharset; // true / false public: DefaultCharsetDialog() {; } DefaultCharsetDialog(MyFrame * parent, wxString & charset, bool ask); bool Create(MyFrame * parent, wxString & charset, bool ask); virtual ~ DefaultCharsetDialog() {; } void CreateControls(); wxString & GetCharset() { return Charset; } bool IsSetAskCharset() { return AskCharset; } void OnOk(wxCommandEvent & event); }; class BlobExplorerDialog:public wxPropertySheetDialog { // // a dialog to explore a BLOB value // private: MyFrame * MainFrame; int BlobSize; // the BLOB size unsigned char *Blob; // the BLOB value int BlobType; // the BLOB type bool IsTextFont; wxString FontFamily; wxString FontStyle; bool IsFontBold; bool IsFontItalic; bool IsSVG; double SvgWidth; double SvgHeight; int SvgSize; gaiaGeomCollPtr Geometry; // the geometry [optional] wxString XMLDocument; // the XMLDocument [optional] wxString XMLIndented; // the XMLDocument (indented) [optional] wxImage *Image; // the image [optional] wxBitmap GeomPreview; // the geometry preview wxString WKTstring; // the WKT Geometry notation wxString EWKTstring; // the EWKT Geometry notation wxString SVGstring; // the SVG Geometry notation wxString KMLstring; // the KML Geometry notation wxString GMLstring; // the GML Geometry notation wxString GeoJSONstring; // the GeoJSON Geometry notation bool SVGrelative; // SVG relative / absolute mode int SVGprecision; // SVG precision int KMLprecision; // KML precision bool GMLv2v3; // GML version (v2 / v3) int GMLprecision; // GML precision int GeoJSONoptions; // GeoJSON options int GeoJSONprecision; // GeoJSON precision void FormatWKT(wxTextCtrl * txtCtrl, wxString & in, wxString & out); void FormatSVG(wxTextCtrl * txtCtrl, wxString & in, wxString & out); public: BlobExplorerDialog() {; } BlobExplorerDialog(MyFrame * parent, int blob_size, unsigned char *blob); bool Create(MyFrame * parent, int blob_size, unsigned char *blob); virtual ~ BlobExplorerDialog() { if (Geometry) gaiaFreeGeomColl(Geometry); if (Image) delete Image; } void DrawGeometry(int horz, int vert); wxPanel *CreateHexadecimalPage(wxWindow * book); wxPanel *CreateGeometryPage(wxWindow * book); wxPanel *CreateWKTPage(wxWindow * book); wxPanel *CreateEWKTPage(wxWindow * book); wxPanel *CreateSVGPage(wxWindow * book); wxPanel *CreateKMLPage(wxWindow * book); wxPanel *CreateGMLPage(wxWindow * book); wxPanel *CreateGeoJSONPage(wxWindow * book); wxPanel *CreateImagePage(wxWindow * book); wxPanel *CreateXmlDocumentPage(wxWindow * book); wxPanel *CreateXmlIndentedPage(wxWindow * book); void UpdateHexadecimalPage(); void UpdateGeometryPage(); void UpdateImagePage(); void UpdateXmlDocumentPage(); void UpdateXmlIndentedPage(); void UpdateWKTPage(); void UpdateEWKTPage(); void UpdateSVGPage(); void UpdateKMLPage(); void UpdateGMLPage(); void UpdateGeoJSONPage(); gaiaGeomCollPtr GetGeometry() { return Geometry; } wxImage *GetImage() { return Image; } int GetBlobType() { return BlobType; } void OnOk(wxCommandEvent & event); void OnPageChanged(wxNotebookEvent & event); void OnCopyWKT(wxCommandEvent & event); void OnCopyEWKT(wxCommandEvent & event); void OnSVGRelative(wxCommandEvent & event); void OnSVGPrecision(wxCommandEvent & event); void OnCopySVG(wxCommandEvent & event); void OnKMLPrecision(wxCommandEvent & event); void OnCopyKML(wxCommandEvent & event); void OnGMLv2v3(wxCommandEvent & event); void OnGMLPrecision(wxCommandEvent & event); void OnCopyGML(wxCommandEvent & event); void OnGeoJSONOptions(wxCommandEvent & event); void OnGeoJSONPrecision(wxCommandEvent & event); void OnCopyGeoJSON(wxCommandEvent & event); void OnCopyXmlDocument(wxCommandEvent & event); void OnCopyXmlIndented(wxCommandEvent & event); }; class TilePreviewDialog:public wxDialog { // // a dialog to show a Raster Tile Preview // private: MyFrame * MainFrame; wxString CoverageTable; int TileId; wxImage *Image; // the image bool Painted; public: TilePreviewDialog() {; } TilePreviewDialog(MyFrame * parent, wxString & coverage, int tile_id, int blob_size, unsigned char *blob); bool Create(MyFrame * parent, wxString & coverage, int tile_id, int blob_size, unsigned char *blob); virtual ~ TilePreviewDialog() { if (Image) delete Image; } void CreateControls(); void OnPaint(wxPaintEvent & event); void OnOk(wxCommandEvent & event); }; class GraphicsGeometry:public wxStaticBitmap { // // a window to show some Geometry in a graphical fashion // private: BlobExplorerDialog * Parent; public: GraphicsGeometry(BlobExplorerDialog * parent, wxWindow * panel, wxWindowID id, const wxBitmap & bmp, wxSize const &size); virtual ~ GraphicsGeometry() {; } }; class ImageShow:public wxStaticBitmap { // // a window to show some Image [Jpeg-Png-Gif] // private: BlobExplorerDialog * Parent; public: ImageShow(BlobExplorerDialog * parent, wxWindow * panel, wxWindowID id, const wxBitmap & bmp, const wxSize & size); virtual ~ ImageShow() {; } void OnRightClick(wxMouseEvent & event); void OnCmdCopy(wxCommandEvent & event); }; class MyHexList:public wxListCtrl { // // a class for Hexdecimal dumps // private: BlobExplorerDialog * Parent; int BlobSize; // the BLOB size unsigned char *Blob; // the BLOB value public: MyHexList(BlobExplorerDialog * parent, unsigned char *blob, int blob_size, wxWindow * panel, wxWindowID id, const wxPoint & pos = wxDefaultPosition, const wxSize & size = wxDefaultSize, long style = 0); virtual ~ MyHexList(); virtual wxString OnGetItemText(long item, long column) const; }; class NetNodePre { // // a class to store a temporary node for Network // private: sqlite3_int64 Id; wxString Code; NetNodePre *Next; public: NetNodePre(sqlite3_int64 id); NetNodePre(const char *code); ~NetNodePre() {; } sqlite3_int64 GetId() { return Id; } wxString & GetCode() { return Code; } void SetNext(NetNodePre * next) { Next = next; } NetNodePre *GetNext() { return Next; } }; class NetNode { // // a class to store a final node for Network // private: int InternalIndex; sqlite3_int64 Id; wxString Code; double X; double Y; class NetArcRef *First; class NetArcRef *Last; NetNode *Next; public: NetNode(sqlite3_int64 id); NetNode(wxString & code); ~NetNode(); int GetInternalIndex() { return InternalIndex; } void SetInternalIndex(int idx) { InternalIndex = idx; } sqlite3_int64 GetId() { return Id; } wxString & GetCode() { return Code; } double GetX() { return X; } void SetX(double x) { X = x; } double GetY() { return Y; } void SetY(double y) { Y = y; } void AddOutcoming(class NetArc * pA); NetArcRef *GetFirst() { return First; } NetArc **PrepareOutcomings(int *count); void SetNext(NetNode * next) { Next = next; } NetNode *GetNext() { return Next; } }; class NetArc { // // a class to store an arc for Network // private: sqlite3_int64 RowId; NetNode *From; NetNode *To; double Cost; NetArc *Next; public: NetArc(sqlite3_int64 rowid, NetNode * from, NetNode * to, double cost); ~NetArc() {; } sqlite3_int64 GetRowId() { return RowId; } NetNode *GetFrom() { return From; } NetNode *GetTo() { return To; } double GetCost() { return Cost; } void SetNext(NetArc * next) { Next = next; } NetArc *GetNext() { return Next; } }; class NetArcRef { // // a class to store a reference to an arc for Network // private: NetArc * Reference; NetArcRef *Next; public: NetArcRef(NetArc * arc) { Reference = arc; Next = NULL; } ~NetArcRef() {; } NetArc *GetReference() { return Reference; } void SetNext(NetArcRef * next) { Next = next; } NetArcRef *GetNext() { return Next; } }; class Network { // // a class representing a Network // private: NetNodePre * FirstPre; NetNodePre *LastPre; int NumPreNodes; NetNodePre **SortedPreNodes; NetArc *FirstArc; NetArc *LastArc; NetNode *FirstNode; NetNode *LastNode; int NumNodes; NetNode **SortedNodes; bool Error; bool NodeCode; int MaxCodeLength; public: Network(); ~Network(); void CleanPreNodes(); void InsertNode(sqlite3_int64 id); void InsertNode(const char *code); void AddNode(sqlite3_int64 id); void AddNode(wxString & code); NetNode *ProcessNode(sqlite3_int64 id, double x, double y, NetNode ** pOther); NetNode *ProcessNode(wxString & code, double x, double y, NetNode ** pOther); NetNode *ProcessNode(sqlite3_int64 id, NetNode ** pOther); NetNode *ProcessNode(wxString & code, NetNode ** pOther); void Sort(); NetNode *Find(sqlite3_int64 id); NetNode *Find(wxString & code); NetNode *GetSortedNode(sqlite3_int64 x); void AddArc(sqlite3_int64 rowid, sqlite3_int64 id_from, sqlite3_int64 id_to, double node_from_x, double node_from_y, double node_to_x, double node_to_y, double cost); void AddArc(sqlite3_int64 rowid, const char *code_from, const char *code_to, double node_from_x, double node_from_y, double node_to_x, double node_to_y, double cost); void AddArc(sqlite3_int64 rowid, sqlite3_int64 id_from, sqlite3_int64 id_to, double cost); void AddArc(sqlite3_int64 rowid, const char *code_from, const char *code_to, double cost); void InitNodes(); void SetError() { Error = true; } bool IsError() { return Error; } void SetNodeCode(bool mode) { NodeCode = mode; } bool IsNodeCode() { return NodeCode; } int GetNumNodes() { return NumNodes; } int GetMaxCodeLength() { return MaxCodeLength; } }; class AutoFDOTable { private: char *Name; AutoFDOTable *Next; public: AutoFDOTable(const char *name, const int len) { Name = new char[len + 1]; strcpy(Name, name); Next = NULL; } ~AutoFDOTable() { if (Name) delete[]Name; } char *GetName() { return Name; } void SetNext(AutoFDOTable * next) { Next = next; } AutoFDOTable *GetNext() { return Next; } }; class AutoFDOTables { private: AutoFDOTable * First; AutoFDOTable *Last; public: AutoFDOTables() { First = NULL; Last = NULL; } ~AutoFDOTables(); void Add(const char *name, const int len); AutoFDOTable *GetFirst() { return First; } }; class AutoGPKGTable { private: char *Name; AutoGPKGTable *Next; public: AutoGPKGTable(const char *name, const int len) { Name = new char[len + 1]; strcpy(Name, name); Next = NULL; } ~AutoGPKGTable() { if (Name) delete[]Name; } char *GetName() { return Name; } void SetNext(AutoGPKGTable * next) { Next = next; } AutoGPKGTable *GetNext() { return Next; } }; class AutoGPKGTables { private: AutoGPKGTable * First; AutoGPKGTable *Last; public: AutoGPKGTables() { First = NULL; Last = NULL; } ~AutoGPKGTables(); void Add(const char *name, const int len); AutoGPKGTable *GetFirst() { return First; } }; class AutoSaveDialog:public wxDialog { // // a dialog to manage AutoSave // private: MyFrame * MainFrame; wxString Path; // the path to save int Seconds; // interval wxRadioBox *IntervalCtrl; wxTextCtrl *PathCtrl; public: AutoSaveDialog() {; } AutoSaveDialog(MyFrame * parent, wxString & path, int secs); bool Create(MyFrame * parent, wxString & path, int secs); virtual ~ AutoSaveDialog() {; } void CreateControls(); int GetSeconds() { return Seconds; } void OnOk(wxCommandEvent & event); wxString & GetPath() { return Path; } void OnIntervalChanged(wxCommandEvent & event); void OnChangePath(wxCommandEvent & event); }; class LoadXmlDialog:public wxDialog { // // a dialog to load XML documents // private: MyFrame * MainFrame; wxString Path; // the XML path bool Compressed; // compressed XML bool Validate; // Schema validation wxString SchemaURI; // the Schema URI (if validation is required) public: LoadXmlDialog() {; } bool Create(MyFrame * parent, wxString & path); virtual ~ LoadXmlDialog() {; } void CreateControls(); bool IsCompressed() { return Compressed; } wxString & GetSchemaURI() { return SchemaURI; } void OnOk(wxCommandEvent & event); void OnCompressionChanged(wxCommandEvent & event); void OnValidationChanged(wxCommandEvent & event); }; class AuxTable { // a class used by ComposerDialog [table item] private: wxString TableName; wxString Geometries[128]; int MaxGeometryIndex; AuxTable *Next; public: AuxTable(wxString & table); ~AuxTable() {; } void AddGeometryColumn(wxString & geom); wxString & GetTableName() { return TableName; } wxString & GetGeometryColumn(int ind); int GetGeometriesCount() { return MaxGeometryIndex; } void SetNext(AuxTable * next) { Next = next; } AuxTable *GetNext() { return Next; } }; class AuxTableList { // a class used by ComposerDialog [tables list] private: AuxTable * First; AuxTable *Last; int Count; public: AuxTableList(); ~AuxTableList(); void Flush(); void Populate(sqlite3 * handle); int GetCount() { return Count; } AuxTable *GetFirst() { return First; } }; class AuxColumn { // a class used by ComposerDialog [table item] private: wxString Name; wxString AliasName; bool Selected; AuxColumn *Next; public: AuxColumn(wxString & name); ~AuxColumn() {; } wxString & GetName() { return Name; } void SetState(bool mode) { Selected = mode; } bool IsSelected() { return Selected; } void SetAliasName(wxString & alias) { AliasName = alias; } wxString & GetAliasName() { return AliasName; } void SetNext(AuxColumn * next) { Next = next; } AuxColumn *GetNext() { return Next; } }; class AuxColumnList { // a class used by ComposerDialog [tables list] private: AuxColumn * First; AuxColumn *Last; int Count; public: AuxColumnList(); ~AuxColumnList(); void Flush(); void Populate(sqlite3 * handle, wxString & table); int GetCount() { return Count; } AuxColumn *GetFirst() { return First; } void SetState(int ind, bool mode); void SetState(wxString & column); void SetAlias(wxString & column, wxString & alias); bool HasSelectedColumns(); }; class DumpKmlDialog:public wxDialog { // // a dialog preparing a DUMP KML // private: MyFrame * MainFrame; wxString Table; // the table's name wxString Column; // the column's name for Geometry bool isNameConst; bool isDescConst; wxString Name; wxString Desc; int Precision; wxComboBox *NameCtrl; wxTextCtrl *NameConstCtrl; wxComboBox *DescCtrl; wxTextCtrl *DescConstCtrl; wxSpinCtrl *PrecisionCtrl; AuxColumnList ColumnList; void InitializeComboColumns(wxComboBox * ctrl); public: DumpKmlDialog() {; } DumpKmlDialog(MyFrame * parent, wxString & table, wxString & column); bool Create(MyFrame * parent, wxString & table, wxString & column); virtual ~ DumpKmlDialog() {; } void CreateControls(); bool IsNameConst() { return isNameConst; } wxString & GetName() { return Name; } bool IsDescConst() { return isDescConst; } wxString & GetDesc() { return Desc; } int GetPrecision() { return Precision; } void OnNameSelected(wxCommandEvent & event); void OnDescSelected(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class DumpSpreadsheetDialog:public wxDialog { // // a dialog preparing a DUMP Speadsheet // private: MyFrame * MainFrame; char DecimalPoint; bool DateTimes; public: DumpSpreadsheetDialog() {; } DumpSpreadsheetDialog(MyFrame * parent); bool Create(MyFrame * parent); virtual ~ DumpSpreadsheetDialog() {; } void CreateControls(); char GetDecimalPoint() { return DecimalPoint; } bool IsDateTimes() { return DateTimes; } void OnDecimalPointSelected(wxCommandEvent & event); void OnDateTimesSelected(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class RasterCoverageStyle { // an SLD/SE Raster style private: int StyleID; wxString Name; wxString Title; wxString Abstract; wxString SchemaValidated; wxString SchemaURI; bool Selected; RasterCoverageStyle *Next; public: RasterCoverageStyle(int style_id, wxString & name, wxString & title, wxString & abstract, wxString & validated, wxString & schema_uri); ~RasterCoverageStyle() {; } int GetStyleID() { return StyleID; } wxString & GetName() { return Name; } wxString & GetTitle() { return Title; } wxString & GetAbstract() { return Abstract; } wxString & GetSchemaValidated() { return SchemaValidated; } wxString & GetSchemaURI() { return SchemaURI; } void MarkSelected() { Selected = true; } bool IsSelected() { return Selected; } RasterCoverageStyle *GetNext() { return Next; } void SetNext(RasterCoverageStyle * next) { Next = next; } }; class RasterCoverageStylesList { // a container for Raster Coverage SLD/SE styles private: RasterCoverageStyle * First; RasterCoverageStyle *Last; public: RasterCoverageStylesList(); ~RasterCoverageStylesList(); void Add(int style_id, wxString & name, wxString & title, wxString & abstract, wxString & validated, wxString & schema_uri); void MarkSelected(int stileId); RasterCoverageStyle *GetFirst() { return First; } }; class RasterLoadParams { // a class wrapping Raster Import arguments private: MyFrame * MainFrame; class ImportRasterDialog *Dlg; wxString CoverageName; wxArrayString Paths; wxString CurrentPath; int Srid; bool WithWorldFile; bool Pyramidize; bool Error; int Count; bool AbortPending; public: RasterLoadParams() {; } ~RasterLoadParams() {; } void Initialize(MyFrame * mother, ImportRasterDialog * dlg, wxString & coverage, wxArrayString & paths, int srid, bool with_worldfile, bool pyramidize) { MainFrame = mother; Dlg = dlg; CoverageName = coverage; Paths = paths; Srid = srid; WithWorldFile = with_worldfile; Pyramidize = pyramidize; Error = false; Count = 0; AbortPending = false; } MyFrame *GetMainFrame() { return MainFrame; } ImportRasterDialog *GetDlg() { return Dlg; } wxString & GetCoverageName() { return CoverageName; } int GetPathsCount() { return Paths.Count(); } wxString & GetPathByIndex(int idx) { return Paths.Item(idx); } int GetSrid() { return Srid; } bool IsWithWorldFile() { return WithWorldFile; } bool IsPyramidize() { return Pyramidize; } void SetCurrentPath(wxString & path) { CurrentPath = path; } wxString & GetCurrentPath() { return CurrentPath; } void SetError() { Error = true; } bool GetError() { return Error; } void Done() { Count++; } int GetCount() { return Count; } void RequestAbort() { AbortPending = true; } bool IsAbortPending() { return AbortPending; } }; class ImportRasterDialog:public wxDialog { // // a dialog for importing external Raster files into a Coverage // private: MyFrame * MainFrame; wxString CoverageName; wxArrayString Paths; wxString Path; wxString Title; wxString Abstract; wxString Sample; wxString Pixel; wxString Compression; bool ForceSrid; int Srid; bool WithWorldFile; bool Pyramidize; wxString ListDone; RasterLoadParams Params; public: ImportRasterDialog() {; } bool Create(MyFrame * parent, wxString & coverage, wxArrayString & paths, wxString & path, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression, int srid); virtual ~ ImportRasterDialog() {; } void CreateControls(); void DoRunLoad(void); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); void OnCmdAbort(wxCommandEvent & event); void OnCmdForceSridChanged(wxCommandEvent & event); void OnRequestStart(wxCommandEvent & event); void OnRequestStop(wxCommandEvent & event); void OnThreadFinished(wxCommandEvent & event); }; class PyramidizeDialog:public wxDialog { // // a dialog supporting Pyramidize // private: MyFrame * MainFrame; wxString CoverageName; wxString Title; wxString Abstract; wxString Sample; wxString Pixel; wxString Compression; public: PyramidizeDialog() {; } bool Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression); virtual ~ PyramidizeDialog() {; } void CreateControls(); bool DoPyramidize(void); void OnOk(wxCommandEvent & event); }; class PyramidizeMonolithicDialog:public wxDialog { // // a dialog supporting PyramidizeMonolithic // private: MyFrame * MainFrame; wxString CoverageName; wxString Title; wxString Abstract; wxString Sample; wxString Pixel; wxString Compression; public: PyramidizeMonolithicDialog() {; } bool Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression); virtual ~ PyramidizeMonolithicDialog() {; } void CreateControls(); bool DoPyramidizeMonolithic(void); void OnOk(wxCommandEvent & event); }; class DePyramidizeDialog:public wxDialog { // // a dialog supporting DePyramidize // private: MyFrame * MainFrame; wxString CoverageName; wxString Title; wxString Abstract; wxString Sample; wxString Pixel; wxString Compression; public: DePyramidizeDialog() {; } bool Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression); virtual ~ DePyramidizeDialog() {; } void CreateControls(); bool DoDePyramidize(void); void OnOk(wxCommandEvent & event); }; class RasterDropDialog:public wxDialog { // // a dialog supporting Drop Raster // private: MyFrame * MainFrame; wxString CoverageName; wxString Title; wxString Abstract; wxString Sample; wxString Pixel; wxString Compression; public: RasterDropDialog() {; } bool Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & sample, wxString & pixel, wxString & compression); virtual ~ RasterDropDialog() {; } void CreateControls(); bool DoDropCoverage(void); void OnOk(wxCommandEvent & event); }; class RasterCoverageStylesDialog:public wxDialog { // // a dialog for handling SLD/SE Raster Coverage's Styles // private: MyFrame * MainFrame; wxString CoverageName; int CurrentRow; int CurrentStyleID; RasterCoverageStylesList *List; wxGrid *GridCtrl; public: RasterCoverageStylesDialog() { List = NULL; } bool Create(MyFrame * parent, wxString & coverage); virtual ~ RasterCoverageStylesDialog() { if (List != NULL) delete List; } void CreateControls(); void DoRegistetRasterCoverageStyles(class ListRasterStylesDialog * dlg); void OnRightClick(wxGridEvent & event); void OnCmdRemoveStyle(wxCommandEvent & event); void OnAddStyle(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class ListRasterStylesDialog:public wxDialog { // // a dialog for listing and selecting SLD/SE Raster Styles // private: MyFrame * MainFrame; RasterCoverageStylesList *List; wxGrid *GridCtrl; public: ListRasterStylesDialog() { List = NULL; } bool Create(MyFrame * parent); virtual ~ ListRasterStylesDialog() { if (List != NULL) delete List; } void CreateControls(); int GetSelectedCount(); int GetSelectedStyleId(int idx); void OnOk(wxCommandEvent & event); }; class RasterStylesLoadParams { // a class wrapping Raster Styles Import arguments private: MyFrame * MainFrame; class LoadRasterStyleDialog *Dlg; wxArrayString Paths; wxString CurrentPath; bool Error; int Count; bool AbortPending; public: RasterStylesLoadParams() {; } ~RasterStylesLoadParams() {; } void Initialize(MyFrame * mother, LoadRasterStyleDialog * dlg, wxArrayString & paths) { MainFrame = mother; Dlg = dlg; Paths = paths; Error = false; Count = 0; AbortPending = false; } MyFrame *GetMainFrame() { return MainFrame; } LoadRasterStyleDialog *GetDlg() { return Dlg; } int GetPathsCount() { return Paths.Count(); } wxString & GetPathByIndex(int idx) { return Paths.Item(idx); } void SetCurrentPath(wxString & path) { CurrentPath = path; } wxString & GetCurrentPath() { return CurrentPath; } void SetError() { Error = true; } bool GetError() { return Error; } void Done() { Count++; } int GetCount() { return Count; } void RequestAbort() { AbortPending = true; } bool IsAbortPending() { return AbortPending; } }; class LoadRasterStyleDialog:public wxDialog { // // a dialog for adding new SLD/SE Raster Style // private: MyFrame * MainFrame; wxString Path; wxArrayString Paths; wxString CurrentPath; bool Error; int Count; wxString ListDone; RasterStylesLoadParams Params; public: LoadRasterStyleDialog() {; } bool Create(MyFrame * parent, wxArrayString & paths, wxString & path); virtual ~ LoadRasterStyleDialog() {; } void CreateControls(); void DoRunLoad(void); bool RegisterRasterStyle(sqlite3_stmt * stmt, void *blob, int blob_size); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); void OnCmdAbort(wxCommandEvent & event); void OnRequestStart(wxCommandEvent & event); void OnRequestStop(wxCommandEvent & event); void OnRequestSkip(wxCommandEvent & event); void OnThreadFinished(wxCommandEvent & event); }; class ReloadRasterStyleDialog:public wxDialog { // // a dialog for reloading an already existing SLD/SE Raster Style // private: MyFrame * MainFrame; wxString Path; RasterCoverageStylesList *List; wxGrid *GridCtrl; public: ReloadRasterStyleDialog() { List = NULL; } bool Create(MyFrame * parent, wxString & path); virtual ~ ReloadRasterStyleDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoReloadRasterStyle(int style_id, void *blob, int blob_size); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class UnregisterRasterStyleDialog:public wxDialog { // // a dialog for unregistering an already existing SLD/SE Raster Style // private: MyFrame * MainFrame; RasterCoverageStylesList *List; wxGrid *GridCtrl; public: UnregisterRasterStyleDialog() { List = NULL; } bool Create(MyFrame * parent); virtual ~ UnregisterRasterStyleDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoCheckUnreferencedRasterStyle(int style_id); bool DoUnregisterRasterStyle(int style_id); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class RasterCoverageSRID { // a Raster Coverage alternative SRID private: int Srid; wxString AuthName; int AuthSrid; wxString RefSysName; bool Native; bool Deleted; RasterCoverageSRID *Next; public: RasterCoverageSRID(bool native, int srid, wxString & auth_name, int auth_srid, wxString & name) { Srid = srid; AuthName = auth_name; AuthSrid = auth_srid; RefSysName = name; Native = native; Deleted = false; Next = NULL; } ~RasterCoverageSRID() {; } int GetSrid() { return Srid; } wxString & GetAuthName() { return AuthName; } int GetAuthSrid() { return AuthSrid; } wxString & GetRefSysName() { return RefSysName; } bool IsNative() { return Native; } void MarkDeleted() { Deleted = true; } bool IsDeleted() { return Deleted; } RasterCoverageSRID *GetNext() { return Next; } void SetNext(RasterCoverageSRID * next) { Next = next; } }; class RasterCoverageSRIDsList { // a container for Raster Coverage alternative SRIDs private: RasterCoverageSRID * First; RasterCoverageSRID *Last; public: RasterCoverageSRIDsList() { First = NULL; Last = NULL; } ~RasterCoverageSRIDsList(); void Add(bool native, int srid, wxString & auth_name, int auth_srid, wxString & name); RasterCoverageSRID *GetFirst() { return First; } bool IsAlreadyDefinedSrid(int srid); bool IsNativeSrid(int srid); void MarkDeleted(int strid); }; class RasterSRIDsDialog:public wxDialog { // // a dialog for handling Raster Coverage's alternative SRIDs // private: MyFrame * MainFrame; wxString CoverageName; int CurrentRow; int CurrentSRID; RasterCoverageSRIDsList *List; wxGrid *GridCtrl; public: RasterSRIDsDialog() { List = NULL; } bool Create(MyFrame * parent, wxString & coverage); virtual ~ RasterSRIDsDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoRegistetRasterCoverageSrid(int srid); void OnRightClick(wxGridEvent & event); void OnCmdRemoveSrid(wxCommandEvent & event); void OnCmdAddSrid(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class RasterCoverageKeyword { // a Raster Coverage Keyword private: wxString Keyword; bool Deleted; RasterCoverageKeyword *Next; public: RasterCoverageKeyword(wxString & keyword) { Keyword = keyword; Deleted = false; Next = NULL; } ~RasterCoverageKeyword() {; } wxString & GetKeyword() { return Keyword; } void MarkDeleted() { Deleted = true; } bool IsDeleted() { return Deleted; } RasterCoverageKeyword *GetNext() { return Next; } void SetNext(RasterCoverageKeyword * next) { Next = next; } }; class RasterCoverageKeywordsList { // a container for Raster Coverage Keywords private: RasterCoverageKeyword * First; RasterCoverageKeyword *Last; public: RasterCoverageKeywordsList() { First = NULL; Last = NULL; } ~RasterCoverageKeywordsList(); void Add(wxString & keyword); RasterCoverageKeyword *GetFirst() { return First; } bool IsAlreadyDefinedKeyword(wxString & keyword); void MarkDeleted(wxString & keyword); }; class RasterKeywordsDialog:public wxDialog { // // a dialog for handling Raster Coverage's Keywords // private: MyFrame * MainFrame; wxString CoverageName; int CurrentRow; wxString Keyword; RasterCoverageKeywordsList *List; wxGrid *GridCtrl; public: RasterKeywordsDialog() { List = NULL; } bool Create(MyFrame * parent, wxString & coverage); virtual ~ RasterKeywordsDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoRegistetRasterCoverageKeyword(wxString & keyword); void OnRightClick(wxGridEvent & event); void OnCmdRemoveKeyword(wxCommandEvent & event); void OnCmdAddKeyword(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class ExternalGraphicLoadParams { // a class wrapping External Graphic Import arguments private: MyFrame * MainFrame; class LoadExternalGraphicDialog *Dlg; wxArrayString Paths; wxString CurrentPath; bool Error; int Count; bool AbortPending; public: ExternalGraphicLoadParams() {; } ~ExternalGraphicLoadParams() {; } void Initialize(MyFrame * mother, LoadExternalGraphicDialog * dlg, wxArrayString & paths) { MainFrame = mother; Dlg = dlg; Paths = paths; Error = false; Count = 0; AbortPending = false; } MyFrame *GetMainFrame() { return MainFrame; } LoadExternalGraphicDialog *GetDlg() { return Dlg; } int GetPathsCount() { return Paths.Count(); } wxString & GetPathByIndex(int idx) { return Paths.Item(idx); } void SetCurrentPath(wxString & path) { CurrentPath = path; } wxString & GetCurrentPath() { return CurrentPath; } void SetError() { Error = true; } bool GetError() { return Error; } void Done() { Count++; } int GetCount() { return Count; } void RequestAbort() { AbortPending = true; } bool IsAbortPending() { return AbortPending; } }; class LoadExternalGraphicDialog:public wxDialog { // // a dialog for adding new External Graphic resource(s) // private: MyFrame * MainFrame; wxString Path; wxArrayString Paths; wxString CurrentPath; bool Error; int Count; wxString ListDone; ExternalGraphicLoadParams Params; public: LoadExternalGraphicDialog() {; } bool Create(MyFrame * parent, wxArrayString & paths, wxString & path); virtual ~ LoadExternalGraphicDialog() {; } void CreateControls(); void DoRunLoad(void); bool RegisterExternalGraphic(sqlite3_stmt * stmt, const char *xlink_href, const char *title, const char *abstract, const char *filename, void *blob, int blob_size); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); void OnCmdAbort(wxCommandEvent & event); void OnRequestStart(wxCommandEvent & event); void OnRequestStop(wxCommandEvent & event); void OnRequestSkip(wxCommandEvent & event); void OnThreadFinished(wxCommandEvent & event); }; class ExternalGraphic { // a class wrapping an External Graphic private: wxString XLinkHref; wxString Title; wxString Abstract; wxString MimeType; wxImage Graphic; ExternalGraphic *Next; bool DoBuildGraphic(wxString & mime_type, const void *blob, int blob_sz); void DoBuildDefaultGraphic(); public: ExternalGraphic(wxString & xlink_href, wxString & title, wxString & abstract, wxString & mime_type, const void *blob, int blob_sz); ~ExternalGraphic() {; } wxString & GetXLinkHref() { return XLinkHref; } wxString & GetTitle() { return Title; } wxString & GetAbstract() { return Abstract; } wxString & GetMimeType() { return MimeType; } wxImage *GetGraphic() { return &Graphic; } void SetNext(ExternalGraphic * next) { Next = next; } ExternalGraphic *GetNext() { return Next; } }; class ExternalGraphicList { // a class acting as a container of External Graphics private: ExternalGraphic * First; ExternalGraphic *Last; public: ExternalGraphicList() { First = NULL; Last = NULL; } ~ExternalGraphicList(); void Add(wxString & xlink_href, wxString & title, wxString & abstract, wxString & mime_type, const void *blob, int blob_sz); ExternalGraphic *GetFirst() { return First; } void FindByIndex(int idx, wxString & xlink_href, wxString & mime_type); int FindByXLinkHref(wxString & xlink_href); }; class UnregisterExternalGraphicDialog:public wxDialog { // // a dialog for unregistering an already existing External Graphic resource // private: MyFrame * MainFrame; ExternalGraphicList *List; wxGrid *GridCtrl; public: UnregisterExternalGraphicDialog() { List = NULL; } bool Create(MyFrame * parent); virtual ~ UnregisterExternalGraphicDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoUnregisterExternalGraphic(const char *xlink_href); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class TextFontLoadParams { // a class wrapping Text Font Import arguments private: MyFrame * MainFrame; class LoadTextFontDialog *Dlg; wxArrayString Paths; wxString CurrentPath; bool Error; int Count; bool AbortPending; public: TextFontLoadParams() {; } ~TextFontLoadParams() {; } void Initialize(MyFrame * mother, LoadTextFontDialog * dlg, wxArrayString & paths) { MainFrame = mother; Dlg = dlg; Paths = paths; Error = false; Count = 0; AbortPending = false; } MyFrame *GetMainFrame() { return MainFrame; } LoadTextFontDialog *GetDlg() { return Dlg; } int GetPathsCount() { return Paths.Count(); } wxString & GetPathByIndex(int idx) { return Paths.Item(idx); } void SetCurrentPath(wxString & path) { CurrentPath = path; } wxString & GetCurrentPath() { return CurrentPath; } void SetError() { Error = true; } bool GetError() { return Error; } void Done() { Count++; } int GetCount() { return Count; } void RequestAbort() { AbortPending = true; } bool IsAbortPending() { return AbortPending; } }; class LoadTextFontDialog:public wxDialog { // // a dialog for adding new Text Font resource(s) // private: MyFrame * MainFrame; wxString Path; wxArrayString Paths; wxString CurrentPath; bool Error; int Count; wxString ListDone; TextFontLoadParams Params; public: LoadTextFontDialog() {; } bool Create(MyFrame * parent, wxArrayString & paths, wxString & path); virtual ~ LoadTextFontDialog() {; } void CreateControls(); void DoRunLoad(void); bool RegisterTextFont(sqlite3_stmt * stmt, const char *path); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); void OnCmdAbort(wxCommandEvent & event); void OnRequestStart(wxCommandEvent & event); void OnRequestStop(wxCommandEvent & event); void OnRequestSkip(wxCommandEvent & event); void OnThreadFinished(wxCommandEvent & event); }; class TextFont { // a class wrapping a Text Font private: wxString Facename; bool Bold; bool Italic; wxImage *FontExample; TextFont *Next; public: TextFont(const void *priv_data, const unsigned char *blob, int blob_sz); ~TextFont() { delete FontExample; } wxString & GetFacename() { return Facename; } bool IsBold() { return Bold; } bool IsItalic() { return Italic; } wxImage *GetFontExample() { return FontExample; } void SetNext(TextFont * next) { Next = next; } TextFont *GetNext() { return Next; } }; class TextFontList { // a class acting as a container of Text Font private: TextFont * First; TextFont *Last; public: TextFontList() { First = NULL; Last = NULL; } ~TextFontList(); void Add(const void *priv_data, const unsigned char *blob, int blob_sz); TextFont *GetFirst() { return First; } void FindByIndex(int idx, wxString & face_name, int *style, int *weight); int FindByFaceName(wxString & face_name); }; class UnregisterTextFontDialog:public wxDialog { // // a dialog for unregistering an already existing Text Font // private: MyFrame * MainFrame; TextFontList *List; wxGrid *GridCtrl; public: UnregisterTextFontDialog() { List = NULL; } bool Create(MyFrame * parent); virtual ~ UnregisterTextFontDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoUnregisterTextFont(int font_id); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class VectorStylesLoadParams { // a class wrapping Vector Styles Import arguments private: MyFrame * MainFrame; class LoadVectorStyleDialog *Dlg; wxArrayString Paths; wxString CurrentPath; bool Error; int Count; bool AbortPending; public: VectorStylesLoadParams() {; } ~VectorStylesLoadParams() {; } void Initialize(MyFrame * mother, LoadVectorStyleDialog * dlg, wxArrayString & paths) { MainFrame = mother; Dlg = dlg; Paths = paths; Error = false; Count = 0; AbortPending = false; } MyFrame *GetMainFrame() { return MainFrame; } LoadVectorStyleDialog *GetDlg() { return Dlg; } int GetPathsCount() { return Paths.Count(); } wxString & GetPathByIndex(int idx) { return Paths.Item(idx); } void SetCurrentPath(wxString & path) { CurrentPath = path; } wxString & GetCurrentPath() { return CurrentPath; } void SetError() { Error = true; } bool GetError() { return Error; } void Done() { Count++; } int GetCount() { return Count; } void RequestAbort() { AbortPending = true; } bool IsAbortPending() { return AbortPending; } }; class VectorCoverageStyle { // an SLD/SE Vector style private: int StyleID; wxString Name; wxString Title; wxString Abstract; wxString SchemaValidated; wxString SchemaURI; bool Selected; VectorCoverageStyle *Next; public: VectorCoverageStyle(int style_id, wxString & name, wxString & title, wxString & abstract, wxString & validated, wxString & schema_uri); ~VectorCoverageStyle() {; } int GetStyleID() { return StyleID; } wxString & GetName() { return Name; } wxString & GetTitle() { return Title; } wxString & GetAbstract() { return Abstract; } wxString & GetSchemaValidated() { return SchemaValidated; } wxString & GetSchemaURI() { return SchemaURI; } void MarkSelected() { Selected = true; } bool IsSelected() { return Selected; } VectorCoverageStyle *GetNext() { return Next; } void SetNext(VectorCoverageStyle * next) { Next = next; } }; class VectorCoverageStylesList { // a container for Vector Coverage SLD/SE styles private: VectorCoverageStyle * First; VectorCoverageStyle *Last; public: VectorCoverageStylesList(); ~VectorCoverageStylesList(); void Add(int style_id, wxString & name, wxString & title, wxString & abstract, wxString & validated, wxString & schema_uri); void MarkSelected(int stileId); VectorCoverageStyle *GetFirst() { return First; } }; class LoadVectorStyleDialog:public wxDialog { // // a dialog for adding new SLD/SE Vector Style // private: MyFrame * MainFrame; wxString Path; wxArrayString Paths; wxString CurrentPath; bool Error; int Count; wxString ListDone; VectorStylesLoadParams Params; public: LoadVectorStyleDialog() {; } bool Create(MyFrame * parent, wxArrayString & paths, wxString & path); virtual ~ LoadVectorStyleDialog() {; } void CreateControls(); void DoRunLoad(void); bool RegisterVectorStyle(sqlite3_stmt * stmt, void *blob, int blob_size); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); void OnCmdAbort(wxCommandEvent & event); void OnRequestStart(wxCommandEvent & event); void OnRequestStop(wxCommandEvent & event); void OnRequestSkip(wxCommandEvent & event); void OnThreadFinished(wxCommandEvent & event); }; class ReloadVectorStyleDialog:public wxDialog { // // a dialog for reloading an already existing SLD/SE Vector Style // private: MyFrame * MainFrame; wxString Path; VectorCoverageStylesList *List; wxGrid *GridCtrl; public: ReloadVectorStyleDialog() { List = NULL; } bool Create(MyFrame * parent, wxString & path); virtual ~ ReloadVectorStyleDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoReloadVectorStyle(int style_id, void *blob, int blob_size); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class UnregisterVectorStyleDialog:public wxDialog { // // a dialog for unregistering an already existing SLD/SE Vector Style // private: MyFrame * MainFrame; VectorCoverageStylesList *List; wxGrid *GridCtrl; public: UnregisterVectorStyleDialog() { List = NULL; } bool Create(MyFrame * parent); virtual ~ UnregisterVectorStyleDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoCheckUnreferencedVectorStyle(int style_id); bool DoUnregisterVectorStyle(int style_id); void OnCancel(wxCommandEvent & event); void OnOk(wxCommandEvent & event); }; class VectorUnregisterDialog:public wxDialog { // // a dialog supporting Unregister Vector // private: MyFrame * MainFrame; wxString CoverageName; wxString Title; wxString Abstract; wxString Type; public: VectorUnregisterDialog() {; } bool Create(MyFrame * parent, wxString & coverage, wxString & title, wxString & abstract, wxString & type); virtual ~ VectorUnregisterDialog() {; } void CreateControls(); bool DoVectorUnregister(void); void OnOk(wxCommandEvent & event); }; class VectorCoverageStylesDialog:public wxDialog { // // a dialog for handling SLD/SE Vector Coverage's Styles // private: MyFrame * MainFrame; wxString CoverageName; int CurrentRow; int CurrentStyleID; VectorCoverageStylesList *List; wxGrid *GridCtrl; public: VectorCoverageStylesDialog() { List = NULL; } bool Create(MyFrame * parent, wxString & coverage); virtual ~ VectorCoverageStylesDialog() { if (List != NULL) delete List; } void CreateControls(); void DoRegistetVectorCoverageStyles(class ListVectorStylesDialog * dlg); void OnRightClick(wxGridEvent & event); void OnCmdRemoveStyle(wxCommandEvent & event); void OnAddStyle(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class ListVectorStylesDialog:public wxDialog { // // a dialog for listing and selecting SLD/SE Vector Styles // private: MyFrame * MainFrame; VectorCoverageStylesList *List; wxGrid *GridCtrl; public: ListVectorStylesDialog() { List = NULL; } bool Create(MyFrame * parent); virtual ~ ListVectorStylesDialog() { if (List != NULL) delete List; } void CreateControls(); int GetSelectedCount(); int GetSelectedStyleId(int idx); void OnOk(wxCommandEvent & event); }; class CandidateVectorCoverage { // an SLD/SE Vector style private: wxString TableName; wxString GeometryColumn; int Srid; wxString GeometryType; bool VectorCoverage; bool RasterCoverage; CandidateVectorCoverage *Next; public: CandidateVectorCoverage(wxString & table, wxString & geometry, int srid, wxString & type) { TableName = table; GeometryColumn = geometry; Srid = srid; GeometryType = type; VectorCoverage = false; RasterCoverage = false; Next = NULL; } ~CandidateVectorCoverage() {; } wxString & GetTableName() { return TableName; } wxString & GetGeometryColumn() { return GeometryColumn; } int GetSrid() { return Srid; } wxString & GetGeometryType() { return GeometryType; } void MarkVectorCoverage() { VectorCoverage = true; } bool IsVectorCoverage() { return VectorCoverage; } void MarkRasterCoverage() { RasterCoverage = true; } bool IsRasterCoverage() { return RasterCoverage; } CandidateVectorCoverage *GetNext() { return Next; } void SetNext(CandidateVectorCoverage * next) { Next = next; } }; class CandidateVectorCoveragesList { // a container for candidate Vector Coverages private: CandidateVectorCoverage * First; CandidateVectorCoverage *Last; public: CandidateVectorCoveragesList() { First = NULL; Last = NULL; } ~CandidateVectorCoveragesList(); void Add(wxString & table_name, wxString & geometry, int srid, wxString & type); void MarkVectorCoverage(wxString & table, wxString & geometry); void MarkRasterCoverage(wxString & table, wxString & geometry); CandidateVectorCoverage *GetFirst() { return First; } }; class VectorRegisterDialog:public wxDialog { // // a dialog for Register Vector Coverage // private: MyFrame * MainFrame; CandidateVectorCoveragesList *List; wxGrid *GridCtrl; wxString CoverageName; wxString TableName; wxString GeometryColumn; wxString Title; wxString Abstract; public: VectorRegisterDialog() { List = NULL; } bool Create(MyFrame * parent); virtual ~ VectorRegisterDialog() { if (List != NULL) delete List; } void CreateControls(); wxString & GetCoverageName() { return CoverageName; } wxString & GetTableName() { return TableName; } wxString & GetGeometryColumn() { return GeometryColumn; } wxString & GetTitle() { return Title; } wxString & GetAbstract() { return Abstract; } void OnOk(wxCommandEvent & event); }; class VectorCoverageSRID { // a Vector Coverage alternative SRID private: int Srid; wxString AuthName; int AuthSrid; wxString RefSysName; bool Native; bool Deleted; VectorCoverageSRID *Next; public: VectorCoverageSRID(bool native, int srid, wxString & auth_name, int auth_srid, wxString & name) { Srid = srid; AuthName = auth_name; AuthSrid = auth_srid; RefSysName = name; Native = native; Deleted = false; Next = NULL; } ~VectorCoverageSRID() {; } int GetSrid() { return Srid; } wxString & GetAuthName() { return AuthName; } int GetAuthSrid() { return AuthSrid; } wxString & GetRefSysName() { return RefSysName; } bool IsNative() { return Native; } void MarkDeleted() { Deleted = true; } bool IsDeleted() { return Deleted; } VectorCoverageSRID *GetNext() { return Next; } void SetNext(VectorCoverageSRID * next) { Next = next; } }; class VectorCoverageSRIDsList { // a container for Vector Coverage alternative SRIDs private: VectorCoverageSRID * First; VectorCoverageSRID *Last; public: VectorCoverageSRIDsList() { First = NULL; Last = NULL; } ~VectorCoverageSRIDsList(); void Add(bool native, int srid, wxString & auth_name, int auth_srid, wxString & name); VectorCoverageSRID *GetFirst() { return First; } bool IsAlreadyDefinedSrid(int srid); bool IsNativeSrid(int srid); void MarkDeleted(int strid); }; class VectorSRIDsDialog:public wxDialog { // // a dialog for handling Vector Coverage's alternative SRIDs // private: MyFrame * MainFrame; wxString CoverageName; int CurrentRow; int CurrentSRID; VectorCoverageSRIDsList *List; wxGrid *GridCtrl; public: VectorSRIDsDialog() { List = NULL; } bool Create(MyFrame * parent, wxString & coverage); virtual ~ VectorSRIDsDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoRegistetVectorCoverageSrid(int srid); void OnRightClick(wxGridEvent & event); void OnCmdRemoveSrid(wxCommandEvent & event); void OnCmdAddSrid(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class VectorCoverageKeyword { // a Vector Coverage Keyword private: wxString Keyword; bool Deleted; VectorCoverageKeyword *Next; public: VectorCoverageKeyword(wxString & keyword) { Keyword = keyword; Deleted = false; Next = NULL; } ~VectorCoverageKeyword() {; } wxString & GetKeyword() { return Keyword; } void MarkDeleted() { Deleted = true; } bool IsDeleted() { return Deleted; } VectorCoverageKeyword *GetNext() { return Next; } void SetNext(VectorCoverageKeyword * next) { Next = next; } }; class VectorCoverageKeywordsList { // a container for Vector Coverage Keywords private: VectorCoverageKeyword * First; VectorCoverageKeyword *Last; public: VectorCoverageKeywordsList() { First = NULL; Last = NULL; } ~VectorCoverageKeywordsList(); void Add(wxString & keyword); VectorCoverageKeyword *GetFirst() { return First; } bool IsAlreadyDefinedKeyword(wxString & keyword); void MarkDeleted(wxString & keyword); }; class VectorKeywordsDialog:public wxDialog { // // a dialog for handling Vector Coverage's Keywords // private: MyFrame * MainFrame; wxString CoverageName; int CurrentRow; wxString Keyword; VectorCoverageKeywordsList *List; wxGrid *GridCtrl; public: VectorKeywordsDialog() { List = NULL; } bool Create(MyFrame * parent, wxString & coverage); virtual ~ VectorKeywordsDialog() { if (List != NULL) delete List; } void CreateControls(); bool DoRegistetVectorCoverageKeyword(wxString & keyword); void OnRightClick(wxGridEvent & event); void OnCmdRemoveKeyword(wxCommandEvent & event); void OnCmdAddKeyword(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); }; class RasterSymbolizerContrastDialog:public wxDialog { // // a dialog for creating an SLD/SE RasterSymbolizer // of the ContrastEnhancement type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; double Opacity; bool Normalize; bool Histogram; bool Gamma; double GammaValue; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; bool RetrieveParams(); char *DoCreateSymbolizerXML(); char *DoCreateCoverageXML(); public: RasterSymbolizerContrastDialog() {; } bool Create(MyFrame * parent); virtual ~ RasterSymbolizerContrastDialog() {; } void CreateControls(); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnCmdModeChanged(wxCommandEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); }; class RasterSymbolizerChannelRgbDialog:public wxDialog { // // a dialog for creating an SLD/SE RasterSymbolizer // of the ChannelSelection (RGB) type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; double Opacity; int RedBand; int GreenBand; int BlueBand; bool Normalize; bool Histogram; bool Gamma; double GammaValue; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; bool RetrieveParams(); char *DoCreateSymbolizerXML(); char *DoCreateCoverageXML(); public: RasterSymbolizerChannelRgbDialog() {; } bool Create(MyFrame * parent); virtual ~ RasterSymbolizerChannelRgbDialog() {; } void CreateControls(); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnCmdModeChanged(wxCommandEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); }; class RasterSymbolizerChannelGrayDialog:public wxDialog { // // a dialog for creating an SLD/SE RasterSymbolizer // of the ChannelSelection (Gray) type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; double Opacity; int GrayBand; bool Normalize; bool Histogram; bool Gamma; double GammaValue; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; bool RetrieveParams(); char *DoCreateSymbolizerXML(); char *DoCreateCoverageXML(); public: RasterSymbolizerChannelGrayDialog() {; } bool Create(MyFrame * parent); virtual ~ RasterSymbolizerChannelGrayDialog() {; } void CreateControls(); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnCmdModeChanged(wxCommandEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); }; class ColorMapEntry { // // a class wrapping a ColorMap entry // private: double Value; wxString Color; ColorMapEntry *Prev; ColorMapEntry *Next; public: ColorMapEntry(double value, wxString & color) { Value = value; Color = color.MakeLower(); Prev = NULL; Next = NULL; } ~ColorMapEntry() {; } double GetValue() { return Value; } void SetColor(wxString & color) { Color = color; } wxString & GetColor() { return Color; } void SetPrev(ColorMapEntry * ptr) { Prev = ptr; } ColorMapEntry *GetPrev() { return Prev; } void SetNext(ColorMapEntry * ptr) { Next = ptr; } ColorMapEntry *GetNext() { return Next; } static bool IsValidColor(wxString & color); static void GetWxColor(wxString & color, wxColour & clr); static unsigned char ParseHex(unsigned char hi, unsigned char lo); }; class ColorMapCategorize { // // a class wrapping a ColorMap of the Categorize Type // private: wxString FirstColor; ColorMapEntry *First; ColorMapEntry *Last; public: ColorMapCategorize() { FirstColor = wxT("#000000"); First = NULL; Last = NULL; } ~ColorMapCategorize(); void SetFirstColor(wxString & color) { FirstColor = color; } wxString & GetFirstColor() { return FirstColor; } void Add(double value, wxString & color); void Remove(double value); ColorMapEntry *GetFirst() { return First; } }; class ColorMapInterpolate { // // a class wrapping a ColorMap of the Interpolate Type // private: ColorMapEntry * First; ColorMapEntry *Last; public: ColorMapInterpolate() { First = NULL; Last = NULL; } ~ColorMapInterpolate(); void Add(double value, wxString & color); void Remove(double value); ColorMapEntry *GetFirst() { return First; } }; class RasterSymbolizerCategorizeDialog:public wxDialog { // // a dialog for creating an SLD/SE RasterSymbolizer // of the ColorMap Categorize type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; double Opacity; ColorMapCategorize Map; bool ShadedRelief; double ReliefFactor; wxGrid *GridCtrl; int CurrentRow; double CurrentValue; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; bool RetrieveParams(); char *DoCreateSymbolizerXML(); char *DoCreateCoverageXML(); void RefreshGrid(); public: RasterSymbolizerCategorizeDialog() {; } bool Create(MyFrame * parent); virtual ~ RasterSymbolizerCategorizeDialog() {; } void CreateControls(); void OnCmdAddEntry(wxCommandEvent & event); void OnCmdRemoveEntry(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnShadedChanged(wxCommandEvent & event); void OnCmdColorPicker(wxCommandEvent & event); void OnCmdAdd(wxCommandEvent & event); void OnCmdRemove(wxCommandEvent & event); void OnRightClick(wxGridEvent & event); void OnCellSelected(wxGridEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); }; class RasterSymbolizerInterpolateDialog:public wxDialog { // // a dialog for creating an SLD/SE RasterSymbolizer // of the ColorMap Interpolate type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; double Opacity; wxString Fallback; ColorMapInterpolate Map; bool ShadedRelief; double ReliefFactor; wxGrid *GridCtrl; int CurrentRow; double CurrentValue; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; bool RetrieveParams(); char *DoCreateSymbolizerXML(); char *DoCreateCoverageXML(); void RefreshGrid(); public: RasterSymbolizerInterpolateDialog() {; } bool Create(MyFrame * parent); virtual ~ RasterSymbolizerInterpolateDialog() {; } void CreateControls(); void OnCmdAddEntry(wxCommandEvent & event); void OnCmdRemoveEntry(wxCommandEvent & event); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnShadedChanged(wxCommandEvent & event); void OnCmdColorPicker(wxCommandEvent & event); void OnCmdAdd(wxCommandEvent & event); void OnCmdRemove(wxCommandEvent & event); void OnRightClick(wxGridEvent & event); void OnCellSelected(wxGridEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); }; class RasterSymbolizerShadedReliefDialog:public wxDialog { // // a dialog for creating an SLD/SE RasterSymbolizer // of the ChannelSelection (Gray) type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; double Opacity; double ReliefFactor; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; bool RetrieveParams(); char *DoCreateSymbolizerXML(); char *DoCreateCoverageXML(); public: RasterSymbolizerShadedReliefDialog() {; } bool Create(MyFrame * parent); virtual ~ RasterSymbolizerShadedReliefDialog() {; } void CreateControls(); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); }; class RasterSymbolizerMonochromeDialog:public wxDialog { // // a dialog for creating an SLD/SE RasterSymbolizer // of the Recolored Monochrome type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; double Opacity; wxString Color; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; bool RetrieveParams(); char *DoCreateSymbolizerXML(); char *DoCreateCoverageXML(); public: RasterSymbolizerMonochromeDialog() {; } bool Create(MyFrame * parent); virtual ~ RasterSymbolizerMonochromeDialog() {; } void CreateControls(); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); void OnCmdColorPicker(wxCommandEvent & event); void OnCmdColorChanged(wxCommandEvent & event); }; class MyGraphicCellRenderer:public wxGridCellRenderer { // a Grid CellRenderer supporting a Graphic Image private: wxImage * Graphic; public: virtual wxGridCellRenderer * Clone() const { return new MyGraphicCellRenderer; } virtual void Draw(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc, const wxRect & rect, int row, int col, bool isSelected); virtual wxSize GetBestSize(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc, int row, int col) { return wxSize(48, 24); } void SetGraphic(wxImage * graphic) { Graphic = graphic; } }; class MyFontCellRenderer:public wxGridCellRenderer { // a Grid CellRenderer supporting a Text Font private: wxImage * FontExample; public: virtual wxGridCellRenderer * Clone() const { return new MyFontCellRenderer; } virtual void Draw(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc, const wxRect & rect, int row, int col, bool isSelected); virtual wxSize GetBestSize(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc, int row, int col) { return wxSize(600, 22); } void SetFontExample(wxImage * example) { FontExample = example; } }; class SymbolizerPreview:public wxStaticBitmap { // // a window to show a Vector Symbolizer Preview // private: wxPropertySheetDialog * Parent; public: SymbolizerPreview(wxPropertySheetDialog * parent, wxWindow * panel, wxWindowID id, const wxBitmap & bmp, wxSize const &size); virtual ~ SymbolizerPreview() {; } }; class SimpleLineSymbolizerDialog:public wxPropertySheetDialog { // // a dialog for creating an SLD/SE LineSymbolizer // of the simple type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; unsigned char Uom; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; double PerpendicularOffset1; double Stroke1Opacity; bool HasGraphic1; wxString Stroke1Color; wxString Stroke1XLinkHref; wxString Stroke1MimeType; bool EnableStroke1Replacement; wxString Stroke1ColorReplacement; ExternalGraphicList *List; wxGrid *GridCtrl1; double Stroke1Width; int Stroke1LineJoin; int Stroke1LineCap; int Stroke1DashCount; double *Stroke1DashArray; double Stroke1DashOffset; bool EnableStroke2; double PerpendicularOffset2; double Stroke2Opacity; bool HasGraphic2; wxString Stroke2Color; wxString Stroke2XLinkHref; bool EnableStroke2Replacement; wxString Stroke2ColorReplacement; wxString Stroke2MimeType; wxGrid *GridCtrl2; double Stroke2Width; int Stroke2LineJoin; int Stroke2LineCap; int Stroke2DashCount; double *Stroke2DashArray; double Stroke2DashOffset; bool EnableStroke3; double PerpendicularOffset3; double Stroke3Opacity; bool HasGraphic3; wxString Stroke3Color; wxString Stroke3XLinkHref; bool EnableStroke3Replacement; wxString Stroke3ColorReplacement; wxString Stroke3MimeType; wxGrid *GridCtrl3; double Stroke3Width; int Stroke3LineJoin; int Stroke3LineCap; int Stroke3DashCount; double *Stroke3DashArray; double Stroke3DashOffset; unsigned char PreviewBackground; wxPanel *CreateMainPage(wxWindow * book); wxPanel *CreateStroke1Page(wxWindow * book); wxPanel *CreateStroke2Page(wxWindow * book); wxPanel *CreateStroke3Page(wxWindow * book); wxPanel *CreatePreviewPage(wxWindow * book); void CreateButtons(); bool FinalValidityCheck(); bool RetrieveMainPage(); bool RetrieveStroke1Page(bool check = true); bool RetrieveStroke2Page(bool check = true); bool RetrieveStroke3Page(bool check = true); bool RetrievePreviewPage(); void UpdateMainPage(); void UpdateStroke1Page(); void UpdateStroke2Page(); void UpdateStroke3Page(); void UpdatePreviewPage(); char *DoCreateSymbolizerXML(); char *DoCreateFeatureTypeXML(); void DrawPreview(int horz, int vert); bool DoParseDashArray(wxString & str, int which); void NormalizedDashArray(wxString & str, int which, char delimiter = ','); void PrepareLinestringPath(void *ctx, double perpendicular_offset); wxBitmap PreviewBackBitmap; public: SimpleLineSymbolizerDialog(); bool Create(MyFrame * parent); virtual ~ SimpleLineSymbolizerDialog(); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnPageChanging(wxNotebookEvent & event); void OnPageChanged(wxNotebookEvent & event); void OnCmdUomChanged(wxCommandEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); void OnCmdStroke1TypeChanged(wxCommandEvent & event); void OnCmdStroke2TypeChanged(wxCommandEvent & event); void OnCmdStroke3TypeChanged(wxCommandEvent & event); void OnCmdColor1Changed(wxCommandEvent & event); void OnCmdColor2Changed(wxCommandEvent & event); void OnCmdColor3Changed(wxCommandEvent & event); void OnCmdColor1Picker(wxCommandEvent & event); void OnCmdColor2Picker(wxCommandEvent & event); void OnCmdColor3Picker(wxCommandEvent & event); void OnCmdReplacement1Changed(wxCommandEvent & event); void OnCmdReplacement2Changed(wxCommandEvent & event); void OnCmdReplacement3Changed(wxCommandEvent & event); void OnCmdLineJoin1Changed(wxCommandEvent & event); void OnCmdLineJoin2Changed(wxCommandEvent & event); void OnCmdLineJoin3Changed(wxCommandEvent & event); void OnCmdLineCap1Changed(wxCommandEvent & event); void OnCmdLineCap2Changed(wxCommandEvent & event); void OnCmdLineCap3Changed(wxCommandEvent & event); void OnCmdStroke2Changed(wxCommandEvent & event); void OnCmdStroke3Changed(wxCommandEvent & event); void OnCmdStroke1EnableReplacementChanged(wxCommandEvent & event); void OnCmdStroke2EnableReplacementChanged(wxCommandEvent & event); void OnCmdStroke3EnableReplacementChanged(wxCommandEvent & event); void OnCmdBackgroundChanged(wxCommandEvent & event); }; class SimplePolygonSymbolizerDialog:public wxPropertySheetDialog { // // a dialog for creating an SLD/SE PolygonSymbolizer // of the simple type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; unsigned char Uom; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; double DisplacementX1; double DisplacementY1; double PerpendicularOffset1; bool EnableFill1; double Fill1Opacity; bool HasGraphicFill1; wxString Fill1Color; wxString Fill1XLinkHref; wxString Fill1MimeType; bool EnableFill1Replacement; wxString Fill1ColorReplacement; wxGrid *GridCtrl1; bool EnableStroke1; double Stroke1Opacity; bool HasGraphicStroke1; wxString Stroke1Color; wxString Stroke1XLinkHref; wxString Stroke1MimeType; bool EnableStroke1Replacement; wxString Stroke1ColorReplacement; ExternalGraphicList *List; wxGrid *GridCtrl2; double Stroke1Width; int Stroke1LineJoin; int Stroke1LineCap; int Stroke1DashCount; double *Stroke1DashArray; double Stroke1DashOffset; bool EnablePolygon2; double DisplacementX2; double DisplacementY2; double PerpendicularOffset2; bool EnableFill2; wxString Fill2MimeType; bool EnableFill2Replacement; wxString Fill2ColorReplacement; double Fill2Opacity; bool HasGraphicFill2; wxString Fill2Color; wxString Fill2XLinkHref; wxGrid *GridCtrl3; bool EnableStroke2; double Stroke2Opacity; bool HasGraphicStroke2; wxString Stroke2Color; wxString Stroke2XLinkHref; wxString Stroke2MimeType; bool EnableStroke2Replacement; wxString Stroke2ColorReplacement; wxGrid *GridCtrl4; double Stroke2Width; int Stroke2LineJoin; int Stroke2LineCap; int Stroke2DashCount; double *Stroke2DashArray; double Stroke2DashOffset; unsigned char PreviewBackground; wxPanel *CreateMainPage(wxWindow * book); wxPanel *CreateStroke1Page(wxWindow * book); wxPanel *CreateFill1Page(wxWindow * book); wxPanel *CreateStroke2Page(wxWindow * book); wxPanel *CreateFill2Page(wxWindow * book); wxPanel *CreatePreviewPage(wxWindow * book); void CreateButtons(); bool FinalValidityCheck(); bool RetrieveMainPage(); bool RetrieveStroke1Page(bool check = true); bool RetrieveFill1Page(bool check = true); bool RetrieveStroke2Page(bool check = true); bool RetrieveFill2Page(bool check = true); bool RetrievePreviewPage(); void UpdateMainPage(); void UpdateStroke1Page(); void UpdateFill1Page(); void UpdateStroke2Page(); void UpdateFill2Page(); void UpdatePreviewPage(); char *DoCreateSymbolizerXML(); char *DoCreateFeatureTypeXML(); void DrawPreview(int horz, int vert); bool DoParseDashArray(wxString & str, int which); void NormalizedDashArray(wxString & str, int which, char delimiter = ','); void PreparePolygonPath(void *ctx, double perpendicular_offset, double displacement_x, double displacement_y); wxBitmap PreviewBackBitmap; public: SimplePolygonSymbolizerDialog(); bool Create(MyFrame * parent); virtual ~ SimplePolygonSymbolizerDialog(); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnPageChanging(wxNotebookEvent & event); void OnPageChanged(wxNotebookEvent & event); void OnCmdUomChanged(wxCommandEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); void OnCmdStroke1TypeChanged(wxCommandEvent & event); void OnCmdFill1TypeChanged(wxCommandEvent & event); void OnCmdStroke2TypeChanged(wxCommandEvent & event); void OnCmdFill2TypeChanged(wxCommandEvent & event); void OnCmdColor1Changed(wxCommandEvent & event); void OnCmdColor2Changed(wxCommandEvent & event); void OnCmdColor3Changed(wxCommandEvent & event); void OnCmdColor4Changed(wxCommandEvent & event); void OnCmdColor1Picker(wxCommandEvent & event); void OnCmdColor2Picker(wxCommandEvent & event); void OnCmdColor3Picker(wxCommandEvent & event); void OnCmdColor4Picker(wxCommandEvent & event); void OnCmdFill1ReplacementChanged(wxCommandEvent & event); void OnCmdStroke1ReplacementChanged(wxCommandEvent & event); void OnCmdFill2ReplacementChanged(wxCommandEvent & event); void OnCmdStroke2ReplacementChanged(wxCommandEvent & event); void OnCmdLineJoin1Changed(wxCommandEvent & event); void OnCmdLineJoin2Changed(wxCommandEvent & event); void OnCmdLineCap1Changed(wxCommandEvent & event); void OnCmdLineCap2Changed(wxCommandEvent & event); void OnCmdStroke1Changed(wxCommandEvent & event); void OnCmdStroke2Changed(wxCommandEvent & event); void OnCmdFill1Changed(wxCommandEvent & event); void OnCmdFill2Changed(wxCommandEvent & event); void OnCmdFill1EnableReplacementChanged(wxCommandEvent & event); void OnCmdStroke1EnableReplacementChanged(wxCommandEvent & event); void OnCmdFill2EnableReplacementChanged(wxCommandEvent & event); void OnCmdStroke2EnableReplacementChanged(wxCommandEvent & event); void OnCmdPolygon2Changed(wxCommandEvent & event); void OnCmdBackgroundChanged(wxCommandEvent & event); }; class SimplePointSymbolizerDialog:public wxPropertySheetDialog { // // a dialog for creating an SLD/SE PointSymbolizer // of the simple type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; unsigned char Uom; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; double Opacity; double Size; double Rotation; double AnchorPointX; double AnchorPointY; double DisplacementX; double DisplacementY; bool OnlyRescaleSVG; bool HasGraphic; wxString XLinkHref; wxString MimeType; bool EnableColorReplacement; wxString ColorReplacement; int WellKnownMark; bool EnableFill; bool EnableStroke; wxString FillColor; wxString StrokeColor; double StrokeWidth; int StrokeLineJoin; int StrokeLineCap; int StrokeDashCount; double *StrokeDashArray; double StrokeDashOffset; ExternalGraphicList *List; wxGrid *GridCtrl; unsigned char PreviewBackground; bool Crosshair; wxPanel *CreateMainPage(wxWindow * book); wxPanel *CreatePositionPage(wxWindow * book); wxPanel *CreateGraphicPage(wxWindow * book); wxPanel *CreateMarkPage(wxWindow * book); wxPanel *CreatePreviewPage(wxWindow * book); void CreateButtons(); bool FinalValidityCheck(); bool RetrieveMainPage(); bool RetrievePositionPage(bool check = true); bool RetrieveGraphicPage(bool check = true); bool RetrieveMarkPage(bool check = true); bool RetrievePreviewPage(); void UpdateMainPage(); void UpdatePositionPage(); void UpdateGraphicPage(); void UpdateMarkPage(); void UpdatePreviewPage(); char *DoCreateSymbolizerXML(); char *DoCreateFeatureTypeXML(); void DrawPreview(int horz, int vert); bool DoParseDashArray(wxString & str); void NormalizedDashArray(wxString & str, char delimiter = ','); wxBitmap PreviewBackBitmap; public: SimplePointSymbolizerDialog(); bool Create(MyFrame * parent); virtual ~ SimplePointSymbolizerDialog(); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnPageChanging(wxNotebookEvent & event); void OnPageChanged(wxNotebookEvent & event); void OnCmdUomChanged(wxCommandEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); void OnCmdTypeChanged(wxCommandEvent & event); void OnCmdMarkChanged(wxCommandEvent & event); void OnCmdStrokeChanged(wxCommandEvent & event); void OnCmdFillChanged(wxCommandEvent & event); void OnCmdColorFillChanged(wxCommandEvent & event); void OnCmdColorStrokeChanged(wxCommandEvent & event); void OnCmdColorReplacementChanged(wxCommandEvent & event); void OnCmdColorFillPicker(wxCommandEvent & event); void OnCmdColorStrokePicker(wxCommandEvent & event); void OnCmdColorReplacementPicker(wxCommandEvent & event); void OnCmdOnlyRescaleSVG(wxCommandEvent & event); void OnCmdLineJoinChanged(wxCommandEvent & event); void OnCmdLineCapChanged(wxCommandEvent & event); void OnCmdEnableReplacementChanged(wxCommandEvent & event); void OnCmdBackgroundChanged(wxCommandEvent & event); void OnCmdCrosshairChanged(wxCommandEvent & event); }; class SimpleTextSymbolizerDialog:public wxPropertySheetDialog { // // a dialog for creating an SLD/SE TextSymbolizer // of the simple type // private: MyFrame * MainFrame; wxString Name; wxString Title; wxString Abstract; unsigned char Uom; bool MinScale; bool MaxScale; double MinScaleDenominator; double MaxScaleDenominator; wxString Label; wxString FontFamily; int FontStyle; int FontWeight; double FontSize; bool PointPlacement; double Rotation; double AnchorPointX; double AnchorPointY; double DisplacementX; double DisplacementY; double PerpendicularOffset; bool IsRepeated; double InitialGap; double Gap; bool IsAligned; bool GeneralizeLine; bool HasHalo; double HaloRadius; wxString HaloColor; double HaloOpacity; wxString FillColor; double FillOpacity; TextFontList *List; wxGrid *GridCtrl; unsigned char PreviewBackground; bool Crosshair; bool ReferenceLine; wxPanel *CreateMainPage(wxWindow * book); wxPanel *CreateFontPage(wxWindow * book); wxPanel *CreatePlacementPage(wxWindow * book); wxPanel *CreatePreviewPage(wxWindow * book); void CreateButtons(); bool FinalValidityCheck(); bool RetrieveMainPage(); bool RetrieveFontPage(bool check = true); bool RetrievePlacementPage(bool check = true); bool RetrievePreviewPage(); void UpdateMainPage(); void UpdateFontPage(); void UpdatePlacementPage(); void UpdatePreviewPage(); char *DoCreateSymbolizerXML(); char *DoCreateFeatureTypeXML(); gaiaGeomCollPtr PrepareLinestring(double perpendicular_offset); void PrepareLinestringPath(void *ctx, double perpendicular_offset); void GetLineCenterPoint(double perpendicular_offset, double *x, double *y); void CreateLineArray(double perpendicular_offset, int *points, double **x, double **y, int generalize); void DrawPreview(int horz, int vert); wxBitmap PreviewBackBitmap; public: SimpleTextSymbolizerDialog(); bool Create(MyFrame * parent); virtual ~ SimpleTextSymbolizerDialog(); void OnQuit(wxCommandEvent & event); void OnInsert(wxCommandEvent & event); void OnExport(wxCommandEvent & event); void OnCopy(wxCommandEvent & event); void OnPageChanging(wxNotebookEvent & event); void OnPageChanged(wxNotebookEvent & event); void OnCmdUomChanged(wxCommandEvent & event); void OnCmdScaleChanged(wxCommandEvent & event); void OnCmdTypeChanged(wxCommandEvent & event); void OnCmdColorFillChanged(wxCommandEvent & event); void OnCmdHaloEnableChanged(wxCommandEvent & event); void OnCmdColorHaloChanged(wxCommandEvent & event); void OnCmdColorFillPicker(wxCommandEvent & event); void OnCmdColorHaloPicker(wxCommandEvent & event); void OnCmdIsRepeatedChanged(wxCommandEvent & event); void OnCmdIsAlignedChanged(wxCommandEvent & event); void OnCmdGeneralizeLineChanged(wxCommandEvent & event); void OnCmdBackgroundChanged(wxCommandEvent & event); void OnCmdCrosshairChanged(wxCommandEvent & event); void OnCmdReferenceLineChanged(wxCommandEvent & event); }; class ComposerMainPage:public wxPanel { // // first page used by Query/View COMPOSER // private: class ComposerDialog * Parent; wxCheckBox *Table2Ctrl; wxComboBox *Table1NameCtrl; wxComboBox *Table2NameCtrl; wxTextCtrl *Table1AliasCtrl; wxTextCtrl *Table2AliasCtrl; wxListBox *Table1ColumnsCtrl; wxListBox *Table2ColumnsCtrl; wxRadioBox *JoinModeCtrl; wxCheckBox *Match2Ctrl; wxCheckBox *Match3Ctrl; wxComboBox *Match1Table1Ctrl; wxComboBox *Match1Table2Ctrl; wxComboBox *Match2Table1Ctrl; wxComboBox *Match2Table2Ctrl; wxComboBox *Match3Table1Ctrl; wxComboBox *Match3Table2Ctrl; public: ComposerMainPage() {; } bool Create(ComposerDialog * parent); virtual ~ ComposerMainPage() {; } void CreateControls(); void SelectGeometryColumn(wxString & column, bool table2); void InitializeComboColumns(wxComboBox * ctrl, bool table2); void InitializeListColumns(wxListBox * ctrl, bool table2); void OnTable2Enabled(wxCommandEvent & event); void OnTable1Selected(wxCommandEvent & event); void OnTable2Selected(wxCommandEvent & event); void OnColumns1Selected(wxCommandEvent & event); void OnColumns2Selected(wxCommandEvent & event); void OnTable1AliasChanged(wxCommandEvent & event); void OnTable2AliasChanged(wxCommandEvent & event); void OnJoinModeChanged(wxCommandEvent & event); void OnMatch2Enabled(wxCommandEvent & event); void OnMatch3Enabled(wxCommandEvent & event); void OnMatch1Table1Selected(wxCommandEvent & event); void OnMatch1Table2Selected(wxCommandEvent & event); void OnMatch2Table1Selected(wxCommandEvent & event); void OnMatch2Table2Selected(wxCommandEvent & event); void OnMatch3Table1Selected(wxCommandEvent & event); void OnMatch3Table2Selected(wxCommandEvent & event); }; class ComposerFilterPage:public wxPanel { // // second page used by Query/View COMPOSER // private: class ComposerDialog * Parent; wxCheckBox *Where1EnabledCtrl; wxRadioBox *Where1TableCtrl; wxComboBox *Where1ColumnCtrl; wxComboBox *Where1OperatorCtrl; wxTextCtrl *Where1ValueCtrl; wxCheckBox *Where2EnabledCtrl; wxRadioBox *Where2TableCtrl; wxComboBox *Where2ColumnCtrl; wxComboBox *Where2OperatorCtrl; wxTextCtrl *Where2ValueCtrl; wxCheckBox *Where3EnabledCtrl; wxRadioBox *Where3TableCtrl; wxComboBox *Where3ColumnCtrl; wxComboBox *Where3OperatorCtrl; wxTextCtrl *Where3ValueCtrl; wxRadioBox *Connector12Ctrl; wxRadioBox *Connector23Ctrl; public: ComposerFilterPage() {; } bool Create(ComposerDialog * parent); virtual ~ ComposerFilterPage() {; } void CreateControls(); void Table1Status(bool ok); void Table2Status(bool ok); void InitializeColumns(wxComboBox * ctrl, bool table2); void InitializeOperators(wxComboBox * ctrl); void OnWhere1Enabled(wxCommandEvent & event); void OnWhere1TableChanged(wxCommandEvent & event); void OnWhere1ColumnSelected(wxCommandEvent & event); void OnWhere1OperatorSelected(wxCommandEvent & event); void OnWhere1ValueChanged(wxCommandEvent & event); void OnWhere2Enabled(wxCommandEvent & event); void OnWhere2TableChanged(wxCommandEvent & event); void OnWhere2ColumnSelected(wxCommandEvent & event); void OnWhere2OperatorSelected(wxCommandEvent & event); void OnWhere2ValueChanged(wxCommandEvent & event); void OnWhere3Enabled(wxCommandEvent & event); void OnWhere3TableChanged(wxCommandEvent & event); void OnWhere3ColumnSelected(wxCommandEvent & event); void OnWhere3OperatorSelected(wxCommandEvent & event); void OnWhere3ValueChanged(wxCommandEvent & event); void OnConnector12Changed(wxCommandEvent & event); void OnConnector23Changed(wxCommandEvent & event); }; class ComposerOrderPage:public wxPanel { // // third page used by Query/View COMPOSER // private: class ComposerDialog * Parent; wxCheckBox *Order1EnabledCtrl; wxRadioBox *Order1TableCtrl; wxComboBox *Order1ColumnCtrl; wxRadioBox *Order1DescCtrl; wxCheckBox *Order2EnabledCtrl; wxRadioBox *Order2TableCtrl; wxComboBox *Order2ColumnCtrl; wxRadioBox *Order2DescCtrl; wxCheckBox *Order3EnabledCtrl; wxRadioBox *Order3TableCtrl; wxComboBox *Order3ColumnCtrl; wxRadioBox *Order3DescCtrl; wxCheckBox *Order4EnabledCtrl; wxRadioBox *Order4TableCtrl; wxComboBox *Order4ColumnCtrl; wxRadioBox *Order4DescCtrl; public: ComposerOrderPage() {; } bool Create(ComposerDialog * parent); virtual ~ ComposerOrderPage() {; } void CreateControls(); void Table1Status(bool ok); void Table2Status(bool ok); void InitializeColumns(wxComboBox * ctrl, bool table2); void OnOrder1Enabled(wxCommandEvent & event); void OnOrder1TableChanged(wxCommandEvent & event); void OnOrder1ColumnSelected(wxCommandEvent & event); void OnOrder1DescChanged(wxCommandEvent & event); void OnOrder2Enabled(wxCommandEvent & event); void OnOrder2TableChanged(wxCommandEvent & event); void OnOrder2ColumnSelected(wxCommandEvent & event); void OnOrder2DescChanged(wxCommandEvent & event); void OnOrder3Enabled(wxCommandEvent & event); void OnOrder3TableChanged(wxCommandEvent & event); void OnOrder3ColumnSelected(wxCommandEvent & event); void OnOrder3DescChanged(wxCommandEvent & event); void OnOrder4Enabled(wxCommandEvent & event); void OnOrder4TableChanged(wxCommandEvent & event); void OnOrder4ColumnSelected(wxCommandEvent & event); void OnOrder4DescChanged(wxCommandEvent & event); }; class ComposerViewPage:public wxPanel { // // fourth page used by Query/View COMPOSER // private: class ComposerDialog * Parent; wxRadioBox *ViewTypeCtrl; wxTextCtrl *ViewNameCtrl; wxRadioBox *GeomTableCtrl; wxComboBox *GeometryColumnCtrl; wxCheckBox *Writable1Ctrl; wxCheckBox *Writable2Ctrl; public: ComposerViewPage() {; } bool Create(ComposerDialog * parent); virtual ~ ComposerViewPage() {; } void CreateControls(); void Table1Status(bool ok); void Table2Status(bool ok); void OnGeomTableChanged(wxCommandEvent & event); void InitializeGeometries(bool table2); void OnGeometryColumnSelected(wxCommandEvent & event); void OnViewTypeChanged(wxCommandEvent & event); void OnViewNameChanged(wxCommandEvent & event); void OnWritable1Changed(wxCommandEvent & event); void OnWritable2Changed(wxCommandEvent & event); }; class ComposerDialog:public wxDialog { // // a dialog used by Query/View COMPOSER // private: MyFrame * MainFrame; AuxTableList TableList; AuxColumnList Column1List; AuxColumnList Column2List; bool IncompleteSql; bool Table2Enabled; wxString TableName1; wxString TableName2; wxString TableAlias1; wxString TableAlias2; bool LeftJoin; bool Match2Enabled; bool Match3Enabled; wxString Match1Table1; wxString Match1Table2; wxString Match2Table1; wxString Match2Table2; wxString Match3Table1; wxString Match3Table2; bool Where1Enabled; bool Where2Enabled; bool Where3Enabled; bool Where1Table2; bool Where2Table2; bool Where3Table2; bool AndOr12; bool AndOr23; wxString Where1Column; wxString Where2Column; wxString Where3Column; wxString Where1Operator; wxString Where2Operator; wxString Where3Operator; wxString Where1Value; wxString Where2Value; wxString Where3Value; bool Order1Enabled; bool Order2Enabled; bool Order3Enabled; bool Order4Enabled; bool Order1Table2; bool Order2Table2; bool Order3Table2; bool Order4Table2; wxString Order1Column; wxString Order2Column; wxString Order3Column; wxString Order4Column; bool Order1Desc; bool Order2Desc; bool Order3Desc; bool Order4Desc; bool PlainView; bool SpatialView; wxString ViewName; bool ViewGeomTable2; wxString GeometryColumn; bool Writable1; bool Writable2; wxString GeometryColumnAlias; wxString GeometryRowidAlias; wxString SqlSample; wxString SqlTriggerInsert; wxString SqlTriggerUpdate; wxString SqlTriggerDelete; wxTextCtrl *SqlCtrl; wxNotebook *TabCtrl; ComposerMainPage *Page1; ComposerFilterPage *Page2; ComposerOrderPage *Page3; ComposerViewPage *Page4; public: ComposerDialog() {; } bool Create(MyFrame * parent); virtual ~ ComposerDialog() {; } void CreateControls(); AuxTableList *GetTableList() { return &TableList; } void PopulateColumnList1() { Column1List.Populate(MainFrame->GetSqlite(), TableName1); } void PopulateColumnList2() { Column2List.Populate(MainFrame->GetSqlite(), TableName2); } AuxColumnList *GetColumn1List() { return &Column1List; } AuxColumnList *GetColumn2List() { return &Column2List; } void SetTable2Enabled(bool mode) { Table2Enabled = mode; } bool IsTable2Enabled() { return Table2Enabled; } void SetTableName1(wxString name) { TableName1 = name; } wxString & GetTableName1() { return TableName1; } void SetTableName2(wxString name) { TableName2 = name; } wxString & GetTableAlias2() { return TableAlias2; } void SetTableAlias1(wxString alias) { TableAlias1 = alias; } wxString & GetTableAlias1() { return TableAlias1; } void SetTableAlias2(wxString alias) { TableAlias2 = alias; } wxString & GetTableName2() { return TableName2; } void SetLeftJoin(bool mode) { LeftJoin = mode; } bool IsLeftJoin() { return LeftJoin; } void SetMatch2Enabled(bool mode) { Match2Enabled = mode; } bool IsMatch2Enabled() { return Match2Enabled; } void SetMatch3Enabled(bool mode) { Match3Enabled = mode; } bool IsMatch3Enabled() { return Match3Enabled; } void SetMatch1Table1(wxString name) { Match1Table1 = name; } wxString & GetMatch1Table1() { return Match1Table1; } void SetMatch1Table2(wxString name) { Match1Table2 = name; } wxString & GetMatch1Table2() { return Match1Table2; } void SetMatch2Table1(wxString name) { Match2Table1 = name; } wxString & GetMatch2Table1() { return Match2Table1; } void SetMatch2Table2(wxString name) { Match2Table2 = name; } wxString & GetMatch2Table2() { return Match2Table2; } void SetMatch3Table1(wxString name) { Match3Table1 = name; } wxString & GetMatch3Table1() { return Match3Table1; } void SetMatch3Table2(wxString name) { Match3Table2 = name; } wxString & GetMatch3Table2() { return Match3Table2; } void SetWhere1Enabled(bool mode) { Where1Enabled = mode; } bool IsWhere1Enabled() { return Where1Enabled; } void SetWhere2Enabled(bool mode) { Where2Enabled = mode; } bool IsWhere2Enabled() { return Where2Enabled; } void SetWhere3Enabled(bool mode) { Where3Enabled = mode; } bool IsWhere3Enabled() { return Where3Enabled; } void SetWhere1Table2(bool mode) { Where1Table2 = mode; } bool IsWhere1Table2() { return Where1Table2; } void SetWhere2Table2(bool mode) { Where2Table2 = mode; } bool IsWhere2Table2() { return Where2Table2; } void SetWhere3Table2(bool mode) { Where3Table2 = mode; } bool IsWhere3Table2() { return Where3Table2; } void SetAndOr12(bool mode) { AndOr12 = mode; } bool IsAndOr12() { return AndOr12; } void SetAndOr23(bool mode) { AndOr23 = mode; } bool IsAndOr23() { return AndOr23; } void SetWhere1Column(wxString name) { Where1Column = name; } wxString & GetWhere1Column() { return Where1Column; } void SetWhere2Column(wxString name) { Where2Column = name; } wxString & GetWhere2Column() { return Where2Column; } void SetWhere3Column(wxString name) { Where3Column = name; } wxString & GetWhere3Column() { return Where3Column; } void SetWhere1Operator(wxString name) { Where1Operator = name; } wxString & GetWhere1Operator() { return Where1Operator; } void SetWhere2Operator(wxString name) { Where2Operator = name; } wxString & GetWhere2Operator() { return Where2Operator; } void SetWhere3Operator(wxString name) { Where3Operator = name; } wxString & GetWhere3Operator() { return Where3Operator; } void SetWhere1Value(wxString name) { Where1Value = name; } wxString & GetWhere1Value() { return Where1Value; } void SetWhere2Value(wxString name) { Where2Value = name; } wxString & GetWhere2Value() { return Where2Value; } void SetWhere3Value(wxString name) { Where3Value = name; } wxString & GetWhere3Value() { return Where3Value; } void SetOrder1Enabled(bool mode) { Order1Enabled = mode; } bool IsOrder1Enabled() { return Order1Enabled; } void SetOrder2Enabled(bool mode) { Order2Enabled = mode; } bool IsOrder2Enabled() { return Order2Enabled; } void SetOrder3Enabled(bool mode) { Order3Enabled = mode; } bool IsOrder3Enabled() { return Order3Enabled; } void SetOrder4Enabled(bool mode) { Order4Enabled = mode; } bool IsOrder4Enabled() { return Order4Enabled; } void SetOrder1Table2(bool mode) { Order1Table2 = mode; } bool IsOrder1Table2() { return Order1Table2; } void SetOrder2Table2(bool mode) { Order2Table2 = mode; } bool IsOrder2Table2() { return Order2Table2; } void SetOrder3Table2(bool mode) { Order3Table2 = mode; } bool IsOrder3Table2() { return Order3Table2; } void SetOrder4Table2(bool mode) { Order4Table2 = mode; } bool IsOrder4Table2() { return Order4Table2; } void SetOrder1Column(wxString name) { Order1Column = name; } wxString & GetOrder1Column() { return Order1Column; } void SetOrder2Column(wxString name) { Order2Column = name; } wxString & GetOrder2Column() { return Order2Column; } void SetOrder3Column(wxString name) { Order3Column = name; } wxString & GetOrder3Column() { return Order3Column; } void SetOrder4Column(wxString name) { Order4Column = name; } wxString & GetOrder4Column() { return Order4Column; } void SetOrder1Desc(bool mode) { Order1Desc = mode; } bool IsOrder1Desc() { return Order1Desc; } void SetOrder2Desc(bool mode) { Order2Desc = mode; } bool IsOrder2Desc() { return Order2Desc; } void SetOrder3Desc(bool mode) { Order3Desc = mode; } bool IsOrder3Desc() { return Order3Desc; } void SetOrder4Desc(bool mode) { Order4Desc = mode; } bool IsOrder4Desc() { return Order4Desc; } void SetPlainView(bool mode) { PlainView = mode; } bool IsPlainView() { return PlainView; } void SetSpatialView(bool mode) { SpatialView = mode; } bool IsSpatialView() { return SpatialView; } void SetViewName(wxString name) { ViewName = name; } wxString & GetViewName() { return ViewName; } void SetViewGeomTable2(bool mode) { ViewGeomTable2 = mode; } bool IsViewGeomTable2() { return ViewGeomTable2; } void SetGeometryColumn(wxString name) { GeometryColumn = name; } wxString & GetGeometryColumn() { return GeometryColumn; } void SetWritable1(bool value) { Writable1 = value; } void SetWritable2(bool value) { Writable2 = value; } bool IsWritable1() { return Writable1; } bool IsWritable2() { return Writable2; } bool IsDuplicateAlias(wxString & alias); void SetAliases(); wxString & GetGeometryColumnAlias() { return GeometryColumnAlias; } wxString & GetGeometryRowidAlias() { return GeometryRowidAlias; } wxString & GetSqlSample() { return SqlSample; } wxString & GetSqlTriggerInsert() { return SqlTriggerInsert; } wxString & GetSqlTriggerUpdate() { return SqlTriggerUpdate; } wxString & GetSqlTriggerDelete() { return SqlTriggerDelete; } wxNotebook *GetTabCtrl() { return TabCtrl; } void Table1Status(bool ok); void Table2Status(bool ok); bool SqlCleanString(wxString & dirty, wxString & clean); void SqlCleanList(wxString & list, wxString & clean, int *style, int *start, int *stop, int *next, int base); void SelectGeometryColumn(); void UpdateSqlSample(); void PrepareSqlTriggers(); bool GetCurrentlySelectedTable(wxString & table_name) { return MainFrame->GetCurrentlySelectedTable(table_name); } void OnOk(wxCommandEvent & event); }; class GeomColumn { // // a class representing a Geometry Column // private: wxString GeometryName; wxString GeometryType; wxString CoordDims; int Srid; bool RTree; bool MbrCache; bool NotNull; GeomColumn *Next; public: GeomColumn(wxString & name, wxString & type, wxString & dims, int srid, int idx); ~GeomColumn() {; } wxString & GetGeometryName() { return GeometryName; } wxString & GetGeometryType() { return GeometryType; } wxString & GetCoordDims() { return CoordDims; } int GetSrid() { return Srid; } bool IsRTree() { return RTree; } bool IsMbrCache() { return MbrCache; } void SetNotNull() { NotNull = true; } bool IsNotNull() { return NotNull; } void SetNext(GeomColumn * next) { Next = next; } GeomColumn *GetNext() { return Next; } }; class GeomColsList { // // a class representing a Geometry Columns list // private: GeomColumn * First; GeomColumn *Last; public: GeomColsList(); ~GeomColsList(); void Add(wxString & name, wxString & type, wxString & dims, int srid, int idx); GeomColumn *GetFirst() { return First; } void SetNotNull(wxString & geom); }; class IndexColumn { // // a class representing an Index Column // private: wxString ColumnName; bool Valid; IndexColumn *Next; public: IndexColumn(wxString & name); ~IndexColumn() {; } wxString & GetColumnName() { return ColumnName; } bool IsValid() { return Valid; } void Invalidate() { Valid = false; } void SetNext(IndexColumn * next) { Next = next; } IndexColumn *GetNext() { return Next; } }; class TblIndex { // // a class representing a Table Index // private: wxString IndexName; bool Unique; bool Valid; IndexColumn *First; IndexColumn *Last; TblIndex *Next; public: TblIndex(wxString & name, bool unique); ~TblIndex(); void Add(wxString & column); wxString & GetIndexName() { return IndexName; } bool IsUnique() { return Unique; } void Invalidate(wxString & colName); bool IsValid() { return Valid; } void SetNext(TblIndex * next) { Next = next; } TblIndex *GetNext() { return Next; } IndexColumn *GetFirst() { return First; } }; class TblIndexList { // // a class representing a Table Index list // private: TblIndex * First; TblIndex *Last; public: TblIndexList(); ~TblIndexList(); void Add(wxString & name, bool unique); TblIndex *GetFirst() { return First; } void Invalidate(wxString & colName); }; class ResultSetShapefileGeometry { // // a class wrapping a (possible) Shapefile Geometry // private: int Type; int Dims; int Srid; int Count; ResultSetShapefileGeometry *Next; public: ResultSetShapefileGeometry(int type, int dims, int srid) { Type = type; Dims = dims; Srid = srid; Count = 1; Next = NULL; } ~ResultSetShapefileGeometry() {; } int GetType() { return Type; } int GetDims() { return Dims; } int GetSrid() { return Srid; } int GetCount() { return Count; } void Update() { Count++; } void SetNext(ResultSetShapefileGeometry * next) { Next = next; } ResultSetShapefileGeometry *GetNext() { return Next; } }; class ResultSetShapefileColumn { // // a class wrapping a (possible) Shapefile column // private: char *Name; int NullCount; int TextCount; int MaxTextLen; int IntCount; int DoubleCount; int BlobCount; int DbfType; ResultSetShapefileGeometry *First; ResultSetShapefileGeometry *Last; public: ResultSetShapefileColumn(); ~ResultSetShapefileColumn(); void SetName(const char *name); char *GetName() { return Name; } void UpdateNull() { NullCount++; } void UpdateText(int len) { TextCount++; if (len > MaxTextLen) MaxTextLen = len; } void UpdateInteger() { IntCount++; } void UpdateDouble() { DoubleCount++; } void UpdateBlob() { BlobCount++; } void UpdateGeometry(gaiaGeomCollPtr geom); bool Validate(); int GetDbfType() { return DbfType; } int GetMaxTextLen() { return MaxTextLen; } ResultSetShapefileGeometry *GetFirst() { return First; } }; class ResultSetShapefileAnalyzer { // // a class representing a (possible) Shapefile // corresponding to some generic ResultSet // private: int ColumnCount; int GeometryColumn; ResultSetShapefileColumn *Columns; public: ResultSetShapefileAnalyzer() { ColumnCount = 0; GeometryColumn = -1; Columns = NULL; } ~ResultSetShapefileAnalyzer(); bool Validate(); void SetColumnName(int column, const char *name); void Init(int count); int GetColumnCount() { return ColumnCount; } int GetGeometryColumn() { return GeometryColumn; } void UpdateNull(int column); void UpdateText(int column, int len); void UpdateInteger(int column); void UpdateDouble(int column); void UpdateGeometry(int column, gaiaGeomCollPtr geom); void UpdateBlob(int column); ResultSetShapefileColumn *GetColumn(int column); ResultSetShapefileColumn *GetGeometry(); }; class PostGISColumn { // // a class wrapping a PostGIS column // private: wxString ColumnName; // the column name bool PrimaryKey; // Primary Key column bool Autoincrement; // Autoincrement Primary Key bool Nullable; // IS NULL int Null; int Boolean; int Int8; int UInt8; int Int16; int UInt16; int Int32; int UInt32; int Int64; int Double; int Text; int MaxTextLen; int Date; int DateTime; int Blob; int Point; int MultiPoint; int LineString; int MultiLineString; int Polygon; int MultiPolygon; int GeometryCollection; int Srid1; int Srid2; int CoordDims1; int CoordDims2; int DataType; public: PostGISColumn(); ~PostGISColumn() {; } void SetName(wxString & name) { ColumnName = name; } wxString & GetName() { return ColumnName; } void SetNotNull() { Nullable = false; } bool IsNotNull() { if (Nullable == true) return false; else return true; } void SetPrimaryKey() { PrimaryKey = true; } bool IsPrimaryKey() { return PrimaryKey; } void IncrNull() { Null++; } void IncrBoolean() { Boolean++; } void IncrInt8() { Int8++; } void IncrUInt8() { UInt8++; } void IncrInt16() { Int16++; } void IncrUInt16() { UInt16++; } void IncrInt32() { Int32++; } void IncrUInt32() { UInt32++; } void IncrInt64() { Int64++; } void IncrDouble() { Double++; } void IncrText(int len) { Text++; if (len > MaxTextLen) MaxTextLen = len; } void IncrDate() { Date++; } void IncrDateTime() { DateTime++; } void IncrBlob() { Blob++; } void IncrPoint(int srid, int coord_dims); void IncrMultiPoint(int srid, int coord_dims); void IncrLineString(int srid, int coord_dims); void IncrMultiLineString(int srid, int coord_dims); void IncrPolygon(int srid, int coord_dims); void IncrMultiPolygon(int srid, int coord_dims); void IncrGeometryCollection(int srid, int coord_dims); bool IsDate(const char *txt); bool IsDateTime(const char *txt); int GetMaxTextLen() { return MaxTextLen; } bool IsGeometry(); int GetDataType() { return DataType; } void Prepare(); int GetSrid() { return Srid1; } int GetCoordDims() { return CoordDims1; } }; class PostGISIndexField { // // a class wrapping a PostGIS Index field private: int SeqNo; PostGISColumn *ColumnRef; PostGISIndexField *Next; public: PostGISIndexField(int seq, PostGISColumn * col) { SeqNo = seq; ColumnRef = col; Next = NULL; } ~PostGISIndexField() {; } int GetSeqNo() { return SeqNo; } PostGISColumn *GetColumnRef() { return ColumnRef; } void SetNext(PostGISIndexField * next) { Next = next; } PostGISIndexField *GetNext() { return Next; } }; class PostGISIndex { // // a class wrapping a PostGIS Index private: bool PrimaryKey; bool Unique; wxString Name; PostGISIndexField *First; PostGISIndexField *Last; PostGISIndex *Next; public: PostGISIndex(wxString & name) { Name = name; PrimaryKey = true; Unique = true; First = NULL; Last = NULL; Next = NULL; } PostGISIndex(wxString & name, bool unique) { Name = name; PrimaryKey = false; Unique = unique; First = NULL; Last = NULL; Next = NULL; } ~PostGISIndex(); wxString & GetName() { return Name; } bool IsPrimaryKey() { return PrimaryKey; } bool IsUnique() { return Unique; } void AddField(int seq, PostGISColumn * column); PostGISIndexField *GetFirst() { return First; } void SetNext(PostGISIndex * next) { Next = next; } PostGISIndex *GetNext() { return Next; } }; class PostGISHelper { // // a class wrapping a PostGIS table // private: wxString DumbName; int Count; // how many columns PostGISColumn *Columns; // array of columns PostGISIndex *FirstIdx; PostGISIndex *LastIdx; bool Autoincrement; public: PostGISHelper(); ~PostGISHelper(); void Alloc(int count); int GetCount() { return Count; } PostGISIndex *AddIndex(wxString & name, bool unique); PostGISIndex *AddIndex(wxString & name); PostGISColumn *Find(wxString & name); PostGISIndex *GetFirstIndex() { return FirstIdx; } void ExpandIndexFields(MyFrame * mother, PostGISIndex * index, wxString & name); bool IsSingleFieldPrimaryKey(); bool IsAutoincrement() { return Autoincrement; } void SetName(int pos, const char *name); void Eval(int pos, sqlite3_int64 val); void Eval(int pos, double val); void Eval(int pos, const char *val); void Eval(int pos, gaiaGeomCollPtr geom); void EvalBlob(int pos); void Eval(int pos); wxString & GetName(int pos, bool to_lower); bool IsGeometry(int pos); int GetDataType(int pos); void GetDataType(int pos, char *definition); int GetSrid(int pos); int GetCoordDims(int pos); void SetColumn(wxString & name, bool isNull, bool pKey); void GetKeys(MyFrame * mother, wxString & table); void Prepare(); void OutputBooleanValue(FILE * out, sqlite3_int64 value); void OutputValue(FILE * out, sqlite3_int64 value); void OutputValue(FILE * out, double value); void OutputValue(FILE * out, const char *value); void OutputValue(FILE * out, gaiaGeomCollPtr value); void OutputValue(FILE * out, const unsigned char *value, int len); enum { // data types constants DATA_TYPE_UNDEFINED = 0, DATA_TYPE_BOOLEAN, DATA_TYPE_INT8, DATA_TYPE_UINT8, DATA_TYPE_INT16, DATA_TYPE_UINT16, DATA_TYPE_INT32, DATA_TYPE_UINT32, DATA_TYPE_INT64, DATA_TYPE_UINT64, DATA_TYPE_DOUBLE, DATA_TYPE_TEXT, DATA_TYPE_DATE, DATA_TYPE_DATETIME, DATA_TYPE_BLOB, DATA_TYPE_POINT, DATA_TYPE_LINESTRING, DATA_TYPE_POLYGON, DATA_TYPE_MULTIPOINT, DATA_TYPE_MULTILINESTRING, DATA_TYPE_MULTIPOLYGON, DATA_TYPE_GEOMETRYCOLLECTION, DATA_TYPE_GEOMETRY }; }; spatialite_gui-2.0.0-devel/TextCsv.cpp0000664000175000017500000002123412544026240014641 00000000000000/* / TextCsv.cpp / methods related to CSV/TXT loading / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #if defined(_WIN32) && !defined(__MINGW32__) #define strcasecmp _stricmp #endif static void text_clean_integer(char *value) { /* cleaning an integer value */ char last; char buffer[35536]; int len = strlen(value); last = value[len - 1]; if (last == '-' || last == '+') { /* trailing sign; transforming into a leading sign */ *buffer = last; strcpy(buffer + 1, value); buffer[len - 1] = '\0'; strcpy(value, buffer); } } static void text_clean_double(char *value) { /* cleaning an integer value */ char *p; char last; char buffer[35536]; int len = strlen(value); last = value[len - 1]; if (last == '-' || last == '+') { /* trailing sign; transforming into a leading sign */ *buffer = last; strcpy(buffer + 1, value); buffer[len - 1] = '\0'; strcpy(value, buffer); } p = value; while (*p != '\0') { /* transforming COMMAs into POINTs */ if (*p == ',') *p = '.'; p++; } } void MyFrame::LoadText(wxString & path, wxString & table, wxString & charset, bool first_titles, const char decimal_separator, const char separator, const char text_separator) { // // loading a CSV/TXT as a new DB table // gaiaTextReaderPtr text = NULL; int seed; int dup; int idup; char dummy[65536]; char dummyName[4096]; char **col_name = NULL; int i; char sql[65536]; int len; int ret; int rows = 0; char *errMsg = NULL; bool sqlError = false; char xname[1024]; int current_row; wxString msg; char buf[4096]; int type; const char *value; // // performing some checks before starting // if (TableAlreadyExists(table) == true) { wxMessageBox(wxT("a table named '") + table + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } text = gaiaTextReaderAlloc(path.ToUTF8(), separator, text_separator, decimal_separator, first_titles, charset.ToUTF8()); if (text) { if (gaiaTextReaderParse(text) == 0) { gaiaTextReaderDestroy(text); text = NULL; } } if (!text) return; ::wxBeginBusyCursor(); // // checking for duplicate / illegal column names and antialising them // col_name = (char **) malloc(sizeof(char *) * text->max_fields); seed = 0; for (i = 0; i < text->max_fields; i++) { strcpy(dummyName, text->columns[i].name); dup = 0; for (idup = 0; idup < i; idup++) { if (strcasecmp(dummyName, *(col_name + idup)) == 0) dup = 1; } if (strcasecmp(dummyName, "PK_UID") == 0) dup = 1; if (dup) sprintf(dummyName, "DUPCOL_%d", seed++); len = strlen(dummyName); *(col_name + i) = (char *) malloc(len + 1); strcpy(*(col_name + i), dummyName); } // // starting a transaction // ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("load CSV/TXT error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); sqlError = true; goto clean_up; } // // creating the Table // strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sprintf(sql, "CREATE TABLE %s", xname); strcat(sql, " (\nPK_UID INTEGER PRIMARY KEY AUTOINCREMENT"); for (i = 0; i < text->max_fields; i++) { strcat(sql, ",\n"); strcpy(xname, *(col_name + i)); DoubleQuotedSql(xname); strcat(sql, xname); if (text->columns[i].type == VRTTXT_INTEGER) strcat(sql, " INTEGER"); else if (text->columns[i].type == VRTTXT_DOUBLE) strcat(sql, " DOUBLE"); else strcat(sql, " TEXT"); } strcat(sql, ")"); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); sqlError = true; goto clean_up; } current_row = 0; while (current_row < text->num_rows) { // // inserting rows from CSV/TXT // if (!gaiaTextReaderGetRow(text, current_row)) break; strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sprintf(sql, "INSERT INTO %s (\nPK_UID", xname); for (i = 0; i < text->max_fields; i++) { // columns corresponding to some CSV/TXT column strcat(sql, ","); strcpy(xname, *(col_name + i)); DoubleQuotedSql(xname); strcat(sql, xname); } strcat(sql, ")\nVALUES ("); sprintf(dummy, "%d", current_row); strcat(sql, dummy); for (i = 0; i < text->max_fields; i++) { // column values strcat(sql, ","); if (!gaiaTextReaderFetchField(text, i, &type, &value)) strcat(sql, "NULL"); else { if (type == VRTTXT_INTEGER) { strcpy(buf, value); text_clean_integer(buf); #if defined(_WIN32) || defined(__MINGW32__) /* CAVEAT - M$ runtime has non-standard functions for 64 bits */ sprintf(dummy, "%I64d", _atoi64(buf)); #else sprintf(dummy, "%lld", atoll(buf)); #endif strcat(sql, dummy); } else if (type == VRTTXT_DOUBLE) { strcpy(buf, value); text_clean_double(buf); sprintf(dummy, "%1.6f", atof(buf)); strcat(sql, dummy); } else if (type == VRTTXT_TEXT) { void *ptr = (void *) value; strcpy(dummy, value); free(ptr); CleanSqlString(dummy); strcat(sql, "'"); strcat(sql, dummy); strcat(sql, "'"); } else strcat(sql, "NULL"); } } strcat(sql, ")"); ret = sqlite3_exec(SqliteHandle, sql, NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); sqlError = true; goto clean_up; } rows++; current_row++; } clean_up: if (col_name) { // releasing memory allocation for column names for (i = 0; i < text->max_fields; i++) free(*(col_name + i)); free(col_name); } gaiaTextReaderDestroy(text); if (sqlError == true) { // some error occurred - ROLLBACK ret = sqlite3_exec(SqliteHandle, "ROLLBACK", NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } ::wxEndBusyCursor(); msg = wxT("CSV/TXT not loaded\n\n\na ROLLBACK was automatically performed"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } else { // ok - confirming pending transaction - COMMIT ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("load text error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } ::wxEndBusyCursor(); sprintf(dummy, "CSV/TXT loaded\n\n%d inserted rows", rows); msg = wxString::FromUTF8(dummy); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); } } spatialite_gui-2.0.0-devel/m4/0000775000175000017500000000000012544030130013124 500000000000000spatialite_gui-2.0.0-devel/m4/lt~obsolete.m40000664000175000017500000001375612543275035015712 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) spatialite_gui-2.0.0-devel/m4/ltsugar.m40000664000175000017500000001042412543275035015006 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) spatialite_gui-2.0.0-devel/m4/libtool.m40000664000175000017500000104515512543275035015003 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS spatialite_gui-2.0.0-devel/m4/ltoptions.m40000664000175000017500000002725612543275035015373 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) spatialite_gui-2.0.0-devel/m4/ltversion.m40000664000175000017500000000125612543275035015355 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) spatialite_gui-2.0.0-devel/config.h.in0000664000175000017500000001463612543275035014577 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Should be defined in order to enable LIBXML2 support. */ #undef ENABLE_LIBXML2 /* Define to 1 if you have the header file. */ #undef HAVE_CHARLS_INTERFACE_H /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_CACHE_HIT /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_CACHE_MISS /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_CACHE_USED /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_CACHE_WRITE /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_SCHEMA_USED /* depending on SQLite library version. */ #undef HAVE_DECL_SQLITE_DBSTATUS_STMT_USED /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fdatasync' function. */ #undef HAVE_FDATASYNC /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the header file. */ #undef HAVE_GEOS_C_H /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `CharLS' library (-lCharLS). */ #undef HAVE_LIBCHARLS /* Define to 1 if you have the `openjp2' library (-lopenjp2). */ #undef HAVE_LIBOPENJP2 /* Define to 1 if you have the `proj' library (-lproj). */ #undef HAVE_LIBPROJ /* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ #undef HAVE_LIBSQLITE3 /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if `lstat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_LSTAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_OPENJPEG_2_0_OPENJPEG_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENJPEG_2_1_OPENJPEG_H /* Define to 1 if you have the header file. */ #undef HAVE_SQLITE3EXT_H /* Define to 1 if you have the header file. */ #undef HAVE_SQLITE3_H /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Should be defined in order to disable CharLS support. */ #undef OMIT_CHARLS /* Should be defined in order to disable FREEXL support. */ #undef OMIT_FREEXL /* Should be defined in order to disable OpenJpeg support. */ #undef OMIT_OPENJPEG /* Should be defined in order to disable RasterLite2 extended support. */ #undef OMIT_RL2EXTRA /* Should be defined in order to disable WebP support. */ #undef OMIT_WEBP /* testing for OpenJpeg 2.1 */ #undef OPENJPEG_2_1 /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* must be defined when using libspatialite-amalgamation */ #undef SPATIALITE_AMALGAMATION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `long int' if does not define. */ #undef off_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #undef volatile spatialite_gui-2.0.0-devel/configure.ac0000664000175000017500000003420312544013464015027 00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT(spatialite_gui, 2.0.0-devel, a.furieri@lqt.it) AC_LANG(C) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) AM_MAINTAINER_MODE AM_CONFIG_HEADER(config.h) # supporting SPATIALITE_AMALGAMATION AH_TEMPLATE([SPATIALITE_AMALGAMATION], [must be defined when using libspatialite-amalgamation]) AH_TEMPLATE([OMIT_FREEXL], [Should be defined in order to disable FREEXL support.]) AH_TEMPLATE([ENABLE_LIBXML2], [Should be defined in order to enable LIBXML2 support.]) AH_TEMPLATE([OMIT_WEBP], [Should be defined in order to disable WebP support.]) AH_TEMPLATE([OPENJPEG_2_1], [testing for OpenJpeg 2.1]) AH_TEMPLATE([OMIT_OPENJPEG], [Should be defined in order to disable OpenJpeg support.]) AH_TEMPLATE([OMIT_CHARLS], [Should be defined in order to disable CharLS support.]) AH_TEMPLATE([OMIT_RL2EXTRA], [Should be defined in order to disable RasterLite2 extended support.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_CACHE_USED], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_CACHE_HIT], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_CACHE_MISS], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_CACHE_WRITE], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_SCHEMA_USED], [depending on SQLite library version.]) AH_TEMPLATE([HAVE_DECL_SQLITE_DBSTATUS_STMT_USED], [depending on SQLite library version.]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_ARG_WITH([wxconfig], [AS_HELP_STRING([--with-wxconfig=FILE], [specify an alternative wx-config file])], [WXCONFIG="$withval"], [WXCONFIG=""]) if test "x$WXCONFIG" = "x"; then # WXCONFIG was not specified, so search within the current path AC_PATH_PROG([WXCONFIG], [wx-config]) # If we couldn't find wx-config, display an error if test "x$WXCONFIG" = "x"; then AC_MSG_ERROR([could not find wx-config within the current path. You may need to try re-running configure with a --with-wxconfig parameter.]) fi else # WXCONFIG was specified; display a message to the user if test "x$WXCONFIG" = "xyes"; then AC_MSG_ERROR([you must specify a parameter to --with-wxconfig, e.g. --with-wxconfig=/path/to/wx-config]) else if test -f $WXCONFIG; then AC_MSG_RESULT([Using user-specified wx-config file: $WXCONFIG]) else AC_MSG_ERROR([the user-specified wx-config file $WXCONFIG does not exist]) fi fi fi CXXFLAGS=`$WXCONFIG --cxxflags` AM_CXXFLAGS=`$WXCONFIG --cxxflags` WX_LIBS=`$WXCONFIG --libs std,aui` AC_SUBST(WX_LIBS) # Checks for header files. AC_CHECK_HEADERS(stdlib.h,, [AC_MSG_ERROR([cannot find stdlib.h, bailing out])]) AC_CHECK_HEADERS(stdio.h,, [AC_MSG_ERROR([cannot find stdio.h, bailing out])]) AC_CHECK_HEADERS(string.h,, [AC_MSG_ERROR([cannot find string.h, bailing out])]) AC_CHECK_HEADERS(memory.h,, [AC_MSG_ERROR([cannot find memory.h, bailing out])]) AC_CHECK_HEADERS(math.h,, [AC_MSG_ERROR([cannot find math.h, bailing out])]) AC_CHECK_HEADERS(float.h,, [AC_MSG_ERROR([cannot find float.h, bailing out])]) AC_CHECK_HEADERS(fcntl.h,, [AC_MSG_ERROR([cannot find fcntl.h, bailing out])]) AC_CHECK_HEADERS(inttypes.h,, [AC_MSG_ERROR([cannot find inttypes.h, bailing out])]) AC_CHECK_HEADERS(stddef.h,, [AC_MSG_ERROR([cannot find stddef.h, bailing out])]) AC_CHECK_HEADERS(stdint.h,, [AC_MSG_ERROR([cannot find stdint.h, bailing out])]) AC_CHECK_HEADERS(sys/time.h,, [AC_MSG_ERROR([cannot find sys/time.h, bailing out])]) AC_CHECK_HEADERS(unistd.h,, [AC_MSG_ERROR([cannot find unistd.h, bailing out])]) AC_CHECK_HEADERS(sqlite3.h,, [AC_MSG_ERROR([cannot find sqlite3.h, bailing out])]) AC_CHECK_HEADERS(sqlite3ext.h,, [AC_MSG_ERROR([cannot find sqlite3ext.h, bailing out])]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_C_VOLATILE # Checks for library functions. AC_FUNC_LSTAT AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MEMCMP AC_FUNC_STAT AC_FUNC_STRFTIME AC_CHECK_FUNCS([memset sqrt strcasecmp strerror strncasecmp strstr fdatasync ftruncate getcwd gettimeofday localtime_r memmove strerror]) # Checks for installed libraries AC_CHECK_LIB(sqlite3,sqlite3_prepare_v2,,AC_MSG_ERROR(['libsqlite3' is required but it doesn't seem to be installed on this system.]),-lm) AC_CHECK_LIB(proj,pj_init_plus,,AC_MSG_ERROR(['libproj' is required but it doesn't seem to be installed on this system.]),-lm) #----------------------------------------------------------------------- # --with-geosconfig # AC_ARG_WITH([geosconfig], [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], [GEOSCONFIG="$withval"], [GEOSCONFIG=""]) if test "x$GEOSCONFIG" = "x"; then # GEOSCONFIG was not specified, so search within the current path AC_PATH_PROG([GEOSCONFIG], [geos-config]) # If we couldn't find geos-config, display an error if test "x$GEOSCONFIG" = "x"; then AC_MSG_ERROR([could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter.]) fi else # GEOSCONFIG was specified; display a message to the user if test "x$GEOSCONFIG" = "xyes"; then AC_MSG_ERROR([you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config]) else if test -f $GEOSCONFIG; then AC_MSG_RESULT([Using user-specified geos-config file: $GEOSCONFIG]) else AC_MSG_ERROR([the user-specified geos-config file $GEOSCONFIG does not exist]) fi fi fi # Extract the linker and include flags GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` GEOS_CPPFLAGS=-I`$GEOSCONFIG --includes` AC_SUBST([GEOS_LDFLAGS]) AC_SUBST([GEOS_CPPFLAGS]) # Ensure that we can parse geos_c.h CPPFLAGS_SAVE="$CPPFLAGS" CPPFLAGS="$GEOS_CPPFLAGS" AC_CHECK_HEADERS([geos_c.h],, [AC_MSG_ERROR([could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig])]) CPPFLAGS="$CPPFLAGS_SAVE" # Ensure we can link against libgeos_c LIBS_SAVE="$LIBS" LIBS="$GEOS_LDFLAGS" AC_SEARCH_LIBS(GEOSTopologyPreserveSimplify,geos_c,,AC_MSG_ERROR([could not find libgeos_c - you may need to specify the directory of a geos-config file using --with-geosconfig])) LIBS="$LIBS_SAVE" LIBS=$LIBS$GEOS_LDFLAGS' -lgeos_c' #----------------------------------------------------------------------- # --enable-freexl # AC_ARG_ENABLE(freexl, [AS_HELP_STRING( [--enable-freexl], [enables FreeXL inclusion [default=yes]])], [], [enable_freexl=yes]) if test x"$enable_freexl" != "xno"; then PKG_CHECK_MODULES([LIBFREEXL], [freexl], , AC_MSG_ERROR(['libfreexl' is required but it doesn't seem to be installed on this system.])) AC_SUBST(LIBFREEXL_CFLAGS) AC_SUBST(LIBFREEXL_LIBS) else AC_DEFINE(OMIT_FREEXL) fi #----------------------------------------------------------------------- # --enable-libxml2 # AC_ARG_ENABLE(libxml2, [AS_HELP_STRING( [--enable-libxml2], [enables libxml2 inclusion [default=yes]])], [], [enable_libxml2=yes]) if test x"$enable_libxml2" != "xno"; then PKG_CHECK_MODULES([LIBXML2], [libxml-2.0], , AC_MSG_ERROR(['libxml2' is required but it doesn't seem to be installed on this system.])) AC_SUBST(LIBXML2_CFLAGS) AC_SUBST(LIBXML2_LIBS) AC_DEFINE(ENABLE_LIBXML2) fi #----------------------------------------------------------------------- # --enable-openjpeg # AC_ARG_ENABLE(openjpeg, [AS_HELP_STRING( [--enable-openjpeg], [enables OpenJpeg inclusion [default=yes]])], [], [enable_openjpeg=yes]) if test x"$enable_openjpeg" != "xno"; then # # testing OpenJpeg-2 headers # they could be either on -/include/openjpeg-2.0 # or on -/include/openjpeg-2.1 # AC_CHECK_HEADERS(openjpeg-2.0/openjpeg.h) AC_CHECK_HEADERS(openjpeg-2.1/openjpeg.h) if test x"$ac_cv_header_openjpeg_2_0_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes"; then AC_MSG_ERROR(['OpenJpeg-2' is required but the header (openjpeg.h) doesn't seem to be installed on this system]) fi AC_CHECK_LIB(openjp2,opj_create_decompress,,AC_MSG_ERROR(['libopenjp2' is required but it doesn't seems to be installed on this system.]),-lm) # testing for OpenJpeg 2.0 or 2.1 AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#ifdef HAVE_OPENJPEG_2_1_OPENJPEG_H #include #else #include #endif]], [[void *d; opj_stream_t *s; opj_stream_set_user_data (s, &d, NULL);]])], [ AC_MSG_RESULT([yes]) AC_DEFINE(OPENJPEG_2_1) ], [AC_MSG_RESULT([no])] ) else AC_DEFINE(OMIT_OPENJPEG) fi #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --enable-webp # AC_ARG_ENABLE(webp, [AS_HELP_STRING( [--enable-webp], [enables WebP inclusion [default=yes]])], [], [enable_webp=yes]) if test x"$enable_webp" != "xno"; then PKG_CHECK_MODULES([LIBWEBP], [libwebp], , AC_MSG_ERROR(['libwebp' is required but it doesn't seems to be installed on this system.])) AC_SUBST(LIBWEBP_CFLAGS) AC_SUBST(LIBWEBP_LIBS) else AC_DEFINE(OMIT_WEBP) fi #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --enable-charls # AC_ARG_ENABLE(charls, [AS_HELP_STRING( [--enable-charls], [enables CharLS inclusion [default=yes]])], [], [enable_charls=yes]) if test x"$enable_charls" != "xno"; then AC_CHECK_HEADERS(CharLS/interface.h,, [AC_MSG_ERROR([cannot find CharLS/interface.h, bailing out])]) AC_CHECK_LIB(CharLS,JpegLsEncode,,AC_MSG_ERROR(['libCharLS' is required but it doesn't seems to be installed on this system.]),-lm) else AC_DEFINE(OMIT_CHARLS) fi #----------------------------------------------------------------------- PKG_CHECK_MODULES([LIBLZMA], [liblzma], , AC_MSG_ERROR(['liblzma' is required but it doesn't seems to be installed on this system.])) AC_SUBST(LIBLZMA_CFLAGS) AC_SUBST(LIBLZMA_LIBS) PKG_CHECK_MODULES([LIBSPATIALITE], [spatialite], , AC_MSG_ERROR(['libspatialite' is required but it doesn't seem to be installed on this system.])) AC_SUBST(LIBSPATIALITE_CFLAGS) # testing for libspatialite-amalgamation if test "x$(pkg-config --cflags spatialite|grep "DSPATIALITE_AMALGAMATION=1")" != "x"; then AC_DEFINE(SPATIALITE_AMALGAMATION, 1) fi AC_SUBST(LIBSPATIALITE_LIBS) PKG_CHECK_MODULES([LIBRASTERLITE2], [rasterlite2], , AC_MSG_ERROR(['librasterlite2' is required but it doesn't seem to be installed on this system.])) AC_SUBST(LIBRASTERLITE2_CFLAGS) AC_SUBST(LIBRASTERLITE2_LIBS) #----------------------------------------------------------------------- # --enable-rl2extra # AC_ARG_ENABLE(rl2extra, [AS_HELP_STRING( [--enable-rl2extra], [enables RasterLite2 extended support [default=no]])], [], [enable_rl2extra=no]) if test x"$enable_rl2extra" != "xyes"; then AC_DEFINE(OMIT_RL2EXTRA) fi #----------------------------------------------------------------------- AC_CONFIG_FILES([Makefile \ icons/Makefile \ win_resource/Makefile \ gnome_resource/Makefile \ mac_resource/Makefile]) #----------------------------------------------------------------------- # --enable-sqlite_stmtstatus_autoindex # AC_ARG_ENABLE(sqlite_stmtstatus_autoindex, [AS_HELP_STRING( [--enable-sqlite_stmtstatus_autoindex], [enables SQLITE_STMTSTATUS_AUTOINDEX [default=yes]])], [], [sqlite_stmtstatus_autoindex=yes]) if test x"$enable_sqlite_stmtstatus_autoindex" != "xno"; then OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS= else OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS=-DOMIT_SQLITE_STMTSTATUS_AUTOINXED fi AC_SUBST(OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS) # checks for SQLite version-depending constants AC_CHECK_DECL([SQLITE_DBSTATUS_LOOKASIDE_USED], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED)],[],[[#include ]]) AC_CHECK_DECL([SQLITE_DBSTATUS_LOOKASIDE_HIT], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT)],[],[[#include ]]) AC_CHECK_DECL([SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE)],[],[[#include ]]) AC_CHECK_DECL([SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL)],[],[[#include ]]) AC_CHECK_DECL([SQLITE_DBSTATUS_CACHE_USED], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_CACHE_USED)],[],[[#include ]]) AC_CHECK_DECL([SQLITE_DBSTATUS_CACHE_HIT], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_CACHE_HIT)],[],[[#include ]]) AC_CHECK_DECL([SQLITE_DBSTATUS_CACHE_MISS], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_CACHE_MISS)],[],[[#include ]]) AC_CHECK_DECL([SQLITE_DBSTATUS_CACHE_WRITE], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_CACHE_WRITE)],[],[[#include ]]) AC_CHECK_DECL([SQLITE_DBSTATUS_SCHEMA_USED], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_SCHEMA_USED)],[],[[#include ]]) AC_CHECK_DECL([SQLITE_DBSTATUS_STMT_USED], [AC_DEFINE(HAVE_DECL_SQLITE_DBSTATUS_STMT_USED)],[],[[#include ]]) AC_OUTPUT spatialite_gui-2.0.0-devel/aclocal.m40000664000175000017500000014702312544013515014403 00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------- # Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])# PKG_CHECK_VAR # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # -*- Autoconf -*- # Obsolete and "removed" macros, that must however still report explicit # error messages when used, to smooth transition. # # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl AC_CONFIG_HEADERS($@)]) AC_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc AC_DIAGNOSE([obsolete], ['$0': this macro is obsolete. You should simply use the 'AC][_PROG_CC' macro instead. Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', but upon 'ac_cv_prog_cc_stdc'.])]) AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) spatialite_gui-2.0.0-devel/DialogsGraph.cpp0000664000175000017500000040620212544026240015607 00000000000000/* / DialogsGraph.cpp / graphics dialog classes / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2010-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/filedlg.h" #include "wx/filename.h" #include "wx/colordlg.h" #include "wx/clipbrd.h" #include #include #if defined(_WIN32) || defined (__MINGW32__) #define FORMAT_64 "%I64d" #else #define FORMAT_64 "%lld" #endif bool ColumnStatsDialog::Create(MyFrame * parent, wxString & table, wxString & column, int null_count, int text_count, int integer_count, int real_count, int blob_count, double min, double max, double avg, double stddev_pop, double stddev_samp, double var_pop, double var_samp, int distinct_values) { // // creating the dialog // MainFrame = parent; Table = table; Column = column; NullValues = null_count; TextValues = text_count; IntegerValues = integer_count; RealValues = real_count; BlobValues = blob_count; Min = min; Max = max; Avg = avg; StdDevPop = stddev_pop; StdDevSamp = stddev_samp; VarPop = var_pop; VarSamp = var_samp; DistinctValues = distinct_values; if (wxDialog::Create(parent, wxID_ANY, wxT("Column statistic snapshot")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ColumnStatsDialog::CreateControls() { // // creating individual control and setting initial values // char dummy[256]; wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_ANY, Table, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); tableCtrl->Enable(false); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&Column name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_ANY, Column, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); colCtrl->Enable(false); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: total rows wxBoxSizer *rowSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(rowSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *rowLabel = new wxStaticText(this, wxID_STATIC, wxT("&Total values:")); rowSizer->Add(rowLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%d", NullValues + TextValues + IntegerValues + RealValues + BlobValues); wxString rows = wxString::FromUTF8(dummy); wxTextCtrl *rowCtrl = new wxTextCtrl(this, wxID_ANY, rows, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); rowCtrl->Enable(false); rowSizer->Add(rowCtrl, 0, wxALIGN_RIGHT | wxALL, 5); if (NullValues > 0) { // NULL values count wxBoxSizer *nullSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nullSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nullLabel = new wxStaticText(this, wxID_STATIC, wxT("&NULL values:")); nullSizer->Add(nullLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%d", NullValues); wxString nulls = wxString::FromUTF8(dummy); wxTextCtrl *nullCtrl = new wxTextCtrl(this, wxID_ANY, nulls, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); nullCtrl->Enable(false); nullSizer->Add(nullCtrl, 0, wxALIGN_RIGHT | wxALL, 5); } if (TextValues > 0) { // TEXT values count wxBoxSizer *textSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(textSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *textLabel = new wxStaticText(this, wxID_STATIC, wxT("&TEXT values:")); textSizer->Add(textLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%d", TextValues); wxString texts = wxString::FromUTF8(dummy); wxTextCtrl *textCtrl = new wxTextCtrl(this, wxID_ANY, texts, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); textCtrl->Enable(false); textSizer->Add(textCtrl, 0, wxALIGN_RIGHT | wxALL, 5); } if (IntegerValues > 0) { // INTEGER values count wxBoxSizer *intSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(intSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *intLabel = new wxStaticText(this, wxID_STATIC, wxT("&INTEGER values:")); intSizer->Add(intLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%d", IntegerValues); wxString ints = wxString::FromUTF8(dummy); wxTextCtrl *intCtrl = new wxTextCtrl(this, wxID_ANY, ints, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); intCtrl->Enable(false); intSizer->Add(intCtrl, 0, wxALIGN_RIGHT | wxALL, 5); } if (RealValues > 0) { // REAL values count wxBoxSizer *realSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(realSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *realLabel = new wxStaticText(this, wxID_STATIC, wxT("&REAL values:")); realSizer->Add(realLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%d", RealValues); wxString reals = wxString::FromUTF8(dummy); wxTextCtrl *realCtrl = new wxTextCtrl(this, wxID_ANY, reals, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); realCtrl->Enable(false); realSizer->Add(realCtrl, 0, wxALIGN_RIGHT | wxALL, 5); } if (BlobValues > 0) { // BLOB values count wxBoxSizer *blobSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(blobSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *blobLabel = new wxStaticText(this, wxID_STATIC, wxT("&BLOB values:")); blobSizer->Add(blobLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%d", BlobValues); wxString blobs = wxString::FromUTF8(dummy); wxTextCtrl *blobCtrl = new wxTextCtrl(this, wxID_ANY, blobs, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); blobCtrl->Enable(false); blobSizer->Add(blobCtrl, 0, wxALIGN_RIGHT | wxALL, 5); } // statistical group box wxStaticBox *statBox = new wxStaticBox(this, wxID_STATIC, wxT("Data distribution snapshot"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *statSizer = new wxStaticBoxSizer(statBox, wxVERTICAL); boxSizer->Add(statSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // distinct values count wxBoxSizer *distSizer = new wxBoxSizer(wxHORIZONTAL); statSizer->Add(distSizer, 0, wxALIGN_CENTER | wxALL, 0); wxStaticText *distLabel = new wxStaticText(this, wxID_STATIC, wxT("&DISTINCT values:")); distSizer->Add(distLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%d", DistinctValues); wxString dists = wxString::FromUTF8(dummy); wxTextCtrl *distCtrl = new wxTextCtrl(this, wxID_ANY, dists, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); distCtrl->Enable(false); distSizer->Add(distCtrl, 0, wxALIGN_RIGHT | wxALL, 5); if ((IntegerValues + RealValues) > 1) { // statistic analysis: MinMax range wxStaticBox *rangeBox = new wxStaticBox(this, wxID_STATIC, wxT("Data range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rngSizer = new wxStaticBoxSizer(rangeBox, wxVERTICAL); statSizer->Add(rngSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *minMaxSizer = new wxBoxSizer(wxHORIZONTAL); rngSizer->Add(minMaxSizer, 0, wxALIGN_CENTER | wxALL, 0); wxStaticText *minLabel = new wxStaticText(this, wxID_STATIC, wxT("&Min:")); minMaxSizer->Add(minLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%1.18f", Min); CleanDecimals(dummy); wxString min = wxString::FromUTF8(dummy); wxTextCtrl *minCtrl = new wxTextCtrl(this, wxID_ANY, min, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); minCtrl->Enable(false); minMaxSizer->Add(minCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *maxLabel = new wxStaticText(this, wxID_STATIC, wxT("&Max:")); minMaxSizer->Add(maxLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%1.18f", Max); CleanDecimals(dummy); wxString max = wxString::FromUTF8(dummy); wxTextCtrl *maxCtrl = new wxTextCtrl(this, wxID_ANY, max, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); maxCtrl->Enable(false); minMaxSizer->Add(maxCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // statistic analysis: Average wxBoxSizer *avgSizer = new wxBoxSizer(wxHORIZONTAL); statSizer->Add(avgSizer, 0, wxALIGN_CENTER | wxALL, 0); wxStaticText *avgLabel = new wxStaticText(this, wxID_STATIC, wxT("&Average:")); avgSizer->Add(avgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%1.4f", Avg); CleanDecimals(dummy); wxString avg = wxString::FromUTF8(dummy); wxTextCtrl *avgCtrl = new wxTextCtrl(this, wxID_ANY, avg, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); avgCtrl->Enable(false); avgSizer->Add(avgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // statistic analysis: Standard Deviation wxStaticBox *stdDevBox = new wxStaticBox(this, wxID_STATIC, wxT("Standard deviation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *stdSizer = new wxStaticBoxSizer(stdDevBox, wxVERTICAL); statSizer->Add(stdSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *stdDevSizer = new wxBoxSizer(wxHORIZONTAL); stdSizer->Add(stdDevSizer, 0, wxALIGN_CENTER | wxALL, 0); wxStaticText *devPopLabel = new wxStaticText(this, wxID_STATIC, wxT("&Pop:")); stdDevSizer->Add(devPopLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%1.4f", StdDevPop); CleanDecimals(dummy); wxString stdPop = wxString::FromUTF8(dummy); wxTextCtrl *stdPopCtrl = new wxTextCtrl(this, wxID_ANY, stdPop, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); stdPopCtrl->Enable(false); stdDevSizer->Add(stdPopCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *stdSampLabel = new wxStaticText(this, wxID_STATIC, wxT("&Samp:")); stdDevSizer->Add(stdSampLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%1.4f", StdDevSamp); CleanDecimals(dummy); wxString stdSamp = wxString::FromUTF8(dummy); wxTextCtrl *stdSampCtrl = new wxTextCtrl(this, wxID_ANY, stdSamp, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); stdSampCtrl->Enable(false); stdDevSizer->Add(stdSampCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // statistic analysis: Variance wxStaticBox *varBox = new wxStaticBox(this, wxID_STATIC, wxT("Variance"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *varianceSizer = new wxStaticBoxSizer(varBox, wxVERTICAL); statSizer->Add(varianceSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *varSizer = new wxBoxSizer(wxHORIZONTAL); varianceSizer->Add(varSizer, 0, wxALIGN_CENTER | wxALL, 0); wxStaticText *varPopLabel = new wxStaticText(this, wxID_STATIC, wxT("&Pop:")); varSizer->Add(varPopLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%1.4f", VarPop); CleanDecimals(dummy); wxString varPop = wxString::FromUTF8(dummy); wxTextCtrl *varPopCtrl = new wxTextCtrl(this, wxID_ANY, varPop, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); varPopCtrl->Enable(false); varSizer->Add(varPopCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxStaticText *varSampLabel = new wxStaticText(this, wxID_STATIC, wxT("&Samp:")); varSizer->Add(varSampLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sprintf(dummy, "%1.4f", VarSamp); CleanDecimals(dummy); wxString varSamp = wxString::FromUTF8(dummy); wxTextCtrl *varSampCtrl = new wxTextCtrl(this, wxID_ANY, varSamp, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); varSampCtrl->Enable(false); varSizer->Add(varSampCtrl, 0, wxALIGN_RIGHT | wxALL, 5); } // buttons wxBoxSizer *buttonBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(buttonBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *chart = new wxButton(this, ID_STAT_CHART, wxT("&Show chart")); buttonBox->Add(chart, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exit = new wxButton(this, wxID_OK, wxT("&Exit")); buttonBox->Add(exit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(ID_STAT_CHART, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ColumnStatsDialog::OnShowChart); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ColumnStatsDialog::OnExit); } void ColumnStatsDialog::CleanDecimals(char *str) { // suppressing not significative decimal digits int i; int len = strlen(str); for (i = len - 1; i >= 0; i--) { if (str[i] == '0') str[i] = '\0'; else break; } len = strlen(str); if (str[len - 1] == '.') str[len - 1] = '\0'; } void ColumnStatsDialog::OnShowChart(wxCommandEvent & WXUNUSED(event)) { // // showing a chart: // bool numeric = false; StatsChartDialog dlg; if (IntegerValues > 0 || RealValues > 0) numeric = true; dlg.Create(this, MainFrame, Table, Column, numeric, Min, Max); dlg.ShowModal(); } void ColumnStatsDialog::OnExit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool StatsChartDialog::Create(ColumnStatsDialog * parent, MyFrame * granny, wxString & table, wxString & column, bool numeric, double min, double max) { // // creating the dialog // MainFrame = granny; Table = table; Column = column; NumericData = numeric; Min = min; Max = max; if (wxDialog::Create(parent, wxID_ANY, wxT("Chart preview")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void StatsChartDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_ANY, Table, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); tableCtrl->Enable(false); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&Column name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_ANY, Column, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); colCtrl->Enable(false); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Chart params wxStaticBox *optBox = new wxStaticBox(this, wxID_STATIC, wxT("Chart settings"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxVERTICAL); boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *chartSizer = new wxBoxSizer(wxHORIZONTAL); optSizer->Add(chartSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString type[3]; type[0] = wxT("&Histogram"); type[1] = wxT("&Line chart"); type[2] = wxT("&Pie chart"); TypeCtrl = new wxRadioBox(this, ID_CHART_TYPE, wxT("&Type"), wxDefaultPosition, wxDefaultSize, 3, type, 1, wxRA_SPECIFY_COLS); chartSizer->Add(TypeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); TypeCtrl->SetSelection(0); Histogram = true; LineChart = false; PieChart = false; wxString size[5]; size[0] = wxT("&256"); size[1] = wxT("&512"); size[2] = wxT("&1024"); size[3] = wxT("&2048"); size[4] = wxT("&4196"); SizeCtrl = new wxRadioBox(this, ID_CHART_SIZE, wxT("&Dimension [pixels]"), wxDefaultPosition, wxDefaultSize, 5, size, 1, wxRA_SPECIFY_COLS); chartSizer->Add(SizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); SizeCtrl->SetSelection(0); wxBoxSizer *mixSizer = new wxBoxSizer(wxVERTICAL); chartSizer->Add(mixSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString mode[2]; mode[0] = wxT("&by intervals"); mode[1] = wxT("&by unique values"); ModeCtrl = new wxRadioBox(this, ID_CHART_MODE, wxT("&Mode"), wxDefaultPosition, wxDefaultSize, 2, mode, 1, wxRA_SPECIFY_COLS); mixSizer->Add(ModeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); if (NumericData == true) { ModeCtrl->SetSelection(0); ByInterval = true; } else { ModeCtrl->SetSelection(1); ModeCtrl->Enable(false); ByInterval = false; } wxBoxSizer *classSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(classSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *classLabel = new wxStaticText(this, wxID_STATIC, wxT("&Classes:")); classSizer->Add(classLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); ClassCtrl = new wxSpinCtrl(this, ID_CHART_CLASS, wxT("10"), wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, 2, 1000, 10); classSizer->Add(ClassCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); Classes = 10; // creating a control to show the Chart preview wxStaticBox *exBox = new wxStaticBox(this, wxID_ANY, wxT("Chart preview"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *showSizer = new wxStaticBoxSizer(exBox, wxHORIZONTAL); boxSizer->Add(showSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); ChartShow = new wxStaticBitmap(this, wxID_ANY, wxBitmap(), wxDefaultPosition, wxSize(256, 256), wxBORDER_SUNKEN); showSizer->Add(ChartShow, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxStaticBox *btnBox = new wxStaticBox(this, wxID_STATIC, wxT("Export as"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *btnSizer = new wxStaticBoxSizer(btnBox, wxVERTICAL); showSizer->Add(btnSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *buttonBox = new wxBoxSizer(wxVERTICAL); btnSizer->Add(buttonBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_CHART_COPY, wxT("&Copy")); buttonBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *png = new wxButton(this, ID_CHART_PNG, wxT("&PNG")); buttonBox->Add(png, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *svg = new wxButton(this, ID_CHART_SVG, wxT("&SVG")); buttonBox->Add(svg, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pdf = new wxButton(this, ID_CHART_PDF, wxT("&PDF")); buttonBox->Add(pdf, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *exitBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(exitBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *exit = new wxButton(this, wxID_OK, wxT("&Exit")); exitBox->Add(exit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(ID_CHART_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & StatsChartDialog::OnChartCopy); Connect(ID_CHART_PNG, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & StatsChartDialog::OnChartPng); Connect(ID_CHART_SVG, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & StatsChartDialog::OnChartSvg); Connect(ID_CHART_PDF, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & StatsChartDialog::OnChartPdf); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & StatsChartDialog::OnExit); Connect(ID_CHART_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & StatsChartDialog::OnChartTypeChanged); Connect(ID_CHART_MODE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & StatsChartDialog::OnChartModeChanged); Connect(ID_CHART_CLASS, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & StatsChartDialog::OnChartClassesChanged); // showing the current preview ReloadData(); UpdatePreview(); } void StatsChartDialog::OnChartTypeChanged(wxCommandEvent & WXUNUSED(event)) { // chart type radiobox changed switch (TypeCtrl->GetSelection()) { case 0: Histogram = true; LineChart = false; PieChart = false; break; case 1: Histogram = false; LineChart = true; PieChart = false; break; case 2: Histogram = false; LineChart = false; PieChart = true; break; }; UpdatePreview(); } void StatsChartDialog::OnChartModeChanged(wxCommandEvent & WXUNUSED(event)) { // chart mode radiobox changed switch (ModeCtrl->GetSelection()) { case 0: ByInterval = true; break; case 1: ByInterval = false; break; }; ReloadData(); UpdatePreview(); } void StatsChartDialog::OnChartClassesChanged(wxCommandEvent & WXUNUSED(event)) { // // Classes selection changed // Classes = ClassCtrl->GetValue(); ReloadData(); UpdatePreview(); } void StatsChartDialog::UpdatePreview() { // showing an empty preview chart wxBitmap bmp; ChartShow->SetBitmap(bmp); if (ChartData.IsValid() != true) return; // updating the Chart Preview if (ByInterval == true) { if (Histogram == true) DoIntervalHistogram(256, 256, CHART_TARGET_IS_PREVIEW, 8); if (LineChart == true) DoIntervalLineChart(256, 256, CHART_TARGET_IS_PREVIEW, 8); if (PieChart == true) DoIntervalPieChart(256, 256, CHART_TARGET_IS_PREVIEW, 8); } else { if (Histogram == true) DoUniqueHistogram(256, 256, CHART_TARGET_IS_PREVIEW, 8); if (LineChart == true) DoUniqueLineChart(256, 256, CHART_TARGET_IS_PREVIEW, 8); if (PieChart == true) DoUniquePieChart(256, 256, CHART_TARGET_IS_PREVIEW, 8); } } void StatsChartDialog::ReloadData() { // reloading Char Data if (ChartData.Check(ByInterval, Classes) == true) return; /* still valid Data */ ::wxBeginBusyCursor(); ChartData.CleanData(); if (ByInterval == true) PrepareDataByInterval(Classes); else PrepareDataByUniqueValue(Classes); ::wxEndBusyCursor(); if (ChartData.IsValid() != true) { wxMessageBox(wxT("Unable to retrieve column data"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } } void StatsChartDialog::OnChartCopy(wxCommandEvent & WXUNUSED(event)) { // copying the current Chart to the Clipboard int hsize; int vsize; int font_size; if (ChartData.IsValid() != true) return; switch (SizeCtrl->GetSelection()) { case 0: hsize = 256; vsize = 256; font_size = 8; break; case 1: hsize = 512; vsize = 512; font_size = 8; break; case 2: hsize = 1024; vsize = 1024; font_size = 10; break; case 3: hsize = 2048; vsize = 2048; font_size = 12; break; case 4: hsize = 4196; vsize = 4196; font_size = 12; break; }; // exporting the Chart as COPY if (ByInterval == true) { if (Histogram == true) DoIntervalHistogram(hsize, vsize, CHART_TARGET_IS_COPY, font_size); if (LineChart == true) DoIntervalLineChart(hsize, vsize, CHART_TARGET_IS_COPY, font_size); if (PieChart == true) DoIntervalPieChart(hsize, vsize, CHART_TARGET_IS_COPY, font_size); } else { if (Histogram == true) DoUniqueHistogram(hsize, vsize, CHART_TARGET_IS_COPY, font_size); if (LineChart == true) DoUniqueLineChart(hsize, vsize, CHART_TARGET_IS_COPY, font_size); if (PieChart == true) DoUniquePieChart(hsize, vsize, CHART_TARGET_IS_COPY, font_size); } } void StatsChartDialog::OnChartPng(wxCommandEvent & WXUNUSED(event)) { // exporting the current Chart as PNG int hsize; int vsize; int font_size; if (ChartData.IsValid() != true) return; switch (SizeCtrl->GetSelection()) { case 0: hsize = 256; vsize = 256; font_size = 8; break; case 1: hsize = 512; vsize = 512; font_size = 8; break; case 2: hsize = 1024; vsize = 1024; font_size = 10; break; case 3: hsize = 2048; vsize = 2048; font_size = 12; break; case 4: hsize = 4196; vsize = 4196; font_size = 12; break; }; // asking an export path int ret; wxString lastDir; wxString fileList = wxT("PNG Image (*.png)|*.png"); wxFileDialog fileDialog(MainFrame, wxT("saving the current Chart as PNG"), wxT(""), wxT("ChartExport"), fileList, wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); wxString path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".png"); ExportPath = path; } else return; // exporting the Chart as PNG if (ByInterval == true) { if (Histogram == true) DoIntervalHistogram(hsize, vsize, CHART_TARGET_IS_PNG, font_size); if (LineChart == true) DoIntervalLineChart(hsize, vsize, CHART_TARGET_IS_PNG, font_size); if (PieChart == true) DoIntervalPieChart(hsize, vsize, CHART_TARGET_IS_PNG, font_size); } else { if (Histogram == true) DoUniqueHistogram(hsize, vsize, CHART_TARGET_IS_PNG, font_size); if (LineChart == true) DoUniqueLineChart(hsize, vsize, CHART_TARGET_IS_PNG, font_size); if (PieChart == true) DoUniquePieChart(hsize, vsize, CHART_TARGET_IS_PNG, font_size); } } void StatsChartDialog::OnChartSvg(wxCommandEvent & WXUNUSED(event)) { // exporting the current Chart as SVG int hsize; int vsize; int font_size; if (ChartData.IsValid() != true) return; switch (SizeCtrl->GetSelection()) { case 0: hsize = 256; vsize = 256; font_size = 8; break; case 1: hsize = 512; vsize = 512; font_size = 8; break; case 2: hsize = 1024; vsize = 1024; font_size = 10; break; case 3: hsize = 2048; vsize = 2048; font_size = 12; break; case 4: hsize = 4196; vsize = 4196; font_size = 12; break; }; // asking an export path int ret; wxString lastDir; wxString fileList = wxT("SVG Vector Image (*.svg)|*.svg"); wxFileDialog fileDialog(MainFrame, wxT("saving the current Chart as SVG"), wxT(""), wxT("ChartExport"), fileList, wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); wxString path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".svg"); ExportPath = path; } else return; // exporting the Chart as SVG if (ByInterval == true) { if (Histogram == true) DoIntervalHistogram(hsize, vsize, CHART_TARGET_IS_SVG, font_size); if (LineChart == true) DoIntervalLineChart(hsize, vsize, CHART_TARGET_IS_SVG, font_size); if (PieChart == true) DoIntervalPieChart(hsize, vsize, CHART_TARGET_IS_SVG, font_size); } else { if (Histogram == true) DoUniqueHistogram(hsize, vsize, CHART_TARGET_IS_SVG, font_size); if (LineChart == true) DoUniqueLineChart(hsize, vsize, CHART_TARGET_IS_SVG, font_size); if (PieChart == true) DoUniquePieChart(hsize, vsize, CHART_TARGET_IS_SVG, font_size); }; } void StatsChartDialog::OnChartPdf(wxCommandEvent & WXUNUSED(event)) { // exporting the current Chart as PDF int hsize = (int) (12.8 * 300.0); int vsize = (int) (9.0 * 300.0); hsize -= 100; // margin vsize -= 100; // margin if (ChartData.IsValid() != true) return; // asking an export path int ret; wxString lastDir; wxString fileList = wxT("PDF Document (*.pdf)|*.pdf"); wxFileDialog fileDialog(MainFrame, wxT("saving the current Chart as PDF"), wxT(""), wxT("ChartExport"), fileList, wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); wxString path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".pdf"); ExportPath = path; } else return; // exporting the Chart as PDF if (ByInterval == true) { if (Histogram == true) DoIntervalHistogram(hsize, vsize, CHART_TARGET_IS_PDF, 120); if (LineChart == true) DoIntervalLineChart(hsize, vsize, CHART_TARGET_IS_PDF, 120); if (PieChart == true) DoIntervalPieChart(hsize, vsize, CHART_TARGET_IS_PDF, 120); } else { if (Histogram == true) DoUniqueHistogram(hsize, vsize, CHART_TARGET_IS_PDF, 120); if (LineChart == true) DoUniqueLineChart(hsize, vsize, CHART_TARGET_IS_PDF, 120); if (PieChart == true) DoUniquePieChart(hsize, vsize, CHART_TARGET_IS_PDF, 120); }; } void StatsChartDialog::PrepareDataByInterval(int classes) { // feeding class data by intervals char sql[4196]; char table[1024]; char column[1024]; int ret; char err_msg[2048]; sqlite3_stmt *stmt; sqlite3 *sqlite = MainFrame->GetSqlite(); ChartData.Create(Min, Max, classes); strcpy(table, Table.ToUTF8()); strcpy(column, Column.ToUTF8()); MainFrame->DoubleQuotedSql(table); MainFrame->DoubleQuotedSql(column); sprintf(sql, "SELECT %s FROM %s", column, table); ret = sqlite3_prepare_v2(sqlite, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(sqlite)); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } while (1) { // // fetching the result set rows // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // double value; if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) { sqlite3_int64 intval = sqlite3_column_int64(stmt, 0); value = intval; ChartData.Add(value); } if (sqlite3_column_type(stmt, 0) == SQLITE_FLOAT) { value = sqlite3_column_double(stmt, 0); ChartData.Add(value); } } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(sqlite)); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } } sqlite3_finalize(stmt); ChartData.SetValid(); } void StatsChartDialog::PrepareDataByUniqueValue(int classes) { // feeding class data by unique values char sql[4196]; char table[1024]; char column[1024]; int ret; char err_msg[2048]; sqlite3_stmt *stmt; sqlite3 *sqlite = MainFrame->GetSqlite(); ChartData.Create(classes); strcpy(table, Table.ToUTF8()); strcpy(column, Column.ToUTF8()); MainFrame->DoubleQuotedSql(table); MainFrame->DoubleQuotedSql(column); sprintf(sql, "SELECT %s, Count(*) FROM %s GROUP BY %s", column, table, column); strcat(sql, " ORDER BY 2 DESC"); ret = sqlite3_prepare_v2(sqlite, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(sqlite)); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } while (1) { // // fetching the result set rows // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // bool valid = false; wxString value; char dummy[128]; if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) { sqlite3_int64 intval = sqlite3_column_int64(stmt, 0); sprintf(dummy, FORMAT_64, intval); value = wxString::FromUTF8(dummy); valid = true; } if (sqlite3_column_type(stmt, 0) == SQLITE_FLOAT) { double dblval = sqlite3_column_double(stmt, 0); sprintf(dummy, "%1.18f", dblval); CleanDecimals(dummy); value = wxString::FromUTF8(dummy); valid = true; } if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) { const char *txtval = (const char *) sqlite3_column_text(stmt, 0); value = wxString::FromUTF8(txtval); valid = true; } if (valid == true) { int count = sqlite3_column_int(stmt, 1); ChartData.Add(value, count); } } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(sqlite)); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } } sqlite3_finalize(stmt); ChartData.SetValid(); } void StatsChartDialog::DoIntervalHistogram(int hsize, int vsize, int target, int font_size) { // generating an Histogram (Interval values) unsigned char *rgb_array = NULL; rl2GraphicsContextPtr ctx = NULL; rl2GraphicsFontPtr font = NULL; rl2GraphicsFontPtr font_big = NULL; int idx; int start_x; int end_x; int start_y; int end_y; double base_x; double step_x; double base_y; double vspan; double height; char title[1024]; char text[1024]; char table[1024]; char column[1024]; double txtWidth; double txtHeight; double titleHeight; double pre_x; double pre_y; double post_x; double post_y; int title_x; int title_y; double labelWidth = 0.0; double labelBase; double labelStep; wxColour colors[8]; int color_idx; MyChartScaleLabels scaleLabels; MyChartScaleLabel *pLab; double scaleWidth = 0.0; // color palette colors[0] = wxColour(255, 255, 240); colors[1] = wxColour(255, 240, 255); colors[2] = wxColour(240, 255, 255); colors[3] = wxColour(240, 240, 240); colors[4] = wxColour(255, 192, 192); colors[5] = wxColour(192, 255, 192); colors[6] = wxColour(192, 192, 255); colors[7] = wxColour(192, 192, 192); // graphics initialization if (target == CHART_TARGET_IS_SVG) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); ctx = rl2_graph_create_svg_context(xpath, hsize, vsize); } else if (target == CHART_TARGET_IS_PDF) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); // assuming A4 300 DPI double pageWidth = 8.3; double pageHeight = 11.7; if (hsize > vsize) { // landscape pageWidth = 11.7; pageHeight = 8.3; } double pdf_hsize = (pageWidth - 2.0) * 300.0; double pdf_vsize = (pageHeight - 2.0) * 300.0; hsize = (int) pdf_hsize; vsize = (int) pdf_vsize; ctx = rl2_graph_create_pdf_context(xpath, 300, pageWidth, pageHeight, 1, 1); } else ctx = rl2_graph_create_context(hsize, vsize); if (ctx == NULL) goto done; // background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 255); rl2_graph_draw_rectangle(ctx, -1, -1, hsize + 2, vsize + 2); // font setup font = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_NORMAL); rl2_graph_font_set_color(font, 0, 0, 0, 255); font_big = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_BOLD); rl2_graph_font_set_color(font_big, 0, 0, 0, 255); // computing TEXT sizes strcpy(table, Table.ToUTF8()); strcpy(column, Column.ToUTF8()); MainFrame->DoubleQuotedSql(table); MainFrame->DoubleQuotedSql(column); sprintf(title, "Dataset: %s.%s [interval values]", table, column); rl2_graph_set_font(ctx, font_big); rl2_graph_get_text_extent(ctx, title, &pre_x, &pre_y, &txtWidth, &titleHeight, &post_x, &post_y); title_x = (hsize - (int) txtWidth) / 2; title_y = 5 + (int) titleHeight; // measuring class labels rl2_graph_set_font(ctx, font); sprintf(text, "%1.4f", Min); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); labelWidth = txtWidth; sprintf(text, "%1.4f", Min + ((Max - Min) / 4.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; sprintf(text, "%1.4f", Min + ((Max - Min) / 2.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; sprintf(text, "%1.4f", Min + (((Max - Min) / 4.0) * 3.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; sprintf(text, "%1.4f", Max); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; start_y = vsize - 10 - (int) labelWidth; end_y = 10 + (int) titleHeight; vspan = start_y - end_y; base_y = start_y; // building and measuring the 'scale' labels scaleLabels.Initialize(vspan, ChartData.GetMaxFreq()); pLab = scaleLabels.GetFirst(); while (pLab) { rl2_graph_set_font(ctx, font); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > scaleWidth) scaleWidth = txtWidth; pLab = pLab->GetNext(); } start_x = 10 + (int) scaleWidth; end_x = hsize - 10; base_x = start_x; step_x = (double) (end_x - start_x) / (double) (ChartData.GetNumClasses()); labelBase = base_x + (step_x / 2.0); labelStep = (end_x - start_x - step_x) / 4; // title output rl2_graph_set_font(ctx, font_big); rl2_graph_draw_text(ctx, title, title_x, title_y, 0.0, 0.0, 0.0); // class labels output rl2_graph_set_font(ctx, font); sprintf(text, "%1.4f", Min); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); labelBase += labelStep; sprintf(text, "%1.4f", Min + ((Max - Min) / 4.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); labelBase += labelStep; sprintf(text, "%1.4f", Min + ((Max - Min) / 2.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); labelBase += labelStep; sprintf(text, "%1.4f", Min + (((Max - Min) / 4.0) * 3.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); labelBase += labelStep; sprintf(text, "%1.4f", Max); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); for (idx = 0; idx < ChartData.GetNumClasses(); idx++) { // drawing bars MyChartIntervalClass *p = ChartData.GetClass(idx); rl2_graph_set_solid_pen(ctx, 0, 0, 0, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); color_idx = idx % 8; rl2_graph_set_brush(ctx, colors[color_idx].Red(), colors[color_idx].Green(), colors[color_idx].Blue(), 255); height = vspan * ((double) (p->GetCount() / (double) (ChartData.GetMaxFreq()))); rl2_graph_draw_rectangle(ctx, base_x, base_y - height, step_x, height); base_x += step_x; } // drawing 'scale' labels pLab = scaleLabels.GetFirst(); while (pLab) { rl2_graph_set_font(ctx, font); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, scaleWidth - txtWidth + 5, base_y - pLab->GetPosition() + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 255, 128, 128, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, start_x, base_y - pLab->GetPosition(), end_x, base_y - pLab->GetPosition()); pLab = pLab->GetNext(); } // marking the ZERO baseline rl2_graph_set_font(ctx, font); strcpy(text, "0"); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, scaleWidth - txtWidth + 5, base_y + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 255, 128, 128, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, start_x, base_y, end_x, base_y); // graphics finalization rl2_graph_destroy_font(font); rl2_graph_destroy_font(font_big); if (target == CHART_TARGET_IS_COPY || target == CHART_TARGET_IS_PNG || target == CHART_TARGET_IS_PREVIEW) rgb_array = rl2_graph_get_context_rgb_array(ctx); if (ctx != NULL) rl2_graph_destroy_context(ctx); done: if (target == CHART_TARGET_IS_PNG) { if (rgb_array) { // creating the Image from RGB array int err = 1; unsigned char *png; int png_size; if (rl2_rgb_to_png(hsize, vsize, rgb_array, &png, &png_size) == RL2_OK) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (out == NULL) err = 1; else { int wr = fwrite(png, 1, png_size, out); if (wr == png_size) err = 0; fclose(out); } free(rgb_array); } if (err) { wxString msg = wxT("An error occurred while saving\nthe current Chart as PNG"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } } } if (target == CHART_TARGET_IS_PREVIEW) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); wxBitmap bmp(img); ChartShow->SetBitmap(bmp); } } if (target == CHART_TARGET_IS_COPY) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxBitmapDataObject(img)); wxTheClipboard->Close(); } } } } void StatsChartDialog::DoIntervalLineChart(int hsize, int vsize, int target, int font_size) { // generating a Line Chart (Interval values) unsigned char *rgb_array = NULL; rl2GraphicsContextPtr ctx = NULL; rl2GraphicsFontPtr font = NULL; rl2GraphicsFontPtr font_big = NULL; int idx; int start_x; int end_x; int start_y; int end_y; double base_x; double step_x; double base_y; double vspan; double height; char title[1024]; char table[1024]; char column[1024]; char text[1024]; double txtWidth; double txtHeight; double titleHeight; double pre_x; double pre_y; double post_x; double post_y; int title_x; int title_y; double labelWidth = 0.0; double labelBase; double labelStep; MyChartScaleLabels scaleLabels; MyChartScaleLabel *pLab; double scaleWidth = 0.0; // graphics initialization if (target == CHART_TARGET_IS_SVG) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); ctx = rl2_graph_create_svg_context(xpath, hsize, vsize); } else if (target == CHART_TARGET_IS_PDF) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); // assuming A4 300 DPI double pageWidth = 8.3; double pageHeight = 11.7; if (hsize > vsize) { // landscape pageWidth = 11.7; pageHeight = 8.3; } double pdf_hsize = (pageWidth - 2.0) * 300.0; double pdf_vsize = (pageHeight - 2.0) * 300.0; hsize = (int) pdf_hsize; vsize = (int) pdf_vsize; ctx = rl2_graph_create_pdf_context(xpath, 300, pageWidth, pageHeight, 1, 1); } else ctx = rl2_graph_create_context(hsize, vsize); if (ctx == NULL) goto done; // background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 255); rl2_graph_draw_rectangle(ctx, -1, -1, hsize + 2, vsize + 2); // font setup font = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_NORMAL); rl2_graph_font_set_color(font, 0, 0, 0, 255); font_big = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_BOLD); rl2_graph_font_set_color(font_big, 0, 0, 0, 255); // computing TEXT sizes strcpy(table, Table.ToUTF8()); strcpy(column, Column.ToUTF8()); MainFrame->DoubleQuotedSql(table); MainFrame->DoubleQuotedSql(column); sprintf(title, "Dataset: %s.%s [interval values]", table, column); rl2_graph_set_font(ctx, font_big); rl2_graph_get_text_extent(ctx, title, &pre_x, &pre_y, &txtWidth, &titleHeight, &post_x, &post_y); title_x = (hsize - (int) txtWidth) / 2; title_y = 5 + (int) titleHeight; // measuring class labels rl2_graph_set_font(ctx, font); sprintf(text, "%1.4f", Min); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); labelWidth = txtWidth; sprintf(text, "%1.4f", Min + ((Max - Min) / 4.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; sprintf(text, "%1.4f", Min + ((Max - Min) / 2.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; sprintf(text, "%1.4f", Min + (((Max - Min) / 4.0) * 3.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; sprintf(text, "%1.4f", Max); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; start_y = vsize - 10 - (int) labelWidth; end_y = 10 + (int) titleHeight; vspan = start_y - end_y; base_y = start_y; // building and measuring the 'scale' labels scaleLabels.Initialize(vspan, ChartData.GetMaxFreq()); pLab = scaleLabels.GetFirst(); while (pLab) { rl2_graph_set_font(ctx, font); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > scaleWidth) scaleWidth = txtWidth; pLab = pLab->GetNext(); } start_x = 10 + (int) scaleWidth; end_x = hsize - 10; base_x = start_x; step_x = (double) (end_x - start_x) / (double) (ChartData.GetNumClasses()); labelBase = base_x + (step_x / 2.0); labelStep = (end_x - start_x - step_x) / 4; // title output rl2_graph_set_font(ctx, font_big); rl2_graph_draw_text(ctx, title, title_x, title_y, 0.0, 0.0, 0.0); // class labels output rl2_graph_set_font(ctx, font); sprintf(text, "%1.4f", Min); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); labelBase += labelStep; sprintf(text, "%1.4f", Min + ((Max - Min) / 4.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); labelBase += labelStep; sprintf(text, "%1.4f", Min + ((Max - Min) / 2.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); labelBase += labelStep; sprintf(text, "%1.4f", Min + (((Max - Min) / 4.0) * 3.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); labelBase += labelStep; sprintf(text, "%1.4f", Max); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, labelBase + txtHeight, vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); for (idx = 0; idx < ChartData.GetNumClasses(); idx++) { MyChartIntervalClass *p = ChartData.GetClass(idx); height = vspan * ((double) (p->GetCount() / (double) (ChartData.GetMaxFreq()))); rl2_graph_set_solid_pen(ctx, 192, 192, 192, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, base_x + (step_x / 2.0), start_y, base_x + (step_x / 2.0), base_y - height); base_x += step_x; } base_x = start_x; for (idx = 0; idx < ChartData.GetNumClasses(); idx++) { MyChartIntervalClass *p = ChartData.GetClass(idx); height = vspan * ((double) (p->GetCount() / (double) (ChartData.GetMaxFreq()))); if (idx == 0) rl2_graph_move_to_point(ctx, base_x + (step_x / 2.0), base_y - height); else rl2_graph_add_line_to_path(ctx, base_x + (step_x / 2.0), base_y - height); base_x += step_x; } rl2_graph_set_solid_pen(ctx, 255, 0, 0, 255, 2, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); // drawing 'scale' labels pLab = scaleLabels.GetFirst(); while (pLab) { rl2_graph_set_font(ctx, font); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, scaleWidth - txtWidth + 5, base_y - pLab->GetPosition() + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 128, 255, 128, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, start_x, base_y - pLab->GetPosition(), end_x, base_y - pLab->GetPosition()); pLab = pLab->GetNext(); } // marking the ZERO baseline rl2_graph_set_font(ctx, font); strcpy(text, "0"); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, scaleWidth - txtWidth + 5, base_y + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 128, 255, 128, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, start_x, base_y, end_x, base_y); // graphics finalization rl2_graph_destroy_font(font); rl2_graph_destroy_font(font_big); if (target == CHART_TARGET_IS_COPY || target == CHART_TARGET_IS_PNG || target == CHART_TARGET_IS_PREVIEW) rgb_array = rl2_graph_get_context_rgb_array(ctx); if (ctx != NULL) rl2_graph_destroy_context(ctx); done: if (target == CHART_TARGET_IS_PNG) { if (rgb_array) { // creating the Image from RGB array int err = 1; unsigned char *png; int png_size; if (rl2_rgb_to_png(hsize, vsize, rgb_array, &png, &png_size) == RL2_OK) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (out == NULL) err = 1; else { int wr = fwrite(png, 1, png_size, out); if (wr == png_size) err = 0; fclose(out); } free(rgb_array); } if (err) { wxString msg = wxT("An error occurred while saving\nthe current Chart as PNG"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } } } if (target == CHART_TARGET_IS_PREVIEW) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); wxBitmap bmp(img); ChartShow->SetBitmap(bmp); } } if (target == CHART_TARGET_IS_COPY) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxBitmapDataObject(img)); wxTheClipboard->Close(); } } } } void StatsChartDialog::DoIntervalPieChart(int hsize, int vsize, int target, int font_size) { // generating a Pie Chart (Interval values) unsigned char *rgb_array = NULL; rl2GraphicsContextPtr ctx = NULL; rl2GraphicsFontPtr font = NULL; rl2GraphicsFontPtr font_big = NULL; int idx; double radius_x; double radius_y; double radius; double cx; double cy; double from; double step; char title[1024]; char table[1024]; char column[1024]; double txtWidth; double txtHeight; double titleHeight; double pre_x; double pre_y; double post_x; double post_y; int title_x; int title_y; wxColour colors[8]; int color_idx; MyPieChartLabels labels; MyPieChartLabel *pLab; char text[1024]; double lx; double ly; double base_y; double step_y; double labelWidth = 0.0; // color palette colors[0] = wxColour(255, 255, 240); colors[1] = wxColour(255, 240, 255); colors[2] = wxColour(240, 255, 255); colors[3] = wxColour(240, 240, 240); colors[4] = wxColour(255, 192, 192); colors[5] = wxColour(192, 255, 192); colors[6] = wxColour(192, 192, 255); colors[7] = wxColour(192, 192, 192); // graphics initialization if (target == CHART_TARGET_IS_SVG) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); ctx = rl2_graph_create_svg_context(xpath, hsize, vsize); } else if (target == CHART_TARGET_IS_PDF) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); // assuming A4 300 DPI double pageWidth = 8.3; double pageHeight = 11.7; if (hsize > vsize) { // landscape pageWidth = 11.7; pageHeight = 8.3; } double pdf_hsize = (pageWidth - 2.0) * 300.0; double pdf_vsize = (pageHeight - 2.0) * 300.0; hsize = (int) pdf_hsize; vsize = (int) pdf_vsize; ctx = rl2_graph_create_pdf_context(xpath, 300, pageWidth, pageHeight, 1, 1); } else ctx = rl2_graph_create_context(hsize, vsize); if (ctx == NULL) goto done; // background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 255); rl2_graph_draw_rectangle(ctx, -1, -1, hsize + 2, vsize + 2); // font setup font = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_NORMAL); rl2_graph_font_set_color(font, 0, 0, 0, 255); font_big = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_BOLD); rl2_graph_font_set_color(font_big, 0, 0, 0, 255); // computing TEXT sizes strcpy(table, Table.ToUTF8()); strcpy(column, Column.ToUTF8()); MainFrame->DoubleQuotedSql(table); MainFrame->DoubleQuotedSql(column); sprintf(title, "Dataset: %s.%s [interval values]", table, column); rl2_graph_set_font(ctx, font_big); rl2_graph_get_text_extent(ctx, title, &pre_x, &pre_y, &txtWidth, &titleHeight, &post_x, &post_y); title_x = (hsize - (int) txtWidth) / 2; title_y = 5 + (int) titleHeight; for (idx = 0; idx < ChartData.GetNumClasses(); idx++) { // measuring labels MyChartIntervalClass *p = ChartData.GetClass(idx); rl2_graph_set_font(ctx, font); sprintf(text, "%1.4f", p->GetMin() + ((p->GetMax() - p->GetMin()) / 2.0)); CleanDecimals(text); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; } cx = (double) hsize / 2.0; cy = (double) vsize / 2.0; cy += (double) (titleHeight + 10) / 2.0; radius_x = (double) (hsize - 20) / 2.0; radius_x -= labelWidth + 10; radius_y = (double) (vsize - titleHeight - 20) / 2.0; if (radius_x <= radius_y) radius = radius_x; else radius = radius_y; // title output rl2_graph_set_font(ctx, font_big); rl2_graph_draw_text(ctx, title, title_x, title_y, 0.0, 0.0, 0.0); from = 0.0; for (idx = 0; idx < ChartData.GetNumClasses(); idx++) { MyChartIntervalClass *p = ChartData.GetClass(idx); rl2_graph_set_solid_pen(ctx, 0, 0, 0, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); color_idx = idx % 8; rl2_graph_set_brush(ctx, colors[color_idx].Red(), colors[color_idx].Green(), colors[color_idx].Blue(), 255); step = (M_PI * 2.0) * ((double) (p->GetCount() / (double) (ChartData.GetTotFreq()))); rl2_graph_draw_circle_sector(ctx, cx, cy, radius, from, from + step); sprintf(text, "%1.4f", p->GetMin() + ((p->GetMax() - p->GetMin()) / 2.0)); CleanDecimals(text); lx = cx + (radius * 0.90) * cos(from + (step / 2.0)); ly = cy + (radius * 0.90) * sin(from + (step / 2.0)); labels.Add(text, lx, ly); from += step; } // printing class labels labels.Sort(cx); step_y = (double) (vsize - 50) / (double) (labels.GetNumLeftLabels() - 1); base_y = 25.0; for (idx = 0; idx < labels.GetNumLeftLabels(); idx++) { // printing Left labels pLab = labels.GetLeftLabel(idx); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_set_font(ctx, font); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, 10, base_y + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 255, 0, 0, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, 10 + txtWidth, base_y, pLab->GetX(), pLab->GetY()); base_y += step_y; } step_y = (double) (vsize - 50) / (double) (labels.GetNumRightLabels() - 1); base_y = 25.0; for (idx = 0; idx < labels.GetNumRightLabels(); idx++) { // printing Right labels pLab = labels.GetRightLabel(idx); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_set_font(ctx, font); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, hsize - txtWidth - 10, base_y + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 255, 0, 0, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, hsize - txtWidth - 10, base_y, pLab->GetX(), pLab->GetY()); base_y += step_y; } // graphics finalization rl2_graph_destroy_font(font); rl2_graph_destroy_font(font_big); if (target == CHART_TARGET_IS_COPY || target == CHART_TARGET_IS_PNG || target == CHART_TARGET_IS_PREVIEW) rgb_array = rl2_graph_get_context_rgb_array(ctx); if (ctx != NULL) rl2_graph_destroy_context(ctx); done: if (target == CHART_TARGET_IS_PNG) { if (rgb_array) { // creating the Image from RGB array int err = 1; unsigned char *png; int png_size; if (rl2_rgb_to_png(hsize, vsize, rgb_array, &png, &png_size) == RL2_OK) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (out == NULL) err = 1; else { int wr = fwrite(png, 1, png_size, out); if (wr == png_size) err = 0; fclose(out); } free(rgb_array); } if (err) { wxString msg = wxT("An error occurred while saving\nthe current Chart as PNG"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } } } if (target == CHART_TARGET_IS_PREVIEW) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); wxBitmap bmp(img); ChartShow->SetBitmap(bmp); } } if (target == CHART_TARGET_IS_COPY) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxBitmapDataObject(img)); wxTheClipboard->Close(); } } } } void StatsChartDialog::DoUniqueHistogram(int hsize, int vsize, int target, int font_size) { // generating an Histogram (Unique values) unsigned char *rgb_array = NULL; rl2GraphicsContextPtr ctx = NULL; rl2GraphicsFontPtr font = NULL; rl2GraphicsFontPtr font_big = NULL; int idx; MyChartUniqueClass *p; int start_x; int end_x; int start_y; int end_y; double base_x; double step_x; double base_y; double vspan; double height; char title[1024]; char table[1024]; char column[1024]; char text[1024]; double txtWidth; double txtHeight; double titleHeight; double pre_x; double pre_y; double post_x; double post_y; int title_x; int title_y; double labelWidth = 0.0; int others = 0; wxColour colors[8]; int color_idx; MyChartScaleLabels scaleLabels; MyChartScaleLabel *pLab; double scaleWidth = 0.0; // color palette colors[0] = wxColour(255, 255, 240); colors[1] = wxColour(255, 240, 255); colors[2] = wxColour(240, 255, 255); colors[3] = wxColour(240, 240, 240); colors[4] = wxColour(255, 192, 192); colors[5] = wxColour(192, 255, 192); colors[6] = wxColour(192, 192, 255); colors[7] = wxColour(192, 192, 192); // graphics initialization if (target == CHART_TARGET_IS_SVG) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); ctx = rl2_graph_create_svg_context(xpath, hsize, vsize); } else if (target == CHART_TARGET_IS_PDF) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); // assuming A4 300 DPI double pageWidth = 8.3; double pageHeight = 11.7; if (hsize > vsize) { // landscape pageWidth = 11.7; pageHeight = 8.3; } double pdf_hsize = (pageWidth - 2.0) * 300.0; double pdf_vsize = (pageHeight - 2.0) * 300.0; hsize = (int) pdf_hsize; vsize = (int) pdf_vsize; ctx = rl2_graph_create_pdf_context(xpath, 300, pageWidth, pageHeight, 1, 1); } else ctx = rl2_graph_create_context(hsize, vsize); if (ctx == NULL) goto done; // background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 255); rl2_graph_draw_rectangle(ctx, -1, -1, hsize + 2, vsize + 2); // font setup font = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_NORMAL); rl2_graph_font_set_color(font, 0, 0, 0, 255); font_big = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_BOLD); rl2_graph_font_set_color(font_big, 0, 0, 0, 255); if (ChartData.GetOtherUniquesFreq() > 0) others = 1; // computing TEXT sizes strcpy(table, Table.ToUTF8()); strcpy(column, Column.ToUTF8()); MainFrame->DoubleQuotedSql(table); MainFrame->DoubleQuotedSql(column); sprintf(title, "Dataset: %s.%s [unique values]", table, column); rl2_graph_set_font(ctx, font_big); rl2_graph_get_text_extent(ctx, title, &pre_x, &pre_y, &txtWidth, &titleHeight, &post_x, &post_y); title_x = (hsize - (int) txtWidth) / 2; title_y = 5 + (int) titleHeight; // measuring class labels p = ChartData.GetFirst(); while (p) { rl2_graph_set_font(ctx, font); strcpy(text, p->GetValue().ToUTF8()); if (strlen(text) > 10) { text[10] = '.'; text[11] = '.'; text[12] = '\0'; // truncating to max 10 chars } rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; p = p->GetNext(); } if (others) { // including the 'any other' class rl2_graph_set_font(ctx, font); rl2_graph_get_text_extent(ctx, "AnyOther", &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; } start_y = vsize - 10 - (int) labelWidth; end_y = 10 + (int) titleHeight; vspan = start_y - end_y; base_y = start_y; // building and measuring the 'scale' labels scaleLabels.Initialize(vspan, ChartData.GetMaxFreq()); pLab = scaleLabels.GetFirst(); while (pLab) { rl2_graph_set_font(ctx, font); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > scaleWidth) scaleWidth = txtWidth; pLab = pLab->GetNext(); } start_x = 10 + (int) scaleWidth; end_x = hsize - 10; base_x = start_x; step_x = (double) (end_x - start_x) / (double) (ChartData.GetNumClasses() + others); // title output rl2_graph_set_font(ctx, font_big); rl2_graph_draw_text(ctx, title, title_x, title_y, 0.0, 0.0, 0.0); // class labels output p = ChartData.GetFirst(); while (p) { rl2_graph_set_font(ctx, font); strcpy(text, p->GetValue().ToUTF8()); if (strlen(text) > 10) { text[10] = '.'; text[11] = '.'; text[12] = '\0'; // truncating to max 10 chars } rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, base_x + (txtHeight / 2.0) + (step_x / 2.0), vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); base_x += step_x; p = p->GetNext(); } if (others) { // including the 'any other' class rl2_graph_set_font(ctx, font); rl2_graph_get_text_extent(ctx, "AnyOther", &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, "AnyOther", base_x + (txtHeight / 2.0) + (step_x / 2.0), vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); } idx = 0; base_x = start_x; p = ChartData.GetFirst(); while (p) { rl2_graph_set_solid_pen(ctx, 0, 0, 0, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); color_idx = idx % 8; rl2_graph_set_brush(ctx, colors[color_idx].Red(), colors[color_idx].Green(), colors[color_idx].Blue(), 255); height = vspan * ((double) (p->GetCount() / (double) (ChartData.GetMaxFreq()))); rl2_graph_draw_rectangle(ctx, base_x, base_y - height, step_x, height); base_x += step_x; idx++; p = p->GetNext(); } if (others) { // other unclassified values color_idx = idx % 8; rl2_graph_set_brush(ctx, colors[color_idx].Red(), colors[color_idx].Green(), colors[color_idx].Blue(), 255); height = vspan * ((double) (ChartData.GetOtherUniquesFreq() / (double) (ChartData.GetMaxFreq()))); rl2_graph_draw_rectangle(ctx, base_x, base_y - height, step_x, height); } // drawing 'scale' labels pLab = scaleLabels.GetFirst(); while (pLab) { rl2_graph_set_font(ctx, font); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, scaleWidth - txtWidth + 5, base_y - pLab->GetPosition() + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 255, 128, 128, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, start_x, base_y - pLab->GetPosition(), end_x, base_y - pLab->GetPosition()); pLab = pLab->GetNext(); } // marking the ZERO baseline rl2_graph_set_font(ctx, font); strcpy(text, "0"); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, scaleWidth - txtWidth + 5, base_y + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 255, 128, 128, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, start_x, base_y, end_x, base_y); // graphics finalization rl2_graph_destroy_font(font); rl2_graph_destroy_font(font_big); if (target == CHART_TARGET_IS_COPY || target == CHART_TARGET_IS_PNG || target == CHART_TARGET_IS_PREVIEW) rgb_array = rl2_graph_get_context_rgb_array(ctx); if (ctx != NULL) rl2_graph_destroy_context(ctx); done: if (target == CHART_TARGET_IS_PNG) { if (rgb_array) { // creating the Image from RGB array int err = 1; unsigned char *png; int png_size; if (rl2_rgb_to_png(hsize, vsize, rgb_array, &png, &png_size) == RL2_OK) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (out == NULL) err = 1; else { int wr = fwrite(png, 1, png_size, out); if (wr == png_size) err = 0; fclose(out); } free(rgb_array); } if (err) { wxString msg = wxT("An error occurred while saving\nthe current Chart as PNG"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } } } if (target == CHART_TARGET_IS_PREVIEW) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); wxBitmap bmp(img); ChartShow->SetBitmap(bmp); } } if (target == CHART_TARGET_IS_COPY) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxBitmapDataObject(img)); wxTheClipboard->Close(); } } } } void StatsChartDialog::DoUniqueLineChart(int hsize, int vsize, int target, int font_size) { // generating a Line Chart (Unique values) unsigned char *rgb_array = NULL; rl2GraphicsContextPtr ctx = NULL; rl2GraphicsFontPtr font = NULL; rl2GraphicsFontPtr font_big = NULL; int idx; MyChartUniqueClass *p; int start_x; int end_x; int start_y; int end_y; double base_x; double step_x; double base_y; double vspan; double height; char title[1024]; char table[1024]; char column[1024]; char text[1024]; double txtWidth; double txtHeight; double titleHeight; double pre_x; double pre_y; double post_x; double post_y; int title_x; int title_y; double labelWidth = 0.0; int others = 0; MyChartScaleLabels scaleLabels; MyChartScaleLabel *pLab; double scaleWidth = 0.0; // graphics initialization if (target == CHART_TARGET_IS_SVG) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); ctx = rl2_graph_create_svg_context(xpath, hsize, vsize); } else if (target == CHART_TARGET_IS_PDF) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); // assuming A4 300 DPI double pageWidth = 8.3; double pageHeight = 11.7; if (hsize > vsize) { // landscape pageWidth = 11.7; pageHeight = 8.3; } double pdf_hsize = (pageWidth - 2.0) * 300.0; double pdf_vsize = (pageHeight - 2.0) * 300.0; hsize = (int) pdf_hsize; vsize = (int) pdf_vsize; ctx = rl2_graph_create_pdf_context(xpath, 300, pageWidth, pageHeight, 1, 1); } else ctx = rl2_graph_create_context(hsize, vsize); if (ctx == NULL) goto done; // background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 255); rl2_graph_draw_rectangle(ctx, -1, -1, hsize + 2, vsize + 2); // font setup font = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_NORMAL); rl2_graph_font_set_color(font, 0, 0, 0, 255); font_big = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_BOLD); rl2_graph_font_set_color(font_big, 0, 0, 0, 255); if (ChartData.GetOtherUniquesFreq() > 0) others = 1; // computing TEXT sizes strcpy(table, Table.ToUTF8()); strcpy(column, Column.ToUTF8()); MainFrame->DoubleQuotedSql(table); MainFrame->DoubleQuotedSql(column); sprintf(title, "Dataset: %s.%s [unique values]", table, column); rl2_graph_set_font(ctx, font_big); rl2_graph_get_text_extent(ctx, title, &pre_x, &pre_y, &txtWidth, &titleHeight, &post_x, &post_y); title_x = (hsize - (int) txtWidth) / 2; title_y = 5 + (int) titleHeight; // measuring class labels p = ChartData.GetFirst(); while (p) { rl2_graph_set_font(ctx, font); strcpy(text, p->GetValue().ToUTF8()); if (strlen(text) > 10) { text[10] = '.'; text[11] = '.'; text[12] = '\0'; // truncating to max 10 chars } rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; p = p->GetNext(); } if (others) { // including the 'any other' class rl2_graph_set_font(ctx, font); rl2_graph_get_text_extent(ctx, "AnyOther", &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; } start_y = vsize - 10 - (int) labelWidth; end_y = 10 + (int) titleHeight; vspan = start_y - end_y; base_y = start_y; // building and measuring the 'scale' labels scaleLabels.Initialize(vspan, ChartData.GetMaxFreq()); pLab = scaleLabels.GetFirst(); while (pLab) { rl2_graph_set_font(ctx, font); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > scaleWidth) scaleWidth = txtWidth; pLab = pLab->GetNext(); } start_x = 10 + (int) scaleWidth; end_x = hsize - 10; base_x = start_x; step_x = (double) (end_x - start_x) / (double) (ChartData.GetNumClasses() + others); // title output rl2_graph_set_font(ctx, font_big); rl2_graph_draw_text(ctx, title, title_x, title_y, 0.0, 0.0, 0.0); // class labels output p = ChartData.GetFirst(); while (p) { rl2_graph_set_font(ctx, font); strcpy(text, p->GetValue().ToUTF8()); if (strlen(text) > 10) { text[10] = '.'; text[11] = '.'; text[12] = '\0'; // truncating to max 10 chars } rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, base_x + (txtHeight / 2.0) + (step_x / 2.0), vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); base_x += step_x; p = p->GetNext(); } if (others) { // including the 'any other' class rl2_graph_set_font(ctx, font); rl2_graph_get_text_extent(ctx, "AnyOther", &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, "AnyOther", base_x + (txtHeight / 2.0) + (step_x / 2.0), vsize - labelWidth + txtWidth - 5, 90, 0.0, 0.0); } idx = 0; base_x = start_x; p = ChartData.GetFirst(); while (p) { height = vspan * ((double) (p->GetCount() / (double) (ChartData.GetMaxFreq()))); rl2_graph_set_solid_pen(ctx, 192, 192, 192, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, base_x + (step_x / 2.0), start_y, base_x + (step_x / 2.0), base_y - height); base_x += step_x; idx++; p = p->GetNext(); } if (others) { // other unclassified values height = vspan * ((double) (ChartData.GetOtherUniquesFreq() / (double) (ChartData.GetMaxFreq()))); rl2_graph_stroke_line(ctx, base_x + (step_x / 2.0), start_y, base_x + (step_x / 2.0), base_y - height); } idx = 0; base_x = start_x; p = ChartData.GetFirst(); while (p) { height = vspan * ((double) (p->GetCount() / (double) (ChartData.GetMaxFreq()))); if (idx == 0) rl2_graph_move_to_point(ctx, base_x + (step_x / 2.0), base_y - height); else rl2_graph_add_line_to_path(ctx, base_x + (step_x / 2.0), base_y - height); base_x += step_x; idx++; p = p->GetNext(); } if (others) { // other unclassified values height = vspan * ((double) (ChartData.GetOtherUniquesFreq() / (double) (ChartData.GetMaxFreq()))); rl2_graph_add_line_to_path(ctx, base_x + (step_x / 2.0), base_y - height); } rl2_graph_set_solid_pen(ctx, 255, 0, 0, 255, 2, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); // drawing 'scale' labels pLab = scaleLabels.GetFirst(); while (pLab) { rl2_graph_set_font(ctx, font); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, scaleWidth - txtWidth + 5, base_y - pLab->GetPosition() + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 128, 255, 128, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, start_x, base_y - pLab->GetPosition(), end_x, base_y - pLab->GetPosition()); pLab = pLab->GetNext(); } // marking the ZERO baseline rl2_graph_set_font(ctx, font); strcpy(text, "0"); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, scaleWidth - txtWidth + 5, base_y + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 128, 255, 128, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, start_x, base_y, end_x, base_y); // graphics finalization rl2_graph_destroy_font(font); rl2_graph_destroy_font(font_big); if (target == CHART_TARGET_IS_COPY || target == CHART_TARGET_IS_PNG || target == CHART_TARGET_IS_PREVIEW) rgb_array = rl2_graph_get_context_rgb_array(ctx); if (ctx != NULL) rl2_graph_destroy_context(ctx); done: if (target == CHART_TARGET_IS_PNG) { if (rgb_array) { // creating the Image from RGB array int err = 1; unsigned char *png; int png_size; if (rl2_rgb_to_png(hsize, vsize, rgb_array, &png, &png_size) == RL2_OK) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (out == NULL) err = 1; else { int wr = fwrite(png, 1, png_size, out); if (wr == png_size) err = 0; fclose(out); } free(rgb_array); } if (err) { wxString msg = wxT("An error occurred while saving\nthe current Chart as PNG"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } } } if (target == CHART_TARGET_IS_PREVIEW) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); wxBitmap bmp(img); ChartShow->SetBitmap(bmp); } } if (target == CHART_TARGET_IS_COPY) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxBitmapDataObject(img)); wxTheClipboard->Close(); } } } } void StatsChartDialog::DoUniquePieChart(int hsize, int vsize, int target, int font_size) { // generating a Pie Chart (Unique values) unsigned char *rgb_array = NULL; rl2GraphicsContextPtr ctx = NULL; rl2GraphicsFontPtr font = NULL; rl2GraphicsFontPtr font_big = NULL; int idx; MyChartUniqueClass *p; double radius_x; double radius_y; double radius; double cx; double cy; double from; double step; char title[1024]; char table[1024]; char column[1024]; double txtWidth; double txtHeight; double titleHeight; double pre_x; double pre_y; double post_x; double post_y; int title_x; int title_y; wxColour colors[8]; int color_idx; MyPieChartLabels labels; MyPieChartLabel *pLab; char text[1024]; double lx; double ly; double base_y; double step_y; double labelWidth = 0.0; int others = 0; // color palette colors[0] = wxColour(255, 255, 240); colors[1] = wxColour(255, 240, 255); colors[2] = wxColour(240, 255, 255); colors[3] = wxColour(240, 240, 240); colors[4] = wxColour(255, 192, 192); colors[5] = wxColour(192, 255, 192); colors[6] = wxColour(192, 192, 255); colors[7] = wxColour(192, 192, 192); // graphics initialization if (target == CHART_TARGET_IS_SVG) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); ctx = rl2_graph_create_svg_context(xpath, hsize, vsize); } else if (target == CHART_TARGET_IS_PDF) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); // assuming A4 300 DPI double pageWidth = 8.3; double pageHeight = 11.7; if (hsize > vsize) { // landscape pageWidth = 11.7; pageHeight = 8.3; } double pdf_hsize = (pageWidth - 2.0) * 300.0; double pdf_vsize = (pageHeight - 2.0) * 300.0; hsize = (int) pdf_hsize; vsize = (int) pdf_vsize; ctx = rl2_graph_create_pdf_context(xpath, 300, pageWidth, pageHeight, 1, 1); } else ctx = rl2_graph_create_context(hsize, vsize); if (ctx == NULL) goto done; // background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 255); rl2_graph_draw_rectangle(ctx, -1, -1, hsize + 2, vsize + 2); // font setup font = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_NORMAL); rl2_graph_font_set_color(font, 0, 0, 0, 255); font_big = rl2_graph_create_toy_font(NULL, font_size, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_BOLD); rl2_graph_font_set_color(font_big, 0, 0, 0, 255); if (ChartData.GetOtherUniquesFreq() > 0) others = 1; // computing TEXT sizes strcpy(table, Table.ToUTF8()); strcpy(column, Column.ToUTF8()); MainFrame->DoubleQuotedSql(table); MainFrame->DoubleQuotedSql(column); sprintf(title, "Dataset: %s.%s [unique values]", table, column); rl2_graph_set_font(ctx, font_big); rl2_graph_get_text_extent(ctx, title, &pre_x, &pre_y, &txtWidth, &titleHeight, &post_x, &post_y); title_x = (hsize - (int) txtWidth) / 2; title_y = 5 + (int) titleHeight; p = ChartData.GetFirst(); while (p) { // measuring labels rl2_graph_set_font(ctx, font); strcpy(text, p->GetValue().ToUTF8()); if (strlen(text) > 10) { text[10] = '.'; text[11] = '.'; text[12] = '\0'; // truncating to max 10 chars } rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; p = p->GetNext(); } if (others) { rl2_graph_get_text_extent(ctx, "AnyOther", &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); if (txtWidth > labelWidth) labelWidth = txtWidth; } cx = (double) hsize / 2.0; cy = (double) vsize / 2.0; cy += (double) (titleHeight + 10) / 2.0; radius_x = (double) (hsize - 20) / 2.0; radius_x -= labelWidth + 10; radius_y = (double) (vsize - titleHeight - 20) / 2.0; if (radius_x <= radius_y) radius = radius_x; else radius = radius_y; // title output rl2_graph_set_font(ctx, font_big); rl2_graph_draw_text(ctx, title, title_x, title_y, 0.0, 0.0, 0.0); from = 0.0; idx = 0; p = ChartData.GetFirst(); while (p) { rl2_graph_set_solid_pen(ctx, 0, 0, 0, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); color_idx = idx % 8; rl2_graph_set_brush(ctx, colors[color_idx].Red(), colors[color_idx].Green(), colors[color_idx].Blue(), 255); step = (M_PI * 2.0) * ((double) (p->GetCount() / (double) (ChartData.GetTotFreq()))); rl2_graph_draw_circle_sector(ctx, cx, cy, radius, from, from + step); strcpy(text, p->GetValue().ToUTF8()); if (strlen(text) > 10) { text[10] = '.'; text[11] = '.'; text[12] = '\0'; // truncating to max 10 chars } lx = cx + (radius * 0.90) * cos(from + (step / 2.0)); ly = cy + (radius * 0.90) * sin(from + (step / 2.0)); labels.Add(text, lx, ly); from += step; idx++; p = p->GetNext(); } if (others) { // other unclassified values color_idx = idx % 8; rl2_graph_set_brush(ctx, colors[color_idx].Red(), colors[color_idx].Green(), colors[color_idx].Blue(), 255); step = (M_PI * 2.0) * ((double) (ChartData.GetOtherUniquesFreq() / (double) (ChartData.GetTotFreq()))); rl2_graph_draw_circle_sector(ctx, cx, cy, radius, from, from + step); lx = cx + (radius * 0.90) * cos(from + (step / 2.0)); ly = cy + (radius * 0.90) * sin(from + (step / 2.0)); labels.Add("AnyOther", lx, ly); } // printing class labels labels.Sort(cx); step_y = (double) (vsize - 50) / (double) (labels.GetNumLeftLabels() - 1); base_y = 25.0; for (idx = 0; idx < labels.GetNumLeftLabels(); idx++) { // printing Left labels pLab = labels.GetLeftLabel(idx); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_set_font(ctx, font); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, 10, base_y + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 255, 0, 0, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, 10 + txtWidth, base_y, pLab->GetX(), pLab->GetY()); base_y += step_y; } step_y = (double) (vsize - 50) / (double) (labels.GetNumRightLabels() - 1); base_y = 25.0; for (idx = 0; idx < labels.GetNumRightLabels(); idx++) { // printing Right labels pLab = labels.GetRightLabel(idx); strcpy(text, pLab->GetLabel().ToUTF8()); rl2_graph_set_font(ctx, font); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &txtWidth, &txtHeight, &post_x, &post_y); rl2_graph_draw_text(ctx, text, hsize - txtWidth - 10, base_y + (txtHeight / 2.0), 0.0, 0.0, 0.0); rl2_graph_set_solid_pen(ctx, 255, 0, 0, 255, 1, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_stroke_line(ctx, hsize - txtWidth - 10, base_y, pLab->GetX(), pLab->GetY()); base_y += step_y; } // graphics finalization rl2_graph_destroy_font(font); rl2_graph_destroy_font(font_big); if (target == CHART_TARGET_IS_COPY || target == CHART_TARGET_IS_PNG || target == CHART_TARGET_IS_PREVIEW) rgb_array = rl2_graph_get_context_rgb_array(ctx); if (ctx != NULL) rl2_graph_destroy_context(ctx); done: if (target == CHART_TARGET_IS_PNG) { if (rgb_array) { // creating the Image from RGB array int err = 1; unsigned char *png; int png_size; if (rl2_rgb_to_png(hsize, vsize, rgb_array, &png, &png_size) == RL2_OK) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (out == NULL) err = 1; else { int wr = fwrite(png, 1, png_size, out); if (wr == png_size) err = 0; fclose(out); } free(rgb_array); } if (err) { wxString msg = wxT("An error occurred while saving\nthe current Chart as PNG"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } } } if (target == CHART_TARGET_IS_PREVIEW) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); wxBitmap bmp(img); ChartShow->SetBitmap(bmp); } } if (target == CHART_TARGET_IS_COPY) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxBitmapDataObject(img)); wxTheClipboard->Close(); } } } } void StatsChartDialog::CleanDecimals(char *str) { // suppressing not significative decimal digits int i; int len = strlen(str); for (i = len - 1; i >= 0; i--) { if (str[i] == '0') str[i] = '\0'; else break; } len = strlen(str); if (str[len - 1] == '.') str[len - 1] = '\0'; } void StatsChartDialog::OnExit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool MapPreviewDialog::Create(MyFrame * parent, wxString & table, wxString & column, double minx, double miny, double maxx, double maxy) { // // creating the dialog // MainFrame = parent; Table = table; Column = column; MinX = minx; MinY = miny; MaxX = maxx; MaxY = maxy; LineColor = wxColour(0, 0, 0); FillColor = wxColour(192, 192, 192); if (wxDialog::Create(parent, wxID_ANY, wxT("Map preview")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void MapPreviewDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_ANY, Table, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); tableCtrl->Enable(false); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&Column name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_ANY, Column, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); colCtrl->Enable(false); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Graphics params wxStaticBox *optBox = new wxStaticBox(this, wxID_STATIC, wxT("Graphics"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxVERTICAL); boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *graphSizer = new wxBoxSizer(wxHORIZONTAL); optSizer->Add(graphSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString size[5]; size[0] = wxT("&256"); size[1] = wxT("&512"); size[2] = wxT("&1024"); size[3] = wxT("&2048"); size[4] = wxT("&4196"); SizeCtrl = new wxRadioBox(this, ID_CHART_SIZE, wxT("&Dimension [pixels]"), wxDefaultPosition, wxDefaultSize, 5, size, 1, wxRA_SPECIFY_COLS); graphSizer->Add(SizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); SizeCtrl->SetSelection(0); wxBoxSizer *mixSizer = new wxBoxSizer(wxVERTICAL); graphSizer->Add(mixSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *ptSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(ptSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString symbol[2]; symbol[0] = wxT("&Circle"); symbol[1] = wxT("&Square"); SymbolCtrl = new wxRadioBox(this, ID_MAP_SYMBOL, wxT("&Point Symbol"), wxDefaultPosition, wxDefaultSize, 2, symbol, 1, wxRA_SPECIFY_ROWS); ptSizer->Add(SymbolCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); SymbolCtrl->SetSelection(0); wxBoxSizer *szSizer = new wxBoxSizer(wxHORIZONTAL); ptSizer->Add(szSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *szLabel = new wxStaticText(this, wxID_STATIC, wxT("&Symbol size:")); szSizer->Add(szLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); SymSizeCtrl = new wxSpinCtrl(this, ID_MAP_SYM_SIZE, wxT("3"), wxDefaultPosition, wxSize(50, 20), wxSP_ARROW_KEYS, 1, 32, 3); szSizer->Add(SymSizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *lnpgSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(lnpgSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString fill[2]; fill[0] = wxT("&Yes"); fill[1] = wxT("&No"); FillCtrl = new wxRadioBox(this, ID_MAP_FILL, wxT("&Interior filling"), wxDefaultPosition, wxDefaultSize, 2, fill, 1, wxRA_SPECIFY_ROWS); lnpgSizer->Add(FillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); FillCtrl->SetSelection(0); wxBoxSizer *thkSizer = new wxBoxSizer(wxHORIZONTAL); lnpgSizer->Add(thkSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *thickLabel = new wxStaticText(this, wxID_STATIC, wxT("&Line thickness:")); thkSizer->Add(thickLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); ThicknessCtrl = new wxSpinCtrl(this, ID_MAP_THICKNESS, wxT("1"), wxDefaultPosition, wxSize(50, 20), wxSP_ARROW_KEYS, 1, 32, 1); thkSizer->Add(ThicknessCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *colorSizer = new wxBoxSizer(wxHORIZONTAL); mixSizer->Add(colorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBitmap lineBmp; GetButtonBitmap(LineColor, lineBmp); LineColorCtrl = new wxBitmapButton(this, ID_MAP_LINE_COL, lineBmp); colorSizer->Add(LineColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBitmap fillBmp; GetButtonBitmap(FillColor, fillBmp); FillColorCtrl = new wxBitmapButton(this, ID_MAP_FILL_COL, fillBmp); colorSizer->Add(FillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // creating a control to show the Map preview wxStaticBox *exBox = new wxStaticBox(this, wxID_ANY, wxT("Map preview"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *showSizer = new wxStaticBoxSizer(exBox, wxHORIZONTAL); boxSizer->Add(showSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); MapShow = new wxStaticBitmap(this, wxID_ANY, wxBitmap(), wxDefaultPosition, wxSize(256, 256), wxBORDER_SUNKEN); showSizer->Add(MapShow, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxStaticBox *btnBox = new wxStaticBox(this, wxID_STATIC, wxT("Export as"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *btnSizer = new wxStaticBoxSizer(btnBox, wxVERTICAL); showSizer->Add(btnSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *buttonBox = new wxBoxSizer(wxVERTICAL); btnSizer->Add(buttonBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_MAP_COPY, wxT("&Copy")); buttonBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *png = new wxButton(this, ID_MAP_PNG, wxT("&PNG")); buttonBox->Add(png, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *svg = new wxButton(this, ID_MAP_SVG, wxT("&SVG")); buttonBox->Add(svg, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pdf = new wxButton(this, ID_MAP_PDF, wxT("&PDF")); buttonBox->Add(pdf, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *exitBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(exitBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *exit = new wxButton(this, wxID_OK, wxT("&Exit")); exitBox->Add(exit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(ID_MAP_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MapPreviewDialog::OnMapCopy); Connect(ID_MAP_PNG, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MapPreviewDialog::OnMapPng); Connect(ID_MAP_SVG, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MapPreviewDialog::OnMapSvg); Connect(ID_MAP_PDF, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MapPreviewDialog::OnMapPdf); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MapPreviewDialog::OnExit); Connect(ID_MAP_LINE_COL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MapPreviewDialog::OnLineColor); Connect(ID_MAP_FILL_COL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MapPreviewDialog::OnFillColor); Connect(ID_MAP_SYMBOL, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & MapPreviewDialog::OnSymbolTypeChanged); Connect(ID_MAP_FILL, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & MapPreviewDialog::OnLineThicknessChanged); Connect(ID_MAP_THICKNESS, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & MapPreviewDialog::OnLineThicknessChanged); Connect(ID_MAP_SIZE, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & MapPreviewDialog::OnSymbolSizeChanged); // showing the current preview UpdatePreview(); } void MapPreviewDialog::GetButtonBitmap(wxColour & color, wxBitmap & bmp) { // creating a Bitmap representing some Color bmp = wxBitmap(64, 24); wxMemoryDC *dc = new wxMemoryDC(bmp); dc->SetBrush(wxBrush(color)); dc->DrawRectangle(-1, -1, 66, 26); delete dc; } void MapPreviewDialog::OnLineColor(wxCommandEvent & WXUNUSED(event)) { // color selection wxColourData initColor; int ret; initColor.SetChooseFull(false); initColor.SetColour(LineColor); wxColourDialog colorDialog(this, &initColor); ret = colorDialog.ShowModal(); if (ret == wxID_OK) { wxColourData colorData = colorDialog.GetColourData(); wxColour color = colorData.GetColour(); LineColor = wxColour(color.Red(), color.Green(), color.Blue()); wxBitmap bmp; GetButtonBitmap(LineColor, bmp); LineColorCtrl->SetBitmapLabel(bmp); } UpdatePreview(); } void MapPreviewDialog::OnFillColor(wxCommandEvent & WXUNUSED(event)) { // color selection wxColourData initColor; int ret; initColor.SetChooseFull(false); initColor.SetColour(FillColor); wxColourDialog colorDialog(this, &initColor); ret = colorDialog.ShowModal(); if (ret == wxID_OK) { wxColourData colorData = colorDialog.GetColourData(); wxColour color = colorData.GetColour(); FillColor = wxColour(color.Red(), color.Green(), color.Blue()); wxBitmap bmp; GetButtonBitmap(FillColor, bmp); FillColorCtrl->SetBitmapLabel(bmp); } UpdatePreview(); } void MapPreviewDialog::OnSymbolTypeChanged(wxCommandEvent & WXUNUSED(event)) { // symbol type radiobox changed UpdatePreview(); } void MapPreviewDialog::OnFillModeChanged(wxCommandEvent & WXUNUSED(event)) { // fill mode radiobox changed UpdatePreview(); } void MapPreviewDialog::OnSymbolSizeChanged(wxCommandEvent & WXUNUSED(event)) { // symbol type spincontrol changed UpdatePreview(); } void MapPreviewDialog::OnLineThicknessChanged(wxCommandEvent & WXUNUSED(event)) { // line thickness spincontrol changed UpdatePreview(); } void MapPreviewDialog::UpdatePreview() { // showing an empty preview map wxBitmap bmp; MapShow->SetBitmap(bmp); // updating the Map Preview DoMap(256, 256, MAP_TARGET_IS_PREVIEW); } void MapPreviewDialog::DoMap(int hsize, int vsize, int target) { // drawing the map preview rl2GraphicsContextPtr ctx = NULL; unsigned char *rgb_array = NULL; char table[1024]; char column[1024]; char sql[4196]; int ret; char err_msg[2048]; sqlite3_stmt *stmt; int horz; int vert; int h_shift; int v_shift; double ratio; double ext_x = MaxX - MinX; double ext_y = MaxY - MinY; bool circle; int symbol_size; bool fill; int thickness; // computing the rendering ratio if (target == MAP_TARGET_IS_PDF) { // assuming A4 portrait 300 DPI double pageWidth = 8.3; double pageHeight = 11.7; if (ext_x > ext_y) { // landscape pageWidth = 11.7; pageHeight = 8.3; } double pdf_hsize = (pageWidth - 2.0) * 300.0; double pdf_vsize = (pageHeight - 2.0) * 300.0; hsize = (int) pdf_hsize; vsize = (int) pdf_vsize; if (ext_x > ext_y) ratio = ext_x / pdf_hsize; else ratio = ext_y / pdf_vsize; while (1) { horz = (int) (ext_x / ratio); vert = (int) (ext_y / ratio); if (horz < (pdf_hsize - 5) && vert < (pdf_vsize - 5)) break; ratio *= 1.001; } horz = (int) (ext_x / ratio); vert = (int) (ext_y / ratio); h_shift = (pdf_hsize - horz) / 2; v_shift = (pdf_vsize - vert) / 2; } else { if (ext_x > ext_y) ratio = ext_x / (double) hsize; else ratio = ext_y / (double) vsize; while (1) { horz = (int) (ext_x / ratio); vert = (int) (ext_y / ratio); if (horz < (hsize - 5) && vert < (vsize - 5)) break; ratio *= 1.001; } horz = (int) (ext_x / ratio); vert = (int) (ext_y / ratio); h_shift = (hsize - horz) / 2; v_shift = (vsize - vert) / 2; } // retrieving current graphic settings switch (SymbolCtrl->GetSelection()) { case 0: circle = true; break; case 1: circle = false; break; }; switch (FillCtrl->GetSelection()) { case 0: fill = true; break; case 1: fill = false; break; }; symbol_size = SymSizeCtrl->GetValue(); thickness = ThicknessCtrl->GetValue(); // graphics initialization if (target == MAP_TARGET_IS_SVG) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); ctx = rl2_graph_create_svg_context(xpath, hsize, vsize); } else if (target == MAP_TARGET_IS_PDF) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); // assuming A4 portrait 300 DPI double pageWidth = 8.3; double pageHeight = 11.7; if (hsize > vsize) { // landscape pageWidth = 11.7; pageHeight = 8.3; } ctx = rl2_graph_create_pdf_context(xpath, 300, pageWidth, pageHeight, 1, 1); } else ctx = rl2_graph_create_context(hsize, vsize); if (ctx == NULL) goto done; // background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 255); rl2_graph_draw_rectangle(ctx, -1, -1, hsize + 2, vsize + 2); // setting standard graphic setting rl2_graph_set_solid_pen(ctx, LineColor.Red(), LineColor.Green(), LineColor.Blue(), 255, thickness, RL2_PEN_CAP_ROUND, RL2_PEN_JOIN_ROUND); rl2_graph_set_brush(ctx, FillColor.Red(), FillColor.Green(), FillColor.Blue(), 255); ::wxBeginBusyCursor(); strcpy(table, Table.ToUTF8()); strcpy(column, Column.ToUTF8()); MainFrame->DoubleQuotedSql(table); MainFrame->DoubleQuotedSql(column); sprintf(sql, "SELECT %s FROM %s", column, table); ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } while (1) { // // fetching the result set rows // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // gaiaGeomCollPtr geom = NULL; if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { // fetching Geometry int x; int y; const void *blob = sqlite3_column_blob(stmt, 0); int blob_size = sqlite3_column_bytes(stmt, 0); geom = gaiaFromSpatiaLiteBlobWkb((const unsigned char *) blob, blob_size); if (geom) { // drawing the geometric entity gaiaPolygonPtr pg = geom->FirstPolygon; while (pg) { // drawing a POLYGON int iv; double dx; double dy; double z; double m; int x; int y; int lastX = 0; int lastY = 0; int ib; gaiaRingPtr ring = pg->Exterior; // exterior border for (iv = 0; iv < ring->Points; iv++) { if (ring->DimensionModel == GAIA_XY_Z) { gaiaGetPointXYZ(ring->Coords, iv, &dx, &dy, &z); } else if (ring->DimensionModel == GAIA_XY_M) { gaiaGetPointXYM(ring->Coords, iv, &dx, &dy, &m); } else if (ring->DimensionModel == GAIA_XY_Z_M) { gaiaGetPointXYZM(ring->Coords, iv, &dx, &dy, &z, &m); } else { gaiaGetPoint(ring->Coords, iv, &dx, &dy); } x = (int) ((dx - MinX) / ratio); y = vert - (int) ((dy - MinY) / ratio); x += h_shift; y += v_shift; if (iv == 0) { rl2_graph_move_to_point(ctx, x, y); lastX = x; lastY = y; } else { if (x == lastX && y == lastY) ; else { rl2_graph_add_line_to_path(ctx, x, y); lastX = x; lastY = y; } } } rl2_graph_close_subpath(ctx); for (ib = 0; ib < pg->NumInteriors; ib++) { // interior borders ring = pg->Interiors + ib; for (iv = 0; iv < ring->Points; iv++) { if (ring->DimensionModel == GAIA_XY_Z) { gaiaGetPointXYZ(ring->Coords, iv, &dx, &dy, &z); } else if (ring->DimensionModel == GAIA_XY_M) { gaiaGetPointXYM(ring->Coords, iv, &dx, &dy, &m); } else if (ring->DimensionModel == GAIA_XY_Z_M) { gaiaGetPointXYZM(ring->Coords, iv, &dx, &dy, &z, &m); } else { gaiaGetPoint(ring->Coords, iv, &dx, &dy); } x = (int) ((dx - MinX) / ratio); y = vert - (int) ((dy - MinY) / ratio); x += h_shift; y += v_shift; if (iv == 0) { rl2_graph_move_to_point(ctx, x, y); lastX = x; lastY = y; } else { if (x == lastX && y == lastY) ; else { rl2_graph_add_line_to_path(ctx, x, y); lastX = x; lastY = y; } } } rl2_graph_close_subpath(ctx); } if (fill == true) rl2_graph_fill_path(ctx, RL2_PRESERVE_PATH); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); pg = pg->Next; } gaiaLinestringPtr ln = geom->FirstLinestring; while (ln) { // drawing a LINESTRING int iv; double dx; double dy; double z; double m; int x; int y; int lastX = 0; int lastY = 0; for (iv = 0; iv < ln->Points; iv++) { if (ln->DimensionModel == GAIA_XY_Z) { gaiaGetPointXYZ(ln->Coords, iv, &dx, &dy, &z); } else if (ln->DimensionModel == GAIA_XY_M) { gaiaGetPointXYM(ln->Coords, iv, &dx, &dy, &m); } else if (ln->DimensionModel == GAIA_XY_Z_M) { gaiaGetPointXYZM(ln->Coords, iv, &dx, &dy, &z, &m); } else { gaiaGetPoint(ln->Coords, iv, &dx, &dy); } x = (int) ((dx - MinX) / ratio); y = vert - (int) ((dy - MinY) / ratio); x += h_shift; y += v_shift; if (iv == 0) { rl2_graph_move_to_point(ctx, x, y); lastX = x; lastY = y; } else { if (x == lastX && y == lastY) ; else { rl2_graph_add_line_to_path(ctx, x, y); lastX = x; lastY = y; } } } rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); ln = ln->Next; } gaiaPointPtr pt = geom->FirstPoint; while (pt) { // drawing a POINT x = (int) ((pt->X - MinX) / ratio); y = vert - (int) ((pt->Y - MinY) / ratio); x += h_shift; y += v_shift; if (circle == false) rl2_graph_draw_rectangle(ctx, x - symbol_size, y - symbol_size, symbol_size * 2, symbol_size * 2); else rl2_graph_draw_ellipse(ctx, x - symbol_size, y - symbol_size, symbol_size * 2, symbol_size * 2); pt = pt->Next; } gaiaFreeGeomColl(geom); } } } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } } sqlite3_finalize(stmt); ::wxEndBusyCursor(); // graphics finalization if (target == MAP_TARGET_IS_COPY || target == MAP_TARGET_IS_PNG || target == MAP_TARGET_IS_PREVIEW) rgb_array = rl2_graph_get_context_rgb_array(ctx); if (ctx != NULL) rl2_graph_destroy_context(ctx); done: if (target == MAP_TARGET_IS_PNG) { if (rgb_array) { // creating the Image from RGB array int err = 1; unsigned char *png; int png_size; if (rl2_rgb_to_png(hsize, vsize, rgb_array, &png, &png_size) == RL2_OK) { char xpath[2024]; strcpy(xpath, ExportPath.ToUTF8()); FILE *out = fopen(xpath, "wb"); if (out == NULL) err = 1; else { int wr = fwrite(png, 1, png_size, out); if (wr == png_size) err = 0; fclose(out); } free(rgb_array); free(png); } if (err) { wxString msg = wxT("An error occurred while saving\nthe current Map as PNG"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } } } if (target == MAP_TARGET_IS_PREVIEW) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); wxBitmap bmp(img); MapShow->SetBitmap(bmp); } } if (target == MAP_TARGET_IS_COPY) { if (rgb_array) { // creating the Image from RGB array wxImage img(hsize, vsize); img.SetData(rgb_array); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxBitmapDataObject(img)); wxTheClipboard->Close(); } } } } void MapPreviewDialog::OnMapCopy(wxCommandEvent & WXUNUSED(event)) { // copying the current Map to the Clipboard int hsize; int vsize; switch (SizeCtrl->GetSelection()) { case 0: hsize = 256; vsize = 256; break; case 1: hsize = 512; vsize = 512; break; case 2: hsize = 1024; vsize = 1024; break; case 3: hsize = 2048; vsize = 2048; break; case 4: hsize = 4196; vsize = 4196; break; }; // exporting the Map as COPY DoMap(hsize, vsize, MAP_TARGET_IS_COPY); } void MapPreviewDialog::OnMapPng(wxCommandEvent & WXUNUSED(event)) { // exporting the current Chart as PNG int hsize; int vsize; switch (SizeCtrl->GetSelection()) { case 0: hsize = 256; vsize = 256; break; case 1: hsize = 512; vsize = 512; break; case 2: hsize = 1024; vsize = 1024; break; case 3: hsize = 2048; vsize = 2048; break; case 4: hsize = 4196; vsize = 4196; break; }; // asking an export path int ret; wxString lastDir; wxString fileList = wxT("PNG Image (*.png)|*.png"); wxFileDialog fileDialog(MainFrame, wxT("saving the current Map as PNG"), wxT(""), wxT("MapExport"), fileList, wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); wxString path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".png"); ExportPath = path; } else return; // exporting the Map as PNG DoMap(hsize, vsize, MAP_TARGET_IS_PNG); } void MapPreviewDialog::OnMapSvg(wxCommandEvent & WXUNUSED(event)) { // exporting the current Map as SVG int hsize; int vsize; switch (SizeCtrl->GetSelection()) { case 0: hsize = 256; vsize = 256; break; case 1: hsize = 512; vsize = 512; break; case 2: hsize = 1024; vsize = 1024; break; case 3: hsize = 2048; vsize = 2048; break; case 4: hsize = 4196; vsize = 4196; break; }; // asking an export path int ret; wxString lastDir; wxString fileList = wxT("SVG Vector Image (*.svg)|*.svg"); wxFileDialog fileDialog(MainFrame, wxT("saving the current Map as SVG"), wxT(""), wxT("MapExport"), fileList, wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); wxString path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".svg"); ExportPath = path; } else return; // exporting the Map as SVG DoMap(hsize, vsize, MAP_TARGET_IS_SVG); } void MapPreviewDialog::OnMapPdf(wxCommandEvent & WXUNUSED(event)) { // exporting the current Map as PDF double ext_x = MaxX - MinX; double ext_y = MaxY - MinY; int hsize = (int) (12.8 * 300.0); int vsize = (int) (9.0 * 300.0); hsize -= 100; // margin vsize -= 100; // margin if (ext_y > ext_x) { // portrait, not landscape orientation int swap = hsize; hsize = vsize; vsize = swap; } // asking an export path int ret; wxString lastDir; wxString fileList = wxT("PDF Document (*.pdf)|*.pdf"); wxFileDialog fileDialog(MainFrame, wxT("saving the current Map as PDF"), wxT(""), wxT("MapExport"), fileList, wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); wxString path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".pdf"); ExportPath = path; } else return; // exporting the Map as PDF DoMap(hsize, vsize, MAP_TARGET_IS_PDF); } void MapPreviewDialog::OnExit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } spatialite_gui-2.0.0-devel/Network.cpp0000664000175000017500000021717412544026240014704 00000000000000/* / Network.cpp / methods related to Network building / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include #if defined(_WIN32) && !defined(__MINGW32__) #define strcasecmp _stricmp #endif #define MAX_BLOCK 1048576 void MyFrame::BuildNetwork(wxString & table, wxString & from, wxString & to, bool isNoGeometry, wxString & geometry, wxString & name, bool cost_length, wxString & cost, bool bidirectional, bool one_way, wxString & one_way_from_to, wxString & one_way_to_from, bool aStarSupported, wxString & dataTableName, wxString & virtualTableName) { // // trying to build a Network // int ret; sqlite3_stmt *stmt; Network *p_graph = NULL; wxString sql; char xsql[2048]; char **results; int n_rows; int n_columns; int i; char *errMsg = NULL; char *col_name; int type; bool ok_from_column = false; bool ok_to_column = false; bool ok_cost_column = false; bool ok_geom_column = false; bool ok_name_column = false; bool ok_oneway_tofrom = false; bool ok_oneway_fromto = false; bool from_null = false; bool from_int = false; bool from_double = false; bool from_text = false; bool from_blob = false; bool to_null = false; bool to_int = false; bool to_double = false; bool to_text = false; bool to_blob = false; bool cost_null = false; bool cost_text = false; bool cost_blob = false; bool tofrom_null = false; bool tofrom_double = false; bool tofrom_text = false; bool tofrom_blob = false; bool fromto_null = false; bool fromto_double = false; bool fromto_text = false; bool fromto_blob = false; bool geom_null = false; bool geom_not_linestring = false; int col_n; int fromto_n = 0; int tofrom_n = 0; sqlite3_int64 rowid; sqlite3_int64 id_from = -1; sqlite3_int64 id_to = -1; char code_from[1024]; char code_to[1024]; double node_from_x; double node_from_y; double node_to_x; double node_to_y; double cost_val; int fromto; int tofrom; wxString endMsg; wxString msg; bool wr; bool aStarLength; double a_star_length; double a_star_coeff; double min_a_star_coeff = DBL_MAX; char xname[1024]; if (isNoGeometry == true) { BuildNetwork(table, from, to, name, cost, bidirectional, one_way, one_way_from_to, one_way_to_from, dataTableName, virtualTableName); return; } ::wxBeginBusyCursor(); // checking for table existence sql = wxT("SELECT tbl_name FROM sqlite_master WHERE Lower(tbl_name) = Lower('"); strcpy(xname, table.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("') AND type = 'table'"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, &errMsg); if (ret != SQLITE_OK) { // some error occurred wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (n_rows == 0) { // required table does not exists wxMessageBox(wxT("ERROR: table ") + table + wxT(" does not exists"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } else sqlite3_free_table(results); // checking for columns existence sql = wxT("PRAGMA table_info("); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, &errMsg); if (ret != SQLITE_OK) { // some error occurred wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (n_rows > 1) { for (i = 1; i <= n_rows; i++) { char xcol[256]; col_name = results[(i * n_columns) + 1]; strcpy(xcol, from.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_from_column = true; strcpy(xcol, to.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_to_column = true; if (cost_length == false) { strcpy(xcol, cost.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_cost_column = true; } strcpy(xcol, geometry.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_geom_column = true; if (name.Len() > 0) { strcpy(xcol, name.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_name_column = true; } if (one_way == true) { strcpy(xcol, one_way_from_to.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_oneway_tofrom = true; } if (one_way == true) { strcpy(xcol, one_way_to_from.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_oneway_fromto = true; } } sqlite3_free_table(results); } if (ok_from_column == true && ok_to_column == true && ok_geom_column == true) ; else goto abort; if (name.Len() > 0 && ok_name_column == false) goto abort; if (cost_length == false && ok_cost_column == false) goto abort; if (one_way == true && ok_oneway_tofrom == false) goto abort; if (one_way == true && ok_oneway_fromto == false) goto abort; // checking column types p_graph = new Network(); strcpy(xname, from.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("SELECT ") + wxString::FromUTF8(xname); strcpy(xname, to.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", GeometryType(") + wxString::FromUTF8(xname) + wxT(")"); col_n = 3; if (cost_length == false) { strcpy(xname, cost.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); col_n++; } if (one_way == true) { strcpy(xname, one_way_to_from.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); tofrom_n = col_n; col_n++; strcpy(xname, one_way_from_to.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); fromto_n = col_n; col_n++; } strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(" FROM ") + wxString::FromUTF8(xname); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } n_columns = sqlite3_column_count(stmt); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { // the NodeFrom type type = sqlite3_column_type(stmt, 0); if (type == SQLITE_NULL) from_null = true; if (type == SQLITE_INTEGER) { from_int = true; id_from = sqlite3_column_int64(stmt, 0); p_graph->InsertNode(id_from); } if (type == SQLITE_FLOAT) from_double = true; if (type == SQLITE_TEXT) { from_text = true; strcpy(code_from, (char *) sqlite3_column_text(stmt, 0)); p_graph->InsertNode(code_from); } if (type == SQLITE_BLOB) from_blob = true; // the NodeTo type type = sqlite3_column_type(stmt, 1); if (type == SQLITE_NULL) to_null = true; if (type == SQLITE_INTEGER) { to_int = true; id_to = sqlite3_column_int64(stmt, 1); p_graph->InsertNode(id_to); } if (type == SQLITE_FLOAT) to_double = true; if (type == SQLITE_TEXT) { to_text = true; strcpy(code_to, (char *) sqlite3_column_text(stmt, 1)); p_graph->InsertNode(code_to); } if (type == SQLITE_BLOB) to_blob = true; // the Geometry type type = sqlite3_column_type(stmt, 2); if (type == SQLITE_NULL) geom_null = true; else if (strcmp("LINESTRING", (char *) sqlite3_column_text(stmt, 2)) != 0) geom_not_linestring = true; col_n = 3; if (cost_length == false) { // the Cost type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) cost_null = true; if (type == SQLITE_TEXT) cost_text = true; if (type == SQLITE_BLOB) cost_blob = true; } if (one_way == true) { // the FromTo type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) fromto_null = true; if (type == SQLITE_FLOAT) fromto_double = true; if (type == SQLITE_TEXT) fromto_text = true; if (type == SQLITE_BLOB) fromto_blob = true; // the ToFrom type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) tofrom_null = true; if (type == SQLITE_FLOAT) tofrom_double = true; if (type == SQLITE_TEXT) tofrom_text = true; if (type == SQLITE_BLOB) tofrom_blob = true; } } else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); ret = 1; if (from_null == true) ret = 0; if (from_blob == true) ret = 0; if (from_double == true) ret = 0; if (to_null == true) ret = 0; if (to_blob == true) ret = 0; if (to_double == true) ret = 0; if (geom_null == true) ret = 0; if (geom_not_linestring == true) ret = 0; if (cost_length == false) { if (cost_null == true) ret = 0; if (cost_blob == true) ret = 0; if (cost_text == true) ret = 0; } if (one_way == true) { if (fromto_null == true) ret = 0; if (fromto_blob == true) ret = 0; if (fromto_text == true) ret = 0; if (fromto_double == true) ret = 0; if (tofrom_null == true) ret = 0; if (tofrom_blob == true) ret = 0; if (tofrom_text == true) ret = 0; if (tofrom_double == true) ret = 0; } if (!ret) goto abort; if (from_int == true && to_int == true) { // each node is identified by an INTEGER id p_graph->SetNodeCode(false); } else if (from_text == true && to_text == true) { // each node is identified by a TEXT code p_graph->SetNodeCode(true); } else goto abort; p_graph->InitNodes(); // checking topologic consistency strcpy(xname, from.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("SELECT ROWID, ") + wxString::FromUTF8(xname); strcpy(xname, to.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname) + wxT(", "); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxT("X(StartPoint(") + wxString::FromUTF8(xname) + wxT(")), Y(StartPoint("); sql += wxString::FromUTF8(xname) + wxT(")), "); sql += wxT("X(EndPoint(") + wxString::FromUTF8(xname) + wxT(")), Y(EndPoint("); sql += wxString::FromUTF8(xname) + wxT("))"); if (aStarSupported == true) { // supporting A* algorithm if (cost_length == false) { strcpy(xname, cost.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", GLength(") + wxString::FromUTF8(xname) + wxT(")"); col_n = 9; aStarLength = true; } else { strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", GLength(") + wxString::FromUTF8(xname) + wxT(")"); col_n = 9; aStarLength = false; min_a_star_coeff = 1.0; } } else { // A* algorithm unsupported if (cost_length == false) { strcpy(xname, cost.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); col_n = 8; } else { strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", GLength(") + wxString::FromUTF8(xname) + wxT(")"); col_n = 9; } aStarLength = false; } if (one_way == true) { strcpy(xname, one_way_to_from.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); tofrom_n = col_n; col_n++; strcpy(xname, one_way_from_to.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); fromto_n = col_n; col_n++; } strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(" FROM ") + wxString::FromUTF8(xname); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } n_columns = sqlite3_column_count(stmt); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { fromto = true; tofrom = true; if (p_graph->IsNodeCode() == true) { id_from = -1; id_to = -1; } else { *code_from = '\0'; *code_to = '\0'; } // fetching the ROWID rowid = sqlite3_column_int64(stmt, 0); // fetching the NodeFrom value if (p_graph->IsNodeCode() == true) strcpy(code_from, (char *) sqlite3_column_text(stmt, 1)); else id_from = sqlite3_column_int64(stmt, 1); // fetching the NodeTo value if (p_graph->IsNodeCode() == true) strcpy(code_to, (char *) sqlite3_column_text(stmt, 2)); else id_to = sqlite3_column_int64(stmt, 2); // fetching the NodeFromX value node_from_x = sqlite3_column_double(stmt, 3); // fetching the NodeFromY value node_from_y = sqlite3_column_double(stmt, 4); // fetching the NodeFromX value node_to_x = sqlite3_column_double(stmt, 5); // fetching the NodeFromY value node_to_y = sqlite3_column_double(stmt, 6); // fetching the Cost value cost_val = sqlite3_column_double(stmt, 7); if (one_way == true) { // fetching the OneWay-FromTo value fromto = sqlite3_column_int(stmt, fromto_n); // fetching the OneWay-ToFrom value tofrom = sqlite3_column_int(stmt, tofrom_n); } if (cost_val <= 0.0) p_graph->SetError(); if (aStarLength == true) { // supporting A* - fetching the arc length a_star_length = sqlite3_column_double(stmt, 8); a_star_coeff = cost_val / a_star_length; if (a_star_coeff < min_a_star_coeff) min_a_star_coeff = a_star_coeff; } if (bidirectional == true) { if (fromto) { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_from, code_to, node_from_x, node_from_y, node_to_x, node_to_y, cost_val); else p_graph->AddArc(rowid, id_from, id_to, node_from_x, node_from_y, node_to_x, node_to_y, cost_val); } if (tofrom) { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_to, code_from, node_to_x, node_to_y, node_from_x, node_from_y, cost_val); else p_graph->AddArc(rowid, id_to, id_from, node_to_x, node_to_y, node_from_x, node_from_y, cost_val); } } else { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_from, code_to, node_from_x, node_from_y, node_to_x, node_to_y, cost_val); else p_graph->AddArc(rowid, id_from, id_to, node_from_x, node_from_y, node_to_x, node_to_y, cost_val); } if (p_graph->IsError() == true) { sqlite3_finalize(stmt); goto abort; } } else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); ::wxEndBusyCursor(); wr = CreateNetwork(p_graph, table, from, to, geometry, name, aStarSupported, min_a_star_coeff, dataTableName, virtualTableName); if (wr == true) { endMsg = wxT("OK: VirtualNetwork table '") + table + wxT("_net' successfully created"); wxMessageBox(endMsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { endMsg = wxT("DB ERROR: VirtualNetwork table '") + table + wxT("_net' was not created"); wxMessageBox(endMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } if (p_graph) delete p_graph; InitTableTree(); return; abort: ::wxEndBusyCursor(); msg = wxT ("It's impossible to build a Network using the given configuration;\nsome fatal error occurred\n\n"); msg += wxT("please note: using the 'spatialite_network' command-line tool\n"); msg += wxT ("you can obtain a full detailed report explaining causes for this failure"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (p_graph) delete p_graph; } void MyFrame::BuildNetwork(wxString & table, wxString & from, wxString & to, wxString & name, wxString & cost, bool bidirectional, bool one_way, wxString & one_way_from_to, wxString & one_way_to_from, wxString & dataTableName, wxString & virtualTableName) { // // trying to build a Network - NO-GEOMETRY // int ret; sqlite3_stmt *stmt; Network *p_graph = NULL; wxString sql; char xsql[2048]; char **results; int n_rows; int n_columns; int i; char *errMsg = NULL; char *col_name; int type; bool ok_from_column = false; bool ok_to_column = false; bool ok_cost_column = false; bool ok_name_column = false; bool ok_oneway_tofrom = false; bool ok_oneway_fromto = false; bool from_null = false; bool from_int = false; bool from_double = false; bool from_text = false; bool from_blob = false; bool to_null = false; bool to_int = false; bool to_double = false; bool to_text = false; bool to_blob = false; bool cost_null = false; bool cost_text = false; bool cost_blob = false; bool tofrom_null = false; bool tofrom_double = false; bool tofrom_text = false; bool tofrom_blob = false; bool fromto_null = false; bool fromto_double = false; bool fromto_text = false; bool fromto_blob = false; int col_n; int fromto_n = 0; int tofrom_n = 0; sqlite3_int64 rowid; sqlite3_int64 id_from = -1; sqlite3_int64 id_to = -1; char code_from[1024]; char code_to[1024]; double cost_val; int fromto; int tofrom; wxString endMsg; wxString msg; bool wr; char xname[1024]; ::wxBeginBusyCursor(); // checking for table existence sql = wxT("SELECT tbl_name FROM sqlite_master WHERE Lower(tbl_name) = Lower('"); strcpy(xname, table.ToUTF8()); CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("') AND type = 'table'"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, &errMsg); if (ret != SQLITE_OK) { // some error occurred wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (n_rows == 0) { // required table does not exists wxMessageBox(wxT("ERROR: table ") + table + wxT(" does not exists"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } else sqlite3_free_table(results); // checking for columns existence sql = wxT("PRAGMA table_info("); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_get_table(SqliteHandle, xsql, &results, &n_rows, &n_columns, &errMsg); if (ret != SQLITE_OK) { // some error occurred wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (n_rows > 1) { for (i = 1; i <= n_rows; i++) { char xcol[256]; col_name = results[(i * n_columns) + 1]; strcpy(xcol, from.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_from_column = true; strcpy(xcol, to.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_to_column = true; strcpy(xcol, cost.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_cost_column = true; if (name.Len() > 0) { strcpy(xcol, name.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_name_column = true; } if (one_way == true) { strcpy(xcol, one_way_from_to.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_oneway_tofrom = true; } if (one_way == true) { strcpy(xcol, one_way_to_from.ToUTF8()); if (strcasecmp(xcol, col_name) == 0) ok_oneway_fromto = true; } } sqlite3_free_table(results); } if (ok_from_column == true && ok_to_column == true) ; else goto abort; if (name.Len() > 0 && ok_name_column == false) goto abort; if (ok_cost_column == false) goto abort; if (one_way == true && ok_oneway_tofrom == false) goto abort; if (one_way == true && ok_oneway_fromto == false) goto abort; // checking column types p_graph = new Network(); strcpy(xname, from.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("SELECT ") + wxString::FromUTF8(xname); strcpy(xname, to.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); strcpy(xname, cost.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); col_n = 3; if (one_way == true) { strcpy(xname, one_way_to_from.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); tofrom_n = col_n; col_n++; strcpy(xname, one_way_from_to.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); fromto_n = col_n; col_n++; } strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(" FROM ") + wxString::FromUTF8(xname); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } n_columns = sqlite3_column_count(stmt); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { // the NodeFrom type type = sqlite3_column_type(stmt, 0); if (type == SQLITE_NULL) from_null = true; if (type == SQLITE_INTEGER) { from_int = true; id_from = sqlite3_column_int64(stmt, 0); p_graph->InsertNode(id_from); } if (type == SQLITE_FLOAT) from_double = true; if (type == SQLITE_TEXT) { from_text = true; strcpy(code_from, (char *) sqlite3_column_text(stmt, 0)); p_graph->InsertNode(code_from); } if (type == SQLITE_BLOB) from_blob = true; // the NodeTo type type = sqlite3_column_type(stmt, 1); if (type == SQLITE_NULL) to_null = true; if (type == SQLITE_INTEGER) { to_int = true; id_to = sqlite3_column_int64(stmt, 1); p_graph->InsertNode(id_to); } if (type == SQLITE_FLOAT) to_double = true; if (type == SQLITE_TEXT) { to_text = true; strcpy(code_to, (char *) sqlite3_column_text(stmt, 1)); p_graph->InsertNode(code_to); } if (type == SQLITE_BLOB) to_blob = true; // the Cost type type = sqlite3_column_type(stmt, 2); if (type == SQLITE_NULL) cost_null = true; if (type == SQLITE_TEXT) cost_text = true; if (type == SQLITE_BLOB) cost_blob = true; col_n = 3; if (one_way == true) { // the FromTo type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) fromto_null = true; if (type == SQLITE_FLOAT) fromto_double = true; if (type == SQLITE_TEXT) fromto_text = true; if (type == SQLITE_BLOB) fromto_blob = true; // the ToFrom type type = sqlite3_column_type(stmt, col_n); col_n++; if (type == SQLITE_NULL) tofrom_null = true; if (type == SQLITE_FLOAT) tofrom_double = true; if (type == SQLITE_TEXT) tofrom_text = true; if (type == SQLITE_BLOB) tofrom_blob = true; } } else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); ret = 1; if (from_null == true) ret = 0; if (from_blob == true) ret = 0; if (from_double == true) ret = 0; if (to_null == true) ret = 0; if (to_blob == true) ret = 0; if (to_double == true) ret = 0; if (cost_null == true) ret = 0; if (cost_blob == true) ret = 0; if (cost_text == true) ret = 0; if (one_way == true) { if (fromto_null == true) ret = 0; if (fromto_blob == true) ret = 0; if (fromto_text == true) ret = 0; if (fromto_double == true) ret = 0; if (tofrom_null == true) ret = 0; if (tofrom_blob == true) ret = 0; if (tofrom_text == true) ret = 0; if (tofrom_double == true) ret = 0; } if (!ret) goto abort; if (from_int == true && to_int == true) { // each node is identified by an INTEGER id p_graph->SetNodeCode(false); } else if (from_text == true && to_text == true) { // each node is identified by a TEXT code p_graph->SetNodeCode(true); } else goto abort; p_graph->InitNodes(); // checking topological consistency strcpy(xname, from.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("SELECT ROWID, ") + wxString::FromUTF8(xname); strcpy(xname, to.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); strcpy(xname, cost.ToUTF8()); DoubleQuotedSql(xname); strcpy(xname, cost.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); col_n = 4; if (one_way == true) { strcpy(xname, one_way_to_from.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); tofrom_n = col_n; col_n++; strcpy(xname, one_way_from_to.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(", ") + wxString::FromUTF8(xname); fromto_n = col_n; col_n++; } strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxT(" FROM ") + wxString::FromUTF8(xname); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("SQL error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } n_columns = sqlite3_column_count(stmt); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { fromto = true; tofrom = true; if (p_graph->IsNodeCode() == true) { id_from = -1; id_to = -1; } else { *code_from = '\0'; *code_to = '\0'; } // fetching the ROWID rowid = sqlite3_column_int64(stmt, 0); // fetching the NodeFrom value if (p_graph->IsNodeCode() == true) strcpy(code_from, (char *) sqlite3_column_text(stmt, 1)); else id_from = sqlite3_column_int64(stmt, 1); // fetching the NodeTo value if (p_graph->IsNodeCode() == true) strcpy(code_to, (char *) sqlite3_column_text(stmt, 2)); else id_to = sqlite3_column_int64(stmt, 2); // fetching the Cost value cost_val = sqlite3_column_double(stmt, 3); if (one_way == true) { // fetching the OneWay-FromTo value fromto = sqlite3_column_int(stmt, fromto_n); // fetching the OneWay-ToFrom value tofrom = sqlite3_column_int(stmt, tofrom_n); } if (cost_val <= 0.0) p_graph->SetError(); if (bidirectional == true) { if (fromto) { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_from, code_to, cost_val); else p_graph->AddArc(rowid, id_from, id_to, cost_val); } if (tofrom) { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_to, code_from, cost_val); else p_graph->AddArc(rowid, id_to, id_from, cost_val); } } else { if (p_graph->IsNodeCode() == true) p_graph->AddArc(rowid, code_from, code_to, cost_val); else p_graph->AddArc(rowid, id_from, id_to, cost_val); } if (p_graph->IsError() == true) { sqlite3_finalize(stmt); goto abort; } } else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); ::wxEndBusyCursor(); wr = CreateNetwork(p_graph, table, from, to, name, dataTableName, virtualTableName); if (wr == true) { endMsg = wxT("OK: VirtualNetwork table '") + table + wxT("_net' successfully created"); wxMessageBox(endMsg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { endMsg = wxT("DB ERROR: VirtualNetwork table '") + table + wxT("_net' was not created"); wxMessageBox(endMsg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } if (p_graph) delete p_graph; InitTableTree(); return; abort: ::wxEndBusyCursor(); msg = wxT ("It's impossible to build a Network using the given configuration;\nsome fatal error occurred\n\n"); msg += wxT("please note: using the 'spatialite_network' command-line tool\n"); msg += wxT ("you can obtain a full detailed report explaining causes for this failure"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); if (p_graph) delete p_graph; } void MyFrame::OutputNetNode(unsigned char *auxbuf, int *size, int ind, bool node_code, int max_node_length, NetNode * pN, int endian_arch, bool aStarSupported) { // // exporting a Node into NETWORK-DATA // int n_star; int i; NetArc **arc_array; NetArc *pA; unsigned char *out = auxbuf; *out++ = GAIA_NET_NODE; gaiaExport32(out, ind, 1, endian_arch); // the Node internal index out += 4; if (node_code) { // Nodes are identified by a TEXT Code memset(out, '\0', max_node_length); strcpy((char *) out, pN->GetCode().ToUTF8()); out += max_node_length; } else { // Nodes are identified by an INTEGER Id gaiaExportI64(out, pN->GetId(), 1, endian_arch); out += 8; } if (aStarSupported) { // in order to support the A* algorithm [X,Y] are required for each node gaiaExport64(out, pN->GetX(), 1, endian_arch); out += 8; gaiaExport64(out, pN->GetY(), 1, endian_arch); out += 8; } arc_array = pN->PrepareOutcomings(&n_star); gaiaExport16(out, n_star, 1, endian_arch); // # of outcoming arcs out += 2; for (i = 0; i < n_star; i++) { // exporting the outcoming arcs pA = *(arc_array + i); *out++ = GAIA_NET_ARC; gaiaExportI64(out, pA->GetRowId(), 1, endian_arch); // the Arc rowid out += 8; gaiaExport32(out, pA->GetTo()->GetInternalIndex(), 1, endian_arch); // the ToNode internal index out += 4; gaiaExport64(out, pA->GetCost(), 1, endian_arch); // the Arc Cost out += 8; *out++ = GAIA_NET_END; } if (arc_array) delete[]arc_array; *out++ = GAIA_NET_END; *size = out - auxbuf; } bool MyFrame::CreateNetwork(Network * p_graph, wxString & table, wxString & from, wxString & to, wxString & geometry, wxString & name, bool aStarSupported, double aStarCoeff, wxString & dataTableName, wxString & virtualTableName) { // // creates the NETWORK-DATA table // int ret; wxString sql; char xsql[1024]; char *errMsg = NULL; unsigned char *auxbuf = new unsigned char[MAX_BLOCK]; unsigned char *buf = new unsigned char[MAX_BLOCK]; unsigned char *out; sqlite3_stmt *stmt; int i; int size; int endian_arch = gaiaEndianArch(); NetNode *pN; int pk = 0; int nodes_cnt = 0; int len; bool net_data_exists = false; bool net_exists = false; bool delete_existing = false; char xname[1024]; net_data_exists = TableAlreadyExists(dataTableName); net_exists = TableAlreadyExists(virtualTableName); if (net_data_exists == true || net_exists == true) { // asking permission to overwrite existing tables wxString msg; if (net_data_exists == true) msg += wxT("A table named '") + dataTableName + wxT("' already exists\n"); if (net_exists == true) msg += wxT("A table named '") + virtualTableName + wxT("' already exists\n"); msg += wxT("\nDo you allow DROPping existing table(s) ?"); wxMessageDialog confirm(this, msg, wxT("Confirm overwrite"), wxYES_NO | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret == wxID_YES) delete_existing = true; } ::wxBeginBusyCursor(); for (i = 0; i < p_graph->GetNumNodes(); i++) { // setting the internal index to each Node pN = p_graph->GetSortedNode(i); pN->SetInternalIndex(i); } // starts a transaction ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (delete_existing == true) { strcpy(xname, virtualTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("DROP TABLE IF EXISTS ") + wxString::FromUTF8(xname); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } strcpy(xname, dataTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("DROP TABLE IF EXISTS ") + wxString::FromUTF8(xname); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } } // creating the NETWORK-DATA table strcpy(xname, dataTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("CREATE TABLE ") + wxString::FromUTF8(xname); sql += wxT(" (Id INTEGER PRIMARY KEY, NetworkData BLOB NOT NULL)"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // preparing the SQL statement strcpy(xname, dataTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("INSERT INTO ") + wxString::FromUTF8(xname) + wxT(" (Id, NetworkData) VALUES (?, ?)"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("INSERT error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } if (pk == 0) { // preparing the HEADER block out = buf; if (aStarSupported) *out++ = GAIA_NET64_A_STAR_START; else *out++ = GAIA_NET64_START; *out++ = GAIA_NET_HEADER; gaiaExport32(out, p_graph->GetNumNodes(), 1, endian_arch); // how many Nodes are there out += 4; if (p_graph->IsNodeCode() == true) *out++ = GAIA_NET_CODE; // Nodes are identified by a TEXT code else *out++ = GAIA_NET_ID; // Nodes are identified by an INTEGER id if (p_graph->IsNodeCode() == true) *out++ = p_graph->GetMaxCodeLength(); // max TEXT code length else *out++ = 0x00; // inserting the main Table name *out++ = GAIA_NET_TABLE; len = table.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Table Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, table.ToUTF8()); out += len; // inserting the NodeFrom column name *out++ = GAIA_NET_FROM; len = from.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the NodeFrom column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, from.ToUTF8()); out += len; // inserting the NodeTo column name *out++ = GAIA_NET_TO; len = to.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the NodeTo column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, to.ToUTF8()); out += len; // inserting the Geometry column name *out++ = GAIA_NET_GEOM; len = geometry.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Geometry column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, geometry.ToUTF8()); out += len; // inserting the Name column name - may be empty *out++ = GAIA_NET_NAME; if (name.Len() == 0) len = 1; else len = name.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Name column Name length, including last '\0' out += 2; memset(out, '\0', len); if (name.Len() > 0) strcpy((char *) out, name.ToUTF8()); out += len; if (aStarSupported) { // inserting the A* Heuristic Coeff *out++ = GAIA_NET_A_STAR_COEFF; gaiaExport64(out, aStarCoeff, 1, endian_arch); out += 8; } *out++ = GAIA_NET_END; // INSERTing the Header block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } pk++; // preparing a new block out = buf; *out++ = GAIA_NET_BLOCK; gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block out += 2; nodes_cnt = 0; } for (i = 0; i < p_graph->GetNumNodes(); i++) { // looping on each Node pN = p_graph->GetSortedNode(i); OutputNetNode(auxbuf, &size, i, p_graph->IsNodeCode(), p_graph->GetMaxCodeLength(), pN, endian_arch, aStarSupported); if (size >= (MAX_BLOCK - (out - buf))) { // inserting the last block gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } pk++; // preparing a new block out = buf; *out++ = GAIA_NET_BLOCK; gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block out += 2; nodes_cnt = 0; } // inserting the current Node into the block nodes_cnt++; memcpy(out, auxbuf, size); out += size; } if (nodes_cnt) { // inserting the last block gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); // creating the VirtualNetwork NET-table strcpy(xname, virtualTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("CREATE VIRTUAL TABLE ") + wxString::FromUTF8(xname); sql += wxT(" USING VirtualNetwork("); strcpy(xname, dataTableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname) + wxT(")"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE VIRTUAL TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // commits the transaction ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (buf) delete[]buf; if (auxbuf) delete[]auxbuf; ::wxEndBusyCursor(); return true; abort: ::wxEndBusyCursor(); if (buf) delete[]buf; if (auxbuf) delete[]auxbuf; return true; return false; } bool MyFrame::CreateNetwork(Network * p_graph, wxString & table, wxString & from, wxString & to, wxString & name, wxString & dataTableName, wxString & virtualTableName) { // // creates the NETWORK-DATA table . NO-GEOMETRY // int ret; wxString sql; char xsql[1024]; char *errMsg = NULL; unsigned char *auxbuf = new unsigned char[MAX_BLOCK]; unsigned char *buf = new unsigned char[MAX_BLOCK]; unsigned char *out; sqlite3_stmt *stmt; int i; int size; int endian_arch = gaiaEndianArch(); NetNode *pN; int pk = 0; int nodes_cnt = 0; int len; bool net_data_exists = false; bool net_exists = false; bool delete_existing = false; char xname[1024]; net_data_exists = TableAlreadyExists(dataTableName); net_exists = TableAlreadyExists(virtualTableName); if (net_data_exists == true || net_exists == true) { // asking permission to overwrite existing tables wxString msg; if (net_data_exists == true) msg += wxT("A table named '") + dataTableName + wxT("' already exists\n"); if (net_exists == true) msg += wxT("A table named '") + virtualTableName + wxT("' already exists\n"); msg += wxT("\nDo you allow DROPping existing table(s) ?"); wxMessageDialog confirm(this, msg, wxT("Confirm overwrite"), wxYES_NO | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret == wxID_YES) delete_existing = true; } ::wxBeginBusyCursor(); for (i = 0; i < p_graph->GetNumNodes(); i++) { // setting the internal index to each Node pN = p_graph->GetSortedNode(i); pN->SetInternalIndex(i); } // starts a transaction ret = sqlite3_exec(SqliteHandle, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("BEGIN error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (delete_existing == true) { strcpy(xname, virtualTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("DROP TABLE IF EXISTS ") + wxString::FromUTF8(xname); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } strcpy(xname, dataTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("DROP TABLE IF EXISTS ") + wxString::FromUTF8(xname); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("DROP TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } } // creating the NETWORK-DATA table strcpy(xname, dataTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("CREATE TABLE ") + wxString::FromUTF8(xname); sql += wxT(" (Id INTEGER PRIMARY KEY, NetworkData BLOB NOT NULL)"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // preparing the SQL statement strcpy(xname, dataTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("INSERT INTO ") + wxString::FromUTF8(xname) + wxT(" (Id, NetworkData) VALUES (?, ?)"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_prepare_v2(SqliteHandle, xsql, strlen(xsql), &stmt, NULL); if (ret != SQLITE_OK) { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("INSERT error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto abort; } if (pk == 0) { // preparing the HEADER block out = buf; *out++ = GAIA_NET64_START; *out++ = GAIA_NET_HEADER; gaiaExport32(out, p_graph->GetNumNodes(), 1, endian_arch); // how many Nodes are there out += 4; if (p_graph->IsNodeCode() == true) *out++ = GAIA_NET_CODE; // Nodes are identified by a TEXT code else *out++ = GAIA_NET_ID; // Nodes are identified by an INTEGER id if (p_graph->IsNodeCode() == true) *out++ = p_graph->GetMaxCodeLength(); // max TEXT code length else *out++ = 0x00; // inserting the main Table name *out++ = GAIA_NET_TABLE; len = table.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Table Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, table.ToUTF8()); out += len; // inserting the NodeFrom column name *out++ = GAIA_NET_FROM; len = from.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the NodeFrom column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, from.ToUTF8()); out += len; // inserting the NodeTo column name *out++ = GAIA_NET_TO; len = to.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the NodeTo column Name length, including last '\0' out += 2; memset(out, '\0', len); strcpy((char *) out, to.ToUTF8()); out += len; // inserting the Geometry column name *out++ = GAIA_NET_GEOM; len = 1; gaiaExport16(out, len, 1, endian_arch); // the Geometry column Name length, including last '\0' out += 2; memset(out, '\0', len); out += len; // inserting the Name column name - may be empty *out++ = GAIA_NET_NAME; if (name.Len() == 0) len = 1; else len = name.Len() + 1; gaiaExport16(out, len, 1, endian_arch); // the Name column Name length, including last '\0' out += 2; memset(out, '\0', len); if (name.Len() > 0) strcpy((char *) out, name.ToUTF8()); out += len; *out++ = GAIA_NET_END; // INSERTing the Header block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } pk++; // preparing a new block out = buf; *out++ = GAIA_NET_BLOCK; gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block out += 2; nodes_cnt = 0; } for (i = 0; i < p_graph->GetNumNodes(); i++) { // looping on each Node pN = p_graph->GetSortedNode(i); OutputNetNode(auxbuf, &size, i, p_graph->IsNodeCode(), p_graph->GetMaxCodeLength(), pN, endian_arch, 0); if (size >= (MAX_BLOCK - (out - buf))) { // inserting the last block gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } pk++; // preparing a new block out = buf; *out++ = GAIA_NET_BLOCK; gaiaExport16(out, 0, 1, endian_arch); // how many Nodes are into this block out += 2; nodes_cnt = 0; } // inserting the current Node into the block nodes_cnt++; memcpy(out, auxbuf, size); out += size; } if (nodes_cnt) { // inserting the last block gaiaExport16(buf + 1, nodes_cnt, 1, endian_arch); // how many Nodes are into this block sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pk); sqlite3_bind_blob(stmt, 2, buf, out - buf, SQLITE_STATIC); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); wxMessageBox(wxT("sqlite3_step error: ") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto abort; } } sqlite3_finalize(stmt); // creating the VirtualNetwork NET-table strcpy(xname, virtualTableName.ToUTF8()); DoubleQuotedSql(xname); sql = wxT("CREATE VIRTUAL TABLE ") + wxString::FromUTF8(xname); sql += wxT(" USING VirtualNetwork("); strcpy(xname, dataTableName.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname) + wxT(")"); strcpy(xsql, sql.ToUTF8()); ret = sqlite3_exec(SqliteHandle, xsql, NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CREATE VIRTUAL TABLE error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } // commits the transaction ret = sqlite3_exec(SqliteHandle, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("COMMIT error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto abort; } if (buf) delete[]buf; if (auxbuf) delete[]auxbuf; ::wxEndBusyCursor(); return true; abort: ::wxEndBusyCursor(); if (buf) delete[]buf; if (auxbuf) delete[]auxbuf; return true; return false; } int cmp_prenodes_code(const void *p1, const void *p2) { // // compares two preliminary nodes by CODE [for QSORT] // NetNodePre *pP1 = *((NetNodePre **) p1); NetNodePre *pP2 = *((NetNodePre **) p2); return pP1->GetCode().Cmp(pP2->GetCode()); } int cmp_prenodes_id(const void *p1, const void *p2) { // // compares two preliminary nodes by ID [for QSORT] // NetNodePre *pP1 = *((NetNodePre **) p1); NetNodePre *pP2 = *((NetNodePre **) p2); if (pP1->GetId() == pP2->GetId()) return 0; if (pP1->GetId() > pP2->GetId()) return 1; return -1; } int cmp_nodes2_code(const void *p1, const void *p2) { // // compares two nodes by CODE [for BSEARCH] // NetNode *pN1 = (NetNode *) p1; NetNode *pN2 = *((NetNode **) p2); return pN1->GetCode().Cmp(pN2->GetCode()); } int cmp_nodes2_id(const void *p1, const void *p2) { // // compares two nodes by ID [for BSEARCH] // NetNode *pN1 = (NetNode *) p1; NetNode *pN2 = *((NetNode **) p2); if (pN1->GetId() == pN2->GetId()) return 0; if (pN1->GetId() > pN2->GetId()) return 1; return -1; } int cmp_nodes1_code(const void *p1, const void *p2) { // // compares two nodes by CODE [for QSORT] // NetNode *pN1 = *((NetNode **) p1); NetNode *pN2 = *((NetNode **) p2); return pN1->GetCode().Cmp(pN2->GetCode()); } int cmp_nodes1_id(const void *p1, const void *p2) { // // compares two nodes by ID [for QSORT ] // NetNode *pN1 = *((NetNode **) p1); NetNode *pN2 = *((NetNode **) p2); if (pN1->GetId() == pN2->GetId()) return 0; if (pN1->GetId() > pN2->GetId()) return 1; return -1; } NetNodePre::NetNodePre(sqlite3_int64 id) { // // Network Node [preliminary] constructor // Id = id; Code = wxT(""); Next = NULL; } NetNodePre::NetNodePre(const char *code) { // // Network Node [preliminary] constructor // Id = -1; Code = wxString::FromUTF8(code); Code.Truncate(30); Next = NULL; } NetNode::NetNode(sqlite3_int64 id) { // // Network Node [final] constructor // InternalIndex = -1; Id = id; Code = wxT(""); X = DBL_MAX; Y = DBL_MAX; First = NULL; Last = NULL; Next = NULL; } NetNode::NetNode(wxString & code) { // // Network Node [final] constructor // InternalIndex = -1; Id = -1; Code = code; X = DBL_MAX; Y = DBL_MAX; First = NULL; Last = NULL; Next = NULL; } NetNode::~NetNode() { // Network Node [final] destructor NetArcRef *pAR; NetArcRef *pARn; pAR = First; while (pAR) { pARn = pAR->GetNext(); delete pAR; pAR = pARn; } } void NetNode::AddOutcoming(NetArc * pA) { // // adds an outcoming Arc to a Node // NetArcRef *pAR = new NetArcRef(pA); if (!First) First = pAR; if (Last) Last->SetNext(pAR); Last = pAR; } NetArc **NetNode::PrepareOutcomings(int *count) { // // preparing the outcoming arc array // NetArc **arc_array; int n = 0; int i; bool ok; NetArcRef *pAR; NetArc *pA0; NetArc *pA1; pAR = First; while (pAR) { // counting how many outcoming arcs are there n++; pAR = pAR->GetNext(); } if (!n) { *count = 0; return NULL; } arc_array = new NetArc *[n]; i = 0; pAR = First; while (pAR) { // populating the arcs array *(arc_array + i++) = pAR->GetReference(); pAR = pAR->GetNext(); } ok = true; while (ok == true) { // bubble sorting the arcs by Cost ok = false; for (i = 1; i < n; i++) { pA0 = *(arc_array + i - 1); pA1 = *(arc_array + i); if (pA0->GetCost() > pA1->GetCost()) { // swapping the arcs *(arc_array + i - 1) = pA1; *(arc_array + i) = pA0; ok = true; } } } *count = n; return arc_array; } NetArc::NetArc(sqlite3_int64 rowid, NetNode * from, NetNode * to, double cost) { // // Network Arc constructor // RowId = rowid; From = from; To = to; Cost = cost; Next = NULL; } Network::Network() { // // Network constructor // FirstPre = NULL; LastPre = NULL; NumPreNodes = 0; SortedPreNodes = NULL; NumPreNodes = 0; SortedPreNodes = NULL; FirstArc = NULL; LastArc = NULL; FirstNode = NULL; LastNode = NULL; NumNodes = 0; SortedNodes = NULL; Error = false; NodeCode = false; MaxCodeLength = 0; } Network::~Network() { // // Network destructor // NetArc *pA; NetArc *pAn; NetNode *pN; NetNode *pNn; CleanPreNodes(); pA = FirstArc; while (pA) { pAn = pA->GetNext(); delete pA; pA = pAn; } pN = FirstNode; while (pN) { pNn = pN->GetNext(); delete pN; pN = pNn; } if (SortedNodes) delete[]SortedNodes; } void Network::CleanPreNodes() { // // cleaning up the preliminary Nodes list // NetNodePre *pP; NetNodePre *pPn; pP = FirstPre; while (pP) { pPn = pP->GetNext(); delete pP; pP = pPn; } FirstPre = NULL; LastPre = NULL; NumPreNodes = 0; if (SortedPreNodes) delete[]SortedPreNodes; SortedPreNodes = NULL; } void Network::InsertNode(sqlite3_int64 id) { // // inserts a Node into the preliminary list // NetNodePre *pP = new NetNodePre(id); if (!FirstPre) FirstPre = pP; if (LastPre) LastPre->SetNext(pP); LastPre = pP; } void Network::InsertNode(const char *code) { // // inserts a Node into the preliminary list // NetNodePre *pP = new NetNodePre(code); if (!FirstPre) FirstPre = pP; if (LastPre) LastPre->SetNext(pP); LastPre = pP; } void Network::AddNode(sqlite3_int64 id) { // // inserts a Node into the final list // NetNode *pN = new NetNode(id); if (!FirstNode) FirstNode = pN; if (LastNode) LastNode->SetNext(pN); LastNode = pN; } void Network::AddNode(wxString & code) { // // inserts a Node into the final list // int len; NetNode *pN = new NetNode(code); len = pN->GetCode().Len() + 1; if (len > MaxCodeLength) MaxCodeLength = len; if (!FirstNode) FirstNode = pN; if (LastNode) LastNode->SetNext(pN); LastNode = pN; } NetNode *Network::ProcessNode(sqlite3_int64 id, double x, double y, NetNode ** pOther) { // // inserts a new node or retrieves an already defined one // NetNode *pN = Find(id); *pOther = NULL; if (pN) { // this Node already exists into the sorted list if (pN->GetX() == DBL_MAX && pN->GetY() == DBL_MAX) { pN->SetX(x); pN->SetY(y); } else { if (pN->GetX() == x && pN->GetY() == y) ; else *pOther = pN; } return pN; } // unexpected error; undefined Node return NULL; } NetNode *Network::ProcessNode(wxString & code, double x, double y, NetNode ** pOther) { // // inserts a new node or retrieves an already defined one // NetNode *pN = Find(code); *pOther = NULL; if (pN) { // this Node already exists into the sorted list if (pN->GetX() == DBL_MAX && pN->GetY() == DBL_MAX) { pN->SetX(x); pN->SetY(y); } else { if (pN->GetX() == x && pN->GetY() == y) ; else *pOther = pN; } return pN; } // unexpected error; undefined Node return NULL; } NetNode *Network::ProcessNode(sqlite3_int64 id, NetNode ** pOther) { // // inserts a new node or retrieves an already defined one // NetNode *pN = Find(id); *pOther = NULL; return pN; } NetNode *Network::ProcessNode(wxString & code, NetNode ** pOther) { // // inserts a new node or retrieves an already defined one // NetNode *pN = Find(code); *pOther = NULL; return pN; } void Network::AddArc(sqlite3_int64 rowid, sqlite3_int64 id_from, sqlite3_int64 id_to, double node_from_x, double node_from_y, double node_to_x, double node_to_y, double cost) { // // inserting an arc into the memory structures // NetNode *pFrom; NetNode *pTo; NetNode *pN2; NetArc *pA; pFrom = ProcessNode(id_from, node_from_x, node_from_y, &pN2); if (pN2) Error = true; pTo = ProcessNode(id_to, node_to_x, node_to_y, &pN2); if (pN2) Error = true; if (!pFrom) Error = true; if (!pTo) Error = true; if (pFrom == pTo) Error = true; if (Error == true) return; pA = new NetArc(rowid, pFrom, pTo, cost); if (!FirstArc) FirstArc = pA; if (LastArc) LastArc->SetNext(pA); LastArc = pA; // updating Node connections pFrom->AddOutcoming(pA); } void Network::AddArc(sqlite3_int64 rowid, const char *code_from, const char *code_to, double node_from_x, double node_from_y, double node_to_x, double node_to_y, double cost) { // // inserting an arc into the memory structures // NetNode *pFrom; NetNode *pTo; NetNode *pN2; NetArc *pA; wxString stCode = wxString::FromUTF8(code_from); pFrom = ProcessNode(stCode, node_from_x, node_from_y, &pN2); if (pN2) Error = true; stCode = wxString::FromUTF8(code_to); pTo = ProcessNode(stCode, node_to_x, node_to_y, &pN2); if (pN2) Error = true; if (!pFrom) Error = true; if (!pTo) Error = true; if (pFrom == pTo) Error = true; if (Error == true) return; pA = new NetArc(rowid, pFrom, pTo, cost); if (!FirstArc) FirstArc = pA; if (LastArc) LastArc->SetNext(pA); LastArc = pA; // updating Node connections pFrom->AddOutcoming(pA); } void Network::AddArc(sqlite3_int64 rowid, sqlite3_int64 id_from, sqlite3_int64 id_to, double cost) { // // inserting an arc into the memory structures // NetNode *pFrom; NetNode *pTo; NetNode *pN2; NetArc *pA; pFrom = ProcessNode(id_from, &pN2); if (pN2) Error = true; pTo = ProcessNode(id_to, &pN2); if (pN2) Error = true; if (!pFrom) Error = true; if (!pTo) Error = true; if (pFrom == pTo) Error = true; if (Error == true) return; pA = new NetArc(rowid, pFrom, pTo, cost); if (!FirstArc) FirstArc = pA; if (LastArc) LastArc->SetNext(pA); LastArc = pA; // updating Node connections pFrom->AddOutcoming(pA); } void Network::AddArc(sqlite3_int64 rowid, const char *code_from, const char *code_to, double cost) { // // inserting an arc into the memory structures // NetNode *pFrom; NetNode *pTo; NetNode *pN2; NetArc *pA; wxString stCode = wxString::FromUTF8(code_from); pFrom = ProcessNode(stCode, &pN2); if (pN2) Error = true; stCode = wxString::FromUTF8(code_to); pTo = ProcessNode(stCode, &pN2); if (pN2) Error = true; if (!pFrom) Error = true; if (!pTo) Error = true; if (pFrom == pTo) Error = true; if (Error == true) return; pA = new NetArc(rowid, pFrom, pTo, cost); if (!FirstArc) FirstArc = pA; if (LastArc) LastArc->SetNext(pA); LastArc = pA; // updating Node connections pFrom->AddOutcoming(pA); } void Network::Sort() { // // updating the Nodes sorted list // int i; NetNode *pN; NumNodes = 0; if (SortedNodes) { // we must free the already existent sorted list delete[]SortedNodes; } SortedNodes = NULL; pN = FirstNode; while (pN) { NumNodes++; pN = pN->GetNext(); } if (!NumNodes) return; SortedNodes = new NetNode *[NumNodes]; i = 0; pN = FirstNode; while (pN) { *(SortedNodes + i++) = pN; pN = pN->GetNext(); } if (NodeCode == true) { // Nodes are identified by a TEXT code qsort(SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes1_code); } else { // Nodes are identified by an INTEGER id qsort(SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes1_id); } } NetNode *Network::GetSortedNode(sqlite3_int64 x) { // // return a sorted Node [by position] // if (x >= 0 && x < NumNodes) return *(SortedNodes + x); return NULL; } NetNode *Network::Find(sqlite3_int64 id) { // // searching a Node into the sorted list // NetNode **ret; NetNode pN(id); if (!SortedNodes) return NULL; // Nodes are identified by an INTEGER id ret = (NetNode **) bsearch(&pN, SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes2_id); if (!ret) return NULL; return *ret; } NetNode *Network::Find(wxString & code) { // // searching a Node into the sorted list // NetNode **ret; NetNode pN(code); if (!SortedNodes) return NULL; // Nodes are identified by a TEXT code ret = (NetNode **) bsearch(&pN, SortedNodes, NumNodes, sizeof(NetNode *), cmp_nodes2_code); if (!ret) return NULL; return *ret; } void Network::InitNodes() { // // prepares the final Nodes list // sqlite3_int64 last_id; wxString last_code; int i; NetNodePre *pP; NumPreNodes = 0; // sorting preliminary nodes if (SortedPreNodes) { // we must free the already existent sorted list delete[]SortedPreNodes; } SortedPreNodes = NULL; pP = FirstPre; while (pP) { NumPreNodes++; pP = pP->GetNext(); } if (!NumPreNodes) return; SortedPreNodes = new NetNodePre *[NumPreNodes]; i = 0; pP = FirstPre; while (pP) { *(SortedPreNodes + i++) = pP; pP = pP->GetNext(); } if (NodeCode == true) { // Nodes are identified by a TEXT code qsort(SortedPreNodes, NumPreNodes, sizeof(NetNodePre *), cmp_prenodes_code); } else { // Nodes are identified by an INTEGER id qsort(SortedPreNodes, NumPreNodes, sizeof(NetNodePre *), cmp_prenodes_id); } // creating the final Nodes linked list last_id = -1; last_code = wxT(""); for (i = 0; i < NumPreNodes; i++) { pP = *(SortedPreNodes + i); if (NodeCode == true) { // Nodes are identified by a TEXT code if (pP->GetCode().Cmp(last_code) != 0) AddNode(pP->GetCode()); } else { // Nodes are identified by an INTEGER id if (pP->GetId() != last_id) AddNode(pP->GetId()); } last_id = pP->GetId(); last_code = pP->GetCode(); } // sorting the final Nodes list Sort(); // cleaning up the preliminary Nodes structs CleanPreNodes(); } spatialite_gui-2.0.0-devel/Styles.cpp0000664000175000017500000065223112544026240014533 00000000000000/* / Styles.cpp / various dialog classes / / version 1.8, 2015 March 13 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/filename.h" #include "rasterlite2/rasterlite2.h" #include "rasterlite2/rl2graphics.h" bool LoadRasterStyleDialog::Create(MyFrame * parent, wxArrayString & paths, wxString & path) { // // creating the dialog // MainFrame = parent; Paths = paths; Path = path; if (wxDialog::Create(parent, wxID_ANY, wxT("Loading New SLD/SE Raster Style(s)")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void LoadRasterStyleDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: files to be imported wxBoxSizer *fileSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(fileSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *fileLabel = new wxStaticText(this, wxID_STATIC, wxT("Import &File(s):")); fileSizer->Add(fileLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *filesCtrl = new wxTextCtrl(this, wxID_ANY, Path, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); fileSizer->Add(filesCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: progress report wxBoxSizer *progrSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(progrSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *doneCtrl = new wxTextCtrl(this, ID_LOAD_STYLE_DONE, ListDone, wxDefaultPosition, wxSize(650, 100), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2); progrSizer->Add(doneCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Import")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *abort = new wxButton(this, ID_LOAD_ABORT, wxT("&Abort")); abort->Enable(false); okCancelBox->Add(abort, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadRasterStyleDialog::OnOk); Connect(ID_LOAD_ABORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadRasterStyleDialog::OnCmdAbort); Connect(ID_LOAD_RASTER_STYLE_START, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadRasterStyleDialog::OnRequestStart); Connect(ID_LOAD_RASTER_STYLE_STOP, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadRasterStyleDialog::OnRequestStop); Connect(ID_LOAD_RASTER_STYLE_SKIP, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadRasterStyleDialog::OnRequestSkip); Connect(ID_LOAD_RASTER_STYLE_THREAD_FINISHED, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadRasterStyleDialog::OnThreadFinished); } void LoadRasterStyleDialog::OnCmdAbort(wxCommandEvent & WXUNUSED(event)) { // // aborting the Raster Style(s) Import process // if (Params.IsAbortPending() == true) return; Params.RequestAbort(); wxString report = wxT("\nan ABORT request is now pending and will be accepted ASAP"); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_STYLE_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(192, 0, 0); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(report); } void LoadRasterStyleDialog::OnRequestStart(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_STYLE_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(0, 0, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(msg); doneCtrl->MarkDirty(); } void LoadRasterStyleDialog::OnRequestStop(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_STYLE_DONE); ListDone += msg; doneCtrl->Clear(); wxColour fore = wxColour(0, 0, 0); wxColour back = wxColour(255, 255, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(ListDone); doneCtrl->MarkDirty(); } void LoadRasterStyleDialog::OnRequestSkip(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_STYLE_DONE); ListDone += msg; doneCtrl->Clear(); wxColour fore = wxColour(0, 0, 0); wxColour back = wxColour(255, 0, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(ListDone); doneCtrl->MarkDirty(); } #ifdef _WIN32 DWORD WINAPI DoExecuteRasterStylesLoad(void *arg) #else void *DoExecuteRasterStylesLoad(void *arg) #endif { // // threaded function: processing a Raster Style Import operation // RasterStylesLoadParams *params = (RasterStylesLoadParams *) arg; const char *sql; int ret; sqlite3_stmt *stmt = NULL; int count = params->GetPathsCount(); int i; clock_t clock_start; clock_t clock_end; double seconds; char elapsed[64]; char ordinal[64]; wxString report; wxString path; void *blob; int blob_size; wxCommandEvent evt_start(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_RASTER_STYLE_START); wxCommandEvent evt_stop(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_RASTER_STYLE_STOP); wxCommandEvent evt_skip(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_RASTER_STYLE_SKIP); sql = "SELECT SE_RegisterRasterStyle(?)"; ret = sqlite3_prepare_v2(params->GetMainFrame()->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { params->SetError(); goto error; } for (i = 0; i < count; i++) { // loading and verifying each Raster Style if (params->IsAbortPending() == true) { report = wxT("STOP .... aborted by the user !!!!"); evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); break; } path = params->GetPathByIndex(i); params->SetCurrentPath(path); report = wxT("Parsing and Validating: ") + path; evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); clock_start = clock(); if (params->GetMainFrame()->ValidateRasterStyle(path.ToUTF8(), &blob, &blob_size) == true) { if (params->GetDlg()->RegisterRasterStyle(stmt, blob, blob_size) != true) { params->SetError(); goto error; } clock_end = clock(); seconds = (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC; MyResultSetView::FormatElapsedTime(seconds, elapsed); sprintf(ordinal, "done %d/%d: ", i + 1, count); report = wxString::FromUTF8(ordinal) + path + wxT(" [") + wxString::FromUTF8(elapsed) + wxT("]\n"); evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->Done(); } else { clock_end = clock(); seconds = (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC; MyResultSetView::FormatElapsedTime(seconds, elapsed); sprintf(ordinal, "discarded %d/%d (not a valid Raster Style): ", i + 1, count); report = wxString::FromUTF8(ordinal) + path + wxT(" [") + wxString::FromUTF8(elapsed) + wxT("]\n"); evt_skip.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_skip); } } sqlite3_finalize(stmt); goto end; error: sqlite3_finalize(stmt); report = wxT("FAILED: ") + path; evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->SetError(); end: wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_RASTER_STYLE_THREAD_FINISHED); params->GetDlg()->GetEventHandler()->AddPendingEvent(event); #ifdef _WIN32 return 0; #else pthread_exit(NULL); #endif } void LoadRasterStyleDialog::OnThreadFinished(wxCommandEvent & WXUNUSED(event)) { // resuming execution when the Import Raster thread quits ::wxEndBusyCursor(); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); quitBtn->Enable(true); abortBtn->Enable(false); sqlite3_exec(Params.GetMainFrame()->GetSqlite(), "COMMIT", NULL, NULL, NULL); if (Params.GetError() == true) { char dummy[80]; sprintf(dummy, "%d Raster Styles have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nA fatal error occurred while loading:\n") + Params.GetCurrentPath(), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else if (Params.IsAbortPending() == true) { char dummy[80]; sprintf(dummy, "%d Raster Styles have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nStopped by an Abort user request"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } else { char dummy[80]; sprintf(dummy, "%d Raster Styles have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } bool MyFrame::ValidateRasterStyle(const char *path, void **blob, int *blob_size) { // // attempting to parse and validate a Raster Style // int ret; sqlite3_stmt *stmt; void *xblob = NULL; int xblob_size; int valid = 0; // Schema validation char *sql = sqlite3_mprintf("SELECT XB_Create(XB_LoadXML(%Q), 1, 1)", path); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return false; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { const void *xxblob = sqlite3_column_blob(stmt, 0); xblob_size = sqlite3_column_bytes(stmt, 0); xblob = malloc(xblob_size); memcpy(xblob, xxblob, xblob_size); } } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (xblob == NULL) return false; // Checking if really is a Raster Style stmt = NULL; sql = sqlite3_mprintf("SELECT XB_IsSldSERasterStyle(?)"); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) goto invalid; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, xblob, xblob_size, SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else goto invalid; } sqlite3_finalize(stmt); stmt = NULL; if (!valid) goto invalid; *blob = xblob; *blob_size = xblob_size; return true; invalid: if (stmt != NULL) sqlite3_finalize(stmt); free(xblob); *blob = NULL; *blob_size = 0; return false; } bool LoadRasterStyleDialog::RegisterRasterStyle(sqlite3_stmt * stmt, void *blob, int blob_size) { // // attempting to register the new Raster Style // int ret; int valid = 0; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, blob, blob_size, free); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else return false; } if (valid) return true; return false; } void LoadRasterStyleDialog::DoRunLoad() { // // executing the Load Raster Style(s) process in a separate Thread // #ifdef _WIN32 HANDLE thread_handle; DWORD dwThreadId; #else pthread_t thread_id; #endif Params.Initialize(MainFrame, this, Paths); #ifdef _WIN32 thread_handle = CreateThread(NULL, 0, DoExecuteRasterStylesLoad, &Params, 0, &dwThreadId); SetThreadPriority(thread_handle, THREAD_PRIORITY_IDLE); #else int ok_prior = 0; int policy; int min_prio; pthread_attr_t attr; struct sched_param sp; pthread_attr_init(&attr); if (pthread_attr_setschedpolicy(&attr, SCHED_RR) == 0) { // attempting to set the lowest priority if (pthread_attr_getschedpolicy(&attr, &policy) == 0) { min_prio = sched_get_priority_min(policy); sp.sched_priority = min_prio; if (pthread_attr_setschedparam(&attr, &sp) == 0) { // ok, setting the lowest priority ok_prior = 1; pthread_create(&thread_id, &attr, DoExecuteRasterStylesLoad, &Params); } } } if (!ok_prior) { // failure: using standard priority pthread_create(&thread_id, NULL, DoExecuteRasterStylesLoad, &Params); } #endif } void LoadRasterStyleDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxButton *loadBtn = (wxButton *) FindWindow(wxID_OK); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); loadBtn->Enable(false); quitBtn->Enable(false); abortBtn->Enable(true); ::wxBeginBusyCursor(); char *errMsg = NULL; int ret = sqlite3_exec(MainFrame->GetSqlite(), "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } DoRunLoad(); } bool LoadVectorStyleDialog::Create(MyFrame * parent, wxArrayString & paths, wxString & path) { // // creating the dialog // MainFrame = parent; Paths = paths; Path = path; if (wxDialog::Create(parent, wxID_ANY, wxT("Loading New SLD/SE Vector Style(s)")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void LoadVectorStyleDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: files to be imported wxBoxSizer *fileSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(fileSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *fileLabel = new wxStaticText(this, wxID_STATIC, wxT("Import &File(s):")); fileSizer->Add(fileLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *filesCtrl = new wxTextCtrl(this, wxID_ANY, Path, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); fileSizer->Add(filesCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: progress report wxBoxSizer *progrSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(progrSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *doneCtrl = new wxTextCtrl(this, ID_LOAD_STYLE_DONE, ListDone, wxDefaultPosition, wxSize(650, 100), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2); progrSizer->Add(doneCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Import")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *abort = new wxButton(this, ID_LOAD_ABORT, wxT("&Abort")); abort->Enable(false); okCancelBox->Add(abort, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadVectorStyleDialog::OnOk); Connect(ID_LOAD_ABORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadVectorStyleDialog::OnCmdAbort); Connect(ID_LOAD_VECTOR_STYLE_START, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadVectorStyleDialog::OnRequestStart); Connect(ID_LOAD_VECTOR_STYLE_STOP, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadVectorStyleDialog::OnRequestStop); Connect(ID_LOAD_VECTOR_STYLE_SKIP, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadVectorStyleDialog::OnRequestSkip); Connect(ID_LOAD_VECTOR_STYLE_THREAD_FINISHED, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadVectorStyleDialog::OnThreadFinished); } void LoadVectorStyleDialog::OnCmdAbort(wxCommandEvent & WXUNUSED(event)) { // // aborting the Vector Style(s) Import process // if (Params.IsAbortPending() == true) return; Params.RequestAbort(); wxString report = wxT("\nan ABORT request is now pending and will be accepted ASAP"); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_STYLE_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(192, 0, 0); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(report); } void LoadVectorStyleDialog::OnRequestStart(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_STYLE_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(0, 0, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(msg); doneCtrl->MarkDirty(); } void LoadVectorStyleDialog::OnRequestStop(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_STYLE_DONE); ListDone += msg; doneCtrl->Clear(); wxColour fore = wxColour(0, 0, 0); wxColour back = wxColour(255, 255, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(ListDone); doneCtrl->MarkDirty(); } void LoadVectorStyleDialog::OnRequestSkip(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_STYLE_DONE); ListDone += msg; doneCtrl->Clear(); wxColour fore = wxColour(0, 0, 0); wxColour back = wxColour(255, 0, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(ListDone); doneCtrl->MarkDirty(); } #ifdef _WIN32 DWORD WINAPI DoExecuteVectorStylesLoad(void *arg) #else void *DoExecuteVectorStylesLoad(void *arg) #endif { // // threaded function: processing a Vector Style Import operation // VectorStylesLoadParams *params = (VectorStylesLoadParams *) arg; const char *sql; int ret; sqlite3_stmt *stmt = NULL; int count = params->GetPathsCount(); int i; clock_t clock_start; clock_t clock_end; double seconds; char elapsed[64]; char ordinal[64]; wxString report; wxString path; void *blob; int blob_size; wxCommandEvent evt_start(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_VECTOR_STYLE_START); wxCommandEvent evt_stop(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_VECTOR_STYLE_STOP); wxCommandEvent evt_skip(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_VECTOR_STYLE_SKIP); sql = "SELECT SE_RegisterVectorStyle(?)"; ret = sqlite3_prepare_v2(params->GetMainFrame()->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { params->SetError(); goto error; } for (i = 0; i < count; i++) { // loading and verifying each Vector Style if (params->IsAbortPending() == true) { report = wxT("STOP .... aborted by the user !!!!"); evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); break; } path = params->GetPathByIndex(i); params->SetCurrentPath(path); report = wxT("Parsing and Validating: ") + path; evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); clock_start = clock(); if (params->GetMainFrame()->ValidateVectorStyle(path.ToUTF8(), &blob, &blob_size) == true) { if (params->GetDlg()->RegisterVectorStyle(stmt, blob, blob_size) != true) { params->SetError(); goto error; } clock_end = clock(); seconds = (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC; MyResultSetView::FormatElapsedTime(seconds, elapsed); sprintf(ordinal, "done %d/%d: ", i + 1, count); report = wxString::FromUTF8(ordinal) + path + wxT(" [") + wxString::FromUTF8(elapsed) + wxT("]\n"); evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->Done(); } else { clock_end = clock(); seconds = (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC; MyResultSetView::FormatElapsedTime(seconds, elapsed); sprintf(ordinal, "discarded %d/%d (not a valid Vector Style): ", i + 1, count); report = wxString::FromUTF8(ordinal) + path + wxT(" [") + wxString::FromUTF8(elapsed) + wxT("]\n"); evt_skip.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_skip); } } sqlite3_finalize(stmt); goto end; error: sqlite3_finalize(stmt); report = wxT("FAILED: ") + path; evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->SetError(); end: wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_VECTOR_STYLE_THREAD_FINISHED); params->GetDlg()->GetEventHandler()->AddPendingEvent(event); #ifdef _WIN32 return 0; #else pthread_exit(NULL); #endif } void LoadVectorStyleDialog::OnThreadFinished(wxCommandEvent & WXUNUSED(event)) { // resuming execution when the Import Vector thread quits ::wxEndBusyCursor(); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); quitBtn->Enable(true); abortBtn->Enable(false); sqlite3_exec(Params.GetMainFrame()->GetSqlite(), "COMMIT", NULL, NULL, NULL); if (Params.GetError() == true) { char dummy[80]; sprintf(dummy, "%d Vector Styles have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nA fatal error occurred while loading:\n") + Params.GetCurrentPath(), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else if (Params.IsAbortPending() == true) { char dummy[80]; sprintf(dummy, "%d Vector Styles have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nStopped by an Abort user request"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } else { char dummy[80]; sprintf(dummy, "%d Vector Styles have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } bool MyFrame::ValidateVectorStyle(const char *path, void **blob, int *blob_size) { // // attempting to parse and validate a Vector Style // int ret; sqlite3_stmt *stmt; void *xblob = NULL; int xblob_size; int valid = 0; // Schema validation char *sql = sqlite3_mprintf("SELECT XB_Create(XB_LoadXML(%Q), 1, 1)", path); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return false; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { const void *xxblob = sqlite3_column_blob(stmt, 0); xblob_size = sqlite3_column_bytes(stmt, 0); xblob = malloc(xblob_size); memcpy(xblob, xxblob, xblob_size); } } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (xblob == NULL) return false; // Checking if really is a Vector Style stmt = NULL; sql = sqlite3_mprintf("SELECT XB_IsSldSEVectorStyle(?)"); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) goto invalid; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, xblob, xblob_size, SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else goto invalid; } sqlite3_finalize(stmt); stmt = NULL; if (!valid) goto invalid; *blob = xblob; *blob_size = xblob_size; return true; invalid: if (stmt != NULL) sqlite3_finalize(stmt); free(xblob); *blob = NULL; *blob_size = 0; return false; } bool LoadVectorStyleDialog::RegisterVectorStyle(sqlite3_stmt * stmt, void *blob, int blob_size) { // // attempting to register the new Vector Style // int ret; int valid = 0; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, blob, blob_size, free); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else return false; } if (valid) return true; return false; } void LoadVectorStyleDialog::DoRunLoad() { // // executing the Load Vector Style(s) process in a separate Thread // #ifdef _WIN32 HANDLE thread_handle; DWORD dwThreadId; #else pthread_t thread_id; #endif Params.Initialize(MainFrame, this, Paths); #ifdef _WIN32 thread_handle = CreateThread(NULL, 0, DoExecuteVectorStylesLoad, &Params, 0, &dwThreadId); SetThreadPriority(thread_handle, THREAD_PRIORITY_IDLE); #else int ok_prior = 0; int policy; int min_prio; pthread_attr_t attr; struct sched_param sp; pthread_attr_init(&attr); if (pthread_attr_setschedpolicy(&attr, SCHED_RR) == 0) { // attempting to set the lowest priority if (pthread_attr_getschedpolicy(&attr, &policy) == 0) { min_prio = sched_get_priority_min(policy); sp.sched_priority = min_prio; if (pthread_attr_setschedparam(&attr, &sp) == 0) { // ok, setting the lowest priority ok_prior = 1; pthread_create(&thread_id, &attr, DoExecuteVectorStylesLoad, &Params); } } } if (!ok_prior) { // failure: using standard priority pthread_create(&thread_id, NULL, DoExecuteVectorStylesLoad, &Params); } #endif } void LoadVectorStyleDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxButton *loadBtn = (wxButton *) FindWindow(wxID_OK); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); loadBtn->Enable(false); quitBtn->Enable(false); abortBtn->Enable(true); ::wxBeginBusyCursor(); char *errMsg = NULL; int ret = sqlite3_exec(MainFrame->GetSqlite(), "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } DoRunLoad(); } bool RasterCoverageStylesDialog::Create(MyFrame * parent, wxString & coverage) { // // creating the dialog // MainFrame = parent; int pos = coverage.Find(wxT(" [SRID=")); if (pos != wxNOT_FOUND) CoverageName = coverage.Left(pos); else CoverageName = coverage; List = MainFrame->FindRasterCoverageStyles(CoverageName); if (wxDialog::Create(parent, wxID_ANY, wxT("Raster Coverage supported SLD/SE Styles")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterCoverageStylesDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Coverage Name wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("&Coverage Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); cvgCtrl->Enable(false); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered SLD/SE Styles"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; RasterCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 6, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Style ID")); GridCtrl->SetColLabelValue(1, wxT("Name")); GridCtrl->SetColLabelValue(2, wxT("Title")); GridCtrl->SetColLabelValue(3, wxT("Abstract")); GridCtrl->SetColLabelValue(4, wxT("Schema Validated")); GridCtrl->SetColLabelValue(5, wxT("Schema URI")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *quit = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(quit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *addNew = new wxButton(this, ID_SLD_SE_ADD, wxT("&Add Style(s)")); btnBox->Add(addNew, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterCoverageStylesDialog::OnQuit); Connect(ID_SLD_SE_ADD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterCoverageStylesDialog::OnAddStyle); Connect(ID_SLD_SE_REMOVE, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & RasterCoverageStylesDialog::OnCmdRemoveStyle); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & RasterCoverageStylesDialog::OnRightClick); } void RasterCoverageStylesDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentRow = event.GetRow(); GridCtrl->SelectRow(CurrentRow); wxString id = GridCtrl->GetCellValue(CurrentRow, 0); long style_id; id.ToLong(&style_id); CurrentStyleID = style_id; menuItem = new wxMenuItem(&menu, ID_SLD_SE_REMOVE, wxT("&Remove")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void RasterCoverageStylesDialog:: OnCmdRemoveStyle(wxCommandEvent & WXUNUSED(event)) { // // deleting a Style [mouse action] // sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_UnRegisterRasterStyledLayer(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, 2, CurrentStyleID); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) GridCtrl->DeleteRows(CurrentRow, 1); sqlite3_finalize(stmt); } void RasterCoverageStylesDialog:: DoRegistetRasterCoverageStyles(ListRasterStylesDialog * dlg) { // // attempting to register the Raster Coverage Style(s) // sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_RegisterRasterStyledLayer(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return; int max = dlg->GetSelectedCount(); for (int i = 0; i < max; i++) { int style_id = dlg->GetSelectedStyleId(i); if (style_id >= 0) { sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, 2, style_id); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { sqlite3_finalize(stmt); return; } } } sqlite3_finalize(stmt); } void RasterCoverageStylesDialog::OnAddStyle(wxCommandEvent & WXUNUSED(event)) { // // adding a new Style [button action] // ListRasterStylesDialog dlg; dlg.Create(MainFrame); if (dlg.ShowModal() == wxID_OK) { // attempting to register the new styles DoRegistetRasterCoverageStyles(&dlg); // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindRasterCoverageStyles(CoverageName); int count = 0; RasterCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->AppendRows(count); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->AutoSizeColumns(); } } void RasterCoverageStylesDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool ListRasterStylesDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; List = MainFrame->FindRasterStyles(); if (wxDialog::Create(parent, wxID_ANY, wxT("Registered SLD/SE Raster Styles")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ListRasterStylesDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered SLD/SE Styles"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; RasterCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 6, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Style ID")); GridCtrl->SetColLabelValue(1, wxT("Name")); GridCtrl->SetColLabelValue(2, wxT("Title")); GridCtrl->SetColLabelValue(3, wxT("Abstract")); GridCtrl->SetColLabelValue(4, wxT("Schema Validated")); GridCtrl->SetColLabelValue(5, wxT("Schema URI")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Ok")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ListRasterStylesDialog::OnOk); } int ListRasterStylesDialog::GetSelectedCount() { // // computing how many selected Style there are // int count = 0; RasterCoverageStyle *pS = List->GetFirst(); while (pS != NULL) { if (pS->IsSelected() == true) count++; pS = pS->GetNext(); } return count; } int ListRasterStylesDialog::GetSelectedStyleId(int idx) { // // returning the Nth selected StyleID // int count = 0; RasterCoverageStyle *pS = List->GetFirst(); while (pS != NULL) { if (pS->IsSelected() == true) { if (count == idx) return pS->GetStyleID(); count++; } pS = pS->GetNext(); } return -1; } void ListRasterStylesDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { wxString cell_id = GridCtrl->GetCellValue(i, 0); long style_id; if (cell_id.ToLong(&style_id) == true) List->MarkSelected(style_id); } } wxDialog::EndModal(wxID_OK); } RasterCoverageStyle::RasterCoverageStyle(int style_id, wxString & name, wxString & title, wxString & abstract, wxString & validated, wxString & schema_uri) { // constructor StyleID = style_id; Name = name; Title = title; Abstract = abstract; SchemaValidated = validated; SchemaURI = schema_uri; Selected = false; Next = NULL; } RasterCoverageStylesList::RasterCoverageStylesList() { // constructor First = NULL; Last = NULL; } RasterCoverageStylesList::~RasterCoverageStylesList() { // destructor RasterCoverageStyle *pS; RasterCoverageStyle *pSn; pS = First; while (pS != NULL) { pSn = pS->GetNext(); delete pS; pS = pSn; } } void RasterCoverageStylesList::Add(int style_id, wxString & name, wxString & title, wxString & abstract, wxString & validated, wxString & schema_uri) { // inserting a new Style RasterCoverageStyle *pS = new RasterCoverageStyle(style_id, name, title, abstract, validated, schema_uri); if (First == NULL) First = pS; if (Last != NULL) Last->SetNext(pS); Last = pS; } void RasterCoverageStylesList::MarkSelected(int styleId) { // marking a Selected Style RasterCoverageStyle *pS; pS = First; while (pS != NULL) { if (pS->GetStyleID() == styleId) { pS->MarkSelected(); break; } pS = pS->GetNext(); } } RasterCoverageStylesList *MyFrame::FindRasterCoverageStyles(wxString & coverage) { // will retrieve all SLD/SE Styles for the given Coverage RasterCoverageStylesList *list = new RasterCoverageStylesList(); int i; char **results; int rows; int columns; char *errMsg = NULL; char *value; wxString sql; sql = wxT ("SELECT style_id, name, title, abstract, schema_validated, schema_uri "); sql += wxT("FROM SE_raster_styled_layers_view WHERE coverage_name = '") + coverage; sql += wxT("' ORDER BY style_id"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; int style_id = atoi(value); value = results[(i * columns) + 1]; wxString name = wxString::FromUTF8(value); value = results[(i * columns) + 2]; wxString title = wxString::FromUTF8(value); value = results[(i * columns) + 3]; wxString abstract = wxString::FromUTF8(value); value = results[(i * columns) + 1]; wxString validated = wxT("Yes"); if (atoi(value) == 0) validated = wxT("No"); value = results[(i * columns) + 5]; wxString schema_uri = wxString::FromUTF8(value); list->Add(style_id, name, title, abstract, validated, schema_uri); } } sqlite3_free_table(results); return list; } RasterCoverageStylesList *MyFrame::FindRasterStyles() { // will retrieve all registered SLD/SE Raster Styles RasterCoverageStylesList *list = new RasterCoverageStylesList(); int i; char **results; int rows; int columns; char *errMsg = NULL; char *value; const char *sql; sql = "SELECT style_id, style_name, XB_GetTitle(style), XB_GetAbstract(style), " "XB_IsSchemaValidated(style), XB_GetSchemaURI(style) " "FROM SE_raster_styles ORDER BY style_name"; int ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; int style_id = atoi(value); value = results[(i * columns) + 1]; wxString name = wxString::FromUTF8(value); value = results[(i * columns) + 2]; wxString title = wxString::FromUTF8(value); value = results[(i * columns) + 3]; wxString abstract = wxString::FromUTF8(value); value = results[(i * columns) + 1]; wxString validated = wxT("Yes"); if (atoi(value) == 0) validated = wxT("No"); value = results[(i * columns) + 5]; wxString schema_uri = wxString::FromUTF8(value); list->Add(style_id, name, title, abstract, validated, schema_uri); } } sqlite3_free_table(results); return list; } CandidateVectorCoveragesList::~CandidateVectorCoveragesList() { // destructor CandidateVectorCoverage *pC; CandidateVectorCoverage *pCn; pC = First; while (pC != NULL) { pCn = pC->GetNext(); delete pC; pC = pCn; } } void CandidateVectorCoveragesList::Add(wxString & table_name, wxString & geometry, int srid, wxString & type) { // inserting a new candidate Vector Coverage CandidateVectorCoverage *pC = new CandidateVectorCoverage(table_name, geometry, srid, type); if (First == NULL) First = pC; if (Last != NULL) Last->SetNext(pC); Last = pC; } void CandidateVectorCoveragesList::MarkVectorCoverage(wxString & table, wxString & geometry) { // marking an already registered Vector Coverage CandidateVectorCoverage *pC; pC = First; while (pC != NULL) { if (pC->GetTableName().CmpNoCase(table) == 0 && pC->GetGeometryColumn().CmpNoCase(geometry) == 0) { pC->MarkVectorCoverage(); break; } pC = pC->GetNext(); } } void CandidateVectorCoveragesList::MarkRasterCoverage(wxString & table, wxString & geometry) { // marking a some table related to an already registered Raster Coverage CandidateVectorCoverage *pC; pC = First; while (pC != NULL) { if (pC->GetTableName().CmpNoCase(table) == 0 && pC->GetGeometryColumn().CmpNoCase(geometry) == 0) { pC->MarkRasterCoverage(); break; } pC = pC->GetNext(); } } CandidateVectorCoveragesList *MyFrame::FindUnregisteredVectorCoverages() { // will retrieve all not yet registered Geometries CandidateVectorCoveragesList *list = new CandidateVectorCoveragesList(); int i; char **results; int rows; int columns; char *errMsg = NULL; char *value; const char *sql; // retrieving all entries from GEOMETRY_COLUMNS sql = "SELECT f_table_name, f_geometry_column, srid, geometry_type " "FROM geometry_columns " "ORDER BY f_table_name, f_geometry_column"; int ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; wxString table = wxString::FromUTF8(value); value = results[(i * columns) + 1]; wxString geometry = wxString::FromUTF8(value); value = results[(i * columns) + 2]; int srid = atoi(value); value = results[(i * columns) + 3]; int gtype = atoi(value); wxString type = wxT("*** UNKNOWN ***"); switch (gtype) { case 0: case 1000: case 2000: case 3000: type = wxT("GEOMETRY"); break; case 1: case 1001: case 2001: case 3001: type = wxT("POINT"); break; case 2: case 1002: case 2002: case 3002: type = wxT("LINESTRING"); break; case 3: case 1003: case 2003: case 3003: type = wxT("POLYGON"); break; case 4: case 1004: case 2004: case 3004: type = wxT("MULTIPOINT"); break; case 5: case 1005: case 2005: case 3005: type = wxT("MULTILINESTRING"); break; case 6: case 1006: case 2006: case 3006: type = wxT("MULTIPOLYGON"); break; case 7: case 1007: case 2007: case 3007: type = wxT("GEOMETRYCOLLECTION"); break; default: type = wxT("*** UNKNOWN ***"); break; }; switch (gtype) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: type += wxT(" XY"); break; case 1000: case 1001: case 1002: case 1003: case 1004: case 1005: case 1006: case 1007: type += wxT(" XYZ"); break; case 2000: case 2001: case 2002: case 2003: case 2004: case 2005: case 2006: case 2007: type += wxT(" XYM"); break; case 3000: case 3001: case 3002: case 3003: case 3004: case 3005: case 3006: case 3007: type += wxT(" XYZM"); break; }; list->Add(table, geometry, srid, type); } } sqlite3_free_table(results); // marking any already registered Vector Coverage sql = "SELECT f_table_name, f_geometry_column FROM vector_coverages"; ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; wxString table = wxString::FromUTF8(value); value = results[(i * columns) + 1]; wxString geometry = wxString::FromUTF8(value); list->MarkVectorCoverage(table, geometry); } } sqlite3_free_table(results); // marking any table related to an already registered Raster Coverage sql = "SELECT coverage_name FROM raster_coverages"; ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; wxString table = wxString::FromUTF8(value) + wxT("_sections"); wxString geometry = wxT("geometry"); list->MarkRasterCoverage(table, geometry); table = wxString::FromUTF8(value) + wxT("_tiles"); list->MarkRasterCoverage(table, geometry); } } sqlite3_free_table(results); return list; } bool MyFrame::DoRegisterVectorCoverage(wxString & name, wxString & table, wxString & geometry, wxString & title, wxString & abstract) { // // attempting to register a Vector Coverage // sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_RegisterVectorCoverage(?, ?, ?, ?, ?)"; int ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, name.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 2, table.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 3, geometry.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 4, title.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 5, abstract.ToUTF8(), -1, SQLITE_TRANSIENT); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { sqlite3_finalize(stmt); return false; } sqlite3_finalize(stmt); return true; } bool VectorCoverageStylesDialog::Create(MyFrame * parent, wxString & coverage) { // // creating the dialog // MainFrame = parent; int pos = coverage.Find(wxT(" [SRID=")); if (pos != wxNOT_FOUND) CoverageName = coverage.Left(pos); else CoverageName = coverage; List = MainFrame->FindVectorCoverageStyles(CoverageName); if (wxDialog::Create(parent, wxID_ANY, wxT("Vector Coverage supported SLD/SE Styles")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void VectorCoverageStylesDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Coverage Name wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("&Coverage Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); cvgCtrl->Enable(false); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered SLD/SE Styles"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; VectorCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 6, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Style ID")); GridCtrl->SetColLabelValue(1, wxT("Name")); GridCtrl->SetColLabelValue(2, wxT("Title")); GridCtrl->SetColLabelValue(3, wxT("Abstract")); GridCtrl->SetColLabelValue(4, wxT("Schema Validated")); GridCtrl->SetColLabelValue(5, wxT("Schema URI")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *quit = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(quit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *addNew = new wxButton(this, ID_SLD_SE_ADD, wxT("&Add Style(s)")); btnBox->Add(addNew, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorCoverageStylesDialog::OnQuit); Connect(ID_SLD_SE_ADD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorCoverageStylesDialog::OnAddStyle); Connect(ID_SLD_SE_REMOVE, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & VectorCoverageStylesDialog::OnCmdRemoveStyle); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & VectorCoverageStylesDialog::OnRightClick); } void VectorCoverageStylesDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentRow = event.GetRow(); GridCtrl->SelectRow(CurrentRow); wxString id = GridCtrl->GetCellValue(CurrentRow, 0); long style_id; id.ToLong(&style_id); CurrentStyleID = style_id; menuItem = new wxMenuItem(&menu, ID_SLD_SE_REMOVE, wxT("&Remove")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void VectorCoverageStylesDialog:: OnCmdRemoveStyle(wxCommandEvent & WXUNUSED(event)) { // // deleting a Style [mouse action] // sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_UnRegisterVectorStyledLayer(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, 2, CurrentStyleID); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) GridCtrl->DeleteRows(CurrentRow, 1); sqlite3_finalize(stmt); } void VectorCoverageStylesDialog:: DoRegistetVectorCoverageStyles(ListVectorStylesDialog * dlg) { // // attempting to register the Vector Coverage Style(s) // sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_RegisterVectorStyledLayer(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return; int max = dlg->GetSelectedCount(); for (int i = 0; i < max; i++) { int style_id = dlg->GetSelectedStyleId(i); if (style_id >= 0) { sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, 2, style_id); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { sqlite3_finalize(stmt); return; } } } sqlite3_finalize(stmt); } void VectorCoverageStylesDialog::OnAddStyle(wxCommandEvent & WXUNUSED(event)) { // // adding a new Style [button action] // ListVectorStylesDialog dlg; dlg.Create(MainFrame); if (dlg.ShowModal() == wxID_OK) { // attempting to register the new styles DoRegistetVectorCoverageStyles(&dlg); // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindVectorCoverageStyles(CoverageName); int count = 0; VectorCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->AppendRows(count); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->AutoSizeColumns(); } } void VectorCoverageStylesDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool ListVectorStylesDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; List = MainFrame->FindVectorStyles(); if (wxDialog::Create(parent, wxID_ANY, wxT("Registered SLD/SE Vector Styles")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ListVectorStylesDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered SLD/SE Styles"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; VectorCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 6, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Style ID")); GridCtrl->SetColLabelValue(1, wxT("Name")); GridCtrl->SetColLabelValue(2, wxT("Title")); GridCtrl->SetColLabelValue(3, wxT("Abstract")); GridCtrl->SetColLabelValue(4, wxT("Schema Validated")); GridCtrl->SetColLabelValue(5, wxT("Schema URI")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Ok")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ListVectorStylesDialog::OnOk); } int ListVectorStylesDialog::GetSelectedCount() { // // computing how many selected Style there are // int count = 0; VectorCoverageStyle *pS = List->GetFirst(); while (pS != NULL) { if (pS->IsSelected() == true) count++; pS = pS->GetNext(); } return count; } int ListVectorStylesDialog::GetSelectedStyleId(int idx) { // // returning the Nth selected StyleID // int count = 0; VectorCoverageStyle *pS = List->GetFirst(); while (pS != NULL) { if (pS->IsSelected() == true) { if (count == idx) return pS->GetStyleID(); count++; } pS = pS->GetNext(); } return -1; } void ListVectorStylesDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { wxString cell_id = GridCtrl->GetCellValue(i, 0); long style_id; if (cell_id.ToLong(&style_id) == true) List->MarkSelected(style_id); } } wxDialog::EndModal(wxID_OK); } VectorCoverageStyle::VectorCoverageStyle(int style_id, wxString & name, wxString & title, wxString & abstract, wxString & validated, wxString & schema_uri) { // constructor StyleID = style_id; Name = name; Title = title; Abstract = abstract; SchemaValidated = validated; SchemaURI = schema_uri; Selected = false; Next = NULL; } VectorCoverageStylesList::VectorCoverageStylesList() { // constructor First = NULL; Last = NULL; } VectorCoverageStylesList::~VectorCoverageStylesList() { // destructor VectorCoverageStyle *pS; VectorCoverageStyle *pSn; pS = First; while (pS != NULL) { pSn = pS->GetNext(); delete pS; pS = pSn; } } void VectorCoverageStylesList::Add(int style_id, wxString & name, wxString & title, wxString & abstract, wxString & validated, wxString & schema_uri) { // inserting a new Style VectorCoverageStyle *pS = new VectorCoverageStyle(style_id, name, title, abstract, validated, schema_uri); if (First == NULL) First = pS; if (Last != NULL) Last->SetNext(pS); Last = pS; } void VectorCoverageStylesList::MarkSelected(int styleId) { // marking a Selected Style VectorCoverageStyle *pS; pS = First; while (pS != NULL) { if (pS->GetStyleID() == styleId) { pS->MarkSelected(); break; } pS = pS->GetNext(); } } VectorCoverageStylesList *MyFrame::FindVectorCoverageStyles(wxString & coverage) { // will retrieve all SLD/SE Styles for the given Coverage VectorCoverageStylesList *list = new VectorCoverageStylesList(); int i; char **results; int rows; int columns; char *errMsg = NULL; char *value; wxString sql; sql = wxT ("SELECT style_id, name, title, abstract, schema_validated, schema_uri "); sql += wxT("FROM SE_Vector_styled_layers_view WHERE coverage_name = '") + coverage; sql += wxT("' ORDER BY style_id"); int ret = sqlite3_get_table(SqliteHandle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; int style_id = atoi(value); value = results[(i * columns) + 1]; wxString name = wxString::FromUTF8(value); value = results[(i * columns) + 2]; wxString title = wxString::FromUTF8(value); value = results[(i * columns) + 3]; wxString abstract = wxString::FromUTF8(value); value = results[(i * columns) + 1]; wxString validated = wxT("Yes"); if (atoi(value) == 0) validated = wxT("No"); value = results[(i * columns) + 5]; wxString schema_uri = wxString::FromUTF8(value); list->Add(style_id, name, title, abstract, validated, schema_uri); } } sqlite3_free_table(results); return list; } VectorCoverageStylesList *MyFrame::FindVectorStyles() { // will retrieve all registered SLD/SE Vector Styles VectorCoverageStylesList *list = new VectorCoverageStylesList(); int i; char **results; int rows; int columns; char *errMsg = NULL; char *value; const char *sql; sql = "SELECT style_id, style_name, XB_GetTitle(style), XB_GetAbstract(style), " "XB_IsSchemaValidated(style), XB_GetSchemaURI(style) " "FROM SE_Vector_styles ORDER BY style_name"; int ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; int style_id = atoi(value); value = results[(i * columns) + 1]; wxString name = wxString::FromUTF8(value); value = results[(i * columns) + 2]; wxString title = wxString::FromUTF8(value); value = results[(i * columns) + 3]; wxString abstract = wxString::FromUTF8(value); value = results[(i * columns) + 1]; wxString validated = wxT("Yes"); if (atoi(value) == 0) validated = wxT("No"); value = results[(i * columns) + 5]; wxString schema_uri = wxString::FromUTF8(value); list->Add(style_id, name, title, abstract, validated, schema_uri); } } sqlite3_free_table(results); return list; } bool VectorRegisterDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; List = MainFrame->FindUnregisteredVectorCoverages(); if (wxDialog::Create(parent, wxID_ANY, wxT("Register Vector Coverage")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); int count = 0; CandidateVectorCoverage *pC = List->GetFirst(); while (pC) { // counting how many lines are there if (pC->IsVectorCoverage() != true && pC->IsRasterCoverage() != true) count++; pC = pC->GetNext(); } if (count == 0) { wxButton *ok = (wxButton *) FindWindow(wxID_OK); ok->Enable(false); wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_VECTOR_COVERAGE); nameCtrl->Enable(false); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_VECTOR_TITLE); titleCtrl->Enable(false); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_VECTOR_ABSTRACT); absCtrl->Enable(false); wxMessageBox(wxT ("There are no possible Candidates to be eventually registered"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } return true; } void VectorRegisterDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Candidate Vector Coverages"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_VECTOR_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; CandidateVectorCoverage *pC = List->GetFirst(); while (pC) { // counting how many lines are there if (pC->IsVectorCoverage() != true && pC->IsRasterCoverage() != true) count++; pC = pC->GetNext(); } GridCtrl->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("f_table_name")); GridCtrl->SetColLabelValue(1, wxT("f_geometry_column")); GridCtrl->SetColLabelValue(2, wxT("SRID")); GridCtrl->SetColLabelValue(3, wxT("GeometryType")); count = 0; char dummy[1024]; wxString cell; pC = List->GetFirst(); while (pC) { // feeding grid rows if (pC->IsVectorCoverage() != true && pC->IsRasterCoverage() != true) { sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); GridCtrl->SetCellValue(count, 0, pC->GetTableName()); GridCtrl->SetCellValue(count, 1, pC->GetGeometryColumn()); sprintf(dummy, "%d", pC->GetSrid()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 2, cell); GridCtrl->SetCellAlignment(count, 2, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 3, pC->GetGeometryType()); count++; } pC = pC->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the Coverage Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(this, wxID_STATIC, wxT("&Coverage Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(this, ID_VECTOR_COVERAGE, wxT(""), wxDefaultPosition, wxSize(550, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the Coverage Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(this, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(this, ID_VECTOR_TITLE, wxT(""), wxDefaultPosition, wxSize(550, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: the Coverage Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(this, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(this, ID_VECTOR_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(550, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Register")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorRegisterDialog::OnOk); } void VectorRegisterDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_VECTOR_COVERAGE); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_VECTOR_TITLE); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_VECTOR_ABSTRACT); wxString str = nameCtrl->GetValue().Trim(); CoverageName = str.Trim(false); if (CoverageName.Len() == 0) { wxMessageBox(wxT("You must specify some Coverage Name !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } str = titleCtrl->GetValue().Trim(); Title = str.Trim(false); if (Title.Len() == 0) { wxMessageBox(wxT("You must specify some Title !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } str = absCtrl->GetValue().Trim(); Abstract = str.Trim(false); if (Abstract.Len() == 0) { wxMessageBox(wxT("You must specify some Abstract !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } int selCount = 0; for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { TableName = GridCtrl->GetCellValue(i, 0); GeometryColumn = GridCtrl->GetCellValue(i, 1); selCount++; } } if (selCount < 1) { wxMessageBox(wxT("You must select a Candidate to be registered !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (selCount > 1) { wxString msg = wxT("You must select just a single Candidate to be registered !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxDialog::EndModal(wxID_OK); } bool ReloadVectorStyleDialog::Create(MyFrame * parent, wxString & path) { // // creating the dialog // MainFrame = parent; Path = path; List = MainFrame->FindVectorStyles(); if (wxDialog::Create(parent, wxID_ANY, wxT("Reloading an SLD/SE Vector Style")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ReloadVectorStyleDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Style's Path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&SLD/SE Style:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathCtrl = new wxTextCtrl(this, wxID_ANY, Path, wxDefaultPosition, wxSize(550, 22), wxTE_READONLY); pathCtrl->Enable(false); pathSizer->Add(pathCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered SLD/SE Vector Styles"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; VectorCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 6, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Style ID")); GridCtrl->SetColLabelValue(1, wxT("Name")); GridCtrl->SetColLabelValue(2, wxT("Title")); GridCtrl->SetColLabelValue(3, wxT("Abstract")); GridCtrl->SetColLabelValue(4, wxT("Schema Validated")); GridCtrl->SetColLabelValue(5, wxT("Schema URI")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Reload")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ReloadVectorStyleDialog::OnOk); } bool ReloadVectorStyleDialog::DoReloadVectorStyle(int style_id, void *blob, int blob_size) { // // attempting to reload the Vector Style // int ret; int valid = 0; const char *sql; sqlite3_stmt *stmt = NULL; sql = "SELECT SE_ReloadVectorStyle(?, ?)"; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int(stmt, 1, style_id); sqlite3_bind_blob(stmt, 2, blob, blob_size, free); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (valid) return true; return false; } void ReloadVectorStyleDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // int selCount = 0; long style_id; void *blob = NULL; int blob_size; for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { wxString cell_id = GridCtrl->GetCellValue(i, 0); if (cell_id.ToLong(&style_id) == true) selCount++; } } if (selCount < 1) { wxMessageBox(wxT("You must select a Vector Style to be reloaded !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (selCount > 1) { wxString msg = wxT("You must select just a single Vector Style to be reloaded !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } ::wxBeginBusyCursor(); if (MainFrame->ValidateVectorStyle(Path.ToUTF8(), &blob, &blob_size) == true) { char dummy[80]; sprintf(dummy, "%ld", style_id); if (DoReloadVectorStyle(style_id, blob, blob_size) == true) { ::wxEndBusyCursor(); wxMessageBox(wxT("Vector Style (style_id=") + wxString::FromUTF8(dummy) + wxT(") successfully reloaded"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { ::wxEndBusyCursor(); wxMessageBox(wxT ("Some error occurred: unable to reload Vector Style (style_id=") + wxString::FromUTF8(dummy) + wxT(")"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } else { ::wxEndBusyCursor(); wxString msg = Path + wxT("\n\nnot a valid SLD/SE Vector Style"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } wxDialog::EndModal(wxID_OK); } bool ReloadRasterStyleDialog::Create(MyFrame * parent, wxString & path) { // // creating the dialog // MainFrame = parent; Path = path; List = MainFrame->FindRasterStyles(); if (wxDialog::Create(parent, wxID_ANY, wxT("Reloading an SLD/SE Raster Style")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ReloadRasterStyleDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Style's Path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&SLD/SE Style:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathCtrl = new wxTextCtrl(this, wxID_ANY, Path, wxDefaultPosition, wxSize(550, 22), wxTE_READONLY); pathCtrl->Enable(false); pathSizer->Add(pathCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered SLD/SE Raster Styles"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; RasterCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 6, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Style ID")); GridCtrl->SetColLabelValue(1, wxT("Name")); GridCtrl->SetColLabelValue(2, wxT("Title")); GridCtrl->SetColLabelValue(3, wxT("Abstract")); GridCtrl->SetColLabelValue(4, wxT("Schema Validated")); GridCtrl->SetColLabelValue(5, wxT("Schema URI")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Reload")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ReloadRasterStyleDialog::OnOk); } bool ReloadRasterStyleDialog::DoReloadRasterStyle(int style_id, void *blob, int blob_size) { // // attempting to reload the Raster Style // int ret; int valid = 0; const char *sql; sqlite3_stmt *stmt = NULL; sql = "SELECT SE_ReloadRasterStyle(?, ?)"; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int(stmt, 1, style_id); sqlite3_bind_blob(stmt, 2, blob, blob_size, free); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (valid) return true; return false; } void ReloadRasterStyleDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // int selCount = 0; long style_id; void *blob = NULL; int blob_size; for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { wxString cell_id = GridCtrl->GetCellValue(i, 0); if (cell_id.ToLong(&style_id) == true) selCount++; } } if (selCount < 1) { wxMessageBox(wxT("You must select a Raster Style to be reloaded !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (selCount > 1) { wxString msg = wxT("You must select just a single Raster Style to be reloaded !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } ::wxBeginBusyCursor(); if (MainFrame->ValidateRasterStyle(Path.ToUTF8(), &blob, &blob_size) == true) { char dummy[80]; sprintf(dummy, "%ld", style_id); if (DoReloadRasterStyle(style_id, blob, blob_size) == true) { ::wxEndBusyCursor(); wxMessageBox(wxT("Raster Style (style_id=") + wxString::FromUTF8(dummy) + wxT(") successfully reloaded"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { ::wxEndBusyCursor(); wxMessageBox(wxT ("Some error occurred: unable to reload Raster Style (style_id=") + wxString::FromUTF8(dummy) + wxT(")"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } else { ::wxEndBusyCursor(); wxString msg = Path + wxT("\n\nnot a valid SLD/SE Raster Style"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } wxDialog::EndModal(wxID_OK); } bool UnregisterRasterStyleDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; List = MainFrame->FindRasterStyles(); if (wxDialog::Create(parent, wxID_ANY, wxT("Unregistering an SLD/SE Raster Style")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void UnregisterRasterStyleDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered SLD/SE Raster Styles"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; RasterCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 6, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Style ID")); GridCtrl->SetColLabelValue(1, wxT("Name")); GridCtrl->SetColLabelValue(2, wxT("Title")); GridCtrl->SetColLabelValue(3, wxT("Abstract")); GridCtrl->SetColLabelValue(4, wxT("Schema Validated")); GridCtrl->SetColLabelValue(5, wxT("Schema URI")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Unregister")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & UnregisterRasterStyleDialog::OnOk); } bool UnregisterRasterStyleDialog::DoUnregisterRasterStyle(int style_id) { // // attempting to unregister the Raster Style // int ret; int valid = 0; const char *sql; sqlite3_stmt *stmt = NULL; sql = "SELECT SE_UnregisterRasterStyle(?)"; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int(stmt, 1, style_id); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (valid) return true; return false; } bool UnregisterRasterStyleDialog::DoCheckUnreferencedRasterStyle(int style_id) { // // checking if a Raster Style is currently referenced or not // int ret; int count = 1; const char *sql; sqlite3_stmt *stmt = NULL; sql = "SELECT Count(*) FROM SE_raster_styles AS s " "JOIN SE_raster_styled_layers AS l ON (l.style_id = s.style_id) " "WHERE s.style_id = ?"; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int(stmt, 1, style_id); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) count = sqlite3_column_int(stmt, 0); } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (!count) return true; return false; } void UnregisterRasterStyleDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // int selCount = 0; long style_id; for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { wxString cell_id = GridCtrl->GetCellValue(i, 0); if (cell_id.ToLong(&style_id) == true) selCount++; } } if (selCount < 1) { wxMessageBox(wxT("You must select a Raster Style to be unregistered !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (selCount > 1) { wxString msg = wxT ("You must select just a single Raster Style to be unregistered !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } ::wxBeginBusyCursor(); char dummy[80]; sprintf(dummy, "%ld", style_id); if (DoCheckUnreferencedRasterStyle(style_id) == true) { if (DoUnregisterRasterStyle(style_id) == true) { ::wxEndBusyCursor(); wxMessageBox(wxT("Raster Style (style_id=") + wxString::FromUTF8(dummy) + wxT(") successfully unregistered"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { ::wxEndBusyCursor(); wxMessageBox(wxT ("Some error occurred: unable to unregister Raster Style (style_id=") + wxString::FromUTF8(dummy) + wxT(")"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } else { ::wxEndBusyCursor(); wxMessageBox(wxT("You can't unregister Raster Style (style_id=") + wxString::FromUTF8(dummy) + wxT (")\nbecause it's currently referenced by at least one Raster Coverage"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } wxDialog::EndModal(wxID_OK); } bool UnregisterVectorStyleDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; List = MainFrame->FindVectorStyles(); if (wxDialog::Create(parent, wxID_ANY, wxT("Unregistering an SLD/SE Vector Style")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void UnregisterVectorStyleDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered SLD/SE Vector Styles"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; VectorCoverageStyle *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 6, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Style ID")); GridCtrl->SetColLabelValue(1, wxT("Name")); GridCtrl->SetColLabelValue(2, wxT("Title")); GridCtrl->SetColLabelValue(3, wxT("Abstract")); GridCtrl->SetColLabelValue(4, wxT("Schema Validated")); GridCtrl->SetColLabelValue(5, wxT("Schema URI")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, "%d", pS->GetStyleID()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); GridCtrl->SetCellAlignment(count, 0, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 1, pS->GetName()); GridCtrl->SetCellValue(count, 2, pS->GetTitle()); GridCtrl->SetCellValue(count, 3, pS->GetAbstract()); GridCtrl->SetCellValue(count, 4, pS->GetSchemaValidated()); GridCtrl->SetCellValue(count, 5, pS->GetSchemaURI()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Unregister")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & UnregisterVectorStyleDialog::OnOk); } bool UnregisterVectorStyleDialog::DoUnregisterVectorStyle(int style_id) { // // attempting to unregister the Vector Style // int ret; int valid = 0; const char *sql; sqlite3_stmt *stmt = NULL; sql = "SELECT SE_UnregisterVectorStyle(?)"; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int(stmt, 1, style_id); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (valid) return true; return false; } bool UnregisterVectorStyleDialog::DoCheckUnreferencedVectorStyle(int style_id) { // // checking if a Vector Style is currently referenced or not // int ret; int count = 1; const char *sql; sqlite3_stmt *stmt = NULL; sql = "SELECT Count(*) FROM SE_vector_styles AS s " "JOIN SE_vector_styled_layers AS l ON (l.style_id = s.style_id) " "WHERE s.style_id = ?"; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int(stmt, 1, style_id); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) count = sqlite3_column_int(stmt, 0); } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (!count) return true; return false; } void UnregisterVectorStyleDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // int selCount = 0; long style_id; for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { wxString cell_id = GridCtrl->GetCellValue(i, 0); if (cell_id.ToLong(&style_id) == true) selCount++; } } if (selCount < 1) { wxMessageBox(wxT("You must select a Vector Style to be unregistered !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (selCount > 1) { wxString msg = wxT ("You must select just a single Vector Style to be unregistered !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } ::wxBeginBusyCursor(); char dummy[80]; sprintf(dummy, "%ld", style_id); if (DoCheckUnreferencedVectorStyle(style_id) == true) { if (DoUnregisterVectorStyle(style_id) == true) { ::wxEndBusyCursor(); wxMessageBox(wxT("Vector Style (style_id=") + wxString::FromUTF8(dummy) + wxT(") successfully unregistered"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { ::wxEndBusyCursor(); wxMessageBox(wxT ("Some error occurred: unable to unregister Vector Style (style_id=") + wxString::FromUTF8(dummy) + wxT(")"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } else { ::wxEndBusyCursor(); wxMessageBox(wxT("You can't unregister Vector Style (style_id=") + wxString::FromUTF8(dummy) + wxT (")\nbecause it's currently referenced by at least one Vector Coverage"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } wxDialog::EndModal(wxID_OK); } bool VectorSRIDsDialog::Create(MyFrame * parent, wxString & coverage) { // // creating the dialog // MainFrame = parent; int pos = coverage.Find(wxT(" [SRID=")); if (pos != wxNOT_FOUND) CoverageName = coverage.Left(pos); else CoverageName = coverage; List = MainFrame->FindVectorAlternativeSRIDs(CoverageName); if (wxDialog::Create(parent, wxID_ANY, wxT("Vector Coverage: alternative SRIDs")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void VectorSRIDsDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Vector Coverage wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("&Coverage Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(550, 22), wxTE_READONLY); cvgCtrl->Enable(false); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered alternative SRIDs"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_VECTOR_SRID_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; VectorCoverageSRID *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 5, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Native")); GridCtrl->SetColLabelValue(1, wxT("SRID")); GridCtrl->SetColLabelValue(2, wxT("Auth Name")); GridCtrl->SetColLabelValue(3, wxT("Auth SRID")); GridCtrl->SetColLabelValue(4, wxT("RefSys Name")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); if (pS->IsNative() == true) GridCtrl->SetCellValue(count, 0, wxT("yes")); else GridCtrl->SetCellValue(count, 0, wxT("")); sprintf(dummy, "%d", pS->GetSrid()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 1, cell); GridCtrl->SetCellAlignment(count, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 2, pS->GetAuthName()); sprintf(dummy, "%d", pS->GetAuthSrid()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 3, cell); GridCtrl->SetCellAlignment(count, 3, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 4, pS->GetRefSysName()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // SRID selection wxBoxSizer *sridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *sridBox = new wxStaticBox(this, wxID_STATIC, wxT("Adding an alternative SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *SridSizer = new wxStaticBoxSizer(sridBox, wxHORIZONTAL); sridBoxSizer->Add(SridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); SridSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); int srid = 0; wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_VECTOR_SRID, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, -1, 1000000, srid); sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sridSizer->AddSpacer(100); wxButton *addNew = new wxButton(this, ID_VECTOR_SRID_ADD, wxT("&Add SRID")); sridSizer->Add(addNew, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorSRIDsDialog::OnQuit); Connect(ID_VECTOR_SRID_ADD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorSRIDsDialog::OnCmdAddSrid); Connect(ID_VECTOR_SRID_REMOVE, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & VectorSRIDsDialog::OnCmdRemoveSrid); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & VectorSRIDsDialog::OnRightClick); } void VectorSRIDsDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentRow = event.GetRow(); GridCtrl->SelectRow(CurrentRow); wxString native = GridCtrl->GetCellValue(CurrentRow, 0); if (native.CmpNoCase(wxT("yes")) == 0) return; wxString id = GridCtrl->GetCellValue(CurrentRow, 1); long srid; id.ToLong(&srid); CurrentSRID = srid; menuItem = new wxMenuItem(&menu, ID_VECTOR_SRID_REMOVE, wxT("&Remove")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void VectorSRIDsDialog::OnCmdRemoveSrid(wxCommandEvent & WXUNUSED(event)) { // // deleting a SRID [mouse action] // sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_UnRegisterVectorCoverageSrid(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, 2, CurrentSRID); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) { GridCtrl->DeleteRows(CurrentRow, 1); List->MarkDeleted(CurrentSRID); } sqlite3_finalize(stmt); } bool VectorSRIDsDialog::DoRegistetVectorCoverageSrid(int srid) { // // attempting to register an alternative Vector Coverage SRID // sqlite3_stmt *stmt = NULL; int value = 0; const char *sql = "SELECT SE_RegisterVectorCoverageSrid(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, 2, srid); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) ; else if (ret == SQLITE_ROW) value = sqlite3_column_int(stmt, 0); else { sqlite3_finalize(stmt); return false; } sqlite3_finalize(stmt); if (!value) return false; return true; } void VectorSRIDsDialog::OnCmdAddSrid(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_VECTOR_SRID); int srid = sridCtrl->GetValue(); if (srid <= 0) { wxMessageBox(wxT("You must specify some SRID value !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } else if (MainFrame->SridNotExists(srid) == true) { wxMessageBox(wxT("invalid SRID value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (List->IsNativeSrid(srid) == true) { wxMessageBox(wxT("Can't register twice the Native SRID"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (List->IsAlreadyDefinedSrid(srid) == true) { wxMessageBox(wxT("Already defined alternative SRID"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } // attempting to register the alternative SRID if (DoRegistetVectorCoverageSrid(srid) == true) { // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindVectorAlternativeSRIDs(CoverageName); int count = 0; VectorCoverageSRID *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->AppendRows(count); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); if (pS->IsNative() == true) GridCtrl->SetCellValue(count, 0, wxT("yes")); else GridCtrl->SetCellValue(count, 0, wxT("")); sprintf(dummy, "%d", pS->GetSrid()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 1, cell); GridCtrl->SetCellAlignment(count, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 2, pS->GetAuthName()); sprintf(dummy, "%d", pS->GetAuthSrid()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 3, cell); GridCtrl->SetCellAlignment(count, 3, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 4, pS->GetRefSysName()); count++; pS = pS->GetNext(); } GridCtrl->AutoSizeColumns(); } return; } void VectorSRIDsDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } VectorCoverageSRIDsList::~VectorCoverageSRIDsList() { // destructor VectorCoverageSRID *pS; VectorCoverageSRID *pSn; pS = First; while (pS != NULL) { pSn = pS->GetNext(); delete pS; pS = pSn; } } void VectorCoverageSRIDsList::Add(bool native, int srid, wxString & auth_name, int auth_srid, wxString & name) { // inserting a new SRID VectorCoverageSRID *pS = new VectorCoverageSRID(native, srid, auth_name, auth_srid, name); if (First == NULL) First = pS; if (Last != NULL) Last->SetNext(pS); Last = pS; } void VectorCoverageSRIDsList::MarkDeleted(int srid) { // marking some Srid as deleted VectorCoverageSRID *pS; pS = First; while (pS != NULL) { if (pS->GetSrid() == srid) { pS->MarkDeleted(); return; } pS = pS->GetNext(); } } bool VectorCoverageSRIDsList::IsNativeSrid(int srid) { // checking for the Native SRID VectorCoverageSRID *pS; pS = First; while (pS != NULL) { if (pS->GetSrid() == srid) return pS->IsNative(); pS = pS->GetNext(); } return false; } bool VectorCoverageSRIDsList::IsAlreadyDefinedSrid(int srid) { // checking for an already defined alternative SRID VectorCoverageSRID *pS; pS = First; while (pS != NULL) { if (pS->GetSrid() == srid) { if (pS->IsDeleted() == true) return false; return true; } pS = pS->GetNext(); } return false; } VectorCoverageSRIDsList *MyFrame::FindVectorAlternativeSRIDs(wxString & coverage) { // will retrieve all alternative SRIDs for the given Coverage VectorCoverageSRIDsList *list = new VectorCoverageSRIDsList(); int i; char **results; int rows; int columns; char *errMsg = NULL; char *value; char *sql; char cvg[1024]; wxCharBuffer buffer = coverage.ToUTF8(); sprintf(cvg, "%s", buffer.data()); sql = sqlite3_mprintf ("SELECT 1, s.srid, s.auth_name, s.auth_srid, s.ref_sys_name FROM vector_coverages AS v " "JOIN geometry_columns AS x ON (v.f_table_name = x.f_table_name AND v.f_geometry_column = x.f_geometry_column) " "LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid) " "WHERE v.coverage_name = %Q UNION " "SELECT 0, s.srid, s.auth_name, s.auth_srid, s.ref_sys_name FROM vector_coverages AS v " "JOIN vector_coverages_srid AS x ON (v.coverage_name = x.coverage_name) " "LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid) " "WHERE v.coverage_name = %Q ORDER BY 2", cvg, cvg); int ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { bool native = false; value = results[(i * columns) + 0]; if (atoi(value) != 0) native = true; value = results[(i * columns) + 1]; int srid = atoi(value); value = results[(i * columns) + 2]; wxString auth_name = wxString::FromUTF8(value); value = results[(i * columns) + 3]; int auth_srid = atoi(value); value = results[(i * columns) + 4]; wxString name = wxString::FromUTF8(value); list->Add(native, srid, auth_name, auth_srid, name); } } sqlite3_free_table(results); return list; } bool VectorKeywordsDialog::Create(MyFrame * parent, wxString & coverage) { // // creating the dialog // MainFrame = parent; int pos = coverage.Find(wxT(" [SRID=")); if (pos != wxNOT_FOUND) CoverageName = coverage.Left(pos); else CoverageName = coverage; List = MainFrame->FindVectorKeywords(CoverageName); if (wxDialog::Create(parent, wxID_ANY, wxT("Vector Coverage: Keywords")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void VectorKeywordsDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Vector Coverage wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("&Coverage Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(550, 22), wxTE_READONLY); cvgCtrl->Enable(false); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered Keywords"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_VECTOR_KEYWORD_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; VectorCoverageKeyword *pK = List->GetFirst(); while (pK) { // counting how many lines are there count++; pK = pK->GetNext(); } GridCtrl->CreateGrid(count, 1, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Keyword")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pK = List->GetFirst(); while (pK) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); GridCtrl->SetCellValue(count, 0, pK->GetKeyword()); count++; pK = pK->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // Keyword selection wxBoxSizer *keywordBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(keywordBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *keywordBox = new wxStaticBox(this, wxID_STATIC, wxT("Adding a Keyword"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *KeywordSizer = new wxStaticBoxSizer(keywordBox, wxHORIZONTAL); keywordBoxSizer->Add(KeywordSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *keywordSizer = new wxBoxSizer(wxHORIZONTAL); KeywordSizer->Add(keywordSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *keywordLabel = new wxStaticText(this, wxID_STATIC, wxT("&Keyword:")); keywordSizer->Add(keywordLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *keywordCtrl = new wxTextCtrl(this, ID_VECTOR_KEYWORD, Keyword, wxDefaultPosition, wxSize(400, 22)); keywordSizer->Add(keywordCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); keywordSizer->AddSpacer(100); wxButton *addNew = new wxButton(this, ID_VECTOR_KEYWORD_ADD, wxT("&Add Keyword")); keywordSizer->Add(addNew, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorKeywordsDialog::OnQuit); Connect(ID_VECTOR_KEYWORD_ADD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VectorKeywordsDialog::OnCmdAddKeyword); Connect(ID_VECTOR_KEYWORD_REMOVE, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & VectorKeywordsDialog::OnCmdRemoveKeyword); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & VectorKeywordsDialog::OnRightClick); } void VectorKeywordsDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentRow = event.GetRow(); GridCtrl->SelectRow(CurrentRow); Keyword = GridCtrl->GetCellValue(CurrentRow, 0); menuItem = new wxMenuItem(&menu, ID_VECTOR_KEYWORD_REMOVE, wxT("&Remove")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void VectorKeywordsDialog::OnCmdRemoveKeyword(wxCommandEvent & WXUNUSED(event)) { // // deleting a Keyword [mouse action] // sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_UnRegisterVectorCoverageKeyword(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 2, Keyword.ToUTF8(), -1, SQLITE_TRANSIENT); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) { GridCtrl->DeleteRows(CurrentRow, 1); List->MarkDeleted(Keyword); } sqlite3_finalize(stmt); } bool VectorKeywordsDialog::DoRegistetVectorCoverageKeyword(wxString & keyword) { // // attempting to register a Vector Coverage Keyword // sqlite3_stmt *stmt = NULL; int value = 0; const char *sql = "SELECT SE_RegisterVectorCoverageKeyword(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 2, keyword.ToUTF8(), -1, SQLITE_TRANSIENT); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) ; else if (ret == SQLITE_ROW) value = sqlite3_column_int(stmt, 0); else { sqlite3_finalize(stmt); return false; } sqlite3_finalize(stmt); if (!value) return false; return true; } void VectorKeywordsDialog::OnCmdAddKeyword(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *keywordCtrl = (wxTextCtrl *) FindWindow(ID_VECTOR_KEYWORD); wxString keyword = keywordCtrl->GetValue(); if (keyword.Len() <= 0) { wxMessageBox(wxT("You must specify some Keyword !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (List->IsAlreadyDefinedKeyword(keyword) == true) { wxMessageBox(wxT("Already defined Keyword"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } // attempting to register the Keyword if (DoRegistetVectorCoverageKeyword(keyword) == true) { // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindVectorKeywords(CoverageName); int count = 0; VectorCoverageKeyword *pK = List->GetFirst(); while (pK) { // counting how many lines are there count++; pK = pK->GetNext(); } GridCtrl->AppendRows(count); count = 0; char dummy[1024]; wxString cell; pK = List->GetFirst(); while (pK) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); GridCtrl->SetCellValue(count, 0, pK->GetKeyword()); count++; pK = pK->GetNext(); } GridCtrl->AutoSizeColumns(); } return; } void VectorKeywordsDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } VectorCoverageKeywordsList::~VectorCoverageKeywordsList() { // destructor VectorCoverageKeyword *pK; VectorCoverageKeyword *pKn; pK = First; while (pK != NULL) { pKn = pK->GetNext(); delete pK; pK = pKn; } } void VectorCoverageKeywordsList::Add(wxString & keyword) { // inserting a new Keyword VectorCoverageKeyword *pK = new VectorCoverageKeyword(keyword); if (First == NULL) First = pK; if (Last != NULL) Last->SetNext(pK); Last = pK; } void VectorCoverageKeywordsList::MarkDeleted(wxString & keyword) { // marking some Keyword as deleted VectorCoverageKeyword *pK; pK = First; while (pK != NULL) { if (pK->GetKeyword().CmpNoCase(keyword) == 0) { pK->MarkDeleted(); return; } pK = pK->GetNext(); } } bool VectorCoverageKeywordsList::IsAlreadyDefinedKeyword(wxString & keyword) { // checking for an already defined Keyword VectorCoverageKeyword *pK; pK = First; while (pK != NULL) { if (pK->GetKeyword().CmpNoCase(keyword) == 0) { if (pK->IsDeleted() == true) return false; return true; } pK = pK->GetNext(); } return false; } VectorCoverageKeywordsList *MyFrame::FindVectorKeywords(wxString & coverage) { // will retrieve all Keywords for the given Coverage VectorCoverageKeywordsList *list = new VectorCoverageKeywordsList(); int i; char **results; int rows; int columns; char *errMsg = NULL; char *value; char *sql; char cvg[1024]; wxCharBuffer buffer = coverage.ToUTF8(); sprintf(cvg, "%s", buffer.data()); sql = sqlite3_mprintf ("SELECT keyword FROM vector_coverages_keyword WHERE coverage_name = %Q ORDER BY 1", cvg); int ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; wxString keyword = wxString::FromUTF8(value); list->Add(keyword); } } sqlite3_free_table(results); return list; } bool RasterSRIDsDialog::Create(MyFrame * parent, wxString & coverage) { // // creating the dialog // MainFrame = parent; int pos = coverage.Find(wxT(" [SRID=")); if (pos != wxNOT_FOUND) CoverageName = coverage.Left(pos); else CoverageName = coverage; List = MainFrame->FindRasterAlternativeSRIDs(CoverageName); if (wxDialog::Create(parent, wxID_ANY, wxT("Raster Coverage: alternative SRIDs")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterSRIDsDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Raster Coverage wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("&Coverage Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(550, 22), wxTE_READONLY); cvgCtrl->Enable(false); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered alternative SRIDs"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_RASTER_SRID_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; RasterCoverageSRID *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->CreateGrid(count, 5, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Native")); GridCtrl->SetColLabelValue(1, wxT("SRID")); GridCtrl->SetColLabelValue(2, wxT("Auth Name")); GridCtrl->SetColLabelValue(3, wxT("Auth SRID")); GridCtrl->SetColLabelValue(4, wxT("RefSys Name")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); if (pS->IsNative() == true) GridCtrl->SetCellValue(count, 0, wxT("yes")); else GridCtrl->SetCellValue(count, 0, wxT("")); sprintf(dummy, "%d", pS->GetSrid()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 1, cell); GridCtrl->SetCellAlignment(count, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 2, pS->GetAuthName()); sprintf(dummy, "%d", pS->GetAuthSrid()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 3, cell); GridCtrl->SetCellAlignment(count, 3, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 4, pS->GetRefSysName()); count++; pS = pS->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // SRID selection wxBoxSizer *sridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *sridBox = new wxStaticBox(this, wxID_STATIC, wxT("Adding an alternative SRID"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *SridSizer = new wxStaticBoxSizer(sridBox, wxHORIZONTAL); sridBoxSizer->Add(SridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); SridSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); int srid = 0; wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_RASTER_SRID, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, -1, 1000000, srid); sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); sridSizer->AddSpacer(100); wxButton *addNew = new wxButton(this, ID_RASTER_SRID_ADD, wxT("&Add SRID")); sridSizer->Add(addNew, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSRIDsDialog::OnQuit); Connect(ID_RASTER_SRID_ADD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterSRIDsDialog::OnCmdAddSrid); Connect(ID_RASTER_SRID_REMOVE, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & RasterSRIDsDialog::OnCmdRemoveSrid); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & RasterSRIDsDialog::OnRightClick); } void RasterSRIDsDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentRow = event.GetRow(); GridCtrl->SelectRow(CurrentRow); wxString native = GridCtrl->GetCellValue(CurrentRow, 0); if (native.CmpNoCase(wxT("yes")) == 0) return; wxString id = GridCtrl->GetCellValue(CurrentRow, 1); long srid; id.ToLong(&srid); CurrentSRID = srid; menuItem = new wxMenuItem(&menu, ID_RASTER_SRID_REMOVE, wxT("&Remove")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void RasterSRIDsDialog::OnCmdRemoveSrid(wxCommandEvent & WXUNUSED(event)) { // // deleting a SRID [mouse action] // sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_UnRegisterRasterCoverageSrid(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, 2, CurrentSRID); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) { GridCtrl->DeleteRows(CurrentRow, 1); List->MarkDeleted(CurrentSRID); } sqlite3_finalize(stmt); } bool RasterSRIDsDialog::DoRegistetRasterCoverageSrid(int srid) { // // attempting to register an alternative Raster Coverage SRID // sqlite3_stmt *stmt = NULL; int value = 0; const char *sql = "SELECT SE_RegisterRasterCoverageSrid(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, 2, srid); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) ; else if (ret == SQLITE_ROW) value = sqlite3_column_int(stmt, 0); else { sqlite3_finalize(stmt); return false; } sqlite3_finalize(stmt); if (!value) return false; return true; } void RasterSRIDsDialog::OnCmdAddSrid(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_RASTER_SRID); int srid = sridCtrl->GetValue(); if (srid <= 0) { wxMessageBox(wxT("You must specify some SRID value !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } else if (MainFrame->SridNotExists(srid) == true) { wxMessageBox(wxT("invalid SRID value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (List->IsNativeSrid(srid) == true) { wxMessageBox(wxT("Can't register twice the Native SRID"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (List->IsAlreadyDefinedSrid(srid) == true) { wxMessageBox(wxT("Already defined alternative SRID"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } // attempting to register the alternative SRID if (DoRegistetRasterCoverageSrid(srid) == true) { // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindRasterAlternativeSRIDs(CoverageName); int count = 0; RasterCoverageSRID *pS = List->GetFirst(); while (pS) { // counting how many lines are there count++; pS = pS->GetNext(); } GridCtrl->AppendRows(count); count = 0; char dummy[1024]; wxString cell; pS = List->GetFirst(); while (pS) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); if (pS->IsNative() == true) GridCtrl->SetCellValue(count, 0, wxT("yes")); else GridCtrl->SetCellValue(count, 0, wxT("")); sprintf(dummy, "%d", pS->GetSrid()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 1, cell); GridCtrl->SetCellAlignment(count, 1, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 2, pS->GetAuthName()); sprintf(dummy, "%d", pS->GetAuthSrid()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 3, cell); GridCtrl->SetCellAlignment(count, 3, wxALIGN_RIGHT, wxALIGN_CENTRE); GridCtrl->SetCellValue(count, 4, pS->GetRefSysName()); count++; pS = pS->GetNext(); } GridCtrl->AutoSizeColumns(); } return; } void RasterSRIDsDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } RasterCoverageSRIDsList::~RasterCoverageSRIDsList() { // destructor RasterCoverageSRID *pS; RasterCoverageSRID *pSn; pS = First; while (pS != NULL) { pSn = pS->GetNext(); delete pS; pS = pSn; } } void RasterCoverageSRIDsList::Add(bool native, int srid, wxString & auth_name, int auth_srid, wxString & name) { // inserting a new SRID RasterCoverageSRID *pS = new RasterCoverageSRID(native, srid, auth_name, auth_srid, name); if (First == NULL) First = pS; if (Last != NULL) Last->SetNext(pS); Last = pS; } void RasterCoverageSRIDsList::MarkDeleted(int srid) { // marking some Srid as deleted RasterCoverageSRID *pS; pS = First; while (pS != NULL) { if (pS->GetSrid() == srid) { pS->MarkDeleted(); return; } pS = pS->GetNext(); } } bool RasterCoverageSRIDsList::IsNativeSrid(int srid) { // checking for the Native SRID RasterCoverageSRID *pS; pS = First; while (pS != NULL) { if (pS->GetSrid() == srid) return pS->IsNative(); pS = pS->GetNext(); } return false; } bool RasterCoverageSRIDsList::IsAlreadyDefinedSrid(int srid) { // checking for an already defined alternative SRID RasterCoverageSRID *pS; pS = First; while (pS != NULL) { if (pS->GetSrid() == srid) { if (pS->IsDeleted() == true) return false; return true; } pS = pS->GetNext(); } return false; } RasterCoverageSRIDsList *MyFrame::FindRasterAlternativeSRIDs(wxString & coverage) { // will retrieve all alternative SRIDs for the given Coverage RasterCoverageSRIDsList *list = new RasterCoverageSRIDsList(); int i; char **results; int rows; int columns; char *errMsg = NULL; char *value; char *sql; char cvg[1024]; wxCharBuffer buffer = coverage.ToUTF8(); sprintf(cvg, "%s", buffer.data()); sql = sqlite3_mprintf ("SELECT 1, s.srid, s.auth_name, s.auth_srid, s.ref_sys_name FROM raster_coverages AS v " "LEFT JOIN spatial_ref_sys AS s ON (v.srid = s.srid) " "WHERE v.coverage_name = %Q UNION " "SELECT 0, s.srid, s.auth_name, s.auth_srid, s.ref_sys_name FROM raster_coverages AS v " "JOIN raster_coverages_srid AS x ON (v.coverage_name = x.coverage_name) " "LEFT JOIN spatial_ref_sys AS s ON (x.srid = s.srid) " "WHERE v.coverage_name = %Q ORDER BY 2", cvg, cvg); int ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { bool native = false; value = results[(i * columns) + 0]; if (atoi(value) != 0) native = true; value = results[(i * columns) + 1]; int srid = atoi(value); value = results[(i * columns) + 2]; wxString auth_name = wxString::FromUTF8(value); value = results[(i * columns) + 3]; int auth_srid = atoi(value); value = results[(i * columns) + 4]; wxString name = wxString::FromUTF8(value); list->Add(native, srid, auth_name, auth_srid, name); } } sqlite3_free_table(results); return list; } bool RasterKeywordsDialog::Create(MyFrame * parent, wxString & coverage) { // // creating the dialog // MainFrame = parent; int pos = coverage.Find(wxT(" [SRID=")); if (pos != wxNOT_FOUND) CoverageName = coverage.Left(pos); else CoverageName = coverage; List = MainFrame->FindRasterKeywords(CoverageName); if (wxDialog::Create(parent, wxID_ANY, wxT("Raster Coverage: Keywords")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RasterKeywordsDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Raster Coverage wxBoxSizer *cvgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(cvgSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticText *cvgLabel = new wxStaticText(this, wxID_STATIC, wxT("&Coverage Name:")); cvgSizer->Add(cvgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *cvgCtrl = new wxTextCtrl(this, wxID_ANY, CoverageName, wxDefaultPosition, wxSize(550, 22), wxTE_READONLY); cvgCtrl->Enable(false); cvgSizer->Add(cvgCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered Keywords"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_RASTER_KEYWORD_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; RasterCoverageKeyword *pK = List->GetFirst(); while (pK) { // counting how many lines are there count++; pK = pK->GetNext(); } GridCtrl->CreateGrid(count, 1, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Keyword")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; char dummy[1024]; wxString cell; pK = List->GetFirst(); while (pK) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); GridCtrl->SetCellValue(count, 0, pK->GetKeyword()); count++; pK = pK->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // Keyword selection wxBoxSizer *keywordBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(keywordBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *keywordBox = new wxStaticBox(this, wxID_STATIC, wxT("Adding a Keyword"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *KeywordSizer = new wxStaticBoxSizer(keywordBox, wxHORIZONTAL); keywordBoxSizer->Add(KeywordSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *keywordSizer = new wxBoxSizer(wxHORIZONTAL); KeywordSizer->Add(keywordSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *keywordLabel = new wxStaticText(this, wxID_STATIC, wxT("&Keyword:")); keywordSizer->Add(keywordLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *keywordCtrl = new wxTextCtrl(this, ID_RASTER_KEYWORD, Keyword, wxDefaultPosition, wxSize(400, 22)); keywordSizer->Add(keywordCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); keywordSizer->AddSpacer(100); wxButton *addNew = new wxButton(this, ID_RASTER_KEYWORD_ADD, wxT("&Add Keyword")); keywordSizer->Add(addNew, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterKeywordsDialog::OnQuit); Connect(ID_RASTER_KEYWORD_ADD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RasterKeywordsDialog::OnCmdAddKeyword); Connect(ID_RASTER_KEYWORD_REMOVE, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & RasterKeywordsDialog::OnCmdRemoveKeyword); Connect(wxID_ANY, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & RasterKeywordsDialog::OnRightClick); } void RasterKeywordsDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentRow = event.GetRow(); GridCtrl->SelectRow(CurrentRow); Keyword = GridCtrl->GetCellValue(CurrentRow, 0); menuItem = new wxMenuItem(&menu, ID_RASTER_KEYWORD_REMOVE, wxT("&Remove")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void RasterKeywordsDialog::OnCmdRemoveKeyword(wxCommandEvent & WXUNUSED(event)) { // // deleting a Keyword [mouse action] // sqlite3_stmt *stmt = NULL; const char *sql = "SELECT SE_UnRegisterRasterCoverageKeyword(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 2, Keyword.ToUTF8(), -1, SQLITE_TRANSIENT); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) { GridCtrl->DeleteRows(CurrentRow, 1); List->MarkDeleted(Keyword); } sqlite3_finalize(stmt); } bool RasterKeywordsDialog::DoRegistetRasterCoverageKeyword(wxString & keyword) { // // attempting to register a Raster Coverage Keyword // sqlite3_stmt *stmt = NULL; int value = 0; const char *sql = "SELECT SE_RegisterRasterCoverageKeyword(?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, CoverageName.ToUTF8(), -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 2, keyword.ToUTF8(), -1, SQLITE_TRANSIENT); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) ; else if (ret == SQLITE_ROW) value = sqlite3_column_int(stmt, 0); else { sqlite3_finalize(stmt); return false; } sqlite3_finalize(stmt); if (!value) return false; return true; } void RasterKeywordsDialog::OnCmdAddKeyword(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *keywordCtrl = (wxTextCtrl *) FindWindow(ID_RASTER_KEYWORD); wxString keyword = keywordCtrl->GetValue(); if (keyword.Len() <= 0) { wxMessageBox(wxT("You must specify some Keyword !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (List->IsAlreadyDefinedKeyword(keyword) == true) { wxMessageBox(wxT("Already defined Keyword"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } // attempting to register the Keyword if (DoRegistetRasterCoverageKeyword(keyword) == true) { // updating the Grid int tot_rows = GridCtrl->GetNumberRows(); GridCtrl->DeleteRows(0, tot_rows); if (List != NULL) delete List; List = MainFrame->FindRasterKeywords(CoverageName); int count = 0; RasterCoverageKeyword *pK = List->GetFirst(); while (pK) { // counting how many lines are there count++; pK = pK->GetNext(); } GridCtrl->AppendRows(count); count = 0; char dummy[1024]; wxString cell; pK = List->GetFirst(); while (pK) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); GridCtrl->SetCellValue(count, 0, pK->GetKeyword()); count++; pK = pK->GetNext(); } GridCtrl->AutoSizeColumns(); } return; } void RasterKeywordsDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } RasterCoverageKeywordsList::~RasterCoverageKeywordsList() { // destructor RasterCoverageKeyword *pK; RasterCoverageKeyword *pKn; pK = First; while (pK != NULL) { pKn = pK->GetNext(); delete pK; pK = pKn; } } void RasterCoverageKeywordsList::Add(wxString & keyword) { // inserting a new Keyword RasterCoverageKeyword *pK = new RasterCoverageKeyword(keyword); if (First == NULL) First = pK; if (Last != NULL) Last->SetNext(pK); Last = pK; } void RasterCoverageKeywordsList::MarkDeleted(wxString & keyword) { // marking some Keyword as deleted RasterCoverageKeyword *pK; pK = First; while (pK != NULL) { if (pK->GetKeyword().CmpNoCase(keyword) == 0) { pK->MarkDeleted(); return; } pK = pK->GetNext(); } } bool RasterCoverageKeywordsList::IsAlreadyDefinedKeyword(wxString & keyword) { // checking for an already defined Keyword RasterCoverageKeyword *pK; pK = First; while (pK != NULL) { if (pK->GetKeyword().CmpNoCase(keyword) == 0) { if (pK->IsDeleted() == true) return false; return true; } pK = pK->GetNext(); } return false; } RasterCoverageKeywordsList *MyFrame::FindRasterKeywords(wxString & coverage) { // will retrieve all Keywords for the given Coverage RasterCoverageKeywordsList *list = new RasterCoverageKeywordsList(); int i; char **results; int rows; int columns; char *errMsg = NULL; char *value; char *sql; char cvg[1024]; wxCharBuffer buffer = coverage.ToUTF8(); sprintf(cvg, "%s", buffer.data()); sql = sqlite3_mprintf ("SELECT keyword FROM raster_coverages_keyword WHERE coverage_name = %Q ORDER BY 1", cvg); int ret = sqlite3_get_table(SqliteHandle, sql, &results, &rows, &columns, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return list; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; wxString keyword = wxString::FromUTF8(value); list->Add(keyword); } } sqlite3_free_table(results); return list; } bool LoadExternalGraphicDialog::Create(MyFrame * parent, wxArrayString & paths, wxString & path) { // // creating the dialog // MainFrame = parent; Paths = paths; Path = path; if (wxDialog::Create(parent, wxID_ANY, wxT("Loading New External Graphic resource(s)")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void LoadExternalGraphicDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: files to be imported wxBoxSizer *fileSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(fileSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *fileLabel = new wxStaticText(this, wxID_STATIC, wxT("Import &File(s):")); fileSizer->Add(fileLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *filesCtrl = new wxTextCtrl(this, wxID_ANY, Path, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); fileSizer->Add(filesCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: progress report wxBoxSizer *progrSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(progrSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *doneCtrl = new wxTextCtrl(this, ID_LOAD_EXTERNAL_DONE, ListDone, wxDefaultPosition, wxSize(650, 100), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2); progrSizer->Add(doneCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Import")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *abort = new wxButton(this, ID_LOAD_ABORT, wxT("&Abort")); abort->Enable(false); okCancelBox->Add(abort, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadExternalGraphicDialog::OnOk); Connect(ID_LOAD_ABORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadExternalGraphicDialog::OnCmdAbort); Connect(ID_LOAD_EXTERNAL_START, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadExternalGraphicDialog::OnRequestStart); Connect(ID_LOAD_EXTERNAL_STOP, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadExternalGraphicDialog::OnRequestStop); Connect(ID_LOAD_EXTERNAL_SKIP, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadExternalGraphicDialog::OnRequestSkip); Connect(ID_LOAD_EXTERNAL_THREAD_FINISHED, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadExternalGraphicDialog::OnThreadFinished); } void LoadExternalGraphicDialog::OnCmdAbort(wxCommandEvent & WXUNUSED(event)) { // // aborting the External Graphic(s) Import process // if (Params.IsAbortPending() == true) return; Params.RequestAbort(); wxString report = wxT("\nan ABORT request is now pending and will be accepted ASAP"); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_EXTERNAL_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(192, 0, 0); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(report); } void LoadExternalGraphicDialog::OnRequestStart(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_EXTERNAL_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(0, 0, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(msg); doneCtrl->MarkDirty(); } void LoadExternalGraphicDialog::OnRequestStop(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_EXTERNAL_DONE); ListDone += msg; doneCtrl->Clear(); wxColour fore = wxColour(0, 0, 0); wxColour back = wxColour(255, 255, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(ListDone); doneCtrl->MarkDirty(); } void LoadExternalGraphicDialog::OnRequestSkip(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_EXTERNAL_DONE); ListDone += msg; doneCtrl->Clear(); wxColour fore = wxColour(0, 0, 0); wxColour back = wxColour(255, 0, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(ListDone); doneCtrl->MarkDirty(); } #ifdef _WIN32 DWORD WINAPI DoExecuteExternalGraphicLoad(void *arg) #else void *DoExecuteExternalGraphicLoad(void *arg) #endif { // // threaded function: processing an External Graphic Import operation // ExternalGraphicLoadParams *params = (ExternalGraphicLoadParams *) arg; const char *sql; int ret; sqlite3_stmt *stmt = NULL; int count = params->GetPathsCount(); int i; clock_t clock_start; clock_t clock_end; double seconds; char elapsed[64]; char ordinal[64]; wxString report; wxString path; void *blob; int blob_size; wxCommandEvent evt_start(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_EXTERNAL_START); wxCommandEvent evt_stop(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_EXTERNAL_STOP); wxCommandEvent evt_skip(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_EXTERNAL_SKIP); sql = "SELECT SE_RegisterExternalGraphic(?, ?, ?, ?, ?)"; ret = sqlite3_prepare_v2(params->GetMainFrame()->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { params->SetError(); goto error; } for (i = 0; i < count; i++) { // loading and verifying each External Graphic resource if (params->IsAbortPending() == true) { report = wxT("STOP .... aborted by the user !!!!"); evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); break; } path = params->GetPathByIndex(i); params->SetCurrentPath(path); report = wxT("Loading and Validating: ") + path; evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); clock_start = clock(); wxString abstract; if (params->GetMainFrame()-> ValidateExternalGraphicResource(path.ToUTF8(), &blob, &blob_size, abstract) == true) { wxFileName fn(path); wxString xlink_href = wxT("http://www.utopia.gov/") + fn.GetFullName(); wxString filename = fn.GetFullName(); wxString title = fn.GetName(); if (params->GetDlg()-> RegisterExternalGraphic(stmt, xlink_href.ToUTF8(), title.ToUTF8(), abstract.ToUTF8(), filename.ToUTF8(), blob, blob_size) != true) { params->SetError(); goto error; } clock_end = clock(); seconds = (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC; MyResultSetView::FormatElapsedTime(seconds, elapsed); sprintf(ordinal, "done %d/%d: ", i + 1, count); report = wxString::FromUTF8(ordinal) + path + wxT(" [") + wxString::FromUTF8(elapsed) + wxT("]\n"); evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->Done(); } else { clock_end = clock(); seconds = (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC; MyResultSetView::FormatElapsedTime(seconds, elapsed); sprintf(ordinal, "discarded %d/%d (not a valid External Graphic): ", i + 1, count); report = wxString::FromUTF8(ordinal) + path + wxT(" [") + wxString::FromUTF8(elapsed) + wxT("]\n"); evt_skip.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_skip); } } sqlite3_finalize(stmt); goto end; error: sqlite3_finalize(stmt); report = wxT("FAILED: ") + path; evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->SetError(); end: wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_EXTERNAL_THREAD_FINISHED); params->GetDlg()->GetEventHandler()->AddPendingEvent(event); #ifdef _WIN32 return 0; #else pthread_exit(NULL); #endif } void LoadExternalGraphicDialog:: OnThreadFinished(wxCommandEvent & WXUNUSED(event)) { // resuming execution when the Import External Graphic thread quits ::wxEndBusyCursor(); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); quitBtn->Enable(true); abortBtn->Enable(false); sqlite3_exec(Params.GetMainFrame()->GetSqlite(), "COMMIT", NULL, NULL, NULL); if (Params.GetError() == true) { char dummy[80]; sprintf(dummy, "%d External Graphic resources have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nA fatal error occurred while loading:\n") + Params.GetCurrentPath(), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else if (Params.IsAbortPending() == true) { char dummy[80]; sprintf(dummy, "%d External Graphic resources have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nStopped by an Abort user request"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } else { char dummy[80]; sprintf(dummy, "%d External Graphic resources have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } bool MyFrame::ValidateExternalGraphicResource(const char *path, void **blob, int *blob_size, wxString & abstract) { // // attempting to load and validate an External Graphic // int ret; sqlite3_stmt *stmt; void *xblob = NULL; int xblob_size; int valid = 0; // Loading from file - testing for an eventual SVG image char *sql = sqlite3_mprintf("SELECT XB_Create(BlobFromFile(%Q), 1)", path); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return false; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { const void *xxblob = sqlite3_column_blob(stmt, 0); xblob_size = sqlite3_column_bytes(stmt, 0); xblob = malloc(xblob_size); memcpy(xblob, xxblob, xblob_size); } } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (xblob != NULL) goto ok_svg; // Loading from file - testing for an eventual SVG image sql = sqlite3_mprintf("SELECT BlobFromFile(%Q)", path); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) return false; while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { const void *xxblob = sqlite3_column_blob(stmt, 0); xblob_size = sqlite3_column_bytes(stmt, 0); xblob = malloc(xblob_size); memcpy(xblob, xxblob, xblob_size); } } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (xblob == NULL) return false; ok_svg: // Checking if really is a valid External Graphic resource stmt = NULL; sql = sqlite3_mprintf("SELECT GetMimeType(?)"); ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); sqlite3_free(sql); if (ret != SQLITE_OK) goto invalid; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, xblob, xblob_size, SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) { rl2RasterPtr raster; unsigned int width; unsigned int height; char dummy[128]; const char *mime_type = (const char *) sqlite3_column_text(stmt, 0); if (strcmp(mime_type, "image/gif") == 0) { abstract = wxT("GIF icon: "); raster = rl2_raster_from_gif((const unsigned char *) xblob, xblob_size); if (raster != NULL) { rl2_get_raster_size(raster, &width, &height); sprintf(dummy, "%u X %u", width, height); abstract += wxString::FromUTF8(dummy); rl2_destroy_raster(raster); } valid = 1; } if (strcmp(mime_type, "image/png") == 0) { abstract = wxT("PNG icon: "); raster = rl2_raster_from_png((const unsigned char *) xblob, xblob_size, 1); if (raster != NULL) { rl2_get_raster_size(raster, &width, &height); sprintf(dummy, "%u X %u", width, height); abstract += wxString::FromUTF8(dummy); rl2_destroy_raster(raster); } valid = 1; } if (strcmp(mime_type, "image/jpeg") == 0) { abstract = wxT("JPEG icon: "); raster = rl2_raster_from_jpeg((const unsigned char *) xblob, xblob_size); if (raster != NULL) { rl2_get_raster_size(raster, &width, &height); sprintf(dummy, "%u X %u", width, height); abstract += wxString::FromUTF8(dummy); rl2_destroy_raster(raster); } valid = 1; } if (strcmp(mime_type, "image/svg+xml") == 0) { abstract = wxT("SVG symbol"); valid = 1; } } } else goto invalid; } sqlite3_finalize(stmt); stmt = NULL; if (!valid) goto invalid; *blob = xblob; *blob_size = xblob_size; return true; invalid: if (stmt != NULL) sqlite3_finalize(stmt); free(xblob); *blob = NULL; *blob_size = 0; return false; } bool LoadExternalGraphicDialog::RegisterExternalGraphic(sqlite3_stmt * stmt, const char *xlink_href, const char *title, const char *abstract, const char *filename, void *blob, int blob_size) { // // attempting to register the new Raster Style // int ret; int valid = 0; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, xlink_href, strlen(xlink_href), SQLITE_STATIC); sqlite3_bind_blob(stmt, 2, blob, blob_size, free); sqlite3_bind_text(stmt, 3, title, strlen(title), SQLITE_STATIC); sqlite3_bind_text(stmt, 4, abstract, strlen(abstract), SQLITE_STATIC); sqlite3_bind_text(stmt, 5, filename, strlen(filename), SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else return false; } if (valid) return true; return false; } void LoadExternalGraphicDialog::DoRunLoad() { // // executing the Load External Graphic resource(s) process in a separate Thread // #ifdef _WIN32 HANDLE thread_handle; DWORD dwThreadId; #else pthread_t thread_id; #endif Params.Initialize(MainFrame, this, Paths); #ifdef _WIN32 thread_handle = CreateThread(NULL, 0, DoExecuteExternalGraphicLoad, &Params, 0, &dwThreadId); SetThreadPriority(thread_handle, THREAD_PRIORITY_IDLE); #else int ok_prior = 0; int policy; int min_prio; pthread_attr_t attr; struct sched_param sp; pthread_attr_init(&attr); if (pthread_attr_setschedpolicy(&attr, SCHED_RR) == 0) { // attempting to set the lowest priority if (pthread_attr_getschedpolicy(&attr, &policy) == 0) { min_prio = sched_get_priority_min(policy); sp.sched_priority = min_prio; if (pthread_attr_setschedparam(&attr, &sp) == 0) { // ok, setting the lowest priority ok_prior = 1; pthread_create(&thread_id, &attr, DoExecuteExternalGraphicLoad, &Params); } } } if (!ok_prior) { // failure: using standard priority pthread_create(&thread_id, NULL, DoExecuteExternalGraphicLoad, &Params); } #endif } void LoadExternalGraphicDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxButton *loadBtn = (wxButton *) FindWindow(wxID_OK); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); loadBtn->Enable(false); quitBtn->Enable(false); abortBtn->Enable(true); ::wxBeginBusyCursor(); char *errMsg = NULL; int ret = sqlite3_exec(MainFrame->GetSqlite(), "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ret = sqlite3_exec(MainFrame->GetSqlite(), "SELECT CreateStylingTables()", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CreateStylingTables() error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } DoRunLoad(); } bool UnregisterExternalGraphicDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; List = MainFrame->FindExternalGraphic(false); if (wxDialog::Create(parent, wxID_ANY, wxT("Unregistering an External Graphic resource")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void UnregisterExternalGraphicDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT ("Registered External Graphic resources"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; ExternalGraphic *pE = List->GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl->CreateGrid(count, 5, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("xlink:href")); GridCtrl->SetColLabelValue(1, wxT("Graphic")); GridCtrl->SetColLabelValue(2, wxT("Title")); GridCtrl->SetColLabelValue(3, wxT("Abstract")); GridCtrl->SetColLabelValue(4, wxT("MimeType")); count = 0; pE = List->GetFirst(); while (pE) { // feeding grid rows GridCtrl->SetCellValue(count, 0, pE->GetXLinkHref()); MyGraphicCellRenderer *renderer = new MyGraphicCellRenderer; renderer->SetGraphic(pE->GetGraphic()); GridCtrl->SetCellRenderer(count, 1, renderer); GridCtrl->SetCellValue(count, 2, pE->GetTitle()); GridCtrl->SetCellValue(count, 3, pE->GetAbstract()); GridCtrl->SetCellValue(count, 4, pE->GetMimeType()); count++; pE = pE->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Unregister")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & UnregisterExternalGraphicDialog::OnOk); } bool UnregisterExternalGraphicDialog::DoUnregisterExternalGraphic(const char *xlink_href) { // // attempting to unregister the External Graphic resource // int ret; int valid = 0; const char *sql; sqlite3_stmt *stmt = NULL; sql = "SELECT SE_UnregisterExternalGraphic(?)"; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, xlink_href, strlen(xlink_href), SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (valid) return true; return false; } void UnregisterExternalGraphicDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // int selCount = 0; wxString xlink_href; for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { xlink_href = GridCtrl->GetCellValue(i, 0); selCount++; } } if (selCount < 1) { wxMessageBox(wxT ("You must select an External Graphic resource to be unregistered !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (selCount > 1) { wxString msg = wxT ("You must select just a single External Graphic resource to be unregistered !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } ::wxBeginBusyCursor(); if (DoUnregisterExternalGraphic(xlink_href.ToUTF8()) == true) { ::wxEndBusyCursor(); wxMessageBox(wxT("External Graphic (xlink:href=") + xlink_href + wxT(") successfully unregistered"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { ::wxEndBusyCursor(); wxMessageBox(wxT ("Some error occurred: unable to unregister External Graphic (xlink:href=") + xlink_href + wxT(")"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } wxDialog::EndModal(wxID_OK); } bool LoadTextFontDialog::Create(MyFrame * parent, wxArrayString & paths, wxString & path) { // // creating the dialog // MainFrame = parent; Paths = paths; Path = path; if (wxDialog::Create(parent, wxID_ANY, wxT("Loading New Text Font(s)")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void LoadTextFontDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: files to be imported wxBoxSizer *fileSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(fileSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *fileLabel = new wxStaticText(this, wxID_STATIC, wxT("Import &File(s):")); fileSizer->Add(fileLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *filesCtrl = new wxTextCtrl(this, wxID_ANY, Path, wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE | wxTE_READONLY); fileSizer->Add(filesCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: progress report wxBoxSizer *progrSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(progrSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *doneCtrl = new wxTextCtrl(this, ID_LOAD_FONT_DONE, ListDone, wxDefaultPosition, wxSize(650, 100), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH2); progrSizer->Add(doneCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Import")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Quit")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *abort = new wxButton(this, ID_LOAD_ABORT, wxT("&Abort")); abort->Enable(false); okCancelBox->Add(abort, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadTextFontDialog::OnOk); Connect(ID_LOAD_ABORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadTextFontDialog::OnCmdAbort); Connect(ID_LOAD_FONT_START, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadTextFontDialog::OnRequestStart); Connect(ID_LOAD_FONT_STOP, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadTextFontDialog::OnRequestStop); Connect(ID_LOAD_FONT_SKIP, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadTextFontDialog::OnRequestSkip); Connect(ID_LOAD_FONT_THREAD_FINISHED, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadTextFontDialog::OnThreadFinished); } void LoadTextFontDialog::OnCmdAbort(wxCommandEvent & WXUNUSED(event)) { // // aborting the Text Font(s) Import process // if (Params.IsAbortPending() == true) return; Params.RequestAbort(); wxString report = wxT("\nan ABORT request is now pending and will be accepted ASAP"); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_FONT_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(192, 0, 0); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(report); } void LoadTextFontDialog::OnRequestStart(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_FONT_DONE); wxColour fore = wxColour(255, 255, 255); wxColour back = wxColour(0, 0, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(msg); doneCtrl->MarkDirty(); } void LoadTextFontDialog::OnRequestStop(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_FONT_DONE); ListDone += msg; doneCtrl->Clear(); wxColour fore = wxColour(0, 0, 0); wxColour back = wxColour(255, 255, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(ListDone); doneCtrl->MarkDirty(); } void LoadTextFontDialog::OnRequestSkip(wxCommandEvent & event) { // // updating the Progress Report // wxString msg = event.GetString(); wxTextCtrl *doneCtrl = (wxTextCtrl *) FindWindow(ID_LOAD_FONT_DONE); ListDone += msg; doneCtrl->Clear(); wxColour fore = wxColour(0, 0, 0); wxColour back = wxColour(255, 0, 255); wxTextAttr style = wxTextAttr(fore, back); doneCtrl->SetDefaultStyle(style); doneCtrl->AppendText(ListDone); doneCtrl->MarkDirty(); } #ifdef _WIN32 DWORD WINAPI DoExecuteTextFontLoad(void *arg) #else void *DoExecuteTextFontLoad(void *arg) #endif { // // threaded function: processing a Text Font Import operation // TextFontLoadParams *params = (TextFontLoadParams *) arg; const char *sql; int ret; sqlite3_stmt *stmt = NULL; int count = params->GetPathsCount(); int i; clock_t clock_start; clock_t clock_end; double seconds; char elapsed[64]; char ordinal[64]; wxString report; wxString path; wxCommandEvent evt_start(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_FONT_START); wxCommandEvent evt_stop(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_FONT_STOP); wxCommandEvent evt_skip(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_FONT_SKIP); sql = "SELECT RL2_LoadFontFromFile(?)"; ret = sqlite3_prepare_v2(params->GetMainFrame()->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { params->SetError(); goto error; } for (i = 0; i < count; i++) { // loading and verifying each Text Font resource if (params->IsAbortPending() == true) { report = wxT("STOP .... aborted by the user !!!!"); evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); break; } path = params->GetPathByIndex(i); params->SetCurrentPath(path); report = wxT("Loading and Validating: ") + path; evt_start.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_start); clock_start = clock(); wxString abstract; if (params->GetDlg()->RegisterTextFont(stmt, path.ToUTF8()) != true) { clock_end = clock(); seconds = (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC; MyResultSetView::FormatElapsedTime(seconds, elapsed); sprintf(ordinal, "discarded %d/%d (not a valid Text Font): ", i + 1, count); report = wxString::FromUTF8(ordinal) + path + wxT(" [") + wxString::FromUTF8(elapsed) + wxT("]\n"); evt_skip.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_skip); continue; } clock_end = clock(); seconds = (double) (clock_end - clock_start) / (double) CLOCKS_PER_SEC; MyResultSetView::FormatElapsedTime(seconds, elapsed); sprintf(ordinal, "done %d/%d: ", i + 1, count); report = wxString::FromUTF8(ordinal) + path + wxT(" [") + wxString::FromUTF8(elapsed) + wxT("]\n"); evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->Done(); } sqlite3_finalize(stmt); goto end; error: sqlite3_finalize(stmt); report = wxT("FAILED: ") + path; evt_stop.SetString(report); params->GetDlg()->GetEventHandler()->AddPendingEvent(evt_stop); params->SetError(); end: wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, ID_LOAD_FONT_THREAD_FINISHED); params->GetDlg()->GetEventHandler()->AddPendingEvent(event); #ifdef _WIN32 return 0; #else pthread_exit(NULL); #endif } void LoadTextFontDialog::OnThreadFinished(wxCommandEvent & WXUNUSED(event)) { // resuming execution when the Import Text Font thread quits ::wxEndBusyCursor(); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); quitBtn->Enable(true); abortBtn->Enable(false); sqlite3_exec(Params.GetMainFrame()->GetSqlite(), "COMMIT", NULL, NULL, NULL); if (Params.GetError() == true) { char dummy[80]; sprintf(dummy, "%d TextFonts have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nA fatal error occurred while loading:\n") + Params.GetCurrentPath(), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else if (Params.IsAbortPending() == true) { char dummy[80]; sprintf(dummy, "%d TextFonts have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy) + wxT("\n\nStopped by an Abort user request"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } else { char dummy[80]; sprintf(dummy, "%d TextFonts have been successfully imported", Params.GetCount()); wxMessageBox(wxString::FromUTF8(dummy), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } bool LoadTextFontDialog::RegisterTextFont(sqlite3_stmt * stmt, const char *path) { // // attempting to register the new Text Font // int ret; int valid = 0; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, path, strlen(path), SQLITE_STATIC); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) valid = sqlite3_column_int(stmt, 0); } else return false; } if (valid) return true; return false; } void LoadTextFontDialog::DoRunLoad() { // // executing the Load Text Font(s) process in a separate Thread // #ifdef _WIN32 HANDLE thread_handle; DWORD dwThreadId; #else pthread_t thread_id; #endif Params.Initialize(MainFrame, this, Paths); #ifdef _WIN32 thread_handle = CreateThread(NULL, 0, DoExecuteTextFontLoad, &Params, 0, &dwThreadId); SetThreadPriority(thread_handle, THREAD_PRIORITY_IDLE); #else int ok_prior = 0; int policy; int min_prio; pthread_attr_t attr; struct sched_param sp; pthread_attr_init(&attr); if (pthread_attr_setschedpolicy(&attr, SCHED_RR) == 0) { // attempting to set the lowest priority if (pthread_attr_getschedpolicy(&attr, &policy) == 0) { min_prio = sched_get_priority_min(policy); sp.sched_priority = min_prio; if (pthread_attr_setschedparam(&attr, &sp) == 0) { // ok, setting the lowest priority ok_prior = 1; pthread_create(&thread_id, &attr, DoExecuteTextFontLoad, &Params); } } } if (!ok_prior) { // failure: using standard priority pthread_create(&thread_id, NULL, DoExecuteTextFontLoad, &Params); } #endif } void LoadTextFontDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxButton *loadBtn = (wxButton *) FindWindow(wxID_OK); wxButton *quitBtn = (wxButton *) FindWindow(wxID_CANCEL); wxButton *abortBtn = (wxButton *) FindWindow(ID_LOAD_ABORT); loadBtn->Enable(false); quitBtn->Enable(false); abortBtn->Enable(true); ::wxBeginBusyCursor(); char *errMsg = NULL; int ret = sqlite3_exec(MainFrame->GetSqlite(), "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ret = sqlite3_exec(MainFrame->GetSqlite(), "SELECT CreateStylingTables()", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CreateStylingTables() error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } DoRunLoad(); } bool UnregisterTextFontDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; List = MainFrame->FindTextFont(); if (wxDialog::Create(parent, wxID_ANY, wxT("Unregistering a Text Font")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void UnregisterTextFontDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Registered Text Fonts"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_SLD_SE_GRID, wxDefaultPosition, wxSize(640, 200), wxALWAYS_SHOW_SB); int count = 0; TextFont *pF = List->GetFirst(); while (pF) { // counting how many lines are there count++; pF = pF->GetNext(); } GridCtrl->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("FaceName")); GridCtrl->SetColLabelValue(1, wxT("Bold")); GridCtrl->SetColLabelValue(2, wxT("Italic")); GridCtrl->SetColLabelValue(3, wxT("Sample")); count = 0; pF = List->GetFirst(); while (pF) { // feeding grid rows GridCtrl->SetCellValue(count, 0, pF->GetFacename()); MyFontCellRenderer *renderer = new MyFontCellRenderer; if (pF->IsBold() == true) GridCtrl->SetCellValue(count, 1, wxT("YES")); if (pF->IsItalic() == true) GridCtrl->SetCellValue(count, 2, wxT("YES")); renderer->SetFontExample(pF->GetFontExample()); GridCtrl->SetCellRenderer(count, 3, renderer); GridCtrl->SetCellBackgroundColour(count, 3, wxColour(255, 255, 255)); count++; pF = pF->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // buttons wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Unregister")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & UnregisterTextFontDialog::OnOk); } bool UnregisterTextFontDialog::DoUnregisterTextFont(int font_id) { // // attempting to unregister the Text Font // int ret; int valid = 0; const char *sql; sqlite3_stmt *stmt = NULL; sql = "DELETE FROM SE_Fonts WHERE font_id = ?"; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) return false; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int(stmt, 1, font_id); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) { valid = 1; break; } else { sqlite3_finalize(stmt); return false; } } sqlite3_finalize(stmt); if (valid) return true; return false; } void UnregisterTextFontDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // int selCount = 0; int FontId; for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { wxString cell_id = GridCtrl->GetCellValue(i, 0); long id; cell_id.ToLong(&id); FontId = id; selCount++; } } if (selCount < 1) { wxMessageBox(wxT ("You must select a Text Font to be unregistered !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (selCount > 1) { wxString msg = wxT("You must select just a single Text Font to be unregistered !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } ::wxBeginBusyCursor(); char dummy[128]; sprintf(dummy, "(FontID=%d)", FontId); if (DoUnregisterTextFont(FontId) == true) { ::wxEndBusyCursor(); wxMessageBox(wxT("Text Font ") + wxString::FromUTF8(dummy) + wxT(" successfully unregistered"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { ::wxEndBusyCursor(); wxMessageBox(wxT ("Some error occurred: unable to unregister Text Font ") + wxString::FromUTF8(dummy), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } wxDialog::EndModal(wxID_OK); } TextFontList *MyFrame::FindTextFont() { // will retrieve all registered Text Fonts TextFontList *list = new TextFontList(); sqlite3_stmt *stmt = NULL; const char *sql; sql = "SELECT font FROM SE_fonts"; int ret = sqlite3_prepare_v2(SqliteHandle, sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { delete list; return NULL; } while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { const unsigned char *blob = NULL; int blob_sz = 0; if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { blob = (const unsigned char *) sqlite3_column_blob(stmt, 0); blob_sz = sqlite3_column_bytes(stmt, 0); list->Add(RL2PrivateData, blob, blob_sz); } } else { sqlite3_finalize(stmt); delete list; return NULL; } } sqlite3_finalize(stmt); return list; } TextFont::TextFont(const void *priv_data, const unsigned char *blob, int blob_sz) { // ctor Next = NULL; char *facename = rl2_get_encoded_font_facename(blob, blob_sz); Facename = wxString::FromUTF8(facename); if (facename != NULL) free(facename); if (rl2_is_encoded_font_bold(blob, blob_sz) <= 0) Bold = false; else Bold = true; if (rl2_is_encoded_font_italic(blob, blob_sz) <= 0) Italic = false; else Italic = true; // creating the Font Preview rl2GraphicsContextPtr ctx = rl2_graph_create_context(600, 22); rl2_graph_set_brush(ctx, 255, 255, 255, 255); rl2_graph_draw_rectangle(ctx, -1, -1, 602, 24); const char *sample = "the quick brown fox jumps over the lazy dog"; rl2GraphicsFontPtr font = rl2_graph_create_TrueType_font(priv_data, blob, blob_sz, 16.0); rl2_graph_set_font(ctx, font); rl2_graph_draw_text(ctx, sample, 5.0, 18.0, 0.0, 0.0, 0.0); rl2_graph_release_font(ctx); rl2_graph_destroy_font(font); // creating a raster image unsigned char *rgb = rl2_graph_get_context_rgb_array(ctx); rl2_graph_destroy_context(ctx); rl2RasterPtr raster = rl2_create_raster(600, 22, RL2_SAMPLE_UINT8, RL2_PIXEL_RGB, 3, rgb, 600 * 22 * 3, NULL, NULL, 0, NULL); unsigned char *rgbaArray = NULL; int rgbaSize; unsigned int width; unsigned int height; wxImage *Image = NULL; if (raster) { if (rl2_get_raster_size(raster, &width, &height) == RL2_OK) { if (rl2_raster_data_to_RGBA(raster, &rgbaArray, &rgbaSize) != RL2_OK) rgbaArray = NULL; } rl2_destroy_raster(raster); } if (rgbaArray) { // creating the Image from RGB array unsigned int x; unsigned int y; Image = new wxImage(width, height); unsigned char *p = rgbaArray; Image->SetAlpha(); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { unsigned char r = *p++; unsigned char g = *p++; unsigned char b = *p++; unsigned char alpha = *p++; Image->SetRGB(x, y, r, g, b); Image->SetAlpha(x, y, alpha); } } free(rgbaArray); } if (Image != NULL) FontExample = Image; else FontExample = new wxImage(180, 16); } TextFontList::~TextFontList() { // dtor TextFont *pF; TextFont *pFn; pF = First; while (pF != NULL) { pFn = pF->GetNext(); delete pF; pF = pFn; } } void TextFontList::Add(const void *priv_data, const unsigned char *blob, int blob_sz) { // inserting a new Text Font into the list TextFont *pF = new TextFont(priv_data, blob, blob_sz); if (First == NULL) First = pF; if (Last != NULL) Last->SetNext(pF); Last = pF; } void TextFontList::FindByIndex(int idx, wxString & face_name, int *style, int *weight) { // searching an entry by its position TextFont *pF; int count = 0; pF = First; while (pF != NULL) { if (idx == count) { face_name = pF->GetFacename(); if (pF->IsBold() == true) *weight = RL2_FONTWEIGHT_BOLD; else *weight = RL2_FONTWEIGHT_NORMAL; if (pF->IsItalic() == true) *style = RL2_FONTSTYLE_ITALIC; else *style = RL2_FONTSTYLE_NORMAL; return; } count++; pF = pF->GetNext(); } face_name = wxT(""); *style = RL2_FONTSTYLE_NORMAL; *weight = RL2_FONTWEIGHT_NORMAL; } int TextFontList::FindByFaceName(wxString & face_name) { // searching an entry by Facename TextFont *pF; int count = 0; pF = First; while (pF != NULL) { if (face_name.CmpNoCase(pF->GetFacename()) == 0) return count; count++; pF = pF->GetNext(); } return -1; } void MyFontCellRenderer::Draw(wxGrid & grid, wxGridCellAttr & attr, wxDC & dc, const wxRect & rect, int row, int col, bool isSelected) { // drawing a Font Example cell wxBitmap bmp = wxBitmap(*FontExample); wxColour color = attr.GetBackgroundColour(); if (grid.IsEnabled() == false) { color = wxSystemSettings::GetColour(wxSYS_COLOUR_MENU); wxImage img = FontExample->ConvertToGreyscale(); bmp = wxBitmap(img); } dc.SetBrush(wxBrush(color)); dc.SetPen(*wxTRANSPARENT_PEN); dc.DrawRectangle(rect); int x = (rect.GetWidth() - bmp.GetWidth()) / 2; int y = (rect.GetHeight() - bmp.GetHeight()) / 2; dc.DrawBitmap(bmp, rect.x + x, rect.y + y, true); } spatialite_gui-2.0.0-devel/missing0000775000175000017500000002623312543275035014147 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: spatialite_gui-2.0.0-devel/AUTHORS0000664000175000017500000000010612543275035013607 00000000000000Original Author: Alessandro Furieri Contributors: spatialite_gui-2.0.0-devel/Makefile-static-Linux0000664000175000017500000000474112543275035016572 00000000000000# SandroFurieri (c) 2008 # Makefile ( wxwidgets GTK) for spatialite-GUI SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ Dialogs.cpp Shapefiles.cpp Network.cpp Exif.cpp TextCsv.cpp \ Objects.cpp QueryViewComposer.cpp MalformedGeoms.cpp DialogsGraph.cpp OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o Dialogs.o \ Shapefiles.o Network.o Exif.o TextCsv.o Objects.o QueryViewComposer.o \ MalformedGeoms.o DialogsGraph.o EXE = ./static_bin/spatialite_gui INCLUDE = Classdef.h # Define default flags: CXXFLAGS = $(shell wx-config --cxxflags) -DSPATIALITE_AMALGAMATION LIB = $(shell wx-config --libs) EXTRAFLAGS = -Wall -Wextra -Wno-ctor-dtor-privacy \ -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILE=1 \ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 EXTRALIBS = /usr/local/lib/libspatialite.a \ /usr/local/lib/libgeos_c.a /usr/local/lib/libgeos.a \ /usr/local/lib/libproj4.a \ /usr/local/lib/libfreexl.a \ /usr/local/lib/libgeotiff.a \ /usr/local/lib/libpng.a /usr/local/lib/libz.a \ /usr/local/lib/libjpeg.a /usr/local/lib/libtiff.a all: $(EXE) $(EXE): $(OBJ) $(EXTRALIBS) $(CXX) $(OBJ) -o $(EXE) $(LIB) $(EXTRALIBS) strip --strip-all $(EXE) clean : $(RM) $(OBJ) $(EXE) Main.o: Main.cpp $(INCLUDE) $(CXX) -c Main.cpp $(CXXFLAGS) $(EXTRAFLAGS) TableTree.o: TableTree.cpp $(INCLUDE) $(CXX) -c TableTree.cpp $(CXXFLAGS) $(EXTRAFLAGS) QueryView.o: QueryView.cpp $(INCLUDE) $(CXX) -c QueryView.cpp $(CXXFLAGS) $(EXTRAFLAGS) ResultSetView.o: ResultSetView.cpp $(INCLUDE) $(CXX) -c ResultSetView.cpp $(CXXFLAGS) $(EXTRAFLAGS) BlobExplorer.o: BlobExplorer.cpp $(INCLUDE) $(CXX) -c BlobExplorer.cpp $(CXXFLAGS) $(EXTRAFLAGS) Dialogs.o: Dialogs.cpp $(INCLUDE) $(CXX) -c Dialogs.cpp $(CXXFLAGS) $(EXTRAFLAGS) DialogsGraph.o: DialogsGraph.cpp $(INCLUDE) $(CXX) -c DialogsGraph.cpp $(CXXFLAGS) $(EXTRAFLAGS) Shapefiles.o: Shapefiles.cpp $(INCLUDE) $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) Network.o: Network.cpp $(INCLUDE) $(CXX) -c Network.cpp $(CXXFLAGS) $(EXTRAFLAGS) Exif.o: Exif.cpp $(INCLUDE) $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) TextCsv.o: TextCsv.cpp $(INCLUDE) $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) Objects.o: Objects.cpp $(INCLUDE) $(CXX) -c Objects.cpp $(CXXFLAGS) $(EXTRAFLAGS) QueryViewComposer.o: QueryViewComposer.cpp $(INCLUDE) $(CXX) -c QueryViewComposer.cpp $(CXXFLAGS) $(EXTRAFLAGS) MalformedGeoms.o: MalformedGeoms.cpp $(INCLUDE) $(CXX) -c MalformedGeoms.cpp $(CXXFLAGS) $(EXTRAFLAGS) spatialite_gui-2.0.0-devel/INSTALL0000664000175000017500000001723012543275035013576 00000000000000Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. spatialite_gui-2.0.0-devel/VectorSymbolizers2.cpp0000664000175000017500000064040612544026240017040 00000000000000/* / VectorSymbolizers2.cpp / various dialog classes / / version 1.8, 2015 April 21 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2015 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/filename.h" #include "wx/colordlg.h" #include "wx/tokenzr.h" #include "wx/clipbrd.h" #include #include #include SimplePointSymbolizerDialog::SimplePointSymbolizerDialog() { // ctor StrokeDashArray = NULL; List = NULL; } SimplePointSymbolizerDialog::~SimplePointSymbolizerDialog() { // dtor if (StrokeDashArray != NULL) delete[]StrokeDashArray; if (List) delete List; } bool SimplePointSymbolizerDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Uom = GUI_UOM_PIXEL; MinScale = false; MaxScale = false; Opacity = 1.0; Size = 16.0; Rotation = 0.0; AnchorPointX = 0.5; AnchorPointY = 0.5; DisplacementX = 0.0; DisplacementY = 0.0; OnlyRescaleSVG = true; HasGraphic = false; EnableFill = true; EnableStroke = true; StrokeColor = wxT("#000000"); FillColor = wxT("#808080"); EnableColorReplacement = false; ColorReplacement = wxT("#000000"); WellKnownMark = RL2_GRAPHIC_MARK_SQUARE; StrokeWidth = 1.0; StrokeLineJoin = RL2_PEN_JOIN_ROUND; StrokeLineCap = RL2_PEN_CAP_ROUND; StrokeDashCount = 0; StrokeDashOffset = 0.0; PreviewBackground = GUI_PREVIEW_BACKGROUND_CHECKED; Crosshair = true; List = MainFrame->FindExternalGraphic(false); if (wxPropertySheetDialog::Create (parent, wxID_ANY, wxT("Simple Point Symbolizer")) == false) return false; wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels wxPanel *mainPage = CreateMainPage(book); book->AddPage(mainPage, wxT("General"), true); wxPanel *positionPage = CreatePositionPage(book); book->AddPage(positionPage, wxT("Position"), false); wxPanel *graphicPage = CreateGraphicPage(book); book->AddPage(graphicPage, wxT("Graphic"), false); wxPanel *markPage = CreateMarkPage(book); book->AddPage(markPage, wxT("Mark"), false); wxPanel *previewPage = CreatePreviewPage(book); book->AddPage(previewPage, wxT("Preview"), false); CreateButtons(); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnPageChanging); Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnPageChanged); // appends event handler for buttons Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCopy); // centers the dialog window Centre(); UpdateMainPage(); return true; } wxPanel *SimplePointSymbolizerDialog::CreateMainPage(wxWindow * parent) { // // creating the MAIN page // wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the PointSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the PointSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the PointSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: UOM and Visibility Range boxSizer->AddSpacer(50); wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // fourth row A: Unit Of Measure - UOM wxString uom[3]; uom[0] = wxT("&Pixel"); uom[1] = wxT("&Metre"); uom[2] = wxT("&Inch"); wxRadioBox *uomBox = new wxRadioBox(panel, ID_SYMBOLIZER_UOM, wxT("&Unit Of Measure"), wxDefaultPosition, wxDefaultSize, 3, uom, 1, wxRA_SPECIFY_ROWS); miscSizer->Add(uomBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); uomBox->SetSelection(0); // fourth row B: optional Visibility Range miscSizer->AddSpacer(50); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fifth row: Symbol Type boxSizer->AddSpacer(25); wxBoxSizer *typeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(typeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString type[2]; type[0] = wxT("&Graphic"); type[1] = wxT("&Mark"); wxRadioBox *typeBox = new wxRadioBox(panel, ID_SYMBOLIZER_TYPE, wxT("&Symbol Type"), wxDefaultPosition, wxDefaultSize, 2, type, 1, wxRA_SPECIFY_ROWS); typeSizer->Add(typeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); typeBox->SetSelection(1); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_UOM, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdUomChanged); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdScaleChanged); Connect(ID_SYMBOLIZER_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdTypeChanged); return panel; } void SimplePointSymbolizerDialog:: OnCmdUomChanged(wxCommandEvent & WXUNUSED(event)) { // // UOM selection changed // wxRadioBox *uomCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_UOM); switch (uomCtrl->GetSelection()) { case 1: Uom = GUI_UOM_METRE; break; case 2: Uom = GUI_UOM_INCH; break; default: Uom = GUI_UOM_PIXEL; break; }; } void SimplePointSymbolizerDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } void SimplePointSymbolizerDialog:: OnCmdTypeChanged(wxCommandEvent & WXUNUSED(event)) { // // Symbol Type selection changed // wxRadioBox *typeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_TYPE); switch (typeCtrl->GetSelection()) { case 1: HasGraphic = false; break; default: HasGraphic = true; break; }; } wxPanel *SimplePointSymbolizerDialog::CreatePositionPage(wxWindow * parent) { // // creating the Position page // wxPanel *panel = new wxPanel(parent, ID_PANE_POSITION); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row A: Opacity wxBoxSizer *opacityBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(opacityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *opacityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacitySizer = new wxStaticBoxSizer(opacityBox, wxVERTICAL); opacityBoxSizer->Add(opacitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxSlider *opacityCtrl = new wxSlider(panel, ID_SYMBOLIZER_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(600, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacitySizer->Add(opacityCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row: Size and Rotation wxBoxSizer *sizeBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sizeBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row A: Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); sizeBoxSizer->Add(sizeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *size1Sizer = new wxBoxSizer(wxHORIZONTAL); sizeSizer->Add(size1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_SIZE, wxT("16.0"), wxDefaultPosition, wxSize(100, 22)); size1Sizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); sizeBoxSizer->Add(rotSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: AnchorPoint and Displacement wxBoxSizer *anchorBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(anchorBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row A: Anchor Point wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor Point"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); anchorBoxSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); anchorBoxSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); return panel; } wxPanel *SimplePointSymbolizerDialog::CreateGraphicPage(wxWindow * parent) { // // creating the Graphic page // wxPanel *panel = new wxPanel(parent, ID_PANE_GRAPHIC); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // GRID to select an External Graphic wxBoxSizer *graphicSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(graphicSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); graphicSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *gridBox = new wxStaticBox(panel, wxID_STATIC, wxT("External Graphic resources"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxHORIZONTAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(panel, ID_SYMBOLIZER_GRAPHIC, wxDefaultPosition, wxSize(500, 250), wxALWAYS_SHOW_SB); int count = 0; ExternalGraphic *pE = List->GetFirst(); while (pE) { // counting how many lines are there count++; pE = pE->GetNext(); } GridCtrl->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("Graphic")); GridCtrl->SetColLabelValue(1, wxT("Title")); GridCtrl->SetColLabelValue(2, wxT("Abstract")); GridCtrl->SetColLabelValue(3, wxT("MimeType")); count = 0; pE = List->GetFirst(); while (pE) { // feeding grid rows MyGraphicCellRenderer *renderer = new MyGraphicCellRenderer; renderer->SetGraphic(pE->GetGraphic()); GridCtrl->SetCellRenderer(count, 0, renderer); GridCtrl->SetCellValue(count, 1, pE->GetTitle()); GridCtrl->SetCellValue(count, 2, pE->GetAbstract()); GridCtrl->SetCellValue(count, 3, pE->GetMimeType()); count++; pE = pE->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); GridCtrl->Enable(false); // second row C: Color Replacement wxBoxSizer *replacementBoxSizer = new wxBoxSizer(wxVERTICAL); GridSizer->Add(replacementBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *replacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color Replacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *replacementSizer = new wxStaticBoxSizer(replacementBox, wxVERTICAL); replacementBoxSizer->Add(replacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *enableReplacementCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_ENABLE_COLOR_REPLACEMENT, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableReplacementCtrl->SetValue(false); enableReplacementCtrl->Enable(false); replacementSizer->Add(enableReplacementCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *replacement1Sizer = new wxBoxSizer(wxHORIZONTAL); replacementSizer->Add(replacement1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *replacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_COLOR_REPLACEMENT, ColorReplacement, wxDefaultPosition, wxSize(80, 22)); replacement1Sizer->Add(replacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); replacementCtrl->Enable(false); wxTextCtrl *sampleReplacementCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_COLOR_REPLACEMENT_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(0, 0, 0); sampleReplacementCtrl->SetBackgroundColour(back); replacement1Sizer->Add(sampleReplacementCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxButton *pick = new wxButton(panel, ID_SYMBOLIZER_REPLACEMENT_PICKER_BTN, wxT("&Pick a color")); replacementSizer->Add(pick, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); pick->Enable(false); // third row: rescaling only SVG symbols wxCheckBox *rescaleCtrl = new wxCheckBox(panel, ID_ONLY_RESCALE_SVG_SYMBOLS, wxT ("Rescaling applies only to SVG symbols"), wxDefaultPosition, wxDefaultSize); rescaleCtrl->SetValue(true); boxSizer->Add(rescaleCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); rescaleCtrl->Enable(false); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_REPLACEMENT_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdColorReplacementPicker); Connect(ID_SYMBOLIZER_ENABLE_COLOR_REPLACEMENT, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdEnableReplacementChanged); Connect(ID_SYMBOLIZER_COLOR_REPLACEMENT, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdColorReplacementChanged); Connect(ID_ONLY_RESCALE_SVG_SYMBOLS, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdOnlyRescaleSVG); return panel; } void SimplePointSymbolizerDialog:: OnCmdColorReplacementPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR_REPLACEMENT); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimplePointSymbolizerDialog:: OnCmdEnableReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Graphic ColorReplacement enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_ENABLE_COLOR_REPLACEMENT); if (enableCtrl->IsChecked() == true) EnableColorReplacement = true; else EnableColorReplacement = false; RetrieveGraphicPage(false); UpdateGraphicPage(); } void SimplePointSymbolizerDialog:: OnCmdColorReplacementChanged(wxCommandEvent & WXUNUSED(event)) { // // Graphic Color Replacement changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR_REPLACEMENT); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR_REPLACEMENT_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimplePointSymbolizerDialog:: OnCmdOnlyRescaleSVG(wxCommandEvent & WXUNUSED(event)) { // // Rescaling only SVG symbols enable/disable // wxCheckBox *rescaleCtrl = (wxCheckBox *) FindWindow(ID_ONLY_RESCALE_SVG_SYMBOLS); if (rescaleCtrl->IsChecked() == true) OnlyRescaleSVG = true; else OnlyRescaleSVG = false; } wxPanel *SimplePointSymbolizerDialog::CreateMarkPage(wxWindow * parent) { // // creating the Mark page // wxPanel *panel = new wxPanel(parent, ID_PANE_MARK); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *box1Sizer = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(box1Sizer, 0, wxALIGN_CENTER | wxALL, 5); // Well Known Mark Name wxBoxSizer *markSizer = new wxBoxSizer(wxHORIZONTAL); box1Sizer->Add(markSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString mark[6]; mark[0] = wxT("&Square"); mark[1] = wxT("&Circle"); mark[2] = wxT("&Triangle"); mark[3] = wxT("&Star"); mark[4] = wxT("&Cross"); mark[5] = wxT("&X"); wxRadioBox *markBox = new wxRadioBox(panel, ID_SYMBOLIZER_MARK, wxT("&Mark"), wxDefaultPosition, wxDefaultSize, 6, mark, 1, wxRA_SPECIFY_COLS); markSizer->Add(markBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); markBox->SetSelection(0); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); box1Sizer->Add(boxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // first row: Fill wxBoxSizer *fillBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(fillBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *fillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *fillSizer = new wxStaticBoxSizer(fillBox, wxHORIZONTAL); fillBoxSizer->Add(fillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row A: Fill Enable wxCheckBox *enableFillCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_FILL_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableFillCtrl->SetValue(true); fillSizer->Add(enableFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: Fill Color wxStaticBox *colorFillBox = new wxStaticBox(panel, wxID_STATIC, wxT("Fill Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorFillSizer = new wxStaticBoxSizer(colorFillBox, wxVERTICAL); fillSizer->Add(colorFillSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *fill1Sizer = new wxBoxSizer(wxHORIZONTAL); colorFillSizer->Add(fill1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *fillColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); fill1Sizer->Add(fillColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sampleFillCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(128, 128, 128); sampleFillCtrl->SetBackgroundColour(back); fill1Sizer->Add(sampleFillCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickFill = new wxButton(panel, ID_SYMBOLIZER_FILL_PICKER_BTN, wxT("&Pick a color")); fill1Sizer->Add(pickFill, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row: Stroke wxBoxSizer *strokeBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(strokeBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *strokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *strokeXSizer = new wxStaticBoxSizer(strokeBox, wxVERTICAL); strokeBoxSizer->Add(strokeXSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *strokeSizer = new wxBoxSizer(wxHORIZONTAL); strokeXSizer->Add(strokeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row A: Stroke Enable wxCheckBox *enableStrokeCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_STROKE_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableStrokeCtrl->SetValue(true); strokeSizer->Add(enableStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row B: Stroke Color wxStaticBox *colorStrokeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colorStrokeSizer = new wxStaticBoxSizer(colorStrokeBox, wxVERTICAL); strokeSizer->Add(colorStrokeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *stroke1Sizer = new wxBoxSizer(wxHORIZONTAL); colorStrokeSizer->Add(stroke1Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *strokeColorCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE_COLOR, StrokeColor, wxDefaultPosition, wxSize(80, 22)); stroke1Sizer->Add(strokeColorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sampleStrokeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); back = wxColour(0, 0, 0); sampleStrokeCtrl->SetBackgroundColour(back); stroke1Sizer->Add(sampleStrokeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *pickStroke = new wxButton(panel, ID_SYMBOLIZER_STROKE_PICKER_BTN, wxT("&Pick a color")); stroke1Sizer->Add(pickStroke, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row C: StrokeWidth wxStaticBox *widthBox = new wxStaticBox(panel, wxID_STATIC, wxT("Stroke Width"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *widthSizer = new wxStaticBoxSizer(widthBox, wxVERTICAL); strokeSizer->Add(widthSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *widthCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE_WIDTH, wxT("1.0"), wxDefaultPosition, wxSize(100, 22)); widthSizer->Add(widthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: Stroke-LineJoin, Stroke-LineCap and Stroke-Dasharray wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); strokeXSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row B: LineJoin wxString join[3]; join[0] = wxT("&Mitre"); join[1] = wxT("&Round"); join[2] = wxT("&Bevel"); wxRadioBox *joinBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE_LINEJOIN, wxT("&Line Join"), wxDefaultPosition, wxDefaultSize, 3, join, 1, wxRA_SPECIFY_COLS); miscSizer->Add(joinBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); joinBox->SetSelection(1); // third row C: LineCap wxString cap[3]; cap[0] = wxT("&Butt"); cap[1] = wxT("&Round"); cap[2] = wxT("&Square"); wxRadioBox *capBox = new wxRadioBox(panel, ID_SYMBOLIZER_STROKE_LINECAP, wxT("&Line Cap"), wxDefaultPosition, wxDefaultSize, 3, cap, 1, wxRA_SPECIFY_COLS); miscSizer->Add(capBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); capBox->SetSelection(1); // third row D: DashArray and DashOffset wxBoxSizer *dashBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(dashBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *dashBox = new wxStaticBox(panel, wxID_STATIC, wxT("Dashed/Dotted Stroke"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *dashSizer = new wxStaticBoxSizer(dashBox, wxVERTICAL); dashBoxSizer->Add(dashSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *dash1Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *dash1Label = new wxStaticText(panel, wxID_STATIC, wxT("Dash Array:")); dash1Sizer->Add(dash1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashArrayCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE_DASHARRAY, wxT(""), wxDefaultPosition, wxSize(200, 22)); dash1Sizer->Add(dashArrayCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticText *dash2Label = new wxStaticText(panel, wxID_STATIC, wxT("e.g. 10,3,2,3")); dash2Label->SetForegroundColour(wxColour(255, 0, 0)); dash1Sizer->Add(dash2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *dash2Sizer = new wxBoxSizer(wxHORIZONTAL); dashSizer->Add(dash2Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *dashOffsetLabel = new wxStaticText(panel, wxID_STATIC, wxT("Dash Offset:")); dash2Sizer->Add(dashOffsetLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dashOffsetCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_STROKE_DASHOFFSET, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); dash2Sizer->Add(dashOffsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_MARK, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdMarkChanged); Connect(ID_SYMBOLIZER_FILL_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdFillChanged); Connect(ID_SYMBOLIZER_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdColorFillChanged); Connect(ID_SYMBOLIZER_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdColorFillPicker); Connect(ID_SYMBOLIZER_STROKE_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdStrokeChanged); Connect(ID_SYMBOLIZER_STROKE_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdColorStrokeChanged); Connect(ID_SYMBOLIZER_STROKE_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdColorStrokePicker); Connect(ID_SYMBOLIZER_STROKE_LINEJOIN, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdLineJoinChanged); Connect(ID_SYMBOLIZER_STROKE_LINECAP, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdLineCapChanged); return panel; } void SimplePointSymbolizerDialog:: OnCmdMarkChanged(wxCommandEvent & WXUNUSED(event)) { // // Mark selection changed // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MARK); switch (markCtrl->GetSelection()) { case 1: WellKnownMark = RL2_GRAPHIC_MARK_CIRCLE; break; case 2: WellKnownMark = RL2_GRAPHIC_MARK_TRIANGLE; break; case 3: WellKnownMark = RL2_GRAPHIC_MARK_STAR; break; case 4: WellKnownMark = RL2_GRAPHIC_MARK_CROSS; break; case 5: WellKnownMark = RL2_GRAPHIC_MARK_X; break; default: WellKnownMark = RL2_GRAPHIC_MARK_SQUARE; break; }; } void SimplePointSymbolizerDialog:: OnCmdFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL_ENABLE); if (enableCtrl->IsChecked() == true) EnableFill = true; else EnableFill = false; RetrieveMarkPage(false); UpdateMarkPage(); } void SimplePointSymbolizerDialog:: OnCmdColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimplePointSymbolizerDialog:: OnCmdColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimplePointSymbolizerDialog:: OnCmdStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE_ENABLE); if (enableCtrl->IsChecked() == true) EnableStroke = true; else EnableStroke = false; RetrieveMarkPage(false); UpdateMarkPage(); } void SimplePointSymbolizerDialog:: OnCmdColorStrokeChanged(wxCommandEvent & WXUNUSED(event)) { // // Stroke color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimplePointSymbolizerDialog:: OnCmdColorStrokePicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimplePointSymbolizerDialog:: OnCmdLineJoinChanged(wxCommandEvent & WXUNUSED(event)) { // // LineJoin selection changed // wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE_LINEJOIN); switch (lineJoinCtrl->GetSelection()) { case 0: StrokeLineJoin = RL2_PEN_JOIN_MITER; break; case 2: StrokeLineJoin = RL2_PEN_JOIN_BEVEL; break; default: StrokeLineJoin = RL2_PEN_JOIN_ROUND; break; }; } void SimplePointSymbolizerDialog:: OnCmdLineCapChanged(wxCommandEvent & WXUNUSED(event)) { // // LineCap selection changed // wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE_LINECAP); switch (lineCapCtrl->GetSelection()) { case 0: StrokeLineCap = RL2_PEN_CAP_BUTT; break; case 2: StrokeLineCap = RL2_PEN_CAP_SQUARE; break; default: StrokeLineCap = RL2_PEN_CAP_ROUND; break; }; } wxPanel *SimplePointSymbolizerDialog::CreatePreviewPage(wxWindow * parent) { // // creating the Preview page // wxPanel *panel = new wxPanel(parent, ID_PANE_PREVIEW); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *previewBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(previewBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // creating a control to show the PoinrSymbolizer Preview wxStaticBox *previewBox = new wxStaticBox(panel, wxID_STATIC, wxT("PointSymbolizer Preview"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *previewSizer = new wxStaticBoxSizer(previewBox, wxVERTICAL); previewBoxSizer->Add(previewSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); DrawPreview(500, 300); SymbolizerPreview *previewCtrl = new SymbolizerPreview(this, panel, ID_SYMBOLIZER_PREVIEW, PreviewBackBitmap, wxSize(500, 300)); previewSizer->Add(previewCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // Background selector wxBoxSizer *extraSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(extraSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString back[3]; back[0] = wxT("&Checked"); back[1] = wxT("&White"); back[2] = wxT("&Black"); wxRadioBox *backBox = new wxRadioBox(panel, ID_SYMBOLIZER_BACKGROUND, wxT("&Background"), wxDefaultPosition, wxDefaultSize, 3, back, 1, wxRA_SPECIFY_COLS); extraSizer->Add(backBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); backBox->SetSelection(0); // Crosshair selector wxString crosshair[2]; crosshair[0] = wxT("&Show"); crosshair[1] = wxT("&Hide"); wxRadioBox *crossBox = new wxRadioBox(panel, ID_SYMBOLIZER_CROSSHAIR, wxT("&Crosshair"), wxDefaultPosition, wxDefaultSize, 2, crosshair, 1, wxRA_SPECIFY_COLS); extraSizer->Add(crossBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); crossBox->SetSelection(0); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_BACKGROUND, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdBackgroundChanged); Connect(ID_SYMBOLIZER_CROSSHAIR, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimplePointSymbolizerDialog::OnCmdCrosshairChanged); return panel; } void SimplePointSymbolizerDialog:: OnCmdBackgroundChanged(wxCommandEvent & WXUNUSED(event)) { // // Preview Background selection changed // wxRadioBox *backCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BACKGROUND); switch (backCtrl->GetSelection()) { case 1: PreviewBackground = GUI_PREVIEW_BACKGROUND_WHITE; break; case 2: PreviewBackground = GUI_PREVIEW_BACKGROUND_BLACK; break; default: PreviewBackground = GUI_PREVIEW_BACKGROUND_CHECKED; break; }; UpdatePreviewPage(); } void SimplePointSymbolizerDialog:: OnCmdCrosshairChanged(wxCommandEvent & WXUNUSED(event)) { // // Crosshair selection changed // wxRadioBox *crossCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_CROSSHAIR); switch (crossCtrl->GetSelection()) { case 1: Crosshair = false; break; default: Crosshair = true; break; }; UpdatePreviewPage(); } void SimplePointSymbolizerDialog::DrawPreview(int horz, int vert) { // // drawing a Symbolizer Preview // PreviewBackBitmap.Create(horz, vert); wxMemoryDC dc(PreviewBackBitmap); // // background filling // wxImage img(24, 24); for (int y = 0; y < 24; y++) { // creating a checked background for (int x = 0; x < 24; x++) { if (y < 12) { if (x < 12) img.SetRGB(x, y, 176, 176, 176); else img.SetRGB(x, y, 208, 208, 208); } else { if (x < 12) img.SetRGB(x, y, 208, 208, 208); else img.SetRGB(x, y, 176, 176, 176); } } } wxBrush stipple(img); dc.SetBrush(stipple); dc.DrawRectangle(0, 0, horz, vert); } void SimplePointSymbolizerDialog::CreateButtons() { // // adding the common Buttons // wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer()); wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); } bool SimplePointSymbolizerDialog::FinalValidityCheck() { // // last check before generating the SLD/SE Style // if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the PointSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (Title.Len() < 1) { wxString msg = wxT("Setting some PointSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } if (Abstract.Len() < 1) { wxString msg = wxT("Setting some PointSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } return true; } bool SimplePointSymbolizerDialog::RetrieveMainPage() { // // retrieving params from the MAIN page // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } void SimplePointSymbolizerDialog::UpdateMainPage() { // // updating the MAIN page // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); nameCtrl->SetValue(Name); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); titleCtrl->SetValue(Title); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); absCtrl->SetValue(Abstract); wxRadioBox *uomBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_UOM); switch (Uom) { case GUI_UOM_METRE: uomBox->SetSelection(1); break; case GUI_UOM_INCH: uomBox->SetSelection(2); break; default: uomBox->SetSelection(0); break; }; wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); if (MinScale != true && MaxScale != true) rangeBox->SetSelection(0); else if (MinScale == true && MaxScale != true) rangeBox->SetSelection(1); else if (MinScale != true && MaxScale == true) rangeBox->SetSelection(2); else rangeBox->SetSelection(3); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); char dummy[64]; wxString str; if (MinScale == true) { sprintf(dummy, "%1.2f", MinScaleDenominator); str = wxString::FromUTF8(dummy); minCtrl->SetValue(str); minCtrl->Enable(true); } else { str = wxT("0.0"); minCtrl->SetValue(str); minCtrl->Enable(false); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); if (MaxScale == true) { sprintf(dummy, "%1.2f", MaxScaleDenominator); str = wxString::FromUTF8(dummy); maxCtrl->SetValue(str); maxCtrl->Enable(true); } else { str = wxT("+Infinite"); maxCtrl->SetValue(str); maxCtrl->Enable(false); } wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_TYPE); if (HasGraphic == false) typeBox->SetSelection(1); else typeBox->SetSelection(0); } bool SimplePointSymbolizerDialog::RetrievePositionPage(bool check) { // // retrieving params from the Position page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); Opacity = opacityCtrl->GetValue() / 100.0; wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&Size) != true) { if (check == true) { wxMessageBox(wxT ("SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (Size < 0.0) { if (check == true) { wxMessageBox(wxT ("SIZE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION); value = rotationCtrl->GetValue(); if (value.ToDouble(&Rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&AnchorPointX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (AnchorPointX < 0.0 || AnchorPointX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&AnchorPointY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (AnchorPointY < 0.0 || AnchorPointY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&DisplacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&DisplacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } void SimplePointSymbolizerDialog::UpdatePositionPage() { // // updating the Position page // wxSlider *opacityCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_OPACITY); opacityCtrl->SetValue(Opacity * 100.0); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", Size); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION); sprintf(dummy, "%1.2f", Rotation); str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X); sprintf(dummy, "%1.2f", AnchorPointX); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y); sprintf(dummy, "%1.2f", AnchorPointY); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X); sprintf(dummy, "%1.2f", DisplacementX); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", DisplacementY); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); } bool SimplePointSymbolizerDialog::RetrieveGraphicPage(bool check) { // // retrieving params from the Graphic page // if (HasGraphic == false) return true; int selCount = 0; int selected = -1; for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { selected = i; selCount++; } } if (selCount < 1) { if (check == true) { wxMessageBox(wxT ("You must select an External Graphic resource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (selCount > 1) { if (check == true) { wxString msg = wxT ("You must select just a single External Graphic resource !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } List->FindByIndex(selected, XLinkHref, MimeType); if (EnableColorReplacement == true) { wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR_REPLACEMENT); wxString color = replacementCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("COLOR-REPACEMENT isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } ColorReplacement = color; } return true; } void SimplePointSymbolizerDialog::UpdateGraphicPage() { // // updating the Graphic page // wxCheckBox *enableReplacement = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_ENABLE_COLOR_REPLACEMENT); wxTextCtrl *replacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR_REPLACEMENT); wxTextCtrl *sampleReplacementCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_COLOR_REPLACEMENT_HEX); wxButton *pick = (wxButton *) FindWindow(ID_SYMBOLIZER_REPLACEMENT_PICKER_BTN); int sel = List->FindByXLinkHref(XLinkHref); if (sel >= 0) GridCtrl->SelectRow(sel); if (EnableColorReplacement == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(ColorReplacement, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); replacementCtrl->SetValue(str); } } wxCheckBox *rescaleCtrl = (wxCheckBox *) FindWindow(ID_ONLY_RESCALE_SVG_SYMBOLS); if (OnlyRescaleSVG == true) rescaleCtrl->SetValue(true); else rescaleCtrl->SetValue(false); if (HasGraphic == true) { GridCtrl->Enable(true); enableReplacement->Enable(true); if (EnableColorReplacement == true) { replacementCtrl->Enable(true); pick->Enable(true); } else { replacementCtrl->Enable(false); pick->Enable(false); } rescaleCtrl->Enable(true); } else { GridCtrl->Enable(false); enableReplacement->Enable(false); replacementCtrl->Enable(false); pick->Enable(false); rescaleCtrl->Enable(false); } } bool SimplePointSymbolizerDialog::DoParseDashArray(wxString & str) { // // attempting to parse a Stroke DashArray string // StrokeDashCount = 0; if (StrokeDashArray != NULL) delete[]StrokeDashArray; StrokeDashArray = NULL; if (str.Len() == 0) return true; int count = 0; double interval; wxStringTokenizer tkz(str, wxT(",")); while (tkz.HasMoreTokens()) { wxString token = tkz.GetNextToken(); if (token.ToDouble(&interval) != true) return false; if (interval <= 0.0) return false; count++; } if (count == 0) return true; double *array; StrokeDashCount = count; StrokeDashArray = new double[StrokeDashCount]; array = StrokeDashArray; count = 0; wxStringTokenizer tkz2(str, wxT(",")); while (tkz2.HasMoreTokens()) { wxString token = tkz2.GetNextToken(); token.ToDouble(&interval); *(array + count++) = interval; } return true; } void SimplePointSymbolizerDialog::NormalizedDashArray(wxString & str, char delimiter) { // // creating a normalized DashArray string // int count; double *array; count = StrokeDashCount; array = StrokeDashArray; str = wxT(""); if (count == 0) return; for (int i = 0; i < count; i++) { char dummy[64]; if (i == 0) sprintf(dummy, "%1.2f", *(array + i)); else if (delimiter == ' ') sprintf(dummy, " %1.2f", *(array + i)); else sprintf(dummy, "%c %1.2f", delimiter, *(array + i)); str += wxString::FromUTF8(dummy); } } bool SimplePointSymbolizerDialog::RetrieveMarkPage(bool check) { // // retrieving params from the Mark page // if (HasGraphic == true) return true; if (EnableFill == false && EnableStroke == false) { wxMessageBox(wxT ("Effectless Mark: both Fill and Stroke are disabled !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (EnableFill == true) { wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } FillColor = color; } if (EnableStroke == true) { wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxString color = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } StrokeColor = color; wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_WIDTH); wxString value = widthCtrl->GetValue(); if (value.ToDouble(&StrokeWidth) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (StrokeWidth <= 0.0) { if (check == true) { wxMessageBox(wxT ("STROKE-WIDTH must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_DASHARRAY); value = dashArrayCtrl->GetValue(); if (DoParseDashArray(value) == false) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-ARRAY: invalid expression !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } else { NormalizedDashArray(value, 0); dashArrayCtrl->SetValue(value); } if (StrokeDashCount == 0) StrokeDashOffset = 0.0; else { wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_DASHOFFSET); wxString value = offsetCtrl->GetValue(); if (value.ToDouble(&StrokeDashOffset) != true) { if (check == true) { wxMessageBox(wxT ("STROKE-DASH-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } } } return true; } void SimplePointSymbolizerDialog::UpdateMarkPage() { // // updating the Mark page // wxRadioBox *markCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MARK); switch (WellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: markCtrl->SetSelection(1); break; case RL2_GRAPHIC_MARK_TRIANGLE: markCtrl->SetSelection(2); break; case RL2_GRAPHIC_MARK_STAR: markCtrl->SetSelection(3); break; case RL2_GRAPHIC_MARK_CROSS: markCtrl->SetSelection(4); break; case RL2_GRAPHIC_MARK_X: markCtrl->SetSelection(5); break; default: markCtrl->SetSelection(0); break; }; wxCheckBox *enableFillBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_FILL_ENABLE); if (EnableFill == true) enableFillBox->SetValue(true); else enableFillBox->SetValue(false); wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxTextCtrl *sampleFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_PICKER_HEX); wxButton *pickFill = (wxButton *) FindWindow(ID_SYMBOLIZER_FILL_PICKER_BTN); if (EnableFill == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(FillColor, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorFillCtrl->SetValue(str); } } wxCheckBox *enableStrokeBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_STROKE_ENABLE); if (EnableStroke == true) enableStrokeBox->SetValue(true); else enableStrokeBox->SetValue(false); wxTextCtrl *colorStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_COLOR); wxTextCtrl *sampleStrokeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_PICKER_HEX); wxButton *pickStroke = (wxButton *) FindWindow(ID_SYMBOLIZER_STROKE_PICKER_BTN); if (EnableStroke == true) { wxColour color = wxNullColour; ColorMapEntry::GetWxColor(StrokeColor, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorStrokeCtrl->SetValue(str); } } wxTextCtrl *widthCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_WIDTH); char dummy[64]; sprintf(dummy, "%1.2f", StrokeWidth); wxString str = wxString::FromUTF8(dummy); widthCtrl->SetValue(str); wxRadioBox *lineJoinCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE_LINEJOIN); switch (StrokeLineJoin) { case RL2_PEN_JOIN_MITER: lineJoinCtrl->SetSelection(0); break; case RL2_PEN_JOIN_BEVEL: lineJoinCtrl->SetSelection(2); break; default: lineJoinCtrl->SetSelection(1); break; }; wxRadioBox *lineCapCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_STROKE_LINECAP); switch (StrokeLineCap) { case RL2_PEN_CAP_BUTT: lineCapCtrl->SetSelection(0); break; case RL2_PEN_CAP_SQUARE: lineCapCtrl->SetSelection(2); break; default: lineCapCtrl->SetSelection(1); break; }; wxTextCtrl *dashArrayCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_DASHARRAY); wxString value; NormalizedDashArray(value, 0); dashArrayCtrl->SetValue(value); wxTextCtrl *offsetCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_STROKE_DASHOFFSET); if (StrokeDashCount == 0) offsetCtrl->SetValue(wxT("0.0")); else { char dummy[64]; sprintf(dummy, "%1.2f", StrokeDashOffset); wxString str = wxString::FromUTF8(dummy); offsetCtrl->SetValue(str); } if (HasGraphic == false) { markCtrl->Enable(true); enableFillBox->Enable(true); if (EnableFill == false) { colorFillCtrl->Enable(false); sampleFillCtrl->Enable(false); pickFill->Enable(false); } else { colorFillCtrl->Enable(true); sampleFillCtrl->Enable(true); pickFill->Enable(true); } enableStrokeBox->Enable(true); if (EnableStroke == false) { colorStrokeCtrl->Enable(false); sampleStrokeCtrl->Enable(false); pickStroke->Enable(false); widthCtrl->Enable(false); lineJoinCtrl->Enable(false); lineCapCtrl->Enable(false); dashArrayCtrl->Enable(false); offsetCtrl->Enable(false); } else { colorStrokeCtrl->Enable(true); sampleStrokeCtrl->Enable(true); pickStroke->Enable(true); widthCtrl->Enable(true); lineJoinCtrl->Enable(true); lineCapCtrl->Enable(true); dashArrayCtrl->Enable(true); offsetCtrl->Enable(true); } } else { markCtrl->Enable(false); enableFillBox->Enable(false); colorFillCtrl->Enable(false); sampleFillCtrl->Enable(false); pickFill->Enable(false); enableStrokeBox->Enable(false); colorStrokeCtrl->Enable(false); sampleStrokeCtrl->Enable(false); pickStroke->Enable(false); widthCtrl->Enable(false); lineJoinCtrl->Enable(false); lineCapCtrl->Enable(false); dashArrayCtrl->Enable(false); offsetCtrl->Enable(false); } } bool SimplePointSymbolizerDialog::RetrievePreviewPage() { // // retrieving params from the PREVIEW page // return true; } void SimplePointSymbolizerDialog::UpdatePreviewPage() { // // updating the PREVIEW page // wxRadioBox *backCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BACKGROUND); switch (PreviewBackground) { case GUI_PREVIEW_BACKGROUND_WHITE: backCtrl->SetSelection(1); break; case GUI_PREVIEW_BACKGROUND_BLACK: backCtrl->SetSelection(2); break; default: backCtrl->SetSelection(0); break; }; wxRadioBox *crossCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_CROSSHAIR); if (Crosshair == false) crossCtrl->SetSelection(1); else crossCtrl->SetSelection(0); rl2GraphicsContextPtr ctx = NULL; ctx = rl2_graph_create_context(500, 300); if (ctx == NULL) return; // transparent background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 0); rl2_graph_draw_rectangle(ctx, -1, -1, 501, 301); rl2GraphicsPatternPtr pattern = NULL; if (HasGraphic == true) { // Graphic Symbol if (MimeType.Cmp(wxT("image/svg+xml")) == 0) { // SVG symbol pattern = rl2_create_pattern_from_external_svg(MainFrame->GetSqlite(), XLinkHref.ToUTF8(), Size); } else { // bitmap symbol pattern = rl2_create_pattern_from_external_graphic(MainFrame->GetSqlite(), XLinkHref.ToUTF8(), 0); } if (pattern != NULL) { if (EnableColorReplacement) { // attempting to recolor the External Graphic resource wxColour color = wxNullColour; ColorMapEntry::GetWxColor(ColorReplacement, color); rl2_graph_pattern_recolor(pattern, color.Red(), color.Green(), color.Blue()); } if (Opacity < 1.0) { // setting up the required transparency double aleph = 255.0 * Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; rl2_graph_pattern_transparency(pattern, alpha); } unsigned int width; unsigned int height; rl2_graph_get_pattern_size(pattern, &width, &height); double out_width = width; double out_height = height; if (OnlyRescaleSVG == false) { double scale; if (width > height) scale = Size / (double) width; else scale = Size / (double) height; out_width = (double) width *scale; out_height = (double) height *scale; } rl2_graph_draw_graphic_symbol(ctx, pattern, out_width, out_height, 250.0 + DisplacementX, 150.0 - DisplacementY, Rotation, AnchorPointX, AnchorPointY); rl2_graph_destroy_pattern(pattern); } } else { // Mark Symbol if (EnableFill == true) { // preparing a Color-based Brush double aleph = 255.0 * Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(FillColor, color); rl2_graph_set_brush(ctx, color.Red(), color.Green(), color.Blue(), alpha); } if (EnableStroke == true) { // preparing a Color-based Pen double aleph = 255.0 * Opacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(StrokeColor, color); if (StrokeDashCount == 0) rl2_graph_set_solid_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, StrokeWidth, StrokeLineCap, StrokeLineJoin); else rl2_graph_set_dashed_pen(ctx, color.Red(), color.Green(), color.Blue(), alpha, StrokeWidth, StrokeLineCap, StrokeLineJoin, StrokeDashCount, StrokeDashArray, StrokeDashOffset); } // drawing the Mark Symbol int fill = 1; int stroke = 1; if (EnableFill == false) fill = 0; if (EnableStroke == false) stroke = 0; rl2_graph_draw_mark_symbol(ctx, WellKnownMark, Size, 250.0 + DisplacementX, 150.0 - DisplacementY, Rotation, AnchorPointX, AnchorPointY, fill, stroke); } // creating the RGB and Alpha arrays int half_transparency = 0; unsigned char *rgb_array = rl2_graph_get_context_rgb_array(ctx); unsigned char *alpha_array = rl2_graph_get_context_alpha_array(ctx, &half_transparency); rl2_graph_destroy_context(ctx); if (rgb_array == NULL || alpha_array == NULL) { if (rgb_array != NULL) free(rgb_array); if (alpha_array != NULL) free(alpha_array); return; } // creating the Preview from RGB and Alpha arrays wxImage img(500, 300); img.SetData(rgb_array); img.SetAlpha(alpha_array); wxBitmap bmp(img); wxBitmap bmp2; wxBrush brush; wxMemoryDC dc; wxBitmap white = wxBitmap(500, 300); wxBitmap black = wxBitmap(500, 300); switch (PreviewBackground) { case GUI_PREVIEW_BACKGROUND_WHITE: dc.SelectObject(white); brush = wxBrush(wxColour(255, 255, 255)); dc.SetBrush(brush); dc.DrawRectangle(0, 0, 500, 300); dc.SelectObject(wxNullBitmap); bmp2 = white.GetSubBitmap(wxRect(0, 0, white.GetWidth(), white.GetHeight())); break; case GUI_PREVIEW_BACKGROUND_BLACK: dc.SelectObject(black); brush = wxBrush(wxColour(0, 0, 0)); dc.SetBrush(brush); dc.DrawRectangle(0, 0, 500, 300); dc.SelectObject(wxNullBitmap); bmp2 = black.GetSubBitmap(wxRect(0, 0, black.GetWidth(), black.GetHeight())); break; default: bmp2 = PreviewBackBitmap.GetSubBitmap(wxRect (0, 0, PreviewBackBitmap.GetWidth(), PreviewBackBitmap.GetHeight())); break; }; // printing the Preview over the currently selected background dc.SelectObject(bmp2); dc.DrawBitmap(bmp, 0, 0, true); if (Crosshair == true) { // printing the Crosshair over the preview wxColour color = wxColour(255, 255, 255); if (PreviewBackground == GUI_PREVIEW_BACKGROUND_BLACK) color = wxColour(0, 0, 0); dc.SetPen(wxPen(color, 3)); dc.DrawLine(250 + DisplacementX, 0, 250 + DisplacementX, 300); dc.DrawLine(0, 150 - DisplacementY, 500, 150 - DisplacementY); color = wxColour(0, 0, 0); if (PreviewBackground == GUI_PREVIEW_BACKGROUND_BLACK) color = wxColour(255, 255, 255); dc.SetPen(wxPen(color, 1)); dc.DrawLine(250 + DisplacementX, 0, 250 + DisplacementX, 300); dc.DrawLine(0, 150 - DisplacementY, 500, 150 - DisplacementY); color = wxColour(0, 0, 0); if (PreviewBackground == GUI_PREVIEW_BACKGROUND_BLACK) color = wxColour(255, 255, 255); dc.SetPen(wxPen(color, 5)); dc.DrawLine(248, 150, 252, 150); dc.DrawLine(250, 148, 250, 152); color = wxColour(255, 0, 0); dc.SetPen(wxPen(color, 3)); dc.DrawLine(249, 150, 251, 150); dc.DrawLine(250, 149, 250, 151); } dc.SelectObject(wxNullBitmap); // updating the GUI Preview SymbolizerPreview *previewCtrl = (SymbolizerPreview *) FindWindow(ID_SYMBOLIZER_PREVIEW); previewCtrl->SetBitmap(bmp2); } void SimplePointSymbolizerDialog::OnPageChanging(wxNotebookEvent & event) { // // TAB/PAGE selection changing // bool ret; switch (event.GetOldSelection()) { case 0: ret = RetrieveMainPage(); break; case 1: ret = RetrievePositionPage(); break; case 2: ret = RetrieveGraphicPage(); break; case 3: ret = RetrieveMarkPage(); break; case 4: ret = RetrievePreviewPage(); break; }; if (ret != true) event.Veto(); } void SimplePointSymbolizerDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // switch (event.GetSelection()) { case 0: UpdateMainPage(); break; case 1: UpdatePositionPage(); break; case 2: UpdateGraphicPage(); break; case 3: UpdateMarkPage(); break; case 4: UpdatePreviewPage(); break; }; } char *SimplePointSymbolizerDialog::DoCreateFeatureTypeXML() { // // creating the SLD/SE (XML) code - Feature Type // char *str; const char *cstr; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } switch (Uom) { case GUI_UOM_METRE: cstr = "http://www.opengeospatial.org/se/units/metre"; break; case GUI_UOM_INCH: cstr = "http://www.opengeospatial.org/se/units/inch"; break; default: cstr = "http://www.opengeospatial.org/se/units/pixel"; break; }; xml = sqlite3_mprintf("%s\t\t\r\n", prev, cstr); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphic == true) { // graphic symbol xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(XLinkHref.ToUTF8()) + 1]; strcpy(str, XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(MimeType.ToUTF8()) + 1]; strcpy(str, MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableColorReplacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(ColorReplacement.ToUTF8()) + 1]; strcpy(str, ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\t1\r\n\t\t\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // mark symbol xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; switch (WellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s\t\t\t\t\t%s\r\n", prev, cstr); sqlite3_free(prev); prev = xml; if (EnableFill == true) { // Mark Fill xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(FillColor.ToUTF8()) + 1]; strcpy(str, FillColor.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (EnableStroke == true) { // Mark Stroke xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(StrokeColor.ToUTF8()) + 1]; strcpy(str, StrokeColor.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%1.2f\r\n", prev, StrokeWidth); sqlite3_free(prev); prev = xml; switch (StrokeLineJoin) { case RL2_PEN_JOIN_MITER: xml = sqlite3_mprintf ("%s\t\t\t\t\t\tmitre\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_JOIN_BEVEL: xml = sqlite3_mprintf ("%s\t\t\t\t\t\tbevel\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; switch (StrokeLineCap) { case RL2_PEN_CAP_BUTT: xml = sqlite3_mprintf ("%s\t\t\t\t\t\tbutt\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_CAP_SQUARE: xml = sqlite3_mprintf ("%s\t\t\t\t\t\tsquare\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; if (StrokeDashCount > 0 && StrokeDashArray != NULL) { wxString dash; NormalizedDashArray(dash, ' '); str = new char[strlen(dash.ToUTF8()) + 1]; strcpy(str, dash.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (StrokeDashOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%1.2f\r\n", prev, StrokeDashOffset); sqlite3_free(prev); prev = xml; } } xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (Opacity != 1.0) { xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; } if (MimeType.Cmp(wxT("image/svg+xml")) == 0 || HasGraphic == false) { xml = sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev, Size); sqlite3_free(prev); prev = xml; } else if (OnlyRescaleSVG == false) { xml = sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev, Size); sqlite3_free(prev); prev = xml; } if (Rotation != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, Rotation); sqlite3_free(prev); prev = xml; } if (AnchorPointX != 0.5 || AnchorPointY != 0.5) { xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t%1.4f\r\n", prev, AnchorPointX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t%1.4f\r\n", prev, AnchorPointY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (DisplacementX != 0.0 || DisplacementY != 0.0) { xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t%1.4f\r\n", prev, DisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t%1.4f\r\n", prev, DisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *SimplePointSymbolizerDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - PointSymbolizer // char *str; const char *cstr; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev, cstr); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasGraphic == true) { // graphic symbol xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(XLinkHref.ToUTF8()) + 1]; strcpy(str, XLinkHref.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; str = new char[strlen(MimeType.ToUTF8()) + 1]; strcpy(str, MimeType.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (EnableColorReplacement == true) { xml = sqlite3_mprintf ("%s\t\t\t\r\n\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\tExternalGraphic\r\n\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(ColorReplacement.ToUTF8()) + 1]; strcpy(str, ColorReplacement.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t\t1\r\n\t\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // mark symbol xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; switch (WellKnownMark) { case RL2_GRAPHIC_MARK_CIRCLE: cstr = "circle"; break; case RL2_GRAPHIC_MARK_TRIANGLE: cstr = "triangle"; break; case RL2_GRAPHIC_MARK_STAR: cstr = "star"; break; case RL2_GRAPHIC_MARK_CROSS: cstr = "cross"; break; case RL2_GRAPHIC_MARK_X: cstr = "x"; break; default: cstr = "square"; break; }; xml = sqlite3_mprintf("%s\t\t\t%s\r\n", prev, cstr); sqlite3_free(prev); prev = xml; if (EnableFill == true) { // Mark Fill xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(FillColor.ToUTF8()) + 1]; strcpy(str, FillColor.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (EnableStroke == true) { // Mark Stroke xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(StrokeColor.ToUTF8()) + 1]; strcpy(str, StrokeColor.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, StrokeWidth); sqlite3_free(prev); prev = xml; switch (StrokeLineJoin) { case RL2_PEN_JOIN_MITER: xml = sqlite3_mprintf ("%s\t\t\t\tmitre\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_JOIN_BEVEL: xml = sqlite3_mprintf ("%s\t\t\t\tbevel\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; switch (StrokeLineCap) { case RL2_PEN_CAP_BUTT: xml = sqlite3_mprintf ("%s\t\t\t\tbutt\r\n", prev); sqlite3_free(prev); prev = xml; break; case RL2_PEN_CAP_SQUARE: xml = sqlite3_mprintf ("%s\t\t\t\tsquare\r\n", prev); sqlite3_free(prev); prev = xml; break; default: xml = sqlite3_mprintf ("%s\t\t\t\tround\r\n", prev); sqlite3_free(prev); prev = xml; break; }; if (StrokeDashCount > 0 && StrokeDashArray != NULL) { wxString dash; NormalizedDashArray(dash, ' '); str = new char[strlen(dash.ToUTF8()) + 1]; strcpy(str, dash.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (StrokeDashOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, StrokeDashOffset); sqlite3_free(prev); prev = xml; } } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (Opacity != 1.0) { xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, Opacity); sqlite3_free(prev); prev = xml; } if (MimeType.Cmp(wxT("image/svg+xml")) == 0 || HasGraphic == false) { xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, Size); sqlite3_free(prev); prev = xml; } else if (OnlyRescaleSVG == false) { xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, Size); sqlite3_free(prev); prev = xml; } if (Rotation != 0.0) { xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, Rotation); sqlite3_free(prev); prev = xml; } if (AnchorPointX != 0.5 || AnchorPointY != 0.5) { xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.4f\r\n", prev, AnchorPointX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.4f\r\n", prev, AnchorPointY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (DisplacementX != 0.0 || DisplacementY != 0.0) { xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.4f\r\n", prev, DisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.4f\r\n", prev, DisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void SimplePointSymbolizerDialog::OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the VectorSymbolizer into the DBMS // switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrievePositionPage(); break; case 2: RetrieveGraphicPage(); break; case 3: RetrieveMarkPage(); break; case 4: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertVectorSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE VectorSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void SimplePointSymbolizerDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the VectorSymbolizer as an external file // int ret; wxString path; wxString lastDir; switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrievePositionPage(); break; case 2: RetrieveGraphicPage(); break; case 3: RetrieveMarkPage(); break; case 4: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE PointSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE PointSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void SimplePointSymbolizerDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the VectorSymbolizer into the Clipboard // switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrievePositionPage(); break; case 2: RetrieveGraphicPage(); break; case 3: RetrieveMarkPage(); break; case 4: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void SimplePointSymbolizerDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } SimpleTextSymbolizerDialog::SimpleTextSymbolizerDialog() { // ctor List = NULL; } SimpleTextSymbolizerDialog::~SimpleTextSymbolizerDialog() { // dtor if (List) delete List; } bool SimpleTextSymbolizerDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; Uom = GUI_UOM_PIXEL; MinScale = false; MaxScale = false; FontStyle = RL2_FONTSTYLE_NORMAL; FontWeight = RL2_FONTWEIGHT_NORMAL; FontSize = 10.0; PointPlacement = true; Rotation = 0.0; AnchorPointX = 0.5; AnchorPointY = 0.5; DisplacementX = 0.0; DisplacementY = 0.0; PerpendicularOffset = 0.0; IsRepeated = false; InitialGap = 0.0; Gap = 0.0; IsAligned = true; GeneralizeLine = false; HasHalo = false; HaloRadius = 1.0; HaloColor = wxT("#ffffff"); HaloOpacity = 1.0; FillColor = wxT("#000000"); FillOpacity = 1.0; PreviewBackground = GUI_PREVIEW_BACKGROUND_CHECKED; Crosshair = true; ReferenceLine = true; List = MainFrame->FindTextFont(); if (wxPropertySheetDialog::Create (parent, wxID_ANY, wxT("Simple Text Symbolizer")) == false) return false; wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels wxPanel *mainPage = CreateMainPage(book); book->AddPage(mainPage, wxT("General"), true); wxPanel *fontPage = CreateFontPage(book); book->AddPage(fontPage, wxT("Font"), false); wxPanel *placementPage = CreatePlacementPage(book); book->AddPage(placementPage, wxT("Placement"), false); wxPanel *previewPage = CreatePreviewPage(book); book->AddPage(previewPage, wxT("Preview"), false); CreateButtons(); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnPageChanging); Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnPageChanged); // appends event handler for buttons Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnQuit); Connect(ID_SYMBOLIZER_INSERT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnInsert); Connect(ID_SYMBOLIZER_EXPORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnExport); Connect(ID_SYMBOLIZER_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCopy); // centers the dialog window Centre(); UpdateMainPage(); return true; } wxPanel *SimpleTextSymbolizerDialog::CreateMainPage(wxWindow * parent) { // // creating the MAIN page // wxPanel *panel = new wxPanel(parent, ID_PANE_MAIN); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // first row: the TextSymbolizer Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(nameSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *nameLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Name:")); nameSizer->Add(nameLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *nameCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_NAME, wxT(""), wxDefaultPosition, wxSize(600, 22)); nameSizer->Add(nameCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: the TextSymbolizer Title wxBoxSizer *titleSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(titleSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *titleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Title:")); titleSizer->Add(titleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *titleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_TITLE, wxT(""), wxDefaultPosition, wxSize(600, 22)); titleSizer->Add(titleCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: the TextSymbolizer Abstract wxBoxSizer *absSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(absSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *absLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Abstract:")); absSizer->Add(absLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *abstractCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ABSTRACT, wxT(""), wxDefaultPosition, wxSize(600, 60), wxTE_MULTILINE); absSizer->Add(abstractCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: UOM and Visibility Range boxSizer->AddSpacer(50); wxBoxSizer *miscSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(miscSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // fourth row A: Unit Of Measure - UOM wxString uom[3]; uom[0] = wxT("&Pixel"); uom[1] = wxT("&Metre"); uom[2] = wxT("&Inch"); wxRadioBox *uomBox = new wxRadioBox(panel, ID_SYMBOLIZER_UOM, wxT("&Unit Of Measure"), wxDefaultPosition, wxDefaultSize, 3, uom, 1, wxRA_SPECIFY_ROWS); miscSizer->Add(uomBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); uomBox->SetSelection(0); // fourth row B: optional Visibility Range miscSizer->AddSpacer(50); wxBoxSizer *visibilityBoxSizer = new wxBoxSizer(wxHORIZONTAL); miscSizer->Add(visibilityBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *visibilityBox = new wxStaticBox(panel, wxID_STATIC, wxT("Visibility Range"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *visibilitySizer = new wxStaticBoxSizer(visibilityBox, wxHORIZONTAL); visibilityBoxSizer->Add(visibilitySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString range[4]; range[0] = wxT("&None"); range[1] = wxT("&Min"); range[2] = wxT("&Max"); range[3] = wxT("&Both"); wxRadioBox *rangeBox = new wxRadioBox(panel, ID_SYMBOLIZER_MINMAX_SCALE, wxT("&Range Type"), wxDefaultPosition, wxDefaultSize, 4, range, 2, wxRA_SPECIFY_COLS); visibilitySizer->Add(rangeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); rangeBox->SetSelection(0); visibilitySizer->AddSpacer(20); wxBoxSizer *scaleBoxSizer = new wxBoxSizer(wxVERTICAL); visibilitySizer->Add(scaleBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *scaleMinSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMinSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *minScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Min Scale:")); scaleMinSizer->Add(minScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *minScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MIN_SCALE, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); minScaleCtrl->Enable(false); scaleMinSizer->Add(minScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *scaleMaxSizer = new wxBoxSizer(wxHORIZONTAL); scaleBoxSizer->Add(scaleMaxSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *maxScaleLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Max Scale:")); scaleMaxSizer->Add(maxScaleLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *maxScaleCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_MAX_SCALE, wxT("+Infinite"), wxDefaultPosition, wxSize(100, 22)); maxScaleCtrl->Enable(false); scaleMaxSizer->Add(maxScaleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fifth row: the Label boxSizer->AddSpacer(30); wxBoxSizer *labelSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(labelSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *labelLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Label:")); labelSizer->Add(labelLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *labelCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_LABEL, wxT(""), wxDefaultPosition, wxSize(600, 22)); labelSizer->Add(labelCtrl, 0, wxALIGN_RIGHT | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_UOM, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdUomChanged); Connect(ID_SYMBOLIZER_MINMAX_SCALE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdScaleChanged); return panel; } void SimpleTextSymbolizerDialog:: OnCmdUomChanged(wxCommandEvent & WXUNUSED(event)) { // // UOM selection changed // wxRadioBox *uomCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_UOM); switch (uomCtrl->GetSelection()) { case 1: Uom = GUI_UOM_METRE; break; case 2: Uom = GUI_UOM_INCH; break; default: Uom = GUI_UOM_PIXEL; break; }; } void SimpleTextSymbolizerDialog:: OnCmdScaleChanged(wxCommandEvent & WXUNUSED(event)) { // // Visibility Range selection changed // wxRadioBox *scaleModeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); switch (scaleModeCtrl->GetSelection()) { case 0: MinScale = false; MaxScale = false; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 1: MinScale = true; MaxScale = false; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("+Infinite")); maxCtrl->Enable(false); break; case 2: MinScale = false; MaxScale = true; minCtrl->SetValue(wxT("0.0")); minCtrl->Enable(false); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; case 3: MinScale = true; MaxScale = true; minCtrl->SetValue(wxT("")); minCtrl->Enable(true); maxCtrl->SetValue(wxT("")); maxCtrl->Enable(true); break; }; } wxPanel *SimpleTextSymbolizerDialog::CreateFontPage(wxWindow * parent) { // // creating the Font page // wxPanel *panel = new wxPanel(parent, ID_PANE_FONT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // GRID to select a Text Font wxBoxSizer *graphicSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(graphicSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); graphicSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *gridBox = new wxStaticBox(panel, wxID_STATIC, wxT("Registered Text Fonts"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *GridSizer = new wxStaticBoxSizer(gridBox, wxHORIZONTAL); gridBoxSizer->Add(GridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); GridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(panel, ID_SYMBOLIZER_FONT, wxDefaultPosition, wxSize(500, 250), wxALWAYS_SHOW_SB); int count = 0; TextFont *pF = List->GetFirst(); while (pF) { // counting how many lines are there count++; pF = pF->GetNext(); } GridCtrl->CreateGrid(count, 4, wxGrid::wxGridSelectRows); GridCtrl->SetColLabelValue(0, wxT("FaceName")); GridCtrl->SetColLabelValue(1, wxT("Bold")); GridCtrl->SetColLabelValue(2, wxT("Italic")); GridCtrl->SetColLabelValue(3, wxT("Sample")); count = 0; pF = List->GetFirst(); while (pF) { // feeding grid rows GridCtrl->SetCellValue(count, 0, pF->GetFacename()); MyFontCellRenderer *renderer = new MyFontCellRenderer; if (pF->IsBold() == true) GridCtrl->SetCellValue(count, 1, wxT("YES")); if (pF->IsItalic() == true) GridCtrl->SetCellValue(count, 2, wxT("YES")); renderer->SetFontExample(pF->GetFontExample()); GridCtrl->SetCellRenderer(count, 3, renderer); GridCtrl->SetCellBackgroundColour(count, 3, wxColour(255, 255, 255)); count++; pF = pF->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: Halo wxBoxSizer *haloBoxSizer = new wxBoxSizer(wxVERTICAL); GridSizer->Add(haloBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *haloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Halo"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloSizer = new wxStaticBoxSizer(haloBox, wxVERTICAL); haloBoxSizer->Add(haloSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *halo0Sizer = new wxBoxSizer(wxHORIZONTAL); haloSizer->Add(halo0Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxCheckBox *enableHaloCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_HALO_ENABLE, wxT("Enable"), wxDefaultPosition, wxDefaultSize); enableHaloCtrl->SetValue(false); halo0Sizer->Add(enableHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Halo Radius wxStaticBox *radiusBox = new wxStaticBox(panel, wxID_STATIC, wxT("Radius"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *radiusSizer = new wxStaticBoxSizer(radiusBox, wxVERTICAL); halo0Sizer->Add(radiusSizer, 0, wxALIGN_RIGHT | wxALL, 2); wxTextCtrl *radiusCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO_RADIUS, wxT("1.0"), wxDefaultPosition, wxSize(50, 22)); radiusCtrl->Enable(false); radiusSizer->Add(radiusCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); // Halo Opacity wxStaticBox *opacityHaloBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityHaloSizer = new wxStaticBoxSizer(opacityHaloBox, wxVERTICAL); haloSizer->Add(opacityHaloSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxSlider *opacityHaloCtrl = new wxSlider(panel, ID_SYMBOLIZER_HALO_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(130, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityHaloSizer->Add(opacityHaloCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); opacityHaloCtrl->Enable(false); // Halo color wxStaticBox *haloColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *haloColorSizer = new wxStaticBoxSizer(haloColorBox, wxVERTICAL); haloSizer->Add(haloColorSizer, 0, wxALIGN_RIGHT | wxALL, 2); wxBoxSizer *halo2Sizer = new wxBoxSizer(wxHORIZONTAL); haloColorSizer->Add(halo2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *haloCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO_COLOR, HaloColor, wxDefaultPosition, wxSize(80, 22)); halo2Sizer->Add(haloCtrl, 0, wxALIGN_RIGHT | wxALL, 5); haloCtrl->Enable(false); wxTextCtrl *sampleHaloCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_HALO_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); wxColour back = wxColour(255, 255, 255); sampleHaloCtrl->SetBackgroundColour(back); halo2Sizer->Add(sampleHaloCtrl, 0, wxALIGN_RIGHT | wxALL, 2); wxButton *pickHalo = new wxButton(panel, ID_SYMBOLIZER_HALO_PICKER_BTN, wxT("&Pick a color")); haloColorSizer->Add(pickHalo, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); pickHalo->Enable(false); // third row: Size and Fill wxBoxSizer *fontSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(fontSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *font0Sizer = new wxBoxSizer(wxHORIZONTAL); fontSizer->Add(font0Sizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font Size wxStaticBox *sizeBox = new wxStaticBox(panel, wxID_STATIC, wxT("Size"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sizeSizer = new wxStaticBoxSizer(sizeBox, wxVERTICAL); font0Sizer->Add(sizeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sizeCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_SIZE, wxT("10.0"), wxDefaultPosition, wxSize(100, 22)); sizeSizer->Add(sizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // Font Opacity wxStaticBox *opacityFontBox = new wxStaticBox(panel, wxID_STATIC, wxT("Opacity"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *opacityFontSizer = new wxStaticBoxSizer(opacityFontBox, wxVERTICAL); fontSizer->Add(opacityFontSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxSlider *opacityFontCtrl = new wxSlider(panel, ID_SYMBOLIZER_FONT_OPACITY, 100, 0, 100, wxDefaultPosition, wxSize(250, 45), wxSL_HORIZONTAL | wxSL_LABELS); opacityFontSizer->Add(opacityFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Font color wxStaticBox *fontColorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Color"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *fontColorSizer = new wxStaticBoxSizer(fontColorBox, wxHORIZONTAL); fontSizer->Add(fontColorSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *font2Sizer = new wxBoxSizer(wxHORIZONTAL); fontColorSizer->Add(font2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxTextCtrl *fontCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL_COLOR, FillColor, wxDefaultPosition, wxSize(80, 22)); font2Sizer->Add(fontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sampleFontCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_FILL_PICKER_HEX, wxT(" "), wxDefaultPosition, wxSize(33, 22), wxTE_READONLY); back = wxColour(0, 0, 0); sampleFontCtrl->SetBackgroundColour(back); font2Sizer->Add(sampleFontCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxButton *pickFont = new wxButton(panel, ID_SYMBOLIZER_FILL_PICKER_BTN, wxT("&Pick a color")); fontColorSizer->Add(pickFont, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_FILL_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdColorFillPicker); Connect(ID_SYMBOLIZER_FILL_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdColorFillChanged); Connect(ID_SYMBOLIZER_HALO_PICKER_BTN, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdColorHaloPicker); Connect(ID_SYMBOLIZER_HALO_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdHaloEnableChanged); Connect(ID_SYMBOLIZER_HALO_COLOR, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdColorHaloChanged); return panel; } void SimpleTextSymbolizerDialog:: OnCmdColorFillPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimpleTextSymbolizerDialog:: OnCmdColorHaloPicker(wxCommandEvent & WXUNUSED(event)) { // // color picker // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO_COLOR); wxColour clr = wxNullColour; wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, clr); wxColour color = wxGetColourFromUser(this, clr); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorCtrl->SetValue(str); } } void SimpleTextSymbolizerDialog:: OnCmdHaloEnableChanged(wxCommandEvent & WXUNUSED(event)) { // // Graphic Halo enable/disable // wxCheckBox *enableCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO_ENABLE); if (enableCtrl->IsChecked() == true) HasHalo = true; else HasHalo = false; RetrieveFontPage(false); UpdateFontPage(); } void SimpleTextSymbolizerDialog:: OnCmdColorFillChanged(wxCommandEvent & WXUNUSED(event)) { // // Fill Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_PICKER_HEX); wxColour back = wxColour(0, 0, 0); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } void SimpleTextSymbolizerDialog:: OnCmdColorHaloChanged(wxCommandEvent & WXUNUSED(event)) { // // Halo Color changed: updating the visual sample // wxTextCtrl *colorCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO_COLOR); wxTextCtrl *sampleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO_PICKER_HEX); wxColour back = wxColour(255, 255, 255); wxString str = colorCtrl->GetValue(); if (ColorMapEntry::IsValidColor(str) == true) ColorMapEntry::GetWxColor(str, back); sampleCtrl->SetBackgroundColour(back); sampleCtrl->Refresh(); sampleCtrl->Update(); } wxPanel *SimpleTextSymbolizerDialog::CreatePlacementPage(wxWindow * parent) { // // creating the Placement page // wxPanel *panel = new wxPanel(parent, ID_PANE_PLACEMENT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(mainSizer, 0, wxALIGN_CENTER | wxALL, 0); wxBoxSizer *auxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(auxSizer, 0, wxALIGN_CENTER | wxALL, 0); // block 0: Placement Type wxBoxSizer *typeSizer = new wxBoxSizer(wxHORIZONTAL); mainSizer->Add(typeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString type[2]; type[0] = wxT("&Point"); type[1] = wxT("&Line"); wxRadioBox *typeBox = new wxRadioBox(panel, ID_SYMBOLIZER_TYPE, wxT("&Placement"), wxDefaultPosition, wxDefaultSize, 2, type, 1, wxRA_SPECIFY_ROWS); typeSizer->Add(typeBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); typeBox->SetSelection(0); // first row: PointPlacement wxBoxSizer *pointBoxSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(pointBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *pointBox = new wxStaticBox(panel, wxID_STATIC, wxT("Point Placement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *pointSizer = new wxStaticBoxSizer(pointBox, wxHORIZONTAL); pointBoxSizer->Add(pointSizer, 0, wxALIGN_LEFT | wxALL, 5); // first row A: Anchor Point wxStaticBox *anchorBox = new wxStaticBox(panel, wxID_STATIC, wxT("Anchor Point"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *anchorSizer = new wxStaticBoxSizer(anchorBox, wxVERTICAL); pointSizer->Add(anchorSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *anchor1Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); anchor1Sizer->Add(anchor1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_X, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor1Sizer->Add(anchorXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *anchor2Sizer = new wxBoxSizer(wxHORIZONTAL); anchorSizer->Add(anchor2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *anchor2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); anchor2Sizer->Add(anchor2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *anchorYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ANCHOR_Y, wxT("0.5"), wxDefaultPosition, wxSize(100, 22)); anchor2Sizer->Add(anchorYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row B: Displacement wxStaticBox *displacementBox = new wxStaticBox(panel, wxID_STATIC, wxT("Displacement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *displacementSizer = new wxStaticBoxSizer(displacementBox, wxVERTICAL); pointSizer->Add(displacementSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 20); wxBoxSizer *displ1Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ1Label = new wxStaticText(panel, wxID_STATIC, wxT("X")); displ1Sizer->Add(displ1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementXCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_X, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ1Sizer->Add(displacementXCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *displ2Sizer = new wxBoxSizer(wxHORIZONTAL); displacementSizer->Add(displ2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *displ2Label = new wxStaticText(panel, wxID_STATIC, wxT("Y")); displ2Sizer->Add(displ2Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *displacementYCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_DISPLACEMENT_Y, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); displ2Sizer->Add(displacementYCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // first row C: Rotation wxStaticBox *rotBox = new wxStaticBox(panel, wxID_STATIC, wxT("Rotation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *rotSizer = new wxStaticBoxSizer(rotBox, wxVERTICAL); pointSizer->Add(rotSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 20); wxBoxSizer *rot1Sizer = new wxBoxSizer(wxHORIZONTAL); rotSizer->Add(rot1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *rotCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_ROTATION, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); rot1Sizer->Add(rotCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row: LinePlacement wxBoxSizer *lineBoxSizer = new wxBoxSizer(wxHORIZONTAL); auxSizer->Add(lineBoxSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *lineBox = new wxStaticBox(panel, wxID_STATIC, wxT("Line Placement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *lineSizer = new wxStaticBoxSizer(lineBox, wxVERTICAL); lineBoxSizer->Add(lineSizer, 0, wxALIGN_LEFT | wxALL, 5); // second row A: PerpendicularOffset wxBoxSizer *perpendicularBoxSizer = new wxBoxSizer(wxHORIZONTAL); lineSizer->Add(perpendicularBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *perpendicularBox = new wxStaticBox(panel, wxID_STATIC, wxT("Perpendicular Offset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *perpendicularSizer = new wxStaticBoxSizer(perpendicularBox, wxVERTICAL); perpendicularBoxSizer->Add(perpendicularSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *perp1Sizer = new wxBoxSizer(wxHORIZONTAL); perpendicularSizer->Add(perp1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxTextCtrl *perpendicularCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_PERPENDICULAR, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); perp1Sizer->Add(perpendicularCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); perpendicularCtrl->Enable(false); wxStaticText *perp1Label = new wxStaticText(panel, wxID_STATIC, wxT ("Draw lines in parallel to the original geometry.")); perp1Sizer->Add(perp1Label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxStaticText *perp2Label = new wxStaticText(panel, wxID_STATIC, wxT ("Positive to the left-hand side. Negative numbers mean right.")); perpendicularSizer->Add(perp2Label, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row B: IsRepeated, InitialGap and Gap wxBoxSizer *repeatedBoxSizer = new wxBoxSizer(wxHORIZONTAL); lineSizer->Add(repeatedBoxSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *repeatedBox = new wxStaticBox(panel, wxID_STATIC, wxT("Repeated Label"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *repeatedSizer = new wxStaticBoxSizer(repeatedBox, wxHORIZONTAL); repeatedBoxSizer->Add(repeatedSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *isRepeatedCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_IS_REPEATED, wxT("is Repeated"), wxDefaultPosition, wxDefaultSize); isRepeatedCtrl->SetValue(false); isRepeatedCtrl->Enable(false); repeatedSizer->Add(isRepeatedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *inigapBox = new wxStaticBox(panel, wxID_STATIC, wxT("Initial Gap"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *inigapSizer = new wxStaticBoxSizer(inigapBox, wxVERTICAL); repeatedSizer->Add(inigapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *inigapCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_INITIAL_GAP, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); inigapCtrl->Enable(false); inigapSizer->Add(inigapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *gapBox = new wxStaticBox(panel, wxID_STATIC, wxT("Gap"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *gapSizer = new wxStaticBoxSizer(gapBox, wxVERTICAL); repeatedSizer->Add(gapSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxTextCtrl *gapCtrl = new wxTextCtrl(panel, ID_SYMBOLIZER_GAP, wxT("0.0"), wxDefaultPosition, wxSize(100, 22)); gapCtrl->Enable(false); gapSizer->Add(gapCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // second row C: IsAligned and Generalize wxBoxSizer *optBoxSizer = new wxBoxSizer(wxHORIZONTAL); repeatedBoxSizer->Add(optBoxSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *optBox = new wxStaticBox(panel, wxID_STATIC, wxT("Options"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxVERTICAL); optBoxSizer->Add(optSizer, 0, wxALIGN_LEFT | wxALL, 5); wxCheckBox *isAlignedCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_IS_ALIGNED, wxT("is Aligned"), wxDefaultPosition, wxDefaultSize); isAlignedCtrl->SetValue(false); isAlignedCtrl->Enable(false); optSizer->Add(isAlignedCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *generalizeCtrl = new wxCheckBox(panel, ID_SYMBOLIZER_GENERALIZE, wxT("Generalize Line"), wxDefaultPosition, wxDefaultSize); generalizeCtrl->SetValue(false); generalizeCtrl->Enable(false); optSizer->Add(generalizeCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdTypeChanged); Connect(ID_SYMBOLIZER_IS_REPEATED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdIsRepeatedChanged); Connect(ID_SYMBOLIZER_IS_ALIGNED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdIsAlignedChanged); Connect(ID_SYMBOLIZER_GENERALIZE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdGeneralizeLineChanged); return panel; } void SimpleTextSymbolizerDialog:: OnCmdTypeChanged(wxCommandEvent & WXUNUSED(event)) { // // Symbol Type selection changed // wxRadioBox *typeCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_TYPE); switch (typeCtrl->GetSelection()) { case 1: PointPlacement = false; break; default: PointPlacement = true; break; }; RetrievePlacementPage(false); UpdatePlacementPage(); } void SimpleTextSymbolizerDialog:: OnCmdIsRepeatedChanged(wxCommandEvent & WXUNUSED(event)) { // // Label IsRepeated enable/disable // wxCheckBox *repeatedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_IS_REPEATED); if (repeatedCtrl->IsChecked() == true) IsRepeated = true; else IsRepeated = false; RetrievePlacementPage(false); UpdatePlacementPage(); } void SimpleTextSymbolizerDialog:: OnCmdIsAlignedChanged(wxCommandEvent & WXUNUSED(event)) { // // Label IsAligned enable/disable // wxCheckBox *alignedCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_IS_ALIGNED); if (alignedCtrl->IsChecked() == true) IsAligned = true; else IsAligned = false; } void SimpleTextSymbolizerDialog:: OnCmdGeneralizeLineChanged(wxCommandEvent & WXUNUSED(event)) { // // Label GeneralizeLine enable/disable // wxCheckBox *generalizeCtrl = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_GENERALIZE); if (generalizeCtrl->IsChecked() == true) GeneralizeLine = true; else GeneralizeLine = false; } wxPanel *SimpleTextSymbolizerDialog::CreatePreviewPage(wxWindow * parent) { // // creating the Preview page // wxPanel *panel = new wxPanel(parent, ID_PANE_PREVIEW); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); wxBoxSizer *previewBoxSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(previewBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // creating a control to show the TextSymbolizer Preview wxStaticBox *previewBox = new wxStaticBox(panel, wxID_STATIC, wxT("TextSymbolizer Preview"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *previewSizer = new wxStaticBoxSizer(previewBox, wxVERTICAL); previewBoxSizer->Add(previewSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); DrawPreview(500, 300); SymbolizerPreview *previewCtrl = new SymbolizerPreview(this, panel, ID_SYMBOLIZER_PREVIEW, PreviewBackBitmap, wxSize(500, 300)); previewSizer->Add(previewCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // Background selector wxBoxSizer *extraSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(extraSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString back[3]; back[0] = wxT("&Checked"); back[1] = wxT("&White"); back[2] = wxT("&Black"); wxRadioBox *backBox = new wxRadioBox(panel, ID_SYMBOLIZER_BACKGROUND, wxT("&Background"), wxDefaultPosition, wxDefaultSize, 3, back, 1, wxRA_SPECIFY_COLS); extraSizer->Add(backBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); backBox->SetSelection(0); // Crosshair selector wxString crosshair[2]; crosshair[0] = wxT("&Show"); crosshair[1] = wxT("&Hide"); wxRadioBox *crossBox = new wxRadioBox(panel, ID_SYMBOLIZER_CROSSHAIR, wxT("&Crosshair"), wxDefaultPosition, wxDefaultSize, 2, crosshair, 1, wxRA_SPECIFY_COLS); extraSizer->Add(crossBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); crossBox->SetSelection(0); // Reference Line selector wxString refline[2]; refline[0] = wxT("&Show"); refline[1] = wxT("&Hide"); wxRadioBox *reflineBox = new wxRadioBox(panel, ID_SYMBOLIZER_REFLINE, wxT("&Test Line"), wxDefaultPosition, wxDefaultSize, 2, refline, 1, wxRA_SPECIFY_COLS); extraSizer->Add(reflineBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); reflineBox->SetSelection(0); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SYMBOLIZER_BACKGROUND, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdBackgroundChanged); Connect(ID_SYMBOLIZER_CROSSHAIR, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdCrosshairChanged); Connect(ID_SYMBOLIZER_REFLINE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SimpleTextSymbolizerDialog::OnCmdReferenceLineChanged); return panel; } void SimpleTextSymbolizerDialog:: OnCmdBackgroundChanged(wxCommandEvent & WXUNUSED(event)) { // // Preview Background selection changed // wxRadioBox *backCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BACKGROUND); switch (backCtrl->GetSelection()) { case 1: PreviewBackground = GUI_PREVIEW_BACKGROUND_WHITE; break; case 2: PreviewBackground = GUI_PREVIEW_BACKGROUND_BLACK; break; default: PreviewBackground = GUI_PREVIEW_BACKGROUND_CHECKED; break; }; UpdatePreviewPage(); } void SimpleTextSymbolizerDialog:: OnCmdCrosshairChanged(wxCommandEvent & WXUNUSED(event)) { // // Preview Background selection changed // wxRadioBox *crossCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_CROSSHAIR); switch (crossCtrl->GetSelection()) { case 1: Crosshair = false; break; default: Crosshair = true; break; }; UpdatePreviewPage(); } void SimpleTextSymbolizerDialog:: OnCmdReferenceLineChanged(wxCommandEvent & WXUNUSED(event)) { // // Test Line selection changed // wxRadioBox *reflineCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_REFLINE); switch (reflineCtrl->GetSelection()) { case 1: ReferenceLine = false; break; default: ReferenceLine = true; break; }; UpdatePreviewPage(); } void SimpleTextSymbolizerDialog::DrawPreview(int horz, int vert) { // // drawing a Symbolizer Preview // PreviewBackBitmap.Create(horz, vert); wxMemoryDC dc(PreviewBackBitmap); // // background filling // wxImage img(24, 24); for (int y = 0; y < 24; y++) { // creating a checked background for (int x = 0; x < 24; x++) { if (y < 12) { if (x < 12) img.SetRGB(x, y, 176, 176, 176); else img.SetRGB(x, y, 208, 208, 208); } else { if (x < 12) img.SetRGB(x, y, 208, 208, 208); else img.SetRGB(x, y, 176, 176, 176); } } } wxBrush stipple(img); dc.SetBrush(stipple); dc.DrawRectangle(0, 0, horz, vert); } void SimpleTextSymbolizerDialog::CreateButtons() { // // adding the common Buttons // wxBoxSizer *topSizer = (wxBoxSizer *) (this->GetSizer()); wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(btnBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *insert = new wxButton(this, ID_SYMBOLIZER_INSERT, wxT("&Insert into DBMS")); btnBox->Add(insert, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *exp = new wxButton(this, ID_SYMBOLIZER_EXPORT, wxT("&Export to file")); btnBox->Add(exp, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *copy = new wxButton(this, ID_SYMBOLIZER_COPY, wxT("&Copy")); btnBox->Add(copy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); btnBox->AddSpacer(100); wxButton *ok = new wxButton(this, wxID_OK, wxT("&Quit")); btnBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); } bool SimpleTextSymbolizerDialog::FinalValidityCheck() { // // last check before generating the SLD/SE Style // if (Name.Len() < 1) { wxMessageBox(wxT("You must specify the TextSymbolizer NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (Label.Len() < 1) { wxMessageBox(wxT("You must specify the TextSymbolizer LABEL !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (Title.Len() < 1) { wxString msg = wxT("Setting some TextSymbolizer TITLE is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Title ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } if (Abstract.Len() < 1) { wxString msg = wxT("Setting some TextSymbolizer ABSTRACT is warmly suggested\n\n"); msg += wxT("Do you really confirm leaving an empty (undefined) Abstract ?"); if (wxMessageBox (msg, wxT("spatialite_gui"), wxYES_NO | wxICON_WARNING, this) != wxYES) return false; } return true; } bool SimpleTextSymbolizerDialog::RetrieveMainPage() { // // retrieving params from the MAIN page // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); Name = nameCtrl->GetValue(); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); Title = titleCtrl->GetValue(); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); Abstract = absCtrl->GetValue(); wxTextCtrl *labelCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_LABEL); Label = labelCtrl->GetValue(); if (MinScale == true) { wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); wxString value = minCtrl->GetValue(); if (value.ToDouble(&MinScaleDenominator) != true) { wxMessageBox(wxT ("MIN_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MinScaleDenominator < 0.0) { wxMessageBox(wxT ("MIN_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MaxScale == true) { wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); wxString value = maxCtrl->GetValue(); if (value.ToDouble(&MaxScaleDenominator) != true) { wxMessageBox(wxT ("MAX_SCALE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } if (MaxScaleDenominator < 0.0) { wxMessageBox(wxT ("MAX_SCALE must be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (MinScale == true && MaxScale == true) { if (MinScaleDenominator >= MaxScaleDenominator) { wxMessageBox(wxT ("MAX_SCALE is always expected to be greater than MIN_SCALE !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } return true; } void SimpleTextSymbolizerDialog::UpdateMainPage() { // // updating the MAIN page // wxTextCtrl *nameCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_NAME); nameCtrl->SetValue(Name); wxTextCtrl *titleCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_TITLE); titleCtrl->SetValue(Title); wxTextCtrl *absCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ABSTRACT); absCtrl->SetValue(Abstract); wxTextCtrl *labelCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_LABEL); labelCtrl->SetValue(Label); wxRadioBox *uomBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_UOM); switch (Uom) { case GUI_UOM_METRE: uomBox->SetSelection(1); break; case GUI_UOM_INCH: uomBox->SetSelection(2); break; default: uomBox->SetSelection(0); break; }; wxRadioBox *rangeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_MINMAX_SCALE); if (MinScale != true && MaxScale != true) rangeBox->SetSelection(0); else if (MinScale == true && MaxScale != true) rangeBox->SetSelection(1); else if (MinScale != true && MaxScale == true) rangeBox->SetSelection(2); else rangeBox->SetSelection(3); wxTextCtrl *minCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MIN_SCALE); char dummy[64]; wxString str; if (MinScale == true) { sprintf(dummy, "%1.2f", MinScaleDenominator); str = wxString::FromUTF8(dummy); minCtrl->SetValue(str); minCtrl->Enable(true); } else { str = wxT("0.0"); minCtrl->SetValue(str); minCtrl->Enable(false); } wxTextCtrl *maxCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_MAX_SCALE); if (MaxScale == true) { sprintf(dummy, "%1.2f", MaxScaleDenominator); str = wxString::FromUTF8(dummy); maxCtrl->SetValue(str); maxCtrl->Enable(true); } else { str = wxT("+Infinite"); maxCtrl->SetValue(str); maxCtrl->Enable(false); } } bool SimpleTextSymbolizerDialog::RetrieveFontPage(bool check) { // // retrieving params from the FONT page // int selCount = 0; int selected = -1; for (int i = 0; i < GridCtrl->GetNumberRows(); i++) { if (GridCtrl->IsInSelection(i, 0) == true) { selected = i; selCount++; } } if (selCount < 1) { if (check == true) { wxMessageBox(wxT ("You must select some Text Font !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (selCount > 1) { if (check == true) { wxString msg = wxT("You must select just a single TextFont !!!\n"); msg += wxT("Multiple selection is not supported"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } List->FindByIndex(selected, FontFamily, &FontStyle, &FontWeight); wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE); wxString value = sizeCtrl->GetValue(); if (value.ToDouble(&FontSize) != true) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (FontSize <= 0.0) { if (check == true) { wxMessageBox(wxT ("FONT-SIZE should be a positive numberr !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT_OPACITY); FillOpacity = opacityFontCtrl->GetValue() / 100.0; wxTextCtrl *colorFillCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxString color = colorFillCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("FILL-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } FillColor = color; if (HasHalo == true) { wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO_OPACITY); HaloOpacity = opacityHaloCtrl->GetValue() / 100.0; wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO_RADIUS); wxString value = radiusCtrl->GetValue(); if (value.ToDouble(&HaloRadius) != true) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (HaloRadius <= 0.0) { if (check == true) { wxMessageBox(wxT ("HALO-RADIUS should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO_COLOR); wxString color = colorHaloCtrl->GetValue(); if (ColorMapEntry::IsValidColor(color) != true) { if (check == true) { wxMessageBox(wxT ("HALO-COLOR isn't a valid HexRGB color !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } HaloColor = color; } return true; } void SimpleTextSymbolizerDialog::UpdateFontPage() { // // updating the FONT page // wxSlider *opacityFontCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_FONT_OPACITY); opacityFontCtrl->SetValue(FillOpacity * 100.0); wxTextCtrl *colorFontCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_COLOR); wxColour color = wxNullColour; ColorMapEntry::GetWxColor(FillColor, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorFontCtrl->SetValue(str); } wxTextCtrl *sizeCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_SIZE); char dummy[64]; sprintf(dummy, "%1.2f", FontSize); wxString str = wxString::FromUTF8(dummy); sizeCtrl->SetValue(str); wxTextCtrl *sampleFontCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_FILL_PICKER_HEX); wxCheckBox *enableHaloBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_HALO_ENABLE); if (HasHalo == true) enableHaloBox->SetValue(true); else enableHaloBox->SetValue(false); wxTextCtrl *radiusCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO_RADIUS); wxTextCtrl *colorHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO_COLOR); wxTextCtrl *sampleHaloCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_HALO_PICKER_HEX); wxButton *pickHalo = (wxButton *) FindWindow(ID_SYMBOLIZER_HALO_PICKER_BTN); wxSlider *opacityHaloCtrl = (wxSlider *) FindWindow(ID_SYMBOLIZER_HALO_OPACITY); opacityHaloCtrl->SetValue(HaloOpacity * 100.0); sprintf(dummy, "%1.2f", HaloRadius); str = wxString::FromUTF8(dummy); radiusCtrl->SetValue(str); color = wxNullColour; ColorMapEntry::GetWxColor(HaloColor, color); if (color.IsOk() == true) { char hex[16]; sprintf(hex, "#%02x%02x%02x", color.Red(), color.Green(), color.Blue()); wxString str = wxString::FromUTF8(hex); colorHaloCtrl->SetValue(str); } if (HasHalo == false) { opacityHaloCtrl->Enable(false); pickHalo->Enable(false); colorHaloCtrl->Enable(false); radiusCtrl->Enable(false); } else { opacityHaloCtrl->Enable(true); pickHalo->Enable(true); colorHaloCtrl->Enable(true); radiusCtrl->Enable(true); } } bool SimpleTextSymbolizerDialog::RetrievePlacementPage(bool check) { // // retrieving params from the Placement page // if (PointPlacement == true) { // Point Placement wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION); wxString value = rotationCtrl->GetValue(); if (value.ToDouble(&Rotation) != true) { if (check == true) { wxMessageBox(wxT ("ROTATION isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X); value = anchorXCtrl->GetValue(); if (value.ToDouble(&AnchorPointX) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (AnchorPointX < 0.0 || AnchorPointX > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-X must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y); value = anchorYCtrl->GetValue(); if (value.ToDouble(&AnchorPointY) != true) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (AnchorPointY < 0.0 || AnchorPointY > 1.0) { if (check == true) { wxMessageBox(wxT ("ANCHOR-POINT-Y must be between 0.0 and 1.0 !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X); value = displXCtrl->GetValue(); if (value.ToDouble(&DisplacementX) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-X isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y); value = displYCtrl->GetValue(); if (value.ToDouble(&DisplacementY) != true) { if (check == true) { wxMessageBox(wxT ("DISPLACEMENT-Y isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } } else { // Line Placement wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_PERPENDICULAR); wxString value = perpCtrl->GetValue(); if (value.ToDouble(&PerpendicularOffset) != true) { if (check == true) { wxMessageBox(wxT ("PERPENDICULAR-OFFSET isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *inigapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_INITIAL_GAP); value = inigapCtrl->GetValue(); if (value.ToDouble(&InitialGap) != true) { if (check == true) { wxMessageBox(wxT ("INITIAL-GAP isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (InitialGap < 0.0) { if (check == true) { wxMessageBox(wxT ("INITIAL-GAP should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } wxTextCtrl *gapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_GAP); value = gapCtrl->GetValue(); if (value.ToDouble(&Gap) != true) { if (check == true) { wxMessageBox(wxT ("GAP isn't a valid decimal number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } if (InitialGap < 0.0) { if (check == true) { wxMessageBox(wxT ("GAP should be a positive number !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return false; } } } return true; } void SimpleTextSymbolizerDialog::UpdatePlacementPage() { // // updating the Placement page // wxRadioBox *typeBox = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_TYPE); if (PointPlacement == false) typeBox->SetSelection(1); else typeBox->SetSelection(0); if (PointPlacement == true) { // Point Placement wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION); char dummy[64]; sprintf(dummy, "%1.2f", Rotation); wxString str = wxString::FromUTF8(dummy); rotationCtrl->SetValue(str); rotationCtrl->Enable(true); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X); sprintf(dummy, "%1.2f", AnchorPointX); str = wxString::FromUTF8(dummy); anchorXCtrl->SetValue(str); anchorXCtrl->Enable(true); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y); sprintf(dummy, "%1.2f", AnchorPointY); str = wxString::FromUTF8(dummy); anchorYCtrl->SetValue(str); anchorYCtrl->Enable(true); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X); sprintf(dummy, "%1.2f", DisplacementX); str = wxString::FromUTF8(dummy); displXCtrl->SetValue(str); displXCtrl->Enable(true); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y); sprintf(dummy, "%1.2f", DisplacementY); str = wxString::FromUTF8(dummy); displYCtrl->SetValue(str); displYCtrl->Enable(true); wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_PERPENDICULAR); perpCtrl->Enable(false); wxCheckBox *repeatBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_IS_REPEATED); repeatBox->Enable(false); wxTextCtrl *inigapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_INITIAL_GAP); inigapCtrl->Enable(false); wxTextCtrl *gapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_GAP); gapCtrl->Enable(false); wxCheckBox *alignBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_IS_ALIGNED); alignBox->Enable(false); wxCheckBox *generalizeBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_GENERALIZE); generalizeBox->Enable(false); } else { // Line Placement wxTextCtrl *perpCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_PERPENDICULAR); char dummy[64]; sprintf(dummy, "%1.2f", PerpendicularOffset); wxString str = wxString::FromUTF8(dummy); perpCtrl->SetValue(str); perpCtrl->Enable(true); wxCheckBox *repeatBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_IS_REPEATED); if (IsRepeated == true) repeatBox->SetValue(true); else repeatBox->SetValue(false); repeatBox->Enable(true); wxTextCtrl *inigapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_INITIAL_GAP); sprintf(dummy, "%1.2f", InitialGap); str = wxString::FromUTF8(dummy); inigapCtrl->SetValue(str); wxTextCtrl *gapCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_GAP); sprintf(dummy, "%1.2f", Gap); str = wxString::FromUTF8(dummy); gapCtrl->SetValue(str); if (IsRepeated == true) { inigapCtrl->Enable(true); gapCtrl->Enable(true); } else { inigapCtrl->Enable(false); gapCtrl->Enable(false); } wxCheckBox *alignBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_IS_ALIGNED); if (IsAligned == true) alignBox->SetValue(true); else alignBox->SetValue(false); alignBox->Enable(true); wxCheckBox *generalizeBox = (wxCheckBox *) FindWindow(ID_SYMBOLIZER_GENERALIZE); if (GeneralizeLine == true) generalizeBox->SetValue(true); else generalizeBox->SetValue(false); generalizeBox->Enable(true); wxTextCtrl *rotationCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ROTATION); rotationCtrl->Enable(false); wxTextCtrl *anchorXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_X); anchorXCtrl->Enable(false); wxTextCtrl *anchorYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_ANCHOR_Y); anchorYCtrl->Enable(false); wxTextCtrl *displXCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_X); displXCtrl->Enable(false); wxTextCtrl *displYCtrl = (wxTextCtrl *) FindWindow(ID_SYMBOLIZER_DISPLACEMENT_Y); displYCtrl->Enable(false); } } bool SimpleTextSymbolizerDialog::RetrievePreviewPage() { // // retrieving params from the PREVIEW page // return true; } gaiaGeomCollPtr SimpleTextSymbolizerDialog::PrepareLinestring(double perpendicular_offset) { // preparing the reference Line double pi = 3.14159265359; gaiaDynamicLinePtr dyn = gaiaAllocDynamicLine(); gaiaAppendPointToDynamicLine(dyn, 200.0, 75.0); gaiaAppendPointToDynamicLine(dyn, 150.0, 60.0); gaiaAppendPointToDynamicLine(dyn, 50.0, 60.0); for (double rads = pi; rads > 0.0; rads -= 0.666666) { double x = 150.0 + (100.0 * cos(rads)); double y = 150.0 + (100.0 * sin(rads)); gaiaAppendPointToDynamicLine(dyn, x, y); } for (double rads = pi; rads <= (pi * 2.0); rads += 0.1) { double x = 350.0 + (100.0 * cos(rads)); double y = 150.0 + (100.0 * sin(rads)); gaiaAppendPointToDynamicLine(dyn, x, y); } gaiaAppendPointToDynamicLine(dyn, 450.0, 240.0); gaiaAppendPointToDynamicLine(dyn, 350.0, 240.0); gaiaAppendPointToDynamicLine(dyn, 300.0, 225.0); int points = 0; gaiaPointPtr pt = dyn->First; while (pt != NULL) { // counting how many Points are there points++; pt = pt->Next; } gaiaGeomCollPtr geom = gaiaAllocGeomColl(); gaiaLinestringPtr ln = gaiaAddLinestringToGeomColl(geom, points); int iv = 0; pt = dyn->First; while (pt != NULL) { // preparing the Linestring gaiaSetPoint(ln->Coords, iv, pt->X, pt->Y); iv++; pt = pt->Next; } gaiaFreeDynamicLine(dyn); gaiaGeomCollPtr geom2; if (perpendicular_offset != 0.0) { // Offset Curve geom2 = gaiaOffsetCurve_r(MainFrame->GetSpliteInternalCache(), geom, perpendicular_offset, 16, 0); gaiaFreeGeomColl(geom); } else { // unchanged geom2 = geom; } return geom2; } void SimpleTextSymbolizerDialog::PrepareLinestringPath(void *xctx, double perpendicular_offset) { // preparing the Line Path gaiaGeomCollPtr geom = PrepareLinestring(perpendicular_offset); if (geom == NULL) return; gaiaLinestringPtr ln = geom->FirstLinestring; rl2GraphicsContextPtr ctx = (rl2GraphicsContextPtr) xctx; for (int iv = 0; iv < ln->Points; iv++) { double x; double y; gaiaGetPoint(ln->Coords, iv, &x, &y); if (iv == 0) rl2_graph_move_to_point(ctx, x, y); else rl2_graph_add_line_to_path(ctx, x, y); } gaiaFreeGeomColl(geom); } void SimpleTextSymbolizerDialog::GetLineCenterPoint(double perpendicular_offset, double *x, double *y) { // computing the Reference Line Centre Point bool ok = 0; unsigned char *blob; int size; sqlite3_stmt *stmt = NULL; int ret; const char *sql = "SELECT ST_Line_Interpolate_Point(?, 0.5)"; gaiaGeomCollPtr geom = PrepareLinestring(perpendicular_offset); if (geom == NULL) goto error; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) goto error; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); gaiaToSpatiaLiteBlobWkb(geom, &blob, &size); sqlite3_bind_blob(stmt, 1, blob, size, free); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { blob = (unsigned char *) sqlite3_column_blob(stmt, 0); size = sqlite3_column_bytes(stmt, 0); gaiaGeomCollPtr g = gaiaFromSpatiaLiteBlobWkb((const unsigned char *) blob, size); if (g == NULL) goto error; if (g->FirstPoint == NULL) goto error; *x = g->FirstPoint->X; *y = g->FirstPoint->Y; ok = 1; } } else goto error; } if (!ok) goto error; sqlite3_finalize(stmt); gaiaFreeGeomColl(geom); return; error: if (stmt != NULL) sqlite3_finalize(stmt); if (geom != NULL) gaiaFreeGeomColl(geom); *x = 250.0; *y = 150.0; } void SimpleTextSymbolizerDialog::CreateLineArray(double perpendicular_offset, int *points, double **x, double **y, int generalize) { // creating the X and Y arrays required by rl2_graph_draw_warped_text() double *xx; double *yy; gaiaLinestringPtr ln; gaiaGeomCollPtr geom = PrepareLinestring(perpendicular_offset); if (geom == NULL) goto error; ln = geom->FirstLinestring; if (ln == NULL) goto error; xx = new double[ln->Points]; yy = new double[ln->Points]; if (xx == NULL || yy == NULL) { if (xx != NULL) delete[]xx; if (yy != NULL) delete[]yy; goto error; } for (int iv = 0; iv < ln->Points; iv++) { double cx; double cy; gaiaGetPoint(ln->Coords, iv, &cx, &cy); *(xx + iv) = cx; *(yy + iv) = cy; } *points = ln->Points; *x = xx; *y = yy; return; error: *points = 0; *x = NULL; *y = NULL; } void SimpleTextSymbolizerDialog::UpdatePreviewPage() { // // updating the PREVIEW page // const char *sample = "This little piggy went to market"; wxRadioBox *backCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_BACKGROUND); switch (PreviewBackground) { case GUI_PREVIEW_BACKGROUND_WHITE: backCtrl->SetSelection(1); break; case GUI_PREVIEW_BACKGROUND_BLACK: backCtrl->SetSelection(2); break; default: backCtrl->SetSelection(0); break; }; wxRadioBox *crossCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_CROSSHAIR); if (Crosshair == false) crossCtrl->SetSelection(1); else crossCtrl->SetSelection(0); if (PointPlacement == true) crossCtrl->Enable(true); else crossCtrl->Enable(false); wxRadioBox *reflineCtrl = (wxRadioBox *) FindWindow(ID_SYMBOLIZER_REFLINE); if (ReferenceLine == false) reflineCtrl->SetSelection(1); else reflineCtrl->SetSelection(0); if (PointPlacement == true) { crossCtrl->Enable(true); reflineCtrl->Enable(false); } else { crossCtrl->Enable(false); reflineCtrl->Enable(true); } rl2GraphicsContextPtr ctx = NULL; ctx = rl2_graph_create_context(500, 300); if (ctx == NULL) return; // transparent background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 0); rl2_graph_draw_rectangle(ctx, -1, -1, 501, 301); // setting up the Font char facename[1024]; strcpy(facename, FontFamily.ToUTF8()); rl2GraphicsFontPtr font = rl2_search_TrueType_font(MainFrame->GetSqlite(), MainFrame->GetRL2PrivateData (), facename, FontSize); double aleph = 255.0 * FillOpacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; unsigned char alpha = aleph; wxColour color = wxNullColour; ColorMapEntry::GetWxColor(FillColor, color); rl2_graph_font_set_color(font, color.Red(), color.Green(), color.Blue(), alpha); if (HasHalo == true) { // setting optional Halo aleph = 255.0 * HaloOpacity; if (aleph < 0.0) aleph = 0.0; if (aleph > 255.0) aleph = 255.0; alpha = aleph; color = wxNullColour; ColorMapEntry::GetWxColor(HaloColor, color); rl2_graph_font_set_halo(font, HaloRadius, color.Red(), color.Green(), color.Blue(), alpha); } rl2_graph_set_font(ctx, font); if (PointPlacement == true) { // Point Placement rl2_graph_draw_text(ctx, sample, 250.0 + DisplacementX, 150.0 - DisplacementY, Rotation, AnchorPointX, AnchorPointY); } else { // Line Placement if (ReferenceLine == true) { // drawing the reference Line double array34[] = { 3.0, 4.0 }; PrepareLinestringPath(ctx, 0.0); if (PreviewBackground == GUI_PREVIEW_BACKGROUND_CHECKED) rl2_graph_set_dashed_pen(ctx, 107, 142, 35, 255, 3.0, RL2_PEN_CAP_BUTT, RL2_PEN_JOIN_BEVEL, 2, array34, 0.0); else rl2_graph_set_dashed_pen(ctx, 0x90, 0x90, 0x90, 255, 3.0, RL2_PEN_CAP_BUTT, RL2_PEN_JOIN_BEVEL, 2, array34, 0.0); PrepareLinestringPath(ctx, 0.0); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); if (PerpendicularOffset != 0.0) { // drawing the offset line double array23[] = { 2.0, 3.0 }; if (PreviewBackground == GUI_PREVIEW_BACKGROUND_CHECKED) rl2_graph_set_dashed_pen(ctx, 107, 142, 35, 255, 2.0, RL2_PEN_CAP_BUTT, RL2_PEN_JOIN_BEVEL, 2, array23, 0.0); else rl2_graph_set_dashed_pen(ctx, 0x90, 0x90, 0x90, 255, 2.0, RL2_PEN_CAP_BUTT, RL2_PEN_JOIN_BEVEL, 2, array23, 0.0); PrepareLinestringPath(ctx, 0.0); PrepareLinestringPath(ctx, PerpendicularOffset); rl2_graph_stroke_path(ctx, RL2_CLEAR_PATH); } } if (IsAligned == false) { // text is always horizontal (not aligned to the line) double cx; double cy; GetLineCenterPoint(PerpendicularOffset, &cx, &cy); rl2_graph_draw_text(ctx, sample, cx, cy, 0.0, 0.5, 0.5); } else { // text aligned to the line int repeated = 1; int generalize = 0; if (IsRepeated == false) repeated = 0; if (GeneralizeLine == false) generalize = 0; int points; double *x_array; double *y_array; CreateLineArray(PerpendicularOffset, &points, &x_array, &y_array, generalize); if (x_array != NULL && y_array != NULL) { rl2_graph_draw_warped_text(MainFrame->GetSqlite(), ctx, sample, points, x_array, y_array, InitialGap, Gap, repeated); delete[]x_array; delete[]y_array; } } } // destroying the Font rl2_graph_release_font(ctx); rl2_graph_destroy_font(font); // creating the RGB and Alpha arrays int half_transparency = 0; unsigned char *rgb_array = rl2_graph_get_context_rgb_array(ctx); unsigned char *alpha_array = rl2_graph_get_context_alpha_array(ctx, &half_transparency); rl2_graph_destroy_context(ctx); if (rgb_array == NULL || alpha_array == NULL) { if (rgb_array != NULL) free(rgb_array); if (alpha_array != NULL) free(alpha_array); return; } // creating the Preview from RGB and Alpha arrays wxImage img(500, 300); img.SetData(rgb_array); img.SetAlpha(alpha_array); wxBitmap bmp(img); wxBitmap bmp2; wxBrush brush; wxMemoryDC dc; wxBitmap white = wxBitmap(500, 300); wxBitmap black = wxBitmap(500, 300); switch (PreviewBackground) { case GUI_PREVIEW_BACKGROUND_WHITE: dc.SelectObject(white); brush = wxBrush(wxColour(255, 255, 255)); dc.SetBrush(brush); dc.DrawRectangle(0, 0, 500, 300); dc.SelectObject(wxNullBitmap); bmp2 = white.GetSubBitmap(wxRect(0, 0, white.GetWidth(), white.GetHeight())); break; case GUI_PREVIEW_BACKGROUND_BLACK: dc.SelectObject(black); brush = wxBrush(wxColour(0, 0, 0)); dc.SetBrush(brush); dc.DrawRectangle(0, 0, 500, 300); dc.SelectObject(wxNullBitmap); bmp2 = black.GetSubBitmap(wxRect(0, 0, black.GetWidth(), black.GetHeight())); break; default: bmp2 = PreviewBackBitmap.GetSubBitmap(wxRect (0, 0, PreviewBackBitmap.GetWidth(), PreviewBackBitmap.GetHeight())); break; }; // printing the Preview over the currently selected background dc.SelectObject(bmp2); dc.DrawBitmap(bmp, 0, 0, true); if (PointPlacement == true && Crosshair == true) { // printing the Crosshair over the preview wxColour color = wxColour(255, 255, 255); if (PreviewBackground == GUI_PREVIEW_BACKGROUND_BLACK) color = wxColour(0, 0, 0); dc.SetPen(wxPen(color, 3)); dc.DrawLine(250 + DisplacementX, 0, 250 + DisplacementX, 300); dc.DrawLine(0, 150 - DisplacementY, 500, 150 - DisplacementY); color = wxColour(0, 0, 0); if (PreviewBackground == GUI_PREVIEW_BACKGROUND_BLACK) color = wxColour(255, 255, 255); dc.SetPen(wxPen(color, 1)); dc.DrawLine(250 + DisplacementX, 0, 250 + DisplacementX, 300); dc.DrawLine(0, 150 - DisplacementY, 500, 150 - DisplacementY); color = wxColour(0, 0, 0); if (PreviewBackground == GUI_PREVIEW_BACKGROUND_BLACK) color = wxColour(255, 255, 255); dc.SetPen(wxPen(color, 5)); dc.DrawLine(248, 150, 252, 150); dc.DrawLine(250, 148, 250, 152); color = wxColour(255, 0, 0); dc.SetPen(wxPen(color, 3)); dc.DrawLine(249, 150, 251, 150); dc.DrawLine(250, 149, 250, 151); } dc.SelectObject(wxNullBitmap); // updating the GUI Preview SymbolizerPreview *previewCtrl = (SymbolizerPreview *) FindWindow(ID_SYMBOLIZER_PREVIEW); previewCtrl->SetBitmap(bmp2); } void SimpleTextSymbolizerDialog::OnPageChanging(wxNotebookEvent & event) { // // TAB/PAGE selection changing // bool ret; switch (event.GetOldSelection()) { case 0: ret = RetrieveMainPage(); break; case 1: ret = RetrieveFontPage(); break; case 2: ret = RetrievePlacementPage(); break; case 3: ret = RetrievePreviewPage(); break; }; if (ret != true) event.Veto(); } void SimpleTextSymbolizerDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // switch (event.GetSelection()) { case 0: UpdateMainPage(); break; case 1: UpdateFontPage(); break; case 2: UpdatePlacementPage(); break; case 3: UpdatePreviewPage(); break; }; } char *SimpleTextSymbolizerDialog::DoCreateFeatureTypeXML() { // // creating the SLD/SE (XML) code - Feature Type // char *str; const char *cstr; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (MinScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MinScaleDenominator); sqlite3_free(prev); prev = xml; } if (MaxScale == true) { xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, MaxScaleDenominator); sqlite3_free(prev); prev = xml; } switch (Uom) { case GUI_UOM_METRE: cstr = "http://www.opengeospatial.org/se/units/metre"; break; case GUI_UOM_INCH: cstr = "http://www.opengeospatial.org/se/units/inch"; break; default: cstr = "http://www.opengeospatial.org/se/units/pixel"; break; }; xml = sqlite3_mprintf("%s\t\t\r\n", prev, cstr); sqlite3_free(prev); prev = xml; str = new char[strlen(Label.ToUTF8()) + 1]; strcpy(str, Label.ToUTF8()); xml = sqlite3_mprintf("%s\t\t\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(FontFamily.ToUTF8()) + 1]; strcpy(str, FontFamily.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\t\t\titalic\r\n", prev); else if (FontStyle == RL2_FONTSTYLE_OBLIQUE) xml = sqlite3_mprintf ("%s\t\t\t\toblique\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\tnormal\r\n", prev); sqlite3_free(prev); prev = xml; if (FontWeight == RL2_FONTWEIGHT_BOLD) xml = sqlite3_mprintf ("%s\t\t\t\tbold\r\n", prev); else xml = sqlite3_mprintf ("%s\t\t\t\tnormal\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, FontSize); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev, str); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\n", prev); sqlite3_free(prev); prev = xml; if (PointPlacement == true) { // PointPlacement xml = sqlite3_mprintf("%s\t\t\t\t\n", prev); sqlite3_free(prev); prev = xml; if (AnchorPointX != 0.5 || AnchorPointY != 0.5) { xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%1.4f\r\n", prev, AnchorPointX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%1.4f\r\n", prev, AnchorPointY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (DisplacementX != 0.0 || DisplacementY != 0.0) { xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%1.4f\r\n", prev, DisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t\t%1.4f\r\n", prev, DisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (Rotation != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t\t%1.2f\r\n", prev, Rotation); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // LinePlacement xml = sqlite3_mprintf("%s\t\t\t\t\n", prev); sqlite3_free(prev); prev = xml; if (PerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t\t\t%1.4f\r\n", prev, PerpendicularOffset); sqlite3_free(prev); prev = xml; } if (IsRepeated == true) { // Repeated: InitialGap and Gap xml = sqlite3_mprintf("%s\t\t\t\t\ttrue\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t\t%1.4f\r\n", prev, InitialGap); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\t%1.4f\r\n", prev, Gap); sqlite3_free(prev); prev = xml; } if (IsAligned == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\ttrue\r\n", prev); sqlite3_free(prev); prev = xml; } if (GeneralizeLine == true) { xml = sqlite3_mprintf ("%s\t\t\t\t\ttrue\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasHalo == true) { // Halo xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t%1.2f\r\n", prev, HaloRadius); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(HaloColor.ToUTF8()) + 1]; strcpy(str, FillColor.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(HaloColor.ToUTF8()) + 1]; strcpy(str, FillColor.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.2f\r\n", prev, FillOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n\r\n", prev); sqlite3_free(prev); return xml; } char *SimpleTextSymbolizerDialog::DoCreateSymbolizerXML() { // // creating the SLD/SE (XML) code - TextSymbolizer // char *str; const char *cstr; char *prev; char *xml = sqlite3_mprintf("\r\n"); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev, cstr); sqlite3_free(prev); prev = xml; str = new char[strlen(Name.ToUTF8()) + 1]; strcpy(str, Name.ToUTF8()); xml = sqlite3_mprintf("%s\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (Title.Len() > 0 || Abstract.Len() > 0) { xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (Title.Len() > 0) { str = new char[strlen(Title.ToUTF8()) + 1]; strcpy(str, Title.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } if (Abstract.Len() > 0) { str = new char[strlen(Abstract.ToUTF8()) + 1]; strcpy(str, Abstract.ToUTF8()); xml = sqlite3_mprintf("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } str = new char[strlen(Label.ToUTF8()) + 1]; strcpy(str, Label.ToUTF8()); xml = sqlite3_mprintf("%s\t\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(FontFamily.ToUTF8()) + 1]; strcpy(str, FontFamily.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; if (FontStyle == RL2_FONTSTYLE_ITALIC) xml = sqlite3_mprintf ("%s\t\titalic\r\n", prev); else if (FontStyle == RL2_FONTSTYLE_OBLIQUE) xml = sqlite3_mprintf ("%s\t\toblique\r\n", prev); else xml = sqlite3_mprintf ("%s\t\tnormal\r\n", prev); sqlite3_free(prev); prev = xml; if (FontWeight == RL2_FONTWEIGHT_BOLD) xml = sqlite3_mprintf ("%s\t\tbold\r\n", prev); else xml = sqlite3_mprintf ("%s\t\tnormal\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, FontSize); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev, str); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\n", prev); sqlite3_free(prev); prev = xml; if (PointPlacement == true) { // PointPlacement xml = sqlite3_mprintf("%s\t\t\n", prev); sqlite3_free(prev); prev = xml; if (AnchorPointX != 0.5 || AnchorPointY != 0.5) { xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t%1.4f\r\n", prev, AnchorPointX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\t%1.4f\r\n", prev, AnchorPointY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (DisplacementX != 0.0 || DisplacementY != 0.0) { xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.4f\r\n", prev, DisplacementX); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t\t%1.4f\r\n", prev, DisplacementY); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } if (Rotation != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t%1.2f\r\n", prev, Rotation); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } else { // LinePlacement xml = sqlite3_mprintf("%s\t\t\n", prev); sqlite3_free(prev); prev = xml; if (PerpendicularOffset != 0.0) { xml = sqlite3_mprintf ("%s\t\t\t%1.4f\r\n", prev, PerpendicularOffset); sqlite3_free(prev); prev = xml; } if (IsRepeated == true) { // Repeated: InitialGap and Gap xml = sqlite3_mprintf("%s\t\t\ttrue\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t\t%1.4f\r\n", prev, InitialGap); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\t%1.4f\r\n", prev, Gap); sqlite3_free(prev); prev = xml; } if (IsAligned == true) { xml = sqlite3_mprintf("%s\t\t\ttrue\r\n", prev); sqlite3_free(prev); prev = xml; } if (GeneralizeLine == true) { xml = sqlite3_mprintf ("%s\t\t\ttrue\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; if (HasHalo == true) { // Halo xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t%1.2f\r\n", prev, HaloRadius); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(HaloColor.ToUTF8()) + 1]; strcpy(str, FillColor.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; } xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; str = new char[strlen(HaloColor.ToUTF8()) + 1]; strcpy(str, FillColor.ToUTF8()); xml = sqlite3_mprintf ("%s\t\t%s\r\n", prev, str); delete[]str; sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf ("%s\t\t%1.2f\r\n", prev, FillOpacity); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\t\r\n", prev); sqlite3_free(prev); prev = xml; xml = sqlite3_mprintf("%s\r\n", prev); sqlite3_free(prev); return xml; } void SimpleTextSymbolizerDialog::OnInsert(wxCommandEvent & WXUNUSED(event)) { // // inserting the VectorSymbolizer into the DBMS // switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrieveFontPage(); break; case 2: RetrievePlacementPage(); break; case 3: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); if (MainFrame->DoInsertVectorSymbolizer(xml) == true) wxMessageBox(wxT ("SLD/SE VectorSymbolizer successfully registered into the DBMS"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); } void SimpleTextSymbolizerDialog::OnExport(wxCommandEvent & WXUNUSED(event)) { // // exporting the VectorSymbolizer as an external file // int ret; wxString path; wxString lastDir; switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrieveFontPage(); break; case 2: RetrievePlacementPage(); break; case 3: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } wxFileDialog fileDialog(this, wxT("Exporting an SLD/SE TextSymbolizer to a file"), wxT(""), Name + wxT(".xml"), wxT("XML Document|*.xml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); path = fileDialog.GetPath(); FILE *out = fopen(path.ToUTF8(), "wb"); if (out == NULL) wxMessageBox(wxT("ERROR: unable to create:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else { char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); fwrite(xml, 1, strlen(xml), out); sqlite3_free(xml); fclose(out); wxMessageBox(wxT ("SLD/SE TextSymbolizer successfully saved into:\n\n\"") + path + wxT("\""), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } wxDialog::EndModal(wxID_OK); } void SimpleTextSymbolizerDialog::OnCopy(wxCommandEvent & WXUNUSED(event)) { // // Copying the VectorSymbolizer into the Clipboard // switch (GetBookCtrl()->GetSelection()) { case 0: RetrieveMainPage(); break; case 1: RetrieveFontPage(); break; case 2: RetrievePlacementPage(); break; case 3: RetrievePreviewPage(); break; }; if (FinalValidityCheck() == false) { GetBookCtrl()->ChangeSelection(0); return; } char *xml; if (MinScale == true || MaxScale == true) xml = DoCreateFeatureTypeXML(); else xml = DoCreateSymbolizerXML(); wxString XMLstring = wxString::FromUTF8(xml); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLstring)); wxTheClipboard->Close(); } } void SimpleTextSymbolizerDialog::OnQuit(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } spatialite_gui-2.0.0-devel/Objects.cpp0000664000175000017500000021165712544026240014644 00000000000000/* / Objects.cpp / miscellaneous ancillary classes implementation / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" MyObject::MyObject(int type, wxString & name) { // // constructor - TreeItemData // Type = type; Name = name; Column = wxT(""); DbAlias = wxT(""); Temporary = false; Coverage = false; } MyObject::MyObject(int type, wxString & name, bool tmp, bool coverage) { // // constructor - TreeItemData // Type = type; Name = name; Column = wxT(""); DbAlias = wxT(""); Temporary = tmp; Coverage = coverage; } MyObject::MyObject(int type, wxString & name, wxString & column) { // // constructor - TreeItemData // Type = type; Name = name; Column = column; DbAlias = wxT(""); Temporary = false; Coverage = false; } MyObject::MyObject(int type, bool WXUNUSED(attached), wxString & dbAlias, wxString & name, bool coverage) { // // constructor - TreeItemData // Type = type; Name = name; Column = wxT(""); DbAlias = dbAlias; Temporary = false; Coverage = coverage; } void MyVariant::Copy(MyVariant * other) { // // transfers a BLOB value // if (other->Type != MY_BLOB_VARIANT) return; if (!(other->Blob)) return; if (Blob) delete[]Blob; Type = MY_BLOB_VARIANT; BlobSize = other->BlobSize; Blob = other->Blob; other->Type = MY_NULL_VARIANT; other->Blob = NULL; other->BlobSize = 0; } void MyVariant::Set(const unsigned char *text) { // // sets a String value for this Variant value // Type = MY_TXT_VARIANT; TxtValue = wxString::FromUTF8((const char *) text); } void MyVariant::Set(const void *blob, int size) { // // sets a BLOB value for this Variant value // if (size <= 0) return; Type = MY_BLOB_VARIANT; BlobSize = size; Blob = new unsigned char[size]; memcpy(Blob, blob, size); } void MyRowVariant::Create(int cols) { // // creating the row variant // if (ColumnArray) delete[]ColumnArray; NumCols = cols; ColumnArray = new MyVariant[NumCols]; } void MyRowVariant::Set(int col, sqlite3_int64 value) { // // setting an Integer value for the Nth column // MyVariant *var; if (col < 0 || col >= NumCols) return; var = ColumnArray + col; var->Set(value); } void MyRowVariant::Set(int col, double value) { // // setting a Double value for the Nth column // MyVariant *var; if (col < 0 || col >= NumCols) return; var = ColumnArray + col; var->Set(value); } void MyRowVariant::Set(int col, const unsigned char *value) { // // setting a String value for the Nth column // MyVariant *var; if (col < 0 || col >= NumCols) return; var = ColumnArray + col; var->Set(value); } void MyRowVariant::Set(int col, const void *blob, int size) { // // setting a BLOB value for the Nth column // MyVariant *var; if (col < 0 || col >= NumCols) return; var = ColumnArray + col; var->Set(blob, size); } MyVariant *MyRowVariant::GetColumn(int col) { // // returns a Column Variant Value // MyVariant *var; if (col < 0 || col >= NumCols) return NULL; var = ColumnArray + col; return var; } MyVariantList::MyVariantList() { // // constructor - result set container // NumCols = 0; ColumnName = NULL; First = NULL; Last = NULL; } MyVariantList::~MyVariantList() { // // destructor - result set container // Reset(); } void MyVariantList::Reset(void) { // resetting the list to the initial (empty) state MyRowVariant *el; MyRowVariant *elN; if (ColumnName) delete[]ColumnName; el = First; while (el) { elN = el->GetNext(); delete el; el = elN; } NumCols = 0; ColumnName = NULL; First = NULL; Last = NULL; } int MyVariantList::GetRows() { // // counting how many rows are there // int cnt = 0; MyRowVariant *el = First; while (el) { cnt++; el = el->GetNext(); } return cnt; } MyRowVariant *MyVariantList::Add(int columns) { // // adds a row into the result set // if (!NumCols) { NumCols = columns; ColumnName = new wxString[NumCols]; } MyRowVariant *el = new MyRowVariant(columns); if (!First) First = el; if (Last) Last->SetNext(el); Last = el; return el; } void MyVariantList::SetColumnName(int col, const char *name) { // // storing a column name // if (col < 0 || col >= NumCols) return; ColumnName[col] = wxString::FromUTF8(name); } wxString & MyVariantList::GetColumnName(int col) { // // retrieving a column name // return ColumnName[col]; } MyBlobs::MyBlobs(int rows, int cols) { // // constructor - a BLOB matrix // int r; MyRowVariant *rowVar; NumRows = 0; NumCols = 0; Rows = NULL; if (rows < 1 || cols < 1) return; NumRows = rows; NumCols = cols; Rows = new MyRowVariant[rows]; for (r = 0; r < rows; r++) { rowVar = Rows + r; rowVar->Create(cols); } } MyBlobs::~MyBlobs() { // // destructor - a BLOB matrix // if (Rows) delete[]Rows; } void MyBlobs::SetBlob(int row, int col, MyVariant * org) { // // setting a BLOB value // MyRowVariant *rowVar; MyVariant *dest; if (row < 0 || row >= NumRows) return; if (col < 0 || col >= NumCols) return; rowVar = Rows + row; if (!rowVar) return; dest = rowVar->GetColumn(col); if (!dest) return; dest->Copy(org); } MyVariant *MyBlobs::GetBlob(int row, int col) { // // return a BLOB value // MyRowVariant *rowVar; MyVariant *dest; if (row < 0 || row >= NumRows) return NULL; if (col < 0 || col >= NumCols) return NULL; rowVar = Rows + row; if (!rowVar) return NULL; dest = rowVar->GetColumn(col); if (!dest) return NULL; if (dest->GetType() != MY_BLOB_VARIANT) return NULL; return dest; } MyValues::MyValues(int rows, int cols) { // // constructor - a generic values matrix // int r; MyRowVariant *rowVar; NumRows = 0; NumCols = 0; Rows = NULL; if (rows < 1 || cols < 1) return; NumRows = rows; NumCols = cols; Rows = new MyRowVariant[rows]; for (r = 0; r < rows; r++) { rowVar = Rows + r; rowVar->Create(cols); } } MyValues::~MyValues() { // // destructor - a generic values matrix // if (Rows) delete[]Rows; } void MyValues::SetValue(int row, int col, sqlite3_int64 value) { // // setting an integer value // MyRowVariant *rowVar; MyVariant *dest; if (row < 0 || row >= NumRows) return; if (col < 0 || col >= NumCols) return; rowVar = Rows + row; if (!rowVar) return; dest = rowVar->GetColumn(col); if (!dest) return; dest->Set(value); } void MyValues::SetValue(int row, int col, double value) { // // setting a double value // MyRowVariant *rowVar; MyVariant *dest; if (row < 0 || row >= NumRows) return; if (col < 0 || col >= NumCols) return; rowVar = Rows + row; if (!rowVar) return; dest = rowVar->GetColumn(col); if (!dest) return; dest->Set(value); } void MyValues::SetValue(int row, int col, wxString & value) { // // setting a string value // MyRowVariant *rowVar; MyVariant *dest; if (row < 0 || row >= NumRows) return; if (col < 0 || col >= NumCols) return; rowVar = Rows + row; if (!rowVar) return; dest = rowVar->GetColumn(col); if (!dest) return; dest->Set(value); } MyVariant *MyValues::GetValue(int row, int col) { // // return a generic value // MyRowVariant *rowVar; MyVariant *dest; if (row < 0 || row >= NumRows) return NULL; if (col < 0 || col >= NumCols) return NULL; rowVar = Rows + row; if (!rowVar) return NULL; dest = rowVar->GetColumn(col); if (!dest) return NULL; return dest; } MyRowVariant *MyValues::GetRow(int row) { // // return a row of generic values // MyRowVariant *rowVar; if (row < 0 || row >= NumRows) return NULL; rowVar = Rows + row; return rowVar; } MyColumnInfo::MyColumnInfo(wxString & name, bool pkey) { // // constructor - a table column object // Name = name; PrimaryKey = pkey; Geometry = false; GPKGGeometry = false; GeometryIndex = false; MbrCache = false; Next = NULL; } MyIndexInfo::MyIndexInfo(wxString & name) { // // constructor - a table index object // Name = name; Next = NULL; } bool MyIndexInfo::ContainsOnlyPrimaryKeyColumns(sqlite3 * sqlite, wxString & indexName, MyColumnInfo * first_column) { // // check if an Index does only contain Primary Key columns // int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char xname[2048]; wxString Name; wxString sql; int pk_cnt = 0; int col_cnt = 0; sql = wxT("PRAGMA index_info("); strcpy(xname, indexName.ToUTF8()); MyFrame::DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, NULL); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 2]; Name = wxString::FromUTF8(name); col_cnt++; MyColumnInfo *elc = first_column; while (elc) { if (elc->GetName() == Name && elc->IsPrimaryKey()) pk_cnt++; elc = elc->GetNext(); } } } sqlite3_free_table(results); if (pk_cnt == col_cnt) return true; return false; } MyTriggerInfo::MyTriggerInfo(wxString & name) { // // constructor - a table trigger object // Name = name; Next = NULL; } MyTableInfo::~MyTableInfo() { // // destructor - a table columns collection // MyColumnInfo *elc; MyColumnInfo *elcN; MyIndexInfo *eli; MyIndexInfo *eliN; MyTriggerInfo *elt; MyTriggerInfo *eltN; elc = FirstColumn; while (elc) { elcN = elc->GetNext(); delete elc; elc = elcN; } eli = FirstIndex; while (eli) { eliN = eli->GetNext(); delete eli; eli = eliN; } elt = FirstTrigger; while (elt) { eltN = elt->GetNext(); delete elt; elt = eltN; } } void MyTableInfo::AddColumn(wxString & name, bool pkey) { // // inserting a column def into a table // MyColumnInfo *el = new MyColumnInfo(name, pkey); if (!FirstColumn) FirstColumn = el; if (LastColumn) LastColumn->SetNext(el); LastColumn = el; } void MyTableInfo::SetGeometry(wxString & name, bool index, bool cached) { // //setting a geometry column // MyColumnInfo *elc; elc = FirstColumn; while (elc) { if (name.CmpNoCase(elc->GetName()) == 0) { elc->SetGeometry(); if (index == true) elc->SetGeometryIndex(); if (cached == true) elc->SetMbrCache(); } elc = elc->GetNext(); } } void MyTableInfo::AddIndex(wxString & name) { // // inserting an index def into a table // MyIndexInfo *el = new MyIndexInfo(name); if (!FirstIndex) FirstIndex = el; if (LastIndex) LastIndex->SetNext(el); LastIndex = el; } void MyTableInfo::AddTrigger(wxString & name) { // // inserting a trigger def into a table // MyTriggerInfo *el = new MyTriggerInfo(name); if (!FirstTrigger) FirstTrigger = el; if (LastTrigger) LastTrigger->SetNext(el); LastTrigger = el; } void MyTableInfo::CheckGPKG(MyFrame * MainFrame, sqlite3 * handle, wxString & table) { // // checking for a GPKG Geometry // int i; char **results; int rows; int columns; char *errMsg = NULL; const char *name; const char *type; wxString Name; char *sql; char xname[1024]; int ret; int is_gpkg = 0; char *xtable; strcpy(xname, table.ToUTF8()); sql = sqlite3_mprintf("SELECT Count(*) FROM sqlite_master " "WHERE type = 'table' AND tbl_name = %Q AND sql LIKE '%%VirtualGPKG%%'", xname); ret = sqlite3_get_table(handle, sql, &results, &rows, &columns, &errMsg); sqlite3_free(sql); if (ret != SQLITE_OK) { wxMessageBox(wxT("CheckGPKG error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { is_gpkg = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (!is_gpkg) return; strcpy(xname, table.ToUTF8()); xtable = gaiaDoubleQuotedSql(xname); sql = sqlite3_mprintf("PRAGMA table_info(\"%s\")", xtable); free(xtable); ret = sqlite3_get_table(handle, sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("CheckGPKG error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; type = results[(i * columns) + 2]; if (strcasecmp(type, "POINT") == 0) Name = wxString::FromUTF8(name); if (strcasecmp(type, "LINESTRING") == 0) Name = wxString::FromUTF8(name); if (strcasecmp(type, "POLYGON") == 0) Name = wxString::FromUTF8(name); if (strcasecmp(type, "MULTIPOINT") == 0) Name = wxString::FromUTF8(name); if (strcasecmp(type, "MULTILINESTRING") == 0) Name = wxString::FromUTF8(name); if (strcasecmp(type, "MULTIPOLYGON") == 0) Name = wxString::FromUTF8(name); if (strcasecmp(type, "GEOMETRYCOLLECTION") == 0) Name = wxString::FromUTF8(name); } } sqlite3_free_table(results); if (Name.Len() == 0) return; MyColumnInfo *elc = FirstColumn; while (elc) { if (Name.CmpNoCase(elc->GetName()) == 0) { elc->SetGPKGGeometry(); break; } elc = elc->GetNext(); } } MyViewInfo::~MyViewInfo() { // // destructor - a view columns collection // MyColumnInfo *elc; MyColumnInfo *elcN; MyTriggerInfo *elt; MyTriggerInfo *eltN; elc = First; while (elc) { elcN = elc->GetNext(); delete elc; elc = elcN; } elt = FirstTrigger; while (elt) { eltN = elt->GetNext(); delete elt; elt = eltN; } } void MyViewInfo::AddColumn(wxString & name) { // // inserting a column def into a view // MyColumnInfo *el = new MyColumnInfo(name, false); if (!First) First = el; if (Last) Last->SetNext(el); Last = el; } void MyViewInfo::AddTrigger(wxString & name) { // // inserting a trigger def into a view // MyTriggerInfo *el = new MyTriggerInfo(name); if (!FirstTrigger) FirstTrigger = el; if (LastTrigger) LastTrigger->SetNext(el); LastTrigger = el; } void MyViewInfo::SetGeometry(wxString & name, bool index, bool cached) { // //setting a geometry column // MyColumnInfo *elc; elc = First; while (elc) { if (name.CmpNoCase(elc->GetName()) == 0) { elc->SetGeometry(); if (index == true) elc->SetGeometryIndex(); if (cached == true) elc->SetMbrCache(); } elc = elc->GetNext(); } } MySqlHistory::~MySqlHistory() { // // destructor - the SQL queries history // MySqlQuery *elq; MySqlQuery *elqN; elq = First; while (elq) { elqN = elq->GetNext(); delete elq; elq = elqN; } } void MySqlHistory::Prepend(wxString & sql) { // // inserting an SQL query into the history [reverse order] // if (First) { // avoiding stupid duplicates if (First->GetSql() == sql) return; } MySqlQuery *el = new MySqlQuery(sql); el->SetNext(First); if (First) First->SetPrev(el); if (Last == NULL) Last = el; First = el; Current = Last; } void MySqlHistory::Add(wxString & sql) { // // inserting an SQL query into the history // if (Last) { // avoiding stupid duplicates if (Last->GetSql() == sql) return; } MySqlQuery *el = new MySqlQuery(sql); if (!First) First = el; el->SetPrev(Last); if (Last) Last->SetNext(el); Last = el; Current = el; } MySqlQuery *MySqlHistory::GetNext() { // // return the next SQL query // if (Current) { if (Current->GetNext()) { Current = Current->GetNext(); return Current; } else return NULL; } return NULL; } MySqlQuery *MySqlHistory::GetPrev() { // // return the previous SQL query // if (Current) { if (Current->GetPrev()) { Current = Current->GetPrev(); return Current; } else return NULL; } return NULL; } bool MySqlHistory::TestNext() { // // tests if the next SQL query exists // if (Current) { if (Current->GetNext()) return true; else return false; } return false; } bool MySqlHistory::TestPrev() { // // tests if the previous SQL query exists // if (Current) { if (Current->GetPrev()) return true; else return false; } return false; } AutoFDOTables::~AutoFDOTables() { // // destructor - auto FDO-OGR wrapper linked list // AutoFDOTable *el; AutoFDOTable *elN; el = First; while (el) { elN = el->GetNext(); delete el; el = elN; } } void AutoFDOTables::Add(const char *name, const int len) { // // adding a table name to the auto FDO-OGR wrapper linked list // AutoFDOTable *el = new AutoFDOTable(name, len); if (!First) First = el; if (Last) Last->SetNext(el); Last = el; } AutoGPKGTables::~AutoGPKGTables() { // // destructor - auto GPKG wrapper linked list // AutoGPKGTable *el; AutoGPKGTable *elN; el = First; while (el) { elN = el->GetNext(); delete el; el = elN; } } void AutoGPKGTables::Add(const char *name, const int len) { // // adding a table name to the auto GPKG wrapper linked list // AutoGPKGTable *el = new AutoGPKGTable(name, len); if (!First) First = el; if (Last) Last->SetNext(el); Last = el; } GeomColumn::GeomColumn(wxString & name, wxString & type, wxString & dims, int srid, int idx) { // Geometry Column - constructor GeometryName = name; GeometryType = type; CoordDims = dims; Srid = srid; RTree = false; MbrCache = false; if (idx == 1) RTree = true; if (idx == 2) MbrCache = true; NotNull = false; Next = NULL; } GeomColsList::GeomColsList() { // Geometry Columns List - constructor First = NULL; Last = NULL; } GeomColsList::~GeomColsList() { // Geometry Columns List - destructor GeomColumn *pG; GeomColumn *pGn; pG = First; while (pG) { pGn = pG->GetNext(); delete pG; pG = pGn; } } void GeomColsList::Add(wxString & name, wxString & type, wxString & dims, int srid, int idx) { // adding a Geometry Column to the list GeomColumn *p = new GeomColumn(name, type, dims, srid, idx); if (!First) First = p; if (Last) Last->SetNext(p); Last = p; } void GeomColsList::SetNotNull(wxString & name) { // setting a NOT NULL geometry GeomColumn *pG = First; while (pG) { if (pG->GetGeometryName() == name) { pG->SetNotNull(); return; } pG = pG->GetNext(); } } IndexColumn::IndexColumn(wxString & name) { // Index Column - constructor ColumnName = name; Valid = true; Next = NULL; } TblIndex::TblIndex(wxString & name, bool unique) { // Table Index - constructor IndexName = name; Unique = unique; Valid = true; First = NULL; Last = NULL; Next = NULL; } TblIndex::~TblIndex() { // Table Index - destructor IndexColumn *pC; IndexColumn *pCn; pC = First; while (pC) { pCn = pC->GetNext(); delete pC; pC = pCn; } } void TblIndex::Add(wxString & name) { // adding a Column to the Index IndexColumn *p = new IndexColumn(name); if (!First) First = p; if (Last) Last->SetNext(p); Last = p; } void TblIndex::Invalidate(wxString & name) { // invalidating a column/index IndexColumn *pC = First; while (pC) { if (pC->GetColumnName() == name) { pC->Invalidate(); Valid = false; return; } pC = pC->GetNext(); } } TblIndexList::TblIndexList() { // Table Index List - constructor First = NULL; Last = NULL; } TblIndexList::~TblIndexList() { // Table Index List - destructor TblIndex *pI; TblIndex *pIn; pI = First; while (pI) { pIn = pI->GetNext(); delete pI; pI = pIn; } } void TblIndexList::Add(wxString & name, bool unique) { // adding an Index to the List TblIndex *p = new TblIndex(name, unique); if (!First) First = p; if (Last) Last->SetNext(p); Last = p; } void TblIndexList::Invalidate(wxString & name) { // invalidating a column/index TblIndex *pI = First; while (pI) { pI->Invalidate(name); pI = pI->GetNext(); } } MyChartData::MyChartData() { // constructor (unique values) Initialized = false; Array = NULL; First = NULL; Last = NULL; MaxFreq = INT_MIN; TotFreq = 0; MaxClasses = 0; NumClasses = 0; OtherUniquesFreq = 0; OtherUniquesCount = 0; Valid = false; ByIntervals = false; } MyChartData::~MyChartData() { // destructor MyChartUniqueClass *p; MyChartUniqueClass *pN; if (Array) delete[]Array; p = First; while (p) { pN = p->GetNext(); delete p; p = pN; } } bool MyChartData::Check(bool by_interval, int classes) { // checking if current Data are still valid if (Initialized == false) return false; if (by_interval == true && Array == NULL) return false; if (by_interval == false && First == NULL) return false; if (by_interval == true && classes != NumClasses) return false; if (by_interval == false && classes != MaxClasses) return false; return true; } void MyChartData::CleanData() { // resetting to the initial (not initialized) state MyChartUniqueClass *p; MyChartUniqueClass *pN; if (Array) delete[]Array; p = First; while (p) { pN = p->GetNext(); delete p; p = pN; } Initialized = false; Array = NULL; First = NULL; Last = NULL; MaxFreq = INT_MIN; TotFreq = 0; MaxClasses = 0; NumClasses = 0; OtherUniquesFreq = 0; OtherUniquesCount = 0; Valid = false; ByIntervals = false; } bool MyChartData::Create(int max_classes) { // constructor (unique values) if (Initialized == true) return false; MaxClasses = max_classes; Valid = false; ByIntervals = false; return true; } bool MyChartData::Create(double min, double max, int classes) { // constructor (interval values) int ind; double base = min; double step; if (Initialized == true) return false; Array = new MyChartIntervalClass[classes]; Min = min; Max = max; NumClasses = classes; Valid = false; ByIntervals = true; step = (max - min) / (double) classes; for (ind = 0; ind < classes; ind++) { MyChartIntervalClass *p = GetClass(ind); p->Create(base, base + step); base += step; } return true; } MyChartIntervalClass *MyChartData::GetClass(int idx) { // retriving an interval class by index if (idx >= 0 && idx < NumClasses) return Array + idx; return NULL; } void MyChartData::Add(double value) { // incrementing the frequence count for an interval class double step = (Max - Min) / (double) NumClasses; int idx = (int) floor((value - Min) / step); if (idx >= 0 && idx < NumClasses) { MyChartIntervalClass *p = GetClass(idx); p->Add(); TotFreq++; if (p->GetCount() > MaxFreq) MaxFreq = p->GetCount(); } } void MyChartData::Add(wxString & value, int count) { // appending a new Unique Value (if limit not already reached) if (NumClasses < MaxClasses) { MyChartUniqueClass *p = new MyChartUniqueClass(value, count); if (First == NULL) First = p; if (Last != NULL) Last->SetNext(p); Last = p; NumClasses++; if (count > MaxFreq) MaxFreq = count; } else { OtherUniquesFreq += count; OtherUniquesCount++; if (OtherUniquesFreq > MaxFreq) MaxFreq = OtherUniquesFreq; } TotFreq += count; } MyChartScaleLabels::~MyChartScaleLabels() { // destructor MyChartScaleLabel *p; MyChartScaleLabel *pN; p = First; while (p) { pN = p->GetNext(); delete p; p = pN; } } void MyChartScaleLabels::Initialize(double span, int max_freq) { // setting the Chart Scale labels int tic; int tic2; char text[128]; double pos; if (max_freq < 20) { tic = 1; while (tic < max_freq) { sprintf(text, "%d", tic); pos = span * ((double) tic / max_freq); Add(text, pos); tic++; } } else if (max_freq < 200) { tic = 10; while (tic < max_freq) { sprintf(text, "%d", tic); pos = span * ((double) tic / max_freq); Add(text, pos); tic += 10; } } else if (max_freq < 2000) { tic = 100; while (tic < max_freq) { sprintf(text, "%d", tic); pos = span * ((double) tic / max_freq); Add(text, pos); tic += 100; } } else if (max_freq < 20000) { tic = 1000; tic2 = 1; while (tic < max_freq) { sprintf(text, "%dK", tic2); pos = span * ((double) tic / max_freq); Add(text, pos); tic += 1000; tic2++; } } else if (max_freq < 200000) { tic = 10000; tic2 = 1; while (tic < max_freq) { sprintf(text, "%d0K", tic2); pos = span * ((double) tic / max_freq); Add(text, pos); tic += 10000; tic2++; } } else if (max_freq < 2000000) { tic = 100000; tic2 = 1; while (tic < max_freq) { sprintf(text, "%d00K", tic2); pos = span * ((double) tic / max_freq); Add(text, pos); tic += 100000; tic2++; } } else if (max_freq < 20000000) { tic = 1000000; tic2 = 1; while (tic < max_freq) { sprintf(text, "%dM", tic2); pos = span * ((double) tic / max_freq); Add(text, pos); tic += 1000000; tic2++; } } else if (max_freq < 200000000) { tic = 10000000; tic2 = 1; while (tic < max_freq) { sprintf(text, "%d0M", tic2); pos = span * ((double) tic / max_freq); Add(text, pos); tic += 10000000; tic2++; } } else if (max_freq < 200000000) { tic = 100000000; tic2 = 1; while (tic < max_freq) { sprintf(text, "%d00M", tic2); pos = span * ((double) tic / max_freq); Add(text, pos); tic += 100000000; tic2++; } } else { tic = 1000000000; tic2 = 1; while (tic < max_freq) { sprintf(text, "%dG", tic2); pos = span * ((double) tic / max_freq); Add(text, pos); tic += 1000000000; tic2++; } } } void MyChartScaleLabels::Add(const char *label, double pos) { // adding a Scale Label wxString text = wxString::FromUTF8(label); MyChartScaleLabel *p = new MyChartScaleLabel(text, pos); if (First == NULL) First = p; if (Last != NULL) Last->SetNext(p); Last = p; } MyPieChartLabels::MyPieChartLabels() { // constructor First = NULL; Last = NULL; NumLeftLabels = 0; LeftLabels = NULL; NumRightLabels = 0; RightLabels = NULL; } MyPieChartLabels::~MyPieChartLabels() { // destructor MyPieChartLabel *p; MyPieChartLabel *pN; p = First; while (p) { pN = p->GetNext(); delete p; p = pN; } if (LeftLabels) delete[]LeftLabels; if (RightLabels) delete[]RightLabels; } void MyPieChartLabels::Add(const char *label, double x, double y) { // adding a PieChart Label wxString text = wxString::FromUTF8(label); MyPieChartLabel *p = new MyPieChartLabel(text, x, y); if (First == NULL) First = p; if (Last != NULL) Last->SetNext(p); Last = p; } void MyPieChartLabels::Sort(double cx) { // sorting the Left/Right arrays MyPieChartLabel *p; MyPieChartLabel *p2; int idx; bool ok; if (LeftLabels) delete[]LeftLabels; if (RightLabels) delete[]RightLabels; NumLeftLabels = 0; LeftLabels = NULL; NumRightLabels = 0; RightLabels = NULL; p = First; while (p) { // counting how many 'left' labels are there if (p->GetX() < cx) NumLeftLabels++; p = p->GetNext(); } p = First; while (p) { // counting how many 'right' labels are there if (p->GetX() >= cx) NumRightLabels++; p = p->GetNext(); } if (NumLeftLabels > 0) { // allocating the Left array LeftLabels = new MyPieChartLabel *[NumLeftLabels]; idx = 0; p = First; while (p) { // initializing the Left array if (p->GetX() < cx) { *(LeftLabels + idx) = p; idx++; } p = p->GetNext(); } ok = true; while (ok) { // bubble-sorting the Left array ok = false; for (idx = 1; idx < NumLeftLabels; idx++) { p = *(LeftLabels + idx - 1); p2 = *(LeftLabels + idx); if (p->GetY() > p2->GetY()) { *(LeftLabels + idx - 1) = p2; *(LeftLabels + idx) = p; ok = true; } } } } if (NumRightLabels > 0) { // allocating the Right array RightLabels = new MyPieChartLabel *[NumRightLabels]; idx = 0; p = First; while (p) { // initializing the Right array if (p->GetX() >= cx) { *(RightLabels + idx) = p; idx++; } p = p->GetNext(); } ok = true; while (ok) { // bubble-sorting the Right array ok = false; for (idx = 1; idx < NumRightLabels; idx++) { p = *(RightLabels + idx - 1); p2 = *(RightLabels + idx); if (p->GetY() > p2->GetY()) { *(RightLabels + idx - 1) = p2; *(RightLabels + idx) = p; ok = true; } } } } } MyPieChartLabel *MyPieChartLabels::GetLeftLabel(int idx) { // return a Left Label pointer by index if (idx >= 0 && idx < NumLeftLabels) return *(LeftLabels + idx); return NULL; } MyPieChartLabel *MyPieChartLabels::GetRightLabel(int idx) { // return a Right Label pointer by index if (idx >= 0 && idx < NumRightLabels) return *(RightLabels + idx); return NULL; } Topology::Topology(MyTableTree * tree, wxTreeItemId & root, TopologySet * topology) { // constructor: Topology Tree Node wxString prefix = topology->GetPrefix(); wxString name; char bufSrid[64]; TopologyItem *pT; name = prefix; sprintf(bufSrid, " [SRID=%d]", topology->GetSrid()); name += wxString::FromUTF8(bufSrid); if (topology->GetCoordDims() == wxT("XYZ")) name += wxT(" 3D"); else name += wxT(" 2D"); TopologyNode = tree->AppendItem(root, name); tree->SetItemImage(TopologyNode, 20); TopologyItems.SetPrefix(topology->GetPrefix()); TopologyItems.SetSrid(topology->GetSrid()); TopologyItems.SetCoordDims(topology->GetCoordDims()); pT = topology->GetFirst(); while (pT) { // copying Topology Items if (pT->IsTable() == true) TopologyItems.AddTable(pT->GetName()); else if (pT->IsView() == true) TopologyItems.AddView(pT->GetName()); pT = pT->GetNext(); } Next = NULL; } wxTreeItemId *Topology::Check(wxString & table) { // checking if some table belongs to this Topology TopologyItem *pT = TopologyItems.GetFirst(); while (pT) { // copying Topology Items if (pT->GetName() == table) return &TopologyNode; pT = pT->GetNext(); } return NULL; } void TopologyList::Flush() { // resetting TopologyList to initial empty state Topology *pT; Topology *pTn; pT = First; while (pT) { pTn = pT->GetNext(); delete pT; pT = pTn; } First = NULL; Last = NULL; Count = 0; } void TopologyList::Add(class MyTableTree * tree, wxTreeItemId & root, TopologySet * topology) { // inserting a Topology into the list Topology *pT = new Topology(tree, root, topology); Count++; if (First == NULL) First = pT; if (Last != NULL) Last->SetNext(pT); Last = pT; } wxTreeItemId *TopologyList::FindNode(wxString & table) { // searching corresponding Topology Node (if any) Topology *pT = First; while (pT) { wxTreeItemId *node = pT->Check(table); if (node != NULL) return node; pT = pT->GetNext(); } return NULL; } RasterCoverage::RasterCoverage(MyTableTree * tree, wxTreeItemId & root, wxString & coverage, int srid) { // constructor: Raster Coverage Tree Node Name = coverage; wxString xname; char bufSrid[64]; xname = Name; sprintf(bufSrid, " [SRID=%d]", srid); xname += wxString::FromUTF8(bufSrid); CoverageNode = tree->AppendItem(root, xname); tree->SetItemImage(CoverageNode, 22); Next = NULL; } VectorCoverage::VectorCoverage(MyTableTree * tree, wxTreeItemId & root, wxString & coverage, int srid) { // constructor: Vector Coverage Tree Node Name = coverage; wxString xname; char bufSrid[64]; xname = Name; sprintf(bufSrid, " [SRID=%d]", srid); xname += wxString::FromUTF8(bufSrid); CoverageNode = tree->AppendItem(root, xname); tree->SetItemImage(CoverageNode, 24); Next = NULL; } wxTreeItemId *RasterCoverage::Check(wxString & table, bool * tile_data) { // checking if some table belongs to this Raster Coverage *tile_data = false; wxString cfr = Name + wxT("_sections"); if (cfr.CmpNoCase(table) == 0) return &CoverageNode; cfr = Name + wxT("_tiles"); if (cfr.CmpNoCase(table) == 0) return &CoverageNode; cfr = Name + wxT("_tile_data"); if (cfr.CmpNoCase(table) == 0) { *tile_data = true; return &CoverageNode; } cfr = Name + wxT("_levels"); if (cfr.CmpNoCase(table) == 0) return &CoverageNode; return NULL; } void RasterCoverageList::Flush() { // resetting RasterCovreageList to initial empty state RasterCoverage *pC; RasterCoverage *pCn; pC = First; while (pC) { pCn = pC->GetNext(); delete pC; pC = pCn; } First = NULL; Last = NULL; Count = 0; } void RasterCoverageList::Add(class MyTableTree * tree, wxTreeItemId & root, wxString & coverage, int srid) { // inserting a Raster Coverage into the list RasterCoverage *pC = new RasterCoverage(tree, root, coverage, srid); Count++; if (First == NULL) First = pC; if (Last != NULL) Last->SetNext(pC); Last = pC; } wxTreeItemId *RasterCoverageList::FindNode(wxString & table, bool * tile_data) { // searching corresponding Topology Node (if any) RasterCoverage *pC = First; while (pC) { wxTreeItemId *node = pC->Check(table, tile_data); if (node != NULL) return node; pC = pC->GetNext(); } *tile_data = false; return NULL; } void VectorCoverageList::Flush() { // resetting VectorCovreageList to initial empty state VectorCoverage *pC; VectorCoverage *pCn; pC = First; while (pC) { pCn = pC->GetNext(); delete pC; pC = pCn; } First = NULL; Last = NULL; Count = 0; } void VectorCoverageList::Add(class MyTableTree * tree, wxTreeItemId & root, wxString & coverage, int srid) { // inserting a Vector Coverage into the list VectorCoverage *pC = new VectorCoverage(tree, root, coverage, srid); Count++; if (First == NULL) First = pC; if (Last != NULL) Last->SetNext(pC); Last = pC; } PostGISColumn::PostGISColumn() { // constructor Nullable = true; PrimaryKey = false; Autoincrement = false; Null = 0; Boolean = 0; Int8 = 0; UInt8 = 0; Int16 = 0; UInt16 = 0; Int32 = 0; UInt32 = 0; Int64 = 0; Double = 0; Text = 0; MaxTextLen = 0; Date = 0; DateTime = 0; Blob = 0; Point = 0; MultiPoint = 0; LineString = 0; MultiLineString = 0; Polygon = 0; MultiPolygon = 0; GeometryCollection = 0; Srid1 = INT_MIN; Srid2 = INT_MIN;; CoordDims1 = GAIA_UNKNOWN; CoordDims2 = GAIA_UNKNOWN; DataType = PostGISHelper::DATA_TYPE_UNDEFINED; } void PostGISColumn::IncrPoint(int srid, int dims) { // increasing POINT statistics Point++; if (srid == Srid1 || srid == Srid2) ; else { if (Srid1 == INT_MIN) Srid1 = srid; else if (Srid2 == INT_MIN) Srid2 = srid; } if (dims == CoordDims1 || dims == CoordDims2) ; else { if (CoordDims1 == GAIA_UNKNOWN) CoordDims1 = dims; else if (CoordDims2 == GAIA_UNKNOWN) CoordDims2 = dims; } } void PostGISColumn::IncrMultiPoint(int srid, int dims) { // increasing MULTIPOINT statistics MultiPoint++; if (srid == Srid1 || srid == Srid2) ; else { if (Srid1 == INT_MIN) Srid1 = srid; else if (Srid2 == INT_MIN) Srid2 = srid; } if (dims == CoordDims1 || dims == CoordDims2) ; else { if (CoordDims1 == GAIA_UNKNOWN) CoordDims1 = dims; else if (CoordDims2 == GAIA_UNKNOWN) CoordDims2 = dims; } } void PostGISColumn::IncrLineString(int srid, int dims) { // increasing LINESTRING statistics LineString++; if (srid == Srid1 || srid == Srid2) ; else { if (Srid1 == INT_MIN) Srid1 = srid; else if (Srid2 == INT_MIN) Srid2 = srid; } if (dims == CoordDims1 || dims == CoordDims2) ; else { if (CoordDims1 == GAIA_UNKNOWN) CoordDims1 = dims; else if (CoordDims2 == GAIA_UNKNOWN) CoordDims2 = dims; } } void PostGISColumn::IncrMultiLineString(int srid, int dims) { // increasing MULTILINESTRING statistics MultiLineString++; if (srid == Srid1 || srid == Srid2) ; else { if (Srid1 == INT_MIN) Srid1 = srid; else if (Srid2 == INT_MIN) Srid2 = srid; } if (dims == CoordDims1 || dims == CoordDims2) ; else { if (CoordDims1 == GAIA_UNKNOWN) CoordDims1 = dims; else if (CoordDims2 == GAIA_UNKNOWN) CoordDims2 = dims; } } void PostGISColumn::IncrPolygon(int srid, int dims) { // increasing POLYGON statistics Polygon++; if (srid == Srid1 || srid == Srid2) ; else { if (Srid1 == INT_MIN) Srid1 = srid; else if (Srid2 == INT_MIN) Srid2 = srid; } if (dims == CoordDims1 || dims == CoordDims2) ; else { if (CoordDims1 == GAIA_UNKNOWN) CoordDims1 = dims; else if (CoordDims2 == GAIA_UNKNOWN) CoordDims2 = dims; } } void PostGISColumn::IncrMultiPolygon(int srid, int dims) { // increasing MULTIPOLYGON statistics MultiPolygon++; if (srid == Srid1 || srid == Srid2) ; else { if (Srid1 == INT_MIN) Srid1 = srid; else if (Srid2 == INT_MIN) Srid2 = srid; } if (dims == CoordDims1 || dims == CoordDims2) ; else { if (CoordDims1 == GAIA_UNKNOWN) CoordDims1 = dims; else if (CoordDims2 == GAIA_UNKNOWN) CoordDims2 = dims; } } void PostGISColumn::IncrGeometryCollection(int srid, int dims) { // increasing GEOMETRYCOLLECTION statistics GeometryCollection++; if (srid == Srid1 || srid == Srid2) ; else { if (Srid1 == INT_MIN) Srid1 = srid; else if (Srid2 == INT_MIN) Srid2 = srid; } if (dims == CoordDims1 || dims == CoordDims2) ; else { if (CoordDims1 == GAIA_UNKNOWN) CoordDims1 = dims; else if (CoordDims2 == GAIA_UNKNOWN) CoordDims2 = dims; } } bool PostGISColumn::IsDate(const char *txt) { // checking if a text string looks like a DATE if (txt == NULL) return false; if (strlen(txt) != 10) return false; if (*(txt + 0) >= '0' && *(txt + 0) <= '9') ; else return false; if (*(txt + 1) >= '0' && *(txt + 1) <= '9') ; else return false; if (*(txt + 2) >= '0' && *(txt + 2) <= '9') ; else return false; if (*(txt + 3) >= '0' && *(txt + 3) <= '9') ; else return false; if (*(txt + 4) != '-') return false; if (*(txt + 5) >= '0' && *(txt + 5) <= '9') ; else return false; if (*(txt + 6) >= '0' && *(txt + 6) <= '9') ; else return false; if (*(txt + 7) != '-') return false; if (*(txt + 8) >= '0' && *(txt + 8) <= '9') ; else return false; if (*(txt + 9) >= '0' && *(txt + 9) <= '9') ; else return false; return true; } bool PostGISColumn::IsDateTime(const char *txt) { // checking if a text string looks like a DATETIME if (txt == NULL) return false; if (strlen(txt) != 19) return false; if (*(txt + 0) >= '0' && *(txt + 0) <= '9') ; else return false; if (*(txt + 1) >= '0' && *(txt + 1) <= '9') ; else return false; if (*(txt + 2) >= '0' && *(txt + 2) <= '9') ; else return false; if (*(txt + 3) >= '0' && *(txt + 3) <= '9') ; else return false; if (*(txt + 4) != '-') return false; if (*(txt + 5) >= '0' && *(txt + 5) <= '9') ; else return false; if (*(txt + 6) >= '0' && *(txt + 6) <= '9') ; else return false; if (*(txt + 7) != '-') return false; if (*(txt + 8) >= '0' && *(txt + 8) <= '9') ; else return false; if (*(txt + 9) >= '0' && *(txt + 9) <= '9') ; else return false; if (*(txt + 10) != ' ') return false; if (*(txt + 11) >= '0' && *(txt + 11) <= '9') ; else return false; if (*(txt + 12) >= '0' && *(txt + 12) <= '9') ; else return false; if (*(txt + 13) != ':') return false; if (*(txt + 14) >= '0' && *(txt + 14) <= '9') ; else return false; if (*(txt + 15) >= '0' && *(txt + 15) <= '9') ; else return false; if (*(txt + 16) != ':') return false; if (*(txt + 17) >= '0' && *(txt + 17) <= '9') ; else return false; if (*(txt + 18) >= '0' && *(txt + 18) <= '9') ; else return false; return true; } void PostGISColumn::Prepare() { // determining the exact Column Data Type if (!Boolean && !Int8 && !UInt8 && !Int16 && !UInt16 && !Int32 && !UInt32 && !Int64 && !Double && !Text && !Date && !DateTime && !Blob) { // testing for Geometry int type = PostGISHelper::DATA_TYPE_UNDEFINED; if ((Point + MultiPoint + LineString + MultiLineString + Polygon + MultiPolygon + GeometryCollection) > 0) type = PostGISHelper::DATA_TYPE_GEOMETRY; else { // surely not a Geometry: defaulting to TEXT DataType = PostGISHelper::DATA_TYPE_TEXT; return; } if (Point > 0 && !MultiPoint && !LineString && !MultiLineString && !Polygon && !MultiPolygon && !GeometryCollection) type = PostGISHelper::DATA_TYPE_POINT; if (MultiPoint > 0 && !LineString && !MultiLineString && !Polygon && !MultiPolygon && !GeometryCollection) type = PostGISHelper::DATA_TYPE_MULTIPOINT; if (!Point && !MultiPoint && LineString > 0 && !MultiLineString && !Polygon && !MultiPolygon && !GeometryCollection) type = PostGISHelper::DATA_TYPE_LINESTRING; if (!Point && !MultiPoint && MultiLineString > 0 && !Polygon && !MultiPolygon && !GeometryCollection) type = PostGISHelper::DATA_TYPE_MULTILINESTRING; if (!Point && !MultiPoint && !LineString && !MultiLineString && Polygon > 0 && !MultiPolygon && !GeometryCollection) type = PostGISHelper::DATA_TYPE_POLYGON; if (!Point && !MultiPoint && !LineString && !MultiLineString && MultiPolygon > 0 && !GeometryCollection) type = PostGISHelper::DATA_TYPE_MULTIPOLYGON; if (!Point && !MultiPoint && !LineString && !MultiLineString && !Polygon && !MultiPolygon && GeometryCollection > 0) type = PostGISHelper::DATA_TYPE_GEOMETRYCOLLECTION; if (type != PostGISHelper::DATA_TYPE_UNDEFINED) { if (Srid2 == INT_MIN && CoordDims2 == GAIA_UNKNOWN) { // ok, valid Geometry DataType = type; return; } else { // no, invalid Geometry DataType = PostGISHelper::DATA_TYPE_BLOB; return; } } DataType = PostGISHelper::DATA_TYPE_BLOB; return; } if (Boolean > 0 && !Int8 && !UInt8 && !Int16 && !UInt16 && !Int32 && !UInt32 && !Int64 && !Double && !Text && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_BOOLEAN; return; } if ((Int8 > 0 && !UInt8) && !Int16 && !UInt16 && !Int32 && !UInt32 && !Int64 && !Double && !Text && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_INT8; return; } if (UInt8 > 0 && !Int16 && !UInt16 && !Int32 && !UInt32 && !Int64 && !Double && !Text && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_UINT8; return; } if ((Int16 > 0 && !UInt16) && !Int32 && !UInt32 && !Int64 && !Double && !Text && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_INT16; return; } if (UInt16 > 0 && !Int32 && !UInt32 && !Int64 && !Double && !Text && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_UINT16; return; } if ((Int32 > 0 && !UInt32) && !Int64 && !Double && !Text && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_INT32; return; } if (UInt32 > 0 && !Int64 && !Double && !Text && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_UINT32; return; } if (Int64 > 0 && !Double && !Text && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_INT64; return; } if (Double > 0 && !Text && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_DOUBLE; return; } if (!Boolean && !Int8 && !UInt8 && !Int16 && !UInt16 && !Int32 && !UInt32 && !Int64 && !Double && Text > 0 && !Date && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_TEXT; return; } if (!Boolean && !Int8 && !UInt8 && !Int16 && !UInt16 && !Int32 && !UInt32 && !Int64 && !Double && !Text && Date > 0 && !DateTime && !Blob) { DataType = PostGISHelper::DATA_TYPE_DATE; return; } if (!Boolean && !Int8 && !UInt8 && !Int16 && !UInt16 && !Int32 && !UInt32 && !Int64 && !Double && !Text && DateTime > 0 && !Blob) { DataType = PostGISHelper::DATA_TYPE_DATETIME; return; } if (!Boolean && !Int8 && !UInt8 && !Int16 && !UInt16 && !Int32 && !UInt32 && !Int64 && !Double && !Text && !Date && !DateTime && Blob > 0) { DataType = PostGISHelper::DATA_TYPE_BLOB; return; } if ((Boolean + Int8 + UInt8 + Int16 + UInt16 + Int32 + UInt32 + Int64 + Double + Text + Date + DateTime) > 0 && !Blob) { DataType = PostGISHelper::DATA_TYPE_TEXT; return; } if (Null > 0) Nullable = true; // unable to establish a valid Data Type DataType = PostGISHelper::DATA_TYPE_UNDEFINED; } bool PostGISColumn::IsGeometry() { // does this column corresponds to some Geometry ? switch (DataType) { case PostGISHelper::DATA_TYPE_POINT: case PostGISHelper::DATA_TYPE_LINESTRING: case PostGISHelper::DATA_TYPE_POLYGON: case PostGISHelper::DATA_TYPE_MULTIPOINT: case PostGISHelper::DATA_TYPE_MULTILINESTRING: case PostGISHelper::DATA_TYPE_MULTIPOLYGON: case PostGISHelper::DATA_TYPE_GEOMETRYCOLLECTION: case PostGISHelper::DATA_TYPE_GEOMETRY: return true; } return false; } PostGISIndex::~PostGISIndex() { // destructor PostGISIndexField *pI; PostGISIndexField *pIn; pI = First; while (pI) { pIn = pI->GetNext(); delete pI; pI = pIn; } } void PostGISIndex::AddField(int seq, PostGISColumn * col) { // adding a Field into this Index PostGISIndexField *field = new PostGISIndexField(seq, col); if (First == NULL) First = field; if (Last != NULL) Last->SetNext(field); Last = field; } PostGISHelper::PostGISHelper() { // constructor DumbName = wxT("DumbColumn"); Count = 0; Columns = NULL; FirstIdx = NULL; LastIdx = NULL; Autoincrement = false; } PostGISHelper::~PostGISHelper() { // destructor PostGISIndex *pI; PostGISIndex *pIn; if (Columns != NULL) delete[]Columns; pI = FirstIdx; while (pI) { pIn = pI->GetNext(); delete pI; pI = pIn; } } void PostGISHelper::Alloc(int count) { // // allocating the Columns array // Count = count; if (Columns != NULL) delete[]Columns; Columns = new PostGISColumn[Count]; } void PostGISHelper::SetName(int pos, const char *name) { // // setting a Column Name // if (pos >= 0 && pos < Count) { wxString Name = wxString::FromUTF8(name); Columns[pos].SetName(Name); } } void PostGISHelper::Eval(int pos, sqlite3_int64 val) { // // evaluating an INT value // if (pos >= 0 && pos < Count) { bool skip = false; if (val == 1 || val == 0) { Columns[pos].IncrBoolean(); skip = true; } if (!skip) { if (val >= SCHAR_MIN && val <= SCHAR_MAX) { Columns[pos].IncrInt8(); skip = true; } if (val > SCHAR_MAX && val <= UCHAR_MAX) { Columns[pos].IncrUInt8(); skip = true; } } if (!skip) { if (val >= SHRT_MIN && val <= SHRT_MAX) { Columns->IncrInt16(); skip = true; } if (val > SHRT_MAX && val <= USHRT_MAX) { Columns[pos].IncrUInt16(); skip = true; } } if (!skip) { if (val >= INT_MIN && val <= INT_MAX) { Columns[pos].IncrInt32(); skip = true; } if (val > INT_MAX && val <= UINT_MAX) { Columns[pos].IncrUInt32(); skip = true; } } if (!skip) Columns[pos].IncrInt64(); } } void PostGISHelper::Eval(int pos, double val) { // // evaluating a DOUBLE value // if (val > 0) val = 0.0; // suppressing stupid warnings if (pos >= 0 && pos < Count) Columns[pos].IncrDouble(); } void PostGISHelper::Eval(int pos, const char *val) { // // evaluating a TEXT value // if (pos >= 0 && pos < Count) { int len = strlen(val); if (Columns[pos].IsDate(val) == true) Columns[pos].IncrDate(); else if (Columns[pos].IsDateTime(val) == true) Columns[pos].IncrDateTime(); else Columns[pos].IncrText(len); } } void PostGISHelper::Eval(int pos, gaiaGeomCollPtr geom) { // // evaluating a Geometry value // if (pos >= 0 && pos < Count) { switch (geom->DeclaredType) { case GAIA_POINT: Columns[pos].IncrPoint(geom->Srid, geom->DimensionModel); break; case GAIA_LINESTRING: Columns[pos].IncrLineString(geom->Srid, geom->DimensionModel); break; case GAIA_POLYGON: Columns[pos].IncrPolygon(geom->Srid, geom->DimensionModel); break; case GAIA_MULTIPOINT: Columns[pos].IncrMultiPoint(geom->Srid, geom->DimensionModel); break; case GAIA_MULTILINESTRING: Columns[pos].IncrMultiLineString(geom->Srid, geom->DimensionModel); break; case GAIA_MULTIPOLYGON: Columns[pos].IncrMultiPolygon(geom->Srid, geom->DimensionModel); break; case GAIA_GEOMETRYCOLLECTION: Columns[pos].IncrGeometryCollection(geom->Srid, geom->DimensionModel); break; }; } } void PostGISHelper::EvalBlob(int pos) { // // evaluating a BLOB value // if (pos >= 0 && pos < Count) Columns[pos].IncrBlob(); } void PostGISHelper::Eval(int pos) { // // evaluating a NULL value // if (pos >= 0 && pos < Count) Columns[pos].IncrNull(); } wxString & PostGISHelper::GetName(int pos, bool to_lower) { // // return a Column name [by relative position] // wxString name; if (pos >= 0 && pos < Count) name = Columns[pos].GetName(); else name = wxT("DumbColumn"); if (to_lower) DumbName = name.MakeLower(); else DumbName = name; return DumbName; } void PostGISHelper::Prepare() { // // setting PostGIS data types for each Column // int i; for (i = 0; i < Count; i++) Columns[i].Prepare(); } bool PostGISHelper::IsSingleFieldPrimaryKey() { // testing if there is a single column PK int count = 0; int i; for (i = 0; i < Count; i++) { if (Columns[i].IsPrimaryKey() == true) count++; } if (count == 1) return true; return false; } bool PostGISHelper::IsGeometry(int pos) { // // checking if a column is of any Geometry type // if (pos >= 0 && pos < Count) return Columns[pos].IsGeometry(); return false; } int PostGISHelper::GetDataType(int pos) { // // return the data type for some column // if (pos >= 0 && pos < Count) return Columns[pos].GetDataType(); return DATA_TYPE_UNDEFINED; } int PostGISHelper::GetSrid(int pos) { // // return the SRID for some Geometry column // if (pos >= 0 && pos < Count) return Columns[pos].GetSrid(); return -1; } int PostGISHelper::GetCoordDims(int pos) { // // return the Coord Dimensions for some Geometry column // if (pos >= 0 && pos < Count) return Columns[pos].GetCoordDims(); return GAIA_XY; } void PostGISHelper::SetColumn(wxString & name, bool isNull, bool isPKey) { // // setting up Column params // int i; for (i = 0; i < Count; i++) { if (Columns[i].GetName() == name) { if (isNull) Columns[i].SetNotNull(); if (isPKey) { Columns[i].SetPrimaryKey(); } break; } } } void PostGISHelper::GetDataType(int pos, char *definition) { // // return the data definition for some column // if (pos >= 0 && pos < Count) { int len; int data_type = Columns[pos].GetDataType(); switch (data_type) { case DATA_TYPE_BOOLEAN: case DATA_TYPE_INT8: case DATA_TYPE_UINT8: case DATA_TYPE_INT16: strcpy(definition, "smallint"); break; case DATA_TYPE_UINT16: case DATA_TYPE_INT32: strcpy(definition, "integer"); break; case DATA_TYPE_UINT32: case DATA_TYPE_INT64: strcpy(definition, "bigint"); break; case DATA_TYPE_DOUBLE: strcpy(definition, "double precision"); break; case DATA_TYPE_DATE: strcpy(definition, "date"); break; case DATA_TYPE_DATETIME: strcpy(definition, "timestamp"); break; case DATA_TYPE_TEXT: len = Columns[pos].GetMaxTextLen(); if (len <= 255) { sprintf(definition, "character varying(%d)", (len == 0) ? 255 : len); } else strcpy(definition, "text"); break; case DATA_TYPE_BLOB: strcpy(definition, "bytea"); break; default: strcpy(definition, "unknownType"); }; if (Columns[pos].IsNotNull() == true) strcat(definition, " NOT NULL"); if (Columns[pos].IsPrimaryKey() == true && IsSingleFieldPrimaryKey() == true) { if (IsAutoincrement() == true) strcpy(definition, "SERIAL"); else { // attempting to promote any PK as int-4 switch (data_type) { case DATA_TYPE_BOOLEAN: case DATA_TYPE_INT8: case DATA_TYPE_UINT8: case DATA_TYPE_INT16: case DATA_TYPE_UINT16: case DATA_TYPE_INT32: strcpy(definition, "integer"); break; } } strcat(definition, " PRIMARY KEY"); } return; } *definition = '\0'; } void PostGISHelper::OutputBooleanValue(FILE * out, sqlite3_int64 value) { // outputting a BOOLEAN value if (value == 0) fprintf(out, "0"); else fprintf(out, "1"); } void PostGISHelper::OutputValue(FILE * out, sqlite3_int64 value) { // outputting an INTEGER value #if defined(_WIN32) || defined(__MINGW32__) // CAVEAT - M$ runtime doesn't supports %lld for 64 bits fprintf(out, "%I64d", value); #else fprintf(out, "%lld", value); #endif } void PostGISHelper::OutputValue(FILE * out, double value) { // outputting a DOUBLE value fprintf(out, "%1.15f", value); } void PostGISHelper::OutputValue(FILE * out, const char *value) { // outputting a TEXT value const char *p = value; fputc('\'', out); while (*p != '\0') { if (*p == '\'') fputc('\'', out); fputc(*p++, out); } fputc('\'', out); } void PostGISHelper::OutputValue(FILE * out, gaiaGeomCollPtr geom) { // outputting a GEOMETRY EWKB value gaiaOutBuffer out_buf; gaiaOutBufferInitialize(&out_buf); gaiaToEWKB(&out_buf, geom); if (out_buf.Error || out_buf.Buffer == NULL) fprintf(out, "NULL"); else { int len = out_buf.WriteOffset; int i; fputc('\'', out); for (i = 0; i < len; i++) fputc(out_buf.Buffer[i], out); fputc('\'', out); } gaiaOutBufferReset(&out_buf); } void PostGISHelper::OutputValue(FILE * out, const unsigned char *value, int len) { // outputting a BLOB value as BYTEA int i; const char *in = (const char *) value; // encoding a BLOB as BYTEA [escaped octects] putc('E', out); putc('\'', out); for (i = 0; i < len; i++) { if (in[i] <= 31 || in[i] >= 127 || in[i] == '\'' || in[i] == '\\') fprintf(out, "\\\\%03o", in[i]); else putc(in[i], out); } putc('\'', out); } PostGISIndex *PostGISHelper::AddIndex(wxString & Name) { // adding a Primary Key to this Table wxString name = wxT("pk_") + Name; PostGISIndex *idx = new PostGISIndex(name); if (FirstIdx == NULL) FirstIdx = idx; if (LastIdx != NULL) LastIdx->SetNext(idx); LastIdx = idx; return idx; } PostGISIndex *PostGISHelper::AddIndex(wxString & name, bool unique) { // adding an Index to this Table PostGISIndex *idx = FirstIdx; while (idx) { if (idx->GetName() == name) { // already inserted return idx; } idx = idx->GetNext(); } idx = new PostGISIndex(name, unique); if (FirstIdx == NULL) FirstIdx = idx; if (LastIdx != NULL) LastIdx->SetNext(idx); LastIdx = idx; return idx; } PostGISColumn *PostGISHelper::Find(wxString & name) { // retrieving a Column by name int i; for (i = 0; i < Count; i++) { PostGISColumn *pC = Columns + i; if (pC->GetName() == name) return pC; } return NULL; } void PostGISHelper::ExpandIndexFields(MyFrame * MainFrame, PostGISIndex * index, wxString & idxName) { // // expanding the Index Fields // int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; int seq; wxString Name; wxString sql; char xname[1024]; int ret; sql = wxT("PRAGMA index_info("); strcpy(xname, idxName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostGIS SQL dump error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { seq = atoi(results[(i * columns) + 0]); name = results[(i * columns) + 2]; Name = wxString::FromUTF8(name); PostGISColumn *col = Find(Name); index->AddField(seq, col); } } sqlite3_free_table(results); } void PostGISHelper::GetKeys(MyFrame * MainFrame, wxString & tableName) { // // identifying the Primary Key (and any Index) // int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString Name; bool pKey; bool notNull; bool unique; wxString sql; int ret; char xname[1024]; // retrieving the Table Columns sql = wxT("PRAGMA table_info("); strcpy(xname, tableName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostGIS SQL dump error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (atoi(results[(i * columns) + 3]) == 0) notNull = false; else notNull = true; if (atoi(results[(i * columns) + 5]) == 0) pKey = false; else pKey = true; Name = wxString::FromUTF8(name); SetColumn(Name, notNull, pKey); } } sqlite3_free_table(results); // retrieving any Index bounded to this Table sql = wxT("PRAGMA index_list("); strcpy(xname, tableName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("PostGIS SQL dump error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (atoi(results[(i * columns) + 2]) == 0) unique = false; else unique = true; Name = wxString::FromUTF8(name); PostGISIndex *index; if (Name.StartsWith(wxT("sqlite_autoindex_")) == true) index = AddIndex(tableName); else index = AddIndex(Name, unique); ExpandIndexFields(MainFrame, index, Name); } } sqlite3_free_table(results); if (IsSingleFieldPrimaryKey() == true) { // checking for AUTOINCREMENT sql = wxT("SELECT Count(*) FROM sqlite_sequence WHERE Lower(name) = Lower('"); strcpy(xname, tableName.ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) return; if (rows < 1) ; else { int cnt = 0; for (i = 1; i <= rows; i++) { cnt = atoi(results[(i * columns) + 0]); } if (cnt) Autoincrement = true; } sqlite3_free_table(results); } } TopologyItem::TopologyItem(wxString & name) { // constructor Name = name; Table = false; View = false; Next = NULL; } TopologySet::TopologySet() { // constructor Srid = 0; First = NULL; Last = NULL; } TopologySet::~TopologySet() { // destructor TopologyItem *pT; TopologyItem *pTn; pT = First; while (pT) { pTn = pT->GetNext(); delete pT; pT = pTn; } } void TopologySet::SetCoordDims(const char *coords) { // setting CoordDims CoordDims = wxString::FromUTF8(coords); } void TopologySet::Add(const char *name, bool table, bool view) { // adding a Table/View wxString xName = wxString::FromUTF8(name); TopologyItem *pT = new TopologyItem(xName); if (table == true) pT->SetTable(); if (view == true) pT->SetView(); if (First == NULL) First = pT; if (Last != NULL) Last->SetNext(pT); Last = pT; } void TopologySet::AddTable(wxString & name) { // adding a Table TopologyItem *pT = new TopologyItem(name); pT->SetTable(); if (First == NULL) First = pT; if (Last != NULL) Last->SetNext(pT); Last = pT; } void TopologySet::AddView(wxString & name) { // adding a View TopologyItem *pT = new TopologyItem(name); pT->SetView(); if (First == NULL) First = pT; if (Last != NULL) Last->SetNext(pT); Last = pT; } bool TopologySet::CheckPrefix() { // attempting to check (and validate) Prefix int count = 0; int errors = 0; wxString prefix; TopologyItem *pT = First; while (pT != NULL) { if (pT->GetName().EndsWith(wxT("nodes"), &prefix) == true) break; pT = pT->GetNext(); } if (prefix.Len() == 0) return false; pT = First; while (pT != NULL) { if (pT->GetName().StartsWith(prefix) == true) count++; else errors++; pT = pT->GetNext(); } if (count > 1 && errors == 0) { Prefix = prefix; return true; } return false; } VectorCoverageSet::VectorCoverageSet(const char *name, int srid) { // constructor Name = wxString::FromUTF8(name); Srid = srid; } RasterCoverageSet::RasterCoverageSet(const char *name, int srid) { // constructor Name = wxString::FromUTF8(name); Srid = srid; } RasterCoverageItem::RasterCoverageItem(wxString & name, bool tile_data) { // constructor Name = name; TileData = tile_data; Next = NULL; } TableViewItem::TableViewItem(wxString & name, bool is_view, bool is_virtual) { // constructor Name = name; View = is_view; Virtual = is_virtual; Geometry = false; Next = NULL; } TableViewList::TableViewList() { // constructor First = NULL; Last = NULL; Count = 0; Sorted = NULL; } TableViewList::~TableViewList() { // destructor TableViewItem *ptv; TableViewItem *ptvN; ptv = First; while (ptv != NULL) { ptvN = ptv->GetNext(); delete ptv; ptv = ptvN; } if (Sorted != NULL) delete[]Sorted; } void TableViewList::Add(wxString & name, bool isView, bool isVirtual) { // adding a new item to the list TableViewItem *item = new TableViewItem(name, isView, isVirtual); if (First == NULL) First = item; if (Last != NULL) Last->SetNext(item); Last = item; } static int cmp_tables1(const void *p1, const void *p2) { // // compares two Tables or Views by Name [for QSORT] // TableViewItem *ptv1 = *(TableViewItem **) p1; TableViewItem *ptv2 = *((TableViewItem **) p2); return ptv1->GetName().CmpNoCase(ptv2->GetName()); } static int cmp_tables2(const void *p1, const void *p2) { // // compares two Tables or Views by Name [for BSEARCH] // TableViewItem *ptv1 = (TableViewItem *) p1; TableViewItem *ptv2 = *((TableViewItem **) p2); return ptv1->GetName().CmpNoCase(ptv2->GetName()); } void TableViewList::PrepareSorted() { // preparing the array of sorted pointers int cnt = 0; TableViewItem *item = First; while (item != NULL) { // counting how many items cnt++; item = item->GetNext(); } Count = cnt; if (Sorted != NULL) delete[]Sorted; if (Count == 0) { Sorted = NULL; return; } Sorted = new TableViewItem *[Count]; cnt = 0; item = First; while (item != NULL) { // populating the sorted array *(Sorted + cnt++) = item; item = item->GetNext(); } qsort(Sorted, Count, sizeof(TableViewItem *), cmp_tables1); } void TableViewList::SetGeometry(wxString & name) { // marking a Geometry Table or View TableViewItem **ret; TableViewItem ptv(name, false, false); if (!Sorted) return; ret = (TableViewItem **) bsearch(&ptv, Sorted, Count, sizeof(TableViewItem *), cmp_tables2); if (!ret) return; (*ret)->SetGeometry(); } spatialite_gui-2.0.0-devel/gnome_resource/0000775000175000017500000000000012544030130015620 500000000000000spatialite_gui-2.0.0-devel/gnome_resource/Makefile.in0000664000175000017500000003111612544013516017620 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = gnome_resource ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GEOSCONFIG = @GEOSCONFIG@ GEOS_CPPFLAGS = @GEOS_CPPFLAGS@ GEOS_LDFLAGS = @GEOS_LDFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEXL_CFLAGS = @LIBFREEXL_CFLAGS@ LIBFREEXL_LIBS = @LIBFREEXL_LIBS@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS = @OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WXCONFIG = @WXCONFIG@ WX_LIBS = @WX_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = spatialite-gui.png spatialite-gui.desktop all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gnome_resource/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign gnome_resource/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: spatialite_gui-2.0.0-devel/gnome_resource/spatialite-gui.png0000664000175000017500000000711612543275035021212 00000000000000‰PNG  IHDR0*õOØzsRGB®ÎébKGDÿÿÿ ½§“ pHYs  šœtIMEÛ 3Ï=è‰ ÎIDATXÃÕ˜k°žUy†¯g­÷ô÷·OÙ;vÒ„$:iƒ *E:¨Ø¡3¦­b2*j‘ ”DQ (-Ã;£¶;*±ƒU<ÄAˆt°IB’½“|ûðßãZ«?¶0úÃDj\ÿÞygÖÜ÷zîçtÃÀùô­Ÿà\à}å+_ùË›nºé/üþ@Îý÷ß}E×A@µZåÛßþöŠ«¯¾úÙã–À=÷ÜÃÅ_Ì­·Ýæ¿æä“¬ÑZ3;;Ëøø¸KÓTvîÜ9v\Gàî»ïކ᧜rJØl6]’$211çy<òÈ#36lñŽ7Ð7ß|3EQ\T.—ׇax~­Vs½^¥”xžGš¦ûìõ¿Œã%GàªÍb×wÈ«—œZýÚ—·\ž<ûó¿èN=Å|6ƒ_ĨRÀh£A}h ËFW1yâj<5@=(“ZK('‚EPJHDð?ð|%Šv‘ƒƒÐÜ¢1Jƒ ŽL7o8çÜ·]tãÍ7ð͇¾õÒ Ü~ç6v~ý!ÎzÓÙåE«dËž™‡L‹æÙÕù„árÄäà2þxùZ†'P«Œëˆ0hõú¨ÖâéiiA‰0g!TBÏ9¼¨„UŠù$£&Ž$Ërßgjï^‚‹Ýí;ÞÿÆ×Ÿö:ÎyíÞý£ì²kÞÁ£ß{âØ$tÉGÎãîm÷³ù>ù‘=ÿñߪœ(¯‘ˆÿä(kKkX1Ë`)@û-14ä!J˜:ÐgÔÈRö=çƒaÀ\a©hÅ´qˆïñ_ퟸ™±£b]ᔉ8iøÔÕŸùä—ŸÜpÕúcÏ¿¹ô çΙç¾*å­=©á'ÖÅ~âp‘ Šs y ¬eq`H+ïÝKb ÀG´¦_r zSpôHʉÕ8èæB` }ϧêy̆B-Bê,­¡©¯uwö ¿µ\p‚‰X\[uÑ}Ûº÷7N£›o¼Œ÷l:sm‹ç¾*aîp éײnyúd«(Õ´Æ(k¯‰µ¤Æò³gž¡o© ˆsˆ€°¦ R¯’YGª<Š(¢â{$Àpàã)A9G¥RÅ ¥?ÿÔ •ºÖYðb¦û{þåÂ+ß¼î7غéf{‡nu:w┸Ìc¸|âÇÄÚ^×´s |¥èµæ)kMh ‘ÖVèæ†vÇ0w0!kôc…¶š(7”ŒÁÏslšb☸ץˆû¨0 U(cÀË®-ò ¶qQ×u8ô™cÚŒîŸ!ʉÓ)V2Jaõ(€ï?<¡]z6G»<­­±<•e”´¦ìi¢ˆP¡</ð<ïsŽøR­#Ê#ÒšžµOˆèy›j($+IfúzLD;¥¢ Dᬣ9à2€À9ˆ"К¸ßgßá#$NH¬}±Ñ8gº¯VTê D{àç Èsò<£›ç4“”™8¦T­yZ  Tú@šÅ¥<œ H¹‡D©Sý“7 ¿%/Ì$ÁËév;¯Y÷*{B°ì&Kß8Gà3S‡¨”XоQ ƒŽBŒ¡ŒÃä–¤0PääÆ2Ÿ¤DBcx­5¹stŒ!åzŽ÷D+’·Õ¾Kƒ¡TtÉ”´‹ìøžc"ðæ3Ï8Ðó÷¿[üç,šÐÅI÷Ìf2sâD¸üU½ÖÍéiü(¢„#/ ÊZ£•"Í jQH•0ÖR’…|É”}¥E”|ŸJ½†UšŽ1t¬C)Eæ…ɇ<9ö§/ Îií‹ïGΫX9¡¾æÇD`÷wž~öÌ·ž~¸SÌœëKäÄÏE¢Ì¥Ì¿zog¯ë÷QU£„"69±µD¾O’e”´Fœ%3á/*wŠÃR,#ªVI•¢gu/ íàñÞ^÷Ÿ­]¾­Î­ ÖùU'a]¹h*Ön¹óªoÞû’f¡÷Þð¦¶ü'¯ËóØ/zÚ™TIQdØz-ÇXº”Õù"¤PLJÀh½A*  ¡¦Þ¬e #~@¤J%ͬËAÓã‰äyžèï¡2lðCð*ß Ñ¦4 Ý¸zíeÛ/ûúg?õ©OývÃÜß}bõîLÏœb\&ÖdmI<œ-0Öb2KÖ÷QÝ:#a•©2¢„ÎC9®T¢[¤ô‹.GÃ{M¬ßÅ/9‚jö4*4hS!LÑ"¬(1và‚ÚŽuu®›ûäû¾´`r½à[¶láÚk¯eI÷íO¡ÿÚ¦û)ÍÆwÑʲ˜B¡ˆ=Švˆ›hÛYöÂ> 8bÌ)€¢„D15eÑZ£<…(ßâóJ™øºFØ™Ü1œ®¾hù¡h¹íÕ¿Z! ûûq?^£D\QÉó tQšÇ8š=…Yòž b±…Â`Œ+ :28lád¨À"ZÖĹNU|Uêzý‘;£ý¯ÙOVîÿì­ŸŸûµ%þ7Þ±cçŸ>×\sͯ.[¾|i³ÙÄ÷ý½Ê¶K£>ÄÜÌ ûö‡"!öctÍâúøQD臸Ô` D:"Ÿ3 šº³‰’¤_ëå•á³®ßróõAÿOÛ·oçŠ+®àÊ+¯¼ªZ«Ý¨•rAˆïûAÀàÐ •r…FFFHÓ”â$a×ÎÝþÇ—ZžS«0àùt³œ†ïှ5.ÒZæMAª¤Óõ¥ëï¼ë½/U¿–€sŽ{ï½wxïÞ½Äq|F£Ñ \.P­V £k ‹-,ÜÆâ8vY–ÉêÕ«³Z­fòRiò{_þÒëf÷í»*È²Õ QE‹äÎ9c‰¥Rú‘ž8ñܸñ¿ífø"»î¾›K/¹„G}TïÙ³góüüüÇŠ¢ÐÍf“J¥âÊå²(¥ÐZS.— ‚€8Ž)Š‚Z­ö¢~hjêó´téû€býúõî…û¯¼â ¤($ét(Uk„uwýÖ­”þË%ðÅ/~ñ³Î¹óÚíöØììì½anõ<ïµöÝn÷®0 KCCCnhhH–/_޵–]»výtxxØÏ²l_¹\Þ633óýK/½4xúé§YµjÕ+înËöíÛßâûþAü<Žã¿üòË¿pÝ?]Ç9o;‡SO=€Ûn¿íÏÊ¥ò…J©Ó{ý~{åÊ•·¬ë[wüòe½~J¹òÿjÏÿ/^‹PÌÝŸ¢IEND®B`‚spatialite_gui-2.0.0-devel/gnome_resource/spatialite-gui.desktop0000775000175000017500000000037112543275035022076 00000000000000#!/usr/bin/env xdg-open [Desktop Entry] Name=Spatialite GUI GenericName=GUI for Spatialite databases Comment=Manage Spatialite databases Exec=spatialite_gui Icon=spatialite-gui Terminal=false Type=Application Categories=Education;Geography;Science; spatialite_gui-2.0.0-devel/gnome_resource/Makefile.am0000664000175000017500000000007012543275035017607 00000000000000 EXTRA_DIST = spatialite-gui.png spatialite-gui.desktop spatialite_gui-2.0.0-devel/MalformedGeoms.cpp0000664000175000017500000017303112544026240016145 00000000000000/* / MalformedGeoms.cpp / identifying malformed geometries / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/clipbrd.h" #include "wx/colordlg.h" #if defined(_WIN32) || defined (__MINGW32__) #define FORMAT_64 "%I64d" #else #define FORMAT_64 "%lld" #endif MalformedGeom::MalformedGeom(sqlite3_int64 rowid, int severity, bool canFix, wxString & error) { // // constructor // RowId = rowid; Severity = severity; CanFix = canFix; Error = error; GeosMsg = wxT(""); Next = NULL; } MalformedGeom::MalformedGeom(sqlite3_int64 rowid, int severity, bool canFix, wxString & error, wxString & geosMsg) { // // constructor // RowId = rowid; Severity = severity; CanFix = canFix; Error = error; GeosMsg = geosMsg; Next = NULL; } MalformedGeomsList::~MalformedGeomsList() { // // destructor // MalformedGeom *pM; MalformedGeom *pMn; pM = First; while (pM) { pMn = pM->GetNext(); delete pM; pM = pMn; } } void MalformedGeomsList::AddEntity(sqlite3_int64 rowid, int severity, bool canFix, wxString & error) { // // inserting a malformed geometry into the list // MalformedGeom *p = new MalformedGeom(rowid, severity, canFix, error); if (!First) First = p; if (Last) Last->SetNext(p); Last = p; } void MalformedGeomsList::AddEntity(sqlite3_int64 rowid, int severity, bool canFix, wxString & error, wxString & geosMsg) { // // inserting a malformed geometry into the list // MalformedGeom *p = new MalformedGeom(rowid, severity, canFix, error, geosMsg); if (!First) First = p; if (Last) Last->SetNext(p); Last = p; } void MyFrame::PreRepairPolygons(wxString & table, wxString & geometry, int *count) { // // identifying candidates for Repair Polygons // int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; wxString sql; char *value; char xname[1024]; *count = 0; sql = wxT("SELECT Count(*) FROM "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" WHERE ST_GeometryType("); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(") IN ('MULTIPOLYGON', 'MULTIPOLYGON Z', "); sql += wxT("'MULTIPOLYGON M', 'MULTIPOLYGON ZM') AND "); sql += wxT("ST_IsValid("); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(") = 0"); ret = sqlite3_get_table(GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; *count = atoi(value); } } sqlite3_free_table(results); } void MyFrame::RepairPolygons(wxString & table, wxString & geometry, int *count) { // // actual implementation for Repair Polygons // int ret; char *errMsg = NULL; wxString sql; char xname[1024]; *count = 0; sql = wxT("UPDATE "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" SET "); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" = CastToMulti(ST_BuildArea(ST_RingsCutAtNodes("); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("))) WHERE ST_GeometryType("); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(") IN ('MULTIPOLYGON', 'MULTIPOLYGON Z', "); sql += wxT("'MULTIPOLYGON M', 'MULTIPOLYGON ZM') AND "); sql += wxT("ST_IsValid("); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(") = 0"); ret = sqlite3_exec(GetSqlite(), sql.ToUTF8(), NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } *count = sqlite3_changes(GetSqlite()); } MalformedGeomsList *MyFrame::FindMalformedGeoms(wxString & table, wxString & geometry, bool allowRepair) { // // identifying malformed geometries // int ret; sqlite3_stmt *stmt; wxString errCause; wxString msg; char xname[1024]; MalformedGeomsList *list = new MalformedGeomsList(); wxString sql = wxT("SELECT ROWID, "); strcpy(xname, geometry.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" FROM "); strcpy(xname, table.ToUTF8()); DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); ret = sqlite3_prepare_v2(SqliteHandle, sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) { errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); msg = wxT("SQL error: "); msg += errCause; wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return list; } ::wxBeginBusyCursor(); while (1) { // // fetching the result set rows // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { bool ok_rowid = false; bool ok_geom = false; sqlite3_int64 int_value; unsigned char *blob; int blobSize; gaiaGeomCollPtr geom; if (sqlite3_column_type(stmt, 0) == SQLITE_INTEGER) { int_value = sqlite3_column_int64(stmt, 0); ok_rowid = true; } if (sqlite3_column_type(stmt, 1) == SQLITE_BLOB) { blob = (unsigned char *) sqlite3_column_blob(stmt, 1); blobSize = sqlite3_column_bytes(stmt, 1); geom = gaiaFromSpatiaLiteBlobWkb(blob, blobSize); if (geom) ok_geom = true; } if (ok_rowid == true && ok_geom == true) { // ok, we have a valid geometry ... going to check gaiaLinestringPtr ln; gaiaPolygonPtr pg; gaiaRingPtr rng; int iv; int ib; int points; double x; double y; double z; double m; double prev_x; double prev_y; double prev_z; double first_x; double first_y; double first_z; bool can_be_fixed = false; bool not_a_line = false; bool not_a_ring = false; bool unclosed_ring = false; bool repeated = false; ln = geom->FirstLinestring; while (ln) { // checking LINESTRINGs if (ln->Points < 2) not_a_line = true; else { for (iv = 0; iv < ln->Points; iv++) { z = 0.0; m = 0.0; if (ln->DimensionModel == GAIA_XY_Z) { gaiaGetPointXYZ(ln->Coords, iv, &x, &y, &z); } else if (ln->DimensionModel == GAIA_XY_M) { gaiaGetPointXYM(ln->Coords, iv, &x, &y, &m); } else if (ln->DimensionModel == GAIA_XY_Z_M) { gaiaGetPointXYZM(ln->Coords, iv, &x, &y, &z, &m); } else { gaiaGetPoint(ln->Coords, iv, &x, &y); } if (iv > 0) { if (x == prev_x && y == prev_y && z == prev_z) repeated = true; else points++; } if (iv == 0) points = 1; prev_x = x; prev_y = y; prev_z = z; } if (points >= 2) can_be_fixed = true; } ln = ln->Next; } pg = geom->FirstPolygon; while (pg) { // checking POLYGONs rng = pg->Exterior; if (rng->Points < 3) not_a_ring = true; else { for (iv = 0; iv < rng->Points; iv++) { z = 0.0; m = 0.0; if (rng->DimensionModel == GAIA_XY_Z) { gaiaGetPointXYZ(rng->Coords, iv, &x, &y, &z); } else if (rng->DimensionModel == GAIA_XY_M) { gaiaGetPointXYM(rng->Coords, iv, &x, &y, &m); } else if (rng->DimensionModel == GAIA_XY_Z_M) { gaiaGetPointXYZM(rng->Coords, iv, &x, &y, &z, &m); } else { gaiaGetPoint(rng->Coords, iv, &x, &y); } if (iv > 0) { if (x == prev_x && y == prev_y && z == prev_z) repeated = true; else points++; } if (iv == 0) { first_x = x; first_y = y; first_z = z; points = 0; } prev_x = x; prev_y = y; prev_z = z; } if (first_x == prev_x && first_y == prev_y && first_z == prev_z) { if (rng->Points == 3) not_a_ring = true; } else unclosed_ring = true; if (points >= 4) can_be_fixed = true; } for (ib = 0; ib < pg->NumInteriors; ib++) { rng = pg->Interiors + ib; if (rng->Points < 3) not_a_ring = true; else { for (iv = 0; iv < rng->Points; iv++) { z = 0.0; m = 0.0; if (rng->DimensionModel == GAIA_XY_Z) { gaiaGetPointXYZ(rng->Coords, iv, &x, &y, &z); } else if (rng->DimensionModel == GAIA_XY_M) { gaiaGetPointXYM(rng->Coords, iv, &x, &y, &m); } else if (rng->DimensionModel == GAIA_XY_Z_M) { gaiaGetPointXYZM(rng->Coords, iv, &x, &y, &z, &m); } else { gaiaGetPoint(rng->Coords, iv, &x, &y); } if (iv > 0) { if (x == prev_x && y == prev_y && z == prev_z) repeated = true; else points++; } if (iv == 0) { first_x = x; first_y = y; first_z = z; points = 1; } prev_x = x; prev_y = y; prev_z = z; } if (first_x == prev_x && first_y == prev_y && first_z == prev_z) { if (rng->Points == 3) not_a_ring = true; } else unclosed_ring = true; if (points >= 4) can_be_fixed = true; } } pg = pg->Next; } if (allowRepair == false) can_be_fixed = false; if (not_a_line == true) { msg = wxT("Not a valid Linestring [< 2 vertices]"); list->AddEntity(int_value, 2, false, msg); } if (not_a_ring == true) { msg = wxT("Not a valid Ring [< 4 vertices]"); list->AddEntity(int_value, 2, false, msg); } if (unclosed_ring == true) { msg = wxT("Unclosed Ring"); list->AddEntity(int_value, 2, true, msg); } if (repeated == true) { msg = wxT("Repeated vertex"); list->AddEntity(int_value, 0, can_be_fixed, msg); } if (not_a_line == false && not_a_ring == false && unclosed_ring == false) { if (!gaiaIsValid_r(GetSpliteInternalCache(), geom)) { wxString geos_error = wxString::FromUTF8(gaiaGetGeosErrorMsg_r (GetSpliteInternalCache())); if (geos_error.Len() == 0) geos_error = wxString::FromUTF8(gaiaGetGeosWarningMsg_r (GetSpliteInternalCache())); msg = wxT("GEOS invalid Geometry"); list->AddEntity(int_value, 1, false, msg, geos_error); } else { wxString geos_warning = wxString::FromUTF8(gaiaGetGeosWarningMsg_r (GetSpliteInternalCache())); if (geos_warning.Len() > 0) { msg = wxT("GEOS warning"); list->AddEntity(int_value, 1, false, msg, geos_warning); } } } } if (geom) gaiaFreeGeomColl(geom); } else { errCause = wxString::FromUTF8(sqlite3_errmsg(SqliteHandle)); msg = wxT("SQL error: "); msg += errCause; wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto error; } } error: sqlite3_finalize(stmt); ::wxEndBusyCursor(); return list; } bool MalformedGeomsDialog::Create(MyFrame * parent, wxString & table, wxString & geom, MalformedGeomsList * list) { // // creating the dialog // MainFrame = parent; Table = table; Geometry = geom; List = list; if (wxDialog::Create(parent, wxID_ANY, wxT("Malformed Geometries")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void MalformedGeomsDialog::CreateControls() { // // creating individual control and setting initial values // char dummy[128]; wxString cell; MalformedGeom *pM; wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // Table and GeometryColumn wxBoxSizer *headBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(headBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *headBox = new wxStaticBox(this, wxID_STATIC, wxT("Spatial Table"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *myHeadSizer = new wxStaticBoxSizer(headBox, wxHORIZONTAL); headBoxSizer->Add(myHeadSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxBoxSizer *tblSizer = new wxBoxSizer(wxHORIZONTAL); myHeadSizer->Add(tblSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table:")); tblSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_ANY, Table, wxDefaultPosition, wxSize(200, 22), wxTE_READONLY); tblSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 2); wxBoxSizer *geoSizer = new wxBoxSizer(wxHORIZONTAL); myHeadSizer->Add(geoSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticText *geomLabel = new wxStaticText(this, wxID_STATIC, wxT("&Geometry:")); geoSizer->Add(geomLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxTextCtrl *geomCtrl = new wxTextCtrl(this, wxID_ANY, Geometry, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); geoSizer->Add(geomCtrl, 0, wxALIGN_RIGHT | wxALL, 2); wxBoxSizer *statSizer = new wxBoxSizer(wxHORIZONTAL); myHeadSizer->Add(statSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticText *statLabel = new wxStaticText(this, wxID_STATIC, wxT("&Status:")); statSizer->Add(statLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxString tableStatus = wxT("clean"); wxColour backStatus(255, 255, 255); int maxSeverity = -1; pM = List->GetFirst(); while (pM) { switch (pM->GetSeverity()) { case 0: if (maxSeverity < 0) { tableStatus = wxT("Notice"); backStatus = wxColour(192, 255, 192); maxSeverity = 0; } break; case 1: if (maxSeverity < 1) { tableStatus = wxT("Warning"); backStatus = wxColour(255, 255, 192); maxSeverity = 1; } break; case 2: if (maxSeverity < 2) { tableStatus = wxT("Error"); backStatus = wxColour(255, 192, 192); maxSeverity = 2; } break; }; pM = pM->GetNext(); } wxTextCtrl *statCtrl = new wxTextCtrl(this, wxID_ANY, tableStatus, wxDefaultPosition, wxSize(60, 22), wxTE_READONLY); statCtrl->SetBackgroundColour(backStatus); statSizer->Add(statCtrl, 0, wxALIGN_RIGHT | wxALL, 2); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("Malformed Geometries"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *myGridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(myGridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); myGridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_MALFORMED_GRID, wxDefaultPosition, wxSize(550, 300)); int count = 0; pM = List->GetFirst(); while (pM) { // counting how many lines are there count++; pM = pM->GetNext(); } GridCtrl->CreateGrid(count, 5); GridCtrl->SetColLabelValue(0, wxT("ROWID")); GridCtrl->SetColLabelValue(1, wxT("Severity")); GridCtrl->SetColLabelValue(2, wxT("Repair")); GridCtrl->SetColLabelValue(3, wxT("Description")); GridCtrl->SetColLabelValue(4, wxT("GEOS report")); GridCtrl->SetRowLabelValue(0, wxT("1")); count = 0; pM = List->GetFirst(); while (pM) { // feeding grid rows sprintf(dummy, "%d", count + 1); cell = wxString::FromUTF8(dummy); GridCtrl->SetRowLabelValue(count, cell); sprintf(dummy, FORMAT_64, pM->GetRowId()); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(count, 0, cell); switch (pM->GetSeverity()) { case 0: GridCtrl->SetCellValue(count, 1, wxT("Notice")); if (pM->CanBeFixed() == true) { GridCtrl->SetCellValue(count, 2, wxT("Yes")); GridCtrl->SetCellBackgroundColour(count, 2, wxColour(192, 255, 192)); } break; case 1: GridCtrl->SetCellValue(count, 1, wxT("Warning")); GridCtrl->SetCellBackgroundColour(count, 0, wxColour(255, 255, 192)); GridCtrl->SetCellBackgroundColour(count, 1, wxColour(255, 255, 192)); if (pM->CanBeFixed() == true) { GridCtrl->SetCellValue(count, 2, wxT("Yes")); GridCtrl->SetCellBackgroundColour(count, 2, wxColour(192, 255, 192)); } GridCtrl->SetCellBackgroundColour(count, 3, wxColour(255, 255, 192)); GridCtrl->SetCellBackgroundColour(count, 4, wxColour(255, 255, 192)); break; case 2: GridCtrl->SetCellValue(count, 1, wxT("Error")); GridCtrl->SetCellBackgroundColour(count, 0, wxColour(255, 192, 192)); GridCtrl->SetCellBackgroundColour(count, 1, wxColour(255, 192, 192)); if (pM->CanBeFixed() == true) { GridCtrl->SetCellValue(count, 2, wxT("Yes")); GridCtrl->SetCellBackgroundColour(count, 2, wxColour(192, 255, 192)); } GridCtrl->SetCellBackgroundColour(count, 3, wxColour(255, 192, 192)); GridCtrl->SetCellBackgroundColour(count, 4, wxColour(255, 192, 192)); break; }; GridCtrl->SetCellValue(count, 3, pM->GetError()); GridCtrl->SetCellValue(count, 4, pM->GetGeosMsg()); count++; pM = pM->GetNext(); } GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // CLOSE button wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *close = new wxButton(this, ID_MALFORMED_CLOSE, wxT("&Close")); okCancelBox->Add(close, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); okCancelBox->AddSpacer(20); okCancelBox->AddSpacer(20); okCancelBox->AddSpacer(20); bool can_repair = false; pM = List->GetFirst(); while (pM) { if (pM->CanBeFixed() == true) can_repair = true; pM = pM->GetNext(); } wxButton *repair = new wxButton(this, ID_MALFORMED_REPAIR, wxT("&Repair")); repair->Enable(can_repair); okCancelBox->Add(repair, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(ID_MALFORMED_CLOSE, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MalformedGeomsDialog::OnClose); Connect(ID_MALFORMED_REPAIR, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MalformedGeomsDialog::OnRepair); Connect(ID_MALFORMED_GRID, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & MalformedGeomsDialog::OnRightClick); Connect(ID_MALFORMED_CLEAR, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MalformedGeomsDialog::OnCmdClearSelection); Connect(ID_MALFORMED_ALL, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MalformedGeomsDialog::OnCmdSelectAll); Connect(ID_MALFORMED_ROW, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MalformedGeomsDialog::OnCmdSelectRow); Connect(ID_MALFORMED_COLUMN, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MalformedGeomsDialog::OnCmdSelectColumn); Connect(ID_MALFORMED_COPY, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MalformedGeomsDialog::OnCmdCopy); Connect(ID_MALFORMED_BLOB, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MalformedGeomsDialog::OnCmdBlob); } void MalformedGeomsDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentEvtRow = event.GetRow(); CurrentEvtColumn = event.GetCol(); menuItem = new wxMenuItem(&menu, ID_MALFORMED_BLOB, wxT("BLOB &explore")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, ID_MALFORMED_CLEAR, wxT("&Clear selection")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, ID_MALFORMED_ALL, wxT("Select &all")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, ID_MALFORMED_ROW, wxT("Select &row")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, ID_MALFORMED_COLUMN, wxT("&Select column")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, ID_MALFORMED_COPY, wxT("&Copy")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void MalformedGeomsDialog::OnCmdBlob(wxCommandEvent & WXUNUSED(event)) { // // exploring some BLOB value // int ret; sqlite3_stmt *stmt; wxString errCause; wxString msg; unsigned char *blob = NULL; unsigned char *db_blob; int blobSize = 0; char xname[1024]; wxString value = GridCtrl->GetCellValue(CurrentEvtRow, 0); wxString sql = wxT("SELECT "); strcpy(xname, Geometry.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" FROM "); strcpy(xname, Table.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" WHERE ROWID = "); sql += value; ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) { errCause = wxString::FromUTF8(sqlite3_errmsg(MainFrame->GetSqlite())); msg = wxT("SQL error: "); msg += errCause; wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { if (sqlite3_column_type(stmt, 0) == SQLITE_BLOB) { db_blob = (unsigned char *) sqlite3_column_blob(stmt, 0); blobSize = sqlite3_column_bytes(stmt, 0); blob = new unsigned char[blobSize]; memcpy(blob, db_blob, blobSize); } } else { errCause = wxString::FromUTF8(sqlite3_errmsg(MainFrame->GetSqlite())); msg = wxT("SQL error: "); msg += errCause; wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto error; } } error: sqlite3_finalize(stmt); if (!blob) return; BlobExplorerDialog dlg; dlg.Create(MainFrame, blobSize, blob); dlg.ShowModal(); delete[]blob; } void MalformedGeomsDialog::OnCmdClearSelection(wxCommandEvent & WXUNUSED(event)) { // // clearing current selection // GridCtrl->ClearSelection(); } void MalformedGeomsDialog::OnCmdSelectAll(wxCommandEvent & WXUNUSED(event)) { // // selecting all // GridCtrl->SelectAll(); } void MalformedGeomsDialog::OnCmdSelectRow(wxCommandEvent & WXUNUSED(event)) { // // selecting the current row // GridCtrl->SelectRow(CurrentEvtRow); } void MalformedGeomsDialog::OnCmdSelectColumn(wxCommandEvent & WXUNUSED(event)) { // // selecting column // GridCtrl->SelectCol(CurrentEvtColumn); } void MalformedGeomsDialog::OnCmdCopy(wxCommandEvent & WXUNUSED(event)) { // // copying the selection into the clipboard // wxString copyData; int row; int col; bool newRow; bool firstRow = true; for (row = 0; row < GridCtrl->GetNumberRows(); row++) { newRow = true; for (col = 0; col < GridCtrl->GetNumberCols(); col++) { if (GridCtrl->IsInSelection(row, col) == true) { // ok, this cell is included into the selection to copy if (firstRow == true) { newRow = false; firstRow = false; } else if (newRow == true) { newRow = false; copyData += wxT("\n"); } else copyData += wxT("\t"); copyData += GridCtrl->GetCellValue(row, col); } } } if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(copyData)); wxTheClipboard->Close(); } } void MalformedGeomsDialog::OnRepair(wxCommandEvent & WXUNUSED(event)) { // // repairing malformed geometries // int ret; char *errMsg = NULL; sqlite3_stmt *stmt; wxString errCause; wxString msg; wxString sql; MalformedGeom *pM; char xname[1024]; ::wxBeginBusyCursor(); ret = sqlite3_exec(MainFrame->GetSqlite(), "BEGIN", NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQL error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto clean_up; } sql = wxT("UPDATE "); strcpy(xname, Table.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" SET "); strcpy(xname, Geometry.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" = SanitizeGeometry("); strcpy(xname, Geometry.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(") WHERE ROWID = ?"); ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) { errCause = wxString::FromUTF8(sqlite3_errmsg(MainFrame->GetSqlite())); msg = wxT("SQL error: "); msg += errCause; wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto clean_up; } pM = List->GetFirst(); while (pM) { if (pM->CanBeFixed() == true) { // binding query params sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_int64(stmt, 1, pM->GetRowId()); ret = sqlite3_step(stmt); if (ret == SQLITE_DONE || ret == SQLITE_ROW) ; else { wxString err = wxString::FromUTF8(sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQL error:") + err, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_finalize(stmt); goto clean_up; } } pM = pM->GetNext(); } sqlite3_finalize(stmt); ret = sqlite3_exec(MainFrame->GetSqlite(), "COMMIT", NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQL error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto clean_up; } ::wxEndBusyCursor(); wxMessageBox(wxT("Repair completed successfully"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxDialog::EndModal(wxID_OK); return; clean_up: ret = sqlite3_exec(MainFrame->GetSqlite(), "EOLLBACK", NULL, 0, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQL error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } ::wxEndBusyCursor(); wxMessageBox(wxT ("Repair aborted\n\n\na ROLLBACK was automatically performed"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } void MalformedGeomsDialog::OnClose(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } DbStatusDialog::DbStatusDialog() { // constructor MainFrame = NULL; DynamicIds = NULL; DynamicModes = NULL; RefreshTimer = NULL; } DbStatusDialog::~DbStatusDialog() { // destructor if (RefreshTimer) { RefreshTimer->Stop(); delete RefreshTimer; } if (DynamicIds) delete[]DynamicIds; if (DynamicModes) delete[]DynamicModes; } bool DbStatusDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; if (wxDialog::Create(parent, wxID_ANY, wxT("DB Status Infos")) == false) return false; DynamicIds = new int[20]; DynamicModes = new int[20]; for (int i = 0; i < 20; i++) { DynamicIds[i] = -1; DynamicModes[i] = ModeNone; } // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); RefreshTimer = new wxTimer(this, ID_DB_STATUS_TIMER); RefreshTimer->Start(250, wxTIMER_ONE_SHOT); return true; } void DbStatusDialog::CreateControls() { // // creating individual control and setting initial values // sqlite3 *sqlite = MainFrame->GetSqlite(); char dummy[128]; int iCur; int iHiwtr; wxString cell; wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // a GRID to show results wxBoxSizer *gridBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gridBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *gridBox = new wxStaticBox(this, wxID_STATIC, wxT("DB Status Infos"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *myGridSizer = new wxStaticBoxSizer(gridBox, wxVERTICAL); gridBoxSizer->Add(myGridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gridSizer = new wxBoxSizer(wxHORIZONTAL); myGridSizer->Add(gridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); GridCtrl = new wxGrid(this, ID_DB_STATUS_GRID, wxDefaultPosition, wxSize(630, 400)); GridCtrl->CreateGrid(20, 4); GridCtrl->SetColLabelValue(0, wxT("")); GridCtrl->SetColLabelValue(1, wxT("Current")); GridCtrl->SetColLabelValue(2, wxT("Max")); GridCtrl->SetColLabelValue(3, wxT("Notes")); GridCtrl->SetRowLabelValue(0, wxT("1")); GridCtrl->SetCellValue(0, 0, wxT("Memory Used")); DynamicModes[0] = ModeStatusBothBytes; DynamicIds[0] = SQLITE_STATUS_MEMORY_USED; iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_MEMORY_USED, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(0, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 0, 1); sprintf(dummy, "%d bytes", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(0, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 0, 2); GridCtrl->SetCellValue(0, 3, wxT ("amount of memory checked out using sqlite3_malloc()")); GridCtrl->SetCellBackgroundColour(0, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(1, wxT("2")); DynamicModes[1] = ModeStatusSecondBytes; DynamicIds[1] = SQLITE_STATUS_MALLOC_SIZE; GridCtrl->SetCellValue(1, 0, wxT("Largest Allocation")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_MALLOC_SIZE, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(1, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 1, 2); GridCtrl->SetCellValue(1, 3, wxT("largest memory allocation request handed")); GridCtrl->SetCellBackgroundColour(1, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(2, wxT("3")); DynamicModes[2] = ModeStatusBoth; DynamicIds[2] = SQLITE_STATUS_MALLOC_COUNT; GridCtrl->SetCellValue(2, 0, wxT("Number of Outstanding Allocations")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_MALLOC_COUNT, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(2, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 2, 1); sprintf(dummy, "%d", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(2, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 2, 2); GridCtrl->SetCellValue(2, 3, wxT ("number of separate memory allocations currently checked out")); GridCtrl->SetCellBackgroundColour(2, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(3, wxT("4")); DynamicModes[3] = ModeStatusBoth; DynamicIds[3] = SQLITE_STATUS_PAGECACHE_USED; GridCtrl->SetCellValue(3, 0, wxT("Number of Page Cache Pages Used")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_PAGECACHE_USED, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(3, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 3, 1); sprintf(dummy, "%d", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(3, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 3, 2); GridCtrl->SetCellValue(3, 3, wxT ("number of pages used out of the pagecache memory allocato")); GridCtrl->SetCellBackgroundColour(3, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(4, wxT("5")); DynamicModes[4] = ModeStatusBothBytes; DynamicIds[4] = SQLITE_STATUS_PAGECACHE_OVERFLOW; GridCtrl->SetCellValue(4, 0, wxT("Number of Page Cache Overflow Bytes")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_PAGECACHE_OVERFLOW, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(4, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 4, 1); sprintf(dummy, "%d bytes", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(4, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 4, 2); GridCtrl->SetCellValue(4, 3, wxT ("page cache allocations which could not be satisfied and were forced to overflow")); GridCtrl->SetCellBackgroundColour(4, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(5, wxT("6")); DynamicModes[5] = ModeStatusSecondBytes; DynamicIds[5] = SQLITE_STATUS_PAGECACHE_SIZE; GridCtrl->SetCellValue(5, 0, wxT("Largest Page Cache Allocation")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_PAGECACHE_SIZE, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(5, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 5, 2); GridCtrl->SetCellValue(5, 3, wxT ("largest memory allocation request handed to pagecache memory allocator")); GridCtrl->SetCellBackgroundColour(5, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(6, wxT("7")); DynamicModes[6] = ModeStatusBothBytes; DynamicIds[6] = SQLITE_STATUS_SCRATCH_USED; GridCtrl->SetCellValue(6, 0, wxT("Number of Scratch Allocations Used")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_SCRATCH_USED, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(6, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 6, 1); sprintf(dummy, "%d bytes", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(6, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 6, 2); GridCtrl->SetCellValue(6, 3, wxT ("number of allocations used out of the scratch memory allocator")); GridCtrl->SetCellBackgroundColour(6, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(7, wxT("8")); DynamicModes[7] = ModeStatusBothBytes; DynamicIds[7] = SQLITE_STATUS_SCRATCH_OVERFLOW; GridCtrl->SetCellValue(7, 0, wxT("Number of Scratch Overflow Bytes")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_SCRATCH_OVERFLOW, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(7, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 7, 1); sprintf(dummy, "%d bytes", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(7, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 7, 2); GridCtrl->SetCellValue(7, 3, wxT ("scratch memory allocations which could not be satisfied and were forced to overflow")); GridCtrl->SetCellBackgroundColour(7, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(8, wxT("9")); DynamicModes[8] = ModeStatusSecondBytes; DynamicIds[8] = SQLITE_STATUS_SCRATCH_SIZE; GridCtrl->SetCellValue(8, 0, wxT("Largest Scratch Allocation")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_SCRATCH_SIZE, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(8, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 8, 2); GridCtrl->SetCellValue(8, 3, wxT ("largest memory allocation request handed to scratch memory allocator")); GridCtrl->SetCellBackgroundColour(8, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(9, wxT("10")); DynamicModes[9] = ModeStatusBoth; DynamicIds[9] = SQLITE_STATUS_PARSER_STACK; GridCtrl->SetCellValue(9, 0, wxT("Deepest Parser Stack")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_PARSER_STACK, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(9, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 9, 1); sprintf(dummy, "%d", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(9, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 9, 2); GridCtrl->SetCellValue(9, 3, wxT("deepest parser stack")); GridCtrl->SetCellBackgroundColour(9, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(10, wxT("11")); GridCtrl->SetCellValue(10, 0, wxT("Lookaside Slots Used")); iHiwtr = iCur = -1; #ifdef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED DynamicModes[10] = ModeDbStatusBoth; DynamicIds[10] = SQLITE_DBSTATUS_LOOKASIDE_USED; sqlite3_db_status(sqlite, SQLITE_DBSTATUS_LOOKASIDE_USED, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(10, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 10, 1); sprintf(dummy, "%d", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(10, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 10, 2); #else GridCtrl->SetCellValue(10, 1, wxT("n.a.")); GridCtrl->SetCellValue(10, 2, wxT("n.a.")); #endif GridCtrl->SetCellValue(10, 3, wxT ("number of lookaside memory slots currently checked out")); GridCtrl->SetCellBackgroundColour(10, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(11, wxT("12")); GridCtrl->SetCellValue(11, 0, wxT("Successful lookaside attempts")); iHiwtr = iCur = -1; #ifdef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT DynamicModes[11] = ModeDbStatusSecond; DynamicIds[11] = SQLITE_DBSTATUS_LOOKASIDE_HIT; sqlite3_db_status(sqlite, SQLITE_DBSTATUS_LOOKASIDE_HIT, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(11, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 11, 2); #else GridCtrl->SetCellValue(11, 2, wxT("n.a.")); #endif GridCtrl->SetCellValue(11, 3, wxT ("number malloc attempts that were satisfied using lookaside memory")); GridCtrl->SetCellBackgroundColour(11, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(12, wxT("13")); GridCtrl->SetCellValue(12, 0, wxT("Lookaside failures due to size")); iHiwtr = iCur = -1; #ifdef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE DynamicModes[12] = ModeDbStatusSecond; DynamicIds[12] = SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE; sqlite3_db_status(sqlite, SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(12, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 12, 2); #else GridCtrl->SetCellValue(12, 2, wxT("n.a.")); #endif GridCtrl->SetCellValue(12, 3, wxT ("malloc attempts failed due to the amount larger than the lookaside slot size")); GridCtrl->SetCellBackgroundColour(12, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(13, wxT("14")); GridCtrl->SetCellValue(13, 0, wxT("Lookaside failures due to OOM")); iHiwtr = iCur = -1; #ifdef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL DynamicModes[13] = ModeDbStatusSecond; DynamicIds[13] = SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL; sqlite3_db_status(sqlite, SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(13, 2, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 13, 2); #else GridCtrl->SetCellValue(13, 2, wxT("n.a.")); #endif GridCtrl->SetCellValue(13, 3, wxT ("malloc attempts failed due to all lookaside memory already being in use")); GridCtrl->SetCellBackgroundColour(13, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(14, wxT("15")); DynamicModes[14] = ModeStatusFirst; DynamicIds[14] = SQLITE_STATUS_PARSER_STACK; GridCtrl->SetCellValue(14, 0, wxT("Pager Heap Usage")); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_PARSER_STACK, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(14, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 14, 1); GridCtrl->SetCellValue(14, 3, wxT ("heap memory used by all pager caches associated with the database connection")); GridCtrl->SetCellBackgroundColour(14, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(15, wxT("16")); GridCtrl->SetCellValue(15, 0, wxT("Schema Heap Usage")); iHiwtr = iCur = -1; #ifdef HAVE_DECL_SQLITE_DBSTATUS_SCHEMA_USED DynamicModes[15] = ModeDbStatusFirstBytes; DynamicIds[15] = SQLITE_DBSTATUS_SCHEMA_USED; sqlite3_db_status(sqlite, SQLITE_DBSTATUS_SCHEMA_USED, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(15, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 15, 1); #else GridCtrl->SetCellValue(15, 2, wxT("n.a.")); #endif GridCtrl->SetCellValue(15, 3, wxT ("heap memory used to store the schema for all databases associated with the connection")); GridCtrl->SetCellBackgroundColour(15, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(16, wxT("17")); GridCtrl->SetCellValue(16, 0, wxT("Statement Heap/Lookaside Usage")); iHiwtr = iCur = -1; #ifdef HAVE_DECL_SQLITE_DBSTATUS_STMT_USED DynamicModes[16] = ModeDbStatusFirstBytes; DynamicIds[16] = SQLITE_DBSTATUS_STMT_USED; sqlite3_db_status(sqlite, SQLITE_DBSTATUS_STMT_USED, &iCur, &iHiwtr, 0); sprintf(dummy, "%d bytes", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(16, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 16, 1); #else GridCtrl->SetCellValue(16, 2, wxT("n.a.")); #endif GridCtrl->SetCellValue(16, 3, wxT ("heap and lookaside memory used by all prepared statements associated with the database connection")); GridCtrl->SetCellBackgroundColour(16, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(17, wxT("18")); GridCtrl->SetCellValue(17, 0, wxT("Page cache hits")); iHiwtr = iCur = -1; #ifdef HAVE_DECL_SQLITE_DBSTATUS_CACHE_HIT DynamicModes[17] = ModeDbStatusFirst; DynamicIds[17] = SQLITE_DBSTATUS_CACHE_HIT; sqlite3_db_status(sqlite, SQLITE_DBSTATUS_CACHE_HIT, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(17, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 17, 1); #else GridCtrl->SetCellValue(17, 2, wxT("n.a.")); #endif GridCtrl->SetCellValue(17, 3, wxT("number of pager cache hits that have occurred")); GridCtrl->SetCellBackgroundColour(17, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(18, wxT("19")); GridCtrl->SetCellValue(18, 0, wxT("Page cache misses")); iHiwtr = iCur = -1; #ifdef HAVE_DECL_SQLITE_DBSTATUS_CACHE_MISS DynamicModes[18] = ModeDbStatusFirst; DynamicIds[18] = SQLITE_DBSTATUS_CACHE_MISS; sqlite3_db_status(sqlite, SQLITE_DBSTATUS_CACHE_MISS, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(18, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 18, 1); #else GridCtrl->SetCellValue(18, 2, wxT("n.a.")); #endif GridCtrl->SetCellValue(18, 3, wxT ("number of pager cache misses that have occurred")); GridCtrl->SetCellBackgroundColour(18, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelValue(19, wxT("20")); GridCtrl->SetCellValue(19, 0, wxT("Page cache writes")); iHiwtr = iCur = -1; #ifdef HAVE_DECL_SQLITE_DBSTATUS_CACHE_WRITE DynamicModes[19] = ModeDbStatusFirst; DynamicIds[19] = SQLITE_DBSTATUS_CACHE_WRITE; sqlite3_db_status(sqlite, SQLITE_DBSTATUS_CACHE_WRITE, &iCur, &iHiwtr, 0); sprintf(dummy, "%d", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(19, 1, cell); GridCtrl->SetCellAlignment(wxALIGN_RIGHT, 19, 1); #else GridCtrl->SetCellValue(19, 2, wxT("n.a.")); #endif GridCtrl->SetCellValue(19, 3, wxT ("number of dirty cache entries that have been written to disk")); GridCtrl->SetCellBackgroundColour(19, 3, wxColour(208, 208, 208)); GridCtrl->SetRowLabelSize(wxGRID_AUTOSIZE); GridCtrl->AutoSize(); GridCtrl->EnableEditing(false); gridSizer->Add(GridCtrl, 0, wxALIGN_RIGHT | wxALL, 0); // CLOSE button wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *close = new wxButton(this, ID_DB_STATUS_CLOSE, wxT("&Close")); okCancelBox->Add(close, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); okCancelBox->AddSpacer(20); okCancelBox->AddSpacer(20); okCancelBox->AddSpacer(20); wxButton *reset = new wxButton(this, ID_DB_STATUS_RESET, wxT("&Reset Statistics")); okCancelBox->Add(reset, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // appends event handler for OK button Connect(ID_DB_STATUS_CLOSE, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DbStatusDialog::OnClose); Connect(ID_DB_STATUS_RESET, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DbStatusDialog::OnReset); Connect(ID_DB_STATUS_GRID, wxEVT_GRID_CELL_RIGHT_CLICK, (wxObjectEventFunction) & DbStatusDialog::OnRightClick); Connect(ID_DB_STATUS_CLEAR, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & DbStatusDialog::OnCmdClearSelection); Connect(ID_DB_STATUS_ALL, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & DbStatusDialog::OnCmdSelectAll); Connect(ID_DB_STATUS_ROW, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & DbStatusDialog::OnCmdSelectRow); Connect(ID_DB_STATUS_COLUMN, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & DbStatusDialog::OnCmdSelectColumn); Connect(ID_DB_STATUS_COPY, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & DbStatusDialog::OnCmdCopy); // // setting up a Timer event handler for Refresh // Connect(ID_DB_STATUS_TIMER, wxEVT_TIMER, wxTimerEventHandler(DbStatusDialog::OnRefreshTimer), NULL, this); } void DbStatusDialog::OnRightClick(wxGridEvent & event) { // // right click on some cell [mouse action] // wxMenu menu; wxMenuItem *menuItem; wxPoint pt = event.GetPosition(); CurrentEvtRow = event.GetRow(); CurrentEvtColumn = event.GetCol(); menuItem = new wxMenuItem(&menu, ID_DB_STATUS_CLEAR, wxT("&Clear selection")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, ID_DB_STATUS_ALL, wxT("Select &all")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, ID_DB_STATUS_ROW, wxT("Select &row")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, ID_DB_STATUS_COLUMN, wxT("&Select column")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, ID_DB_STATUS_COPY, wxT("&Copy")); menu.Append(menuItem); GridCtrl->PopupMenu(&menu, pt); } void DbStatusDialog::OnCmdClearSelection(wxCommandEvent & WXUNUSED(event)) { // // clearing current selection // GridCtrl->ClearSelection(); } void DbStatusDialog::OnCmdSelectAll(wxCommandEvent & WXUNUSED(event)) { // // selecting all // GridCtrl->SelectAll(); } void DbStatusDialog::OnCmdSelectRow(wxCommandEvent & WXUNUSED(event)) { // // selecting the current row // GridCtrl->SelectRow(CurrentEvtRow); } void DbStatusDialog::OnCmdSelectColumn(wxCommandEvent & WXUNUSED(event)) { // // selecting column // GridCtrl->SelectCol(CurrentEvtColumn); } void DbStatusDialog::OnCmdCopy(wxCommandEvent & WXUNUSED(event)) { // // copying the selection into the clipboard // wxString copyData; int row; int col; bool newRow; bool firstRow = true; for (row = 0; row < GridCtrl->GetNumberRows(); row++) { newRow = true; for (col = 0; col < GridCtrl->GetNumberCols(); col++) { if (GridCtrl->IsInSelection(row, col) == true) { // ok, this cell is included into the selection to copy if (firstRow == true) { newRow = false; firstRow = false; } else if (newRow == true) { newRow = false; copyData += wxT("\n"); } else copyData += wxT("\t"); copyData += GridCtrl->GetCellValue(row, col); } } } if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(copyData)); wxTheClipboard->Close(); } } void DbStatusDialog::OnReset(wxCommandEvent & WXUNUSED(event)) { // // resetting the DB Status counters // sqlite3 *sqlite = MainFrame->GetSqlite(); int iCur; int iHiwtr; sqlite3_status(SQLITE_STATUS_MEMORY_USED, &iCur, &iHiwtr, 1); sqlite3_status(SQLITE_STATUS_MALLOC_SIZE, &iCur, &iHiwtr, 1); sqlite3_status(SQLITE_STATUS_MALLOC_COUNT, &iCur, &iHiwtr, 1); sqlite3_status(SQLITE_STATUS_PAGECACHE_USED, &iCur, &iHiwtr, 1); sqlite3_status(SQLITE_STATUS_PAGECACHE_OVERFLOW, &iCur, &iHiwtr, 1); sqlite3_status(SQLITE_STATUS_PAGECACHE_SIZE, &iCur, &iHiwtr, 1); sqlite3_status(SQLITE_STATUS_SCRATCH_USED, &iCur, &iHiwtr, 1); sqlite3_status(SQLITE_STATUS_SCRATCH_OVERFLOW, &iCur, &iHiwtr, 1); sqlite3_status(SQLITE_STATUS_SCRATCH_SIZE, &iCur, &iHiwtr, 1); sqlite3_status(SQLITE_STATUS_PARSER_STACK, &iCur, &iHiwtr, 1); #ifdef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED sqlite3_db_status(sqlite, SQLITE_DBSTATUS_LOOKASIDE_USED, &iCur, &iHiwtr, 1); #endif #ifdef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT sqlite3_db_status(sqlite, SQLITE_DBSTATUS_LOOKASIDE_HIT, &iCur, &iHiwtr, 1); #endif #ifdef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE sqlite3_db_status(sqlite, SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE, &iCur, &iHiwtr, 1); #endif #ifdef HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL sqlite3_db_status(sqlite, SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL, &iCur, &iHiwtr, 1); #endif sqlite3_db_status(sqlite, SQLITE_STATUS_PARSER_STACK, &iCur, &iHiwtr, 1); #ifdef HAVE_DECL_SQLITE_DBSTATUS_SCHEMA_USED sqlite3_db_status(sqlite, SQLITE_DBSTATUS_SCHEMA_USED, &iCur, &iHiwtr, 1); #endif #ifdef HAVE_DECL_SQLITE_DBSTATUS_STMT_USED sqlite3_db_status(sqlite, SQLITE_DBSTATUS_STMT_USED, &iCur, &iHiwtr, 1); #endif #ifdef HAVE_DECL_SQLITE_DBSTATUS_CACHE_HIT sqlite3_db_status(sqlite, SQLITE_DBSTATUS_CACHE_HIT, &iCur, &iHiwtr, 1); #endif #ifdef HAVE_DECL_SQLITE_DBSTATUS_CACHE_MISS sqlite3_db_status(sqlite, SQLITE_DBSTATUS_CACHE_MISS, &iCur, &iHiwtr, 1); #endif #ifdef HAVE_DECL_SQLITE_DBSTATUS_CACHE_WRITE sqlite3_db_status(sqlite, SQLITE_DBSTATUS_CACHE_WRITE, &iCur, &iHiwtr, 1); #endif } void DbStatusDialog::OnRefreshTimer(wxTimerEvent & WXUNUSED(event)) { // // Refreshing the Graph and the Statistics // sqlite3 *sqlite = MainFrame->GetSqlite(); int iCur; int iHiwtr; char dummy[128]; wxString cell; for (int i = 0; i < 20; i++) { // updating Statistics if (DynamicIds[i] > 0) { switch (DynamicModes[i]) { case ModeStatusBoth: case ModeStatusFirst: case ModeStatusSecond: case ModeStatusBothBytes: case ModeStatusFirstBytes: case ModeStatusSecondBytes: sqlite3_status(DynamicIds[i], &iCur, &iHiwtr, 0); break; case ModeDbStatusBoth: case ModeDbStatusFirst: case ModeDbStatusSecond: case ModeDbStatusBothBytes: case ModeDbStatusFirstBytes: case ModeDbStatusSecondBytes: sqlite3_db_status(sqlite, DynamicIds[i], &iCur, &iHiwtr, 0); break; }; switch (DynamicModes[i]) { case ModeStatusBoth: case ModeDbStatusBoth: sprintf(dummy, "%d", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(i, 1, cell); sprintf(dummy, "%d", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(i, 2, cell); break; case ModeStatusFirst: case ModeDbStatusFirst: sprintf(dummy, "%d", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(i, 1, cell); break; case ModeStatusSecond: case ModeDbStatusSecond: sprintf(dummy, "%d", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(i, 2, cell); break; case ModeStatusBothBytes: case ModeDbStatusBothBytes: sprintf(dummy, "%d bytes", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(i, 1, cell); sprintf(dummy, "%d bytes", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(i, 2, cell); break; case ModeStatusFirstBytes: case ModeDbStatusFirstBytes: sprintf(dummy, "%d bytes", iCur); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(i, 1, cell); break; case ModeStatusSecondBytes: case ModeDbStatusSecondBytes: sprintf(dummy, "%d bytes", iHiwtr); cell = wxString::FromUTF8(dummy); GridCtrl->SetCellValue(i, 2, cell); break; }; } } // // restarting the refresh timer // if (!RefreshTimer) RefreshTimer = new wxTimer(this, ID_DB_STATUS_TIMER); else RefreshTimer->Stop(); RefreshTimer->Start(250, wxTIMER_ONE_SHOT); } void DbStatusDialog::OnClose(wxCommandEvent & WXUNUSED(event)) { // // all done: // //wxDialog::EndModal(wxID_OK); Destroy(); } spatialite_gui-2.0.0-devel/NEWS0000664000175000017500000000000012543275035013227 00000000000000spatialite_gui-2.0.0-devel/BlobExplorer.cpp0000664000175000017500000025302312544026251015645 00000000000000/* / BlobExplorer.cpp / a dialog to explore a BLOB value / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/mstream.h" #include "wx/clipbrd.h" #include "wx/tokenzr.h" #include "wx/spinctrl.h" #include "rasterlite2/rasterlite2.h" #include "rasterlite2/rl2svg.h" #include "rasterlite2/rl2graphics.h" BlobExplorerDialog::BlobExplorerDialog(MyFrame * parent, int blob_size, unsigned char *blob) { // // constructor; just calls Create() // Create(parent, blob_size, blob); } bool BlobExplorerDialog::Create(MyFrame * parent, int blob_size, unsigned char *blob) { // // creating the dialog // MainFrame = parent; BlobSize = blob_size; Blob = blob; BlobType = gaiaGuessBlobType(Blob, BlobSize); IsTextFont = false; Geometry = NULL; IsSVG = false; XMLDocument = wxT(""); XMLIndented = wxT(""); Image = NULL; SVGrelative = true; SVGprecision = -1; KMLprecision = -1; GMLv2v3 = true; GMLprecision = -1; GeoJSONoptions = 0; GeoJSONprecision = -1; rl2RasterPtr raster = NULL; unsigned char *rgbaArray = NULL; int rgbaSize; unsigned int width; unsigned int height; unsigned char sample_type; unsigned char pixel_type; unsigned char num_bands; if (BlobType == GAIA_GEOMETRY_BLOB) Geometry = gaiaFromSpatiaLiteBlobWkb(Blob, BlobSize); else if (BlobType == GAIA_GPB_BLOB) Geometry = gaiaFromGeoPackageGeometryBlob(Blob, BlobSize); else if (BlobType == GAIA_XML_BLOB) { #ifdef ENABLE_LIBXML2 /* only if LIBXML2 is enabled */ char *xml = gaiaXmlTextFromBlob(Blob, BlobSize, -1); if (xml != NULL) { XMLDocument = wxString::FromUTF8(xml); free(xml); } xml = gaiaXmlTextFromBlob(Blob, BlobSize, 4); if (xml != NULL) { XMLIndented = wxString::FromUTF8(xml); free(xml); } if (gaiaIsSvgXmlBlob(Blob, BlobSize)) { // handling the SVG preview char *svg = gaiaXmlTextFromBlob(Blob, BlobSize, 0); int svg_sz = strlen(svg); IsSVG = true; SvgSize = svg_sz; rl2SvgPtr svg_handle = rl2_create_svg((const unsigned char *) svg, svg_sz); if (svg_handle != NULL) { if (rl2_get_svg_size(svg_handle, &SvgWidth, &SvgHeight) == RL2_OK) { double w = SvgWidth; double h = SvgHeight; if (w < 560.0 && h < 300.0) { while (w < 560.0 && h < 300.0) { // rescaling w *= 1.0001; h *= 1.0001; } } else { while (w > 560.0 || h > 300.0) { // rescaling w *= 0.9; h *= 0.9; } } double sz = w; if (h > sz) sz = h; raster = rl2_raster_from_svg(svg_handle, sz); } rl2_destroy_svg(svg_handle); } free(svg); } #endif /* end LIBXML2 conditionals */ } else { switch (BlobType) { case GAIA_JPEG_BLOB: case GAIA_EXIF_BLOB: case GAIA_EXIF_GPS_BLOB: raster = rl2_raster_from_jpeg(Blob, BlobSize); break; case GAIA_PNG_BLOB: raster = rl2_raster_from_png(Blob, BlobSize, 1); break; case GAIA_GIF_BLOB: raster = rl2_raster_from_gif(Blob, BlobSize); break; case GAIA_TIFF_BLOB: raster = rl2_raster_from_tiff(Blob, BlobSize); break; #ifndef OMIT_WEBP /* only if WebP is supported */ case GAIA_WEBP_BLOB: raster = rl2_raster_from_webp(Blob, BlobSize); break; #endif /* end WebP conditional */ #ifndef OMIT_OPENJPEG /* only if OpenJpeg is supported */ case GAIA_JP2_BLOB: if (rl2_get_jpeg2000_blob_type (Blob, BlobSize, &sample_type, &pixel_type, &num_bands) == RL2_OK) { if ((sample_type == RL2_SAMPLE_UINT8 && pixel_type == RL2_PIXEL_RGB && num_bands == 3) || (sample_type == RL2_SAMPLE_UINT8 && pixel_type == RL2_PIXEL_GRAYSCALE && num_bands == 1)) raster = rl2_raster_from_jpeg2000(Blob, BlobSize, sample_type, pixel_type, num_bands); } break; #endif /* end OpenJpeg conditional */ default: // testing for an eventual Text Font int ret = rl2_is_valid_encoded_font(Blob, BlobSize); if (ret == RL2_OK) { IsTextFont = true; char *str = rl2_get_encoded_font_family(Blob, BlobSize); FontFamily = wxString::FromUTF8(str); free(str); str = rl2_get_encoded_font_style(Blob, BlobSize); FontStyle = wxString::FromUTF8(str); free(str); if (rl2_is_encoded_font_bold(Blob, BlobSize) <= 0) IsFontBold = false; else IsFontBold = true; if (rl2_is_encoded_font_italic(Blob, BlobSize) <= 0) IsFontItalic = false; else IsFontItalic = true; // creating the Font Preview rl2GraphicsContextPtr ctx = rl2_graph_create_context(560, 290); // white background initialization rl2_graph_set_brush(ctx, 255, 255, 255, 255); rl2_graph_draw_rectangle(ctx, -1, -1, 561, 291); rl2GraphicsFontPtr font2 = rl2_graph_create_toy_font(NULL, 12.0, RL2_FONTSTYLE_NORMAL, RL2_FONTWEIGHT_BOLD); rl2_graph_font_set_color(font2, 255, 0, 0, 255); const char *sample = "the quick brown fox jumps over the lazy dog"; double y = 5.0; double pts[] = { 8.0, 12.0, 24.0, 36.0, 48.0, 60.0, 72.0, -1.0 }; double *ppts = pts; while (1) { rl2GraphicsFontPtr font = rl2_graph_create_TrueType_font (MainFrame->GetRL2PrivateData(), Blob, BlobSize, *ppts); rl2_graph_set_font(ctx, font); char text[32]; sprintf(text, "%1.0f", *ppts); double pre_x; double pre_y; double width; double height; double post_x; double post_y; double base_y; rl2_graph_get_text_extent(ctx, sample, &pre_x, &pre_y, &width, &height, &post_x, &post_y); base_y = height + post_y; rl2_graph_set_font(ctx, font2); rl2_graph_get_text_extent(ctx, text, &pre_x, &pre_y, &width, &height, &post_x, &post_y); if ((height + post_y) > base_y) base_y = height + post_y; y += base_y + 2.0; if (y > 290.0) { rl2_graph_release_font(ctx); rl2_graph_destroy_font(font); break; } rl2_graph_draw_text(ctx, text, 20.0 - width, y, 0.0, 0.0, 0.0); rl2_graph_set_font(ctx, font); rl2_graph_draw_text(ctx, sample, 30, y, 0.0, 0.0, 0.0); ppts++; rl2_graph_release_font(ctx); rl2_graph_destroy_font(font); if (*ppts < 0.0) break; } rl2_graph_destroy_font(font2); unsigned char *rgb = rl2_graph_get_context_rgb_array(ctx); rl2_graph_destroy_context(ctx); raster = rl2_create_raster(560, 290, RL2_SAMPLE_UINT8, RL2_PIXEL_RGB, 3, rgb, 560 * 290 * 3, NULL, NULL, 0, NULL); } break; }; } if (raster) { if (rl2_get_raster_size(raster, &width, &height) == RL2_OK) { if (rl2_raster_data_to_RGBA(raster, &rgbaArray, &rgbaSize) != RL2_OK) rgbaArray = NULL; } rl2_destroy_raster(raster); } if (rgbaArray) { // creating the Image from RGB array unsigned int x; unsigned int y; Image = new wxImage(width, height); unsigned char *p = rgbaArray; Image->SetAlpha(); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { unsigned char r = *p++; unsigned char g = *p++; unsigned char b = *p++; unsigned char alpha = *p++; Image->SetRGB(x, y, r, g, b); Image->SetAlpha(x, y, alpha); } } free(rgbaArray); } else { // creating a default BLACK Image int x; int y; Image = new wxImage(128, 128); for (y = 0; y < 128; y++) { for (x = 0; x < 128; x++) Image->SetRGB(x, y, 0, 0, 0); } } if (wxPropertySheetDialog::Create(parent, wxID_ANY, wxT("BLOB explorer")) == false) return false; wxBookCtrlBase *book = GetBookCtrl(); // creates individual panels wxPanel *hexadecimal = CreateHexadecimalPage(book); book->AddPage(hexadecimal, wxT("Hexadecimal dump"), true); if (BlobType == GAIA_GEOMETRY_BLOB || BlobType == GAIA_GPB_BLOB) { wxPanel *geometry = CreateGeometryPage(book); book->AddPage(geometry, wxT("Geometry explorer"), false); wxPanel *wkt = CreateWKTPage(book); book->AddPage(wkt, wxT("WKT"), false); wxPanel *ewkt = CreateEWKTPage(book); book->AddPage(ewkt, wxT("EWKT"), false); wxPanel *svg = CreateSVGPage(book); book->AddPage(svg, wxT("SVG"), false); wxPanel *kml = CreateKMLPage(book); book->AddPage(kml, wxT("KML"), false); wxPanel *gml = CreateGMLPage(book); book->AddPage(gml, wxT("GML"), false); wxPanel *geoJson = CreateGeoJSONPage(book); book->AddPage(geoJson, wxT("GeoJSON"), false); } if (BlobType == GAIA_XML_BLOB) { wxPanel *xml_document = CreateXmlDocumentPage(book); book->AddPage(xml_document, wxT("XML Document"), false); wxPanel *xml_indented = CreateXmlIndentedPage(book); book->AddPage(xml_indented, wxT("XML (indented)"), false); } if (BlobType == GAIA_JPEG_BLOB || BlobType == GAIA_EXIF_BLOB || BlobType == GAIA_EXIF_GPS_BLOB || BlobType == GAIA_PNG_BLOB || BlobType == GAIA_GIF_BLOB || BlobType == GAIA_TIFF_BLOB #ifndef OMIT_WEBP /* only if WebP is supported */ || BlobType == GAIA_WEBP_BLOB #endif #ifndef OMIT_OPENJPEG /* only if OpenJpeg is supported */ || BlobType == GAIA_JP2_BLOB #endif || IsSVG == true || IsTextFont == true) { wxPanel *image = CreateImagePage(book); if (IsTextFont == true) book->AddPage(image, wxT("Font Preview"), false); else book->AddPage(image, wxT("Image"), false); } CreateButtons(wxOK); LayoutDialog(); // appends event handler for TAB/PAGE changing Connect(wxID_ANY, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, (wxObjectEventFunction) & BlobExplorerDialog::OnPageChanged); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & BlobExplorerDialog::OnOk); // centers the dialog window Centre(); UpdateHexadecimalPage(); return true; } wxPanel *BlobExplorerDialog::CreateHexadecimalPage(wxWindow * parent) { // // creating the HEXADECIMAL page // wxPanel *panel = new wxPanel(parent, ID_PANE_HEXADECIMAL); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the hexadecimal dump wxBoxSizer *hexSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(hexSizer, 0, wxALIGN_LEFT | wxALL, 0); MyHexList *hexCtrl = new MyHexList(this, Blob, BlobSize, panel, ID_HEX, wxDefaultPosition, wxSize(620, 320), wxLC_REPORT | wxLC_VIRTUAL); wxFont font(9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); hexCtrl->SetFont(font); wxListItem column0; hexCtrl->InsertColumn(0, wxT("Address")); hexCtrl->SetColumnWidth(0, 90); hexCtrl->InsertColumn(1, wxT("Hexadecimal")); hexCtrl->SetColumnWidth(1, 370); hexCtrl->InsertColumn(2, wxT("ASCII")); hexCtrl->SetColumnWidth(2, 130); hexSizer->Add(hexCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); return panel; } wxPanel *BlobExplorerDialog::CreateGeometryPage(wxWindow * parent) { // // creating the GEOMETRY page // wxPanel *panel = new wxPanel(parent, ID_PANE_HEXADECIMAL); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the geometry as a text table wxBoxSizer *geomSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(geomSizer, 0, wxALIGN_LEFT | wxALL, 0); wxTextCtrl *geomCtrl = new wxTextCtrl(panel, ID_GEOM_TABLE, wxT(""), wxDefaultPosition, wxSize(270, 320), wxTE_MULTILINE | wxTE_RICH | wxTE_READONLY | wxHSCROLL); geomSizer->Add(geomCtrl, 0, wxALIGN_LEFT | wxALL, 5); // creating a control to show the geometry in a graphical fashion wxStaticBox *exBox = new wxStaticBox(panel, wxID_STATIC, wxT("Geometry preview"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *exampleSizer = new wxStaticBoxSizer(exBox, wxHORIZONTAL); geomSizer->Add(exampleSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); DrawGeometry(300, 300); GraphicsGeometry *geomGraph = new GraphicsGeometry(this, panel, ID_GEOM_GRAPH, GeomPreview, wxSize(300, 300)); exampleSizer->Add(geomGraph, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); panel->SetSizer(topSizer); topSizer->Fit(panel); return panel; } wxPanel *BlobExplorerDialog::CreateWKTPage(wxWindow * parent) { // // creating the WKT page // wxPanel *panel = new wxPanel(parent, ID_PANE_WKT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the WKT notation wxBoxSizer *wktSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(wktSizer, 0, wxALIGN_LEFT | wxALL, 0); wxTextCtrl *wktCtrl = new wxTextCtrl(panel, ID_WKT_TABLE, wxT(""), wxDefaultPosition, wxSize(600, 300), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxVSCROLL); wxFont font = wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); wktCtrl->SetFont(font); wktSizer->Add(wktCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *btnCopy = new wxButton(panel, ID_WKT_COPY, wxT("&Copy")); btnSizer->Add(btnCopy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_WKT_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & BlobExplorerDialog::OnCopyWKT); return panel; } void BlobExplorerDialog::OnCopyWKT(wxCommandEvent & WXUNUSED(event)) { // // Copying WKT to the Clipboard // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(WKTstring)); wxTheClipboard->Close(); } } wxPanel *BlobExplorerDialog::CreateEWKTPage(wxWindow * parent) { // // creating the EWKT page // wxPanel *panel = new wxPanel(parent, ID_PANE_EWKT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the EWKT notation wxBoxSizer *ewktSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(ewktSizer, 0, wxALIGN_LEFT | wxALL, 0); wxTextCtrl *ewktCtrl = new wxTextCtrl(panel, ID_EWKT_TABLE, wxT(""), wxDefaultPosition, wxSize(600, 300), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxVSCROLL); wxFont font = wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); ewktCtrl->SetFont(font); ewktSizer->Add(ewktCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *btnCopy = new wxButton(panel, ID_EWKT_COPY, wxT("&Copy")); btnSizer->Add(btnCopy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_EWKT_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & BlobExplorerDialog::OnCopyEWKT); return panel; } void BlobExplorerDialog::OnCopyEWKT(wxCommandEvent & WXUNUSED(event)) { // // Copying EWKT to the Clipboard // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(EWKTstring)); wxTheClipboard->Close(); } } wxPanel *BlobExplorerDialog::CreateSVGPage(wxWindow * parent) { // // creating the SVG page // wxPanel *panel = new wxPanel(parent, ID_PANE_SVG); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the SVG notation wxBoxSizer *svgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(svgSizer, 0, wxALIGN_LEFT | wxALL, 0); wxTextCtrl *svgCtrl = new wxTextCtrl(panel, ID_SVG_TABLE, wxT(""), wxDefaultPosition, wxSize(600, 270), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxVSCROLL); wxFont font = wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); svgCtrl->SetFont(font); svgSizer->Add(svgCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *optBox = new wxStaticBox(panel, wxID_STATIC, wxT("SVG options"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxHORIZONTAL); btnSizer->Add(optSizer, 0, wxALIGN_LEFT | wxALL, 0); wxBoxSizer *absRelSizer = new wxBoxSizer(wxHORIZONTAL); optSizer->Add(absRelSizer, 0, wxALIGN_LEFT | wxALL, 0); wxString absrel[2]; absrel[0] = wxT("&Relative"); absrel[1] = wxT("&Absolute"); wxRadioBox *absRelBox = new wxRadioBox(panel, ID_SVG_RELATIVE, wxT("&Coord Mode"), wxDefaultPosition, wxDefaultSize, 2, absrel, 2, wxRA_SPECIFY_COLS); absRelSizer->Add(absRelBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *precisionLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Precision:")); optSizer->Add(precisionLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *precisionCtrl = new wxSpinCtrl(panel, ID_SVG_PRECISION, wxEmptyString, wxDefaultPosition, wxSize(50, 20), wxSP_ARROW_KEYS, -1, 15, -1); optSizer->Add(precisionCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *btnCopy = new wxButton(panel, ID_SVG_COPY, wxT("&Copy")); btnSizer->Add(btnCopy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_SVG_RELATIVE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & BlobExplorerDialog::OnSVGRelative); Connect(ID_SVG_PRECISION, wxEVT_COMMAND_SPINCTRL_UPDATED, (wxObjectEventFunction) & BlobExplorerDialog::OnSVGPrecision); Connect(ID_SVG_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & BlobExplorerDialog::OnCopySVG); return panel; } void BlobExplorerDialog::OnSVGRelative(wxCommandEvent & WXUNUSED(event)) { // // SVG Relative/Absolute selection changed // wxRadioBox *absRelCtrl = (wxRadioBox *) FindWindow(ID_SVG_RELATIVE); switch (absRelCtrl->GetSelection()) { case 0: SVGrelative = true; break; case 1: SVGrelative = false; break; }; SVGstring = wxT(""); wxTextCtrl *svgCtrl = (wxTextCtrl *) FindWindow(ID_SVG_TABLE); svgCtrl->SetValue(wxT("")); UpdateSVGPage(); } void BlobExplorerDialog::OnSVGPrecision(wxCommandEvent & WXUNUSED(event)) { // // SVG Precision selection changed // wxSpinCtrl *precisionCtrl = (wxSpinCtrl *) FindWindow(ID_SVG_PRECISION); SVGprecision = precisionCtrl->GetValue(); SVGstring = wxT(""); wxTextCtrl *svgCtrl = (wxTextCtrl *) FindWindow(ID_SVG_TABLE); svgCtrl->SetValue(wxT("")); UpdateSVGPage(); } void BlobExplorerDialog::OnCopySVG(wxCommandEvent & WXUNUSED(event)) { // // Copying SVG to the Clipboard // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(SVGstring)); wxTheClipboard->Close(); } } wxPanel *BlobExplorerDialog::CreateKMLPage(wxWindow * parent) { // // creating the KML page // wxPanel *panel = new wxPanel(parent, ID_PANE_KML); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the KML notation wxBoxSizer *kmlSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(kmlSizer, 0, wxALIGN_LEFT | wxALL, 0); wxTextCtrl *kmlCtrl = new wxTextCtrl(panel, ID_KML_TABLE, wxT(""), wxDefaultPosition, wxSize(600, 280), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxVSCROLL); wxFont font = wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); kmlCtrl->SetFont(font); kmlSizer->Add(kmlCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *optBox = new wxStaticBox(panel, wxID_STATIC, wxT("KML options"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxHORIZONTAL); btnSizer->Add(optSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *precisionLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Precision:")); optSizer->Add(precisionLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *precisionCtrl = new wxSpinCtrl(panel, ID_KML_PRECISION, wxEmptyString, wxDefaultPosition, wxSize(50, 20), wxSP_ARROW_KEYS, -1, 18, -1); optSizer->Add(precisionCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *btnCopy = new wxButton(panel, ID_KML_COPY, wxT("&Copy")); btnSizer->Add(btnCopy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_KML_PRECISION, wxEVT_COMMAND_SPINCTRL_UPDATED, (wxObjectEventFunction) & BlobExplorerDialog::OnKMLPrecision); Connect(ID_KML_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & BlobExplorerDialog::OnCopyKML); return panel; } void BlobExplorerDialog::OnKMLPrecision(wxCommandEvent & WXUNUSED(event)) { // // KML Precision selection changed // wxSpinCtrl *precisionCtrl = (wxSpinCtrl *) FindWindow(ID_KML_PRECISION); KMLprecision = precisionCtrl->GetValue(); KMLstring = wxT(""); wxTextCtrl *kmlCtrl = (wxTextCtrl *) FindWindow(ID_KML_TABLE); kmlCtrl->SetValue(wxT("")); UpdateKMLPage(); } void BlobExplorerDialog::OnCopyKML(wxCommandEvent & WXUNUSED(event)) { // // Copying KML to the Clipboard // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(KMLstring)); wxTheClipboard->Close(); } } wxPanel *BlobExplorerDialog::CreateGMLPage(wxWindow * parent) { // // creating the GML page // wxPanel *panel = new wxPanel(parent, ID_PANE_GML); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the GML notation wxBoxSizer *gmlSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(gmlSizer, 0, wxALIGN_LEFT | wxALL, 0); wxTextCtrl *gmlCtrl = new wxTextCtrl(panel, ID_GML_TABLE, wxT(""), wxDefaultPosition, wxSize(600, 270), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxVSCROLL); wxFont font = wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); gmlCtrl->SetFont(font); gmlSizer->Add(gmlCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *optBox = new wxStaticBox(panel, wxID_STATIC, wxT("GML options"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxHORIZONTAL); btnSizer->Add(optSizer, 0, wxALIGN_LEFT | wxALL, 0); wxBoxSizer *versionSizer = new wxBoxSizer(wxHORIZONTAL); optSizer->Add(versionSizer, 0, wxALIGN_LEFT | wxALL, 0); wxString version[2]; version[0] = wxT("&GML v2"); version[1] = wxT("&GML v3"); wxRadioBox *versionBox = new wxRadioBox(panel, ID_GML_V2_V3, wxT("&GML version"), wxDefaultPosition, wxDefaultSize, 2, version, 2, wxRA_SPECIFY_COLS); versionSizer->Add(versionBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *precisionLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Precision:")); optSizer->Add(precisionLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *precisionCtrl = new wxSpinCtrl(panel, ID_GML_PRECISION, wxEmptyString, wxDefaultPosition, wxSize(50, 20), wxSP_ARROW_KEYS, -1, 18, -1); optSizer->Add(precisionCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *btnCopy = new wxButton(panel, ID_GML_COPY, wxT("&Copy")); btnSizer->Add(btnCopy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_GML_V2_V3, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & BlobExplorerDialog::OnGMLv2v3); Connect(ID_GML_PRECISION, wxEVT_COMMAND_SPINCTRL_UPDATED, (wxObjectEventFunction) & BlobExplorerDialog::OnGMLPrecision); Connect(ID_GML_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & BlobExplorerDialog::OnCopyGML); return panel; } void BlobExplorerDialog::OnGMLv2v3(wxCommandEvent & WXUNUSED(event)) { // // GML Version selection changed // wxRadioBox *versionCtrl = (wxRadioBox *) FindWindow(ID_GML_V2_V3); switch (versionCtrl->GetSelection()) { case 0: GMLv2v3 = true; break; case 1: GMLv2v3 = false; break; }; GMLstring = wxT(""); wxTextCtrl *gmlCtrl = (wxTextCtrl *) FindWindow(ID_GML_TABLE); gmlCtrl->SetValue(wxT("")); UpdateGMLPage(); } void BlobExplorerDialog::OnGMLPrecision(wxCommandEvent & WXUNUSED(event)) { // // GML Precision selection changed // wxSpinCtrl *precisionCtrl = (wxSpinCtrl *) FindWindow(ID_GML_PRECISION); GMLprecision = precisionCtrl->GetValue(); GMLstring = wxT(""); wxTextCtrl *gmlCtrl = (wxTextCtrl *) FindWindow(ID_GML_TABLE); gmlCtrl->SetValue(wxT("")); UpdateGMLPage(); } void BlobExplorerDialog::OnCopyGML(wxCommandEvent & WXUNUSED(event)) { // // Copying GML to the Clipboard // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(GMLstring)); wxTheClipboard->Close(); } } wxPanel *BlobExplorerDialog::CreateGeoJSONPage(wxWindow * parent) { // // creating the GeoJSON page // wxPanel *panel = new wxPanel(parent, ID_PANE_SVG); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the GeoJSON notation wxBoxSizer *geoJsonSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(geoJsonSizer, 0, wxALIGN_LEFT | wxALL, 0); wxTextCtrl *geoJsonCtrl = new wxTextCtrl(panel, ID_GEOJSON_TABLE, wxT(""), wxDefaultPosition, wxSize(600, 270), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxVSCROLL); wxFont font = wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); geoJsonCtrl->SetFont(font); geoJsonSizer->Add(geoJsonCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *optBox = new wxStaticBox(panel, wxID_STATIC, wxT("GeoJSON options"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *optSizer = new wxStaticBoxSizer(optBox, wxHORIZONTAL); btnSizer->Add(optSizer, 0, wxALIGN_LEFT | wxALL, 0); wxBoxSizer *optionsSizer = new wxBoxSizer(wxHORIZONTAL); optSizer->Add(optionsSizer, 0, wxALIGN_LEFT | wxALL, 0); wxString options[6]; options[0] = wxT("&none"); options[1] = wxT("&BBOX"); options[2] = wxT("&shortCRS"); options[3] = wxT("&shortCRS + BBOX"); options[4] = wxT("&longCRS"); options[5] = wxT("&longCRS + BBOX"); wxRadioBox *optionsBox = new wxRadioBox(panel, ID_GEOJSON_OPTIONS, wxT("&BBOX - CRS options"), wxDefaultPosition, wxDefaultSize, 6, options, 2, wxRA_SPECIFY_ROWS); optionsSizer->Add(optionsBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticText *precisionLabel = new wxStaticText(panel, wxID_STATIC, wxT("&Precision:")); optSizer->Add(precisionLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *precisionCtrl = new wxSpinCtrl(panel, ID_GEOJSON_PRECISION, wxEmptyString, wxDefaultPosition, wxSize(50, 20), wxSP_ARROW_KEYS, -1, 18, -1); optSizer->Add(precisionCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *btnCopy = new wxButton(panel, ID_GEOJSON_COPY, wxT("&Copy")); btnSizer->Add(btnCopy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_GEOJSON_OPTIONS, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & BlobExplorerDialog::OnGeoJSONOptions); Connect(ID_GEOJSON_PRECISION, wxEVT_COMMAND_SPINCTRL_UPDATED, (wxObjectEventFunction) & BlobExplorerDialog::OnGeoJSONPrecision); Connect(ID_GEOJSON_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & BlobExplorerDialog::OnCopyGeoJSON); return panel; } void BlobExplorerDialog::OnGeoJSONOptions(wxCommandEvent & WXUNUSED(event)) { // // GeoJSON Options selection changed // wxRadioBox *optionsCtrl = (wxRadioBox *) FindWindow(ID_GEOJSON_OPTIONS); GeoJSONoptions = optionsCtrl->GetSelection(); GMLstring = wxT(""); wxTextCtrl *gmlCtrl = (wxTextCtrl *) FindWindow(ID_GEOJSON_TABLE); gmlCtrl->SetValue(wxT("")); UpdateGeoJSONPage(); } void BlobExplorerDialog::OnGeoJSONPrecision(wxCommandEvent & WXUNUSED(event)) { // // GeoJSON Precision selection changed // wxSpinCtrl *precisionCtrl = (wxSpinCtrl *) FindWindow(ID_GEOJSON_PRECISION); GeoJSONprecision = precisionCtrl->GetValue(); GeoJSONstring = wxT(""); wxTextCtrl *geoJsonCtrl = (wxTextCtrl *) FindWindow(ID_GEOJSON_TABLE); geoJsonCtrl->SetValue(wxT("")); UpdateGeoJSONPage(); } void BlobExplorerDialog::OnCopyGeoJSON(wxCommandEvent & WXUNUSED(event)) { // // Copying GeoJSON to the Clipboard // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(GeoJSONstring)); wxTheClipboard->Close(); } } wxPanel *BlobExplorerDialog::CreateXmlDocumentPage(wxWindow * parent) { // // creating the XMLDocument page // wxPanel *panel = new wxPanel(parent, ID_PANE_WKT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the WKT notation wxBoxSizer *wktSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(wktSizer, 0, wxALIGN_LEFT | wxALL, 0); wxTextCtrl *wktCtrl = new wxTextCtrl(panel, ID_XML_DOCUMENT_TABLE, wxT(""), wxDefaultPosition, wxSize(600, 300), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxVSCROLL); wxFont font = wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); wktCtrl->SetFont(font); wktSizer->Add(wktCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *btnCopy = new wxButton(panel, ID_XML_DOCUMENT_COPY, wxT("&Copy")); btnSizer->Add(btnCopy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_XML_DOCUMENT_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & BlobExplorerDialog::OnCopyXmlDocument); return panel; } void BlobExplorerDialog::OnCopyXmlDocument(wxCommandEvent & WXUNUSED(event)) { // // Copying XMLDocument to the Clipboard // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLDocument)); wxTheClipboard->Close(); } } wxPanel *BlobExplorerDialog::CreateXmlIndentedPage(wxWindow * parent) { // // creating the XMLIndented page // wxPanel *panel = new wxPanel(parent, ID_PANE_WKT); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the WKT notation wxBoxSizer *wktSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(wktSizer, 0, wxALIGN_LEFT | wxALL, 0); wxTextCtrl *wktCtrl = new wxTextCtrl(panel, ID_XML_INDENTED_TABLE, wxT(""), wxDefaultPosition, wxSize(600, 300), wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxVSCROLL); wxFont font = wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); wktCtrl->SetFont(font); wktSizer->Add(wktCtrl, 0, wxALIGN_LEFT | wxALL, 5); wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *btnCopy = new wxButton(panel, ID_XML_INDENTED_COPY, wxT("&Copy")); btnSizer->Add(btnCopy, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); panel->SetSizer(topSizer); topSizer->Fit(panel); // appends event handlers Connect(ID_XML_INDENTED_COPY, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & BlobExplorerDialog::OnCopyXmlIndented); return panel; } void BlobExplorerDialog::OnCopyXmlIndented(wxCommandEvent & WXUNUSED(event)) { // // Copying XMLDocument to the Clipboard // if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxTextDataObject(XMLIndented)); wxTheClipboard->Close(); } } wxPanel *BlobExplorerDialog::CreateImagePage(wxWindow * parent) { // // creating the IMAGE page // wxPanel *panel = new wxPanel(parent, ID_PANE_IMAGE); wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); panel->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER | wxALL, 5); // creating a control to show the image title wxBoxSizer *imgSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(imgSizer, 0, wxALIGN_TOP | wxALL, 0); wxString title1 = wxT("Image"); wxString title2 = wxT("Image preview"); if (IsTextFont == true) { title1 = wxT("TrueType Font"); title2 = wxT("Font Preview"); } wxStaticText *imageTitle = new wxStaticText(panel, ID_IMAGE_TITLE, title1, wxDefaultPosition, wxSize(560, 10)); imgSizer->Add(imageTitle, 0, wxALIGN_LEFT | wxALL, 5); // creating a control to show the image wxStaticBox *exBox = new wxStaticBox(panel, ID_IMG_BOX, title2, wxDefaultPosition, wxDefaultSize); wxBoxSizer *exampleSizer = new wxStaticBoxSizer(exBox, wxHORIZONTAL); imgSizer->Add(exampleSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); ImageShow *imgShow = new ImageShow(this, panel, ID_IMAGE, wxBitmap(), wxSize(560, 300)); exampleSizer->Add(imgShow, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); panel->SetSizer(topSizer); topSizer->Fit(panel); return panel; } void BlobExplorerDialog::OnPageChanged(wxNotebookEvent & event) { // // TAB/PAGE selection changed // switch (event.GetSelection()) { case 0: UpdateHexadecimalPage(); break; case 1: if (BlobType == GAIA_GEOMETRY_BLOB || BlobType == GAIA_GPB_BLOB) UpdateGeometryPage(); else if (BlobType == GAIA_XML_BLOB) UpdateXmlDocumentPage(); else UpdateImagePage(); break; case 2: if (BlobType == GAIA_XML_BLOB) UpdateXmlIndentedPage(); else UpdateWKTPage(); break; case 3: if (IsSVG == true || IsTextFont == true) UpdateImagePage(); else UpdateEWKTPage(); break; case 4: UpdateSVGPage(); break; case 5: UpdateKMLPage(); break; case 6: UpdateGMLPage(); break; case 7: UpdateGeoJSONPage(); break; }; } void BlobExplorerDialog::UpdateHexadecimalPage() { // // updating the HEXADECIMAL page // MyHexList *hexCtrl = (MyHexList *) FindWindow(ID_HEX); hexCtrl->EnsureVisible(0); } void BlobExplorerDialog::UpdateGeometryPage() { // // updating the GEOMETRY page // gaiaPointPtr pt; gaiaLinestringPtr ln; gaiaPolygonPtr pg; gaiaRingPtr rng; int points = 0; int linestrings = 0; int polygons = 0; int ib; wxString strValue; char dummy[1024]; wxTextAttr attrBold(wxColour(0, 0, 0), wxColour(255, 255, 255), wxFont(9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD)); wxTextAttr attrNorm(wxColour(0, 0, 0), wxColour(255, 255, 255), wxFont(9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); wxTextCtrl *geomCtrl = (wxTextCtrl *) FindWindow(ID_GEOM_TABLE); if (geomCtrl->GetValue().Len() < 1) { ::wxBeginBusyCursor(); pt = Geometry->FirstPoint; while (pt) { // counting how many points are into this Geometry points++; pt = pt->Next; } ln = Geometry->FirstLinestring; while (ln) { // counting how many linestrings are into this Geometry linestrings++; ln = ln->Next; } pg = Geometry->FirstPolygon; while (pg) { // counting how many polygons are into this Geometry polygons++; pg = pg->Next; } // determining the Geometry type geomCtrl->SetDefaultStyle(attrNorm); geomCtrl->AppendText(wxT("SRID: ")); geomCtrl->SetDefaultStyle(attrBold); sprintf(dummy, "%d", Geometry->Srid); strValue = wxString::FromUTF8(dummy); geomCtrl->AppendText(strValue); geomCtrl->SetDefaultStyle(attrNorm); geomCtrl->AppendText(wxT("\n\n")); strValue = wxT("UNKNOWN GEOMETRY TYPE"); if (points == 1 && linestrings == 0 && polygons == 0) { if (Geometry->DeclaredType == GAIA_MULTIPOINT) strValue = wxT("MULTIPOINT"); else if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) strValue = wxT("GEOMETRYCOLLECTION"); else strValue = wxT("POINT"); } else if (points == 0 && linestrings == 1 && polygons == 0) { if (Geometry->DeclaredType == GAIA_MULTILINESTRING) strValue = wxT("MULTILINESTRING"); else if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) strValue = wxT("GEOMETRYCOLLECTION"); else strValue = wxT("LINESTRING"); } else if (points == 0 && linestrings == 0 && polygons == 1) { if (Geometry->DeclaredType == GAIA_MULTIPOLYGON) strValue = wxT("MULTIPOLYGON"); else if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) strValue = wxT("GEOMETRYCOLLECTION"); else strValue = wxT("POLYGON"); } else if (points > 1 && linestrings == 0 && polygons == 0) { if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) strValue = wxT("GEOMETRYCOLLECTION"); else strValue = wxT("MULTIPOINT"); } else if (points == 0 && linestrings > 1 && polygons == 0) { if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) strValue = wxT("GEOMETRYCOLLECTION"); else strValue = wxT("MULTILINESTRING"); } else if (points == 0 && linestrings == 0 && polygons > 1) { if (Geometry->DeclaredType == GAIA_GEOMETRYCOLLECTION) strValue = wxT("GEOMETRYCOLLECTION"); else strValue = wxT("MULTIPOLYGON"); } else strValue = wxT("GEOMETRYCOLLECTION"); geomCtrl->SetDefaultStyle(attrNorm); geomCtrl->AppendText(wxT("Geometry type: ")); geomCtrl->SetDefaultStyle(attrBold); geomCtrl->AppendText(strValue); geomCtrl->SetDefaultStyle(attrNorm); geomCtrl->AppendText(wxT("\n\n")); if (points) { // printing the Points list sprintf(dummy, "#%d POINT", points); strValue = wxString::FromUTF8(dummy); if (points > 1) strValue += wxT("s:"); else strValue += wxT(":"); geomCtrl->SetDefaultStyle(attrBold); geomCtrl->AppendText(strValue); geomCtrl->SetDefaultStyle(attrNorm); pt = Geometry->FirstPoint; points = 0; while (pt) { // printing each Point points++; sprintf(dummy, "\n %d) ", points); strValue = wxString::FromUTF8(dummy); geomCtrl->SetDefaultStyle(attrBold); geomCtrl->AppendText(strValue); geomCtrl->SetDefaultStyle(attrNorm); sprintf(dummy, "%1.4f %1.4f", pt->X, pt->Y); strValue = wxString::FromUTF8(dummy); geomCtrl->AppendText(strValue); pt = pt->Next; } geomCtrl->AppendText(wxT("\n\n\n")); } if (linestrings) { // printing the Linestrings list sprintf(dummy, "#%d LINESTRING", linestrings); strValue = wxString::FromUTF8(dummy); if (linestrings > 1) strValue += wxT("s:"); else strValue += wxT(":"); geomCtrl->SetDefaultStyle(attrBold); geomCtrl->AppendText(strValue); geomCtrl->SetDefaultStyle(attrNorm); ln = Geometry->FirstLinestring; linestrings = 0; while (ln) { // printing each Linestring linestrings++; sprintf(dummy, "\n %d) ", linestrings); strValue = wxString::FromUTF8(dummy); geomCtrl->SetDefaultStyle(attrBold); geomCtrl->AppendText(strValue); geomCtrl->SetDefaultStyle(attrNorm); sprintf(dummy, "%d vertices", ln->Points); strValue = wxString::FromUTF8(dummy); geomCtrl->AppendText(strValue); ln = ln->Next; } geomCtrl->AppendText(wxT("\n\n\n")); } if (polygons) { // printing the Polygons list sprintf(dummy, "#%d POLYGON", polygons); strValue = wxString::FromUTF8(dummy); if (polygons > 1) strValue += wxT("s:"); else strValue += wxT(":"); geomCtrl->SetDefaultStyle(attrBold); geomCtrl->AppendText(strValue); geomCtrl->SetDefaultStyle(attrNorm); pg = Geometry->FirstPolygon; polygons = 0; while (pg) { // printing each Polygon polygons++; sprintf(dummy, "\n %d) exterior ring", polygons); strValue = wxString::FromUTF8(dummy); geomCtrl->SetDefaultStyle(attrBold); geomCtrl->AppendText(strValue); geomCtrl->SetDefaultStyle(attrNorm); rng = pg->Exterior; sprintf(dummy, ": %d vertices", rng->Points); strValue = wxString::FromUTF8(dummy); geomCtrl->AppendText(strValue); for (ib = 0; ib < pg->NumInteriors; ib++) { // printing each interior ring sprintf(dummy, "\n %d.%d) ", polygons, ib + 1); strValue = wxString::FromUTF8(dummy); geomCtrl->SetDefaultStyle(attrBold); geomCtrl->AppendText(strValue); geomCtrl->SetDefaultStyle(attrNorm); rng = pg->Interiors + ib; sprintf(dummy, " interior ring: %d vertices", rng->Points); strValue = wxString::FromUTF8(dummy); geomCtrl->AppendText(strValue); } pg = pg->Next; } geomCtrl->AppendText(wxT("\n\n\n")); } ::wxEndBusyCursor(); } GraphicsGeometry *geomGraph = (GraphicsGeometry *) FindWindow(ID_GEOM_GRAPH); geomGraph->SetBitmap(GeomPreview); } void BlobExplorerDialog::UpdateImagePage() { // // updating the IMAGE page // double horz; double vert; wxImage scaledImg; wxSize sz; wxSize box; int boxX; int boxY; int posX; int posY; char latlong[1024]; char dummy[1024]; wxString ll; wxString title = wxT("Invalid Image"); wxStaticBox *imgBox = (wxStaticBox *) FindWindow(ID_IMG_BOX); ImageShow *imgShow = (ImageShow *) FindWindow(ID_IMAGE); wxStaticText *imageTitle = (wxStaticText *) FindWindow(ID_IMAGE_TITLE); if (Image) { ::wxBeginBusyCursor(); if (Image->IsOk() == true) { horz = Image->GetWidth(); vert = Image->GetHeight(); sz = imgShow->GetSize(); box = imgBox->GetSize(); while (horz > sz.GetWidth() || vert > sz.GetHeight()) { horz *= 0.9; vert *= 0.9; } if (horz == Image->GetWidth() && vert == Image->GetHeight()) scaledImg = Image->Copy(); else scaledImg = Image->Scale((int) horz, (int) vert, wxIMAGE_QUALITY_HIGH); wxBitmap bmp(scaledImg); imgBox->GetPosition(&boxX, &boxY); posX = (box.GetWidth() - (int) horz) / 2; posY = (box.GetHeight() - (int) vert) / 2; imgShow->SetSize(boxX + posX, boxY + posY, (int) horz, (int) vert); imgShow->SetBitmap(bmp); imgShow->Show(true); switch (BlobType) { case GAIA_JPEG_BLOB: sprintf(dummy, "JPEG image resolution: %d x %d %d bytes", Image->GetWidth(), Image->GetHeight(), BlobSize); title = wxString::FromUTF8(dummy); break; case GAIA_EXIF_BLOB: sprintf(dummy, "EXIF image resolution: %d x %d %d bytes", Image->GetWidth(), Image->GetHeight(), BlobSize); title = wxString::FromUTF8(dummy); break; case GAIA_EXIF_GPS_BLOB: if (gaiaGetGpsLatLong(Blob, BlobSize, latlong, 1024)) ll = wxString::FromUTF8(latlong); else ll = wxT("NOT AVAILABLE"); sprintf(dummy, "EXIF-GPS image resolution: %d x %d %d bytes GPS: ", Image->GetWidth(), Image->GetHeight(), BlobSize); title = wxString::FromUTF8(dummy); title += ll; break; case GAIA_PNG_BLOB: sprintf(dummy, "PNG image resolution: %d x %d %d bytes", Image->GetWidth(), Image->GetHeight(), BlobSize); title = wxString::FromUTF8(dummy); break; case GAIA_GIF_BLOB: sprintf(dummy, "GIF image resolution: %d x %d %d bytes", Image->GetWidth(), Image->GetHeight(), BlobSize); title = wxString::FromUTF8(dummy); break; case GAIA_TIFF_BLOB: sprintf(dummy, "TIFF image resolution: %d x %d %d bytes", Image->GetWidth(), Image->GetHeight(), BlobSize); title = wxString::FromUTF8(dummy); break; #ifndef OMIT_WEBP /* only if WebP is supported */ case GAIA_WEBP_BLOB: sprintf(dummy, "WEBP image resolution: %d x %d %d bytes", Image->GetWidth(), Image->GetHeight(), BlobSize); title = wxString::FromUTF8(dummy); break; #endif /* end WebP conditional */ #ifndef OMIT_OPENJPEG /* only if OpenJpeg is supported */ case GAIA_JP2_BLOB: sprintf(dummy, "Jpeg2000 image resolution: %d x %d %d bytes", Image->GetWidth(), Image->GetHeight(), BlobSize); title = wxString::FromUTF8(dummy); break; #endif /* end OpenJpeg conditional */ default: if (IsSVG == true) { sprintf(dummy, "SVG image resolution: %1.2f x %1.2f %d bytes", SvgWidth, SvgHeight, SvgSize); title = wxString::FromUTF8(dummy); } if (IsTextFont == true) { title = FontFamily + wxT("-") + FontStyle; if (IsFontBold == true) title += wxT(" bold=YES"); else title += wxT(" bold=NO"); if (IsFontItalic == true) title += wxT(" italic=YES"); else title += wxT(" italic=NO"); } break; } } ::wxEndBusyCursor(); } imageTitle->SetLabel(title); } void BlobExplorerDialog::FormatWKT(wxTextCtrl * txtCtrl, wxString & in, wxString & out) { // // splitting WKT into rows // int page_width; int h; wxClientDC *dc = new wxClientDC(txtCtrl); int row_sz = 0; wxSize spSz = dc->GetTextExtent(wxT(",")); int sp_sz = spSz.GetWidth(); out = wxT(""); txtCtrl->GetSize(&page_width, &h); page_width -= page_width / 4; wxStringTokenizer tkz(in, wxT(",")); while (tkz.HasMoreTokens()) { wxString token = tkz.GetNextToken(); wxSize sz = dc->GetTextExtent(token); if (row_sz == 0) { out += token; row_sz = sz.GetWidth(); } else { if (row_sz + sp_sz + sz.GetWidth() < page_width) { out += wxT(",") + token; row_sz += sp_sz + sz.GetWidth(); } else { out += wxT(",\n") + token; row_sz = sz.GetWidth(); } } } delete dc; } void BlobExplorerDialog::UpdateWKTPage() { // // updating the WKT page // wxTextCtrl *wktCtrl = (wxTextCtrl *) FindWindow(ID_WKT_TABLE); if (wktCtrl->GetValue().Len() < 1) { sqlite3_stmt *stmt = NULL; char err_msg[2048]; const char *sql = "SELECT ST_AsText(?)"; ::wxBeginBusyCursor(); int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, Blob, BlobSize, SQLITE_STATIC); while (1) { // // fetching the result set row // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) WKTstring = wxString::FromUTF8((const char *) sqlite3_column_text(stmt, 0)); } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } } sqlite3_finalize(stmt); wxString wkt; FormatWKT(wktCtrl, WKTstring, wkt); wktCtrl->WriteText(wkt); ::wxEndBusyCursor(); } } void BlobExplorerDialog::UpdateEWKTPage() { // // updating the EWKT page // wxTextCtrl *ewktCtrl = (wxTextCtrl *) FindWindow(ID_EWKT_TABLE); if (ewktCtrl->GetValue().Len() < 1) { sqlite3_stmt *stmt = NULL; char err_msg[2048]; const char *sql = "SELECT AsEWKT(?)"; ::wxBeginBusyCursor(); int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, Blob, BlobSize, SQLITE_STATIC); while (1) { // // fetching the result set row // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) EWKTstring = wxString::FromUTF8((const char *) sqlite3_column_text(stmt, 0)); } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } } sqlite3_finalize(stmt); wxString ewkt; FormatWKT(ewktCtrl, EWKTstring, ewkt); ewktCtrl->WriteText(ewkt); ::wxEndBusyCursor(); } } void BlobExplorerDialog::FormatSVG(wxTextCtrl * txtCtrl, wxString & in, wxString & out) { // // splitting SVG into rows // int page_width; int h; wxClientDC *dc = new wxClientDC(txtCtrl); int row_sz = 0; wxSize spSz = dc->GetTextExtent(wxT(" ")); int sp_sz = spSz.GetWidth(); out = wxT(""); txtCtrl->GetSize(&page_width, &h); page_width -= page_width / 4; wxStringTokenizer tkz(in, wxT(" ")); while (tkz.HasMoreTokens()) { wxString token = tkz.GetNextToken(); wxSize sz = dc->GetTextExtent(token); if (row_sz == 0) { out += token; row_sz = sz.GetWidth(); } else { if (row_sz + sp_sz + sz.GetWidth() < page_width) { out += wxT(" ") + token; row_sz += sp_sz + sz.GetWidth(); } else { out += wxT("\n") + token; row_sz = sz.GetWidth(); } } } delete dc; } void BlobExplorerDialog::UpdateSVGPage() { // // updating the SVG page // wxTextCtrl *svgCtrl = (wxTextCtrl *) FindWindow(ID_SVG_TABLE); if (svgCtrl->GetValue().Len() < 1) { sqlite3_stmt *stmt = NULL; char err_msg[2048]; const char *sql = "SELECT AsSVG(?, ?)"; ::wxBeginBusyCursor(); if (SVGprecision >= 0) sql = "SELECT AsSVG(?, ?, ?)"; int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, Blob, BlobSize, SQLITE_STATIC); if (SVGrelative == true) sqlite3_bind_int(stmt, 2, 1); else sqlite3_bind_int(stmt, 2, 0); if (SVGprecision >= 0) sqlite3_bind_int(stmt, 3, SVGprecision); while (1) { // // fetching the result set row // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) SVGstring = wxString::FromUTF8((const char *) sqlite3_column_text(stmt, 0)); } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } } sqlite3_finalize(stmt); wxString svg; FormatSVG(svgCtrl, SVGstring, svg); svgCtrl->WriteText(svg); ::wxEndBusyCursor(); } } void BlobExplorerDialog::UpdateKMLPage() { // // updating the KML page // wxTextCtrl *kmlCtrl = (wxTextCtrl *) FindWindow(ID_KML_TABLE); if (kmlCtrl->GetValue().Len() < 1) { sqlite3_stmt *stmt = NULL; char err_msg[2048]; const char *sql = "SELECT AsKML(?)"; if (KMLprecision >= 0) sql = "SELECT AsKML(?, ?)"; ::wxBeginBusyCursor(); int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, Blob, BlobSize, SQLITE_STATIC); if (KMLprecision >= 0) sqlite3_bind_int(stmt, 2, KMLprecision); while (1) { // // fetching the result set row // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) KMLstring = wxString::FromUTF8((const char *) sqlite3_column_text(stmt, 0)); } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } } sqlite3_finalize(stmt); wxString kml; FormatSVG(kmlCtrl, KMLstring, kml); kmlCtrl->WriteText(kml); ::wxEndBusyCursor(); } } void BlobExplorerDialog::UpdateGMLPage() { // // updating the GML page // wxTextCtrl *gmlCtrl = (wxTextCtrl *) FindWindow(ID_GML_TABLE); if (gmlCtrl->GetValue().Len() < 1) { sqlite3_stmt *stmt = NULL; char err_msg[2048]; const char *sql = "SELECT AsGML(?, ?)"; if (GMLprecision >= 0) sql = "SELECT AsGML(?, ?, ?)"; ::wxBeginBusyCursor(); int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); if (GMLv2v3 == true) sqlite3_bind_int(stmt, 1, 2); else sqlite3_bind_int(stmt, 1, 3); sqlite3_bind_blob(stmt, 2, Blob, BlobSize, SQLITE_STATIC); if (GMLprecision >= 0) sqlite3_bind_int(stmt, 3, GMLprecision); while (1) { // // fetching the result set row // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) GMLstring = wxString::FromUTF8((const char *) sqlite3_column_text(stmt, 0)); } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } } sqlite3_finalize(stmt); wxString gml; FormatSVG(gmlCtrl, GMLstring, gml); gmlCtrl->WriteText(gml); ::wxEndBusyCursor(); } } void BlobExplorerDialog::UpdateGeoJSONPage() { // // updating the GeoJSON page // wxTextCtrl *geoJsonCtrl = (wxTextCtrl *) FindWindow(ID_GEOJSON_TABLE); if (geoJsonCtrl->GetValue().Len() < 1) { sqlite3_stmt *stmt = NULL; char err_msg[2048]; const char *sql = "SELECT AsGeoJSON(?)"; if (GeoJSONprecision >= 0) sql = "SELECT AsGeoJSON(?, ?)"; if (GeoJSONoptions > 0) sql = "SELECT AsGeoJSON(?, ?, ?)"; ::wxBeginBusyCursor(); int ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_blob(stmt, 1, Blob, BlobSize, SQLITE_STATIC); if (GeoJSONoptions > 0) { if (GeoJSONprecision >= 0) sqlite3_bind_int(stmt, 2, GeoJSONprecision); else sqlite3_bind_int(stmt, 2, 15); sqlite3_bind_int(stmt, 3, GeoJSONoptions); } else if (GeoJSONprecision >= 0) sqlite3_bind_int(stmt, 2, GeoJSONprecision); while (1) { // // fetching the result set row // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // if (sqlite3_column_type(stmt, 0) == SQLITE_TEXT) GeoJSONstring = wxString::FromUTF8((const char *) sqlite3_column_text(stmt, 0)); } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } } sqlite3_finalize(stmt); wxString geoJson; FormatWKT(geoJsonCtrl, GeoJSONstring, geoJson); geoJsonCtrl->WriteText(geoJson); ::wxEndBusyCursor(); } } void BlobExplorerDialog::UpdateXmlDocumentPage() { // // updating the XmlDocument page // wxTextCtrl *xmlCtrl = (wxTextCtrl *) FindWindow(ID_XML_DOCUMENT_TABLE); xmlCtrl->WriteText(XMLDocument); } void BlobExplorerDialog::UpdateXmlIndentedPage() { // // updating the XmlIndented page // wxTextCtrl *xmlCtrl = (wxTextCtrl *) FindWindow(ID_XML_INDENTED_TABLE); xmlCtrl->WriteText(XMLIndented); } void BlobExplorerDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: exiting // wxDialog::EndModal(wxID_OK); } void BlobExplorerDialog::DrawGeometry(int horz, int vert) { // // drawing graphic representation for current Geometry // gaiaPointPtr pt; gaiaLinestringPtr ln; gaiaPolygonPtr pg; gaiaRingPtr rng; double minx; double miny; double maxx; double maxy; double ext_x; double ext_y; double cx; double cy; double pixelRatioX; double pixelRatioY; double pixelRatio; double span_x; double span_y; double baseX; double baseY; double x; double y; double z; double m; double xx; double yy; int iv; int ib; int pts; int *borders; wxPoint *points; GeomPreview.Create(horz, vert); wxMemoryDC dc(GeomPreview); // // background filling // dc.SetBrush(wxBrush(wxColour(255, 255, 255))); dc.DrawRectangle(0, 0, horz, vert); // // prepearing the drawing pen and brush // dc.SetBrush(wxBrush(wxColour(240, 240, 192))); dc.SetPen(wxPen(wxColour(64, 64, 192), 1)); // // computing the pixel ratio, center position and so on // minx = Geometry->MinX; miny = Geometry->MinY; maxx = Geometry->MaxX; maxy = Geometry->MaxY; ext_x = maxx - minx; ext_y = maxy - miny; minx = Geometry->MinX - (ext_x / 20.0); miny = Geometry->MinY - (ext_y / 20.0); maxx = Geometry->MaxX + (ext_x / 20.0); maxy = Geometry->MaxY + (ext_y / 20.0); ext_x = maxx - minx; ext_y = maxy - miny; cx = minx + (ext_x / 2.0); cy = miny + (ext_y / 2.0); pixelRatioX = ext_x / horz; pixelRatioY = ext_y / vert; if (pixelRatioX > pixelRatioY) pixelRatio = pixelRatioX; else pixelRatio = pixelRatioY; // // centering the Y axis // span_y = vert * pixelRatio; baseY = cy - (span_y / 2.0); // // centering the X axis // span_x = horz * pixelRatio; baseX = cx - (span_x / 2.0); pg = Geometry->FirstPolygon; while (pg) { // // drawing polygons // pts = pg->Exterior->Points; for (ib = 0; ib < pg->NumInteriors; ib++) { rng = pg->Interiors + ib; pts += rng->Points; } borders = new int[pg->NumInteriors + 1]; points = new wxPoint[pts]; pts = 0; rng = pg->Exterior; borders[0] = rng->Points; for (iv = 0; iv < rng->Points; iv++) { if (rng->DimensionModel == GAIA_XY_Z) { gaiaGetPointXYZ(rng->Coords, iv, &x, &y, &z); } else if (rng->DimensionModel == GAIA_XY_M) { gaiaGetPointXYM(rng->Coords, iv, &x, &y, &m); } else if (rng->DimensionModel == GAIA_XY_Z_M) { gaiaGetPointXYZM(rng->Coords, iv, &x, &y, &z, &m); } else { gaiaGetPoint(rng->Coords, iv, &x, &y); } xx = (x - baseX) / pixelRatio; yy = (y - baseY) / pixelRatio; yy = vert - yy; points[pts].x = (int) xx; points[pts].y = (int) yy; pts++; } for (ib = 0; ib < pg->NumInteriors; ib++) { rng = pg->Interiors + ib; borders[1 + ib] = rng->Points; for (iv = 0; iv < rng->Points; iv++) { if (rng->DimensionModel == GAIA_XY_Z) { gaiaGetPointXYZ(rng->Coords, iv, &x, &y, &z); } else if (rng->DimensionModel == GAIA_XY_M) { gaiaGetPointXYM(rng->Coords, iv, &x, &y, &m); } else if (rng->DimensionModel == GAIA_XY_Z_M) { gaiaGetPointXYZM(rng->Coords, iv, &x, &y, &z, &m); } else { gaiaGetPoint(rng->Coords, iv, &x, &y); } xx = (x - baseX) / pixelRatio; yy = (y - baseY) / pixelRatio; yy = vert - yy; points[pts].x = (int) xx; points[pts].y = (int) yy; pts++; } } dc.DrawPolyPolygon(pg->NumInteriors + 1, borders, points); delete[]points; delete[]borders; pg = pg->Next; } ln = Geometry->FirstLinestring; while (ln) { // // drawing linestrings // points = new wxPoint[ln->Points]; for (iv = 0; iv < ln->Points; iv++) { if (ln->DimensionModel == GAIA_XY_Z) { gaiaGetPointXYZ(ln->Coords, iv, &x, &y, &z); } else if (ln->DimensionModel == GAIA_XY_M) { gaiaGetPointXYM(ln->Coords, iv, &x, &y, &m); } else if (ln->DimensionModel == GAIA_XY_Z_M) { gaiaGetPointXYZM(ln->Coords, iv, &x, &y, &z, &m); } else { gaiaGetPoint(ln->Coords, iv, &x, &y); } xx = (x - baseX) / pixelRatio; yy = (y - baseY) / pixelRatio; yy = vert - yy; points[iv].x = (int) xx; points[iv].y = (int) yy; } dc.DrawLines(ln->Points, points); delete[]points; ln = ln->Next; } pt = Geometry->FirstPoint; while (pt) { // // drawing points // xx = (pt->X - baseX) / pixelRatio; yy = (pt->Y - baseY) / pixelRatio; yy = vert - yy; dc.DrawCircle((int) xx, (int) yy, 2); pt = pt->Next; } } GraphicsGeometry::GraphicsGeometry(BlobExplorerDialog * parent, wxWindow * panel, wxWindowID id, const wxBitmap & bmp, const wxSize & size):wxStaticBitmap(panel, id, bmp, wxDefaultPosition, size) { Parent = parent; } ImageShow::ImageShow(BlobExplorerDialog * parent, wxWindow * panel, wxWindowID id, const wxBitmap & bmp, const wxSize & size):wxStaticBitmap(panel, id, bmp, wxDefaultPosition, size, wxBORDER_SIMPLE) { Parent = parent; // appends event handler Connect(ID_IMAGE, wxEVT_RIGHT_DOWN, (wxObjectEventFunction) & ImageShow::OnRightClick); Connect(Image_Copy, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & ImageShow::OnCmdCopy); } void ImageShow::OnRightClick(wxMouseEvent & event) { // // right click on the Image // wxMenu menu; wxMenuItem *menuItem; wxImage *Image = Parent->GetImage(); if (Image) { if (Image->IsOk() == true) { wxPoint pt = event.GetPosition(); menuItem = new wxMenuItem(&menu, Image_Copy, wxT("&Copy")); menu.Append(menuItem); PopupMenu(&menu, pt); } } } void ImageShow::OnCmdCopy(wxCommandEvent & WXUNUSED(event)) { // // copying the Image into the clipboard // wxImage *Image = Parent->GetImage(); if (wxTheClipboard->Open()) { wxTheClipboard->SetData(new wxBitmapDataObject(*Image)); wxTheClipboard->Close(); } } MyHexList::MyHexList(BlobExplorerDialog * parent, unsigned char *blob, int blob_size, wxWindow * panel, wxWindowID id, const wxPoint & pos, const wxSize & size, long style):wxListCtrl(panel, id, pos, size, style) { // constructor - the blob hexadecimal dump int i = 0; int rows = 0; Parent = parent; Blob = blob; BlobSize = blob_size; while (i < BlobSize) { // counting how many rows are there rows++; i += 16; } SetItemCount(rows); } MyHexList::~MyHexList() { // does nothing } wxString MyHexList::OnGetItemText(long item, long column) const { // return a column value int i; int c; int base = item * 16; wxString value; char dummy[64]; wxString hex; if (column == 0) { sprintf(dummy, "%08xd", base); value = wxString::FromUTF8(dummy); } else if (column == 1) { // prepearing the hex-dump c = 0; for (i = base; i < BlobSize; i++) { if (c >= 16) break; sprintf(dummy, "%02x", *(Blob + i)); hex = wxString::FromUTF8(dummy); if (c == 8) value += wxT(" "); else value += wxT(" "); value += hex; c++; } } else { // prepearing the ascii dump c = 0; for (i = base; i < BlobSize; i++) { if (c >= 16) break; if (isprint(*(Blob + i))) { sprintf(dummy, "%c", *(Blob + i)); hex = wxString::FromUTF8(dummy); } else hex = wxT("."); value += hex; c++; } } return value; } TilePreviewDialog::TilePreviewDialog(MyFrame * parent, wxString & coverage, int tile_id, int blob_size, unsigned char *blob) { // // constructor; just calls Create() // Create(parent, coverage, tile_id, blob_size, blob); } bool TilePreviewDialog::Create(MyFrame * parent, wxString & coverage, int tile_id, int blob_size, unsigned char *blob) { // // creating the dialog // rl2RasterPtr raster = NULL; unsigned char *rgbaArray = NULL; int rgbaSize; unsigned int width; unsigned int height; unsigned char sample_type; unsigned char pixel_type; unsigned char num_bands; MainFrame = parent; CoverageTable = coverage; TileId = tile_id; if (wxDialog::Create(parent, wxID_ANY, wxT("Raster Tile Preview")) == false) return false; int blob_type = gaiaGuessBlobType(blob, blob_size); Image = NULL; Painted = false; switch (blob_type) { case GAIA_JPEG_BLOB: case GAIA_EXIF_BLOB: case GAIA_EXIF_GPS_BLOB: raster = rl2_raster_from_jpeg(blob, blob_size); break; case GAIA_PNG_BLOB: raster = rl2_raster_from_png(blob, blob_size, 1); break; case GAIA_GIF_BLOB: raster = rl2_raster_from_gif(blob, blob_size); break; case GAIA_TIFF_BLOB: raster = rl2_raster_from_tiff(blob, blob_size); break; #ifndef OMIT_WEBP /* only if WebP is supported */ case GAIA_WEBP_BLOB: raster = rl2_raster_from_webp(blob, blob_size); break; #endif /* end WebP conditional */ #ifndef OMIT_OPENJPEG /* only if OpenJpeg is supported */ case GAIA_JP2_BLOB: if (rl2_get_jpeg2000_blob_type (blob, blob_size, &sample_type, &pixel_type, &num_bands) == RL2_OK) { if ((sample_type == RL2_SAMPLE_UINT8 && pixel_type == RL2_PIXEL_RGB && num_bands == 3) || (sample_type == RL2_SAMPLE_UINT8 && pixel_type == RL2_PIXEL_GRAYSCALE && num_bands == 1)) raster = rl2_raster_from_jpeg2000(blob, blob_size, sample_type, pixel_type, num_bands); } break; #endif /* end OpenJpeg conditional */ }; if (raster) { if (rl2_get_raster_size(raster, &width, &height) == RL2_OK) { if (rl2_raster_data_to_RGBA(raster, &rgbaArray, &rgbaSize) != RL2_OK) rgbaArray = NULL; } if (raster != NULL) rl2_destroy_raster(raster); } if (rgbaArray) { // creating the Image from RGB array unsigned int x; unsigned int y; Image = new wxImage(width, height); unsigned char *p = rgbaArray; Image->SetAlpha(); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { unsigned char r = *p++; unsigned char g = *p++; unsigned char b = *p++; unsigned char alpha = *p++; Image->SetRGB(x, y, r, g, b); Image->SetAlpha(x, y, alpha); } } free(rgbaArray); } else { // creating a default BLACK Image int x; int y; Image = new wxImage(128, 128); for (y = 0; y < 128; y++) { for (x = 0; x < 128; x++) Image->SetRGB(x, y, 0, 0, 0); } } delete[]blob; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void TilePreviewDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // Coverage and TileId wxBoxSizer *hdrSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(hdrSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString hdr = wxT("Coverage: ") + CoverageTable; hdr += wxT(" - TileID="); char dummy[1024]; sprintf(dummy, "%d", TileId); hdr += wxString::FromUTF8(dummy); wxStaticText *coverageLabel = new wxStaticText(this, wxID_STATIC, hdr); hdrSizer->Add(coverageLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // creating a control to show the image wxStaticBox *exBox = new wxStaticBox(this, ID_IMG_BOX, wxT("Raster Tile preview"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *exampleSizer = new wxStaticBoxSizer(exBox, wxHORIZONTAL); boxSizer->Add(exampleSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBitmap *img = new wxStaticBitmap(this, ID_IMAGE, wxBitmap(), wxDefaultPosition, wxSize(480, 480), wxBORDER_SIMPLE); exampleSizer->Add(img, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK button wxBoxSizer *okBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handlers Connect(wxID_ANY, wxEVT_PAINT, (wxObjectEventFunction) & TilePreviewDialog::OnPaint); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & TilePreviewDialog::OnOk); } void TilePreviewDialog::OnPaint(wxPaintEvent & WXUNUSED(event)) { // // PAINT event: drawing the Tile Preview // wxStaticBox *imgBox = (wxStaticBox *) FindWindow(ID_IMG_BOX); ImageShow *imgShow = (ImageShow *) FindWindow(ID_IMAGE); double horz; double vert; wxImage scaledImg; wxSize sz; wxSize box; int boxX; int boxY; int posX; int posY; if (Image && Painted == false) { ::wxBeginBusyCursor(); if (Image->IsOk() == true) { horz = Image->GetWidth(); vert = Image->GetHeight(); sz = imgShow->GetSize(); box = imgBox->GetSize(); while (horz > sz.GetWidth() || vert > sz.GetHeight()) { horz *= 0.9; vert *= 0.9; } if (horz == Image->GetWidth() && vert == Image->GetHeight()) scaledImg = Image->Copy(); else scaledImg = Image->Scale((int) horz, (int) vert, wxIMAGE_QUALITY_HIGH); wxBitmap bmp(scaledImg); imgBox->GetPosition(&boxX, &boxY); posX = (box.GetWidth() - (int) horz) / 2; posY = (box.GetHeight() - (int) vert) / 2; imgShow->SetSize(boxX + posX, boxY + posY, (int) horz, (int) vert); imgShow->SetBitmap(bmp); imgShow->Show(true); Painted = true; } ::wxEndBusyCursor(); } } void TilePreviewDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } spatialite_gui-2.0.0-devel/config.guess0000775000175000017500000012761512543275035015076 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: spatialite_gui-2.0.0-devel/mac_resource/0000775000175000017500000000000012544030130015253 500000000000000spatialite_gui-2.0.0-devel/mac_resource/Makefile.in0000664000175000017500000003105112544013516017251 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = mac_resource ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GEOSCONFIG = @GEOSCONFIG@ GEOS_CPPFLAGS = @GEOS_CPPFLAGS@ GEOS_LDFLAGS = @GEOS_LDFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEXL_CFLAGS = @LIBFREEXL_CFLAGS@ LIBFREEXL_LIBS = @LIBFREEXL_LIBS@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS = @OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WXCONFIG = @WXCONFIG@ WX_LIBS = @WX_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = wxmac.icns all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mac_resource/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign mac_resource/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: spatialite_gui-2.0.0-devel/mac_resource/wxmac.icns0000664000175000017500000070531712543275035017223 00000000000000icnsŠÏics#H?ÿÿþþÿÿÿüÿðþ?ÿÿþþÿÿÿüÿðþics8þ¬¬øøþüV÷÷ýþùV÷+üýˆˆúVV÷+¬ˆ]9]]]VöVýdddddd]÷¬Ñˆd@d@@@d‚éÑ­ˆ9dd:@@?ˆ§þ­§ˆdd@@@@9¬§éê§§ˆˆddd^‚§­û{|¦¦¦¦§èéþýVVVû¬ˆ¬þþýþýüýis32š®ª¿‰Ž´µ£ˆ—·¾¼‡Œ•›µÉ¿ƒ fyˆŠ—”»Ï U‡¥¶ªœ£ØÐ¶‚ s“¤®­¬¤¬ËÌ H-^ž¶±´··©q# .*Š´¯±¹Á¼³w&1€ -&z ¥³¿À¿´`'3€ 7,0Ov’›—†Y.3U€qxp]EDKJ;-9ª‹t“›°£ŒŽ–‰ƒœ›–š®ª¿‰Ž´µ£ˆ—·¾¼†?Œ•›µÉ¿ƒ fRQPˆ›•ºÏ UUWUT_]œÙж‚ MKEC877qÌÇ HZFGK>EADJpU \\VV@;MIGLQYb€ f^QD6:EEHQNao€ wobHADDIU^jz€cz‡uouuvƒ‹ª‹t“™­“U^_\‰ƒœ›–š®ª¿‰Ž´µ£ˆ—·¾¼†?Œ•›µÉ¿ƒ fRQPˆ›•ºÏ UUXVT_]œÙж‚ KG>>977qÍÐ H.BH;:>DLS UW@9>EGN@ €  MH8;DEKV6€  +7:;:' 8€qxfJ$  ÿª‹t“œ²•JTWs‰ƒœ›–s8mk#W]åøpÿÿû2&óÿÿÿ\i¾ÐØÿÿÿÿD¤ÿÿÿÿÿÿÿÅ_ÿÿÿÿÿÿÿò<|ëÿÿÿÿÿÿÿåNŠÒÌÿÿÿÿÿÿÿ¦éC¬Û¼ÿÿÿÿÿÿýŸý^ Âüÿÿÿÿÿÿÿø– ©ÿÿÿÿÿÿÛ‚5!IÍÿýÙƒx‘fC!@r6ICN# >~þþÿÿ7ÿÿÿÿÿÿþÿüÿü?ÿøÿÿøÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿøÿÿàÿÿÿüÿüñÀ >~þþÿÿ7ÿÿÿÿÿÿþÿüÿü?ÿøÿÿøÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿøÿÿàÿÿÿüÿüñÀicl8ý¬ø÷üýù÷ø+üùø÷÷÷üVùøø÷+VýVùV÷ø÷+øúVùVøø÷÷÷¬ýVVùøø÷÷÷+¬ý¬ˆˆˆüùVVùVø÷÷+÷þþˆ]]]]]]øVùùù÷÷+öVþû]]]]9]ú]]úùø÷+öö¬þû]]]999ddddd]÷+ööVü]]]]9:ddddddd2ö+÷ýþˆddddddddddd@d]ø÷þ¬ˆˆdd9@ddd@d@dddVúêþ­§üd]999d@::@@@@@d]¦§ýê§§­û]]99dd@::@@@@@d]¬§§ý­§§þˆ]]9ddddd@@@@@@d]ýý§§þ­§§þ¬]]dddd@@:@@@d@9]þý§§þ­§§­¬]dddddd@@@@@@9]ˆþ§§§þê§§§§üˆdddd@@@@@@99^ü§§§­ê§§§§§¬ˆddddddd^‚¦§§§§­þû §§§§§§§§§§§§§§¡§§þþùúú{|§§¡¡¡¡¡¡|¦§éêýùùVøø÷øûˆ]]]]]ˆþþ¬ûúùùVøøVúýþ¬¬¬ýþýûû¬ýûùVøüþþ¬ýýüýil32 Ù¦™™‹³°·£—¤Á±È§–‡‡°³¸Â´•‹’в±¹ÅÁ” ƒ›’³²¹Ê¾‘’ •ž†Ÿ°²ÁÂĶ U„ž—‡§«¹¿ÃʺŒjrx}vu• ’Ž–¥»ÁÍɪŠl{ƒ’›¡¡ŒžžŽ‹¶ÂÌØÃ‰t•¡©¯³œ™–І¥ÃÎÕØÀ‰l}œ§°´¹µœ¡¡Œ¸ÌÖàÄŠ|𤬱¶»¯§ª¨ š˜µÔÌê‰|‰‘•𢬭²°®´ª™¸Å¸ˆ™8Bc}–«¼¶€²´²¶²¨¬Š4‡A1-M‰«ºÂ¬´µµ·¹¾·³¦“?+8„G/,2~¨µ¶¬®¸¹¹¾ÀÀ¸µ¬Ÿh(-4ÿƒ4++>™«»§¨­²±ºÀÂÁºµ®¡ž+*,B‚1)*8š¥Ÿª°´»Ä¼²³³›™*(-:ƒ4,()l‘”˜ž¥¨°¹½¹¹·»¾±—8().FƒJ3,(.Wv’œ¥®·¹½¼»½¿´M%)0:ÿ„O6,'%1Kc‚•¡¥§£Ÿ‘oK+&.3@†^J2)$$',2420*#$*05;P‡c~€}qT;;6589;@MI>D]ˆhq€‚“¤°º­ww”•”‹‡Œˆ–yn~ˆ‰™¢¬¨¾¹}€‚†ƒ‡ †–Œwwˆ¡¨’–š–†ƒ?€žÓÙ¦™™‹³°·£—¤Á±È§–‡‡°³¸Â´•‹’в±¹ÅÁ” ƒ›’³²¹Ê¾‘’ •ž†Ÿ°²ÁÂĶŽj_„ž—‡§«¹¿ÃʺŒURPQMR• ’Ž–¥»ÁÍɪŠ_UPSRSQr¤¡‘‹¶ÂÌØÃ‰_UT€R Qcxqxu†¥ÃÎÕØÀ‰\SU€S TMF:784^¹ÍÖàÄŠXXTRPNM>59<99=’ØÌê‰bMB9546488:;ˆœH‡UYcJHTUVM;=OQBDCDFFR]ZZ?„_YcbWUSTO8:=TVHJG€JNXX`^„_b[`UUTT=6:;CJIHGFELU\N]bkƒbdY`VWS?79:9EMGGECJTS_K\klƒhm_RXTC8899=EGDCDK€TLQdrwƒ trp`SG7878@€C EFLQOQUfz€‰†sw€{vrha]WUXW_ek{ƒ„‹‡c~}‡ƒp|‚Š‹ˆ†ˆ„Ž““ˆhq€‚“£­·¡TKafdb\YYˆ–yn~ˆ‰™¢¬¨Â¹UTPSU\‡ †–Œwwˆ¡¨’–š–†ƒ?€žÓÙ¦™™‹³°·£—¤Á±È§–‡‡°³¸Â´•‹’в±¹ÅÁ” ƒ›’³²¹Ê¾‘’ •ž†Ÿ°²ÁÂĶŽj_„ž—‡§«¹¿ÃʺŒURPQMR• ’Ž–¥»ÁÍɪŠ_UPSRSQr¤¡‘‹¶ÂÌØÃ‰_UT€R Qcxqxu†¥ÃÎÕØÀ‰\SU€S TMF:784^¹ÍÖàÄŠYXUSOML>59<99=’ØÌê‰nK<.&$&+88:;ˆ…$‡4'FTVWM:;=<;@CDFGR#"„7 YVSTO89;=<@EG€JOHÿƒ 8W€T=6::9@FGGFELUl (‚ ÿ -YWS?79:9?€F ECJTSy !‚ÿTWD8899=DEDCDKTUX'  +ƒ?46;:9=ABCDDLUVK+  ÿ„7(7?BCDDFD4  ÿ†‹S2   7‡c~‚ye> $#Pˆ hq€‚“¤±¼£QBPSXrˆ–yn~ˆ‰™¢¬¨Â¾YXUV[d‡ †–Œwwˆ¡¨’–š–†ƒ?€žÓl8mk+I ‹÷ù_8Éÿÿÿ—ˆòÿÿÿÿ”|ÿÿÿÿÿÿÃHÿÿÿÿÿÿÿâ Óÿÿÿÿÿÿÿü< Oÿÿÿÿÿÿÿÿþ?H—ËßÙ¹àÿÿÿÿÿÿÿÿõ!(´ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÆ;âÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûA!ãÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½¨ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿø9,÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿøƒ[ÎÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÛ1'½ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿô Üÿ°ÎÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþéÿŒ“ÿû-ºÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBŒÿü2Åÿü2”ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿý(›ÿÿ\ÿÿÀýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÖgôÿú/Ðÿÿðýÿÿÿÿÿÿÿÿÿÿÿÿÿÿïúÿÿ~ ®÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿñoÍÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿã))ÈÿÿÿÿÿÿÿÿÿÿÿÿÿÿéŠGZêÿÿÿÿÿÿÿ÷þÿÿÿÿñ¨(S¦ÿÿÿÿÿÿÿä—39p‰Y!J’ pZ¸÷ÿþ¹¯eW6/jBit32V•ÿÿÿÿÿÿÿÿ㑎ªø…š¨‘?õˆ”Ÿ¨¸°‚ô ™°¹··“¾±|ñ …¨½¨¶´µ¨›ÍϨu™î‡°Î¯¬µ´¶”¼ÌÄž¤s‘눂²ÌƤ´´µ¨œÌɳÁÄ¥‡ê‹ˆµÌɹ¦¶´¶”¼ÌºÀÐÆšÿè‘ЉšÆÇɪ°´µ©œÍƳÏ˘qçÿ“‰‘ޤÉÇ£µ´¶”½ÍµÆÎ¬šzäÿÿv„”‹¯Êɳ©µµ¨ÎÁ·Ñ¿‘±‘p㈉‹w…Œ¼ÈÈ¥²´¶•½Ë²ÌÊ—µË²–â~‚zŠŽÆÈ¾¥µµ¨žÎ»½Ð¨ ÖÇ™âw„‹vŠ›ËÉ®¬´¶–¾È²Ð¼Ëϱœáÿx›Šˆu‘…¬ÊÆ£´µ¨ Ï¶ÅË’¹ÔµÏ àw’ „€{‘…½Ê¹§µ¶–¿Ä¶Ñ¤¢Ö¸ÆÒ¼Þ™‹†¡š„’wƒÇÉ©¯¶¨¡Í³Ìº’ÑÀ½ÒÆÍ§Ýyp~ŸŸ•‡‘r‹ˆžË£µ¶–À¾½Ì¿Ê·ÒÈÅÍ¦Ü ªu‚—Ÿ ŽŠr‡±Ì³©¶¨¡Ë²ÑŸ¦Ò´ÏÉÄÆÌ¬Ü!sƒ–Ÿž ˆŽ…v‘ŽÁɦ²¶–¸ĸ“Ò¶ÊÊÀÇÆË¯qÚ›u‘Ÿ€ž…‘~~‘Œ–ɾ¤·¨£ÇµËŽÅ½ÃË¿ÇÆÆÉ³žÙÿs…šžžŸ™…‘w…Œ¦Í®­¶˜Â´Ëœ¯Æ»Í¿ÆÉ´yÙq‹™žžŸ“†ŽsŒ·Ç£µ¨¤Â¼µ–Ì·Î¿ÄÆɵި¢z®›žž Ž‹ˆv“ĺ§·—À³ÆÆ¶Í¿ÃÆȬ¹¶×%pš²žžŸ‡Ž{ŽŸËª±¨¦¼Ã›³»Ç»ÁÇÆÆÇƧµØ»qÖ'g´«}žž„x‚¯Å£¶˜¼·² ÀÀ¿¾ÇÆÆÈâ»ÔÓÇœªÔ™m¤¬¨z€ž™…s‰“¼¶«©§¸¾’ÁºÂ¹ÇÆÆÈ¾ŸÀÔÑÓØ¶Ô'`{›¡¤|žžŸ“ˆ‡xžÅ¦³š¸»›´¹Ã°ÇÆÆÉºžÄÔÒѺ¿­Õ{q˜¬žžž Œ‹€|‘ªÀ¥ª¦¸¬¢ºÂª€Æ ɵŸÊÓÓÍ´¿Õ¬Õ'f† ®›‰žžŸ‡Ž}Œ—³°®´µœ¸À¬ÂÇÆÉ¯¡ÎÓÓDzÇÒÌÔ(tv¤›¯—ŒŸž…|†Œ»¦©¤¶ž²½«¾ÇÇȤ¦ÑÒÓ¾µÍÐÒ½†Ã ¿–…y—Šz{k™²€)£p£›°”ŠŸŸ˜…‹‰‘¦¶¨œ­¢Ÿ»ª¸ÈÇÅ «ÓÓз»ÐÐÏÕ¸H¿7Ì—|ndd_XihZLLS^eigs‘v¥Ÿ¯”‡ŸŸ’ˆ‡‚‡™­¬§xx¶¬³ÈÈØ¯ÔÓʲÃÑ€Ïׯ½9ª†tlgstqpqr{}ylmjmrrkb~¤£› ¬“ˆŸ Œ‹„„ˆ ¬©‰jƒ®¬¯ÈȾ“·ÕÓóÊÑÏÑœº:Ìwedikjy€‡‰‡•Œ•””’„„€€vp £¢§¨”‹ŸŸ‡€‡Ž§ª¡kw «©Èɸ’¾ÕÒº·ÎÐÏÐÈœˆ¸:Ôxgnmqy{tˆ~…•‘ƒ —„›“~†€r¤¢¢ƒ®¤—Ÿœ…‹€†˜«§ƒk§¥Çɱ”ÄÖε¾ÑƒÏÒ¾“·;tjpjtƒ…ƒŒœŠ–ŒœšŽšœœ”¢Žb•¤¢¡ˆ²Ÿ™ ˜†…„ƒ¥¤i€ŸšÄʪ–ÊÖDzÆÑ„ÏÕ«¶;™ukvwy|„Š˜Ÿ‹ž–¦©›°š³ «§•­–wr•£¢Ÿ“´œ™Œ¡’ˆ|‹†­”kr’ÂȤŸÎÕÀ´ÌЄÏÒÕ–¶;ruy{ŒŽŒ{Œž—°™©­´§¡µ—¥~†z”£¢œ“´›šŠ¢Œ‰~‰’­{j‰¹ÇŸ¤ÒÒ¸¹ÐЃÏÑÕܴе:”jz|’‹”˜¬¤“£ŽŠŸ’‡œ™‘ ˜Œ žt|šx–££–޳˜œŒ¡ˆ…‰ƒ¦›lt±Åš«ÕͳÁуÏÑÕØÚÔ†m³;ª€oru‹”Š›˜Œ««˜²¶˜·¾£­¼¬ººžÀ¦mŽ˜{—££’“±—žž„…•´}nn«À˜´ÖŲÈÑ‚ÏÑÕ€Øßµ³;¶}q~~|‰Œ —­­—­¶¡¦¾¼œ½Á´¬ÄÄ¥µwŠ’•~•¡¤””«˜Ÿ”™Š˜Š¢qf »˜ºÔ·¶ÎÐÏÑÕØÚј³@¶tt€”…Š®°š©µ°˜»¼²£ÁÁ­­ÃĬt‹™›Œ£ •˜”u€ˆ…Œ…}a•²šÄÇ¥ºÑÏÏÐËÎÔƒØ߸U²?¿pw“Ž‘¨œŠ•—”š°µž¯¿¿¦±Á®²ÃÆu¢™–£¦—›–‚}‹’€–uvsЍ¢Æ²˜½ÐÏÑËÁÊ„ØÚÏŸ³?tnƒ”§£”°´¥™¥Ÿ™‰§§­˜µ·»¥²À¶iŸ™™„‘”Œš¤œ¢”‚™‰s…£¦ÁŸ™ÄÎÐÏ¿»ÐÙ„ØÞ¯³?zkv”‘Ž¥¦•©²±ž¹¿¿¨µ»´¨š´¬ª˜ª±•}œŸŽ—ª±¦–®¬¦‰Ÿ›”†’†y›¶˜ ÄÐÑÇ¶ÄØÙ„ØÚ̇ÿ±>ƒi|rŒ“‹¤§˜¢³³¤ª¾¼¹§ÆÅÈ´¸ÎÌγʹ«ª”µ°¶¦—²²¯•£ª¯˜Žœ§Œ”“}ªÈÒλ¹ÒÚ†Øܠб>²lyx†‚¡¨š³±®Ÿ¼¼¾­¶ÆÄƨÂËÊ̲¼§¯¬“°¯²¯’¯²®«”«­ª‰™¡›ƒ–~‚ÇÓõÇÚÙ„ØÚÛÙÀ~² xtzƒ—‰•‘˜•€²Ÿ³½¼¼¦Ã€Ä¥€Ê!˳³¬´­•«°²²š§²®¶“¢®©ˆ›™zˆ¡”™¨¹ÔÚƒØÙÛØÊ·¶—s±;Ár}{–Œ“¨¤Š™ ©§§À½¾°±ÆÄÅ»¬ÍÊĘ̂¤¯´¯—¥±±²¦›±¯µ¦“±©Ÿƒ’–š‘£š}¬Ý‚Ø ÚÚ×͸£Ÿ·º²I€x“‰¤¦œ›¶­£‹ §¯¸§ÂÇÇɲ¹ÏÌÌÄ•ª¯³®›Ÿ³²³±•¯²´­Œ›‘‰”’¥«±‘“¤¡ÍÚØÚÚÕËÀ®¤ª¼È΢²Jªtp‰—ˆœ¦¥°µ¶®­À´ª‘¢¤§«’£©¦«¥•«­°ªŸ–¯©«§Š“šš™”¥­²¦š¯®ª’ª«” ÚÕÊ¿¹°­µÂÉÈ̲ˆ²D}up•ާ¦™Ÿ¸µ³›®¬¥ŸŠ”‹‡x‡††‹–Œ››˜”†¢ ©©Ÿš¶¹´¹±¨ª¶ ­±¸¢›«¨‰¥¼¾·²ºÅÉ€ÈƲJ¿{u‚ƒŠ¥§£Œ£šŽ‚|Œˆˆ‰{“•–—“†Ÿž£­µ™¹·»·³š¾¹¿¼µ¢¾»²º¢£´¾¾ª¦¹¶´‘ ¤•¸´½ÆÉÈÉÆÁͧf²I…xz“‚ƒ†sv|}t…Œ‹Œ‡‚—••–Š ¨®±±šº·»¸·»·¾º·ž¼»±¶±¢Â¸ºÀ¢±¯°¥•› ÊÈÉÈÁµ¨«·‡²Iª€v}yfkbcg~~|xŒ‹‹Œ€Œœ ¦­œª´®»²°¢º¸º¸º—º¸¿º¸¡¸»®¹¼¡³»¼»©¥·´¨~¤˜‡Áƹ®®¾¢‡”²IÿzaX\T`llbju{w‚Ž’œ¦—»ÄÉËϲĮ·¼³®§º¸»¸½š·¸Àº¶«±»²¹º§ª»¼ÀÀŸ¢–Ÿ •¥¤‚®´Áʾn±JçgK:@QXWjklh{wty|¡³¾Ä¾¬ÏÌËËÍ«°¯¼»µ©¥»ºº¸¿˜´¸Àºµ´ªº¼µÀ¿¦Ã¼±¦“š°µ²Ÿž‹•ÈÈÇÊÿ°N¿aF3+1FXV]mlhn†•§¨£±«ª²©³ÌÌÍÍʘ®¸¼»¶¥¥»º¹¸ÀŸ±¹Á»¶¿¦»½ÃÀ»—Ÿ¥­¸µž±ªª”•¢ „½ÇË¡>C_â¬RÌRA4.--6HXVfkrw›±µ¶¥¸ÄÁ¼·ž®³²·¼¤‘²±¸¸¶¥ªº»¸¸¿©¶¹¯§®”¤«°°µ¤©¿¼¸µ‘¤ª°ª‘¤¤‹–ȾO&,3HfÌ©yH0))*+.;MOYr‡›–´´³³¢¿€Á4®ÎÌÉŬ“™¡š¢Ÿ™’ž¦¦¢¡¦‘’¡¦¤¢²Ÿ·ÅÂÂÄ·¡¸µ´¸¡¨´²³‘Ÿ¤”€Ç'€*+6Mÿ¥¶R8+)*)++/>PSo›¦œµ³³®¥Ã€Á5¼°ÏÍÏÁ­¤°½½À¼»§±½À¼¼Ã­¨Ãƾ¾Æ²°¾½¿ÁÀ ¸¹»¾²´²´ —™Ž‹”N)+€-,0>]é£I1+,€-R,-2Bi{š–«´³´§±ÃÁÁ·¹ÏÍϵ° ²»·¿¼½©´¿Â½¼Ä²§ÃÁ¾¼¸µ­ÆÆÅÁÂ¥¸¾½½¼™²³¶°…”¥‹yN..+,)*))1HŽ¡h:+) +-/.9cЀ𛉭€´¢¼€Á@ñÁÎϾ¤¯µ»µ¾»½ª¶¾Â½¼Ã¶¤Á¾ÀÅÌÇ­ÅÀÁÃÈ®°¾½¾Á¦¯·¨Ÿ‹¡¥’t5(*)*(*)*,B|ŸR5*)+*+-Nkyˆ—žª±£Ã€ÁA¬ÈϾ§­­¹º¶½»½©µ¿Ã¾»Â¹œ¾¿ÈÎÉĦÃÅÆÅÆºªÂÂÄÆ³˜Ÿ¦µŸ› ’“y<)*),+,,..@lœ¿e2€+[,*,*+*Iáu€„‡ž’±©ž—Ÿ»ÀÃÂÁ¬Ï¿£°¯«Ÿ»º¸½º½©¶¾Â¿ºÁ¼¡ÀÅÈÄÅȨ¾¿¿ÁÊȨƿµ¬§–³µ¶¤•¡ª‘¤ˆ:*,*,(+(+*;y›by=),(,(,*.-=ktx‚ž¤¯¯± ¨¬§¬´·¶Âªª²®©ž¼º¹¼º½©¶¾ÂÀ¸Á½¡º¿ÀÃÃÆ«¾ÈÊÊÈß©©±ºÁ¥³´µ­©¯„—Z8%*&+'+&+*Aª™)Ú?()'*()(*'7‰¿usz—‹ª®®¯Ÿ¸Â¾¸° ™–ž¡©«¦¢¾€¼.»¾ª·¾Â·Á¼¥ÌÌËÌÎз¶¼´²±·¥´ÂÂÁ¦°µµ²®°‹Š—u/&(€)*)*.Mª˜^.'*'+&+'**Nÿq{s—›€®K¯ž¼¿¿À혧¤žœ™’•§¦¨ª®²¤¯²··­±¶¥·³µ¶µ·ª§¼ÁÆÉͳ±À¾¾¿¨§®®°˜¬…‘åI(-*-)-)--3^—ÚA)++,,+,,*3xªp}w„”™’°®®­Ÿ¿6 ±¯­¬­ ¤¶±²­««—¤§°®¨ª³žº¿ÂÅÇɼ±ÄÁÁÀ¯¤·´´µ¦š©¶¾¥“›’Œ‹€ {1&&)&*')*,;Ÿ–f2*+'*'€(0'Eâÿd~y’‡…™²®®«¤Á¿¿À¶‰¤°®­ª­ ¨»º½··¼µ¸ÀºÀÈ˦ÇÊË Â°ÄÂÁÀÁ·¥½€¼ ²šºÁ¸—’©’Œ…€ ž6$&(')((**3t• ªB*'+&*')('$Rå€Fz€y”•‚‹¥®°§¨Á¿À¸Š§°°­«¯ «º¸½¶´»ž¶¶¸¿ÍÍÎ¥ÇÊÈÇÇÆÀ­ÆÆÇÈÊĦ¼¹º½¸¤»¨£¡›¨’‹„€ ª3%()*)+'+)/Z• ×D)'*&*'*('%Jâ€1€y”•Œ˜š–£¤¯ÂÁ¹ Œª¯°­¬¯­¹¸¾¶²¼ ¸µ»ÈÇÆÈ¢ÂÈÉÊÌÍɱʀÈÇŤ¾½¿¾·¡­¹¨š¨”zx€ÿC&(€),*.,-GU” –6)(,*,++*))FÔ€)wq{”•‹›©¥›¦¹³œ£­¯±®­®ž°¸¸¾·±½¡´»¿ÁÂÄǨÁ‚ÆŪÂÁ¿¿¾¾Ÿ³°§Ÿ­œ´·¸¨›¨”lŸ€ ¦6#$(%((&+*.A¿” Ž8,*,(()&)%&:¦€#•ku••‹›¨§©š¥£‡Š“ž‘²¯²®®­´¶·¾¶±½žºÊÌ€ËͱÆËÊÊÉÇÆ«ÁÂÃÃÁ¾šž §¾Ç£´¶·©›©Žt€Z(%$($)&(€*<Œ”VŽ9*)((&*&('&']¿po’–‹œ¨§¨š¯¤‘“ˆ‰† £«­°­š¸¶·¾·³¶¡ÈËÊÉÉÈʨ¾ÆÆÈÉËͱ¾¹±©¦¬š£²ÂÄŤ³¶·ª™}‚€ªE&€)&)%))+*GÆ”¥>(+'*&()&*''7 €Dwq{œ¨§©–“–Ÿž––£›š–š™­«¯¸¹°³£¿ÂÃÅÆÈÌ©¾ÈÄÀ»¹µš¦­¶¼ÂǨªÀÄÃÅ¥³¶·­‚|€ a1&&*'++),),-N–BS-*())(,+*+'*J¦{s€ƒž¨§ªŠŸ¡œ˜“”®¨«¨©‘§Ÿ£ž¤“ª®¯°°¯¯›£ª­±´¸¿Ÿ¹À€¿ Á¥·ÄÃÃŦ³·¶š†šz‚†4$$(%'*&*,-.1U–1t6(+*-(')%'(%(''*)&*'(,),,/RÌ—df9*,)(+&')%'*((Af‚nŠ…†‡mtw–¢¡˜œ”–¬ª¦§­£‘²¯¯¶¸¸º¤¾ÀÂÃÄÄDz½ÆÅÅÆÆÉ¤»ÂÁ½ÅѰ»ÆÂ¸«’£¬¬Ž·O1%%(')-,*,)+-,E”˜cÌ]3*,))+&),+))'%-Kg‰js}€s€Ž”˜ž”•«¬¤¥­©”®®»Á¿¿À¨ÀÁÁÀ¿¾À¬¶¾¾¿¾¿Â ·¿¾ÀÏÒ°´±¦©³œ¬«¨•z9)#&'%(*')..,-+;oš/¿[5*-)+.,(*)&''%%2dp^zy„“ˆƒŠŠ’ª®¦¦¯©«®°±³³µ¡¸‚»-¼§±¸·¶µ¶»œ®ÀÄÈÁº˜Ÿ¯¸»µœ¬¯¦„`2&$'&&*)'*,*,0/5Z›`ÿP0+/-*,+'(*(&''$$0Ln€„|˜ƒ~’˜–ž¢£—¿¾¼º¹¶µž´·¹»½¾Á®¹ÅÅÆÇÆÇ¯¹°­°ºŸµº¹º¯¡¯–d4$%*+((*((++*-/-5QßÈS3€-R++,)')*'(+*'%-Geyš‹~Ÿ“‰Š”Ž¥¦ª­±¶º§¿ÁÁÂÂÁ𵸳¯«ª§•­¸¾Â⸻½À§zR+ $&'&(++*),++€.9T›Ÿ#¡C5.-.-*+,(),,)&&'&#$2Kw‰“’€¢š– ¤£Ž„§•§ª€©+ª¬›¥®±´¶µÄ°ÀÂÁÁÃÄ¥»¬’l?$ %'&')*(')-/,,/-/?bâ¡Z–[<1--.,+..*'())(&''%#(:Lavq•œ«°®®‘°³³²°°²š³·¸º»¼ÀŸ³¾¼º·ÅÊ¯ÄÆÇ³•eN3% %)*&'*)((*-,,-00-4Ku£#vL8/-.0-++,+)((*)'(+(%##&-FRiÔ¯“ns„{€†|‹ƒvzJA:20/0/..--ƒ,-/ˆ-0€-€./€0 /010248:856J€NO€QRQCELWbp}z…„{°·D‚ejhozŒˆwus‹t‚…†›‘z|„Š‹ˆ€wnb_idvzvqlhxwvvsmr~…{vx‡‹’™¢¦¨£…w€¶1¸tpa}jv}†‚ns‘y}˜«§©´ÂÉż·ª©Á¾¶²£tZ]fz}}{uœ¡¥¦§˜–«€©«–œª¨©ªž•Ÿ•‰w{xˆ·2ÿw[wq~utƒxƒp‡mˆ£¥˜’œ§«¬±¿ÎÙÝÙØØ×ÕÓÍŸqabip„”¡¡¢¤œ•©€§© ¤ œ™‚„†…pvŒ™·CÔp^jnsszuŠmm‹•¡¤ –‘˜¢¤£ª¹Ë×ÙØÖרÚЬdh‡…~q„…‡‹ˆ’|Šˆ‡‰z‚Œ‰uÌ·Bÿzn[fooxp~y‹k‹“–•‘”™¤­­§›‘’œ¢›•›±É×ÛØÙÕ´™‡‡†v~ŽŒ‹‰}ŽŽ‡’…yŒŒ™¸)Ô«ig`ipkskƒxz„‡ŒŠ‰Ž’•¦³¼¾¸´µ±¥€‚¬ÏЧ™znsmtvr{||~qpus’´¸+Ô£š„uniejlpluƒ ›„~ƒ|‡ŽŽ—¢’Ž–§¯¯®²¹Ã¦di«¨† Ux{nR`jxsz¹+Ìœš’†„„‰rgfrmrsy‚}†’“ŽŒŽ”–……‡…‰–•†Šœ³³‘˜mÎ,‘“—“‹Š‰‹‡|ythhz~‡Œ–¢¤’€vuw|€Š—–‘†„§·›‰•ªÍ,m‹’–’’‘Œ|ni{ÿ}s{tuwx€‘Ÿ¸ÍÏǼ«•ƒ~ƒ”¤ž•­Ÿ‘”¢®Î ˜—š˜™“‚tpnÿ›„uqrwpqˆŽ§ÅÕÖÔÐË£di’¦§‹—žÿÎ •„ŸŸœ‰tchÿ†¡ƒ|ƒ}vwuw|޶ÐÖ½¦_Ÿ›–£Ï ™qzˆ„¡€tqU‹ ÿz“˜™’‰z€}’²‘Ö…{„{ram‘“•¤ˆ‰›“Ø€ÿ˜ÿ—œÿÿÿÿÿÿÿÿÉÿÿÿÿÿÿÿÿ㑎ªø…š¨‘?õˆ”Ÿ¨¸°‚ô ™°¹··“¾±|ñ …¨½¨¶´µ¨›ÍϨu™î‡°Î¯¬µ´¶”¼ÌÄž¤s‘눂²ÌƤ´´µ¨œÌɳÁÄ¥‡ê‹ˆµÌɹ¦¶´¶”¼ÌºÀÐÆšÿè‘ЉšÆÇɪ°´µ©œÍƳÏ˘qçÿ“‰‘ޤÉÇ£µ´¶”½ÍµÆÎ¬šzäÿÿv„”‹¯Êɳ©µµ¨ÎÁ·Ñ¿‘±‘p㈉‹w…Œ¼ÈÈ¥²´¶•½Ë²ÌÊ—µË²–â~‚zŠŽÆÈ¾¥µµ¨žÎ»½Ð¨ ÖÇ™âw„‹vŠ›ËÉ®¬´¶–¾È²Ð¼Ëϱœáÿx›Šˆu‘…¬ÊÆ£´µ¨ Ï¶ÅË’¹ÔµÏ àw’ „€{‘…½Ê¹§µ¶–¿Ä¶Ñ¤¢Ö¸ÆÒ¼Þ™‹†¡š„’wƒÇÉ©¯¶¨¡Í³Ìº’ÑÀ½ÒÆÍ§Ýyp~ŸŸ•‡‘r‹ˆžË£µ¶–À¾½Ì¿Ê·ÒÈÅÍ¦Ü ªu‚—Ÿ ŽŠr‡±Ì³©¶¨¡Ë²ÑŸ¦Ò´ÏÉÄÆÌ¬Ü!sƒ–Ÿž ˆŽ…v‘ŽÁɦ²¶–¸ĸ“Ò¶ÊÊÀÇÆË¯qÚ›u‘Ÿ€ž…‘~~‘Œ–ɾ¤·¨£ÇµËŽÅ½ÃË¿ÇÆÆÉ³žÙÿs…šžžŸ™…‘w…Œ¦Í®­¶˜Â´Ëœ¯Æ»Í¿ÆÉ´yÙq‹™žžŸ“†ŽsŒ·Ç£µ¨¤Â¼µ–Ì·Î¿ÄÆɵި¢z®›žž Ž‹ˆv“ĺ§·—À³ÆÆ¶Í¿ÃÆȬ¹¶×%pš²žžŸ‡Ž{ŽŸËª±¨¦¼Ã›³»Ç»ÁÇÆÆÇƧµØ»qÖ'g´«}žž„x‚¯Å£¶˜¼·² ÀÀ¿¾ÇÆÆÈâ»ÔÓÇœªÔ™m¤¬¨z€ž™…s‰“¼¶«©§¸¾’ÁºÂ¹ÇÆÆÈ¾ŸÀÔÑÓØ¶Ô'`{›¡¤|žžŸ“ˆ‡xžÅ¦³š¸»›´¹Ã°ÇÆÆÉºžÄÔÒѺ¿­Õ{q˜¬žžž Œ‹€|‘ªÀ¥ª¦¸¬¢ºÂª€Æ ɵŸÊÓÓÍ´¿Õ¬Õ'f† ®›‰žžŸ‡Ž}Œ—³°®´µœ¸À¬ÂÇÆÉ¯¡ÎÓÓDzÇÒÌÔ(tv¤›¯—ŒŸž…|†Œ»¦©¤¶ž²½«¾ÇÇȤ¦ÑÒÓ¾µÍÐÒ½†Ã ÿ–…p‘q{s`™Ìÿ€)£p£›°”ŠŸŸ˜…‹‰‘¦¶¨œ­¢Ÿ»ª¸ÈÇÅ «ÓÓз»ÐÐÏÕ¸H¿7ÿoYRROIROIECFQSYZq‘v¥Ÿ¯”‡ŸŸ’ˆ‡‚‡™­¬§xx¶¬³ÈÈØ¯ÔÓʲÃÑ€Ïׯ½ ªƒi[RQOMKKJ€L+JHHGJLNMX~¤£› ¬“ˆŸ Œ‹„„ˆ ¬©‰jƒ®¬¯ÈȾ“·ÕÓóÊÑÏÑœº ÿpVNLKHNOQQPSPR(NQONNQl £¢§¨”‹ŸŸ‡€‡Ž§ª¡kw «©Èɸ’¾ÕÒº·ÎÐÏÐÈœˆ¸:ÿrUOLLMNMJOMOSRMUSNTRLPNL_’¤¢¢ƒ®¤—Ÿœ…‹€†˜«§ƒk§¥Çɱ”ÄÖε¾ÑƒÏÒ¾“·;ÿp\SKLPONOPRNQNQNQNQNQNQOQY`–¤¢¡ˆ²Ÿ™ ˜†…„ƒ¥¤i€ŸšÄʪ–ÊÖDzÆÑ„ÏÕ«¶;ŸfRPNOLLPPRSNSQSTQUPUQTSOTSit•£¢Ÿ“´œ™Œ¡’ˆ|‹†­”kr’ÂȤŸÎÕÀ´ÌЄÏÒÕ–¶;Œ^QOORRQPJNOKSQQVPTUQVSRVOVcŠz”£¢œ“´›šŠ¢Œ‰~‰’­{j‰¹ÇŸ¤ÒÒ¸¹ÐЃÏÑÕܴе:WQPOSPRSOTSNQMLQNKPPNQOLPOY~šx–££–޳˜œŒ¡ˆ…‰ƒ¦›lt±Åš«ÕͳÁуÏÑÕØÚÔ†m³;ÿvUNMRSPTSNUTOUVNTVPQTQNTSNS[m˜{—¤¥••²—ž……•´}nn«À˜´ÖŲÈÑ‚ÏÑÕ€Øßµ³;ÈpTQPMPPURNUUOTVQPVUNUUSQUUNWhŒ“˜‚˜œ’z…£š¢–œ|Š˜Š¢qf »˜ºÔ·¶ÎÐÏÑÕØÚј³@¶dTRPURNOPNUVPSUUNUUSOUUQQUUT^‡eZTIA7=I`n`a@e†}a•²šÄÇ¥ºÑÏÏÐËÎÔƒØ߸U²ÿbTRPTRQVSMOPOPTUPRVVQRUURR€U!}¥w@537;:9;;76645>OpvЍ¢Æ²˜½ÐÏÑËÁÊ„ØÚÏŸ³ kQSPUSPUTPUURNPONKPQRMSSTPRUNOw]=€8:=;:<=<986:=0Dn¥¦ÁŸ™ÄÎÐÏ¿»ÐÙ„ØÞ¯³(zUOPTTPUUPSUUPTUUQRSRPLQPOLOO9:786:99:=:<€=984=<50<·˜ ÄÐÑÇ¶ÄØÙ„ØÚ̇ÿ±ƒXSMRTOTUQRUURR€UP€URQ€U#PV?207<6:78:=8<<;=;85@916=>z¬ÈÒλ¹ÒÚ†ØܠбÌ_SPSQNTVSPUUTP€URR€UOS€U"RH0846;7:88:=8>=:>:6:;45=>8J¾ÕõÇÚÙ„ØÚÛÙÀ~² rUQPVQQPRO€UPS€UPUOU R>5<45:7:9<;<9?;:>:3874;<>ECh§¹ÔÚƒØÙÛØÊ·¶—s±Ì^SOUSQUUNOQSSQVUUSQ€USO€UVG-8=568899;;::?;;?8/74;;>DE=5Šà‚Ø ÚÚ×͸£Ÿ·º²|YOTUOUUSPUTQLOPRTQ€V3WRSWVWP428<45799;::8718??>C>>DHO¾ÜØÚÚÕËÀ®¤ª¼È΢²JÌaNRVQSUUOTUVTSVTQMGGHIG?=;8<5448;46698<;98=>9:>79:;:98@?6;;9>IGCGLKI€D BO³µ½ÆÉÈÉÆÁͧf²‚ZQWQIC71,'')--+.0132303465723;€8'<898:7?:88A?59=BKBEKGFDDFGGA;xÌÈÉÈÁµ¨«·‡²IÿmSJ@4)*)+*-./212034457:>>C:2>5::98;9:7:8@;68A?2=?B@EGECEKJD>CGEK´È¹®®¾¢‡”²I¿zF3('+*+010.243359@BJORUVRN1:?69;99<9;6:8A;5:@>6=<=BEGJKFB?BEEGG>~±´Áʾn±ÐgYF+*(,,//22106:AJQUVPWV€U-N62?>79=9;;9<7:8A;4=@<@9CHGLKHB?CGHGCC@88=9;:9=7:9A;4@<=AJKJDABDFGED?=>BFFH¯ÉʦSPdƬRÌYQQOTZ<0/11./9GRVVRSUUTSNOPPQS?5;;?=88<8;88=58:@:6>=;:>DFEGG@t˾pWXRXjÌ©}XNVZ]^^5.210>OQVVUUP‚UPUUTS=3€<?=::EDGDDJB;>D>;DBFGCBCA€?>@BFHGGDGGBXÄ]^]ZVQ[¦£\ORZ\`ai\2+0>OWTQ€UTPU)TPUUWI2;==>A>===WX\WW^U?EEB?;CAEGECBBFGDGHIIEIMHE0XX[Z_\^YW`Ž¡rUR[]__`^\hF@VQTUQMS€UQTU?QSUWF,5<==8@>=?XX\XV]X>CBDHOPFDABFGEFGGHIGJLJIGLLEOCDY]`\`\^[V]‡Ÿ`SR\]_`befdeePVPUUTOQPSUP‚U@PTWF/54<==9?==@WX]XV]Z=?CKQMIBDGHGGFFJKLLJGIJLIKHLSVsNX]`Y[XWSQXlœnNQVZX^^efebÙlRTPUURQUTQOOTU*PWG+874<==;?==@WX\YT\\AAHKHHKEBA@BJKHLLJIHG€LJIGTQY–ˆLTSYV`Y`[Z\Š›…XWW_X`X_W`[dkPSQUUPR€U1RQQPPRSSG01:65<==<><=AVW\ZS\[CFD>?HEEGGFGFECDCBAA@@??>ANSQORPWp€ xHNWVc\d`eag–yZ\Zd\`_[YTYÆÿVVQUQOPVUUTQ€U#VJ03:973597;<>88:>?;C=DLMGGHIIJIHEED€CDDGHHGE?QWTNPVPWj€ ŒJNWVa^abcdjx• U`ac[e\a_[[WcÌ€$jXPUUOMSUUTQUUVN343:;757:7;:?86;>@;>E€RIIHGFFEECGHJKLLHFEFHEHU€QRVQVn€ ”BOST\]\d`gjr• °f]c]g\b]Z[X]ª€qYPUU€R(OSSRUWO37749;867:8::@84=@EGHJKFDƒECDDCAA@€>?BON€URRVQRŸ€ œNHSTc^dfelec” ‡^Yc]cc]dXXOZ €•WNUURR€UQRM321<489<886;:89@83=8BPR€Q RKIJIIGFEBDD€EDABCFTVO€URRVP[ÿ€ _IMSYc\fckntkƒ”Žbjiibh]b`VUQpÿ]NTURS€URS?/72;798<895:;78@95644@GGIKLNQKIKJHCEGIKKLEAQVUUP€USOQTj€ jFFLS^W]`^nlwj–2hjikgacXYYPOH_œoVRPPSUUWE/<>9576;8:8<3:=67>88<>DG€H GEBABBCDEFDGHHDOV€UPUUTOOUT|‹JDMSb]ajclhipk–0y`nbf^be\b_SQJUz„UQVOOTWI17=>6687;898<3:>5996EIE‚FEDBCBBA@><::=>@@BL‚UPURPNST[ÌKDNRa_^jelyp|i{–agikrcgg]a`SQKPšÿeQVSORD,4;==5€7;988=39;;:3;?=?ABCDBDEBBABCBGIJJERQSUOPQUPTUixLAHLZ^]iggyo|{Ì—:yjwnnpagg]b_QMHQm|OUTP>-69;=<5987::77=47:77>@@A@BCEFFGHGHIIJ%FHIIEMWPSUUSPMSUUPU^Ì[CCIR^ZW\adxrx}{¢˜+™}lxmnpbgbWV[TMGF[YWV8,599;=;6:769<55=9965CH€G DFEEDCBB@ABBC$AEFFHVVPRRPQTPUUTOUjLBFMY`\`idbjjr€wš/oxkok]^fa\`^SKGH[a337988>:8:759=55?:54689;;=<>?>>€<;:9:==679749=6874>EDBA@=<:9;DLSZ[_hget|t~ˆ†w¿0¶|n{zpuuhdie^^[RNGC??>=;=56883:=804=AA@ABBDEDGHII€J HIIHHGGCEQSUO€UWXTK@?GQZ^\[^acjzyu„†‰‹›Ÿ™u€tqwqefe\Y[^\VMFB€A968:5;51;?@?ABDEFGHFH GHHFGHIIHEQRƒUQYXVND>CKV\][_figfgsvy‡†‰Œ¡xzy}rswf`dhfa]]^[TLE??;=?756C€HC€EC/ADEFHIJKGJKJHERUPUVWYZVLHB@BIPS]]\bhhflw}yow‡‰Œ¥"zw}~€xiqzulefge_\^ZRSNHDA>=?>AEGJXYYTVWRHC@BGOW[]]ZX_iggp{}xz……‚‘¥§>yx~v€€wuyyriefh]X\]\\[WSMHD>==F@IDNFOHIIFDBQQNIDCJNJFC@ABDFMV[€\^afgf]at}{x}ˆŒ‘“‹Šœª*{u}‰ˆ†ƒ|vvzwoc^ghfda_]\\]WTTROLIGDBB@AA@??B€C"BAEGKORUXZ\\V[^aeghginu}rpy€‰“’‰zo­Ðn`wˆˆ…yvsq{vqki€gfd_X€^]€\[ZYSUWXX‚Y ZUZ\\]^^_acee^hghmu{~~|}‚x”…{­&xfci{loz‡‰‡r{zz||yupkh_chhggfedba`X_‚`€ab^[efg€hghjllhz~~|{€…‹’—†‹{\®'Æml{€p~‚wzor‚‚Œ‰…‚|zz{}xlyvspnljhiih^g„hiih`iknqvy{}~nx~„‰Ž’–›œ’ŠxmU¯“ns„{€†|Šs€d}ŠŒ‘‘Ž‹ˆ„€qy~€|}~}}||wn€yz{{||}}~p|}}~„‡‡‘•™œ˜„|{±)xwŒ‡v}}€ƒyƒ|•y‚™‘‰‰Œ””“Ž~‹Šˆ‡…‚~~yr~}~€uy…ˆ‰ŒŽ‘•˜›Ÿ£—„xj3³)tŽ€u~{|~}|ƒ{˜¥ˆ”™—‹hdyƒ‹žœ›™–“‘‘…€’’””•–—™ˆŸ¡¤¦¤¡”Š€~}ufµD•pd\zŽ…z}x€u†ŠŒ™žž‡ƒ‚xX8@HQ[bns{…”šœ•¬¹¸·¸¹¹¸¸·¶·°‘—…wrg[\WV`“·D‚ejhozŒˆwus‹t‚…†›‘z|„Š‹ˆ€xjH./212/02=ES]momnrtwhY[]cfj_YRVUUSKPWyÿ¶0¸tpa}jv}†‚ns‘y}˜«§©´ÂÉż·ª©Á¾¶²¤g88:9974;?KORUSQV€UVO€T SRMPQTQ[z²·,Ôp^jnsszuŠmm‹•¡¤ –‘˜¢¤£ª¹Ë×ÙØÖרÛÐ¥SGXUQK€PQPM‚Q LPPQRNSY\[}ÿ·4ÿzn[fooxp~y‹k‹“–•‘”™¤­­§›‘’œ¢›•›±É×ÛØÙÕ´£‚qj]SRVUTTOT RPVVXX]lx™ÿ·)Ô«ig`ipkskƒxz„‡ŒŠ‰Ž’•¦³¼¾¸´µ±¥€‚¬ÏЧÿ—n_ZSVSQQSTVPSX\o‰Ã¸+Ô£š„uniejlpluƒ ›„~ƒ|‡ŽŽ—¢’Ž–§¯¯®²¹Ã¦di«¨† ÿ“ƒkKYgus„Æÿ¸+Ìœš’†„„‰rgfrmrsy‚}†’“ŽŒŽ”–……‡…‰–•†Šœ³³‘˜mÎ,‘“—“‹Š‰‹‡|ythhz~‡Œ–¢¤’€vuw|€Š—–‘†„§·›‰•ªÍ,m‹’–’’‘Œ|ni{ÿ}s{tuwx€‘Ÿ¸ÍÏǼ«•ƒ~ƒ”¤ž•­Ÿ‘”¢®Î ˜—š˜™“‚tpnÿ›„uqrwpqˆŽ§ÅÕÖÔÐË£di’¦§‹—žÿÎ •„ŸŸœ‰tchÿ†¡ƒ|ƒ}vwuw|޶ÐÖ½¦_Ÿ›–£Ï ™qzˆ„¡€tqU‹ ÿz“˜™’‰z€}’²‘Ö…{„{ram‘“•¤ˆ‰›“Ø€ÿ˜ÿ—œÿÿÿÿÿÿÿÿÉÿÿÿÿÿÿÿÿ㑎ªø…š¨‘?õˆ”Ÿ¨¸°‚ô ™°¹··“¾±|ñ …¨½¨¶´µ¨›ÍϨu™î‡°Î¯¬µ´¶”¼ÌÄž¤s‘눂²ÌƤ´´µ¨œÌɳÁÄ¥‡ê‹ˆµÌɹ¦¶´¶”¼ÌºÀÐÆšÿè‘ЉšÆÇɪ°´µ©œÍƳÏ˘qçÿ“‰‘ޤÉÇ£µ´¶”½ÍµÆÎ¬šzäÿÿv„”‹¯Êɳ©µµ¨ÎÁ·Ñ¿‘±‘p㈉‹w…Œ¼ÈÈ¥²´¶•½Ë²ÌÊ—µË²–â~‚zŠŽÆÈ¾¥µµ¨žÎ»½Ð¨ ÖÇ™âw„‹vŠ›ËÉ®¬´¶–¾È²Ð¼Ëϱœáÿx›Šˆu‘…¬ÊÆ£´µ¨ Ï¶ÅË’¹ÔµÏ àw’ „€{‘…½Ê¹§µ¶–¿Ä¶Ñ¤¢Ö¸ÆÒ¼Þ™‹†¡š„’wƒÇÉ©¯¶¨¡Í³Ìº’ÑÀ½ÒÆÍ§Ýyp~ŸŸ•‡‘r‹ˆžË£µ¶–À¾½Ì¿Ê·ÒÈÅÍ¦Ü ªu‚—Ÿ ŽŠr‡±Ì³©¶¨¡Ë²ÑŸ¦Ò´ÏÉÄÆÌ¬Ü!sƒ–Ÿž ˆŽ…v‘ŽÁɦ²¶–¸ĸ“Ò¶ÊÊÀÇÆË¯qÚ›u‘Ÿ€ž…‘~~‘Œ–ɾ¤·¨£ÇµËŽÅ½ÃË¿ÇÆÆÉ³žÙÿs…šžžŸ™…‘w…Œ¦Í®­¶˜Â´Ëœ¯Æ»Í¿ÆÉ´yÙq‹™žžŸ“†ŽsŒ·Ç£µ¨¤Â¼µ–Ì·Î¿ÄÆɵި¢z®›žž Ž‹ˆv“ĺ§·—À³ÆÆ¶Í¿ÃÆȬ¹¶×%pš²žžŸ‡Ž{ŽŸËª±¨¦¼Ã›³»Ç»ÁÇÆÆÇƧµØ»qÖ'g´«}žž„x‚¯Å£¶˜¼·² ÀÀ¿¾ÇÆÆÈâ»ÔÓÇœªÔ™m¤¬¨z€ž™…s‰“¼¶«©§¸¾’ÁºÂ¹ÇÆÆÈ¾ŸÀÔÑÓØ¶Ô'`{›¡¤|žžŸ“ˆ‡xžÅ¦³š¸»›´¹Ã°ÇÆÆÉºžÄÔÒѺ¿­Õ{q˜¬žžž Œ‹€|‘ªÀ¥ª¦¸¬¢ºÂª€Æ ɵŸÊÓÓÍ´¿Õ¬Õ'f† ®›‰žžŸ‡Ž}Œ—³°®´µœ¸À¬ÂÇÆÉ¯¡ÎÓÓDzÇÒÌÔ(tv¤›¯—ŒŸž…|†Œ»¦©¤¶ž²½«¾ÇÇȤ¦ÑÒÓ¾µÍÐÒ½†Ã ÿ–…p‘q{s`™Ìÿ€)£p£›°”ŠŸŸ˜…‹‰‘¦¶¨œ­¢Ÿ»ª¸ÈÇÅ «ÓÓз»ÐÐÏÕ¸H¿7ÿoYRROIROIECFQSYZq‘v¥Ÿ¯”‡ŸŸ’ˆ‡‚‡™­¬§xx¶¬³ÈÈØ¯ÔÓʲÃÑ€Ïׯ½ ªƒi[RQOMKKJ€L+JHHGJLNMX~¤£› ¬“ˆŸ Œ‹„„ˆ ¬©‰jƒ®¬¯ÈȾ“·ÕÓóÊÑÏÑœº ÿpVNLKHNOQQPSPR(NQONNQl £¢§¨”‹ŸŸ‡€‡Ž§ª¡kw «©Èɸ’¾ÕÒº·ÎÐÏÐÈœˆ¸:ÿrUOLLMNMJOMOSRMUSNTRLPNL_’¤¢¢ƒ®¤—Ÿœ…‹€†˜«§ƒk§¥Çɱ”ÄÖε¾ÑƒÏÒ¾“·;ÿp\SKLPONOPRNQNQNQNQNQNQOQY`–¤¢¡ˆ²Ÿ™ ˜†…„ƒ¥¤i€ŸšÄʪ–ÊÖDzÆÑ„ÏÕ«¶;ŸfRPNOLLPPRSNSQSTQUPUQTSOTSit•£¢Ÿ“´œ™Œ¡’ˆ|‹†­”kr’ÂȤŸÎÕÀ´ÌЄÏÒÕ–¶;Œ^QOORRQPJNOKSQQVPTUQVSRVOVcŠz”£¢œ“´›šŠ¢Œ‰~‰’­{j‰¹ÇŸ¤ÒÒ¸¹ÐЃÏÑÕܴе:WQPOSPRSOTSNQMLQNKPPNQOLPOY~šx–££–޳˜œŒ¡ˆ…‰ƒ¦›lt±Åš«ÕͳÁуÏÑÕØÚÔ†m³;ÿvUNMRSPTSNUTOUVNTVPQTQNTSNS[m˜{—¤¥••²—ž……•´}nn«À˜´ÖŲÈÑ‚ÏÑÕ€Øßµ³;ÈpTQPMPPURNUUOTVQPVUNUUSQUUNWhŒ“˜‚˜œ’z…£š¢–œ|Š˜Š¢qf »˜ºÔ·¶ÎÐÏÑÕØÚј³@¶dTRPURNOPNUVPSUUNUUSOUUQQUUT^‡eZTIA7=I`n`a@e†}a•²šÄÇ¥ºÑÏÏÐËÎÔƒØ߸U²ÿbTRPTRQVSMOPOPTUPRVVQRUURR€U!}¥w@537;:9;;76645>OpvЍ¢Æ²˜½ÐÏÑËÁÊ„ØÚÏŸ³ kQSPUSPUTPUURNPONKPQRMSSTPRUNOw]=€8:=;:<=<986:=0Dn¥¦ÁŸ™ÄÎÐÏ¿»ÐÙ„ØÞ¯³(zUOPTTPUUPSUUPTUUQRSRPLQPOLOO9:786:99:=:<€=984=<50<·˜ ÄÐÑÇ¶ÄØÙ„ØÚ̇ÿ±ƒXSMRTOTUQRUURR€UP€URQ€U#PV?207<6:78:=8<<;=;85@916=>z¬ÈÒλ¹ÒÚ†ØܠбÌ_SPSQNTVSPUUTP€URR€UOS€U"RH0846;7:88:=8>=:>:6:;45=>8J¾ÕõÇÚÙ„ØÚÛÙÀ~² rUQPVQQPRO€UPS€UPUOU R>5<45:7:9<;<9?;:>:3874;<>ECh§¹ÔÚƒØÙÛØÊ·¶—s±Ì^SOUSQUUNOQSSQVUUSQ€USO€UVG-8=568899;;::?;;?8/74;;>DE=5Šà‚Ø ÚÚ×͸£Ÿ·º²|YOTUOUUSPUTQLOPRTQ€VWRS€W-P428<45799;::8718??>C>>DHO¾ÜØÚÚÕËÀ®¤ª¼È΢²ÌaNRVQSUUOTUVTSVTRM€G4HG?;7485448<46698<;98=>9:>79:;6-*!#*8:68;677:8=::7??7;=<35@EDFKIIKJA„¿¾·²ºÅÉ€ÈƲ9ßeRQPQVWTID9,$" /=867:677:7>:98@?6;;9>IGCGLKI€D BO³µ½ÆÉÈÉÆÁͧf²"‚ZQXQIB3,!&23;887;€8#;7?:88A?59=BKBEKGFDDFGGA;xÌÈÉÈÁµ¨«·‡²IÿmSK?/!#,26<32>5:988:897;8@;68A?2=?B@EGECEKJD>CGEK´È¹®®¾¢‡”²IÿvC/! ,7=GNSVWSO1:?69:88;8:6:8A;5:@>6=<=BEGJKFB?BEEGG>~±´Áʾn±ÿgB+ (/:HQVVQWV€U.N62?>79<8::8;6:8A;4=@<@9CHGLKHB?CGHGCC@88<8:98<6:9A;4@<=AJKJDABDFGED?=>BFFH¯ÉËŸ28Zÿ¬RåK5"! 0ERWWRSUUTSNOPPQS?5;;?=88<8;88=68:A:6>=;:>DFEGG@tË¿= <:9=:=::>88;@:6??FGCBCA€?>@BFHGGDGGBXÇw %D„ÿ¥ÈJ) $:NXTQ€UTPUTPUUWI2€;??=?@BC@BBEGFE€GE€F O„2 0Té£{;  4MSQSQS€URRUSQUUW=6€;8?<;9?>;94=@EGECBBFGDGHIIEIMIA! 8Ž¡`(€ $@WRTUQMS€UQTUQSUWF,5€;56><;;?9@@7:BEABDBBA@BJKHLLJIHG€LJIGTQY–ˆ, (l›o, +dÿkPSQUUPR€URQQPPRSSG01:65:;;:<:;€<A?7@?86<=?@AAEGIKLKGIIJKLI€LKDOVOU…Z) ,¸™þ+   #‰ÿiPOSUUOT€UQTUUTROC164856:;:;<;;@@5>;>EFEHJMJJKJIIJHKLILMMKEVVNX‚n 9ÿ˜P  BÿeTNSUUOUPT€UVP15857589;;<9:;=;:@@5:@ECDG€JHHJK€LII€JIFFEFFJUQMXyÿ<   S—ì, tÿdUPORTOUPUWF1:9655:9;;=99:=96><66?ADFEDCDCBAA@@??>ANSQORPWp€ {  #¯–Z   6ÿÿVVQUQOPVUUTQ€U#VJ03:973597;<>88:=84<6=EFCFFGGHHFDED€CDDGHHGE?QWTNPVPWj€ §#  p• ÿ/  Fÿ€$jXPUUOMSUUTQUUVN343:;757:7;:?86;=946=€KFHFEDD€C GHJKLLHFEFHEHU€QRVQVn€ ¿    K• ÿ1   ;ÿ€qYPUU€R(OSSRUWO37749;867:8::@84<=;29FEDDADEGHJKKI‚KJFIIJIGNPSVRRVQRs€ ÿ5   2ÿ” ´   8ÿ€)sTQUURRVTRNPTJ22<46:<876:89:@93=<69>?ABCBCƒDBDDCAA@€>?BON€URRVQRŸ€ °!  .Ï” –#   "¦€•WNUURR€UQRM321<489<886;:89@83=6;IKJ GHIHGFEDADD€EDABCFTVO€URRVP[ÿ€ R  %•”Ž"  Nÿÿ]NTURS€U3RS?/72;798<895:;78@9569JJIHHGFCBCCDEGHEEDBAACC@DSVUP€USSRPl€ÿ8    4ÿ”²+  ¥€(eSOTRRUUVN82<;2:6:8;8:5:<68@>44>@@ACDFHEI‚JGBEGIKKLEAQVUUP€USOQTj€Y   ?ÿ•2F   9¦oVRPPSUUWE/<>9576;8:8<3:=67>88<=@C€E CB@ABBCDEFDGHHDOV€UPUUTOOUT|†   L–Gn    )z„UQVOOTWI17=>6687;898<3:>5996EIEFGGFFEECCBBA@><::=>@@BL‚UPURPNST[Ìw!    %r–ÿ4    ŽÿeQVSORD,4;==5€7;988=39;;:3;?=?ABCDBDEBBABCBGIJJERQSUOPQUPTUio/    >å—:\!    3^‚PUTP>-69;=<5987::77=47:77>@@A@BCEFFGHGHIIJ%FHIIEMWPSUUSPMSUUPU_àB    -”˜+ÿL   ?WYV8,599;=;6:769<55=9965CH€G DFEEDCBB@ABBC$AEFFHVVPRRPQTPUUTPVf*   bš/ÿI    J_537988>:8:759=55?:54689;;=<>?>>€<);:9:==    #85::89>679749=6874>EDBA@=<:9;    )6=<>56883:=804=AA@ABBDEDGHII€J HIIHHGGCEQSUOUUVYXL4    <›Ÿ+¡+    -::89:5;51;?@?ABDEFGHFH GHHFGHIIHEQR‚UVRZXPA(   Qÿ¡¥L!    $(2:€7DIHHC€EC0ADEFHIJKGJKJHERVPVWX[ZQ?0     0hÿ£#ÿq6       1?@DDIFH€F0DDABBAA?>??AFILZZYRRPH3      C¬§TÿV'    ,)86D>JFHGDA?NMID><>=4+!    %Xÿª2ŒB       €    -E|ÿ¬óiB,      ‚        /U£ÿ¬xfdl€a<    €€ ‚    3aç®Æml{€p„|zV+    „€ €  *Ciÿ¯"“ns„{€†|‹„ww='  €€ƒ   !2Il¿ÿ°xwŒ‡v}}€ƒyƒ|–}“ˆhE) € ‡  *CZƒÿ³"tŽ€u~{|~}|ƒ{˜¥‰‘˜™ƒM0% € €€  (18HWpåÿ´/•pd\zŽ…z}x€u†ŠŒ™žž‡„ƒ{\<>=8722& &''((€)*+,-0%!+3;?KORUSQV€UVO€T SRMPQTQ[z²·,Ôp^jnsszuŠmm‹•¡¤ –‘˜¢¤£ª¹Ë×ÙØÖרÛÐ¥SGXUQK€PQPM‚Q LPPQRNSY\[}ÿ·4ÿzn[fooxp~y‹k‹“–•‘”™¤­­§›‘’œ¢›•›±É×ÛØÙÕ´£‚qj]SRVUTTOT RPVVXX]lx™ÿ·)Ô«ig`ipkskƒxz„‡ŒŠ‰Ž’•¦³¼¾¸´µ±¥€‚¬ÏЧÿ—n_ZSVSQQSTVPSX\o‰Ã¸+Ô£š„uniejlpluƒ ›„~ƒ|‡ŽŽ—¢’Ž–§¯¯®²¹Ã¦di«¨† ÿ“ƒkKYgus„Æÿ¸+Ìœš’†„„‰rgfrmrsy‚}†’“ŽŒŽ”–……‡…‰–•†Šœ³³‘˜mÎ,‘“—“‹Š‰‹‡|ythhz~‡Œ–¢¤’€vuw|€Š—–‘†„§·›‰•ªÍ,m‹’–’’‘Œ|ni{ÿ}s{tuwx€‘Ÿ¸ÍÏǼ«•ƒ~ƒ”¤ž•­Ÿ‘”¢®Î ˜—š˜™“‚tpnÿ›„uqrwpqˆŽ§ÅÕÖÔÐË£di’¦§‹—žÿÎ •„ŸŸœ‰tchÿ†¡ƒ|ƒ}vwuw|޶ÐÖ½¦_Ÿ›–£Ï ™qzˆ„¡€tqU‹ ÿz“˜™’‰z€}’²‘Ö…{„{ram‘“•¤ˆ‰›“Ø€ÿ˜ÿ—œÿÿÿÿÿÿÿÿÉt8mk@K*×ÐTi³ðÿÿéPŠýÿÿÿÿÿÿùq­ÿÿÿÿÿÿÿÿÿÿ“ /Ðÿÿÿÿÿÿÿÿÿÿÿÿ¯…ìÿÿÿÿÿÿÿÿÿÿÿÿÿÿD@Êÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ…öÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿH@Èÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ T÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿð"lshëÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿì'8òñÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿg ÕÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿP­ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ·>uÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿx#Töÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‘*×êÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ§­ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÂXÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿØ Ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿô%’ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿR?ùÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ† Êÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾tÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿè%îÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþN¯ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÑ%÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¼:ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿŽhÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿT.êÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿõ&(=TSSUB2( ÇÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÔ P†ÆáòüÿÿÿÿþøòÓ·X#’ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¦HŠÀìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿíüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¨'dØÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿáN½ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€;´ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿå(©øÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¤CÝÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmbðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ›}üÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÊžÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿR±ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿȦÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿúP{ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÀGøÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¤ßÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿí. ºÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿy{ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÊ æÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûDqÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ›ØÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿãhÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿaËÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ·Tÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿô/¸ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿäqGöÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ÷j J´õÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾fËÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ÷Â` oÛÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÁC;Äÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿû§2‚óÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿó… BÎÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ´GïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýýÿÿÿÿÿÿÿÿÿÐ/GîÿÿÿÿÿÿÿÿÿÏÚÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿúìÿÿÿÿÿÿÿÿÿçBXîÿÿÿÿÿÿÿÿÿÕ"ºÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLEçÿÿÿÿÿÿÿÿÿï;Püÿÿÿÿÿÿÿÿÿß&ÁÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿT0åÿÿÿÿÿÿÿÿÿÒÈÿÿÿÿÿÿÿÿÿîAÁÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿThÿÿÿÿÿÿÿÿÿÿš\ÿÿÿÿÿÿÿÿÿÿ–ÁÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿT ÂÿÿÿÿÿÿÿÿÿüYÙÿÿÿÿÿÿÿÿÿù9ÁÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿTHüÿÿÿÿÿÿÿÿÿÜkÿÿÿÿÿÿÿÿÿÿÍ  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿTóÿÿÿÿÿÿÿÿÿÿD»ÿÿÿÿÿÿÿÿÿÿË ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿS Úÿÿÿÿÿÿÿÿÿÿv ÙÿÿÿÿÿÿÿÿÿÿÍ lÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿû3 Óÿÿÿÿÿÿÿÿÿÿ¬âÿÿÿÿÿÿÿÿÿÿÌBþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿäëÿÿÿÿÿÿÿÿÿÿá"óÿÿÿÿÿÿÿÿÿÿí+ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾`ÿÿÿÿÿÿÿÿÿÿÿï2ûÿÿÿÿÿÿÿÿÿÿÿŸÉÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ’¯ÿÿÿÿÿÿÿÿÿÿÿÑ àÿÿÿÿÿÿÿÿÿÿÿõ3—ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿV<òÿÿÿÿÿÿÿÿÿÿÿœ‰ÿÿÿÿÿÿÿÿÿÿÿÿÉgÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿø)5ãÿÿÿÿÿÿÿÿÿÿÿÿh.øÿÿÿÿÿÿÿÿÿÿÿÿÅ8ýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÅ Öÿÿÿÿÿÿÿÿÿÿÿÿÿ<¸ÿÿÿÿÿÿÿÿÿÿÿÿÿÈ+Ðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ^9Ðÿÿÿÿÿÿÿÿÿÿÿÿÿ¹ PÿÿÿÿÿÿÿÿÿÿÿÿÿÿÞAbüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÛzòÿÿÿÿÿÿÿÿÿÿÿÿÿä$ˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿúºòÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ»»ÿÿÿÿÿÿÿÿÿÿÿÿÿÿúPœÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ… ¬ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¹ÇÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿµÈÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿù ‰óÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿâL6¸ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½( gàÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðŠ šðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿæ‡)šÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÎr/Ÿáüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿü¹Y ­ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿà£A&¹ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ뿃D$âÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿùÑœU@ÂÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÖx4 –÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ§'Ìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿìoîÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¼-¶ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÀb ˆüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿäõÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿí­OOÖÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¤3|ÀïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüÛž[#7žüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‰%S†¼àòúÿÿÿÿÿùéÒ±~=5Èùÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ×UY^#6LJJJL5 4Èøÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ³Q4~Èøÿÿÿÿê²ëÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÔ X5Ëøÿÿÿÿì±c˜öÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ³v5~Éøÿÿÿÿó½q%3‹ÝÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûÑÏæüÿÅ¢d.¡øÿÿÿÿùÀq,[¹öÿÿÿÿÿÿÿÿÿÿÿêV@]#÷ÿÿÿú˃62ŒÝÿÿÿÿÿÿÿðÁ3xοš™}7\¹ïÚóÈœE$* ic08À† jP ‡ ftypjp2 jp2 Ojp2hihdrcolr"cdefjp2cÿOÿQ2ÿR ÿ\ PXX`XX`XX`XXXPPXÿdKakadu-v5.2.1ÿ ¿™ÿ“ÏÁP=ž…B`Ü?ÊA™‹‘"´ºÐSrå>AÂIWŽÑe#f.‰I‡&í“©ÅE\an…Óž·ãE,ÇÚ:Dï}–l‡Dá§–]ú2}1ù:!b<|ÍšWBB±ÏÀ˜O6"Сù`šÈñ"IhÍ,©gähýó³²l x)‘æV†/#†ÏÁP=¡V´lÚÏ,Ù•¦W¶&Ëæ‡ÿ9ÙÙ® ‘}ú$šÀ4ëQGÄ“l5|7¢Ù´<#ïùÜTn‰ ¿µ|Æ+xÇà]”i¸_©{3‡„ޝUÙ­ÿ ¨‰Ù-›¨ ÎÏahã¯jÏkïè÷bñ` %ýÑôë€MÞùkõÀ ìá:¥6¥Ù&óæßæ}þ]{-,c3üƒêB&Y"Ã92[})EÖ À¡\â$’çŠSŠJóo\ETÌÆ|šJKg¿/³LçuŽwEuðÔ¥ð‡7ö1=læ ‹¬üSÃíÀŠ´ŒDÏIS0XM÷ÒeY£+6n/Õªî%v?QK'¨V7öGbýâ3{æ$ª§Hã¾s ¿ Ä'œpFŸjóé_ab¦>ãØÜ|¿©ÇÏ¡Ðú¤…ëìºrCh¸gæu$Õ-¨Ãí$À¢´˜]¯®õæ%]ÀUå6‘J½ú'nMåyÕæq„i[¤8zw†ëV7¿˜Ö5ÄÎÍtù.Ðïíæ‹RÆðŽßJIg®Ü« mv£ÅA*T4?Ú8zñòR¶Î•ñQÅ3†ãàcx—íæÄMÅoôÆ’lqêÏÌÞ~gü^¯u $ ÓçHz¡È#™‡ßö9«)Ž0eÙ_¦J(¿¥;̧YMÝ×}¥»M|‡jHžÊb•öp¢””ƒ=T~ÜD°t=^µKc°•CAßIÝ®M¬ ¦;ÚYå¹ô=B¿D¿þðÇ÷¢Ç±wf™ZÇî–-[ ŠgîÑFó_¥,h*ž| È-.Å*‰÷Ï’ä!ÉT‰_.'Hj Šdú9iÚiu%VÔÇáLÇáNÃð©€`UõÚJØk…/åU–Ýú³’¤ãhLUÆÜ?´ÓŽù’­$ùREˆØFf>º·ÆÀT'ݦàxyZù%ný_ìÙI(Þ9†ÁÜ–GUsPcÂkƒLÈ)VšW‘NKËäU È›à¦Uâ-Áñ‡…ýç©sáÁ89³N€¥³ìሠjÑÜ÷%¥ZãÈf`U4ëzñÆžèþä …1­ó¬R°>´ö/`(ñf±òEç‚èýŸt}V£ŸS}ûßÁp”$º!lOQÝüÈ} R‹xr^¤à'Ⳟ*54°Tàý”\*úNùGÚ!«EAˆ­N·À2B|Ž7€—øãÚG%Ö. KÔGµp;äpvóÞÐ9äÄeVÅÂÊ" •c©6aˆÃšïkéSŽQªgçáéÔâçyLÌ_€ál@ÐÁª·Vc¢Z‚[Ä¡mJ¨džÐÞÆž°AÄ«RƨŒ»1QØk<˜“v¿í„æ*y2 Xnõ£ïΈ\FyñÂ’ï¯á®~ŸzZÊպþ,†@…†ÿ:ám­”<ì¦{zÎíÇbBðïÓ±PrÒO €L*ÙÊ+ÑçñKóË+lgÍÕ™%+°¢üæ“Áõ#CíP‡à–íkæT•ž•vÑ ñ ‚º6ŸäD|„7Q# æ~ïì?ìc#vü&þÀíµ)àxÞ/ò}Ÿí‘%»Z£! YÐÈŽÝ‘¢—ßp¡èr\‹¾ŽZÈ‚ʇA }Þ‹ˆ]nôO^aÃ~^kãK“Êtbr4¼YŒ‡<™ Ü ãi÷“;~ ÀÆ}^yU—;.òw!œ¤Ôš‡÷(Ì`NCmª4øˆ<Ñ$Þ!QÄÍ)¦ùRÇ1Î,þ@ÿdèaÿ]×Sx}Ì{† üÑ —óìÌg5 w³%„£Õû×Áõ2GàÕÚΞO7ê¸Ñå¦û^³ÛRï1¨0BzÆ•”qxˆ!yzLFÅâׯ™66˜E?¥„RT°%×±÷‚0½ƒÚ©vY53èotÝuÿp ià›ä ¸iÿu‰>°©‹‚̦½à[°vz %¢ÉèâÖýã@¶kXŒkUsædühÀ¹uèÅë‡DQÅo”hóévŽ A_ÔÀ[Þy¾ýC/t¦ÉÒ?ñ<¬‡SQXaM’}R1M20m°LåØQ²Yml7ˆ~ü†õ8„„¬‡rxÓs…_£TÍx—¸ÌÎ]Ö™¢]põÂwVeÀ±ûª1¬¼ø½ ê—ôÓb寧屩 Føö­‹é„@Ð4ãhu›JRÃ͹Ñ!7Í}©ËXœ›<˜˜ÏΑŸ#2‹´›&%ÂT?´ñVÈ[”˜EW’«HTÿ€Àõ­.SåK ãzyGçšætãBð 0¤…ÞQ!b=Ń2º,¾‚Û‡$j&ßcrÛœ–GøØ2Dû'þþa³±2£?„ü›KßlîÈɺZ$JÓ·Äz.jÒêÕáµ’¦/Ù‘qhvH~ó»ü@qàk žëöžMÕù»'rFôý \‰¼—ÎD×ûVw¨¢¥QØ1ñzƒvAñn8×ö&lgAF,ᨯíªÜ’¿Õü¤7ÌÅgú ²°,þñB|e}:Íõ®@h¦ˆÌ‘e/guçÃ'Ø0‰Ð«‚ô X㓈KàÇŸÀ¸JPVV‹l^³ëópi¾Avrœ6€‚ý¬ ðcÎZ•º°m‡ÃÙ¯Gzj\$«nÄ’šç”*E²n ¯Á c}€Ž¹åÏ ôŒwÄTËÝW¡cݧ&{k듸•óà¦ðì¤ÅY­‚á*4)&OÞýø§›:è#¥fÃñˉDˆ[ªC)èƒ 1 ~C¹VŠéÛCs.›7rH½µ Áž9¸F_“ÁÅ3VMÇἑøo|?‚­ºß™39.†ó%®e#"–Ä4½7•FA/¼»2Œ¥‰×]W¸þ§ðIн;Kæ¡mÒâUë@’ ™MÄLb¥žaæu TÙsÓ”ãù?y:”Ȼїp²xbqîúÄ8öœ~·bt Á÷,€° oØùÕ‡åhš¬²÷×®téâ"#Y_© šþ· ͨƒî´O:Tƒ¦7 ܨHPi‡è@™X©œÄ,æ “Æ])+ß MªË_i¨XÔ%å¶øë´õ|D5, ‡ç¸ÆàænÍÞ¿ªgÎÌ1P¢^AjŸ8üs©3Àûa*> £*‘@€ÿ+6æM¿mÐ 1þØ 0ýºšwϾl=ªåj:2B¬Tà ˆ[A|ØuÐH+Ÿ}¨`aaþ”ŒZŠàâ X¡ m§ÆÈ€”’Ôç.äÇ4G¸ŠV<™tü¶“ªVîõÈ) º–е?À¶j½îÔ8š»‘Õy¾~ž¿z œ´ÛH°,+›¹a™:bgyhÕ À¥tÓ(G"hYQ˜-TëŽõÚjqà#Ôq¾u¦ÀíLJ؋G3ÀV³ îÝc½ç-~S½ ÷kѱž[&*(v~AÈÄZ¼óx¢»87eb½¡pô‰¢,ê]‘§'*t«Ñc/P/ÙI(°%Ky«FÕgv¶ùîÀ–»­Qx”OF|¹$QªTãݽh[»Ûb:èbË6ÙÖÚš¨ïG'ú¦aF®ïÀõ3úàìÂÈfÛ’µ71¡pæf1wpè+Ø/ÝY‹ñ8Q>ÉìCTóÏÝÞO§NÒM˜ÆÖwǶ€ÙÂF7Ãà?î1¸ÀF© …k'iËFQ-*ÏAÅj+´#B.𸗒ýÊwߨ³Þß¼/0˜DÇÒ¸7Éø‹Ü¼vˆÛ˜¶Ç"KÄWO´aÔh¼íóZ+ëÁ(&ÚpÎâ’î[õ‘SäÊ‹¨¾hÊkozäñÜ‚}üH^"Ì•ì»ï‡—&ç@!úI¤ü´Êžd§žª±Aq_©Kw Iµ –°µ‰-~û·×M2­ã¯JÁ§hÕH©jòÅ@W¬]:ÞZò‡ÕóÍôYåàí“ãHU³Ê4y¶ ˆ OØÊ§”Æ.—Ì›Í÷˜Ûúͳâ-t ¥J8QðL¡’¹Š¼À"QéXù©Â¬ÜJ™ÝÄû×x‚Ÿ+f~ðj'ô¹œ«ŒXÿ#R륑Üê Š£¥ôV4!ƒ™ºF4€ï¯hº}¦oj ꙓ'ºþ° eç-óNk3î—Ub›]ü:²Õ‹Œ0JÚÁZœøÉU³ÿŒ¢É¸ßF­²Ô?ibØŸðUQσ[µæirŒŸc•ͨÚ|> ß­°z['-Ž©®LÕšô;‹ ÔVdæC£ÒýÁVÉàkâlÀþg±8 k6á]ƒÜU‚ɃK¼¦‚]ê• =^úÑzuãzÝ+I% ÷}÷ùCôÂäíÛȨMµ9‹N6ý ÍNÛMwË8‡ÄdÒ’áÑ4p>N‡Z@`Ðó‘2‡Ñv'=8{%–¢É÷íúŠËÝåÓzùž˜Æ•õ܆±r¬ÔÞ¼ë«et£ëh¸”r”›bHÑ Y+oZ¹}ð—®é´*ŸŽ¯˜*ÓŸ¾åGë»Ëôõ-ÑÒì•qËÔ;ÉG•…–àÒi¿-¿mžñظF8<4 ”½5zGa³•ñ“0mŽè D]µøk~ƒÒƒX& ôP]¯I€rz4ëW½4øŠ•××€Øh…‚aQÝì}ÕC)Ï–¦²¦lÂÇLJ¸¥8ë|ð½é›v°0ñÃýQ€ì‹­Öf·;­7áU÷ÓkR‰0FåÙ¤xßÏ&qáE—6ªë®û˜Pqt´â@Í"‹ðãC ‡îö¿¨Æö³ã®1ayéñ²ŽÏø„%tMÚò®Óæ!t÷¸›3ª¥P·!q«.Ãí­!öÙðü,ÕšJ ¬41mÓ,²:d@ª=–fúÝÒˆY à™áÒÒÉ7×´õÇ*n6j{5ìùת؞©ÏÔè>°ñ°³#XBúLè:Û,~=€è‰«Byv M!©KÍÞOíSÃZ›Jî2e„gà´®yŽ»!MHž,/\’×ìœtv5>ÛͼÏÑd pJa”áªÍR¦kªÂÁÎÿèçÛñ sÍðvÄâz¿ý•ÓÁiJÎ*:(à IØÕ‰Z´ü°ÃÏTÒEˆaÕhÃd ©òù¤ÍÁsáîKÒÊTW©±ö$ŸÐYL |¦D$ëñ»ñX`¹.—yùŒ6}wFN9Ѝ²A}y¸]+7-ˆüü—[hšöqéKå¸c—V'…&z¹cÓî^T«Ì.wg$Åoß6lC«4®ˆÉÝ£žÍ—¤=òs…+j÷d\±¿lƒÇglÙU$Ýt°ŽfÒl\®ùg«Â+ <Ã?·Ï”¸"¿Ø©3¾•Ws¡ÜýbVë@'²@’û©q~Éâ¾;í­ {Ú>'"XA  Ž”Kø«1þ³kdß¾ñY¯I‚…‡ùo·ŒÀŒ—æ8¢ÌA”/x)bwª¡CG¦;pŠ5Ý—¦¢£–×* ¶Ý¡oÄìz> —qÃÑú¤.(3â„gQVa¥ÕOB­âùÆšùÇÓ|¼!›‰Uj1Æ ˆs ¾ Æäƒ…ë¿|ŸfEo3^8[õ¯çs›¯r )> ø)j02Wê:<Ð3FÃíÒ¸ü5*·L@É©AÚ®VO¶Ö2Z?´ ÀÁb£¿l+¢>Ô]¼Ï–•Å«9ÁÞÿ½Öë,RËůÒY­vI¤µt˜)à›÷øÓAòQ¨Š®ß?¶tε<@ü_ŒÜf8nj7†ºe­˜ÈšüÉâjO»·EävÆÐÇEW*$hìü•Ù)øÖcôå@&`XØBFJcP¹4ëQ¸™œA˜•à„Uè͈­Éž+¦ÑÒ@V+¨Ùtd™ýfxŠnO¢OÕ1k&¤¥vxûiåjòŠ@ ïOQoŠLJ¤ªƒ5d¦_KA(¸"žŽÄ'g¨ø;ûKw&b?}õjNE{Jùו Ýeñ¸åð£è_˜°lÌã&E³úË?.Ý­3FÉKÂ;Ÿ¼†¨àê©èÔHÃÄÓiê6Ò/WÄì-›ê‰eÆ ÉóË*•ÃWVOH­›RZk™D[©|¸lçîb¿Îec"‡10Ã4=øâŠ8IݰC‹B°*·- G-öÿ|0è·bµý‰¼g´ìJÌóÚ™”Sæ÷^Ü>š]UÌü¹SPL™ƒW½Ã&åÞ‰áÒ´ëôã@›Žè ñ3–*¤ÙÃa©Juÿ d¹ú: vÖ¶UŒ"g¸ á£CìÞ‡ZUs"¹4³¤uÆô kÚªçð>ODž–|!×î§Æi(×ûppᧃՎÔT'“o3RÎ wôÚ'"ŒÐÌ[+”o¦BÞâÁK«(Þ‡R›W±å"Ìѯô¼°­Ë@=nå SyÝõ+Ï00Ü„ Pö®Ê|S2gú+ØT å)Xñç Äœ·X#ˆFŸPNïï ”ù¥dŽKÆp¸öCÿÐÀ+ï"zø}¶½Úé#Èöt’»-åÒD¥œcð's¶nЋòJ=ìm­¨Ì,‚VÉAPB?þIà ¤|B–tQ,mÇˆ^« ÇcÙº2ôFØðpxZ¡RßõKìÖe³Ø×oÒz¹Çá5Å9”f 9±‘-OÅÁÛåíOdTz–ä¦Q€·Qfžì7;-?àÆ š~pÔK}. n#œßüâ¬PðzÊ6åRUÙN ¶ÒQPcïáÃMÛòzxe­G)a3~ãúÇak.3¾0Í´H/2+Ç ›«¼;­RJ }¦ü­×l—Òe¨XíBÏÏQgç©0ü50­ºß‹¶¬à—¾"ª#ñ÷. ¦KK"ì˜;)„dk•ßᨠÊ1ÚC„ñffylñC©,ÂXi²‰Ë²,ˆ9¡_®ªãÕçÄ1çpóuìyH…îªDÿ=õ¥ø³6Šk’𳀬lÌÕ Ò@æ°ƒS©”u6u^Ý(ÙÇAVLôóç™öízÄ“Ka®r0BR¢vËøõøpH„X±£ûµRó•øNÅ|†WÀ±  *ªjõ±Ãõ’jpFÔGÈÿ[ÉÊúî¢Ê׉9Ò€ v;¸½Þшõo4ùï÷ØÚÍy†shŽû7}Ïr;´öÏç<¦Ü‘ø`ÌÉ·L…QÔÿugØÀP /öãEŠ "ÄS§7“ï«ßn‘‘ífï§<4mãzØ0ží&¡æƒŒ¡u\ØÊô'¤ã DüEHà µŽUKãZv˜²ÅA &†ªfŠ˜ºÜf(Ÿ¥ÓÑ}$ɱz _:’ÔæLÛ¢Óë:¾Æ$Åàéœ{˜uœ9%·l¬A¢¬u¬L Íl…yk”£A·•u‘ L×Tkщ #;÷YTç홹bíZ#­È?ÂAXùã˜y†”Å™%‚`»/ãpl(aÅ»¬ÿO¼e{ɽg£w JÌeuç@ .Ð#…Â쵌Ðñ– ÉÇsÁ}Ê¡Jb-|Dðoî 92mö>cñŸÄ›êÄžÕŒ?Hñ§Ž-v<–||¹ÒÞ¹QÏÒ… ²µø¶×ç ;nÁ‚Η¯ äŽ=ãxÛÀÜý»Á‰Zßêc®®‘¯)•L›ðh6/ IÎgôú]«cÕ§ûmŸaÏMXe Ûʨ闊@²P·‹_þ¨ª6®†µ¾uÐ@r´T±í¸žK¹²?‚Þng`lØj,³"‚Â&¯RgU9.’›Göh¦~ :JÃXé(!uò ýÒ7)Q>Ú‰ý.däºÞ­âñÆxê¹Ûm–Mçc4.-%Gm#Ù1o~F_ÉÈjÇáìy‡²düý›Àç³ G.©m1gÎ%w‘F«ÿ-ˆÞk K ]0Ô'ºÝ®ç5þÒb|ÁpGŽÉ}ܥе¼5oO³ÊlÌ›ˆ~Õ ÀE©:3A½ËB>s1‚§”Mk'L·ôw̔ܣís½“/¼8¡ÃNàÇãÓÿ öÔ #ðò¸âZâBþaze~Õs68Q¨3s žè%hzC<«3Udkj(&+ø:Ë] $!9ùu» ·z9¦hBŸøW@Aâ´XئËHóºûPá_ÖnÀ-'š!”’œsÁxØ,lh¥úáÈb¯mIʓӴ gil]f?ÈPs2qu ÇP Y–þBŽúõ –¬œí• B‹ 2¬¾hnh‘è,»2b™atÛHò2 ûúUìnÔÄãmPq#ÑHZ…NçG_-Ùe0dê½·´AÈ¿y„c¬JÂALöh…"ÐýÑ?ýa ÑrÔ`ÊF^ø4«ø²R¤‘Œ|G/çOÕñáNþgP©ÄŸ:¥QãÑðíC®!/ûÍ;rŸüCBœû7|ÇÆÑÞxîMO±{Q¦=;눚8S|/£—®HpàÒ¯Òè( %'ô×R#áÃÕÕŸòÚ9D=9¹O0,솖+9÷ê¼æÉÝ/—€ƒ @Ûv_5©ÝK¥yþCKóõ°Äò2J_Bs½¼ç öàBOHçÌSž_l¹¾Ì²–*›Zyžyj” E…@#¤šäÑJ¯ýz„™?³Š¸fDLÙËýtžK×íoЛ§üà?橆@&ì·Š”(rp:]…I¿U¼Q<¬f„ª_?kÀ„P Y]á!f3Y´“Z›D˜‚̬3òûÏ ï©!·•vèÏšdu‚¸K Óñî%ua¶ŠT§Ø2ØE‰åE•øRa·ßl[ÓËÊBÒ$ÿ~è\Ô ­’À û’ªr_H%m-ûN$ù–Ã`·7©Ô\µ£¢‰Î¤x^äùîìECÜOá­W¡2Áké©P;oµ(?¸$‹Áß›òÐï9;U¦«@ÂYÿh[D£`=@š"‡Ïñɧ61Õ&Çh]"ÊŠüÓüIä¨éªpÀ¢–õTEj|Ølþ(h ñ‹ (CííÎðÌ[8^Ü7þX3e‡Ê “$»§A4K±­µï¸ÑRÐÎÜö0Ü”_ܨˆA­Sjáý{T¥©óµv²qÀƒêâÚd?ºU®æ9:6›Vëñ…)f‚^pýT¢—bÖÙÚáÝ¡1Ö\ž‘ÿ&ŸJ.›^;b(”Dý.fТè¢2u¦Ê¬ˆ:€²f†ƒ–å1+-§_äX>…}²š^¦ð`ðÊ\±HJ±£|Œ¬?`3º“']ÛïW_pF¨WyôhçI)à ~ç/ž†%wêÅÂãGfáÈíþï<>Ÿê#úÜZbÕƒïÆ="ùù%´ n-óaÍ»¿¥ª½ðô‚–àŠÔ›®}D¡âI¿+, Cä‘Ož·_èU‰Æ~ «¼¶¼çINÇ3‰„èrp¬sÔ«áf’NR0Unò©Ë ´MHÑAê๤r_Íwï6úcëVš¿í{OŸ’çÜ4mQ@Wa!‹¥ŽÜ¥J0{µÐO5\ w¶Æøµ;Ȫa¬öˆB#ßfÉ)µžR’Œ¦à’9\¸#9>í† ¶m˜JÛºž o!ªÇQJXôÓCÝ®ssq{ÊZÙÈ^çÔž ‘Õ¹h^ Veí>5êC©‚¹7œ _1¼Q-@ì@¼9q :Ÿ!:çï‹‚â~Ý&Ñ‹ÙB×Vš¼dG^`°\,Ú?;•UZš.Bè èÆXM…¾Ç,Q3ÆÕß(Ìðl‡â‘ΚÙë¸Vþ‚yH¸Pfô§oØÊÝs:IêvRÛÝFÕª#Q}ô 00-‰ÄŠmÁTîuÉh7‹ñæ¶§¶¿×á›s‡f–àR,­LË@V(dv–Ëy ni—ñwX¼¹k,É”3÷$Ë4U ò®!#Ô6;¤BçïùÔÚ:&yZŸ–{3…¼ï_woÏQ¾D5ìãì>¥(¢vc×uIÕäÌÑÑ Y‹—L6"7[ºŠî2Á‘ŒîqНe‡âá¹-5ÿqšÿ@¼·˜¿”1eŽù—ÀX64FèöT¶ã~èv‡U„ Á¨TÁv›9ÕwšŒ†€ V<βÜÕÒ犣®`̶§zî¡L&K,BÓ©x—rÀhjšbúÝ€hùOðÉR»yû»nY7À²™nåzy}w`{ÑÅÆo]E꘢•Õ&UpFx$ .ìÏ1-”*+þ ¬çqüÑÕï˜ð¹WÔÔ=`²ˆ§4¸¤_)<€+ÿ %…{â-àjêÊ_ºfQwûs ÞoÐ>«m(5”¯Ymï*>¬€Úcõ!A ¯ÀéÍ2tyý Ѐg…&L©}¾ì„ ¬wk†I´Ö¸ hNR_D½A,Bt€³U†….|úul,&ÿx±ˆd (0Òê~°c¼rVfIwê 9û5%VÕ õÍÔ® ŒuT®Ãy•q'6N ­ƒ¥$øÆþë׿^¦®âÿ$DkŽô'tV÷çNïKn9Eu¢‘„Œ’Á/,,™ 焤È1â[ÄÍÚ¼Aº¡¸K·ÏÃ|XökBÇþ¿z±¿·„g- qC‚.~÷¹²“‰Ÿƒ£Ç™)ÐHQÅQ(ªÃHþåz(÷nßø°?Ý$Þ<ÒMÙ½ŽˆÄ^¿³XKÚ4à”+á‘Ж”Ø4ŵÿ 3ÿ|†°¥T°îŸý C;ò:Ëø…é®JÝ…>µHo’"Y_N}-¬3»Ö«Å-©¥Æðâ˜i3Ã’7«§ËNCØü „ÑSó´;ªºú‰ßƒò+\vùõJ9LžD¸¸Î—©Ô‹c]Wnö¨ÊôbóCêtiŠ$¾b3ÏjÂØPéúò¡ ºñ‰ê èœËc’Tw¥>:rg¼šè‹ &çóþXëlFÖÀÁá|?,}ÌT€ì\¤*A½ÙæÊ¾+k‹È|ž~ì“Ê|žÛbr¼ÌhéûÉ.ÙøXÙ³ÀMû%·I‰ˆÊ«ÜÎc.ñŠ ‚Û©'$ʫГ™i'ÓYV—åj½ËæQѾæÒßÈ|ëžÂÁòF°ÿv;\NµÓž­ä4²=ÌíMДÏÝa~mF8¦í/ufš4˜F“Hh1À}[l.ô‹±f÷Ñn÷üÛuNGs²ÛVއÙW¤­ì J€¼P¢¶Œ·Õ§9CvÓ[«)£¢]“ÌÙAùÕC.N¶ç·Òü•–ˆ óÝ£:Æ0„ñPÙ–ôc%"esÛ%e¼—Ùv˜è–Û5ªXrɾƒŠÂ Ã.§÷‡OÔÍéVémRóxbSôp%ËÊc‡ˆ-Õ†<tv‰Ÿo×m07䃎Ì"ýÎþw›w–GOÈu¥ùŒü îXý—pDµ‡­Bƒ)ÐÐGõ'!Ù ßÛ¸sG’wö¿ŽßsTHc5RÐnarTª(ŒS”vØÝ•“i§ÙD‚:k•ÅÓ­Y¢6›cø£ÃwSOÚM;¦Ç ¬ß+ìÆü\(²üö‰`©Xó¿ Mk²âûþ²³;â›ý£Ë®Á\Õïùç— &àp9ð )ê:b¢b´Ñ[²ÍχL1DþjYHÏâÅá,I¾~b,uÜzÆà<æíiäµSVõ`RCÃ}çJí¦´ðOž€k_óØ_Ó9ÛqÓ×# ÌÆÞ Aðho=/¦DÓ=:àdæq㹤<,‰¶ÅZr¹Üôé•v ‚E}ÆOõ“ šóœ[{71È}aÕw÷ñÿYRÚº¦hÓ9"ZØlÂb’î˜Ñ{µ­1!åQÙø_s!$M >+ŒøªC Ê=R­€‚Œ^?l*׋Bˆ{Õ‡Ýþ=û$æ¬IO£n‘;™(…’ØK_lŽÏ%é2DÛÞž†Þ¸Þ¡¾>C½örà€T™¿)òv ·Å͘Ț¢Ë8`ß’LÀ€Zy4€Á”¢ˆ ›E®ÙîwFÓÛ‚u%ì%ãßc[EÉNG7$ yø“¡c« üšvB¹à`Âm?“]¥î%Y{{ÄÏ"Úôáò͹„F¿^úäͼGµš1õ%ï°ÜaI!ã‘t&'}´OèÕ\í—Xd=ïõƒµŒÍà\J®‹í)ó]üñ;_‹Î%MèfnH=¢•«@®«u óXðC•Š›q bgs Ïà3åëïðyC…½o™êKUïÞ’?-,û„{*yÍÞú‡¾ë?s^2škvÈCv2R¶ /bÏÓ¼j×E «'z~l‹7žˆxÁÌT³M€ [³ Àà¨-ŽirG÷Àä÷ D}:¤×•èÌ?¦GayêßÓÕÁ‹FÇAP;ΆI€ D5@!ìÈ3®¼º$Øw*¹ô+õyÝ–m\Ë]‰I‰–FǨÊNÃì—!öÌê%=«ø™€ß¯†tº*Ìß5¬ZÐ&†Û϶ôݶd0Šñêkæ;¯Ä%àÆÁ(`ÃÖŠ |S“áÇ#ž– ·3þ¾@›õÔEfp¸¥,ÛeZÂf!%³M ±¶Š;¥ᬷCë/L]àí»ÉÏnÈ_¶§¬™èS´àcÂã>R ò!LMeÞ{3 †èÐ «:*ˆý0 €¸à,ƒ™õ$°þéRï{…•FWØ!œÀ™G¶HáÝßäN˹v.­¥…ÇÁÉ?»Ek2‚tëh”~щ0š Ëd¸‘»nÉJÝÕv2Ð^›‰yÉÚ6O#Êï$â/Èèç #à5Çöžámß3 >1‘¶Ä%2ïðHô§iïÙ‚×,FÄí­ž¹öJä¶Ëº™êmçî5μ!H‰åÛÊ3±ÕnpsE0-†ð?l~|°²2+̤òi@Õ"ÒÎÔ€9ÁEƒ…êÒnT”vÑø{\ €~û4l@„?,#Ñð'îéóH7†à7ÈqÄý²Ÿ ¯Æc¯¦Â$ûµóè1;cF?^1geŒ°€{j³ }›Ôj­+gñãZ™:|¾q˜3ýïG*¦ÝQÄèÜ8=æÛaíâX*”)ˆªJ¤-gæéªì1ä@–¶ 3îþš«Ï¶Ð@˜Øò¯-ì,UŠ&«1=MnÒyÖâþ£}„ø€GpA/²ÐšÊ‡&/åÀ/<#á2g›w§ »at\ ¦tÕ-ý¶?`݈ ]ÛCïl(Æt¤jëúý]·]é=¥>oT®P½®Þœó3¶’ϯUê*æJ0Ð}—Pƒ˜ÍæÂ»wGìÑ´Ósèst¥Âî—!®´5ÑhmékTv6 \t§xù±7Çá½ûz3áòw˰±=2¾ ]L)ˆNý{YùpŸ(ÓX trŠÚròœÞÔj•Þ ‰¼©„8‰#a|ÄÀF¶²—þ’ž*Ç/áh5Faþ;‹[ÖByo\€O/$¶×^g,°3ê¦{ò‚ô&ˆWqÁv ²ylÑ$µÏ °cHõÐ=@|dw³ê> «Ìlj¿Ò­Ôª4Öå•M¼ÏÊ¢ IYVåZ&ééb¨›3˜ÞQzÃw*®ŸŒ“"/Öv²àÍî¬q¶I›ƒ—u ±7@Ñ´§Æð”ã—<™LekÍæî”ßð½þ^!öÑp§ ‚á(ù© 6Å;<®Çé2ábÙ44Ô²RÀgÆÈ-)´M|ïãvÊí´â’”r0¶ºOÿaõT³QH#æÆÏÐ ŒŽû'ò¼·ë °FÛ ½ú\ä÷”®’ ¼2˜0Û':Ûps?‘9‘æãþŠþÌ'™|‰è‚v@žÉ»h¹ñáÕÓ¨GÙ冿ê´9± ƒnþS»1Q„¡®g®4=Ѽ¹ó_›Í¼çY8õy0^ÒÞº±×d›ž~;<¹7¢Ž}O‚ùÜa4}xsuÏ.yÓÏÆ†¢IT6{úo±Ý•\tõ·/§È\pg•ÔáßLÝ—]w¾‰Ù¦Å'O$ŽfÆ.üq{Q~wTá/«óh#ƒøw™Åa|§õåy+ÒªÓ­*tá?ÏYuž;lƒ‰ºhiíN põ¯Ø¡[›E)Èw£—¯ÂgÂbóXd™Rõ] ž‚ÚrX5€Ž“ru|˸YÊFFÕ„^¨V/?LbÞØ\·ˆt¯4Òé%¶- }Ê{C(ãÆ,<)|ãÆvá[*qz}5›<†¦õ7ñxïæo³²-¨Æ—ÁðÿL¬„ÓI¸¤®x~^Zg4ˆ2a:—‰¯îÒÄL[Ck’߃[Ô³t+ÖôØ¡1lñqµQk2Ú&W—œ-“ÇÎ6YÖyÅ %— 6ó|ÂÙI…¿ÒXãMe×':ðBšÊ¼B±ÁLV8xÍy[©Ä¡ô4˜MÀ÷v{€d2zC$tÒýTÇË®ž~â¨8låïZ䢨8-­qmË0ï¸ÿ=k( -<ýqcÅ4Æ3ñƒëåe”wäð;úÄ>_ÕˆGhÑJ*Vƒ+}ÉÄu¥îÙÎl¹ˆO¡ÁqÃü9W¿äÔ§OÕó¿aßbó nÍ\%ñt…ê«æå\|¬U?zŠßÊB}j×$Ц €°®û?ŽÂcF!DÁùæ‰åùq:]ÑèÝò72‰UF^7ˆ¨y§Œ*Ú¸ìR ­“ò€BÛxãDL½ó¬0uãRIš(} çhrR1£¾ƒ*ª7m]¯Ôï%)ÍÏçêe³ô (±w0„ñ8¨`èÆ`;3mìÜ aеjù•fEùê\‘Î'œ9<–å´¬œã*ƒ<äè`'“l=¿5Ðì{n¢$g奙“ðnµ;ÑscÈ&þ,Þ¨~>YVÇMyíQÉ]ÿ`Mk£]2õßúg¦üyÖˆñêü®U º¿iÅÞÿ0û{âôú¤•”ÍÅX ß»ëÿpQh&À÷Fvf.ã'1Ó+-qnð‰‚÷>‘§U¨ZÚÿ‚ûó9‚|êóø'’ô7ˆ|ºÎ)Ϥ}!jd7´Q¾BµêrØ^ËlL‘-0jQ9†r À±ñO€îè9ìg”9o;®Ö:OTÒ[:¬Q•ôosvÆi6­Iö™;&_Jâ2ÌÞœ`, uÈU¿ýÔJç>‰¡‘á¬(]ênpFÕFÃmMW‚¿°rwªJ|½.Ëët-&üº0Ój¯0çEo³Où5!ú•Ë·´r›áÒï/*÷¥ñ±X³%‰ÎkÍctòßàýàÞG®AÁ„n!\Ô˜;Šì‡ß;¨ƒ¸–Ÿ@'Ã)íŠ÷MੈðéÀ²Ì §A ´k²`¥M×b]Ó(&8âcyÚ´.7kçæ¿y@ŠÍÿ)MÉñ. ÜK­]Ê))¡—9·¶A´b -âA÷ò!‹˜Ý#{žyeoêœr–™{RË<áèS%òÊqN°¹ø¦ìù6?£ÅÄDцƒX‡û"e\bb &d/á_^ $cõ1] Ó2Å®©¿\"õY±î„[y oL"»ÉÈÚ*È£ædíÐq ¿í‘…e[H;òÙ>é¬iÖ>õ€ÿfÏ9²éÜ7:¤si[֚ūqðí).A™ÏF÷ió‹ZÙË› uŠúÀRh¬ ~,4ÀèaW ôîb¯euûIfCê õ”®÷ôÖºÄÆ”ðZ¶.rf†âØ—S— Úe ]ö[t}dßViï V”¿96÷)k-ÛMB"z‘Š«î·?fŠõ9%ûÓn®Ï_^™ä«„v<ãJ.wW×{Í&s'QªØ™½O…ï:˜L^•0Ê NLE$F\&‹ìô3´7×(S@uv%8ÙZÈ¿)Ê]‹îå Ó Ã¢À–h.¡{ !C+Ñd›‚äßs¤#›áÛ ”ä'çÙÃ.ˆ&ØÀ#FuÕh5Ñ3ÓJ¯[W«œzõÃ~e„0¤u Fòp¬) ¶wC´akªŸÝŒÕÉS¬b®-Š%nín©»€>fÿ-ðü y'X?G;ÃC½/ÀsÙòáÇN]4ù%;¨mcLJÛ/îhc«‰­ëð믖ä,nñÝC#¬!ûÏLÞ‹Å÷+u5æ TH0V×Á¡,Báø1/¼/5$m†ÊZ•(€¾$ÿQøÊzwøD÷{ˆúD!ÖCê·Z@°»ã>%ðJ‹*€ÔÍšQÅÎLà œ²xõ¹Óc¦_'4ÙþúŽK¿€ÿy­$±ÈÜ}ò®¢L­/}µl°½*™“2àÓùB©iÇÿ^v/Q Óäç?5ÁŒÃ­ï“]&¡yö^'2§ÎËŸ)*f Ð'šOlKõAšÌ[˜GÛŸ®Hd Lg} …ÍdÂó}âMjN+ƒ•[l昬˜‡>·‡( ŒX½Íëܦ™tŽ¥d’¿•ó…÷Ûž&lõD™(€Lb…÷1Gkуõª#«r½'­…èøöˆ¥Ë³G ¯Z̆å ¦0Í¥0°…¥ÁÜÍ6jDÍ‘0ó9€TRj¨fãæÈ±"wkß%œr!}Žà)Å輬‚¢D7?ú†=Î^èàýÐÄò—¹ ®¬ÿUcÂpT?{MD…ªÔ•ÊÝ Óé&劽©FæûRÕB~¼ÛšeTÁOT ΪøJPm Iíl+¢ žŠ<ÀŠê`ج±^Š|*ån¡þO,„DÑ覗—ªÉvÕŽqõåÐ&£G˜Å>qܳÑC?‰”CLì QÓÏ‚³ª.,ÊÇnœ1.ápÐQ$;ã ]oœMc_¢O¥i–w«Áë=j­Ù›‹FñˆkWPHã·ÛC8\²#?øv¸" ­«oÅT òt¶RA / )R™ZÍ©>G8ÆÙ~ä¸êÞ1:ðΛɶ>Jñ5SΛˆ_¿Tý,XÚ«hÆœø¥Â¶Ø9ùœÁ%ÃöAåvÞ0W¤mOì‚A;‚™Þ˜ ¦CºëŒÌì(#x•’MåQ½n#ªSh³tóá¨+IÊø, D—ç“Iµ*Ü„–+žÒ³ƒ¬ãæ àßN™ú–Ô`Œ^kQg £¥ ,_cçl„ÌO²œS>º°@ìíP¨7^ç5òщ˜%g¢—ð3.þÄ}aMT­ØkIM½ žUäÑÖêžn#* Ô•GÞ™ nò迚€¼õ2@„5¤Í˜ë±q‰1î e\WÖlpî·xú/#©É„ÌÏ&ŠM/vEàyi$Gdðcº/˜½;ðüÌhEŒ,ÙFã8U(ý5¤p{‡ÔÓŒÚ|íK¶A7¯óÍfQÁ mC³QJ¢”\ŠŒsò¤]û3¡IF÷ÅTÞ0ÚŒ¹œÛÉ “ùjªˆÏŒ)TQJ‡1”("AZ¼"i‡¡Œ:ÊÏy–ª<6¢U4è>u—Þ ×­DÃÃN~V®à›7¯û¥'¿@Ô^陘’êß“i¹Ä:Ur§kwë§î>tööÞÅ ¨%ˆ\ÌÍÔ ://Àwn§ c¦âœ i(Ei"‹ufÿyÓèU½KUIäBjûÐÕ!¦KT¦»øðöpCi®-û%¬¥ÐÛ% õ§y=²¿šÇV+T/Ø´÷Úшþ¹`ÎäoÍNnLF“êô‚–¢1 %ˆÚ¨s/ùªž~EQá÷OöâŠ$#Óö¶q± ñˆÇÕq΋8\h2ØÃXK(>–´M_J­@ø3TG„ NŠïg‹¿žÒ"nl¡U³:oµšBëF:y,M]¬­˜{T”zöñÖoç)'5@רöà†/,Zè­Ãnðæ/ýSW„ g¯ÕF*i7¿ø_ÂCظFàZR‘%QÛÿd•ûRÉÇçQÌTþç·å B@Ÿ} O#Uhç—@ù½@á²¹[²_Îåä5¦ë+¡€#»è9FЭĦzog*ÕÈ?,ˆµm´†ïVzh"–‡“¤g* -È®˜Ú"U¬Å`¨fè8ÂB¶cÐí ¹'#”tɼ€X—ù æ/äýUüÎ9ü­Ï›Q„ØÂ¸Õøn-ö Åû¨ >Ð)Ñm âSn iwZO¥,>}â7I˜î™Ã#iaBQä”TøÈ"#ø?íáƒÈ_¨þq$ù¥uI!o7ÕhÊ*ƒL½ñ½›&yÞëTâ>8P0'Çm`0®µ= Û2lHQò}Ÿñ¯ônF @=nôãÈÐ5’`ƒà.?ΜAV·9§švøÇÆC:Ú+ Û2?G¤¢ª‹nRðá1!õâÁÃÙ£“p(°¯ü-·ÎtåˆP|êV;[O¾ÞÖLÚ?À§\?XŒÁøà¹ÚJ[NÅšÖÆÛÄýÌr–‚»‰Z‹·Îp-‚'„VÉ’èroÀ%…J‡§@|cg7Í,ò/<¨ž¯%o3ëÆ,n³Q Å~å¦3¶ŒŽh·„4×åÝ:›S8ÁoŒŠ¥R*Y!SÙdEXÎÓã÷„`í ã’©ž5¿ÈÚ|¶“²i&>9¹õ‰õ¦O¤ð*éİu‹_âOcKF-PÑ·Öþ¢¢Ãtåðr¢ð5¼,EÖÚïG‰ð4˜Iiªuà”±º§T³pøïŸ xsÄrJ­z1ž¢ºA…ÊÁ±ÏϪØü:ªÃ©`çºæ1w?ÍÊ!¤ij`»A$½–ôRË„×dWJÄò!>dWÌb${är•ØÕåÒÛñ•Ít§q¡ßCÕ+i«dy I{I×òc]вC)2bTÑÏcwÇ×næèG°E”p}Òž°;B‹A*· ïøø'&Åmê?o{…EÁzÃŒU,6üA_¡ªÓÝ=4\¹‰`kmÓVáÆB¤þ¶ ´½FÃ<ôËí«–íÍu`ºÞ«M—\xL¤FvJÍ”|Š û5¸"ðúN´ ; ýÍìº \G!4—mg WöõIÚ|m¿ ¡Gƒ˜QvñÛEm«¸Q]e¹£l¢ž`¼»ò´‚f^QÅÕbïÓ£Þ™:¢ ¸“·®¾[©!ø@ÞolÁzHÖf÷(Õã±ú%®_Ý¿2;HÜTº’hn4µžZ…‡ÌÚ(XÚÉ^áE žÁ”¢õ':¨[*u‡˜ ±·g}TCþì°ì X!5uÿhrxªY“¿("Å$y¹öùQ®IÉħ'‡70 Š*/C×ÖÐD œûlK%a3„èv%¾Ô­¢F–’úTWÑ/ÖuÄß_lÛjçŠÆ _{OYécKOÈ^ê‚OpmihÎãoêEê‡B6aIK—ÆE÷Åÿu–« 31Ê!øä‹yX«L¢á¾éd™}®>Ó…ö¶á3ÝûÃJ'€ ©òM9p”ܯ¼îœ øÈ‘åp²©7¸š[ÞÖe Ö-Ã+ÿµ÷‘YŽ }©2TP‡*{;¯¸¶ò¬£pZPãýr¸Ú;É“…0ÿsa=¦ÆsùÊü3"N.F¤)f…äÇ3‹1#©畺ý›V:Ò v %ćViÃ&óyÁ“õ„æÊÁÞqK”m›h°›£8g©Æ*Óô~Husì{árùHCësJ´X3w­á›Eü™òäoYð%ìÒù_‘r‚¤ÈîÂ𬸔ç¼ã¼¤:`ô .Rƒ’ŠüadzÞÿÕ¿ÃÀ%—Òp/}¹#ÔKq¦Œm6škÚÎç×¶ñ.àìh Eµ=9š8_ëêŒPÔ® Ô#öâu­|ªèדnB ¬v5Ý*î’ѯQ…,” ç¯ëP0GØ[ó~°.”î¶ù†^n-‹Q/¹KÅLNý׳uxžÃÊ\–5µ /÷o6N *ºàW¸ì3sЬƒ8`'X·°o8åÑ\¢EâÞ/´ýÀu¿ß=ÿ%Ãb=4”‡±hõŽqg%g„lüOèTŠM:ìÒÈ»y—Îý¨î(æxš9Ïá¸rí¤ó`·&Ûöó<×"*X™““J~  X ú,Êç?ÁãéÆÌ*«U™ÌÀR‰)»¼•˜ù5¤w ·¦°>Mì«•R”€_›ø[H æ »È0.£ °ºn¿x}nakåP¾›—¡Öݹ|DÞ:®ç®UÏ*·&,1SݰȒ4ô£pÉö8E[ÖïpP+rïwØ#²]¤üCquí†õY.¾Â!褚‘º¼üDPº™¯Ù\‰HªÇp燠`eðNÜðÊ F%Ò ,^uN3€¶â6bÙ?Þª~{¤ßé‹3JøÍxiô;'NªFŸ¦îÜèÒô»T­? Ž'2|Ø¢M)›‚Þ +é?DT¿Û²êk>3øíNMiÂÒ©Ü6æ ¯Õ&ÚøA9(R¶u¶w>†Hæ¢1NË Ons­£ª @"~åˆsJµ*ͧ‚IqØæªgÑ‚t°ùÊè[PQ\7P¢úyóGñÛB(#Õ6,4ÅYÖÞÃØìé±eR÷ÏÍà6 &1 ª›a!à$ûÿµ€*;táH¼™s2 ÁqAÔ‚â¤÷CâP?eZ‚<(R˜|à @}þ·.H¡«¬PY»$UäK=¢¾¾ uÍÔ¼;¹½ÍФ!»}fÊ„3•å2‹ô»i.:¨8>­€˜(»¦tó Ì9Ë:†ã)À’«Ýš§yбñÁUáÊnÓöma&ô­D¡Dp]”tÕ`pŠJ9^™">n έlLÕ0ð_;ÑÞ¬BF7»Ïà%$ÄCä®6~ÌùG¶lë…ÙÛ–_‰˜\Ì‹7|Bsú‹ µ›mˆ%1÷¨Z o4G¡„¶¸áÓz¬Ú{¿ #QMâÁçmúõp±ìd$oð®­UäWÔm_*Q-OÁq8‹ªÃ3¯7óæhÇܨ¥çªe÷6êá„”PïŽa–ö*’,ªÕ•D ìí¹«.%5)r¯Lä?·_NX)F˜{4Í÷{?oÜùŠ`^?/HŸ–oúO¥kŸÒñ¶7¨–Úr›NÁê¹nŠ?iu‚ÀY?Ëà!-Š™Óï•“ØÁ'Øœk0ý¦³¥æ ¡çcœue›úïc^í{\Ýh3à·­mÕ/)Éd?Ð{iñ.R~/â9µ8û§qY”ª•~8Ów]»}Œƒ.²ÞD¬Ë(ÿ29˜?ñ®ó¤û˜Tž,7·8bBZÄùƒ"fJ‰ë®æ„ióñ#÷~i¾¬ÍI½÷4ŒŠr€ÕBƒ>ÃB u¼çÃ*ÇÏå¿Mç58«C¦E)BˆH$À¾ÞkÃ"޳ÀÈà´†ð—Ù`ÄóV¤Nñlã˜|PHqv%45ÞSÖŒßr^gµµîƒ¬+¥øˆÁË¿¢Ä-6(€@‹N€JIÈ×Mú9h¡Ú{SçÝ‘§rbo€> ††¬M&9óÿ7Ú¡ŸœëŒ.}ö9ÑÌ~„Тâï4ÃNrœmÈäêÞª³7N(&ø(Qãb ÆÑ4å*\34NMÓx° f1qB™²:xEib"EDÀì¶© ÇcÔ²øÄdñv÷ÒÆ—Žá]¦G F?ƒÞ*…æiê¦øê«FœöaÏ,*µ†ÍßÏá¿=íÒþÚ2çQü c#ðÊêNÞŒqRN+¾»…Ê.ñj'‰r™e³²é)þ@1 í]l{`I¡¤l Cí©ªm»š¶ƒÀH²n‚C³Jö $¾@yÎÁ-ÎŽ®ó¡EL¬¿D5„Wx®¥ö`5€Õq8’à*Ρ“ÚW#(£~ÊXgk±Õp‚ew,ç4·–¤%m~5óuʬ7¤üC¦¿[Œ Xûy¬„4³÷&C·{â©Ûd8H:9›ÓÏÝ«mÚûŠÎÆ÷û!Iê!…óáÒÈ5¹Üã‘OúŠÅȘ^œÞgIa"§" >Ö±{‡ƒu‚ùŒ—f+Læ¹”Ž¡ 7F‘[2\B(þßÝ(•……âz ÜÉÎýу¦J’L\¦Bh„jdŽ¿+¯AU¤»Ý–¯zæP8£Æ'=q¨É…- ÃKœ<Àê.M$2‰ kÄ6YhÃâˆn èÇŒÓÁö€F¥—›8Ó[ }‚¹Žÿ„"hSKÔÐ)á¡UVó–aTNE§·/ ú}k–Ò³£h€û²õQžÎàjìu¯ ðH}Iµµ500z“ÙÓb§ƒœM•Ò²Õ­I >´m==„(!”2ìJw ß_MÔÚ:‹i) ʺ' r¤úàÆF1×ÂÁÎ •ãÍfÉýõ#éyEÎpèp.1þ[pŸJÌ/èáVÇ"qé…c?‘?ò ­ø€ÒH¹Y:*§¤Ž¿NÌUjA3­jÅEò¼P|ª°° Å ß—Æe÷kò²BÄTm^ˆ'`cfb¬å¸……•Cg5Dé¨ ‰{T¤lÀ‹ G“r§uV s«…Fc–vÄ_2#ŠV ¥ÿA8ïópg•Fò' rF$ ©” 2èC:ñ”êÆºÏô~˜Ú/t'úè*K a6É㠢ݻ^×LCˆ†9I¹ÂHIq„Ìöô¬¿Œ®’a¼äº5ô#CÄÂé©8 ÅÙ’¦Æ 1­_ÒºÅM‰;¢,áL '\7ö3|ˆŽÇ;‰ÔoŽßžA>×ðI}\ Wrç]'H-Ü…Ô‡ØÖ‹¿ØÆ¦!\ºë–Ý:\¦dü£’”÷7ß=¹IZÈ¥þº.Š ”˜:Ô5ø÷k $ß*ãMêX¹‡öŽÏ Öˆ#ôƒh5Cþ~â/ÉœÙÍLNÔš®Òæì?ìÏD5·¤ý=“ïìJjâU ò¸†°wVÍS´FoÊt¬¶çÉðª@†­ÈéÒ«7óE:z7´5g¾Ô¿Í\죒š]Û—DãÍPe …í¨!ïèùÀé´®SL–°¢øO‡˜ÐK¿†EÓˆ*T Cet§ïÞin–þh:¡/øÊ%1Âg¾akØ´iµ$K½O )¨!Y‰{S¡‹póÛ%hHÙOé.OJ°x·w¹Q-<ø*§ç‘D)ã/¦íÓé˜õæuG¹Í†ï*ãÄËœÈöž×h ¶ä‘vÉäÏ@½°X¤!FÎÄ’ &„¿ã"}y¹*ËÔ\3­9®m´•H“2¸òÌèσީ$înñû â ©¢$ý¦–§myœb,.½V[C›­^›‚1MN%¶H°?)íµên26ijb;Q‹C§øa"ý¿^ZfÇÿ.йºŠlŽ6Eõr¸ya¡oÜûåĨën®ú ]ž\WÇæ®Ãy”“Æ)ñb9Ì8…efŽöÝ@µ:%ª¶ £í YüR„|,$òmOõåèb²Ðdчš®?G.0í³QTØæ\…ÝôIKÁVàrâX–FÖì·ö[˜˜£P‚~Œö˜íkñb 0<Á[O"Ö &À+>…~¡¨l•éü‚ˆÏæ7⢀Øß îȃNç`ÅaÀåÉ’™íí…ЀJ¢²›.µ¿ËÑ3~ke‹YO¯ƒ?)䔤HˆñÁ˜£Âæa¯fÖ|ëC²¥«Xæòxÿ]0'\u;cçM|o<ä¿N4 Tˆ»Ñ¼ ¼“Õ/æ™á–sÔý¶¶h›J‹¸=Õ­±½úò‰™÷pZX$Ë®©èg߈ØöŸ^»˜šOJ¥¸ÓVÄXâç°Škð¦oòQ@åŽ&ù`XžÊ;ÄÖ™Õoê”ɬל0Sꔜè&훋’ÿ÷Îÿ_2äa¿Ó¤fÉúöfÊF,öï/?àu *óP¹/Áæc«qçí"¥OÏ“ð[¨¹ô*Þäµ-=¬°¾ ²‘‰ðN¹>6Ü*˜wÑÚÑŽFo’YpXß±‘+p(6¡øæ6ãø~å\a¼&Ÿäé­ODƒä£ÏÞ‰€2jk°W+WqHXTGq|!Ý”Y}ŠiÄ>äöDærVœ?ª;}Ö)NUãrh-VÂêÓk¢ÿ==Ÿe4ŽIÄ*õ£B]GÍp¨@Xå*Œ?ŽÅIÖ{×$ÁÅ ín~Ö]ø#ïlEsC¢Wô¬ñ0S}Ç‚ku'üîÄ'„‘òóô%ôJƒÚ¥¸«¨Us~¢fhGó.àD‹ÄÇ+w ÄÔØV+ol Ú"]elYI;»÷Gã {µòq}μ„2Ñ’„™ZwudÖªºãÖ [ÚtK¸?ß-o2æBÏ‚wIÛåU5R]5'J¨’7kU QX|'× *eúì0? »ÉšmN[MÙ⺹eüÿ×mÔê_×W½(*.À•-¬;l"gÄPªþ¢öDLJNÊNd9EZƒR©QIñYL¢˜ [O} H«2z/®«‘Òz²‡ð Ÿ!Å—WfšiL?Ø6À//`¢@•¥ÐÑ W®[ÏŽfhýrL6ªç9Kp'ri.gÜï|2u1ïû.Aºy^Þ4Õ~§d?zE$È$“täNP¼kY§EMIçËp+$ÕîbsW7ÆS­€/Ê `Ê>õp¥M~:¤H™gW.Ir[yäGNûø¬Ü†°ÿ¬vþ´räÃ#¨{D¤@ùPT;t9TÇoÈ꣘uz>^k³/yj!NôEàîÒXuö“`9a¶!c—˜ƒ²¿Q¿×²¦1XbôÕ4ðrÃÚ¾„j¡ÆÛp¯ãJï;- -lGêz°±Í"²]@i˜Ko¢¬ïR§~Ùwè)±‡]1ÛÒ3—a@<4&8 Õ¾.ä³üÚ­ºªÖÑ“_›ÄlœÉJýQÞËxWd‚¡Þ÷“YKLºÒˆ€’ïÕ¬¾ÌQÓ’~ ²“ã«°qly­nñƒJÔ ‚5úçµtâ”ùICN†úàyÈl6ÿUYô“µ›¬x‚¡!}¾³3#«/G~Y`Úçêõ`T;†oÇ),}‡UŒ£`)ƒ_ØêêBˆ!•6â-Ä™öø— ìâõ;üääqÎÐDbUšB8Ìé<0H«8´/†¹ÂóÂÕ†B’ü ’‘[¢úbtö‰¹ß—®]T4µ€ƒa¹± 8Ôp_4á½;ç»4j»s°óCØ' Å&ÇsU÷Ãå 3®«c7)9n@ä=¢[Õ=¡°Ê„W»†gðþF¬e=„’84(AR\n$uø¿àÔ©ÒZiäL¨•S“0,′¿®ëÜ=1GV­ÙÒ½73Äã„_Á°œf8Èp@£$9bž¦‹‡Xœ·Í94ÝòÐl›$¨:ëaVÃMñ¸©ÅOÄwÓV*÷U¶ääu'SJ¸áùõÞ‹Ë~‰¼]„ÓC°Lp ti†oÞ¼^ÅÁ£P€6r;´´ ¼$økv͸ìÑŸu3édö›ÉW ºtÆß¶" B–º¡Wd7ƒ'ßßy n_£÷ÌÆ¹,æ5﮽uÒëž‚÷—z{`7A½2È ±q‰iE1E?L#öËkØ-v¬»#CE‹ê^-héj¹|Í£O[ŸÍ´øSíAÏ­Í”€i’`ËN~±ò§Yºþ™’Œº ÀTŧ—…êËþÚ~^ïO;\Ó÷)‘këÖÆ!~IòéÿiYª[Î;”ˆ»ç²kˆŠÞç "лF˜ g€m–sg8 ×EÁ9F¬Ñ…ð0â’žiñ„°`Ûä°õm¿aÚF_TÇM{¡ü|¼• kv*KPú?BÀt¯çàJ”Ú«7è}ر¤6ª¥·L{Iœ?婆œ<ÓåŒàܲ¤Lmñ—ÊO­íT KÁ÷è†}øÄvmU% Àª —Àì…ì¹}É0u¼åzí$…z”¥‚¤˜׿²ªÖ¥äþd Ô°<ìeÚ3kŠ0K„!_xD©L­S‰úÉÒ÷íÏ£qwkuSãÇßz‡­$•)ܶ­g&+Ô¤ì.ÉŠ悃“4G‘Ø:m^à•ˆž9 ºVµ~ˆzÜYŠZÚÁpΕ@oÊÒ2*fÊ^ú (¹Ð%€“zìâHF'¢j…dVîÆvã‡.Í6¿ ¾7½õ¦09MªÕø7^®´®ìƒ×€F—¹)ߟéVÒ>‰Ýbxj&Orùw]ówÐ'ØáÂî“踰ÎÒJ$EÎ8² Œ•P ˵> ?H£pMfm*|{hBž„R5ÈŸ½±é1>7xÿoãû‘‚¨o‰o4릈ÜWæ+ÚFwæÂ,¥9LUâ¶ù쪳Ýô0¬ˆ©ôc—I„}– x:}ó­¹›ÕƒŠ7|ô¬„ÅtXá¾O†~O 7rmÁãýˆÌ­Ç•“œÔÜ[gèÛ8Kôå>¨Y]®/â­ÒìAÆœSÂhß‚rŠv†Ù”qU§kýŒªU#]63Ь¬¯›;*Ô¸>ô’ב $6òºü0[ù_G2y;Ϭ:ZoCh¤z ùç×ÀcàŽ‘dÌ<À;0²ÞV»ºuGM!úLRØÿN¹He¾Tй¸û–ÔS[E‹M§­# @¾¨ULëºt›À[²¿BËët|K]? DÉ‹Ât]|Šˆ{‰yãø—g;êå5‘І"e¢¶ÙÖ(o„'±—ŠŠ oðP¤£Ê•ª•hnäÛÄ—_†52$V&˜WvÇm‚Ð¥˜ Þ°‡í íÓ•¬µš&n« žÑë} ´¹8+òäë$Z‚BN~ÖFáÚî¤ô6º[älblùmô/}ÈkFB}@öVCc|R”¼¨²˜~s_)· ÔµªzþWYMs|$ª ­Rò%f¾ Ï‘4¨ž·= Èà=ÈŸ³ƒ˜Dyð–j¶†ð Ž\®ñOe;<ƒŸ£´¥³Ú„n³¡ÓÖâáMV+ÓÂ|¯t P3ß°ò…Çš¬%9ŽÂaFm Ϫi#õq!™_o™‹ÂÚU±¾úø±Ï >Š`<´¸½€S ué…Šì2Q®öݧðiÉ’ y VTT–e?7d<Lþ¼›Á+Ý3ôéµv$c _ûpÞÝü±\²¨¡H£8”ŠvmYŠâjËyÃo‰iã4¡,èÿC²¦oÆJDzÒ·¥aþ [w@šJ®‹¢ƒb¿+ '°lJÖ¨ucü bfNcÍ<9Ã3»ô3¶F!x®ÍÿN´Ð‚oQ,ù×\]0o§çZ« Öær·$›ñÔ®:W*ñâ J‡2ô L^ØÖY:-DzòJÄñ¿ká‹{3EÁìƒCVøƒp ýYìnèéÇ¥7ù™µØs¨#àŸ–ÉPá¬0XyqàÚhñó+ƒP\àV'rj.õЭÎ0wô¥wû×§1÷Å$ E³à—ömب7±ïF©,Ì+×õ¦(¢®é”ãMí›E¥´X;Ôk>TáþI—ïpo¸~' Ùí0 íLí\•©t49°¹-µ¦›W`ŸûFô†Ó·áÊ$ 8n ˆ(yè­œ”¨™~˲ľžów¼`ÎsÑI¸Å“Ï[#nž&¢>þ‚#Oti_–=‡#C¶Ky+sG©«Ã˜‘»>v|u.°Ó¨«è€@ؚ̒=eîÎ qš){N5ã'?Íd&Õå&ÔN–H¾SÕuqrÃËrºÆôëI Ÿï­ñ}a¢ík'Ø¿ö'8àJ` »ºËÍJX Š­“ÄÏ%*™røJ‘Ÿ„/£ìy mWõ‰ÍÎ9žöNçþнƒÉi,2n ˜spKâé7±r¤Ûø\tÜŸTRÖ—öl‰§|íKZONü:ßýóVïªñä–Šy֮݉0PÌq‡•jÝy×ïË<§YEæ{‘)% vm WûImblbï‰k*ï;eI‰‡„½øé߸/áûèL7N9îrøí9bp3S–yµ]¢u¾B§ µèiˆì´¨K]gu‡<›ii}éCòõ#ßœP…4êóÖH%w¢ðòú¯tN´•!r Ÿpas…97Ò܈è+x° óö¤gêN,t¶…ŽÜÐÒŒF³:Uù­âÿ ©yÙ–_‡œ „äè?RK@· éÎ[%$líÊsŽ¢Û×uY’Jþ2ÄÍr !bäA«xÑ`øW ×ë9ÍUˆ'lL>&€FÎùöb6>»„Õ9—ؤ®,Ó™ ¨’J>¡‘þ ÀÄ& Ùýœ_.çÍå,Wyó9óñ¾õîμæ3X¥ ççgr®Zµ›M³ r9麢CÞD¡ÁPOÀà­Q»J;ËbtÁßïRß ªà†Q™ha¹Es÷ú¯85óÖ Çõ5Jz`ØCB…;³à%Uâ×3Å!N–ÚÜmö85ä傱Áiƒû~ߨûÙK $x=Q‹Úî?yžC$hwte9r5áQ1aÑ›, T@ùÑSæ[Vë²Úë%ü +c¶¼:YL«Í¨ÜvkŸ{ó _$ZLW=3-EóxJ“iz¬1„‡üÇêP9€teŸip ÷ƒ‚©k-ç:Û™g¤}­¤@öûTÃå^(bÁZBèûâEFßJ…nÑÆ•h­›…êé{æ02‰±ª–šRWˆ7K†§Ì̶R®®íÛb‹VÕ)’^£9nÚBT'òŸýM+¨~ø0ÖȦú"ߺÞ|f>IôÁAP&\óƒgªcì@=~Cg)»ƒU0Y÷‘¯ˆ¿—¯ R“6S317êÙgDQ=¸*ÑðÙ³eçbC žæõ8o0çF‡=çwšÄhv/[p.”0Ë«¡€f¥spØ)r»WMm^aÏ¢)eó±XšBãbCÉÖ|+xxãùùSàã—ßÌ•0ÉSÝ8Õ8m‹S.¼"¶4À(þ"ÚzÈÙÙ†ô¬Éð¦©Þ>>ü¦´äË0@|Òê€:Â3V¼8G¼.v˜aB‰˜>dFù‡þ¢@]–+ÓÁFžuêíÒÂñ² MÜe¾­`»¤ò› íDçO&ås,Ùm 3NaxÇà ²‚»ðú»cì‡qo.mdÛJÿlr‹|€©Mž8¥Ÿù9¹ºD:¨GPÿVí¤1ÆÛ<1Ú‡¾ß›ó–¾Ð€¥l}ÐôZ±À$á}®ùž™VsìKÄõ_Ĥ¥Ÿ:iG_;>‰9WQ…ÁŸÁ(8)çÚþô&}0"™”ÙФåÈw'Gã¹’€©~öí¸¿+UäØFÅæZZ!¯è+¹Èó²u­–™ïZ¢|ÌyÅŸ‚ò£•æÃºÚy‡ÈêEA{óÞâ›l¼h>Y1øÜDð£!^Uÿ5©ÓŠƒÁ?¡ÙóXéÃÙÅ Ö¢_Oì>ÐÝÀWJ—wú[Þg¶@aBÉrL©Ó‡B2b´ —ô–4‘m^ÒaݧVÏM¿@!ý¬·µ9”~èYÊ&!íಿ"CUÐ Sˆ` 0‡ØTj2ûˆ ìÏ6¬ïMàÓtÅ•ÝGê}’zèÒë8¾» @¥p;ŸŸª‘{@‡×ÕåÛ—hMnÙÔÄR»Å‰šÔ¯þâÍÒ»vɨHÔ¯Õ6ë âaDvs “ªw.åÄÞ—•Õ¢f°a¹Ýäµ ¿,’Zb±Ú¶Ýúü'XŒóºŸ¥è…˜_ù}BŽ·d)SEÍù=^Kž{ùA.>Iš£òâHݤr†Œ)çìÍg——J#üð¬ÐeV¥Ð½|‹c.‘ íÉýª>ö9˜‰Žó¬!6xú7€I*XÑâ=Fu$%‚ߨÞÇ䛧—qŽˆðnsÚp+êû•«^7¦z /ýÂT”ãiUÓœúLcÖ+Ž k¢·m·á3uŠLñõ_µQŽèWO®€Þ•Z} áÿ0Ã6Áæ§ôiA½¿ÊI;+Ò; š1 eªežÇeúº€Qš‡WÒe!hùâE&‘¥³o1?—U/JùQÏsNñÅSü^%‰ Rô<û®õt}(Áb ö³€2‚ýÜÖfm Zw`I‰2öóVí•ú0L`…àw±!¾Ëí_[0†/ÔÅIYìñ2-¬VÆM&ƒK‡/iùã:Ifýg“ï¥5¾‹X´™k3S\¹ý’•D:Yh¸^‹ —p{ìYõð¤|¼AáMþ'@6êC‘7"ŽÁkR¼ÛX‹%Óaˆo­j* ÿ!Û3h—´ƒ1[^ÂÛÿ²ç®wãÖÂ$Rkyd²Öyb_Ã`>ìb¦DV {ý|Éxꔄ=ò+^&1¬–¶ºÓÔµ.Ø…7Uíï1œî¢ÛÓ¯Öð ÎO²ð—@dר­ãOp§ÅK–  ½«£_ ‡òGÔU  Eþ,,¼?ȯváU´):ÁæcyüAÕ >"†£õ>mRI 7柖=-Ó“âß”=òõCöÂP̶K{èé‘& <»8mµ˜çÖJgÙb¹×]paØCÄSÐôä1óÊANëób9C-ë£Ù›ÜZk—äG5“¥÷Ιã{¯AÛ”hQSÿ7ÿü_Ï*pìè3Ó+Q#"pÎ×W_ FÓÐëÌ…¼,SÝyÛ…eçÅ¡`®tš÷µÎ«w*ø\ÀxQ z™ð‚²ª`ñQ¦€†ÀÒA G«¥É—÷i±Â‹4Mþ¿ÊÏéžÄ T¹žÙQ÷O‹úÈ[¾±¼QC%—tÍ]RïÁ–‘À‡S޼W¾{árÄ¿ ÁŒWT÷Þ¸A‚kÛõwŒ#»’'Ö‚¼mQ!¬'½%þY'4sÊ΂¶¶JÁÜÆ…>\¤×ÿs!€z¿wžú‡¨^€Dvi±?mPK„­XHèMfGäoo'­ßò•jô„¦¾Ybå”ÙBLwÌžNÕÌ$pvxšÀž]UÎøÒìW3ù©Îfß\µ¤›•{ÔpÞ§MåödXã2ojëî¯ðkÓã/4ú¹áàG=„SY†¼ X–©l[‹¶Ùa¢¿þ „‘w¥Äq&FµŠVPœ†›Aìâž°,KUG–eè„ýåa=ùª/ÁÇlSòzÈ OèB8I˜”* œGNû‘©‘IŒx´ ËÄ m­¾77Ãó¹VÙÈ]6êˆG}»ŠË¶î eÚzTBtúïÉ’wbå5ÏÒ‘$`o}Ø~Î =“p°Î…ͧوø\uí-‡)‰)zȾ¶´0NjÄÜ6 ž†Öd?¸Ç›ð,ö6#6þŠêœ¯àúêÉw~ÇÊä#{ÇýÀ|²û{\]2üSÇ-¤1«›”üíÛüûÎ zÄÅ”~“ø=Uoå*¯%³zÏj›?·áð$7d>‚¨k}÷ŸƒéëSÎöåx=£ÀÄSâL±°Bk‰n#‘ÅÊžê*6Œ8âÝh/úÆùv‚áY¨æGH:´Ð–n¡¼~Ÿå‡²w¡p´=b«ˆïñ¬œE‚Ê%!òV#ùnI<'r Füdõm.­÷ÝÓP»ûÔ¬(Ü\8O ¸'n²€;‰Ia¿~¡·]ñP½Ü£ÅÙ1+M­˜åëúeÅx#@©.Ê«ù{ÖÙK¡QßÅêP†W¯(H–õJïuäùì‘ ñ§—?Ú³‹Vþý¬è•s£?§µÓkÓÊöãÐ*{vÊÞÕâ·»Œý.;çBœïê¦Eb•ÿ-ÁE†°DNŠŠË®07¿=¬HƲºí³¶@Ç' Ìlt[[V Û“7DᢼwQþ7P•mÿAÙÚ©y0#õƒñþKRµÇÆ#?#ƒ’l[TãGsŸò¸jä{þ…{«C={ogæY9–òªÆ¾³­e€X%½rÑÖTÍ‘ ìÝjßµ~ôJn ãuÒáØû ãâîúR ®Ãÿ[5` Y¦#Fƒ ßNEé¥JÐãýlá›ê»#gœ¼ ’±äÆ”Uy5½f¶Y+×)Gr”°‹A·Í6TlË(§ß…yêÚEÆLH‹—^ˆö("AÜ<Ü~‡ ôϧÔÍcMá—炌€ö¾®õŸüÕ6ä:I~úÿ þù2uN_­î=Næ+Ñ  /o+|ŸÙ–D-wtvy>}”{› +è…ŸC ,xÍ‚±’½óqõ¯o-Vý‚“—ŽUT\p±ú,ç΄oßIb ›2×ût·)àçƒË– žéVö„3Meâ^3æöèæû˜ ÚÜv¤5ù%Èu`¿Atgdr1T6$yxëc¢ÓòÕ(­oÃÇ6Q‚ZÀ´êÁùzÞr,ß; uÇs¸%Ò4­ [Õ©ðŠ5Ôà #Ä]mcÅÁ£¯Bbåüôóeˆógʼnæt6ÍÈ : } î·ã4àY$GîøR…ïVÍÌF¸#̃¦XY#£‹—ôç¤Ù¡€»‘lsA|«$ G\þ| )Z+àðï»h‚bþæÚ¹õ3áÌYTqÃî&Ï;UTùÞ’V8ŽÆ‡ÜQö"Éî䞥‚ÚT·OÁkòSz¤WîœKŸ³`'Úð» ·ˆÜûטô´=·*™E·'‹òhNå0õ¬ @”à§ÃU8:Ì+9˜lü^µIš¢šÀÒ„ýå:ôÍ@‚=lâÛw,r/1»¯ýiò¡ÓßùLºÁD¸ ÒÚM8ôPÏR>6“è³%:[`ìö.¿p"PÁoòQ*ÐçÚEWØP™Ò˜¾S#´œhnŽþìs]W$öâùj·j8çà“Eþ;™Îf.M­··j¯ ¾Ž"¯ºõ礼V¥‹A]à›ó@bТà?ßö½Nxýè;µ{VjÁšŒsºn¡Ê*Vo9,RÝÍšBýí¥ ì/XðÌ^Ñ¥czÿI’¿:ËFµÎ9ÊíiÒÈ`@èg{?ßÁrza|Õ€á‰"õèä£zÍ ÛõµxO¨&Ä’§]eQÝÓ Ô‚†£juøÇû%Wš4ýbF/~õŸd‘n—L&‚³Ìf…yD # å*6CT`9ªxèâþ°Äþ•Uµƒr³žÇmŸ—’ƒ Þ}j#yT¾ (Z¢\P_òÖ¸dÏ,¬KléSñgä»B‹¨ \׃D6~'MÌÇÇ«ýIȸa³ [låQW²-›œaRun}ˆ:¡²ë˜&˜Ïñ¼çÕɱžŠÿOpɳi¾,Ó_Óx©Qß×,* ƒ¥Üì;»8 97Rtâ_±7 X˜#ÛÁ`WìkÞ+žÙJK‡Ðñoµ`”¿éIJ½ˆômžµ61V*v:îÐeò]Xz½ˆ•#´£8±E{·s×+IC5ÒÈ&ððZ°ÖÛÏÞ›VåŸS9ÖÿŸ®ÈQß*Ò.fÑv&!uƒ?0Ë™Q¬#ϸ³ ¨…HÕÑKœ¶‘B|¼¦úcú_KX‰\X{®¨¡ÆzƒXx% kíV½gšd5+4ÃÐoîÏ×ðm÷úv÷>|ÖêX›%È5Á¿è¾ÿl8E:g€ÃöwFˆm)wþƒXÈW O„~‡Šç%¹_1X à¡›x“a‚èç¤k&hX7Dw¤ûÏJr?‹n²5~a·×Ââ—y,Œ",fº0dÈ `Î#|Šrs‡Ág¦Ù4 UŒ¦gûïrûM½ºPã÷̈\kñ°×,LI°(´§ôãú¸lÒ‹Âö´^&Œ"[VÔLg™wµ éb }Zøb›±­\-ù]ÍÿÊô@©…ÉKï61=-;íaÕõO+‰«ŽjÏ6#ߊ>„Ê–‰ 9¯×N"žBI©k)m’Ïò"^æX`ÓPö¢– ·°[€oÁ‡ò?Ã~;*íúçq =z>ÐDùxòÐù¿Q‰yZQi&¹z'.ìø/.®ýìØáM¤ l*äÕœV,ÞñòZDFŽÈGþfA»&a}Xvû?WïÈ«7 ÈÂ6Og \× }½\ ªÊ¾š âÿlt@4ä׿üÖ0OkÙ×\°,ÂåÃç1 ìX¦ÕJ‡;6ÝO0ÑÊÏØþ1»é…í °ç-³¢”Õ,Ÿƒç›ã4|¬¾k.À8üVºMCðTŠbØBäÕb2¬¥9™úÔ–^¥u§ ¿ùþJ³(Á¼n{î7 ±düd8 fî‡Þ0tÿ 8iÔhmžü€È¶A9_e'ŒYÔ¸&ë ]sÑÆÐraÒÏkÄÀ×~Í­P™Oxõ Ç9ìy›+-¬ñùøä–›»@‡K/,n”zØŠ•ÊÑÚ4…ÿŽQ`Qž–̼8Á æ&'@myÚ¤[RýNáþÚr«@Sèô{ÝÆøÍN®WÜ<ªƒÄ–tLš³è:ÿD>[+š2”(½X£¬G•¬~üÜÓ¡“ØËx~Ôy¯kg-¨’3RZÁ]¢žÁ@Àré÷‹¹ÒþnuBrêæ¶êV©¶0-ãÎ/Ž–<1ƒÆÊkå>kÚãô`†äöN ¬.²3­xÒŠTÙÎBŒQVöim+ÆPõ/OjB±×­Z²X!ªà˺ kA7y-mðÊù[Îɰœë_l}mÅÍÏ =asìÚ;.ÖzC6ÜG;oØÇlcZèÆÇ6J5,Ÿ|בhŸÖÅ\y ´àUŠCêƒòÇ[¡)Ü>nÅ)÷\ê:ºU´õÇa´"zÞC:žñÔ»½bjŸJ÷šéÝ©U ¨—×½)/jÌÆÑJc6Ìß·]¨sü‹î´ hJñ6jðÕê¿?2gð>èwñÏŽ£‡:Óôip²Y1¸aDYòÔE󱼪:ÙtH«/¬Nñ:±`æi˜˜üX*ô„ËV< ã<óW2 :߀hÍ‹7… Å¥ï-0û5ûL[/¾–Ñgn–‘06Ýð3/Ãç’Mf­Ëtç*½ì"~^‰ž·ÒØ54Eq™rJ¸8Ç8k¹«T’, Ã#ýGl†f• Êôå¾zÞ Sz§¯óYÜ^&E¿Ñ|7i¦ôEY*Ïé9œf[2žD[Ü ÿ=–½Ë•áÓ¿b!¼µÞ.s‹ý7^­Ygd?6ø8ãëˆä7]'Œ—ez‰»·Ê«ðD§à³£R" iÝšu587 p_Ç_;Ï©"{óO:èJ¸Âbòz¾{î€Rͳ2D•¬Òš`­u‰I¾@Þ?šÊ±bG³Ÿ>pçh„”]$PDPâ÷|®ï£± ‚ÇÏ+fWÐ:âgÊ-è£ d/]7dõ!´IÖš£`—Ý:<.ñt arö®Ň  ƒ¹pvþg€°­Q°šÝòáq÷ÌµÈ _µ´²Õ£±®  ™^¥šÒ»¡4t£¨ý^÷¬%ð *Pôë&Ö"­"¡ÊIŒÃw‡q4âóiµ•zn2/‹% šsdCCÁ¥ï­ ºtÿqŸ²Ãé]õl2d3.eªšÔK=Ñ®—“.QYúª§õÛü³6´¶tÊïH¬ÖgÇÂâ×cDµCk•¾‰  fL÷`!°Gùí 4£c#!mć‡'Æ÷‚™iå \)a"ãI¼ÏRý9k €ä>Dù‘¿‡^™‘Œ>D÷ÛÔïðî |4°|ˆ¿ŸK_ϰðø–Im­i}÷ŽU.¨­Æã÷cÁRA‡ŽÍ6 lñÿæ×øPl*Ìi ©ÁТ\RØ‹JÚN|Ç:š:èràøOƒ÷͉Éh0Û›6•Í+„¡±ÎþìÑÂâí“æÆ‹À@„PœÕ¤5c¾}Ñ3lû.€?sæ4Z¤7Þ–…Ǫæ«ýæ¬Lg²<ªãFÌÇœÕ ˆ =q£¾HVžÂl¨lO±Ÿ(«c¬iãò£³h"ž.i¤±\­>ØÃ¥[kŽD¯^ozæpõöä‰â¼I;#5}«ôÿg§PÈйg÷Ô‘–Ùx sãíóa–ÔÎdah†D¬ ªí„ñá½½)djÌö%"ö¼œð5÷Š®”j¡VýëT݇uô™EG­+€µÅÆÊÕé ÚŽA]ÂTÍjˆÚá %[ôn' FŽEÒ¡Š-æL›ØÈtËg2̯²³@~CZ6­Ž‹]DãèÖ±äBWîZj*O’—×µðÖ³}8¹M~—ÓRÍ}àN‘/RF3B‡¶ä…—ñŒº³À˜mo7\ƒ¾ ÓkQ#GÄbçNúLúró¤Š/n¨¸IÑDSvT2ÒÁ½)—ÿO÷GümÏV.~ÊO)IU=Ñ>õ³Úß‹ P¤0}"—šàƒ#^ê©Îà/tüáö’çÅa[kç~mƒÚìn3ØÎ½·ÐUs ×Ö²¦î5—TÛ߈æ }u»s!Š'o xþGúÇ`CHU’ÏtÑï3ÄÝ–³ðÚoåäÍÈTñìñ½¶F \z–Ä6ó¸ìq@¿ú)‡=Û²ri<Œø`^¸•e2íúž/²Œ-Y¼Œr·«ýn³ÝW$…d¶Õ¯Ü½oør&ÇøY’ÄêePíà2GƒA-˜å ù”‘;ã×&u©vRÎû2H¸¢lŒ—[nm(é¶o\5{ ÏlŸñ–²<ûâ¹ò!W§Î5šÔ„ƒ¹tÞ]eœ pÂåžig6&ªòqF .–d¯Df‡¨^*[ݵ{Åv‚ qRP©éO×büuÎÇ3¬ìd¶ôÎzÏÒz¾µ¢qÊ´oavÌE·s¯L NÖõ‘ÉQ|bRº\FŸ6\Ýü›\.îý R;vì,ç’×:Lõ9y„0Ij ®1=ŽºD%Kâo· hJÔ{—©9^)7¬›9ËŠæ«ü&Ó/ynÎo¿”Õë9 E<¤^§¦h8Ú[3O˂կᬈÐ@B¡g~iäÈ sÕE4ɶË`3Csî-Ö-~±°±ö; B`vF›Yù°o¼·FV“†N©$m¼Œ–þÁDŽ+Õ‚w«@ÜœW²] ~†›÷/:è8êpàŒ˜Ï[ÆÙÞÕ W¸Xöw¶S22=·ãívÏô¥ÌøJeÚÞÏ7€¥B N¯Û`t†rªI…ycä¢F LüL6FT˜©E’ŠÐØ«‹ëÏê¸}Û²í¹Â -Š@¹,%<Šï‘l­©„{Ävò¬™”Þ#_¸ƒâ’C«i.SDè—M½úÆð&Ö¾ð5Äù ´Õë}I*’ÿtb¯*•ÊÄIEå{}CùöŸlPއá#Ҥ̺T4½:5)b*ž·€Ft„sZ—çQ½bÌH )Kþ—¤)a¾ÏÛVÀSHôÞC ¸NoˆÿU)ã.`˲À/Š«Ø Ža[³_)Ë%ç·Ê½øD'Â-ËØ|ä ¥‰Ø>ʰ ÚcP½YËÿ\^³<ÿÝkRRÁÙþÓê÷_&û<ïÅdØR×y`C·ãmUb±„ù¬´QKãH›6š¼Zƒk¥•&^>Ó «–Õ„d•ï1×/÷5ûáZ§Ÿ!Àz@á"óHÍFp±w§ëF!ôŸ—õY¦:BT[©søç&µÌÂXTà³ùÍàºÔž³/œÔ3 £?à³7+ßø÷‹ >Âl*¦`‘P$Ná´·÷`¦&|áþJúˆ³sÛÄ6üY#÷ÒÌH Y‘A,½67Ýßk¡L$mÝn|OéÀ×ÜíG4UÖ íÜÆXKP­ƒ·ˆá/6]!Þ”ÛHÈR¯Ñ$¡ƒ_öÛTÆÎ‹Ø.L`ò|¹ÁÆ DJ§è’À6œI&°.˜þÉñ½Ù«à—RŽâ7œy ÃrÛôõ‹‚|›ÄÜ•4åÕ¿{YÓ’]ˆ´½ÊÜ< Í[hÜy_ßËÑÈb†bëlefÛ|QŒÒ~iK¨c%/Á. .<6TÃzl÷«Ð]¥7-¢1hïv½® _½Ÿ¿7’ˆïa *•\Z¦‹iÍT—dž‰«"C½ñÊ©š† C´‡âž¥±ktÕâpˆIÙ’”„NZÓ;‰Úê¡#¼?²Ôö"ÅŽdد¯`3/˜¥ÏIê/¿ûM½éÇþÙî+ •¼6×°stªù‚ª†Y„Â>Þ Ê56{S@ƺTkÿžåóϨ)GMÜÇU%½ý}8š«å©Ù.3>v±s^ºl ÜIˆÏ¨B¸È7oùfFNÿ(*·vLÌ:ô&“7Eò¶j2óì¸-’Ú@™(DR›?9„- ¹àfO7ô'N*lÈÄÓ1lXÇ·úAù%;lÏÈ›çGص¬3k ˆ‹Û”Æ«êªgÄ;áJ <íýã÷.ýË|ŸÜ„γ_™°ˆR߬Òg0þQC·¨Ö’J$ž“9(Y"ƒÛ>vÿUzˆç__Nš,Aî.Zw1Cä\ÒÌ!ªíi4T69Ä€iR+I~ŽŒ ¯;™ÑoôèGUEO\çmªîgÀ`%XØ•‰F¾ôZC†É­´3eFëë —¡w@^h ^Œ§n;ùr,FšÍ|2= $¡Hy ·­t×¢1ü®a³ýHÑ|,¸é™pø‰¸2'šDØw¹àIp‚5Ùw³ôJDµøÓϳÿx|øV>kðñØN˜æÖœ+a/%AU•)unè{Ä\YŒqêb·êŽÛ‚, ŽÛðšØåŠHVpmÊ‘^š†ˆðæS‹F0¥ÿvmQ»¥ ‚—è´•W4Üv‰%ýe¢Kµ¯µBø´=Û–]Š,ƒ –¡®.Ã%œLÿ59>hD)’$£“ô¡±úêúâ™h<¤¸}Ýň›–tx_mnÅ÷q¨U5PK:& ulÇÁÚ^BU9¤Àª?Ï‘ª¿n$§“ˆ$Z…¨Gä:0“zë[™ôÎ>ÔˆòË.•±¯Šúäc2¤ù¡³ ÏËÂK@¨Õ,Èl^sudûºX°çŸû‘#+4ÉÊ?Þ#(æH1>àAö³ê§ŠgǤ’z‡U¸?¹üÍK)­†lžªŸœRÀµ_Þjùƒ~‹â§²—Áâ^é/+$‹»Üu|„B}!¾NÏš¼é"¥Ñ“IØq4ܦ±—I¯pjêÎÄFcx°Åa1m^†tìĸ»÷ÁŸÅoZ½ºÜà­ÄÌüPð™‡Hò,Ê õªÆƒíi–óÆ!~ìå4!ƒ#-ïD¼Œ;¢-¹”£%ëC®là°ÚSeÂðö¢cPQÌES‡Ê •5ü˜ÔìÅ-tûD2L;O.}l°¢‹1Ô“0·xí_ÊHo¿óuئÊ|\¹u¶&–€u¯Nðþ R-‹¨ùõ:ÉÔZ~‘Gÿ9Djèk™r*‡èüÏ3ꤕ³¡£=Í`$f2o‹@ÑiM-j/©êéæ=Å/íàÛO“†~’9|±¼^ŸMX6?°Xå7ïü±i{ùÙ–5A ¤í¨ÿj™:{J#ˆþUØJ‡TK%èyz3E¤ i¦È}SV [|˜6ñž®vãm‘g -V€SÕ‹¨”û9ØáÂG‘q¹+Jrð;v=`½wžê;¶çÁ ½×yí5«fºZ2IÌÅšÏH3s€Ê1å×9-(çk¨zaj“„/®ÉdÔë”´u1±’^¡èúkÃG‘’yÐH¦OiÆõ’ª`Ní¼G@#OÃמÊI·5õÚ•›³ŒK݇èݸ°òåÔ³ÚXú,£pvº ̃5peªä¬ñ AØûûÊ?J~Ù 4•:ž{à¶AHeÞ'Ld¼° *Q'N½ë–û1¯ˆ…NÔÈó@ßäÇØöÊ<ÎÇYï%9ÀfNï8Àœ˜«èŠ±Ñ‹øÀd.çv./âÌE';F’Ä¥Ë[ý‹WÙ•¥hßbqH 43w¦“™3¤ Ÿ…w¨£ÎWZ»(ßONt5pô¯Õ •°È€¼¥î×%w1hN@CжÂ%þzšÁUj¬ÿl·ò~@p;Ò# øÇ—üAé•RLL5cõfh €Õ•„±À2üÓ ‹M7r°‰†T4Q¬‚ÖßU®Wø”cº÷kQ—ú4†ÿ¼ëQ æŽI.“Q®¨oKLR`¸öË¡®r_I³Ö7N8 ¯9W×£þ_1•3\*R•Çút$ÿpR—Ow …Ñ#°HnRð~%¢¢¡·YšÜ0ao{²¡‹ß‘…vγÎ[¦Õ$) Ë{žúy Cdfì®k&?Çi—þš”†ImõRñRŸCz¨ÉQŽçAÄOj!ÌŸ“9ˆôEíbµ¦ 7õ_϶5fê×PdÚ*Kô;—ý}†÷%i‚Í[sD|¿EÛAc)‡­g°Çd,„*˜n %…ƒBG‰}äe™øsÊšJ_‡ôX @7<ÖñÄ ;hW ÖbÞ:Õ^ðqadB¸8•W3ðÂçð½'ÕÐUöö“}¾©Ù>«Âûz¾ÞÚ‡­_†…GÕ¾ϲçé ÷µë£Â¬·cWÐàxH;¤ÛAí,A™z,eŽ»ÜeŒq¶IV=µžÔ!³Žʸ4Œ_-Ü2e%‘Gr•àÈhv ÛÓã"ÕlÂ}áœì ê e¶=ÿ+þà´I1-š#<BZà›§K‚ö«r Ûük†<œ;tUrï+þx¶Q²Äí˜G[H¨gQ®tãâ'|}Í|ùØ0!Ö]D¤y‘‚RW¡õª>i#ë­ÿ0ê…¦½€Î½ýÂvºüÞEUÊ< 8ç~_!Jz«ã†—4àµSÚ•¨ÿ)Ͱ¼_ÑaƒžÉÈ&XB¾˜YíéU?ïUÔ+á]œñ0œ†²™j¦¥Wr'` yâõî|>»‹Ü Í0ñí1¬ãÄg*ªÃövÆÌž3 {Ú†Ì óNõÐj“Ãlí÷YOƒÅXó@™Jõ JQU;Hƒü‡¼*wQ{±Ï@a“™oN<¿ñIXqâj0_$2‰`‘Ði”‹Ãã+·©Fd íÇÇ©–»î@ÊÓi‚í|]ét$¤“ô‹þõª4_ƒ°ûñ¶ Þ¯ª®á0…ëtè1ŽææÑcù1Z‘˜‡¦fÖà‘;³È(­ÿÞ„<€>5C }Ääèev@Ì õ„+±Š·’ ‹ :ÌðlË#ŒU‰óP”öG7´íšZd?¯Çèu[Üø·E"1b T²]mâê÷DrqêØG­#C_NAùŒï.”S>ìlú¶üÊÔ™¼J‘£0” ÈÆ°W{¦EÖk¤ÚoÅüí›Ú0-ò™èq}¢ïÛD¼ÒœÅ^uÓ9…Ð42çòØÇ=À Á„q½¨³y –#Á\òÑñ/=á³ ®|pvcÇhÀ â9ߺ`2z°3r§ZÿVÉÁ]à_¥w­û ²yØá€E°ÒuÓSÌ-JF0ˆKs±>zÑG±³.p©·ÚÞkàèY„Ä’DûUpBÝ#í‹–ØÅ4N,éƒì±8«È–?”†ï·"Ývίù‡üÊB!BïÌ3Sg|UüRê.¸c•Qª”µ¡®AÃ’NQVœoo¹ãpÌÑÒˆÒÂQ)YÜ‹woüi™5Oö}¼­üô™ÏöÛVuW«×B¯ñ†gÆ)¤BÅô0ÉÆâ–‡ºJ-VL’梟‰/¡+—Îfï º^ I·°“÷¹ÉáÉšÒDÛPôh  ïžéBÙb2I k®`1â!,'R!mÐ6Þêœ`‚km»ù‹sÒƒ¾]nU±¨“Ùbd=ý†ÍØC÷ˆu= ï ¤V6¯$XÚ|ÌEÇÚRsž[-¤¤¼÷m¤ü¬Ï3öŸz€Éß%Ÿ±Ÿé$JÞ„ .ˆ%p:«Ûº½ÜI•#¥£-FX‚õ°‡ˆÃü}P8,íu_³bÍQº¹PÐá(^Š¿˜%j”>ø1zõDÚ‰Å÷õ4I)•zÛEê&ýËé}°·­úPÉ^“ƒ€ü!¯í;1m€ñéï ìã¯V„ jBÙ}ɨuŸ£ñŠW¾qô^Ð6’y幂*œfxÝåIÛ•kÎÜ’@Û—3»-z´“ªã²È ^>töTƒ ¥ÌQ&íƒê[žÖioœŠ7ˆØYQ§«íiÁÏZÙ•zcZ£Ç ?ðà\ÎÃrc;ÆÌ%.ÌpDëp€ !6ÕþKªÜf裈11™·=ƃºqF×]÷Æ÷ÓŽw³1)×2úßZó­.*C"µÌ•RQVô0Ø» ŸÕ •–ó+ 7bFÖá<àé°m±ûZ]îèô–íVzl:îâq®iPZKêópyN‹+ù0&î·­!,ïæÚFqñfͤûP«ÏÙU! =dqÙ:íÃã|ÊÔËZ @¿çó¬$<Àåâû¬7eSÕåMÒQÞqÓ)fA.è1˜( )|ýM”é1oA”—¾›õ_Ê¢ʲlίg4ð¥k÷y“g,ÒüªúưJByÌnÍ®lßñ5ÐáÕöµýUÿjxöÛk|f‚²¶~4à?ÿ&PÒj«~ïpÌ}ð”Ê{QÝÉýèKSéƒÝ–ZîÃdYÒÞj€Éäni#ä;¯X¼7ŠÍŸlïºê;Û¨âxÕ½„ÀÉÌ Š¶Þ'²§:iƒ¡fNS=f*ÄWWyÉ9Ÿzh+òJq©›’&àKïhw¹½F‡Õ älš~ª•!9ür¤¤‰ —ãŽÀ˜i÷‘¨ÐB7l?¬ž€M¯¨ò`ø ¡Ÿ,S¾``rö˜?Ä“&)6‰‡²Ca³Â½yDt49“„ìCÆÏ³ÊHfyçîGÂE£6€ˆL\¦=8ë¶ Ò.&’ò]ü iF:O*b< 4)Cší ‰þ R- xè3)ѳºËÉs \ÆÄ}é'!–S•èêÁ“§E”O[å7»¾æÆO^Z\xøIhI¨Šb -"€úÎÃ5à+Q&rÓú|5³•ZÎJž(AMEŽ,צœUáÐq9bg‰ïÖÌªÛø¯ `–èÒâ˜LLB‚!Bܱ‘î°"§‘½ž•­Ðߘ¸õè0;¡ñö³åB»k:6vÒ[X¦Ú[ø’y!¬*—M*6 «;·™gú£®žH¾ÌOÉ+¿s6ÈÉõ‚üδ‘v~HYÎ1Äüd·2î½Aš™×š€ÎvÑë„À^f"«.[Bg› Ýs[ˆ~}zOO1’𨩛Sá칂q7ïk²²ý0:ƒ²Á=MOœƒFUÕ¥Tã oÑ稠Fœ[y7üênbZ8ô~ÔtÃ#9›U’_^7¹šä¬åh”%:Ág=ëVeQžÍш˜ØöŠ?’³Ôõªd6â>å±9ðDãBöãð5ç>›ýÎí²ŒÑåE'Ô‡Am~²Á}7ÊÛ®ƒ‹×&¡êrØìLq´µ×RýÉ2”%Á&W;£HqÉö[…Ã-a äç¾@w7•¸é˜QyàY`q뢫ôcÌqëÉPÆÊAð;‘ùŠœJÑ›þû‚|3€ý.o¯wT 'ÛYæS€‹ØŠ{ø†$¦Vƒ™A¤ ð½fÓH½>â1‘5£^=*[Š8Äïre€œ¬i°]£ÇáŸ- PÊî0ÚÅ+²ºX04˜43îÆÚb3&ëij­ã€ü”U¤é¬þÀRlc°Ùö±O’­pè`Ë>©ºu…}LË¿+^º&=6–ZÌ„‹([Ž[ž_Ù±:7WçÕa„X‘ñ<[GÌ«vÔ+ ñe >ÌR“N‘ä°,a቗•1=8}8$L•…ÀùV&Ì 7Ñç ºd׎y^ë´®Ø~^C5¿–üƒ&Ýñ˜‡Ÿæ;=NjKQ{ù‹üiØÚ°u"jgQvÁ|-{èçÈë)~ýã±ü‡õ¸;Ãòc ú[BÑ%ÏêY­rý¹öà›ÃŒDjõº«RɲC†·îÑ•‘óCA|„LJqä2æ<¬¬ÓÃqø³TÖ\ð»­4Rۡ˨ô˜¾B/ˆnÂiwè§“Ä•I†}Œ”©/TØñ|MÜ»î{¾µ†Q¢F Kñ;MÉHù_j(: ®Fµ|¬{ˆT™Ä« ‘Ä3‹e`f>¦ëùJ ôÄß·1§3d…DUG^Ô½MB\1&>{=(A’,l×?ñïgƒèçâ81Oy@ôAHì>³Žª8Ñ Î¢ ÿ/‘»ÀMê²€š®xmàÀòníFªÊùBáø.Bl{8ÿj ˜n]R3êÒIh>aöjþ@|“«‰¨ƒ ³çŒ*ÏúÌ™k /.¸P¥pÍcÊwå˜N ÎÄY€„&#´ÆFTJ qòŠ ‰€#ÑÝ÷”…CÙôÃQ™÷Jøÿ=¤¯G¤à#ß麞Å7/žŒõlº'åû]×Âj[cVÌmæ'cmvRx› þ# &bÉ„œ;¸í3L+ /ß|MªHp è»mÙoòçÿO2çÉÐ ©Äøs$Êø7 _¸ WBާÑê9‰œÍ.½xXa«±ͳ;L;Rž’q’ŒË&˜p§[Üa:¯ÖþçRêá&‡þëTVœwìÈüˆárVÛ%vh»Â’ºp–.¬iÞö‚”74\¦¢2gäHë2ÖêjXë†èaÐþ ãì ŽÈgÔ.”˦ü>ýå‘ñ¨_¬Í‡<Ìçó$øÑf j0ð”B'9øyi§úÆù ¢Ãœ´>”˜yÚFˆ ¼˜Êi®›¸}&6Á<œÇÔRúç°WñºåÊf‰;5³|ÐYz¨Ò›!éÎ^µïÒ>A>—:qŒwwÚw“Ňp&ø>Ùï•{6å/ ÿ ¯Š×aƒV!½ yj<¨h_«oèòÚúf¦Ûot©'UÏMûF–Í—¾êb”ó$¨ÏÒèÝúo{»TÚ1.4xêž¹¡/•ÛjŸ‡$‹É»Éa%Pz=ϵ¤Ò{Î÷—~k 5+C|Äó‚…¹°(=!H‘BªlÍSÎx*2…W/=Ñ~Wå5Ì3Éþ!ÈBu]Ê% g ²hq²—0r7/**p jŽTÝ+ ù™}Täž!œá.6ˆtègÄöÛFo‚À¢Žöè—ÙÛcZ½.š¥3ŒdBÇ.†²$ò‡ù“ÐsÖë‚AÂöe¸IS!§õbüRŸãNßÀŸŠòmK`qVÇ•ÌÅËGîñ’2”›I( VwŠÒWªúàö´¤µŸøA‘Í˰Tõ¨kY.©˜öîÇýI×Ìtpiü—Û½»½» ²$ÆÜ‰Šiã&!Œ!1.—Û¤ŒàûBùÝÂéíM9ëxsXZ©þ3Ë}iÌ/U …÷æJøÂ’ù}r,ü@ÝÒ:6\–c—t@¤ý媴Ÿ¡ÝïÎá­,pHâ¶±µHV]<¦^+u8âVM%#N­MÁÉêÀÌ®Ýλ÷ݘO /âsžÊ´ö»ŠËv8Z仑•òWØ­…6c~„è'ퟓ_‡–¨pO4Ò°¥ÆÍX(”¾-‰Ñ¶¾­Á aÂ|°™våRñûw?Ç:± &ÛáKmu²å¶<À’DωKíJèˆäÚÜ„Ñën¶#ñ…h€rõD¼¢Ö]Ñ,³A\ïfç¡å8O}»:ˆO5'ý¾s[ýí½O])&Ö¹¥~â Ù†K‘Nó‡ ‡–ÿ&X½Æ0h-¦H[Ÿ'Ф¥)^rÛÁ&v*óè!KÆÉ@Û#JëÓÃs…H#ÜÑ#ò¯?f1‚SReï†@EíáWÓYè¡ÈEí¨A½|pýpÞ¸V-/dßAHÐàl±î;M HxãZlªòÖ°¤ s@½‚àÎðߨ£?ßÅ”ÈnKØŠˆ'~O®ÎG ÿ3(»DóŸë÷eàǤïø'hWÙ/ Ë02_P/s0ZˆŠÄÏ"»JYVŽG—´Çªbá\Øí.ýN::’Vwtsé‡ ‚ZŒ8“6ÂZByº¸®Òtì ÆZ‰,jᢷ0w^Ù-}s Îý„Õ¡j¼®JŒÜ;ú©{9ƒÅ#sd#xæò= wOªv¹£¥ÂÉá1|ßI’hM‹~³:øºæ* !´­b»Ê=/F©à7jŸÂÐâì)G¹s%ØùöYÌfêÑ6÷ ïÍ/?Ùžx0V÷Š{`ÚC=u{AZ,'3‘ñc!€7䕎yš[Ÿ¼q;$wtÔÝ|ÙØ[·ñ—”N8©‹ÊÐÍH&´*€àÇiVj1Í“ÎJc #Ë=[š<—TiV]Qšz§g;ËO û±bjs_Z6zŸzׂµ !{eX@-Ђë-f2I%M µéï‚{UWecÜãö¢,Œ.þÛ£æÓåæcøÉÖM‰¾pÎx{vâµ$äCBY™‡:øéWá>ET —Ïy* ©F¾a™m(T°¼7ˆ®n{äÖTg¦î©=oõ}é«Ò†«V¶Òæå©AÜÞõ·&ú”î+Ôí·RD½°“é)ªf±üÏ»6 %å««!øñ½ñ†½Ñò¯QÈ< )ï„õ¤Z™ç®kXÀðN`[@¦oàDÒ’PWÚL}4~ <ÊB¿ Ùñóª$䈙ße¥ÍBL@¨¼Ö~mHð¦ûvÝ’P¾ ò²Å x(žô{Kè+.Áìâ—„,Î×ʪ;hÙû‰!Ý*Ð4ž„Z8ÇmhsÓÈŸN\à^[ÓþÂ)dÜZDež<ù†àZGêp¾RJÇ;a Ã¾cPR†kÁ"¼å½É9åDZª²+?³žmù@-ŒEx¡÷à«áŠÆ÷0F Iê#Ilþî\ UmrÐ*'E*&¥‡Á.׎¼ËéÂÓ„¦¾ Œ'LkÈTLòÐYÇàû¿ëKŸCTв%Q' tPZ(ù|bÓw^__ÙV™Oñ<ßL™– —Ð×Û”ýîJ1›Ï‚•Œ¦oõ1TU‘vƒ´2ÿV 'iï’“#ÐãúFW´‹¦3Üzxþ>†H:7úÜõRd¸~´ïPæòÏ{Ûåôd8«ÅSú ?UÁe6ŪMœß›<9:¶'¾ÐÿiŽk@?@Õh´Ä´ÒÁ½U?±Ã\NX”¸Ï ëÓÅVŸço:‡ãoPJ¢Ùí=ãHòbû´½Yõ{qĉuÍñ-b<…×­#"óe“OÐJNá:¹pL"›Á°Ì !¢ÏšAÂ,œaênÂ~‚ªŒ©†LŠƒGe¼¾“+ã©"ñ6(-»rjÇÐ0ÉË+X‘èW]cŠœŒ½€³É‚Þ=䰌淡ÎÈ,¦,* ӢɅ?Æhz§Îe W}žJ ´!b$sƒ¸dÍ¿qõ ̤—™Ä«>²áöPûº‡9ê=ÉGg’Rƒgo ªÄ¢k5§  üí5ðëº0öÃÖ5Y²(].øÅ{µr.ÿ4ùyK—k ¡ÝóŒúêV-Í (ýël«¡wßrŽVA=ù;î«oÛ ok£®åÓ!œ·ô´¿×]+ù/Î?´`d ¨vkc>}]"ˆ¥Eçj€s¾XM^*¸ÕèJí2sÞzÔ™YÙƒâŽpTd8¾.J2]\DI °Ö_µ¬kÍ5jkm5ÐUÜzœI0éjsl—[ù7Å“ç¦üÀUv¿· q†×Æ=bFeÛŒ‡n6Ö¸ÝÚùÏÎ(<´ßâ.kå(qØò®÷¶ ÝŠ]â:¬[î$ge,ô•xƒÍ ÚÐÑ\ÍùYJ„;铲ÉJî"i éÃüË÷Lg£Âà>k¯øëu7Ù^cì˜ÐZ4x¾ÒYXóÛ)­Å³‡ª~èAÐêFûõžÍíR–/œƒ¬Ï~€ŒÊžÈîîw!S<íän$†®ÐˆEåmÛŽQKÌÝXê‡òj;7ùŽ×4CjüOÎ ìžH7 5µ/y£óÍSó#‰FÚÑ(ÖûïJ¯Æ\xEn´Õz¡Þv= S½»Ê- r"µŸµñ ªÃ¸éÞÞ³˜«§’ì5CõFúÏTŠÉ¿&IBŒ'Ò%¹¨üºÑ¶nÀ¦PW>ÚA9]Sy®‚Ýe°¨`äpé;­~Jjê+†Ñ#ÕCçþ¾ 9¬ðytö`“|…ÔPnƇPó7¶‘ Û5ïzZ''¥ßGKIìÛ¥ýñššŒVÐD~ÂŽþ§©¿y.ézRœã‹D 8j¾Ïc¤Œ;iþ épŸóÍ„Lsë=ô2á“A{¾•ÿky‚:¬Õ:xðûóáh¶%6X?ŒIîÎîà¡T"4+'ŠÝòã%ƒ›@VF}Òùúý”~8zñ»Ûãß’ù;Ù‚+Ô¢Í|…Pñ—‰f:€/£ÍÊ”æ5úzõp„‰WAmyºjÙÆ6¨È‹GË–#y›Uü.9ö½Xø((ÖTþ¤q+\‹=þžÅª$¾ré·F¶.ò[_ÒáN€:4Óŧ³"¼âeôƒœSš•^ØÆ/p«;¶`³ÀÌ~ÐÇ00ùÆÜiWw§ —š8÷LG“ï`¨X½Ý zó{Ôá,/>úš™ûðàc·E’"þç‘èá)²Ò"Ø·Vêb·òð#šN´(˜¨§!Ut—ciá½Ø·¡w_÷à,³µŽS×jáõ~†Â•åÝ(›? Å”K¯„.—±(y‰-žž4¹U”Zœäç Ô¥ý¢î8yÚ6†OºôÛ¿Òba>íˆ&%¢Vú<°¦nwV/Ø^F·ùÇfŠnç-œ²15»·Ô2÷XM?`D‰ÓiÐ"ö’«Bú¿—œ!A_öÏ BŸ¿ïK R<Çtv¯ÑbèIòhÙ§÷+™¶K1\Ĉ唨’eëƒwm$œÀøßá ±Ç×µƒõÿWñ¾jÆŒw˜µ6eöYU\Óe§ö_;À¼|sIð´×2ÏqЪ&µ¥É3”¢^ávE9@˯t^-„«(>>«ò"a V _‡œTúõ¤jÿne×PýQ+À‚ð8û©û{—ÅèÊ{÷{}N©fR˜ òxŸŽ¾Û®•DÕâè]ÔL|ÂÞ³7õP©¨aîì^ª—òëÞ/vŽD ¯KÀ®e IUöÑüËôLª¬Lv/ÆœÄ!~&Γ³OãYŠ,ؤM‰oʃRHøù\±HA"\xoýÓË›æý‘ßǶ³L%Tª| å¹½8gŠp‡ï±á˜JÀÔæÇÆÞœõùĘRdîhÙÄMWYMñ€ e¢j‹Ò*”01\Á¬Ä*b÷¡ÔL‡Êw{EÖ×£ ‘Ï<¦‰Ë¤v]¶áoXÝdv2‹CiD¶~´‘IKízˆNhNáˆn‘ùYE<Рţ*“t} Ð4±£¯[‰Ù0OçÕ~Šš3ØIÍ¡¢¼Uµ”4ñÂÆóJ¥@@ç>AvÖNˆX”˜ÛCåE=˜Ó§y|×…©ÇŸ©ä°uã@bÂx´FòÅàWê“;RŸviÛMî¸:5Ѳ˜ÞîÂýÔÚÆîœ…Ï3þNªsC2ðíEˆ‡oÄÅõ«––¥L ÊÁèS¤7`Èf°Úñ Ñ1ä'^î¡Ë cèåœü}rþT3û†\ÍúÆÒ5¬ónBí,_wtØV¤Ë'Õ.!XÙ–6kNV<[Ž©–É–G_±qñkè[Ã/@…)üpÙçYÒÙÄÔ •ZÀº>@éRN³ÔX)CÏÆLÁLz˜§­œÓÚf'[Û¢ûù§íL(EH®9 œÓo¾!nÙbRÉ]7Ò16 (ܸ—iüþm`¼Yù÷sA;tE=.rÕ|zéÚ´ÎfÝâêZ@ßé̯-T+0ž¥ê#õ™IµøÒv}©Ã+*%?Õ;Ä‹—fªÃþݡߪ–ô‚l¯öÛXÒ“uZœ5àÞC±Yµ0Ï|¥~vG_ÚÞBÓëÞÿd8Vɺá„3šywžÌr’½¤Ò lA-Uì㥜¯9Ü´¨x-¾/^WÅÙI·½žAv%ò‘Úß][ÇXt.h7)h£S§Ï%ÒÇ ƒ¯[Âì!—Ñ9»QÞÝ>wxúOØGÔŸ¬þÃ¥^(ÎÛ9DŽ%­+'…=èó·J¡‡fÀ“ö¯ZTPï³ÀsÃc Þ•ÒUI¤wBõ|Jww8•ÒÏÒsò8'ÙÀÿZ·vÃ@âŸ,ºöé°'¥U=úˆAwë ôÁ³ÌbÜÙÍÉÅŠfîaîÓ8¶Lë]#yþwªÒrH;ÌŒuhÑ»‹ë†1£|#mWï3¸P¨Ô§Ë:’Q>S})޹Š-oo½EÎÊ‚_C~0@óy²žÆÕoZa”å§"—m&Ð_“Üø ‹6bÖy[îÔhÏñÕèš=±ãL®T‘CM5¹O¾ÂÌL³U[¬i÷ æ†]àèÁ‘w/HB^û“£Äv#ôÃøüK¥ü’ ¬‘ý„ŠæKò¿N±¯ò©¤L€tw8¯Q¬¼¿>—Vzb¸DŒ1ðýUŸ¿ÜDr“ ˲âú€X)¸E*îu6Ÿ¥ ‰\Ôóý¹WÿŸ97t™¡FÆ‹–ïÞ~«TøÓ(d7}úìÒ/ý„4fµ¸Õgš¿vï|ú{µ•S¶c›® ²qê8üÃEc|)î¨CÑe6ü"{t: *Ä™6¢DðRíæpB«‡‡`hÐ7°ñøÌ¤³MßÍ'ÿ§`R|Zepò¢ayÒÉ $ÚD­æòSoVõDåŠåYÒü–R¢ {žy‹·^cÊïÊ6U~cFŠcú`Ž †nkPôî¸ðøÉƆ̓"{“¿zø{@fqŒë¶£Ñ ¡•T“ÎWÉas/.¨éVT·¥^ì5ò?iãÂ}™ôEÙÚ¾r=7í™B¶Êu!wsäee2$–§Ø“PP~îŠ ${Cø¦%öó}}<·öÊ=ôY|.¥Äa\vos«/ψL9Æþ™Ù_¸YJ/¥þ}¦Š,,(è¦,0ã¿­8GXÆ„F-ôÛWšuž™›Y¿p‡o—ò[®¥¹Øê!If,¹J%/‹ºf­N¿‚YòÔqkYx°Ìóùn¸üæò&xÌn„žõ7¥P»eŸÚè´øýMÂW§<×·‹'à¿7Ìb^]˜<[-fkk0ØVþ« þøˆ&hG¼Èï *~!ÀïÒÁ èÁòly‰dyö(v>]1HÎFž©zØ+KKy?µôýÅ)4Ó”)AJiqåö®_n¨ÿòÿ®ãö®þÝ_ý»½ûu;Ú·ûtÛöí×íÓ÷µ)ÅUs£hFßh¦y鸜•†Äp0ǘ „%è0­±Ä̪-#Ùs™t lÉm¼û4Iž#¶,í±ç:ˆKW󷱂|o«f2ü|W”ŠXÛ+)jSSÛH…Y$ÁìåPeG¢½-xˆØ/¶ÊLF Œ¸Áø°\v%*< $—¸7=àkcEæV«¿¸O?,D4@6'ÿqÕ8Gܤ6&)áÌÍazn×3‡W>I‹Z|\hR’„B¶¢1™Ç²9êÍÜ¢»!7@N'ç¦ë¶ÂtªN¦²7¼>«©¨/óÜÎu‹Ðe]¨,мӡÄzF1‰,äðs>ÀkæâMQ{ɾPL’†UÇ*ߥ™&Íënµ ÙûÀPI02È–ÖÔ“2Éã@Òä–óG|X[*OhZ€îŠ8 ~¼uýY…·~ïow× "ZAK£[ûfÞcí“÷©ˆÊ‹'ëù‡ç{Í]ñ|@ÁçÕkê2Ìw0€%ö€í45µ8ݯöŠq²Ñ˜pLGn>ñÄ»ú2¡8°0(ÒΞ¤Öú6‹TÏì“S rÈæí“þ”Ø`>Å ×ÝÔÐñú†gÚ²©žÄ·×ÏÛršý«•`7p‰tÀ„Ò(º†oŽ4å¯G0®ŽQ‡ý77úx¡Öþ!Űs /϶àÃrÜ>7Æq2éT.ÃÙeUŠÔÅãiö Àhÿ,<—_ĩ:J;¢SŒB—µ~|çc gaŠ!©Çd®œ˜uÎù°â_›é£I¸Øu9ŽÛR«ñ“+ lx‡þ{¢7r<×v÷ ͘¸Q‰Ru—¾}‚³ì1ë=¨NNRôAB:ÏÀOD@¶pÇðD7fé&3ø|¯h7#lµ²± SõÔÎÉF޶Vq'[8ÀVUëG9ýÍ×{Ê<:TTºˆø¬™´œá$K. ÀШ'Ã!a³(aý"ƒ–L*â–A÷Uí.ÜÍà…kNtkˆ±N•ÆGðá-íRš¤ZU‡»¤*åødü½5c#\É^1Çù6ß{;-‹jj}â/G¥qaôŒN¬=½}YÅRJ¤wÅ|ɘg¸Ü_FÛ©r‰÷ëL’ÿ!±ñ`g ªïO *Uz‹™¿ñ9yòj è«<ˆYŽLÕÀ^¨^t1‡ ’ïÖJmRXܶï+Ú&çºÿAÛ%VÆŒ§¤°‚ߊ |WëM¾ØWkGËêoè@×—ùw(’=q`èßÞ4áµs1\õ«~m;Ð>+9ë»r[Uxã9¹`f-ÜϹˆ£g›·]ù>¹Û¸9¸ëƒÈ¡úg\~# «/Hó(Œ0ÁBï¨îZØ¥VT­4ìhvíö©@–P(µ«ôŒÑ©Mž´Ó¹oðUø&)—ŸÊú2šªñlûÍXÑ|û«zÞz?Ý\‡]=äõŽ>ÆÔˆ,)À±DÚŠP‰3ª;©p_ù¿ µ ÖÛK“ÉÚ˜(Jú† 2)»ZàÈb~îÄl/™ÅTÆ/ô&FG»I=)§»û#ÿEÂì“—’+9ÃGàzE¤VøãŸPžZ隊Lÿ1‚ßJF"tÀ‰ÐÏÕçn>¹lK†1â ŒÙÛ .Ð)ô±¼ wŒþƒÞŒvŎ̵þxÛ˜O‘Âò)ßîäÞ‹‰@+]!!^7xS׿ÎÒa>LãïZJb™‡:ðVL; E´Ô!Ä[jÃÇÁãjQL’¸[ƒFùGd¿•ëâ @ §4t%ô_è;ONlh¢ï]‹]Ks™_ —¥ |çB¿Ù<=¤¹˜å·—PRQ[Âë)ö¹Å-‡¬d²¦ûÁ|<ðêK dxö#ßµÓ•T@å °<ë4Õ >•.qK€0¿¦èN¡À0)»k¡«ôI\·Þh¦êØÖ–~oÚCTÏ¿¢@˜Ò2:id(F™bÙr-JògœÖs±!Í'ÔFRÖ3ŠY íÆ,–nQàíðÎe}n"~*=«L{ Õô†g&skÀ.È“ \þ$ a¬öÎÇVt•2}BÂ@Û-1w‡bþ²(½×i,‘¢îЮáv\¨0K휆lSÎ[LŠúök™ÅÆ¥§Þ[Y¸¼\+`,õ£t­ ™l3¤î&ÖrWItÎ16Õp ‡ÖÍ\ƺƒØéûJ*x£Ëù˜¢cd0pšætx× ÆØ@}•\…õ/CŒ‚˜f“€Øð§ÐOß\œÿRY!ây¦KŸA`Wpg7ðmc„ÞfjrÌXàeÊEglúÎýý,,”\ª/ÇrÒŸX޳l¶µñwÏ‹„qAÌ#ª¶¹eîS¾ªÜ !sAbÝ› ý‡{ËÔj™°¹‹Ì Ü É¥+i‚R±t^ Öqò½y:Ór!Ö/¡k(‰Qäh`>ÜVµïƒè†vê ×8ë|æTš /GV©¦•—Óh#eÖ¬Š>N“Ñ}úÖ^OlUȇõyL²¨Ài.b-TP±y‰˜­î“› {Ó”öû?ŠiÞ…ZÈ[ ´ 7gË >Q艷n‰ËD"œ¯õy*]f¯·>’ò ¦“!´¢PéUv7š|t¯ý¶aÃÆÇZ`ûœÿL\é“4A|!/ µ´Yòÿ.C”jB„!+C_ }Y=Oâ>°#Tõ‘ÿbÆ{WÏuÝ ¨™_s#©.~ÒÓb§²©!‚ÉAb=–ê¢08E¦ä3;Óã†ý¼‰8Ö¸v4µ¨³¢ÏFáëÁ‘ÙšÀ«øw;öB]¢ËBÙ@Ëá#¢ú?ëàhûR’‰çcCêòÕ…EÏ=ÕaÛlJ&;œú¤‚6›d6¬¨-£ŽUAêyÀ¬f0ª(Ê6qÃΛ?I2’¯ÜuuEÙh® I;ßKdqQ"ûDay0©4Zî»ÿRË™eÅö¯Ñ J4¼6Í_| zØ{õîû{SYqm­¶u<‚Ê‚®8[5 C!哵øê Çð_©VŠÕ‡›>4Ä96W·ûBñ?Ý>ùÓÝÅÞ8'*XÃÓ -jÑЫq¢”BUlä‹w¶…yxXË=Äï$¾Ó6¡™u…“ÚÍ’€{4”Ö]“1­töAN ÿ¬kLapmÚœ‹Àü%bÜ“qí¥›C °ƒ!m¼«¯^$Ìÿ%願t®*]¢A…7åõT6±ih®õÃl}”­<v7U#½…ò!k«w€€­šD‚ò~åÌIãˆzû¯0:SW¥yYè¿¡·Ónë†ÀZ½¹D”àhÄ`M¡´1 4%Š 2±Ê÷¿ˆvlP3”y:ʦ˜#Ä*wØ•0†Ÿ¢IÊD2¦¡òÖYxcµýñÂ"ì*r8Ѓlë#ÔBbÚÃ2ù×^Ç'K7°ÆVFî¼ º’ÒüúFC·q‚u@’$# +2lì~æ=/¨~¥?F0k°_úÒ¾±ÿ:d9ÃgmAÎøö¡=ŸÖêúiH¾'5G¶˜Ã<¶û&ÚR‰‰¸h!t#;`v"ybXš2[8vX5ÍéßH×w½!>Œ4];]'-ÕK¾„ÜñR ëSb(9cÿ!‚%R¾÷Ûşåáýe&·¤¦Ë$ò4oŽpøõo¶¶Ÿ@ærÑbzÖÔâÆx#§F%žçšfÂÕ’¬èe²âz‹ f»ÙëH‹y¦†U¸ÅRØŒ¯~ØÎ9Ðj>+È~¶Z –§°¼×}aédµjuÛxj° È3k¥«àft\Ö[¾§,cÊ£­ * ð$+/Œ'€;0Å3Ž‘U¬û¾L™6žßLh4ûEgZ6‹ØsÜÈYeóŽåáÿjçñ Ï¢>Hª¸Ý±Vâ/P‰üÁ[UªÁÿO£,>†}L¯w[Ï–eÇ ï!EiìÆ¢tD÷ ˆMk“Ô°d=æŽY—\Qk$O­hÝià9_;¨} nù>žO9lªsÒ 6¹ £]Ê®hhY“°A“k?ø¯y^“Xs¸â?^@Jw÷!ÒÅÊ*tÏÕhõ¨Ôæ€ó^ÓçƒãÀÁxsHQoÔÞë·# zgËTŽëçΓۚ׆eÊÂUèkS=’ñÄ€b?@Zr³K…óÅÜ<˜S?OßIòîB^‘2v¦íÄÝ¢¤– s¶ChËÿÙic09ƒ jP ‡ ftypjp2 jp2 Ojp2hihdrcolr"cdefjp2cÿOÿQ2ÿR ÿ\ PXX`XX`XX`XXXPPXÿdKakadu-v5.2.1ÿ –ÿ“ÏÂÓPTBM–ì³ ŽDüdOýN^HãqM~0h8¯Âj·j‚Á”³Œ¸*8RwÏÁ󿿍cÕoÛHŸ¡âu¹ã7râXyC5{ºS Œ¢~^ õ%Ô : g¹ôX´&¬H ÙÄØ•~¤p»dàE½bGåÄ~Ë…ä²·Ë õ0°œe‚ã€ÅÕ4É‘Fϱ ê_=©ù?³ï ú¿†~I›|»«T‰"P8’u65ˆFó9VH¥$~ª9™B 7OÏv@èZqë寳ƒîÏÁHÔ'Ù÷x¸ö剎å͹? „Å–ÅÂ]i© ¹>Ö’™ GŒ‰‹Æ5À¸ÁaÅÖåí»©ïÜαÇéÞ«¢úÞ^Š×ö?o±b¹# R¾ÏÁÔ˜]&Èå `Õ!,1n¨ç¤µDòŠ2=Ó â&HpóxPË*™Xfø)÷ºYÔ±}K'pîg¿b¨è,mÐN¯zLïë±”p9úÖ,Ê­õ—˜Ey~ôT•á2$s?6‘*^‰¤L ¸qTH¼æÏÂáPTBö²TbŠ¢2Íòäň©Ö7“{~ÄK®ŽNØôÂéfá6/–IÇÊFÓ{|¸^üò5y=M?=x49MãÔØ«ªn+Ï›œp¨ø4º“Y©n¹4õëúÌ$éɬ+•(Ÿ.iX½Û'ðGb{ÒˆµIׄ´ÏS~c䌈}jv &ÍÅN‚æªßÜcq”˜â¦T%cÎq-ÿ|V°8{­Yï©ÀÑ¥wD$7^ÿs¿%gŸA¤‡|ܯ§M&$¶ñe1ÌÆ¸ã•º"×cC×ðà*ÂS(ÅÊÇáJGáMÃð©`UõÄ ¼‡ægV=#gÔ¤—ý–ŽNƂܤÇJdgºâ¾˜Ötë׬áÆðÃ56–V5M‘q}³‡ô cSÌnÑ11Ák(Y܈¤±&â áh/ó˜Õàz÷©€–GÔqPéÆY5›Ü°ŒôX>kûÅ„áfD¨À£|K1j¹²½R:è›ÿ^Éžèþä „‡Z8ó› Y…d¼ ”ÏéÏJkûR*Õ—VœÓyib¨_lÑÆ[¼_C¯iùŽlHŸdÓjJ-ù†ÛmšP}î¬Ôô =±[®ÜÖ`åÁÉ.¥0ÿhŠpЗ…‚äjm4îDwÐŽ½» eÕÚ³‘fÝïÅ¹Û ÃNÔ1Â>øÄœßÓ ª/ƒiÒçSŠÇ„œ´BXÀ9¬Áuioˆà‚<¾.ƦíÖp‰W¨x峨Ìð­'{®ˆ"/ÈHÜ­OÊDõc[jW”(>©Ð Þ5‡(À+© hJï5t¶y;Žÿ€)qH”ò⣯|•Úöý¨d[ŧZ㥗wsî!aëhkv^êuX5dt`.DzUfIhÌrd_K°ô«殦Š#bˆÁõ"ÃíO‡àœíkî |c”=&u¤ÂyK¥S•—f»§"õÀ`î@md˜ˆ<¸,!¥Cã){ƒÌ[A­Ìñ%Øeõ;é±? e®—Dm›£À\2ª®K£Ó9hbR¢êµQ'—Y·Ngy Mœ^»Y3Bùf©gøC‡ÿ õ¿¶ÃȊɤøÓÅE95›…|| ›Ì¨J…Ÿ  Go䜤ԴV¥'+ÒṟÝ_w“fYߊ·ëÀŠØQ² u÷AGÍYIpV’Ofej+s«ØÐ³p"¼{S¿(L)kâ͉n){±Ú#Ž×úÁõ1GàÝÚÌ…]]ú»‚éUV²œ¸¡Ù6½gP¹¯Ç7=Q}nKôz[f’o…f /@ ŽÁ¬Ã.Õ»¯±ž$ ÃSGaç)ÐÜ‘æËÿ1l)ÊT54®Õ¹W&Ê(]iÌ3çõ“¦½àdPÓvL¨œ—hKãŠ08¨ |ì¨9u+¥iàãa%IÍóŽwëGôz:¦ …¨d4«_Z­ÇpŒáª‹¡­Çï!¥¹<Ω¸°Š˜–µ\Ðu÷ÇFÎð®Úã~~Ï[e¯(d{®P›†k è¬Â™…G= èRDV¼"o bÝæV{BŒH T®þ„ÞRwXfØàÅ ¾ ¢ñhÝ~êE¸Ü—à°'º®îM·n„sº:ò`‰6¸¿MRwçljµÚf¾ŒÍHKn6ÇáHOÎΘ`u\õÝiXqþ´€'ÀÒ«ŒáJŠÑ7~+¥ÙèÑ×—R´ æëÏ r~ëº>…ß`uŽ?íûÜÌÓ’²vXox™¥êl H+±Aýmx‘ ±Ú±ÄN×(¢e†Ÿ¹.Z”Õy `”vOæãñ0s’à1¹ ?þa4V]¢E— -#¹Št¯OÎtVžëöBØ‹"êîvS¶¬ á'Š·?•¸_dË»7pHB¼h¤ÂѦMoc"Xo~\^”¹W¬Û‹*Ï^Åc$G›àÁfÇÙïýÊæÒhq3 á^ÙƒÖœ–É ÙÙX¯Q?B¶Ú¢y<•ÍfãˆÁÉÇPùÕìêBöfU×ô¿`º6Q’IP›0ã¦iÍöœ6€‡#è,ýóBr?ٻ͘ÑR†¸™ÆyÍ$u­Sæ"®JgV>׌˜“àå–”n¡tx(I¶ˆ¨HÕvkùœŒâbJ¯ Ï(ð-¶áƒsQ°Q‚SR7Ú±Fn˜¤£nÁôƒ³É4DGœ²£“qé ÂoÎ0QW„ªË™zD9•[ÊÀY¾°ÛHŽ ÌÈ#Çá¼øo?À­ºÞºÒ%o øßÅxR7#õ¾ð-&N‰ÑX3ò¾ÝÒB{zšlüá þƽ…€ô¥.)Oßä.µaŽoÎÀ° FŒÀ“˜”.[®ñ}ÃÅÖ,;^PEï׎äE¸/Ê9¬Aª‘ü¢Ó;EüÌo¡CÕ`°š[¦ •p:Ï•¾ ½Ö†Cç´çT—¤já=KVQ6 çÜÓ!]qªß^nì(Ѩê­w&ô«ÌËɈL¶Ê¢j!†Ùôi4¿Q6s‚â„'ŽÖzTm´À'›óÅÂÅ%.-nIûÒ­bvFLÏÔ²{6 Šœ³öhÕ»ÿMyëð<+¶®Õ»Âî@Ò¢Œœ"s±Âz@–¯O¾›Î^E>ΩSã©Ö¼/„%õ˜jPƒÉõ 4„`Ì7 ®K=Px(spÇ 6¿vh±¦íôT€Žô/ê¾O¬yÈ\×I¶xlû oà Ñ+@%q®%ý N–ïž"7]<4ë=í2ÙŠ°$ ãÆÔo?b£ ³( ÆâAÍc5áDe hÄ/öLè(pÚ¤L´Ã“Ym]P|‘(¤ÉEâe:ƒ?W•.ü¥Qi¡Mê ½˜ÎÛ‡1àrÌÚ¿Þ õ¿C”``Ýüëœ)Í*L¹È‡ð«‰ª÷ö3E´ È 6Õr}ã”ãÀ9`U Ö 3u#O»c¯5GýËvr-›3“ºeZTä½Z¨c.Å!Lè?Êã{7™„ÿ4Â7@÷T˜ ­1çæÖ¢ÇB‡FĽ5âxùE™qžç0~P)¥¶ÉÂLÕÖCÖÙ-a¢ÊœÎâb6_mW¶ëT üÊG=ŽExŠ~ýT!JõFÚR€Ùkâ:’6®^D9_We‘ÊWtæÎóÔ½¡ñ¦Ðùvn¤óð¯l7+óVKtfT4³¡æ„á¿Ôúƒ=.x&®!:Œö:P¹•jó â]`Úø5©röŠ4 ÿ µdWC‹G9ú—+Š¿©$ .àT±#·‹år¦è@±ei4k&øHH¾£|}iJná`C#+ëÔ¶i%oµÏ05qN¦¦Ù±¥²^ª@J …#-âK:eÖÏÄýS \ì48—ëðÛYW “ =Ü7kë‚»•3S?Q-€Ðë÷¾¡îÜ ûä ]¸$ojäyQ4ÄHq]NT|?*¾ºÜý»õ·ŸÑDÀÂí&*}•º‚ûßpŽ‘»Å»ÜŒa‹Œ%ñ§Â`·)úKáöy°Wo)K˾†ØÞ™NÖöîÛ·XŠqd4‰EÞÙZV¢öN”=ÔàwˆÜK‚öË_>‡­+³RÈf|ƒ°Îá&‰Ö:9ô®mjˆ–ßàóüΠ"B Žü|2ÀG3²:é.i5¸´uKŸ¤ ]0¹ár³$]—ñoûôÛ5'º,3ˆŸ”0Ý ­ó43ÈzK¬Änäó§LiÖ ïÕ²Üÿ|eî ìh ˸ðh| š Y9ÄG‡*oTØ1 ·2ÞCùÃýÀèpò¹ZÁE¥…bÇÌ-…ÓGÈÛ+×Ãò±Z°eIiýöº!óÜ‘—0ÍZ­B‚¬¿Ä€ˆXÒ¬~Nbع˜0»®õ#Op23ZËŽÚ†¹†™BmL5ª÷ƒI{o!gåkr±iõƾ_åïí¨×Ç"{E°¹ãJ;î«î/ =N°•£eR L-Ómò„§çø1C2VI+¾iÝ÷ñ« !éÅäÃí¬¡öÙPü+ÀÕœVô{’æž™ÐÃu!²ølï:>¦ä¶«›S’Ñ:òÜ™Zuû}µéyÑ”d-#Èarm)䫎n­\WÎä[㪙à©Íö}§ ;4¯Á ÛXi"æÄƒbP¥K%¿‹N¯v€HOZÎù(­TϧãÎÍ–ï_.ÂIZmJ¬UoÐçÏBþn<]F‰|ºdßÉúÈE B(ÓäÀ¼@€^ëL<ÒÞ/»z5à IØÓ"Œrýј]gRY×%–¡ÙrÉq>DÆœf§'0bÞjÒ¤ >§P¥vWŒÛ{!Õc:Øu·T˜ŽÆrä†,k¾Vîœ(9žmu>Ù&cD”íx0 *…¡n"@sY 7àÅ9êwC®  ‰(zï¦z´ø‚ž|ŸvšÐø¤£úŸÞs÷­Ù™r㳯Vï«®w™«náKôZóª &zunï&iob1Tqî,Ô²qð5®óý7 ¿¸´‹eYÜýlÓŠ,Nzz+B„ê²J­SíÐêþ‹%*g±é°ÿ?s&á!'ù)jcÿiÑÙßäK–µ(}53kݺ¦ãŽä,+Ød£uJµ½Ø]râÃÃJËgfë2 +þ.¤è-ì4O[Ñ—±Gl|ôa)ä;P»»‡ËÒÅårI~ÃnFÔò|AÑ{¢O¡šH†j&¡!sÔrCl‡}†¯£‰.Û´ÔÄ;ËÞ`a´  >²û¿d5Ùî‚ÿ9wÃíÒÈü5·L€ÉÉš½6ƒVQt ËÔô¥ˆ†k(oÓ]{¤ñY§ Ôó 7s^³ÊWê*ÆÀ.! ç¦Æ´ÍóúãÐØ·N0:F-BBú‚tNbQ¹±²œJtwWŒ*Ϩ}véE6ß9ãcaK þ’B÷ àŸ=Á“[ÊÅ‹ÓCJÏÚ ÂOO…LÖI´¿õ‡sšnªeí훵\ºßÏøŸ6ÐlÖílP¨¨©¤ [Àî ó³ûuC‹°|d§#1Bß`M­ J[`K—Ññü˜‚•Q â¥YzS€á“œ»£Øº¢=&¢P7Þ v!±‚h˃gñÀÁÉ"Ì«“e˜²¤t7¾Ë8:ÂÙƒõä՚ثnóëß—gX#¼iÐÇÚÎâÖâdø"-,‹Ä–íŠàêªN„ë`ßôQ™c!vº¿lÄÛ`I”æ^TµNcs™Xe¥ üze]™ë]ÄùpÜ¡àþµã˜*äDWÀYDoK¥’ÿGæWÿfyÄæ(+ÍJ…2ò {…XÉzç*îñ‘±²ê;}¢Uåþ«®ìr¿4NZ×r¾`þÈj”“¡ÑãðVê5•"â7Â*Û¢7M7­î]3 e’Wj7Z¡ÈAO_¨j¹þ!åf§Á‚Ö›•ê)x"Êœj†½¹UqÐjæðê+ž@eÏc2áï·[Ud»¡`·_²G§¹šdlšØÓÛ¹lDQª¢?¹:û»Á€a)&Þ‘H±Û١ѵè»"!{G_‹!òQÚƒ‚Ô--x½“O9°Lò7 ËÌYYzé\®²¾ ¦tè§…\ðZ,1ŠQÉ>û4˜cìÆ“ÐHkÉ?§S—À_ týç^Ê5M‡©ù,Ô”jå64° —Àvÿ7U]÷dG£„‡N:Í­¨åÇT·Y#‚'°Ü:î·0yNî".MùP€ Àã#st³X6° >ÉˆÝø#Êææ3AZ&ÝŠ¬î׋:‡)Éëú̬¶uØKÖ‰ëÀËÚÃÌl3QMyêšHwf×aÝ@ ì9×t˜3üP6W8‹R€"3„êÉHþ-±1­TŽ€-sŽ6¬iâ$h3Ö䵡›‘8}öVY“ƒÅó5Çð˜3Û3ˆT"ór= ¼Ù7c|&Ôi9½X% &‹¨’î;áÔdg¼¿ëPcCp±\ælo°võxøg‰ã%Ã=.ð½y9iò^/ÏÏRçç©ùê ­ºß‹¸8±Ä<ü衈"~‰›E]ò¼!›áÈcsÁÅ/Äg¼lÙ'wé4ܬ­öÀ¡£ÀÔÇ¡ÒÙ[ tÚTok{xöm' ›/Jå~qSZF'g&ï „-H<Êêš¶þµ ]*ŠïÇB·¾˜})Z wüôø&Þ-꾟DÓËŽH›^ZñZE1Ίl¤þ.ÀËö±RÜp_²ÎÅë Q²Æ¤q…oص·3~M»•DV»L8 kóóÒ"° y …¹"çM?l~~¸d'ÿ‚—V0ܦS]¡a4v ‹t·û¼uêX)qpL.ê÷ðìé-É5¦Ha3Ãv.MÚ«Àňë»=]ºÝ®U•ýÝB¦|wT˜¿$è?‚A-×1W:‚æ"òµ¯>€=lƺ¾x{ BWFà µŽUKãyá¹Øy4,å›MŽi¹b.C sÝÊá§+¥ê#33¼ò·ÄÓ¯FM¥õD‡‚7ùIom¯ž¹E*Žî& „ªoøCòø–ª–ÀŸe‹ÙëHB|.ÎêhÞñNDWò»œ ú„Q$†´=øè…¡6Lï`bâA°jL‘`¯Ôx>j8½."[{Ûï'EàõÎ=T„^Ëâú%ôû©‘1Ñ3øIÿ8.¸æ¹ÎUÞŽ Ò‡ªÍÏ›va›’Ì/6`f9C7%‘¯ç=Â-Âr‰“ˆXش䴳ƒQ|‹©Ãsò°ÿÖÞº£'/Î䑎Žbô-™ú—4y.¢úå>ö{«HœzÙçàÀçg{P)¥˜¢8¡•øÙùéø«Ýô΄,kðÉ‘i Sr*©gíãágiõ%µÐ²¸~"ˆG‹…ν=²µ¢†! ‹ús†l´Ê Ôz¶ šÃ –ƒrOç«·i¡–'"J€~=“kDíâüÆ£3Q¯è§)?£ ž¢ÔŸièú7.2iÀÊ×N6SpWšD/“-Ä‘£[š·©'”&8ˆ˜¬‡JKTS[J>ƒ¢ÝA¤I\-–ÒÕ¹¤0(ˆÙ@Ê=€w˜˜äˆ]ŸqáDPDE§ÂÜ;H{õ¶:@m‚AMW\&ÆKŸàº:µh)·BPJïØÕ§Í÷Çq¢:¬üp„Þn(˜uÚm*P…Ö=“Çá쇇²T~~Ô ç³ XÒÒT3ûŽp¿ðTtl‚ºLûœø7ù» ÏõP©Ö«sO5¶ÜI) xNdŠ!bAú\v+=}§>â'rŸÌí ÀÝ4ß›ºÝA=ÃG[h–¯icú9£p<ù$‘ïÌNË1X;öKÏY$øÕ!ðãüŠ_m§øèŠ˜4Eô.*"1¶¬×ÃŽRõWò5¤ü÷jí„“+i†ü¥ßnål1Ár¢×½dðöˆ¿RZYi †Œ@mú ùR¾<ç› Æ[òx?¬„„°Þ ‰~áãLTœÔ3 #Æ ¶Ñ&RÛlc·_z-JÿI+OR·®7ØÑþ˜îjÏãS˜îˆíÝX2c•÷#om»rvÏ%y0ÄJìíà‚#e@´Qù(mîZjŒÈ_®ƒ8Y™Ä­h?øÆ›©÷'Ðc¤¸mãQ„@' ÚÃ]åÏmÀ:_šiã—+[DÈPžb` …;_Ä¥ ¡á]0ggËÖo¥üA蛋öØÿ]Fš‚˜o€ïª€»`N¹éú°Ý|“y*íj°¤hŠ•ži­ËÇ+q¥|c1LÙÑ)‰}ÞÃy.Ùÿp‘uû9tÙ̈õöäæ.ËÄ:";3’(Î#ñí¢9âF5ñi5ç<®÷%YÏz² ê-Öyò=#–gÏBW?-ö)” ᮉ›t•±ËÂŒÓb‹=U6Ê¿# °a—ij>aõ-´²XÓ“ú˜áë|Æ%Ö6 |Â@ü–¥ˆT4©ùK©ödÓ£«?è‘b}½ZÓ[qöµ„.΂qè½"صÜÇx}ãWý 0+¦ëǸǻñÒÏêOŠÚm4PÊ¡‚H‹ölJÏOõ¡˜EIÀX´õZÈ<ùøö‡~gÔm` AÄÆö3z蓖׬Ïu«åmo7–j­îÙ5.€;³sÑ©„"…Æ}´åŸvÄÂ~S–V\jfW»øÿcì «]Â,0![`¦-ÐwàCŒL'v“‹\Žº²»`Å8R©éî9……Vx ÇR£XESšûŸœ|üÞ0'4‹ºô Ók_у¶Õr5­““½íA^…ãì‡(˜m9æ#y…ÒI® û|MÏ×áÚšóÖÅY$Íü£Y`™Z>õyü›vw#;‹H?³%üzÌ wÖô‘Œ­Xêæ*v^†°ŠCãÈgöC˵ø8–ÙÞÈ?ò“Ó@Bð»"ßÄ© qºBî8¬‡rÜe[ ió0èÜ'ñ*˜g‡¨c×Ú“ë'¼-žéµb6v=a€ßëåƒk…BohRêµ[‹¦¾Œ(Ÿ Ø4ë8Ð’‘ʇÈn«a&«»ÆÆgßÙÝÒ\d®ÐeDXnàU¾¢Ttsk>~"ÖGa«tЧ}ˆ"+‘–”| Ú| \kÀ[©ÔfM ‚‡†‰ˆ.ogxrM“®ÜŸ+z6c”ü•ÐDvù3290f÷Ä ™†ìºØ­—S5ôÛéÚê”2TŒ+ê°ó`'EÆhæ’¬ÁB>1ø°öKÞ¥z|…ìªBm„Å]H›oú;Ó»‘JqØÈEäÍE§Ž÷@º‰~,—õ=Uey£É¸ Gü̳‹ÃM‡`¼¢”¨DΦf›Ô˜à½e'ºbâö+YˆÇ–Óàâ%†ˆ!©sBå« žÞ"\n?vjqa°?¡æRãýZeØ] W ?hË  ¾u%N}÷¹›Î!Ï™Qò‚J.Ši¦£~í]ÿ7ø¦lÚuŒàwé™h7ïk®<£KV&)'IJƒeÜB’;¾CowºJTj1S“PÔü'w´•ö7S‹{~*õ7`U)+ÃcòÝ™3q}¤¤Ð#e$›Xù>íš`e³ô²#2…ù_A㵈Ý?Ï+ñ‹¨½ÈJ cJdžd?'ÖŸ×ÃeÍà¶?ž¤ï/®X­þ”“Á¡òdå¤Nj6F"&ûnÊù¬;¼áyÎ;àÿl>‡åòaDýïHI,1ÈX~å½/-s6s>’_?°ë<BJd.qÐ*Ò±°1‰ Ael']dž¹ ~l⡟äË¢[èœäõ)#Š~síHFÕP¬@äû{›X$#TJ"}+´R:L€rŸ¹X†Õ#Ù‰×ìõP›#RÒ¨Ò©!¦ÎÊPUpc¶ºöv^ü©¼™z¼óHÈ> “žÍ@—^q!¦¹Ìùß41~ߘÖ_@‘ÜQ¾ü@¼œ¸mŽÃCYNöû¡«geþˆAŸd[¶3nKØŸÒ—Y´põ æªü–×D2ƒür\ñ ¡ÈŒ"ûâÛúïyu†PFyh¹-JòŠù^*“2}[Æþè™Ñj”ÝúS-¥'圅¦ÎªäŠ€FêhÓøÈ5÷®A èrÚ‡6ƒE¯l~u ~`þRúõ{\äoxP:Eè%ߥ.O&"{°*yí°,5W"ëü ßU>ÞÔ“ðç»6–gž³Ì7ma³¨•g‘‡ËHÿÄ‘å¯j؇7º+¤c3Áå%(ÐÅ,`É`ʽ+ªÜFö9üe>ûÈCÆ7Âá#—:Ý6¸3l§»‚Ñ¥#àû2FJã<îqŸÝíRSçÕÓÂ_®‘-ëÍPç’q->|E° »$1@Ë=¿|ÆŒ¨sÑ~üØÚÜ©œ¯~ |ïŸuÿkîР‰»Oa1MÌXSA®è[›vsÊ åÀ¥v[c '@?¿IæÚ%UpL¹Ì©rk•#ZJí-ÅšA5ðþàž3„›M `˲õóa5ß×Ë»F¤>0ù”·?ÿftò™jý$Ÿl³LÏ€ÀDåW>b ¿Ãä5âÓJF/¥á‚Žyhp!eÐæj=9z²ÿ5ëmë¡Zfq’m÷ÁaHñn–B•â6_ñG]^‹?:_¾v€¼†,~ÒE!…oæ!TÈ,hXJŒ¦Êú‚¥˜µÖ(@kEð`+£Éèp¤V( ޵¯]X®ddˆN0S÷òø’y¡G{Ü@;ò¿â–…3=ª7ñ¾^q ž¢PÂôHýùª‹_Û·á”6‹ïýiá3oè³iÝ«Fì«voìP3$Ò! ×-Œ!©7Öduù!¸´Í¹EüGçÍ9F™&•y80D–v}—ötÀV§à%”»É.ˆ“w»Ó®\íFãXu°iÂÔSFµhIàªÓêgÿ>GO<êfäDk‘}Ð-IŒ ¡H_/)‹j†Òy·¸ˆ h#¿cú#@íb´‘Êx360üQ¢µÍ“¤äü³€Aˆ ™}Ú‰Zo>Kò.In›zÊVœˆþdVÕÅ-¬e!eC|«Šµd=N»mû$Ùi,ºÖ˜îì5õ¢èØ})¼(ݯڥÎÜÄeï¢0_C´'Q[~êíC.-!çnÝ-Iv¦öZ]’û$ëOÒøÑ(‡:½ñÓŽGË|íÏ.m9+ZvýdE-˜¶xc*¥£ãöÚómÙ^WàHÃMÓ€Ë:YA 44 ¬ÔŒæIýųvÙ•g cšlÄðí%æÒæ6¤²XgBP×P]Ñíçè²/Zoûlü¹TÞû·rg˜&*Õ\1¿ÕèRö?Ã{ŒZ$Õ×s­‚s·‡2Zž `<m ĈË_/$´®Óй˜™-y}l,P¿ 8ú ýÙ±6˜wê~.©ÁK¸e‚oç7‡ûg ¤!fäÕF¬ \'˜ÅúPMýËç¬c„à ó9æô2ÎTædësÁN+~$Ù§‘Z¶ Fê¼™åóMÀѼ½rn]QüaAå,èjZ_ëAÚlÒ&3Ë4éè§ñú}pßfîR†›C ­åúí®H»ôý ¶p¡º‰uŠ&o«xëêJžŽýC³Âþ±áýŽÀV®å/@[Í«{Öà=›ÆDvNIùòñ&-õnÇ¥ª9ZJôáeõ¥C¡T¡Êw«lKG¸ÃëŽU 6ÚÃÄÒ^”J ®ÌP ÈÞ\ç/PÌÙ´sc!Û!²…¶erµ›AÑ–¢°$1˲Ñ;ÐíXO÷ŠÅî~ü®D ­Má#•ÕÓ*[µ¹ó »-Û¨ ”͆à‰Â)¹†˜ZvåQŠBNãHÃM¨óâhîo.w8ŽPtÛ¿§ô^‰`ÛÝï™ko}äço¡!t2܃aI:ùZü§8\Ç´=ªNZ"·“¸ÐM‹P¬Êñ7m<Ônå´Ô” ü.æ&Ê­•.C°èwl¿Äî`{:7ö ,ÃU•S ÞjSs8„#SðCœ¼b-h#Ì´ì¡DTo óË91b!I(*â“øïîƒzBŽ1ÉX낄̶~CþW­Èn#T¨\ÖÍþœ6þJ à™z[¬ZŠ…|èå€SÓ§aoÌÜæÈõéb†9é<ÔJ^¿fk1¢x§RU•Êe~mÜÛ]ªt³`n<ϰ¸Œ[„)à’«©.? æúöÌjŽØ¹¾!­ñ¶û¦ž÷j† ¯] ]T‚ŽÃ`åžE=³ˆr ÐSs£7NÀäc!µHàc]© £I â+uò.õ™ÉjXàùô^dnB×¥°ì¨ŸÅÄü[¨wE0°#&x}f tuI‚ ´Æs6Ôè uÞ¨£ÛåžûTï#«{ ßJFº{òŽâ•ÿ_ÁЧk’Ý5^ö?ƒÑ4Ø[‹a>Åå í¨ù„B¸pr‚Ñá¾êÎ~ :×@zø„^Í7qŠ\¨©×š¿^šÅd¬ôç(¦¨ÒÉ÷‚µ |߉p ÛþF®$ä#ûËõH˜3Ò…‚¬Ù©ÈJÖ ! _ ‚‘ ³,xùŠÏ/©‰æñÔгI !ˆ—o׸``œ ú^ àvË:nPÖtÿTÛð Á²ï[˜?$]QÈ=l.ÏZ LÙýŒ­–Üg•íJ%6)3o^˜F‚¼¡ïѵãXl–(¦®<»½¸„fOý¶ÔSÌé™sS]~k†ã:2„ÙS60ÆALá+—~±Ó»´e$ÌY~mØl·Ë•ƒ?šN-æådǬ¶`¯)Õ¡ä(Œ½`ó¾®ë Iõp³ŠsHzÛ–ar4>1º"ñW  …ü§ätͼä$eB‚Fú¯yå>á_‰0׎?×½ãZv.ÈÑ(øÖœ*ëŽ4YŽtÿ2ðgU$a"€*ÍyíONÀÍÞ©Lõ–º{Ñ›ýòD·³šd¨ .†Â?ŒÆª ¾`FÉ EÁš¬\…€ëwBKÝ®vu)òC½ñÙlÔÅÅŸˆÈg‚ò$\&µ@௠¨Ýxí`)/X‡Ø²µHM7ùwW—S¶gòÑè–±zsácgþ¸«øX½.~ ëÂìxO/Ѥ k^¢;PÒºD=w^=ùÊ.2Û¥ód¢¤]3{lbî e*véÒuõ¦Ì®¶bÌRn§FI{c¡ýÀ|IA ºÉ6l»E‹1jîô¢È0+<7ÝäÛàEžËâPýHèÅHð^¿“Ï!ôÍ!fíØ‚ÌOlÇÄÜ › Jžaæ¼éÚflrO³l¬wP˜5Is²0 fDËYù}6Á¯Î.ÔÖ–æ[Clwñ*dEPU‰·A†AÈ`2_[îb½¶é.e?OzTXp"N¡Ð&Ÿq3ìË[·†pPÀ†wiß6EZê¯Ø#Aò‚Ä°Þ $¶ÙY@úø¤îÖ©©Dq ˜«T2©Â¼_ +2ò`©^X‰ŽÑh Æ?UQx†qQšäûží|.æZ;禙‡”å_³»‚í©Wó üÒÑP­¢³‚ê$áè4–r¯9¾ßß ÝòC´FÏûŠÙ® ¿Æ”æ5 —ÊC­é É!æ¬õ .xáHg0„T}h†òZ†fT“û O«çDó¹å3L¶6ï[WD£Wû ›ŒÔ(‡ªœª4JÉ‹óÃ>Œi+ôéòäœ/<ŽêB–ãS! 6“l(¯˜¾¢Š”c6§›1˜Í–þ ¶axa"n.kÇõõåNy"baòg‰…Z—Ù7 p‡2>ˆ8gq}Úí“÷a­³µÉÒ@¾UBn„å/ÌÂþѶ·5³+ ³¢"Kúë¿O “Ž6õ¯߆%äTåÿOOøªÅ°ÁáûªȘFž$P&&Öo(ªRj÷u .Ô&’2ÿwl&ñ{uTx’#D˜h§|ú6ª¯:(݉&/VáZì¼A;m.`ì÷V܃^˜éà4{^ô>ÇÈ$šyü±ebüMŒÂgI¯rÖj¶.P›§3²•D7âñh|°±:Iüpð]`Š–"e=Ý4ØíÜ*ü7b[‹«@n…B£ÐSKlÿqk“çËܽí}¤w:²)püŸi|ˆÈú{JiÿE¬™ÀZ˜ÙÈ ê¯Xݰd(j&ývlu³IMojŸ»û€/–ý.uŠ«F×ócaS,¼JeÉâd7l„vÑë×)ÏÑ<ð~ FêmNÛßÿøvÓSk-c~þó€’z`S+¯Í÷6—àG³í\[æ2LS„"™Ê†£ÕtÇ(²†³›÷g[VðYNri¶æÇ–â^›­±o—̇,½þÒÉßajw^hÌNfˆ…´úð¦£å•Öjë¨3îú_*ë”.µ5Ç 5 v«Òº¼ÁìÅ`+ØÉ¡8E€Ë±LçU°¶§×õQmR2‹zIKѱcúó•N´th°X‘_ªIRßê‰:ØQÚÙ»sæeΤU£‡ÂÒçG8ø'o!î·“8SƒÃíïÆo Do~Àð¿H×ø-æ%{Š.zÃä;9Ìä9øì”•±M8˜œ{í¶…Äñõ\*Ûž¹ßã‹ì¬LZ¢#0H,ÕÑó'¤šb ±…ZX\¨ñ¼-Å ÑBjwß—™Í½ø¸Ë.0ö´ÛûÀ^k8dAäH«êAÄ!£+¢-X䎖ú+q«~š}“mÀϘWjã#‡iýsGS8$a¯u*ÜÁÚâ’Äê©ð±*«¹®ÍrGÝU¹•xÏ"˜õGk½Ô‡Nw ºMb úF­Ûò…8i3è¦uÈb¡œ¢ ß[þãå£DŠhÄh,*‰<··5ªî¨‹»"³Æã»ìOcI.Ýtr¶ûÒ¨cR¶F(¿5å¶Ú=zxÕÃLPéFWÔ[™6?‘ׄæä£ÉÓÇ ý°çïÕù«t >~÷4Ôï)-›{çôe–²ãÛ+a­”Q^îð‰rÚ+’œÇç!_iKF†Uö¹*ß%šæøæ‹¥ÝÙšÔDŠ;³>Yx%9Ïžøƒ¯ReÀ:T0#v³Ý²ˆC#wsb¥W¹ñÛf gÍòàîÉXÔB×dÂAˆééõ¯xlLáS¥pÔ´DD¿®Ÿ•‹]Õumðc[±‘Ç’Ø^ÛœeuóESfÞr·ƒR91¦DÍ{Ðõ#Q–Ï­|З ŽÈŒ›RsôbëªÀÿrœÐéXfŽÀµ O¤Ý'Pìv 3¤] \7ÓôXµÄaÐ+¨¹Ãü¾Â0OFoú¨ÉæËŲ™Dl2 Õã‚öÝ…Q#ôÂl®'!?åHÚ–Šø¼%Åï~p> D$uV^À$S³—Þ±[ã=ЬÁÜíæñ›Ë.Pdÿ|—‘¹NÕ.MŒé­ÄùøÃ{j竬ôÎQÕPó.u‰õ˲滬×AQ‡ø›ÖZpÂ÷àTe}R¬‘S´júžš³Ú@×Zaƒ 6µÐxì䞣A$êšbÄBQ†¥ïu´ Öb!*¹gŸy<ï„5>³ñ­Ýñ~T„›ä˜‹vLûû.u܆Šßö8¿Ž5×S€ÞrhÛŽe†pÜXÚí+d²ú=)ÃÅ÷vÉ„.ëãê3™Á©”ó‚V·ìØün•26[‰áÝÝÍB÷$O+š7{m«25$ôjØ&¤b¹&Ÿj‘Cê8»PÓ¦”—–ïò‰²¥»>¢/B8 Ÿz ­ƒ4Zœ4=ý;¸£3ï€ ˆ‰N„+›—]waåºlš3%Ôceikheðtãïp›ÅCœÌ#.¼4VôlN…TùðnM…ت¢íòXî#XWÀÜëÏf^Ïî£Ñ˜WI=*oºp›”‚É&Ôz¬ÖUÌÖ±hË|¼õ¥SB0ƒìߢ +NRW•i ™‚>G2±|ÀÄ9G ŠúüÔju³Ò¿îjèW(ò³/¿ïßÂO¯_É›Ñwí`ÎÏ2i¥3Ãþþ]òÆ!i-QgªNº yÈ«éWÅÝç Íž¬™ç#˜Ï<§Ÿ¡ª<€Áó0ù68ä“â–†8‘·oùEKàþaÍK-Ãøuý}o“^pŒÊ¹_¸¾½å&F€gÑLÔ/ù‰€:æ4%&¼ èj êjÐgö®ÀÄÒIÎä¯5&¤óº+9Vûû.©¤ ywùô†øbÏ~ÁyA¢e’û¿Àè,üFBAÏФ{By†œHZ޽|xÊ7'/ÍMq±ÕÛé¼×ÓCnÀŒNªFc µÏë1ÁxÙÄ0«6ýœ'w…QGY&"2‚á'†Tp~/‰5)r0ÞÔA†pº{]¿«q®s¦.ž†ÎºÏvÎÚ}´œÍøÒíÆ1dר±øÉ‹¶÷¸|˜¹#ìZð캽Üp<íb…`9-íË2.÷Fê} . Üà ´^:‚éy3{T†yûÓQ‘Ïfÿ\ªë˜75ÿBXIü‚³øûRþ)²ý]·™¶%(IñÔVԽͯð³ýÇ$S­/Ç/0ü=ƒâÊÃí&XH„Ù¢£ÁÈÔ¦ùd¯kn7ƒU =Kðk< Ó Á¥ùÇi5O¥&¦üûÔZÒ¨a'ÆÀê{ÞÝœûÚ!7Þfïlò„25íëú ˜S.=!ùj¬)~§Ï&”Z@¿ó©É›é‹?)ñ–Á¤ÜiÌfÃÄO¡À»ò†O-BªÐ<®IG÷wN–Ša¤ ßWÁ_R·ó\{£Aå~/Þš.ZÔ!ï~DÒÓýÕ>Ê¢Š0æ°‚N;‘¶ Æ©i]¸Eö/JCÛï{ÛÞL¯2–Γå *ñ«ññâ?N,‚Ê_/½Ó#nÓX=g<±7N?Š$«ÀN€}ö4 6Ø?\ùw_&è/=þV‹J~Á†÷w¼1ŒéfMzºç;t³´e0(Pk[k6ß1“$@×ù%yõq j­¢ÓÖ¤¸[ß È¼Ké¸ËÊ;¹ˆlm8òŨî4ûësÀ…uC­òNôMcæ—)lH&¬2¸[ÒQÒJ0ì3¶Ó‹¿C:<Ô#CÇhÛvóXØf°Ó˜$1#ÜFå¶¥"xÿŒfwVÿ6A“»ÝN+d–Hú¿ÈRËœƒ%àgpeÝÖ‚óù3µÅeå”R,‰KÌ×’M@Ê%ùÁWol–¨ÝþCpª*}Èñ¥ç>êâm.Ç—þÄm+š†mMŸË ¤A‘Ogxú]›a&¹ƒ°P÷¡ª§?¿²²œòû€/½VTïgPÑ (†(÷ø×Œ„juH‹š|i„Öà†4CLk#¹£V#›Ö×ü ".}CH¢UøhljEóRÿá4+" ¤k:ZnTSÓÖ7Rµ\ûvs$¤IŸá|R–c.fÔ² '¶q“_.>©ÁY‘Í,~‚¿¹vÜѧðŠã”ž¼oÑüJ³”Aú= U¸ƒëeÆÈ: .<<1ÜR!û'I 3òg©òækâúoXÈö$Öks\à*E¡›ŒË#ÈÙì,ã-¿ÅåY•ÌÆõQœÝ—¡h*C‹ºW1£#@ÑrwkþƒûßÄAUú¯–LS:*HÈû·ü·@ª¼‰Üµ{ ÒŸ­%êï”_ŪÍÚ¨DµüÅ÷EóGs™ƒ ºäRoã½ÿ 4O‘ÕCXü/Í¡ß)±ïx`dÒÿ"tb㸼3ËdØÒEà€ìÚwiú¿Í…šz«4ÏϬHü:¼‡áÖç³ QÄ«8¸g½ý8ÈH§$ÓçMHw «jƒ2fEiEP¯Ó))2’g¼?~‡››A{œZ^Óô·<"gÈpït(¸¹ÝåÕåÍmŒR ^9±BdÓDlý”Q.ÓM&ûã~>©öÐev°gzz´3ëË9 ½KE-ÀÅš7Þ¬Ss²–kùöüTvk5жˆ‰3.?sÇ©—þ`-Ù¦<ÙD¶»s°9÷ÐxÌÝw@4F ÖÄ“%ϳÚ]'¢`5—“àÁeTʺö?ñ:íÍ÷u¬äÊ© \kýP~­u0ß­TÞ}GÉ©ÿgø¦w®ñŸZÊiË=#*œ?^oú˜‰¡D†z‚¢ÃPKÝP9‹Lú¥N“(W ·ÓW 5—òökk*ÈÝ$%þº*ɉ ã®a¾3ÄÐHz6Qß·#€vä,wnAÕ¬ãEœÍ ßq¬öÍW¸ÕŽtö¢juL@„|vý8OFh\ë*Ÿúš7Ï(´%|m!Q–ï@¿À½g¥à¬”ã–½r¡£ÑÑW¢µl±X×*äÌ–MÂé+ƒ[a4kÑ­å Òf¾i²ÌnžeQ5ý¬þ­·@ºÐr á`y1ÌÍ? Û•K ™U?ÎÌ·i¤a0U$rC¶ÎÑ ¸„V,TÀç쾚rXEf‘:zë™$ µáé<;CØA×3… *Ò'{Ùò/}o.ˆšßz…í²Ò&…ª4Ãeèð#ñU ~µ?Ý‘QÉßþ’q+Œ]Øï2ìÝ”VÀ¢å ó°Ì°â‹¤œe®.‚â¥ju=@H_“QCqä©PúVú>R´aÉH#‰Û›¹)ÅžtDE º¿N“³d’Múpõ†ÌJŽÈžëqÝ0Ó§Ï\½¸HÒjý2M€”¶…ðªZuÉÉ7QȃÀë:ÀÜHfò&íJøé*ýmœzÌw@6‘0A“jÕ]¹gVwòEûÓÙ4ÝdÎ^‡&3㱞†SýRµÖ˜è;KzAiö ‹ Ý-×" _™{÷ :òÃI{ÙzÙR­!€Ðá)ie¾ Åäí‚r¼æW³Úyi¯ÀU}aUTuâQ@„ƒ’jÌp¡}WÐkøù-<‡à +}ôUVuÛuþÐÔD¡Îõ\ªm8Öd:)sÇÄ$=Ï.6ntX5²ºnN»aR^.æÆH•À)É”øyå-ÔcÊÜB9È'ÅǦ£é¥›.jA×µ(Ф›×8$Ä€s7Ô¶Ÿˆ²Láè3È j °ƒÛìÂŽ8¨O­ÉtGq g—#_‘* >VèåEÀßI‘1`À[‹ÚÚZ¼eÿ#ÝPI¸R€n¹qJÑë}ü8G˜7 \~ç§SÐëó’²y»ê¯¸e î=c ’Œ±vùçX¾ϲD!ˆ}ˆôp×]Ð’»2€çl ]izèù¥_#ìù0-¨Õ½e9”Ë*JÆiÆÇ?·½i¦ËÀŠLèìRçFiŽßLšýÖÁV£‹]uÝc¦]‚… QÏC뽕sâ‰b';ŽtÒ!‡@33WšÅ³~×C³}„ÜPÒ0Ûs'³O÷£ )R„©†qëu n‡Ä®Àùà4ö³©²P@ø'a˜0úæ}6ѹ+,)Œsï%h ÈijODçÎl#À­޵FÇcÙ^«¢ß™å=¢ÍEÍÂ/Oè¶ÌÇo ôÍ$§‘ý÷'Ð ö®¶’±NõM€­M0 €¢ê8TˆhÒç*eš’Å û…¡D² œ¶èžÏ¾šÀ<^BQýÅA>Rà…(!þÓW*÷¹?;™Êd²'dÉŸß&êÙ¹s’@•žÅ[ätßF.VmÈÒ%o y?ùˆÞ vjbüá²üýªˆdzÊÌsìÀ=”|SÏñe334Žwrãâ`üŸ|žOÌ­ [WA½#ªÿf¨qìXÝ*¦Æ£S˜÷°añH…S'~â ¢Q^_Ry–N誃\ж‚¿® /Gî¡Ô³ÕGlñºÇÿ&0{qîhþ ","S*Ö¸¨fNâôPˆs©fd‡(+pë!¢þÛV”€:šfGªÐänÛìKܯ¿7~‹®C¦5SEPÞ.Y,¯ƒ$Ã÷öÊ£¹Ïæ…yª@5TE›sÝ%{Ç!0ïnuÒ¨Zå…ZOÿgÉ †Ëç¹n°»»!B‚UÄ@(£xÏqoëÿ"Wšuµò‚T¢?µD&‘@¸³´”ÌìÛÝ&…‚ D0£[“´õòú'ë°UغÝqœ¸Äµè­¤\ŽnúŒØË¦7¯FJ÷Qa•Ý¿æf}&ý)'9º%nåΈ¤S@“*Íž*‘òRŽ2kEð ¿rš˜J–„"¾ÓÒUwúBXZ0¸% Ä>Û ™À„>ÈÏåHÛ`´u¡Íø÷ê`­‘‚ñC‡êú¾¨ÙúT/‡Çe¤IÉë Öy‰-;;K™tw Œ™(¡÷8e¬UÜî(L<ô‡N”S¿£c°c~#8©”Á‰v„ý µ½i<ž/<œØ¹rÉsöCÚS“h‹3-øV4ɬ{Ó<°Aç6QvÔì^(\™5¿èjj1ÖRØËß3—ÒÅ,„T²‰Ó¦€Àdꈺ_Ú¼UNa>"˜g­x_¸ˆòhgŸ¬U¼ùQç“ù&T UùÍ÷k8m¬tµ««ªM‚ ãŽÁ‡ØhèîѤNkŽï¿Hï¶Áäãøh¿ð÷wþ¼_ÃØSÃJ?‡³·ðö)þÖ9üõùû¢?`+ðõö÷Â[¿ÙèL f epX·¢8¿Ç¥w+ÜIFð9x˜JÔ*ˆ¬E…$ÅÇ?-”‹îP9çÕµF¸šªóý~—ÃHZl' BÔjDC„yØoP¢Œÿ"¬ð«‹³Ûs½¥®üq¿JÆæ7óXÆö<5¼+óõ cu÷×Y dæ2ycCÅ£…| ¤³,òï}Ëž¥¯7Öu‹ ž{¹øÂÜÙ¯€@ÞI)Zéý©‡5SÇa ¶Ô†–dèߣ'å»nzø³µËF^äî± ·X.g_ÐÓ– Ò–—7u>º$ª„J‹YýÒX-ˆË,$KÕþ*Ô>ÞLšâP÷Mj›Z ÊK¬þ§ÙA¿Ý DÞ$ÚÛ¢"ÖGô+œloýšÕlŸSr¦Úx8þ!Ú/€j½Ù\u8Ë­tB.äÊ«¾ù‘ N¾j1x5\±îü¯ò7Ú¦±sUÍl¿* :0±l@ûÛ¡¢Â …Ïa–µE6¯—èu«y.¤¯>‰¢´÷u »l£µÚ„†(èžéœÂ°‚` GË ú›‚L@AobRË`æ9°ÉŸ™Ãg¼ô勵‚á~žãíâ ˆäh'wÉ@ž V7L’æ< „(‚ý1:g ãNTá÷*ºÊ샸ÌÇè7@'#¤B@ßS¸¾8øg² t"bŽ\qèz\x[ðT|§s±"šØs“a!ˆ’‘jíél¿!ìá"œÊUoV½Ò~DZ ¼–ÿm59´¥çnÖ7åyêÁñl& €$d¡˜ƒêââ$]´1›< Kmà9£¹„¡Ik™åýÛù§n©+ˆs*¼®iöŽVuç¼8AÁ0òßåâæÀB/³†€ÁF’6ÿe>J)°Iúƒë^ë͈š‡;XÀq½ ?¿’­|½Ÿõ=mn¯zÏpPzü—šÔ¹ ŠBEÓš¹¸²wÕÊ'Ï ?ürV¼êK²’ ¹L^4Èé6BtOû©7Õù/Â2á Ó²6ÎÒže0 E •õWŸYu•ͺÒ\€ãÍémœªR$Øä|º€mãþ©£æ7l|ÿÀI*`ð0_jË|­î©'çßg‹ÀE¸—ѳÏo4 i¬@")¹þ õ‘³VBÑPù¸@i¬£NcìÁb‚y‰•À¿ýÓRËÕV=pñöjã–­µ-‚\·Ì Ë-Ó%X ‰çßwç6"¿|E‰›… §ìV&*ùùâÖD ­ëSǪ„Éñ¡ÿ|Ëo |i+ÊÔf‘¼¢ŸÒNœd.”ÛÔ¤eÈ⿺ÆßŠÓ¼úàg¸:ög\Ùx /5›·;ZÅLI¶ ?¸:ëžNá§Rú²ª‘εèÄÓµ. å•¡´K¯ä^šD»Œ·@W%‡-ÞS‘ÉË#™ˆ.¥(Ð-ÚllÎÒN†IÔ,Í[vì*G[ÐížH~ßâTÉjÇú·b‰°[蛚ḯn«(—€=<#“Yâ°iø{øpÚžØLD¶ÏT³Æì£L"=žO¿x{ôx dÏ¥SB/ÏK¤ v»Ëü '´\ M'™íF‚›NÆv!P[[ú¾Yw#zéÉTRFiœ Öè{‰<’6k” ìe z}qŠC&Ig³Ã:LsÁßäÞÁ‘g“DÖ}ÓÄ™ç¼T^nî¤ÈE·@À ãñòÑn¹ÿ²B a³ˆ5+FßÃÖ&}¦{Ö<‡š&j¤vO½¼B~‡•'h}àdùÊÄ!­Õ«òmä“+¸µÈýC,Ýåhj*ìdýâS\‘Í'¦Ç„øõW #þ¶TTû•ÎäÕ–`zà‹ÿPkÉWGDßië÷Wj%žÐ1nMH•#.ûnåO ѳL¨:­Y ,çvw–r-Ü­ÊGÄü{ÌàÙÛéUyßa¦ ±Ksb0G!mT‘b>ùIdðhôr‘I¥)Ìoÿ_£dŽTT PÞ4<Ñm&´ú€ì—uH¦>®Nv‚[êÛ¡îäþ#š)´è,Ír1Á\º9ûθ—e¤P}̶S±S2lí5„5ºsúo¥òüÎÙƒŠ/¯í®"M„ˆ³tÕ\Wc cÈxÿžo;ѸþìuϵބˆÍÖ'WiÎ1Ìq+ýËÊ(F0Fð qí.1ŽÀîô0Î-œÀ¿ÍK;¹8¼ V×´FI!>÷p†V+øó‹; €ÁòÚó‡5I)G»g¯~âþ±ÿK Ök7ºñEw rfWoµõ‡Ù¬†µ¾*žƒ)2È­ø¦”©"j›%ÿ=Ka J!Ý¿™«øû, ïòñ²³ùeN—{\‘¯kcM³£!÷³þaÓ ÷xDÐuóóÆp94µ"=á¹4Ђøã¥–W8øÀã1â¶b«3•°/a±|&ÛhaæûÖs£XOA7>Í6ÎFsJA·ÁJ PœtÜô¹ÂÿŒJkV$÷vÛÖ³¿ä߀›´ ć›n„ös ´ý‚¥,é,Jk¦Óþí»&XùÌœLûá“m¤+7ü"Øq^þ¦õÝÉm·‡J­PD§œÃæÜM'òÏ–Eõ8°¿* ‘–Òée€WÏàX5OÖ‹—H±°ΈHä‘höÑò9Ê4}ß6¬ä¢â4ù§ÔòáØ¾ÛÎ0RP¡—xž.Kåh2¶ƒ*ŸÖGþzPˆð•F“âă¬xðâÄGœF=À9†hr Y!•97ЦáÎ\u±+oy›Ú ¨C±8bòô*¼¹À ˆÒœJ©ï$íû`,~]-8šÌÔ™é¢2“8 éœ.ý°WýIò㙹ˆ¢ã0¾r“ˆ4‰FíPéу%³€‚­jpÃÅ—ƒö54n¡ÆöÜ@jî¼ã á_wæ(¸ÆÉ[»RDãË]V;ìRP&uí›ÏÎÛoW Š‘ÊЃ“¾Èw¬“»ÔÒh2ŠyìE©´B8åƒnÉ?™Â[!¬g„0 $:9|ìÿiÐØß…F¿ËÒw’õ,L ^o{šS“c}ÿ~Ü5YP¦ùÿNC…#´XNV¢wKˆÜp£ø«|ô˜¯•ä_óêÖp°JòÐ42Q×NdÎ=g÷ÎÛ~Å.%"[OT²ÓèvÄK˜4úCg_£k•¼³lÚQÞp-kÊrž od!çÁþ`Ù—g1± F°ßs8Ú¿HÉ•ÁòGD2’‚>/]ÞX°ºâBŸÞc*æ)RùŠ›}¨û oßVµRÖ•K¾ÂŒüêÜz^½}¨qlTÊÖöÄ]áð쿦r¿%¼+†½ ¹’ë»GÍoô9lÒÓèÿpj…­œL. žÔKžM(ÕÏ2™"¢ˆEù= ÄÝF‚k=ÒÄA‰‡v°Lj?ÝÝFhÁ²,VÈ+ÔÚÍr˜ÁW6."_ŤÞ"A,®]Ã/šf²,ê(‰ˆ:|zFÔ%!Í _*x£â/µ6R³A_¬` ÐÒ{³ü‡±£[ •Ô­ªZ¹mÃ`X•yIøIùIQy=/ÉÍ7¤°5z@ 9°,øÓ|Fž ýG)'ŒÜÀ·d¾&®\ŒüGNMB9O”ªGèp{}ÿb•ß Q ²; ½¿õ½ðZ6Óܳtµ±b¸!D¢˜ÆÅ®­¥õu|¨ólí!méõ¬ÍO{ò7æI>ãȲùÈ'›¤·L)‹.T#QJ$ë" ÁÔ²À °¿ý!u¶H¤bAÐn7i'Ì1̓Åí€ìDã”Êë½*qˆJ{Ï4)°Ù´´Ç)? ꈲ·×¨Wg×MùºŒÔñŒ¥æ÷§”–£è^ dícÎÛb#þƒÁ_Â’®ŸS.ôŠÿ}y¼x¤ DÐÕ.?Uð¦òS¿,“lîÞÿV—Ž q¥ra^¸«â2 Mÿ:ÞÐk4 Ã5~`Ó¦Ak;ÜrbÑ_~Ÿè¤.]԰ö…ØÃj¾Y9 cS»ØßYÞ@>«;0YÈš¬ Èõ¥DÍ}ÕÇát<9ÅÍYiµ¸hÆžs²§²XQt{I3OSKŽw6òoW´Ê£ÎöΡUNÆ_+X…ˆ[>•ÛM€'Ç|[\ÏÏÛŽ=[’ÛCÛæ 3® ›{ß#Ú§ÐÝŠ/0ˆ|„‡ê( >i-­t3žÅ[Œú£]Ž·'½ð’ëFÛ(9“>Gçƒ%Y2ý}‰¶ÏjëÜD¨Ð2NDÛü¤¥o=:tåÚÌ›Qd‹~KK.eãP_qÑTDï?W[ëAç f-ÄõP² ®b’¼“‚™Ã¦ÇÅtw_׳fAÀ‘2£¬ä€ã-ûž3[ ê%{4ä¹}ʧrtlЖڂO@³„îtB ¯ LÑŸ‡£ä>>ÏÖñZ´ž±i)_Âð<7n]1j÷L9Vš°_eí#ä´ä¨Œ4Z(å‰ä¢t+Ééø±tþOÉl€—ҽѻû­ô¼8IðT“ X;›ÇyFÄÒm^]V+ ûd²±'~p¯’õ4zµÌô=yÛAô4èþM2:Ø´Ä“»4•¢® (–ö‘…vltBÞ»ê|á2¡·TÍÜX^Í…þy÷ßMgÞ¯ÿÏ“>­ªß8¸ ¥CÏ)§ð_¡¦Ðf{Wί*ÊéK˜ìxkÐt!þÓ&ü ojOö‘øFŠ;gó¥2øük«ý*=P—Îj¾lŽ? Œ½88»û$½Š¢ò°¼p¨¦€‹¦&øòéÇÉ«uéÝÛê¤÷bÏM)  rÁŒÉëêU@ùré~­áúOÙ}ûK"×X0Zî¤!‘ÕrôÄ|Uï‡þˆEÙx„ái€uÍâ‚ã™CoÁŸ8¶±~Ûµ'.^ø/Ɏƨj|:{°†¹MGÑmpáÚ`q‚ô­Ö`©«6"`m#°”Þb"m[™^1Ui×*±U+‡¦&qç-Ëé·€)çÿ>€öI«Ÿ½Ÿ«ÙIQ|̵ƒ¼7ÎÉ®Ã| Ó™³£Ö%"© ÛêP+) hñãGk¦Uj}"ÖF‚nIJøª‰a”dêPà¥êå,]† äȧ©¶¼%ÉT¡qwc8˜ÕþJâä–ŒãÑlL(£\BqŠcIk²½7µÓ½}~÷ÙN7 ›âµlo}à’EÞˆoOë_ðÎEÃU¬ãeä`Œì±™ ÔvÅ5M²6üð~ Š¿q݉Ë>Ȱø–Gõ+!§ý-a’å¦VD˜@ ·qó ݯÔanú¨vað GD²¼)¿‘®´Ê}Mwöv§~4­Ó‡X¿» ™ßÒ~ÇÄÉÛÆÄ:übìOãÞš"8®¸\®{©xƒ¼}ysk‡HF‘ÛŽÈiP %$Ožx™… +®måÐõ‚tÍDë÷JÍÒi€ÛÆ‘7…cxZú÷w.¨¯H’…YRõñkÏÜ(È¿{/‹Šdl¹¿Hl¶àˬˆMþœ<< Ù·¸Ÿ·¨6{¶Ÿß]=´ È«„Ä€1!®Êçj\Åø¥ßOä¤,1ä3Ò× 0Móê_ºµÄâä8¢¦­@=|5«ût’H<©Öü`cí4¹r—o-”qsƒÒxqÚ•€åAJôí«“ûEƒÿq—£‘çŠÄ¯ÁÒ8k¸0ßK{p+(Àl°¼™ú‰Œþ8ÏpÕ3µëà¸Y»G-Y!Þ Ùî¦]Î*¬» lôhí'‘é6ÀªT+.óß˱±º++ð øRþœÙ=pfô‰0Ëww´¹—P<Ì¿rÑêõÉ-½ÂèOcôÉ·´‚Ú Qw9ÃFÀÆ®±|87ÄÐQWm4¡HuZïçjvžÜµ=ßZZhÉÄIM~P‚ͱ‘*ÿÈ0Á°³F>R|6U÷_šë欖½ÜÌ–óõ­ŽtáÈæÖBH ´¼Ú„ÞXú£p’GÓ ‚S¿´E¨µO#ˆ©Cx®ƒ Tw¤qƇy-ý[Ç:>óÏ €H-<_x„e¿¤Á¯])£ŠÃ;Û¥ ×“0ß#üð8A‰êLÐfSšÂðV(f™ ‡Ê@îÑÓDg»I8侯4v˜ÞÂ{]éfâºêË/ȘºÛÔË z-×½ûbj•{ï=™ë¤0¡Ÿû†>Lâ]ª¡&J ãÔåe½èç :©Ý×?±+ÔÞ^+–µf{ɤgÈÏ!ÔNÂíÕ|fÏaŠó&‚âäy×Ùž†r"}bÉN8c©JûwµØlYÖ;/ ØÐ—Œ–·Ù’އÁ¢!ðIJAY 3 À12|h®ù¤œÝf³U=Ãé|'èw„J›äÊ.x‰=Æú ŷèáùô^OÉ„öÓÏœR?"ךüepÔ¬3©CÀ-€Å¬[ù¤_âpÐÍèlZÂCË“wâ‡PêC«c#$v´í×¾&~Y!Õüûû…“öæ7F(¤©ÕêÂÅýÞû‰ÿHLßSÕˆƒ™p$7þ%Ñ¥K¸È¨]§8mx¶Ä8á7¤ðH’6q•bã-úvÀ¤ÿW2k儼„k)æÕ>úJÃzG©×ÅEá–¾¤8ÃT£ú×¼‡Ä&3ßÇ“—™ÊZýãËCY E¦ã‘ sIZ×DvG.¨œÔ#ÜÔÂSGĘ=˜1ü™ƒ–šr1°µÉÃ4ÙeT²œé4‰éöô+çŽ%j¸øÐ«žh– i=+‡›×`Šû‚žK=ŽôÎ_§»-¾¨Íë>n„*-êìYÍ4Çä*ZDêÒz~<Ît_.ÅÛ¸ô„'Sã ,¿ä¬c²O_yO #nh½[ ^1÷"ýSœg£ýáU²à¼xàO†`ýGªXµŸiÂr-Ź˜¯ ʼ±Ê%¦Ìõém›|d62âT/—ýlHá}Šï<µVlÓN€ïÔV‚œìŸæÓ(-©?wëäß÷_xÝ)¿²!ÊÜA~,é qdJœ.ÇŽ:€ºkŠ©ºæašÏ! ‰–`“G-Ž/ IÑ»ÄÝÈ ÏÔÏ4þ,l$’ îkÖ{£×ì‹Þ!ŸNé™î\ÁÆf-”ªG{¢×•o‡¿þYÜ0^|æ¿·J‰Õ€¡Éá³(ŠLÇá]Àu¢W!B *ˆï›3Š/–›ÖæP(.†:Ù‡¥ìÆÚñÁÌ¿ÜV ½ëΙ¤|‡;R³³œÎ䙿—ojd+ fHÏ%)T[ÉÚüª”bƒ+Ìÿ\s£õmy™¯ALT¦éI·Ã£Tþ”h&ª½»t˜ªæbhêèÉsÞ<ß ÀAzvÅBè'5nžjÉŠš|J¥½o'ñ(ì´¢P]êÒAîÈP·0‰ ¥ó˜¡:~¤Ð´sN ƒ6ºÛ– FÚg[ðrœÛGxö:W)úpáM°ˆã–€×ÆKù]£TÚ4Þ{"ål÷Ö?Ðýµ«:ôzqß)ÇeÒ9Øë'[Âp‹‘È©‚RKE;æ¿ÎP¦ ¨þ¡ÞÉ¢Ð|HlÙeN$4ˆY_‡¸¢gU”àq~š¼[…¨­Îï|žèê{ö¨2)÷ÿ3°cÀ[re2“á~*<¢ë§»q¨f½´)`q;r4¯*‚×J„B­sE¤º´š¡UÆ£C.h–Ö½µ—S*»¦ÿJ|¸Ã9%Fö&¢=eb•áÏö»Ã ²Yqš©k’J½´?œzäÄÖ¯Î(൷Œp;á9ƒã=Ë2²xtÆXÀnF4 3«åù4“òâõ)åW!ÊÁø+T¿š3Ü(ã¹ÏÏ’b$0Z)Y+mÎWcù\ó]cé_È3œ/»©Š" ÄV•íè9\Å >‘ÌšÇÿQ—ÝÐtËUʨù›j2%ád‹EÉé–ôw—‚-…’æt€t7G·^ ÷VùtNÖ‹þñèg¤ÃÀ<ë"¾Wó@öÕèX—ó^ 4ì“ „ˆîsŸŸ³Ú‰7œ•j±Pö 9Ÿ0ûdØMôTPýqy%O Çe>8y‘77L1Ò,Æ1ø/¨–ãœK€ÇèÕÆP}§–š?,°˜ilÉ2,2¸ÂonÉGYê!d\ÀÙ@ið ¾ö~ùÞ¦‰¯ GX6X»¿{ªõNöÞd]Î <ì?móA\åz|~Ü+Th¿|¤×ãJø×uEþ”·â„ãKâ{‡ö¡‘9îDIê&.úæ¬X{ÌÔP }ô· cÙô³û˜YTr?MË·4WE_^üžx¨Ìh=C-{F«(ëO@·©§ÓÔ–‰ü‚Y,7ÇÁ_£pÆýÜd/ µÖè)g#<®ÜÄ#òÖÆn}ËtéU,RElÓvØÏl¡q- ãÏEvÆêÓïô6z ”¼Å›©Êä£Ò”WTW¾¼šûfȤ9 Ð“ wZCø^áûaÊMŸ\žÓϼN¬8–^D<•AÐv{&ò$®ÿD›º²ù'û¬³YÎZN~À±L?ô1ÈÀ ¢GPüt4Ö%OyF$NÙT¥„“ÛPk7uG´êŠ‘ÚaRi5ZmÖ->æ²$åØf«/­ŽKl(å]¶£8ÝãÄÓ}U1m½®îñ@L(ÅkšùÈÿlBq+~úrL·’r}–²j³­¼û§'­KOÍ›w€‹ŽfŒšr¢p ïSí³7…*¾ãj=«žÀÖ£¤KÙ¸z´RšÝUL‹µS €B¢·’TáâóŒÉ±•ñ©Žçˆ¶N-–ÌHôÒsi3ôÓU Ï¤L³“GƒPQ5 ÷ô{mi)Ö)â¤`ú)×ÚPÝA=ÔYÒ¼û(…}Ó{5±Pí¿KÊxnÕx^ÔT ¥Cìì_à4õ#m½Õ+Õj5ÍéêŸUªr‚"ž^}¶eì’"kmmªßþ·6‹¯ÇE$¾t'™Ú àö0ÿ[ÚÛKÖ°Í5™èþ$·mœa_›¨ Üã.4í—y0êG+†¿û¼|ñº¡Ø‡”· Ä™¬ñ¶É¾œ \á ôt<€³‹Õ¹[›Ó@Az6]Åš¯øhQõ V7¥\Ýò¬Ð§ [qä!hÑBsùÝúâ9^œÕ(B;Œ =ÊeÞyÎÔlŒ1øŒµŒáûǤ…¼gV`Y˜gïåãýót›kÊÒ9(”‰=_¤ÁªUr«1—¥¤Ûø÷ú“³~¨Q9ûü>2~ÂÔž¥™gjé"\ü Ûo95ÀœñO‹†´›¸ùç'ÌKlÜŽ.Ú™!ÆÎÊf¨”´Úà3[Ïç†SFbÑ6É1Z‡sÌw$oäÜriG΄Î׊tÀÕ]ù9ÒU‚·"nüË»$9D]®Ïh‰4ÞïlÿR-U×p ŸÜGiÿ"˜aˆ.Ò”?[ô ¨”(˜3ʨ“? öZHòN¤ë·ì0D®]€ýã4åŸð8¤†£P€kc³,*ˆ›vËsõGC£@BÎ(8?£±f¿¹ G6 Š}ñ_ŽÖ9É'kˆŒl B”̘9‹±?3öð¢ä”Ç×᧯èÔKåÕµQOñ™›Ñ9•-©‚;­Tgy Ìͦ8Í@tÔ,²ÀFµŒJÀã§œïæÌúd€x•!S{Qö ƒ!µ¨x3êÛÁb½ljˆŽó†ÃÛ•tŒ¾¢,dSxû‘v\‚ÝòúƒÙ:_éœ×ùÇ–·Ôš|3¾lÜkNÔ›ÑßÄ vÜë÷Ÿµ_ÃÀ‚·ßk+­‘@š}Ô€(™6ÏÕJ·j@ú¶Z‘õ Â7‚}¥îÿ±Ÿ%ç°ðm#‰Ü£ˆ _ ’qsÈð}4;™x¶ðlpL‰üúi]J¾¡P%‡Þ¸”aÒw¤½ZÝþzÈ7}lÞîWÖŠnJJ…_ËMþÆŠ”·2æ2£@Äy )ÇîÒ¹n#£-CÃÑU‚ˆê…®\z–ðÝ©ll²j "Åh¿Û6+ž,-¡y u!GX·ø¯®J¾ kUËÖš7ÞîÜb/#ñ‚É€òÝT}KÄD?|>²ó{yË÷*s›@Ê/™“+7XiK…ÖUn.¢:Ò)µCà0îQÝz¾³ªÜŸp£”«Ñó7–ÊË;}†œF—Ä}”ªUm–ª¸-OÍN·YÍ6²Þ•Wм\üíàÔãs†KZ¿Aiñç+á”è„_RþÿHЗ~œòÜöÊpêxë­®?y{ÚûCÁÚ›ˆÛ^®Y¡¸ªÿtSš¯ÊŠÓo/$¹ga *\ò9a˜#Ad·é~L}îÐS^À!D^™h‘Y/XáS¼>¾Œ¨H#¯Íî{þàëçÇõäYAŽ—q2n÷SS ¥*Hé 6žú«E.˜»ýÅGë ß( £bXåìxet«ZFBE†ÊÕ€øQ~f§D+wc ;±0˜-t_»Ò"–¥ÁkÖðLÝ åŠ>"7vÓw£:CKAñyZa͈DA×2¾JêÂli`FÛyPz(0¡q¦îU,6¯ƒªçgŠ)­¾P@E?^-cX:C”‡ò(yÍ(9s¢pdS³w/Ƭ‹ÐÛHSÇNPÖ   qu×ü-ác L¾|]ª[±kþ.xn˜+Âî0·‚}x/yåÒ1]·kÐNÁéâ)HôuÝÊD°Ä¯î±Y$ì?$‰o€IØáÈD’Þ­‰,á"’ÚÄE9ì…_-α³Ve» o°‘Ø>= ¢a?b@y¶À§j<}F•ß¡ø»YÅÎÊŒ7èž—¤H´»æò9×Ýù¨j‹b­®s)ÒÉõ–€æò †oæï¬áÞm;7£‡C¾çŽöP༵½z¥R¶ŠXÉ¢Ä)MÎŒ íFüÝÃiŸæ61Ý>·?ÁQ*ˆÚº Õ†|[50m+‡*83½Ön}š²P;SÉm†ðØcZTn~±‰u0±ê˜Å~󤻸Ú(Ü}ƒÙ!áí3€îE-ëQ¹£ÖA~¾a÷ÏnŠYµa´qõg*© ³Žô0)òÌ.…#´‰åèQ³1nOotÛÕ åEmCUÿ|ÜâQÈE}"öOmR–u^À”EdHýFW Ô5†§G»­ÿ]ÜR<ïÖ»’R´ÅßWn`*ëÌt1¢‚’]–ÒÛ8wp¢íëW*ÝÒ«-m¨ïq6 »ÄNËtß]ˆ³áô ¦5Æi¬|¸A„7xLe*JœnÖ æÁÊÒ2hƒ{Ü=¢çqT6œÑ+ʱ½ʳ̾žÍbÏßc*8ñ:×Ë.õ‡õÒã—¢VF=„͸Lôà 딿>@í§Ë9PCVzÀŒééZ„@[äÌ4»(u[>£Óÿm#s§¬‰ÓO?I¯÷š1 ²{ëÁæŠð'·#oÐö~’ÀoçB%1¡§òoË‚_­R)Ý˾À•ÆÚ!™¥Èî/ŽÌ+dŽÉóz|.'5¶Ä2t³/3­u ÌP<ÊÐ0xÏ­W9Å`$⣺7&ù„B¥Àÿus•¯^Ró¾ íiãê™)ì«w2™ÎdÄÿJù¯_aÞCv1ò~~‡É¿§­[$wÞ)[Ñä(˜²¿Ë{6gëÌ?…E×uE@C¸ðô‡_ÇpÒtuBõ ‡Á™ìd×iÏíøõÃ{ÙSbÅþÄ(ÙF+=›ÍSéLŽrkw­B°Š‡G1ÁWÃ(þ™pt(ÀŠûqŠæó¨•0›+(ßoél!øÊßg3ú¢`4°m†àë¤5-–ê7qÉêÚ¯MÇæÐþ¦«1Ê+S0±‚ÕQuKÖÉp‚f¤Ÿ¢Rqõ˜û= GtÌÝ«ÓOË$Óûvà‡ë Ó©×<[©ëlH¿§53\·Ui!<ýÒßä1'ÅÞGÓL:±HÛ|ó È}/ÚG}¼¥/lÅ@v7’¸ÕV·Áìƒo´»7.ƒ¬¯ŽÙ¢*œÝÅA 7ò2û[CR|ZM<–gý–ŸÎ;á~J’„ˆg¶™léoVhôÍò…ñ¨l>IÞhšù•«¼´Øƒ´íÔî郭Ä;ŧ\rsa%òéšuJÆ$B•!oW:…ÍÓJʪ·ú½zôS9"v\ο'ýßöÛ"ÎïÀ†/zï1xÌÃã­K”È>Þ¦ŽnI逗^_mùÒç9JE4ŒY*,.sÓöƒ]Hþ Òpü‘Â0´é^ħž]×­i¬¬ùª‡Ö‚JÕv‚aÒ¸ÞÌ‹+}ôü;Ü5î³?èn‰ 2T€Ä[16ébÏØÞh®LÝÐð<2¼eXúê(†š¶CºPe[E¸lSή#|ìM°ÚæŠÝÁ5eöN¼vÑI:mBöü²l9#¿ü'¦Z½*íX‡žûQ«"ÉÌ5ìH:œ®ži Ý»)2î÷TŸ—/¿Qcó H…ŸbS!œ}±kÊ2}Õ§B%®—Ö·Ì¿x„ЉoV)è-ùЖ§4tCË Õ#{ÑSß;ÌZ@-WÕc ỞºŽùöžéò\â·Ç¶ .ÚË#£°9Tßvçïz*/ûퟄø“6ʈyÃçÈÒ¼õMöýãgFâÐ6ÆæÆTHÃÌ’´f »fŸÔ¾xq«kî¶›¶Ô$>MN€M†µÖðßçãücÍùÓ4¦Á€ÿ…[šP/¬µ¬%q:.xÔŒÄ(>5’ÃAsg.×/T4•ôTÎOQá%F-'-÷‚5­:1yó äzÈ”µ,º¦hIÐgyÒþäÏæn6pÔKš"FOCF]MfqÜwFÈ —i»[°šÍWT9ˆÏAºÕóãÛh#ªnZQ¶·lB§@ÿdp’4Ø3±5šD5êÍ‹°Ýã}‡ÍIôS-Ç-(žÙ]ôî¼½Öþè8‹ó ÐkTZ˜¬0Öemhx ÷N‚¶T]¦)Èu&§2Bà.Ñ^^dö¤…"Äõ´4tîTr¨Æ‡ñH‚vòqY—vÌDaQZ†¯2žWŸ¿£!ÜMŠ¡nìå!±¯§a£ASñžfJåˆÉ„qúÜiƒ›’P_‚±ß=1@mM¥ ±–g}Ù4;‰¤ÃášìÇ!»Êì?Èîe›î•ËÖ–¬ÊÝß7öefz(*”RñˆŽœ£Ò K;\]J4ár>zÀû‘-ŧ´?’€¹~ à–³Tæ>Ô þµ¶zdÒHÄ|@0™±|!‚ð` ìã5Ÿ.ˆ¼½È¸Â8›Þ&ÓDàÚÖì8UÚó¡6]ù ~ 7²ëKÏLÃvéY}Ñë»õH¦=w§:®ñn[Z–ÅP­‹ökg%ƒ==(ú HŸ/à²å>Vç‘bò(ž”¦we¦ð†[ùÒGI)¦²X†KŸŸq`t¥yœGLˆ|Õld ÈÇÊûAí¯ä^‰²G² ,;Ä\r¡©¿ÑqBwlcöjû”‹qEy ¾·ØRª”gñ2‡‹”­ð«P—j–ÙQÅ)¨b¸M¥_.u&œ±)Œt;ù„ê©Ût›Øù‘™¨CÌÀrò¸7õÕº±èmMî»T§¹Îu@‚7d„q»Jø­©Ã@Ò(_)ß”ÕÜû›êÉ€Qç;ø¥•Æ^ :’jÞr„!p[<\qï®1CÁÊÝ aEá‰d˦í–nT ì3Ý 'Ñ6"œÜZ1œ!wÖ´=qÜþÉ\»Ä4GèaÌçhô;l'M±ÄnæÇ':…&G\Y‡žï‹iÒW´"8_@ÙUK?+À¬!ZЦ­'ËÅ?ô‚-ãw³üuyœ)£dŠ‚ž’ô.òÁPÑÁJЈ€ÕZºöQ…ˆ=À¶¹÷%·šcøzÀHïêmèbᢠ½A2Õ2# ØÒ]—à'¦_ÊxáðˆÜDŽ~MORï‡v‹hg±6#fäé-Ec´ØH’ܬU>DGLÎI „ýJ5V=UvûZÖr“g~HçK¶q×LbúÁTî_N` Î•üÌãÂkËœZ›Äz W€/Ð]™ZSM.B©s¼µPºd¥Öw £‰?Þu£xåJY¦Ì}Óé›éo8àåx´¹ý¯Ý§©¸—3ŠD>j²)€4s)P@P­·«!²ïüúGði%¦€§íÌzÁù‡>ùôœÙ‚”жíE!>òë'f+ÀN„röߌŸ<>B͉dËžµJÁD$ÅýІմðÚ“¬ð7Ñþ¡ÀŽvó7‡Üôž]„¤š $C{)‹·ðüS×–ClׇVû¼V}¤·»OrâåÔˆb³ ­B@éì)×òpÀõZå šóÈ7³@Œ»G¼R‘9d.Ëxj4OH…n¿OÓ“ ç' 3þb¬L3A¬*.öè½k“!ŽÓcôxã6\v=ëð…àý ¦ÁTÜP óŽwؤž·´‹å ùƒœŸZWá¯üc";]\ް¬§)»½âuŠ»Ï·Ž+ä^àϦîœÌÍìº- ÈH„b@gt€×R¤Š@Ñ\™|AüÍ‚ó*àâiN½Ë*ˆ¥(iGé«5ÃÄ{z8Ðì¼öu‰WýÃ;ϳr‚™áɈؔXž?¾ÚŸ.Ш“5‚¹/s¦Ùó\ä¥úgåÇãe <(7Mú¶•þ}:ÕBË”y{RŸÉJF¾ñüVWçÒþ½qFŸð1?ÊŸ;È¡žmVL· ´,°ïOgãív|Z¼1Û±tCs ¥¯ãÒì«ÿ#)R* Õ­I+}[–ìäÀþ[¥Êr»9Qwš!µ-œ6Ô$^}£ß­zœŠ7B–Ú!ˆV:“i±„Â)äûVi &¥Ç/Ò{„zÆi´'6,{$VBŽŒHWeTp¦íi5ÿYy}¼;?Ñ€M6ké¯rb’Ï”PóüØðlêàÏyõ§°-ùªV(M“ âšl@VwµŽ‡ù£ü »hS Büz¬Â{U>%":5”ÝGš•2yHFäŠ÷èb¼Ûá{4Ó»ÜÀr1ƺ —3ïG¢¥¶¢\bðãÛZd'Sf±lñ¥z±šà ‘8Äį3¢!˜?Î[%("¬jÍûj=Ávɰg3´íóäîfÏäÍß\þ¶ÏWLFš<Ò$f§ ®4Ø™3[ÊÈìÀÖ9Üʼn¯WïÖg«f”¦ïšÅK*‚þÍIé–­PCÜxǦ•Q NèzŒ[#ÑîÓƒÅWæÎA¯­7ò œS¿˜Û¨žúã oIæzm¬ŽúKsvå,ˆxYÛYs¾*VýМKwÓn'HŠùܔԂ¾„©Q¾ŽWË6æ¥_µð½:ß¿ü°!|æƒõ¦>òêq‰Ûpž¤ú$‰I?õ%<¡T¿×‹KB†¡ÿþ>’¤æ÷‘…•§§GT»ô•ÌÌâoƒÓ=KtÕÆ0S…\ÎY«Ü rR3T§‘“/™$FZþ¬Œò¢n¼UŒ«{°Y‰W¾€]Œf:/í%9¦*¯;{ GY“¾e‡ïYûW穞[mRÁ€H|¢i¤ÜÏ)Ø]^mU%;´€Š0ÉyÒ=l ÅÏ+‰c©—ÒØþƒÐ ZíIÞ9Mþ}6B?,@ïÀ²#ç_°ä@Â0‰}¼ElI©rïÞÝ8ðçíïI Ö ,55‡D*«‰ Ò„#Zò{•¦µ¾WnpX´ÓäËw“^wz)v·q yJé-D£xé³OuŒáþÖr½±±Ÿ¤óV€g¼üzWKKôB>wØ8àXñ­H Îô.°½Ê¾¼ªV·ÛŒ41%ÈÎLkxЗGW§·CRc{?“”­\ueB?S~wÊØWh¹Ñ<'C^N8^íb¤ôªü„¼Œñà.Ãþ¥Û%jÖ"U`Ó¹eš×9…õq‚T²þ•§¥ Ìâ >r£dpÀPôÚïÒAP† yzwö{}+6[Ší6GSãÐ+‹CrÀͤ‹×ëPw«)´¥¬£“ú …Øý]=RnTÝa@¬q^8Ï`ï@×çB™5·7U1á2ÏOi«öõÂ¥x¬`áø: V{ÄY¦Ÿ‘Cìeq€Æ.°oº]>L‹Ô,Í’/Å'–É üWÊöZ2‹Û<»Μ öB›¡¿OPÅ߀òÞŽw…tŒ馄1…cºî˜v‡¯c^nƒoT7o©žiè‹©nw„ÖK\c\,7Ùm2Çâ4Ï5A¢Ÿ®f;b°ºS°]¶³$šžN‹Û3m=]Q­N‘ag…Bi#ÀÍkeò;ªmgÇä²v¯.[qlü+ùJ²³¼á’Œ2I— Útª®Úãß⯳ð¹ *„4ýÍxìv8rˆ{˺¥½!XM)ìÆl‰^üïãIV…©,É›÷‰Š¢H‰j¤âó{‰ }UqoCjW8ÝŠ=‹*ö*s-dØåiëÔ˜°Sb•ü ¿4Eàµî"þ~QýÀú¸ª3õßLEå+;BsÈŠ.æõ“¨Œè½vìO×n3éd¸°Ï]°†ƒ€,ͯö¿ÃÀrÙ%[‚¢žBE”½^ÀÒŰ–¦w/Þšvy£_²¢%И( r…h«2·}:6)¶ÖzäXSO÷\i±ƒÿÔÒcž.•Xw’2NOL̹ï •Tõ¥c3ûeÁÊSuÍRáO¼DȬõ;¾Úså$-™ƒßºÛHS˜é•n»j€ô6êð¥úgÝ›µB!>ÊÞ³{ÛOl¸°ô«UÂ,2hà €ÃeÛøß ëïÜå0KSr „†îë©åT€»v²Ï&Þ»¢×E+”O.®~åä0ôwΟ 6ü¼V.>k´?CXÉND¤È¦ö'}± ‹OlœXñ¶ã'³™ªÚ^Ǧpa©¿îÙý§Á ­ÃìTYÏ;ǃ’0ê\iSÔ;( ŸXe d£1Zñ*Aë÷¯ŒãH¡¢Øý'þ!vVCCMm}ÕÛT*ûδuä÷øt«en0«Šš¨yú(Ig+œ»×ÓÿP‡¢ÕË2٫쩽Yßc—ü'Dvíw?š¬O$s=Å©bÐK¬G:ÜQ,ýÂFr.ÐMõR«ÉÌZ×”EçøÎs Z»ÇŽ:½Ü Ÿœª§?2¨Š‡G–.–ÍŠòP!ËȤwÃfû¾ò1A³y¬l4a¹JCá"Éó¢ý½*þÞÃ1;XùÕßoV¿Ã¼lCäi‘'ðê{øv°øßo”Agù»®!úÑõ—Zvy‘«Zë“SË]šx3 ë·ªˆØ iøPo¼<§nàýñtñF™€_X)«åI _÷wÁ#©hÇÔÀá‘lJxÓbòÇòH#$ݾâÖys41MÒ¼?Š­ ´‚n;hå¤-ógsqÌZ5`]4°ë]0Ê¿˜,ÞÀ E«mí[6„9»9àâ£_,M¦¶ù-òÀ'G§|ŠêÍü®‡GsøäÜ‚c6èùjjzwº‰¹9üEHjq#&¶w‡¤ *óSnjGeªÒd<åR=Ñ|1 d¯ë kwžËqÏYF~CJ„ýúÇú$+ÃØµÌ7^k¾QBgè }u³Øì'D·²MöHü…Ùª³cÜ~N ˜žð &áÒ>7ŸK$KsOo0¶o¤‰ÙšáT‹m{€ÞXsñWíO’s+úáMu#ze$ôi–­°~qÀe·“³LdOÇoB`Ž/ôΓÓÝŒQ«‚¹¯‚…‹ãÁlÌQ޵˜x¼hÍ5¾â_Iî¬4mB­Éâ Ü =ïs´ÍØÕò‹r«ƒùÀ4«m4 Qi'‘ w?…Ç$·¼ˆèùÅJÊê¾2dÎéŸwEÌ ¢ÞWÔ.µŽ&ç¨ÛQÈ´#”AO,'ñb…࣋ .–"ò‰¶»3êojJm²†÷¥,:Xaê,t½.¡ÑuH)yN°:eÛôb±kÛ/³§Ððáù=9KGªâ!GÃDö%³lÇùvwǨ?»äüPù` \c5Ì¿ˆ1{ê/8 O[L=c!A(Ù´…ÝtjÅî˜SKx¾^5—Œ16©mÉ|ý]U ¼KmlÜ«m,f”q]ü— ßïš"•׃ðª®Ið0ÝFjuþ´ü%óŽS­8B…[²»CßmhN+”í 7\åd FSî¿Ô d„½Üó».?Ö]q±óíú¹ÿt7IfÅD02šÌ_ßÁ’lÉ¥Ó*húÆWÜnŽØAT‚2¼U øb“ÙÇË3@ú›ŒäN>tÏFìÙäë÷%äf&i¬¦ù-€]{' žžy ]©aq¡<ªq”f"-[è³FénÿVœvÈ’OK€û»’ïO/·éêcú(ÀwJÙ¬A†îżLÊE„ösǬ(†×]îOfŒ’ÑßWê~å?? ›ƒŠÍ‡^öhç ·\°˜ ¥˜ŒÑ§øµÖpRiãIÂMI­ø2“¡|cfÕʵÊ`ŽF9ØkaQF#v.ëèUèoŸˆ‘Öª&*¤X!ÉÔ Gsó3æÎª´“ˆgÙ×ð= ú5 pÏH©‰jãæ}ŸÈ—€íöMìRÏÍé lLäïSdíþ§eC?½uð6[;lr+‰UV_A¤þŽÀR›={ÖöÛeËæ4DIÒ]MÙPœ1ñx„ÑéâáIzšß‰;¸ù³ðƒ­ÂbŽ epM¼S%8ºÊgÊX^#f‚xTÉì¤õQÛ’Í!¶«±VHÙ‹6 ç5Â]ß»Ùå§Í q¥HðÏŸ<®À’oÒá[ ÿ !35’©O›$VŒo>˜…¢"É¡šÙÈõŶó¦ô˰Bz)𔾅þ¥’HOõgÕÄ!?çÀ35~;ɵö8 šáãX°lè(“Àr®¶dûuþH\=¹Yâ¾êRB¬œfF?ëÈHf±PÝ È2åz4u$WÒõ¸tª*ߦAbt « þ‰«Å‡©ƒ€ÃéÇ£-ŠÈsøˆè[¾W6ÐûLi<Á02ºJL|>вˆ\Ö—2}ìÙ¦*&šÄŸ„¤ÈÊŸnÇÃ3øVKP:m;àkXrͺÄ2ß´—ÛÓ0‚tþ˜˜ Å&A«tšÊ—à÷ïp¦´°<ˆMíÔ/­Qô-ÿt×?Þé6ôpäïP½“yWòô5L  c‘šÔì<+yûÝ:Ôªàÿ|`²yý¼i°tžCNÌí_›p×*M°•hg/îØaýÚœ½hï/0Ƥ/‚À¢(”VÜCA,ÐÄQäÉóà)vWCà½VCÊÀrõÅ3Üiíhˆó·ÀEG4ßè¯1ÉÁ¤SDÇ9Ôm2Þ‰±²ŒLRX; ®ŸÈ0Æ!Ã@s^ÏÅÿ3Ë×ÿ-~cСJhðµAw ØÖ[Ç»GŒ½$,(k‘ 2d “mù7¹Ð¹5ÐG" W Þþ–¼jž¢}¤€Ä‹/:ÁaqÈç”Ì´-$ÝUö„ä’´fÔn|ÞûB£:2n‹¿8¼Ì‘g1CûŒÂ+ÔwŸmå™ìD£Ì;¹ðÔCêýÀ%zbѹx¶ÊËC;ÿ''úÙÅzH[Qˆ Âs}ŸDV1íÜõ #(tQS!ÓŒ­{T9³Ö ?Цù6J«Cý›ŠíÇ8ýpTH1ÄEh½°<Äe?ø‘å¶x¸[,ÕÄT@Õº¨ö)TÈU¤×žä‘J`n#q7En³v×ÉÁw¬sÓ¿Yô¾ êÈñ„kO‰µÄ¿a#_B=М‡)o$ŸâŒÖ'{ ñ¨ù8¬ô½n"Sõ½c‘JúSoL.¹ZüêZ k—ýï‰( )“u.4×FúEEx7mi—âåp^Ãr ¿_ Um¥GKÙé[SÕ I—ây UuX‹¼-¢YøC_ÞÉ-!¸Ñ9CÓ‡ej´´ˆÀ8É¥Åoøë»HîôM *›íÿu°Q~½Ï«JBãÕÏ[7A„xXá1-[£u¾61ô¾Cç­îH¨‰ÙNyÐE¬ZÊáˆU÷ð3‹ƒŽð¼ñ’æn¦ã úɃö›e€¬NI0+Œà'HvqÆë%5ÿ[¶ B`§¿ŠÅbÌ>|:z;¿¹júñü° ’O'„€$“¦óvBºCéš)ö5!Ag¶A îÎgV¹Êå“ÿ‚;”FÔ©m!GtΕƒþž_»ékƒæ¬k3R2!° )¯q+ÌÿQ’6¥hR˜=f_+ü)Øó7Ø/ìcÚò'¾ïÈŠˆÖaßô”îCh‰ D4KøN¹1ðZÃX¼PÓÆ÷vŒ¢òç#Nt®šS¶T!…T™éu±¦q%‹[úÑ0Þ}iy›í ÷{ ªeLœxÄ‹rð²š\¶û|C¹§‡§EmKÂTòØælø…p-‘…ÍPE|!M,‡_OaçÌ#™ÀÉõážSI`/©¡ž’š5ó8ü[õuÝ£lß?´ªøS”QøòEÉ1^*ïÞž®(çP¹_ *CPËÐçí´”¥9Ö/•屸*%a[¸#Ò‰EêHô•¯×Î6=9›v»nlb/`LÎí2ÞâûŶ"Ê—ú{ÜäjŒGèÒ_÷&öÄ¡‚ö—ypð §zJQ¨ý¸ ~ÉÁ‰2D'ºÛ=#J‰æ@Mº xLºAQÀR¿éf: „UÀ[•"O>/`V'¡ƒ©[³Wª¨Wkf’¿‘ô.s³Eù欵,‹M©8Áš×ø8 üæ3ÈjŠÏÁìf@y­³C”˜ÉÐ4?ñívÕåpn4G­E1ÊÂ_LxÃÎ^‚º ¾äH÷…'NÑb»36¢{œƒÕ½ÌÝØ”ôŽôظÆa›bNðå: “¼BMÑÕÛë¾G¡ ¹Ý¢[Sú!Ð’ÜAw¥±0Øäs# æiܬôè&àÛÜsátwßëAa× ü[f£¤ªES \[€Ü…–ÞŽ.Ö`b{Uϰ‹AÝ£Ñ|¢ry¡—öbǶ‰#wƒ@â„pKrÇ1ˆ3EŠÿ¿HÓ~§cD‚sNÉ7ƒÜ)¹Á_ØÁÊ…˜Mkaɘ9LpÒ?}=Dزã ÷ó5ÔP(ð%•4Æ?1¦ËÉè ãVqÅL¤]cжÚÐþ’õ;eB¡Mí×§r„æî[XÄ»Œ}‘² Ô»ÈÚÂ/ìí3Y`€ž;º#5k’ïR0eÜ+é¬S¨ƒ>ÁÖK‰Ý¦[®SŽÅyJíüš<\ÜY¦G ±é2qqt5˜ƒ{R âB§»b`úÖ]ƒEÎh›@ ÔV2¬*¥ív±4+pžÞ±ðM<š¥6U“ê)H× ƒõ§Ñùý³)…aj÷ã†ßqu›ý3ü~ßúëÀ¦wuÜÖ7nèÜËM'2B@­Ð_£jtyéTÞ±¾h’Õ-CÁ3%Ô6 ­Íõ7º c’vì }5!d=ˆ:ú~à„¯kÃjóJŽøc´3M„W”" @à)8À2þëK×oeċ⳶óâUæZ'º>+ ‚ÅIz±2Wtì˜.Óf6=¤¯RóTE/9o• Ä`Õô—6ü³D§¸ì=ôFa^$!‚‹å~hìî6q³DûSµ+iºWåûÜï–Õ9q¹“¯MO— æ2µ–ÙøY ñgORÒ8è%Oæeƒ M½Ë—Goà·A2iœÝAcÂ-Ð?ºâgæÂS{rÀ‚|àñ}Û›QXãìùiöE»2åÐ% ÷¨ôi¾ûî’ú€âœÊy(†{]Q­Ûèô]"-Û¼¯n§ô·7¥QzŒt>ê#í$7½·wR¿Z–¾Va0½,»æ¨2–즓±Ü²|ÿZáUÏ;TÉ„”U^ÍlVi _‚Áû{ü°Ö{q±·@™q®nQÚEhjPˆÓÝýen@Þ$´¦€ r.†ø½§;eñÖ±©ù]Ö‹½˜¬Ø5ÜŒ˜®G»õÎ&à (C ŠÌÞ¦8‰ÉC&ªp_¢öøÓQn?4I€*·âÁq8mÓMÍoEÐåk|óP§P{Zýñ5©}¶£dp¦È´pvXìÖÁŠû!H* ™žBï(SŸ NÛéºc¬|$µ „„ÃPɾW|²“ÑAì][ÎÇμööêyìop<»êu@Ä)çYfÒ‚}pÕ‰²tý¹ˆÐØuÈ%憗î˜JWáa‡I² ¸¬ï²™Ö'ŸÑ»KÃÆZU¦;‹°ÍJs]>kBIØúþ/ <8§äNê:ÅBUК¤ŽÁysËʧ¹z w2Å9”˜ÎW­v-öñÞ4zzoÙvwÙ†¶©A HªI„mÈ †0”,cRê5ÊÄEµŽZss¾šNáû˜â û0—73Æô>"ö¬Rj ÑJ‘*AcÅõÚ?csÈz÷¯ ïIJ‚OJüŒº&ëé²; ø\9Žíj~K…:TÝa»’C>P†Œçf&¸›«Âì¦_-î.²»D-²JMÒ¼w°UD; Ë7.½êûöœ29Y¬Rtd¯Ä}ædÒü,xž›¹d ´ÒVÂõ)4TÝ»'((ÑñŠÿM”ºi7Áåì‰×lïËÜÌÌ`Ø,î!!xÐ!³»GÌû2µfkÎR³ÙSjöõ¶0ƒ¿ô±©r»{–QbÈÙV÷/ý¿AÑÙ1k â‰}بÔÕªúQŽòH‘;4ØY'[úƒ»1 üüÑ) Ô”AâÕ^Ö?ø‡­²<¦ÿMáŒ<+MQ€¯^´!R¸£×s«Ö5Ø)¥ßHð¡sL˜nž=©‡B­Õ4ð &ä L–šå'hŒÊåhvÐÜQÂhm»"ìG² T¥)º>V{È“% ÂÑXÊ‹zTYÖ.fXãné× Ö¬J’a,7C/¸V®‹èfÔW¹öÁþ‘uO|kxšŠ^yáä@år®2™èˆ²Û`3ÇýËIc(˜U³:Õr2;i;ùÄÇémtw¡ÀÕ“áNªâËÐ ˜è»¥tìŽ×½ñô¼îÀ ?eñþO9“ü×ÈS1:Â2OÄ bEıÜF,Vß TÛC¬„­8ªL,A0DëøËËâÌ!2% øù¯‰ý/v¥Ce6Xd|ôe)û´´jA\;ç…c‡1R¦5sûʶqð‚ K šöíYU« ² ser{• í]hŸSòµ/a ¬êƒ*s\Çœ”*3é ‚ ¯›¢ú…¥;_€'Sü ­u[îCWº²Ïe¦w°¨êÜTê\k†ÎÃ’ä4þù¦Baå¾·MM0NÁÿ àõÅ,¥U0DúA;BZqÜ®z÷bY¿jAü:sÌLy_¾v¥Ý•¸ððrÉIÉf•„„u4àÂC(g¬Î4VgÎÈã/âcA^ëÕà›{ùâ>òƒ¥â±mšp£ Ï^ìè­G ‰ÑbÜÁ.ê60z.±W®h~uIš½Yðõ;äÛ{›;Ÿ0çÂV]kôl=Mfïƪy²ÝØZ.½Ÿ;ÛúrG]ž6aÑ}¦"ØoTWÆÀÂn®ºþC¡íø—7 g¥/NJ9F4ä¡‚ØÂì;_wiyŸ‘óMÝž@P[mÌ5xà( ²; |?Û$x'a-Ïò&QòV«QáámwÞ2%Yîý»J¤~ÉþEö^.SÓõÒöŒ4Š1˜3Ú<`ïBlÞ›3•XKš™«ù|s4 ebœïnäæîS42µö0W op9Uq‚ïÙØ*¹¾›««xË[)"1©1Û]#¤î­t¨»²884ˆtp7Lßx1Ðy¥¿QSä`ìŸ?E¹²ØßLš¶•½5صü«HcMk½+=l’[,õÍ3‰ô«ÃEFvÉfÒà~*Õ¨ñ¼ÔöE@nÁ†AðØóÛËî$\)0O¦9³™ÿ9£ø]¡[KÐU犬ªá‹0‡çº!ª$¯TÚèƒ|4qœ«>Nu²˜¦ƒÜæô•Vô€•«M—ëçôêcc 3©{®5àoT;:´ Ê :‹›ÛÏi‡¤TÁUˆŸâJä7ÍÖQ²6fLzò 3ÀgTK†Ñ8Õ e±X‰¤Ž1äBš×[øWÈ!\‘úkŒàÚsµ?£½N$€çÉ¢âÝ+Œ5zòÍšÁB% SÒ¼`QÂDR}Ùï…ä¥Å^kÄ®}ÂàÎ1£+S-?†D¿BXü°³™¦Ä¶Uür“Vw>Ô˜°kì¼ûc1鹩1õÙg³õ`ÿ…2w>=CeY‡uœ€¹Í¶xVäF‰Î  ¤Ð`0ý;:ù3 fæãmŒ1óˆuº =A·t0£?B Ånž:$bÃò¾m•)G”ûâ:/}×÷!v>ƒ‰3~ƒ)…$U߀8÷@‡ð¶Ð¡_(WYÙÆL$^m¢­È˜CÉÖ–Ó› àÿµðø6T¬Üoî·æ‘}¶!ëè±ÿ0þV¢/Â}1BAÈÜ ' tC;hLžÏù(ªŸ…+ü#(®q&ÃuÈ$ýkþ}L-ÓSÎëIfR´Þ[ì“Ç´¹*џΉ¡þň;ERòq¼`²¹à†v›3O±˜Öé 4Xµ/s¥à¥Pꦒl¯ 9k X¡-#ìC…FqF&þðLW§|À|Þ¬=…³Êe:Ï0ùŸÄ[ŸÁî¥éÖÛ!s¼R|8ÎîVMñƒéóO «I}°«ÑRªVÊëƒ×»ÿU|-©KÒA‰ãÕÉå¦Õ¹ú/TÒ“”Ìt.æà=1yô¶IºéQ$ºÝ¥–nÔ—ÇõIÇVð¾Ç2Ž\ʈ‹hºÞµí8îDÀ"N¸•¬ˆ¬‹õA ¢z=»¿5à…™OX>Bf¥kWªþa†v(]„T»ûn[$Š˜pÛ›x5»¼š{$[é´H̸fÉàÎ)œ¸t½j¦æ¤&-)OâØöÅyTÀ‚™»­å@¤\¦`d„Å0m–ýôJÔö¬Ë¥&Á ZuN–™Rl‚®ÍZÂ¥pAÔѰávÅ;>v4î[_; ÝA~Ñ¢!ÎbPÀéHHy; ÚLPu—D„í9úƒR-4‰Ì· ¬¡‰0 È4Û=ŒêæÙòÃX¬$~´¥|úqù}È@µ;ª˜‚‘@·q /Êh7Ñ¡¯éVè« †›Ù|mÎR.|°zHo¿ð 7âs.³7ªä9p¼C€\Øl±Öºç™l!tßóªn±ÑW?-U¥H…ư{xјUí«„ƒð§ FíZ#Øß­ÈIÍxƒŽ$¦?#4€0Ô—kßq;Ñ:k(¿J63öÖØ7âÚ{ "„ ¿ÌÆâ̳SœäRzáPÌK §–—+±vÔ¯}sÅû ˆÇzU@«F§ ˜?’+¯B˜‰HŠ÷J¿ѼBÇ“!§´ŠÓ+qÐwWÈ)»]…—4PïÒ­ŒÇ Â+ãü'›µ»eI휢o‚EÄÜG¥4ݵj2\m×kà)É·˜L=yA|Ü9F?ÞߟÀÒJ%¶‹w‹û\â+³˜«PÀÒ¬ç®ØG|ò 9Äm=W’Ÿ~º%‰&‡¹¹‘Q¨«ÝàKÇLÕ¹N‚Lîco³e+×ÐÊQy¸A¿L4Ëzö?ãúä¢\PZ¼`fåwðtYìÔŸBöœ‡¸Ôt11÷‚=þåŸ u°šîû§ ©G?Àzç'PNÍ ·‹Ú­Ô„(§w2[ôp» Ù:‚GApwä{pÍlÛèŽ ·×¬c³•ïR×õº‡`¢ü¼d¯µžUé ^r±A©Aðu³©V"kŒR—xÄÀ¬¬®åpa*LVñèçúÑây9ÄšÖÐmé×h¤£?zÔ~/èºÔ~ Ì_ÐÑæ§"(NJy®”œ„ÕF;¡‹¸Áo¥o§…›”&ÂËÊ(pGÙr'È> bäMÏ#cl³,”ëq"côPLØ"—ñèËUáÖ‹P}žTbñ½h§d[ú¥­÷ÚOrk~tödt/¡¼šucE*UŽí†i™áŽÞY¦kJÄCÄt׫ðWÿ:„ƒvzÎͤGfé¸n*†ÆB¨Ö ð)sáÔÃE¤Õu'·)5b¨CÁ†éÙ…•̾¨³“¯+oö˜Ôý„5@šàL“-ý{/Ð÷øV]LØgüÌ¢ç1‚ùw”ÕDT¼Gµ‰ºŒÀ¢Œ³ÓüU ͼsJ£¶K¢Ç9Œ5<sÖ#‡¤éµDüªH •°MñµVlÚÀ’ÑlƒÓ*öÜðZόҽÚZQ'Ð œëKâGHôøñã"ÉÙŽ±>j8…"wð]½~æÊ%»e·)_ôíµÑLH²epõùÒË—ç-ÒfÄÖ,sÂÄOÙ™eX ŠÙ»Üè$-ÄŽÔë£À:ùßLçÇ–Bto{ùã¬È8ˆÊ‘¬VñÐ笘²E š`nW¥[­õ1Ð(&¶¹ß´auÊtÌ„Óäg¤i/'zûÚ;Eˆ\üe»ãƒ´â-bîlsýDAxmÖ´DPMñ ®B¨môÊñ½î²Œ¾.é~Š*\¤¿A~˜il“KŠÀ<ï3³Ûç‡#\E©˜û-ÊsPQbð¶aŸ¨&žZGÆÎ¯¯Ù“¯Ö†ÿŒ¨Î;<4¾Gwö*EâÄÚðëa"Ùói °k¢bÁ ¯<¦´6O”hA³8°zBsu*‰ÀÄâr¬Çiâ<äöp^†ãúªåý±s\ ŒÎ2=ÒIqL€ O…’&Db”€åhÅPúÐx—Ó'mû©FrIWŸŽQ¹Êý -Ÿ¢Ôî¶Ä:±^Ê/Œ´†ÿg?°66ÿb$„aKæ1ã5V$òÂ>å‡ùï`„¹•¡HÍcŸœ:¦é žn ÚÞ?EÉû'‹­k¼Ká]BëÙ.ðaµð‰] N÷—ŪÄaƒ.gÈL É>³åõUB•ÓëSŠOF:ðÍR«c¾°„¬‡(¬þ¶K*D¹jŽÉyñL£‰c ÞRöþ ÉwÙr,ôÍT:®u¨Õ£È'ÕêÔAG5Žë¿ÿxˆ9¶ÂMRg·y@Íè¸ã¡!©mßËq˜c0±Þ˜ÎŒû˨…}'Ý¥¤0Êh†+THÁ.îE°yýimÖÆÃ:%'CÞ¶=u·çv£\Ó†’Ì“ò¾QAÞ‡Ç F—˜êUd`JýOOþ¬úÜ®`«ªÕº…/À ¶Épßí/»š@•¥€c‡Tªü8üïúÌNÎd¿ú2Ý(MXšíÍlyMr‹`žwâÈÍ™¬&âÁeïë±vs#Îö‚X®âÿ±i0Òâ yP9ZNwKnWýïT=°ïiM 4¬!DøÇÌ”lh¨ñ8OYì‘Ê´µb€·f&eÿ éÞÒž¹WO…¨JŠ®FßP  &SU Z?Û½¼æËï<_,+Ž•ˆk'uì–:0eüzGJVå¦#èRD¾¨‰16{sÒë–/-m”±h{ˆ…±gZ¬G§u¶çmõ[ÐÒsÇ¥qꯅêI+ÑRzAÐwa=È›/–SÆÅ_½þ¥Ã ÿ!NÖï›DNÀsŸ$µÛílØñ:Úú‘¶«'_ ìåèÝ;‰É"oþz£­ @oJ'& ©´NOk1ϹŸq¬õ1Ææl‹ÓýÛmdþ8ÃgÌLnvð[ª=aRd)£Õº‡è<”2¼‹™‹ÇœצÅO-óÛ)vñ RÑ—,\Ü8[)Ï`òéÉ`1ºª›©ôs–¹Q“cLMfÔ@Δ±ëM¸u­œžê}”éX]ÆZϸŒÄ#†%“r±ÃÂòI,ë}ÑÜ»÷‚Yd3³•/¹[%¦Xp¸¦Yú8Ù¼r{ µáþuŠ7æø±aP6#›Ç1‹>ŸaNi šó5Æ’,ú1 Û%çˆ)÷¾k*Væ‰Ã½Å¦$ÂWzæH­,q+-ˆG$–é¼®—’¦??0ý+ ò<°+ÛoGŠƒcá{6-EŽByƒN¸“ŒB¡Ÿ½GËÁéˆ4§Ï€ Îè‡Bq GZH?3q²ÉŒ+:ºøUr‹Ø.ri¡ß¾ ˆP=-¡òµÏ瀬_PÊ^ßúý\¤7¾I™ ±q==rœŒê)£óÿX{¶{zµ)¡ÉYÎcú'¼ïßþÍ£¼‡TQ;Ú÷í†#åêœn'ý=çÒ£s*Â\¸!(·”Xmw–’áp‰Æ9)-QÕ‡ TAÔ4â­Í®a$áÞT¥F6ÔOòÐíI"‰ø/‰fgUžô†G03ò˜8Xz¢¡WÔqb>¥Ã…ü½£Ë †.´°—W‚-Àþg¸«æË˜.aÿr¾˜z/§ÍÕ¹eœM>T¥ÂsÊ—¢eY¯æìpL†` áî'8¡ðL<¯ì±ýBWàÂwZÝÍDzKt&¬øÛµL¨ *Ò¾Ñxq¼q'sÅMôô›ï²{±`›óGÆ^¡±Ã‘‹‡O³º¼äKÆPJš‡›9-ÿÕ"1%[ÿoï ©L#¬).r˦Œ…JØìo Z¹ƒV·`¸kÏt@¦H5&P«3óf+(а†qQ7`?kFP¦Ó·d¦‰ç¸‡3¦ ¸÷Pq”(ò¶ìxÃyû«ÁÖ´¡_žÚqä$(Lî½ÍÃ8 ôrÅqWK¾~Ýø˜‹XÕOò'¢b†L»¼èuT½§[ï. ì€gL¾ÈP|·¶2rcÐÃÕÙ…ôH¿b¬f„‰³”îã‚~èçt ¿’BÖçà¢Q¥§*í ¼±Áæ¬`[7Ì7¼(ño™‘+]…)·xh#‰pgSäK'‹Ö—qYôÍd¯-§Ïl‘-­ÏáŸ{6/â­¤íë´]ôv)Ž©çýg‡q²´k)xÏ*gñH ³"ø¹œ]æ2íº½²¼<ýèÅ—ó§Â#omƒìÀ¯$Jz¶ƒtšUÂ.>Æ5Š˜Þ ÙîJ­Èí½Àb¶ýíµexñmíÒÉLVS½¬!.AC3HÚ­ñßÍ´=¬˜ ÿgp²I"¢à®Vï3ÜûJÏçš ¨`¸dÑæá¶i²câEˆÿi”C<§b"­Ät@"†Œ"bÁPí'†ÙÑ4Á5ÌB j >Ab-jàB:-u~ùqNŒßÅ!Gkušñ€fößò*~¯LÔ—ÌôƺÄ&絇mùéºZž&R.[èPǵ#\’¸vR=€Kå‹lS§ÔFÚ,¿$®ð°cvÉÓ–l¼”ãó6j½áîžL áQs¥1LÜY…LzUýyƒÈ9‚k:“–Nµæº“÷Ñ ì!îr²ÓïzV,oÑE½…¢³÷*0ÃÁép rMê¿M®›ºeÒP‡¨8è¯`F‘ii ªŽ‰SºÑ5ô®{… RJìØÅ|©;š¼:Â:g°QQ—¶ׯ¤ÒDÊÅ Oh礦váh¸ÑØ! uÝ·w»ä›*²˜Ä3ð0«ÿ@Ÿ·ÖškT˜ ÌDEÚE±)’ì`§p(­R&y+ï_ Ì6B-í‹kþ‹+h ¢þÆŒýþ’Éé¬?Æ_«0ù·kg ¹úWfíÔ".al7ÇÙê–{H+ˆ8äé³Ô,/ÏØ/’4PÃ\ŸkiJ¤º%ùøßlåÔ÷kñò$H¤¼•zvØæºôjL…ÁZÝéfä{·ÕÁÀï5±«I®°~ÿ^29²œ½N¹ö7¢âoÛëØHÐÞQ«‡V*TŽšºšó¹¡”ö?B”У©ТJar¸Ä‰¡y¡VKŠÚÁ¤{‡è2pÅF<Ï¢ 8Æ^üa”G4ðñ/uJɰë!N17ˆPå:0õÁã²î¹â­Ó•n(÷š¦6Î Úª~éíú„cÊ#¹ÍœÇÕóUMÐ#îvó³d”v«Äáô Sååd›Z@¢—q$üe'°€a'ІJì1*QºY–ðÑÄÀ,º¤¹à{ÓúÖëûÓå웈üÖ¹óã e9ɯüƒº¼Üýù0ççÜ O­›2ÞÐ;ˆ(®b£…r¬cšD¹T{‡4´Ý åG"o롸ÛBTuzR7MHÍ„m{L+#ËT°õÿS. ”å½×Ôã\tâ=ð›˜W5 wëùô ZûdýÖÂ8«ó)í´€¡YŸ¨ñ8*g»Ou ú˜a`-ÁÆ0Ùœ 0D‰(!¸¡žÖÍŸ¨@p™pyÙµ‘Hl1©x$2롊®‰n;å m˜=v= =ɼ*b¦ô[D<6ÌlôæM¬úö(JàÔ5ÝCçu£7Hºyì*×Õ "¤4=Å,hˆºËµÉ]˜VpI²Ó¬y9<س`Vè³Í |d2¡ŽÃ]Tû-“3Èçù€{Ø “8 …Œ™¿ *¸9ä|9ΓgGl†¼}ZþÃNdÅe$Îýomᇠ*²ôEk<ƒléccºx‘»ÉþèÑtæ¨Êiˆ_ ²…€T¥å©æó‰nºÓ«ß|9Ÿ¶ý1 ±hŸa¸Œ&Ù5Žîm°¯5Ýã:KT‘N–õL¸&ê"/=È»ð~Eå¿cIN@‰‚±’MˆÖk ¢yyÀ¡“3çŸÇº˜Sf†êíHòj¢àØ®³¾¾ñÎÕ­Ë/ù¶F‡TDƒ¸‰‘áÒ'd=¦ë|Ð ! Èò¬¹À;Ÿz©VSXŒÿCÖ­­ì’4Æ;Y(I‚ø).äoI›óœ)†ÏÑoœ½œ¹é_ë/¾Ñ÷|#Ê”gCBçßÌŠ ’Iù«B´óÔÚ%–ãX)s.dƒïé£×¦bjâ.-豈F¡h¤ü-ޏ´Ÿþ!ÖìÑ2ïýÓñÆéiš(Úês±óŽ~M2k…¼s&Èp¢¨.rš(éåËçȂ˯h™ûv!Ko…,•[z÷áxÏL†µpoŠÙGÓÐñ˜)xÆLÙ8fXŠÉÚ­³ÊÉÇæ9õü\2º¢+ÿXåOgñQÏDZñ‚J*Â2v¸”9†vãX!#j9ÐtŽ{ëž;Tj—M¿¢,a¤A­N8X£)“ˆ®øqQÓT XÇÅÀ».ÛÞdDòÈJ2<ðPsË“þŒ^Ï>¸müz†E7 €zìo³xnm¹ÇuBâœeî3êŠòN’(†ïúë¾²ìîܹŒ(g<·\÷6Ö¢© ÍqvMN|Wg)óCs¯€Ð×<·ÚðýÂ\í  qƒžO½b¢Lè J/0!q—»£UÌÇÇÜdžX‡t+õ%ù«¥À >2æ“1 rýë%ÎÔG/Œ gb%Í7 ¬ºÿa‹7œîÚà+“†éNF3@v^ÿV“ÊËLZ0±‹ÐXyJ_`k ìL!Ê–ìbã¼ð2ãWZÝïò"ãŸ6…o6œ¡L°‹Bâ/]/³Ýù,n™}ßµ´y룀cåAí$)JØ"yYò,–\’þÛÞý=«jyµjsågþã{ i‡'ë&‡QAKЧµ55X<»;šEº±Jÿd õî 6âûî"¼Å=Gè!¹){ŒPÝsô”Ì»ëNH,ú™•aî 8BÍ";p»áw¢yÓ òº²QN­GÀ”áKÞW“Ž›Gú Q‹AuŠdPÂ]GK~+ ¸Ò6B:d¿qÊ0÷€{S‹•bÕÎÿ⸠î{à²ÀÃä¶ õO†I–kfJ nJ×ÿlmVjO®‰´¨Kä×åÎQºê×("ëÛ<ÿ4]µþ­÷0OÖŠÉvï%±Ä¢Èòä%n(_Á/3Ï“?A”&due®¦ô{0Ƙ¬Q¢ÞN£Ù"8•¨ ù´Kð^^J^íìëý ÐmØ”G¯XÖa&6Ï<䫵 _ÎÉÃð³×*(¾è¡#:Âû^ÁŽÉ“1†åºÎgË‹b¸È‰g¹‚4Mƒ#ÙzÐíB?Õ=‘OËH Ý2ûyè{½$8©}±oŽYçŒ'í õ©~šz+¨Cª‰‡ýʶdb^-óñ—yó‘Pë°"Ý«:ÛÍ|kíAœÐ` °ÜÆg_Rkû^ÈO¤>˜Š„u…úðˆg³H8ÄYÄ£%ß<Çx\0[IDfáûÂsp^™º»Jé”…™€ºK`Úhçb›w÷x%(E]‡4 ez0¿åõj[†¤Ñ¢Þ7ÐÇõˆÈx¬êàl¨ÒÔåIbê{V&±MäÁEKéLïYüRÈ´³Ïeð„‚ÁœËZ)Fñ ™>ØñÔ>‚I²9–æÕQs4“û3u&f'$#ÀÕb-9þ-ºód¦øÜïKNòä…ú€\=’‰¶Vçn_ÖZÿYJš@_NTx(ØÕ©ÀÈp?ˆÌ†¦ï2¼áõH{TëkæJ¹õŠŸM»-¢qt>øÑü-ŠXQ'n$Êà|RaðЦqja¶i¯•Å-{¼Î¥°Êå±ÂuÒgHÆÝà3±\ÿZ` qÚí†ivtªa™szEWob*.öj=pZÀ©"уB–þ<‘tdß19ÈŸ\kM-~Œæœb«¾FÛëëA8µçŒ+iOàÿtlеÊÍÇíó[<(1©ûªÚKïÒ¼h#=.âÝ7‚X=PRÂ1ö¶I}:'?§Ð§tžïÜ¿–ˆJã.ƒ¶ÇOº×Œ˜KRì‰õ|îú¶ôÁç ]  ózôXtWá’,~ÖˆÙCÖ®Å_uË™™>éö’a‚U¡/Ú¡,æÊ¾z“ý¶'ãÿKô=ÊÃ<¥×Ãç7¤é| ¼••Nü,äá0S–ÄTòúö=t&–ÅáÈM8åÆëŒXü­‹K 6ÜÉÙe*Εçcë·O¢Àwd¿%©+Æ%•­%iÖ)‡kwç4KBn§ð‘€`;‚Ëy¯%¥œCGL×VùÚð˜©Àh®ß ‹3ÝpÔe‹ÛL{³4”²yFäLÍ1v´Y ¼ÀåTþC™ô§ž"ƒ•"ˆ—³B½jˆô¥§¥I» ÿmÙFã"àJ.½ðótˆTpêd8ò'ÒŸqT1Û°].ió𸦌IÀ²-C¯@€ë––aÉÚ™Öb#üp¿€:…Œg ¶Ý$áKñvKžËÓsQœÒ£X®$QÂe×ùËBŽ¢vZZ­zªZeÉÈ«.˜ëx}cCz¡ ØßvÍð¼ßLycj9îôfàú¯£¤H¬.àʆ/”è;j÷„ûÈå’Çï@á>yµÅkb”!Í+@DâQ¢ÄÒ?{‘âø–qÿòu3 7p鯠ô°Ø[2A23,( ×o²|]›fÍ®].ŠÂäÍ‘¼¶“„S,)^jbNÐ{‹¥[§¤.¾µ ûJRlU·j°á2ÌCžÝm¿&ûÞúµ2Ð])3jR×f3ªK&áÏš8ÚB2,W‚ꉭÄÜ´¤²OÇ"5÷fsMä“ÐTD€¼Ò›4vA­uuû­éO–.þÌPΜê×-”®pçƒu=³ÒØÙ°ïæýV_ýgà[¤þV¾„Fb%¼EÌÖ_ýcð—o$=aˆS0¶º@:lÝKçºBß7¾ð6ÕàÍPÞOÁÕOlÊšòÚ-îÏ)†imîÍiu}ô,X¼¿Ó׊ð{œ8âÎOý“Frôb{¼ŠKÑNœž,¸s5Ÿ%Þ–BLMàU+YT[ކ´F’f*G~­ƒŠR-Ƴ–~{Éz1­{ßÝ";¨S®À:ÁÛÛšÕÅg¨,ÝføvÉ•ð%á°rÐ(¤™ŒþyŒ^¢AËOM5¬É–6{óÏ;ÞmZ¾LÙi1ÄFb½7&Ò²N!·Ñž.BÍêÞE-Ÿ¼9êYZBS䈠Y©½Ä'zO̾Êzn~ûë6paØ-ÿ gÌç X§§.Gù”Ž °8z¶k€dyXeÌ&3çdX‘Óksèíïžø žë¤ÜÎØÕoZD™X=º¿,÷‡'|Õuªo`\òúD—ÈoÇÄ_Qàè‡=Â×Nõ4Ó¬tnÙ©4QöM&re Ãt€½L,[ù[åÖI3J£¼ë‹1þ¯EôˆÉ eU3–RÔJnÒüÐ5þ’/¸.°¶èqr†¼œ'Ï÷çPù' ¸:™Û•7 ì$ӠІt஽„ØÝˆg Ž5Ýjkç/©ú‚-_”®“™±8%m^Wž/®v:æpnp¶ôÛ¢Ý)°–Q°m‰(^DÞ†µ*ÈàFìc|µË*‹àßæ2°®a|r.a¶©˜‹(¶ò@Jjf+"´uˆ³9àä¿ñyßèRlÑ|”<'Çlû *É‹ÕúÂv•GºfšgÌŸ‚ï|>ZÇXHw`í j‚ËRêy™Mj2 ¿fSÙïa<žgó´eŠpg±’Öj ^wXÁáMä+yÐiÌ;ó«Ä°¸Ï»0ù9ášò_’žó¿à' ¾_MÅnÆ xO#­+fB×^8xHvø4¥0ÖÖr´Ø#+I¨¹æÎNjgÇi”¦]¥Ä/³<áö† –ÒÎ`h•·M9bQqŠz P…^¾«9vg²,8¹? ÒbwAí`e, C°V«Ï²}'}Þð.vç-œ"vÁh%ùs#®ZADþâ¨ôKã L 鹆ƒ)R¾ÜQ&ï@“— ±ô ¤¡võ+Wµs…<Á’ù€¼ji‰°ù—&’¿Ÿ…YãÞ—FÃS#3y¿ò1 ñÝÝÚ–¿§\¹‡Ì‹ü™â¨ŠFDGîB8 èÕ„ñPñŠø8{;šj‚]ªþ°Šw}é “^ @ë·›Új•[Ýú÷(l>ÎêLq=y ­yVL½†MúcXØXØÑÜsgm¾‚b"½äªy›#ç]möÖ â…ßÅ‘®¤ ëJsòf iXeì0 Eö‹Xý–—4“ˆT@¸šE\s¬N£þW9ZIzg½äÊ,€àá{€àìmÓ¬‘\®þ‚™“…Ã{ ˆŠ˜ ?ܽä"Ê}ŸÙ>W#§áÒ)èÔ âW¤¦íº„MêYñôáBÁ2 Iä©éîžãœ>î*÷XV‹BvöÌ´å/wɎĺvå%è¿tx¦xñ”sÐë9Êelh«Q^ÄúV±Ÿg !Õ•ÖujñÌêH[÷5ýIrƒGÝýŒ€hy, Ítõ9ft?¤å#½!¦²bœ#â6BÖ‹¦fá•ÕÙÁÿ ¶‹"Ûzãb¸8ER› 7-–ü 0˜ˆ˜ŽÔ"Ñl¬±ÒÞÿ)y×mƒ?߃$=×/—9êÉÁ Œ'7æîøïðŸæu`ˆ5àY>p”êÍì¿…@@Í:¡è%‰w` JÓ›B¸k¸NpàST¨åÆ‚.žaÆ’­ÒÄñcO«xùkA88•J9Í%0zÝÇ@Ê›ºY ·ìõ¦†Ô¢Fàt -ïÑ]VhœÿeÓä·{â£ñ{(7a7‹\×nî„ëúgÿ'!2lö‘MoÞ±g.‰ÓIøuÜ莚XÈ1”æ|‰Œ•†HêcÎU™sSÊ”ŸD Lu½­óå,æ/¤w…³|gÄF†u¹Eç'!Ö<¤<ùJ§òë»Qp’ùêòTMCXÀùÉô¡¨ù¾¸}©þó%¼tI\Û$vW uÝešGÖXÔì*›år,Û&'"ˆºÚ> ¨pàƒÇON3´3Q¸SÍ Œõš$7M—®8äZ¿Jxù9Pñ}úà>ÝáUG\2þ©:’[á±àD9ÁsKV¸Í:|}sÊJý*S!™L¤d?ôÜÇ66°â§W2홀¸¼~éÛÈgƇš 7EL©oÜÄþ[¬…Ï“Ersx’æ¼*óú $«x'%¢Ñé–-—œ$i­|4–%p°£ÊŽ!*JØ/”B'‰~ ì¬®b=íý~ü™…L¤™½gD‚À­Ü^d’Ìó~*Nx<ÀÍ2„ð@#%x?ÚÙ5§{ÂqjºÈñcoÊ…¼­ 68¸Ã¹Þ  tƒVŠÏ‰#¶P¹¾¨¥âƒŒD´/$Â^çÁÄ~Ó¶%ckÖ_¹°‰ß9o?»Vˆ n ,e7lŽÆ‰"$Ã~•üªùXbµç„®áŽ©š^ïÞ+M×еqzNUXvî·É,-Ž NÒp°Êƒ"™áÛÛÖ#s[–;¤…Ø   €°¸1#­É s~Ç ó姘ži^GnêŠLw­„FšCQZîEÿaö§¦‰¤Œq¿"HCÈ¡Ñ]€ór¢Ø½ÝrËm¹D ¿›¶ö³Rì¥NMÏÙD¢®!jyƒá~Y¢‘N¹‚-”ôÀ›E½~µu­d=¯pT£¼›,~3;+ õü ¼"< ƒÌ©%KNºŠþž“Óü A•ìÐïÀéÜÀ%(¬ê^c© ‚ï¬õ$: Ë¢…â¶çì1Åú×)>c¨.pÉÒèÝèO|W6ãb[‹¢º¢‡ž’6¶ ×\Ê£Oä(»­˜Ç*çæ|˜­Xy¦=m"ÜÂxRЧ‚¬¥/|j‡'!-ºØ^5'ÈN¦ö$:,_æE õñ)èÕžýÍG@ wЂ¶É-à=¥ªñ¾öiz…L)ú. ŠÝMfŸÞã†Ã6¶ßÐçnŒê$-Òô[,"$‘‚S.¾å?R£¼%>eÚ°ÖÅÅ+ùñD¸Óî%IQÍj]IxÈYªB¢È@~séiw $ÏûlÀj?Þë ˜Ì÷›¢§>­éjÌo¨ÐÚ!èh—¸‰éÈ6•ÜùªÂ¾Ó•\ýŠdݺÆ4%éˆJ;/¢ó9£jjÕÖÑþË~Ží<û›¤m(&öŒŽØÔEïzHX}­MÎMrèl‹¬—.>"ÏáíAÏá*Ô‚G¾‘ÖðÜ(™Übx9?á[ ÙòS°ÐoÅ©èµ?nL¦"Æßt-×Ò"^„ÔĶ¥çifUçñö.惷ðõR‡^ßÃÜ·ø{¾ÃW¿‡´§>¯cOáìoü;WþµìᢹŸàÑü=_á×çðõZþÙðÓÏáë Ï«×;øzâÿd_ÃÙ·øwü5'3~ ?ÏÓ´¯ÃÔ»ùûkïá§ßÃÔKCäú2ÿªgðë·øzŽÿS_ÃB@öÌPàe®º(䨴¡ð!Y&,©}Z ñÂ~½¼Äõ ø§9ç·Qˆí7ï Ûz¸Üz` ×é7ðóû1ØFgd_/×µÐÂÍyèŠ 4`Æ™ñ2[ÎlR&šˤŽdJˆR*üz«F퇙÷:]U?Q™@æ9 û¶:N­i.©î#ÿõí(`gõÓxþõ»kL^éB£Ù}n2åáãsÍá˜DI¨„T ¯t(ƒU¿tfŸ»Þ/· ­ŽU¸§bäß-­î sõøDz åD!aFÙªQ÷ EË…­âÑæuŒ"·šuí+}Æ•.yí–×£*ÐÈ/Kw™o|U©WJ¤åW1ð qNâÝÔü_†K¨ßFS2ÒPsß×˶®•‘»óœD@Ž ›S¡ ‘“DH›üï`½T}Ýf5DܦÚ!>¡Â7õ„ýnä°²Íûvj6Ðuu0¬!FY¾±x=ìõï¿Ö-™O:|d\k?Ÿ1ùŠÓû²’!}e˜8™â2< ¬Ù¿o­é_e‹H{GÝ™ Búù€ÓÞ1 ·É­ÿOŸ&bö¹'ß~»á –Fº´{¼Þ(GG°Å«e ŠODa2þDÍ2\z×c÷VENí¤ÖpB…v¢NúÞaC{Jró™ªH`][‰aŽ¡šÇ¦³åsû®ÚšvÖ"¦ÈïžÖq+ágÔ4‘f­¬6?ðö^ J0l€ÎÒÿ)ÑbƒªVZúߡщ‚ýÿR]‹¸7 ‹æÕ_LG”l¾vbº ¸´1xR8”yQ¼ÙðJé£ùf¬$:¯ ¸Ið©ÎÑݸ´½Ö¯¥C”ƒŠs3þ$½§ 4$×jXÔk“0ANöHoˆQœªÿôjšýä÷ˆê ëH¾.)÷¤¼Âjœå¾µ Cs¡7ÒàC–þ‡±æ#Ÿ¥;Yª6%5+0íPÒQsÓ‘h3 ÓÕthi!ç= ]êñE·ó4lžÓLD øŠ›¾ß™‡átSvQ60,:1ôlã^"¾Á"ÏÕ¨‚^˜/¯¾™²oplARC¤ãBjwÕcŒó•‹¢åN©6ݽ³»$@mBåº,ª)‚° +OÉÍk:qÀ°šø=%êx]®„ ¸ô!§ïùÆdAœëÞ ›Éîü^æ±s+ï†ÂC/ø¾z5+ýõsm|±ËÅtlÞr_ò< ßšG1R‹p6‹»ŸË,Ù• wÿU™½0Oc¶µbÓ8¾µÎuûÞþ˜uµ¨…ÌØ PñImL¯84ÚDEÚ4«2Ó2zdíj˜À^š¯®ËàÐÜÝCõrSÎÌŽÊg—m†Æ( ÓéŽw¼y¿Ä[›çX1@Ú˜N­-þ½Æ ޳e•“¦P†:Ñût>0bd;â“:³¿¹:!|À Ú/0AE+ùKt\$™%èg‹Ãü9Ì ûü `TšŽ]uWes¹¹ó6T%šê@nU¬„ @t(oû%ygfwE’†/uÇ*}XcÒë rŽŽÚ}y¨¢Z+´EÃefR‰ÙðéfeŸ™éM Z9Þ"¢a%¨ˆðOyºF”ª)+[ò–b.û¬Ò 7Hì¨áéTÄër|þ©X#€Ûµ™ õûN´ÕÅ8qÖ”í^b¼hLü@—e±“ÉC9Ñî´Dì÷¦±žd+ûaâ–Ù»!)ý8þmö]ø;؆N=ÒíëÏaö”4ìÁ%òYÖGz½‚ø\aʉ31–‹Ÿ²sIqò· ¼Šê¸*à gà u•‹Õ•1’Åð`a¾…† Oÿ^oT;0V)Ý®z²lpmÛPÚ»t]ÏPÜÇ©‰ÀÚ^´µ'›® A¾«áaW f—¨:/"2r2›­B4ç]wZfHF©fGðCvqÆ#—hžèÒ¥-7ÂqÞE¸wXÑ–ñéÚú»,þ$åãC=e òÌ.Ó Õìõé£Ýùú>lÉ|ù9˜ö~™«2¡û¨ÇÊ„«éÛ†t†˜Þ ݺ@\(MÄ<…ÒžŽrŽ]ÔJUÔ—Î/аQð›ò‡çì…®/Èõ3!w˜Kïïìƒ 0¼¯†¿³ÐßKÒ=Mœ´¶m0j3¾(uþ6 .n‡¤j¤à™‘AèiÙãwÂÞܤ¸Èë»ÍuäϻŎŠë>Ÿ1CH`%«‰˜ø|¶CÙúB½Qš¼D{½}‘Ü «_ûk5–ŸN4ŸñTÜ£¾$1¸0x[ºÂ< ™´eÒúŒç‰³/åòtœG` Ðl»²%¤¥:ì±ÇlàL–hbŠ Œá¨áF‡•‰*t™Å~Ôæ*êç‚t³‚ð>’h¨MrÒ…ÀÍi‹MËN¡âÛo’A—ÀëüÅË0"3ü—áá¢G"Güi+w4ûUÛtÍ“ª×VÛIR‘t›tmRÞ}W‘…í܇蛥2™ÆÔ†ì‘c{–&¡ÀBÇ:ú±Ípí ‹–Mfåþ5Žä1%há Ž¬Ÿ gK¢–¶vî…µÍO&7M4¿¾ð7èÙÿ;«{ŠEú„h$¨ÒþÕièÒÀpšxn×t)Ì)#õW$ù³”NyÒ”¦êˆKæóWôaÍÐÂø_6(*ëKlaèæUüŸçnÙuRÝòH¿‹¨RnÛý8ªg—™pȃk¦X«ï <Ó×¹…øÚç=ò†þ5âvãìà٬Ќ¶¾”# ‹öøÂäÔ{Yù8iA|„ƒ°ÛrÝ‘T>q¤ iÑ#*Ë»'¦Øo«‰r?yÂz Ôût+…Åxy^nÅ-åmdª¾Å)T}õ³òåØÿ)«xýÜdêUé>çÊ2™ ÖQ—¬ggŒ{g±QØKúyk’Š d°ÿ½÷Ù!ØزI/Ió3÷D°M ï+ åªÜþº0¿ú)åïf±¯‘y©\ЬÌìÂáù2”Ívv5¡"€€§ªêv¾¥àhÌTÄOצЩ°>Öóó%¢)I[é~«2™óTËma›,Þ½Q¥µaµ°­ÇÍìI¨£’y 77w2ˆùÎ0Dkf1ŠTž2F»1Ê2Wn[úË4ÿnr- þêëŽòÈÞ_¼F0‡î*È­0õz”lÒ‹ _€íÓ§0—V(ùÆåš1ú ýeÐB“=B­gv‰¶BNü‘<‰û`(»°4Uî— TutØö®ëpX€6«81.¯7ß^^’³>ÔYØ€Wã 4e¯®„S Ÿˆzp˜ñ¯¼"÷H[hk(±D!¥ðÐcz LÙ„‰bä’OîóvFÌ s‹1ݸnSL0ž]Ñ“7ËÎèÀdz.÷×™»Ê`ßþ:Vtê0Rq£Ó˜ðò%[:TE«,<Ñôî·‡%&ªŒànw³ð'ØÊ,¤=Ì›2#ÊÕ§®Í9 ~‹¾ˆ<]:¨Óçed¥…9É÷!â~7ù5[Ðóäðm骓{TŠ^…‰¹å½ˆÅÆGë !U‹À6£K¡Ü1Åx#PiÒ«”X‘µ¶$CVn›$Þõ²Äاé4¦Ä‹ ë\ü†0éÞžZÛ¬¥\ÝîÑÕŽè{#N„„¤ÙeÓB†c-uR}ÃMÝÛ.:Ò4d£’J%TîŒT4j¡Ó£ôQ£Æ,?¾wºÌ~õuˆ*@A©øB|œ¿.…mwìVð¡ý»˜³žDÒý· ZþM¥”¸9”·<.±Óaì©ÓÂÅæX‰Jk®év90šÙ%Ê6Þê)c¦[ ‚ë™jà¼Ãǯ=ˆEP%ÖžÏFó™Ÿzõy+æL²2‘¿ÿ%r©~6ڀȮo)UÙcÓ›#Ì•¼É]ž§ ý’ûìze7Õ°è]€nêÖ¾ÈË,—Ì_Ø(Á\< À3sDì&TÍ=do g…é+qé +¿ bHª‘{IMͼ¾¶’î.AàôK`•´RÃÉifÂ4FIÓ®F»çOcá]dN"m—Äyµö¯ÚG ÛÕ|ïìÊSræco…§#,‚ V,Û{J’8_ë”e[]*[åB”)9_¶V6Ó^̼7k_,£—>S,?ÐÙ–"TK¶ÒAÉ cß9\H¿$>ܹJ¯ÿe»·Y´–Í ,&¸8~Ð"\“bè˜ ïNÕs9žà¥_ƒe€{$Ioú‡|é—¼8¼ˆk ߇W]z¯™ W:lS=1¦Ô¢g:@ñ £œh»n*½Žkehÿ®Xnô™ëWLL¢ÌžûF”D”8O©ÊŽ!1µ…€^?eË"¡Ý­´Ûí#‡Îç_Ò)êõY±â‘l|n6Šh<ÙdÌ× Á½Cé‡Ä–71âœÀ5F” ©UÖ\0ützÑòµ¤*L6ÿ9]ÄÚ28z0l1þ§Ê!Äu³NU’ù-ѯ?çØµy]—¯ØÜŽFË@È~Š<|`ûÖªäÊÍLȹ’ƒœ†g>‘»õ™zbô %„_eÍXÐÆh«êi–×Õ+ôƈûi¬‚`éǼ±L³P”/½*ƒãÐÃz “ŠeQ8 € ›–WGì_òø`&bª)«r^×Oß% ®ÍÞpÖÉÈ ‡u¼Î\p+ÔJ¶Ó"޳éYgØÌ©åuTA—jy±)·ð‰giއp²ænòa¦.Ý¡ªÆñ;9713$i›q¯m Ç€\‰á²LQ÷ÌÛÄj¤u÷´>z|ηl#iøå+Xlúщ½WÛ³kógÕÃ;ŸiΘK˪{WÕœGThÙ1\ª§b‚Ñ—ShùŒR¶[ù×Cº«JîOL0î =¬ò“Žj¼DŸÔšsDߘüøJ`z:3ªƒAÏô%ÁÛs1EPåNµ¬‹~-]`¯ö!¿Õ‡Æ’äé’Pˆ@JzZ ß$Àÿ!ãIÐs}ãwª’ßÓj¹m 2)sÀðzS&j¨°–Ž:‚µ±u[ˆÆ)*ûkØxpøÂ„$J>ôõ÷| Oá(;x ¿?‹5<™'Ê–C®ØMÎiŸÉò«1n±ñqWWxÇz²/6âH®çÂ2L»y.%ƒ1p–’FgJb —ÂsïæÚo9*ªÇÔ2¶šL{ýBÉ„Sfò!oã\Ý…´û Ò{-¬2 ©Õ»˜Ê¥5M™®Í?…¾ÎÃdøQ[³#}Ù˜¢AW^ËíÖ!ìÃÉ|ÛÙ)Ɔu¦³v ‚ò‘y¿òΔ¤Nbã}#ß<óLA†^¼}ì±,dé¯x·ãL\ªF ÅšX±¿a­Å® ݦ¿åÖóñ¥-{¸×n³Sý‘†Ø›óªÝíEzüR`|ïÄ4.¬Iµ”áW0 ~‡¯:!ÚöŽ%b™‚1,…| r´…êµÁXL‹¹š+Š0£4M‚EA èÍ„P⚀˜óRºÂœfF&EÛçòå휄õÀø£Î¯„pAëUrôþIX‰"8ÞMP\ø‘¢<A‹v!ÚU¾ORæ„…èìJÂŒá½CíO­8zÿ}lÞØ 'VJøà\3†Q—×Kµ‹‚mÃ4ŠÒ}!ÂŽ^ñ ë"S€aFó(¢Ζäòï<›hêH3ïÿAqÕA„&ìQKÇ _)íåNäùñwéßñ"˜9W8Ÿ®w{Ko¢pEëJU@ÿ<¨2‹ —[ênÖÐ+r6®…¸½¯¨ÕKqsð]eÖÛ@Ï!’ g¾½Äú"ŒÎcVà«Òß•*’ð%ñu‡m—|ø¬F-9] ûö»ò,kéM5I:DÊx¢ÎD™ï×\–FÔ]´ùêï)^k ¹‘¦?Ÿ\øß8j.¨ä½ä¿šY(³÷»£ñ÷ïÏÞŠÏ”º½?òœÖ!$PdaWBêŸL_˜™™€­òì8Õ‚øÓ¾ãñ¯É4MüY)®4ÒÃ¥°îùú{N¿þq¿á„xëæú/ ÂzãP{A|t‘Èy4WçNGܱG®¿t(Ñ;Oqÿ!Å Ó¬lcQË/¥)ÿVõi…8´ŸÙ±Ýß&¶e ¿Á7U`°a rÓÊÇ2š¿S+Ö8U‘£*Y´£ãj“yÒøÆÝ­­¿éMy¬yÔ:wõݬËâÏßcµœ–Ãk¼¯{黚´x#«TùÇ*™õ&º›Àâ]„ñèÊ•ê¼Oº±ë“½¦WÙÎç ,ÏdÒ\M]>Õ/¢m¹ÙX_o ¬”®2ŒˆØKEÛ·%ñbVg0P¾úuW‹›XÆÀ÷é_U(A ø’ZV©f¸¢ý`ú$RUÿh‰á¨B @ò²>Ö*œíèÑ[ÈßÍ1U?òŸøf»nìâ+lØÉ‚ _@¥}lQËVÐIáçì‚9ke÷” EE¬|“H7LÝòóú‚cÝæ¨‚…ï­ ‘L>òÂ^ƒ½’RÌa°FL2ºcH‹+ùd¸ŽÊomôÉoõ_„5óŠn4Ù;«b€”v:A›É hàÙV¨È΂n•…Ä M¼Ìyš9A +Ó"ú4UÆÕW)6š0ÇFý2£=0^Çzñ‰Ú`ö1œÓ÷ËU.á¨Ö„…emÄÏ6Ò–‚œß°¬ŽV2*ïLÝD÷ð¸§Åó…¿<`†Õ¿µ¯ǘ‰+Tv‘ϼ/–ºÝÈšß·£Ì7—°­…RCŸÞ%æÒÐ[!kqH€„ßzbþ¸Å‹Xf7ã4£k,8'˜gÑ€ãjŽã{´9œà06iSõß&°ômƒ{Ì“Zž«ëÇÎ@ÿq³ð±¢×½¸’ðRÿqjÈ7SClènÚº!ø<•ØlÀùFwãÿ ›³ô,ZåTI3@ôŠ!/ +qÊX3<¦ÔÅï¾ÞpÝ)ážÿu ÂÜë_¥PÝ#ÞóŽL¸®ûÁ(ÒšùD¢&eêE¡g7ì‰+^_þ-”’{’/ɯ=J*Öþl[¶>)LÞN\ -"vwF¢ ,ây° d(*żê¥N@$¥,(ë"gç{µù;ú‚¬djQRÇf£ÕuÉYa!`¥ß´ó)i ¸z­ã‰vø¡ãL%YÒ¹ÆIWÕpâ]¨Ý2éÆÃJ˜âŠàò‡\÷a‡Z¼ÈhWÄe1Ýs6¹EŸc˜Ö|PÛší¨)ƒuns†‘QøÐ ›Ÿ°=3³{¼ñrúXäç‘ z¶\Apýmœ 8«0#v²ªy‰€rƒÆª=¸TÕ örh«0Q¡f›%‚ß$M‡6ûÒ'lÙu†ƒÐû\yàŒ}Õ®kúyϼtXiŽ€‘•š<`d¿Ê4Ñü›€÷ÎôTvo"eôÇë é#äyƒ €CÑï²*C+~ì™{r±“oã«T4Ëß £éDÄ2w—Ïg‚hXÿ'–T‹:ÜÅá™'é˜ÂÃÙ½d–áÑËÔýÆ‹î·A®¸¹dWCf1€^S0©^œÑ2S“ôº¢ïZŒßÚ[vç[á#8Õñˆ"aèËþÁ1ò :PíÛ^ÿe½6wðÆäMKœ²iZuÍÖDoZȯ ŒÙBÊÛÌã•@£L0Ó¿Èà¾<¯:E³ ݹH>š{pEe|!í”e¬#Ÿ¥sÜ « º ›N:è¨,BZM&[ «ù=ùDNZNœQIÞÍ.´!5’Ÿ ˆõd—É„þGREw˜ÝG”Ã_ ­¦‰«ß Ÿ<ªÕ/ Љ ˆvDõä²_½-f0t‹)!mÞØÄôÍ›ZÂ@A³€ÙDf4»Üäì ÇñÆÜîÛÞÈTCu æ 7I?½ñåN)–ã{ºæ} üúA%Ú!B3À¢77þËZïîˆ@ââø}ôÒR!òͮΠýâdí¢dC dßöȲÛùòuŸB£ …è‚N°d@~{úDäc^"¯LBQ å›Ágn©0oo€þÄÎÔ äéñ(Ï Ä»5zÚd[£éö[+Hwi 1W';>n`D€kA ?WUd£™”^ÖRò r(àÓ6ÞÃè&†FõÁ» 9˜>*meSoÞ©¯Æ;ó›vtkXÈ÷œÀ3Ü'V.3ˆál¨ èi4=EÍKÌÖªÀÑ”MVEQFuaµR”—8TÇøó • ¿¦œÀ#¼ö°¹bªÁ(„Z>…h+°—¿’ºÕêм~]ÞrÁ2!5(_žÍ²›šAû§­QάÙz eËâ"èã=ñÁ“9Ì¡œ^ô%":ÉÑúˆô>‹i2Böd³‰úŠÓ–Ñ© °Td{êŦ›-«Üíuñ ¯õ@@ï>òáöã:j—^T) ú5Á6 2*91vÃ¥ =8ŒÚ-Û¨ñúåßY­&€,à˜4SÜo iï¹ÚsŸíßýJ%Ê96¥Õ9ò›øåÊqÃ:„Š"iX£åUaHÇ„8©UhN¨g9ê˜È(ÛŠ×=£ö㈇Fž“¬½ð(Ù,w{ÕµÓƒ¶~zQ¥ ¨Ç2aÀgyɇ­ûO“ÒÞ«ÌF!å¼Ç¥L.¶8þùÄÎÖ¨‚2D ‡_|uuvI#ªyÛ¥Õ^îØï>hÞíG:ÆÍÿ7÷‹*å01õ†›wˬNòòY]*$kWÃÿ3ò¡ÃXC¿¾ˆº*ÕH8c¥F2æ’¹4w×µŽn_“ùûµ¦=óø’VI\Æ¥øÈv—(¢Ÿà/$”iµb:öröHnyå¾)âØh2ù™[-¯A³Qªÿ*ûÍçšIÕ“b߆y¿ðÿ #±àöK·lÅ¥ï[|fñ5÷»cMkp€CEŠul™ë.l'Â5¹³L%ŸJe€›ªÎÞNC\ý®‰ðCÆÂ 3Cü -M!—~^•zvŒ@w4ÿdô¨®èð2tQYYnx½ê½p!õ #ì×­Ÿ÷›Äwû Çí&¥Pdì󔽩-©G£í‰Üa¼»¸<ˆ¶]¨Ñÿ2§Žƒ£æfÞÍÓµ0z‹·8,ÌÂþhÖ=:HvæÕY{Gõ©­Í%é¿“ú;gg.â¢Ùð$:C>Ä(ÄJµÒœÌ¥{¤j‡à'~dã™ùXi!B]x*±ê4møÆ+ä×áhšîQ™…$ä6z´~JÀ:ñ4è(<1iäÓcøk–e¬ª×™ÂþKe4: ߤNà!•þåÂs$óòåƒwSšfŒ=À\+ùö¬£œÜŠñºÍX´»Qlo¾qÔ²ý ¦#a°ºçå#‡8Qg¦¤1c…ÞÜnÕ%‰ÓîvCTg­$¡èñŸ¸{½7éZ]´†sòšŽÊ5Ç7¢rƒJ&Äó§X^P€õïhŽ8`¯ŸÇQ±ÏG·¾lUòwìOºSn‘j|›ãzê$ö¢nÔWê§ü1–LîÆg}£Å6 x¾)+Vè<á-gbí{̘C7çÒVæ¦à4ûüµ‰Zs&!?x‘{Å¿{ªÍô9±ÿCeH¾kö¬ýl~’c{LoŸpbÛ‹Ú3]-wÜ~ƒŠÐÆŽÈ8FZÛ'9ê8€ê†püô¢'Æ[jTØÒA•t]pÁ ‹Ppª‡€L=£ -á‡J‘Üè|2 G<—‡T­Î¿?:¥•¥aS4+²cËÛä§Ð­yo"c+Ü~h;ÏU%OtŸ:˜f|˜ö+—5mßäÜ*\l·«rÏI<ï ‹±uÓk€ñ¹Ò¨Þ¾]ZØðüE^+§ûøøJ–±!C­É$Ƣݨ?ð]+‡l¬FÚ)~I¡“Ÿó#®Ø+žýìsüâ½ô¡ŽHmœ0º˜<ÿ©…“²š}åÀÑ’Ú©h2rÖæÄö;8¦‹£ÛnΨûÙ~=;]£}JêÁe£òíÍ¡ï)"ªD|²·f1a*&[W*q&)K9ÓÁ´A•ý5ùïJÕÅ´L»^ ¿b·H¸X‰¨çä¤ o®»?UœåÎlj©ÑßO Q%31 K™ oì‰6Ý}}€EQÊðc>'pÜ#&Ç©»î|Ã3ïò:ù¢ói­Ãámø@-ƒ%ÀÙEâ—ªãªå‘-D!Ç»…ŸÖäþ¾ÇÀ¸ã!ê}•Ù,EO&Iü¨ø§ÂQ%5äC?`›ŽVN ³"EÓK'³h \‡Ú{ôT·6Þ‡×ßÄ‘n‹ÐÕãú¾ køE¨ñ|ï‚]öûðã×nô8º¢¾(s×i y°Hç íT.4„BÍŸßš³Œ&é- h„ š79ǵÑ0_ð¤ö5£•°€ÍÀË/À‰UöM ÿ9Ùª†¤›¨Å?SOr8‚ÖyMB½ñr_0¾ Pä6Èj•}iH®`lDŽî€YÝxm÷½*éØ¿ë%í¾WFD=¸´ALÕý^ ·¾&„çIÓæuk~DQ`%p- ¸ùÓøUÖ¥ $ÈŠõ2·Û2S€LëÎÜ+ÂtBÐ»›I÷‡–`3«I(¾$óì"¯‘‚ÿdèBp´§h1ªq¡‘ipúHÏ7üU£n+Ü]@Ij!ªÙÀaÜV+‰RÝ<ô–w¿˜6,-ñTº¦. ®î§ÛÞEiý³kÕvµÒ±J…œybÒ%hhøÓ0‚“¿LÕcÅ£çmåÉa»Fö­½û‹I#†ÏÐúBèUãØ&Ò7à˜ï¿b +2iÉ’m@ 2ÉÞÞo| Ðáäf.V3nÐ-š^!ét{õ³ÚÂǬ–ŸÖ2¥úF6>ÊwU nŽ]€›æ×<*É3¾Ypÿ!®sq_¸øÝð±"ß|é'µ;IuõÂÙ]x¼¦mp3á÷Ò(îkËù?2#h¨"®`4N>­Éx1“Nñ²f¶¶áH» à ƒÔsÅ5Īÿ?UOɼ–É#¶œq}.Ï—J æÅïuþ%’&¸<=Áú•ɹª/>ºõ^øK*lpºš,ÍOøÃNÕñäEAÃÎTÃd™µ­Í@ðã¼Ìé¼3`‚æ%öi–°ÿEù#;|žÜû\°-6êóå~=t­ÛÇ›Ùäéð.9ʳåTÈ !ˆÉ¶CƒSaì¡—ˆ¨%Ûšo°³Î_™â_ó`"ª„;Úû£ïrø·„’À™.D\ü±`›Tr(I'9:î™ãV{å6ŽÈ#kÿ0=g'ÖN~ ±âúcv÷+ýMœöR–Ãb•ŠYÜE×Ùpbûa ¸g¦ƒb©z¤ä#@«×éá#©7iñ£Dm|‹ü%ªV-(×+–Ü´Í8^Ûµ&ßo¥·…Þ‚¦¯v-ˆ:®Ë{þéX¹‹DîмLÍ*^VFoº º÷ŸÆœF®÷€¨>>‡ñ)éP¯Îq5¨óë˜üÛ02hBCÓ;þ7;Š8dèý8踡§¾¢Û¬U|¸.Ú_BkË!3l\Qøû@Êü±ë[à²ÌñÊQDá1mR¢zÏoŸáQ&u,Ò÷ÔÄY«ŽHÀÇTBOïES#¤5ŠÔ~mHŒrëlF é é³çSšØ?J5åŽçÔHèãš8϶…óʘÒG˜®ûaÌ3ù/ðØ; é8Æ#usËߥãC©_Ï›ã aè¾AAV²¥Úh¹Ç¸ž5¡.GáìVÕ š¹Iá¢LšÔ8±ŽœlpO”SCn…¦¨¾Þ!q_îjÊËt#{5Xí¹…û ÈœDb{#WM3y{J®3«]´ÜÃ+!9y«m¾|ÕÝe½Ë¬ïGçú‘7k;ëðàò¥°tó;ùðX"܇@.4S/Åw+ñu| mh™Ö²Ç~JW=TtƒÖÖ]| 0¼Ï I3›­8Ê7°“ Úr5å³~¨‡âX’*­©hž›AÖ°SÖ¦ ë3/òZvrüŸLÀ~±Ç׊õ„2ñµSˆ“/ÀBZr-1Ž0‚/O ¢ï¹é—à  ¡•eýÁý0²„šëÞË¥ êˈ®^½ý˜’‡×¶ã›§ÓÅÏì€s3OJ•4KB•áEwë*rÇ×kÆ¿‘¯ XuÆÎÞƒÃ{5(GV\DúÔË è•DéqáñcºÔë¢Ú„ãåcê\zú™éJ›(Åá0ÒÊ!˜l z~MâAÁ$?RÇžo8…Šå· >‹Þôð†¯—»Û·V»bÁÛc•S\ê¯5.(ÏX_1­êUX~ßðzWT+`­ücDDTªŽímë’gý…šý0›ifýÆYä‘ßbR¢«„Na±vSm(Áh·pË{ÂUî”=iOðÝ—<&ž¤¼²ŒÉ$|Ç"–ôAÎÆºZ÷Œ}DÕYMT°%VÕ÷ƒG=SÀþ—8COåÀ“ªŽîA=„T8Ÿ`_†{Ô?Dí8ËÃ`µËÚV D†µáÑh¨C^p[Õ“ÃÜת~<:ï:“œ¸bX6«:y©ZŽ85V â¼>RãÇ?ömRcÇGÁo‰¨ÙÄzïq“Wù5úY•:…ºz´Uˆƒ³†ë\êÕ¹˜¹[øÑÎø}O[ÄÔÄã`?àG*rÝ7Fa½¨BRÈå7BÛ[rƒq݈t-P-ú 2}—0KqªÝ^ÇôµÚ"®ü%ûpñ‰Dÿ sÇì¡°ÁãŽ\ÚÏ$ñ/ålUpŸ%8× ôØ6´Ž–(M嶪]ÓŸ&ÖÔP€GY÷i‹^Èlü)ïÆ‚bÎdgD_U¦Œ€¢tG' ÁTgÝQ_;'à¯{ÜdGd´Ÿ.¢ùeæÙÊžoX^ ”ä–кñrÆ t5Ú¼kx¼ÕòpÓ¡o3§ÒüFMÄãËãA¡H/Šý'.bª4ùùfýßÐÝ?ÎS¹Qˆ„u¯%‰¼'56·ëáÿ'ð7QF!¯÷zIÄ_É€K ^ Ý2¶@2²°©ÜX«Î¤%ª)kH¶‹q_/ÿDD¦!*!E|I\%ûNå=ÛI:(lz™Óö؜óÑ웫ä²Å·4ÊZšâOGªMB¡î-]l;gÁÙ7ÈBEg^m`|†•OÖ dœÇ$m6)Z2uz êè,/$ÇÃjå7ef6³ºUJ¯é!å´Ñ9£!Z»¬º˜?í ‚ÿCÌ<þ;ÄMŽÒвÎâ•Σ®ùl¼SÀнæÂþ³ú˜ç»Ycì—´ÖÙ¡ê#6U‹¾ƒŸÛP5h ^•¹Ùiˆ¢[±*rШæ®.aÞÃ1ì)qlË'Þ'¥l_NKÊ``ú kŽK3­ÙœÎ6–ôø‡5Š„râƒq4W%™^*ç¼D‰SoV¸)ÒhXoúË»I£K¤ä=Q¡¶}6G!|÷½ýTØáéK2çjk&ÊgÞMøþûJoǰqŠû˜¡;ß«êâ|ÖéÖ©»—ãž*,hßl}©t½=QÛŒ™&R°®¼o½ƒ¥*Gú¹¦ó=ËÞí'¸Ò16k‰§Ësæ2YÑw&‚ÖÅ«KªÀPšûp$*EL!äèàÀ =f¥¼Üž›7~%C÷“:QsKkœ^Éz½¶NYbêT‰}ÊúÔ¬l=-·.,hkø™2)e)h«†v³¡ ¿_f¸ŠÕåÚ¥"D#f¤Å¡†œ(ð4QO™¤y8®í¨4K?p2@ÑDR7Jˆ œ·¬9[0,¢M µHÜ) ,¶ZNPQE•ÊM°zæs>]Âá$ø©ê©m#·¶`¿£>,Ýx¶ý CgÜm”•jÅn)þuïf¸7ôÖÖ·zˆîLC yH’Å[ÀærgÓ˜¦Nq0èmx¤m{ô+»zÞ-ŸéPªôÔéÖÖÿx¡TµNœA2J¬º¤øgE([òÃ"'f‚cÙ±B^Xô_àYœdÞïr€ú‡*7­Ð‚]Š™’ñÔù¸¼#ò;%ƒHi«0(‹“[ê{þ1º^²kXàãÑÌÃÕÊžJ¿üâ[+5wœ¦Ÿ§kö½ÓGûzZ#“‡XßýߨWË•ÖoéÏÿ{WÞ†¦˜=”š*¦5¨@äKoê»'+HŽÐŠtæ7|‡ü¸/ìzº§zQ¶‘Õ$Ve¿÷r{j™Fi=öïÿ%èE¶d£•62E½Èâ´=iú.l´áxÛÁÉ(‹|h©¦f‘n!NX²A¿±M뫲ÞЉ£¡Û91¨•甡¥¾…@ëð~*MÁÖ*ûØ©sÃâtŸí¥#r#ðÃ|zoegùð•beïÚ¥ˆs0*Öjî!Œ™ó ”iì÷oŽ!/¦³Ø@ë?û›n×lõR:ÇÔq'OÁ$C½÷ƒ+oéx’u±„œ= ŸOìó¶†EP¸ö:¤é¢YïÏ-@ÌÏ€i±`V›ýiÏËîÚUB¶ô7Ú¥àÂ!­cÖAÉ´»ü™NÐvàwäóÿj £çj'–(à#'ã¾Öé!4TvøíOVÁîÇ2ŠÒÐG\ä7[&'GoGX˜íÛÛœÀã³â/¼ u+î`½°8Ñ'tm%"*µV“ bkÉP—Ä"æø]¡mUšÄ†>q»HÛÐÊÚVdvÃŽ6BtŠœçä–À¢ý+¢å]¹qÊõÛoc/¥U{~ø”1ò½FTIæoùÈó©ûQtðýÁ3tÍœº»TȲPP¤õ§ýÒ¦è¡ÐdXýŒ»ôʆ­qJ¦ÑjP§©õH«£@–XSÚüÕtÀ}EÝm¦I"½D=.±½2¤¼¿ÜZ–6Ûè°¸]Jõû¶tFúHÌðØB>íH2H;$½B%æÙ£¬®ökd1u½—ìvšmG‘®æ%¨Œ~ÕÔÖ9«‰P¨Ä?äolcë=`×Ç1ã¯Oc`Ø,|”Ù£%¹¡Ç5y‘×ů{Œ‡|:wRÆüÃC”òÞ|;„æ±ÉÙþŒ¡Í7á‹C S‘–ÆHµ‚mÕ:9&D:~h¡NÅY‹Ä9¶–ÊX§`ë2¤_]Bòž.úØš>z„»Ø‡ôó¼ê›|T0¤0üúðÁ”ù„ÈwsŠFÆuTTVŒ—ð¢÷x£LìùÆ T~bV먹ö¨Þdú©‹£l>G–N7kÇRÐø©ešÊ}2Ú8lru(©¿"à$uw˜Ð5øÈ*›Óy®Z8G*é)ÇK×W”…c5(sMÓ>”úSœ‰—}#IÍÉK÷˜ÃÏ%„gšm@öD`5ŸW¸ñ\°ˆùs çóÚ´¡Œú·ó<üX„­Ô^ì[[<`«×ÜaMƒÔs!õ?ÑR“€g¨3qÔÎz{4¬cŠ®#ŸÓHég·þÞÖ“í›ðÑ^ÅÀrHÈHêïý²[÷–T›hܙԻ L0 ®ó!SVÿÒ!UÅC7V J…$cˆ–ÓFŒ53–:äå¢,ý––øjöd(&Þÿ‚†ûü”@ ¿ÀXêÉj§ž"‘ÌÝ5ÕÛõ2´e†Þ€¯“òÚ$›Ÿ„” ÆaÏù>9]0˘p[‘“ìH¬ÒæX²å7|X>ƒ/°”Jä‰îãb¦m ’mÃéËÙfÑC_a-`í—(hnà‡µ’,«F¥m ì•&ÍB"´8ÖŸ[“]¿jç"rà5]°|ÑÉ!)±½égÅ¡íÏ4½k•è[|™ Ð±ÞúæÒZÝ–ãyÈ`Vã!öÓÁ”ãÝX ü} G6“Ã4‰beçßÎ*” `©,>X7Þð¿–PôABJÁCÌTjËseÉÎä—ÄFLªÏâÚµ²K\Òfi©BØð÷" ªd% 0D;XßT_à⨚/“·9‚cúCuÍ^ †U¨”ª-™ï ™°ƒ*N-;–ùÛ‚»DJ¤cü`(.o]~ê°™¢½^E2d¾ÿV£‡„KÖ­÷¥9ƨ¦%A¥†_Ìo‰ïé¤0H©¶b ‹Œ'æàƒyÅkö—¸×¯DÞ QFÝP†˜KòcZÒ˜cuT¦äþA˜Dz~DóPD"¢£åà×è^}è?¯ñÜt ô[ lID¢9õ êa§ ššäâ[y0Ÿ~ÚSU@¡ ^x‘ì˜>LÔ´`ûZbè¡ã¹ÞJ Ë3)TôB#'½!ö,–Ò>õ΄'…êFMF<'»W²|}†¼Hœ­ç]Ó2†ì‹žE'åôøÛrµy¨£¦å‘PÔDŒØ'óÊ…Ý“}Ö¶«¸½5i·d ã×ÖŽÎê–còÈ~ôwDÙƒxTÅgÿl©Ê; í.8«h(Ëè=IŠlÕ©mv¡V¦¾é#æìì§k`$Ï”/c^oÑêYMl‘Å à.²°DhÀ³ø³2rƒÕ±3ß øEéB§|‰ˆFÍBÛM7(IÑN¾pP „(Ìá?sIÉ Öî¿ï5œèdq†ašY‚}Ù¤x0hqV‘ã l‰ý@]TÅžˆÊ*'§­©_v§½z¬¸;3¢ž£’…< z'–±m°¬xHb„›Ó„vGð"_Šðäæ Ú°d‰fÏǬéÝÐ*0W%úÍH#„›% m;Þ-yÚŽ½#m¯¦»WÀÌŽ,ˆ`&ªqi¾QN¹´E¬sžh+‡!"œÓYî)Ù¿¬­aßÔS]½6æ“×Fç«‚ñõ9Oí˜Âç´ÞÉb&/þt‘Nk«™íŒÑÅ8Vµ:ð]¢/™_n¿aDô°ÐiJÕ O-bàýà åå½¶'žz+ñEð¯Ú ¯ªt·‰R÷kªp  ÿeãI©. äØ*-%úž÷ÿ+v¾+§[DÓÉ*€–3³“5ŸL‚ñÆ[N`~>f©6pÙPdθ#é¸yáª(GS·Ç¿N‰åõú9-Ó–N›Z©”‡—Ši^a¾zŸK®È±“Šá ‚å;ÙhWÎÿø¸MÁj ¯"èãký±¡aØ1i¡³g½üç‘Ü Kú½@¬òÝeƯÈ~Ç2^¿¡Ý´Ÿ`¶ËY…ü­BO>qs1Κ Þ%†;W{-L‡k‡ã®@#½LÏ¢®hoàQ˜»]I¢<ÜÏ_ï1KU•ñtZ¸ùüwÀÌw}ËŠXüU¬™Äá gШPö;±4¹ƒ-܆zUêB´†Tç§¼âž2@‡2ZNÏ×§„Šj4º?¹©ÿfvÍ•žÑì¶WPϬq\aòEšÙÛè÷õÉñ‰™8Ug£Èjchwì y¯öoCIª; {ò™€#@xžy9ÕÜ|'œ á¶š3 u¹Lì©Å¹n¥&òŒøæC¾(š sÀ.¼éVyOád²áôðxÞF yú'—ÒÃyuŽVö9’xVëL^ÆF$§røó_ˆ]Oi{7obK­Xa‡[:“~ÎeÔÒµË- šŠæú'ùУX1äwü†[fó¸²MŸúË¡Y°k~K{ Úû=éõmŠ·ªÑƒÇùk¢è½}ú6¯/'±©4 ö”¨šß¨Å2VM-$~÷eTàžëš÷–“ÂãÈ&žÚy°ÛJ8ÖÅ…Z«b¿vÞÖÖ± Õ#”YAˆžtéyZÔˆ¨)·é­A"èf¢ó±¨â<ÎâË#ZŽ/³æÌå/jÃÍ"]ŸvZBÖxUûbg/ l‰ <|…hX·¹Î4`¥ Ä^6,ž¶‰ºé`ŒÛðˆ2°< ÝûÛÏDÄß~€ü“r\ ÏÊë£r桎µ‚½HZC±bGFz-vùØJ‹¹wIãš%Óµp5ªŸí«Ëĉ²¹K(7w%)›-yVÝF0x~JÙˆ–›¢j¤$%7»e©f–¿x\~@¸ëMVý+#Euد!½ãÏéU¬%™5c…©–ímGMÉ¡ÆÜ݆•Rd*}û´Vj/˜ƳzèŸLFyJÖ`ÁÓØë½Ûùb„¨CCFÃwFÏ-:«ÞÈAzÎTüŽëŠè¦­IuGZ{{Ñ{cw| Ý@=%àg±\¶àÚôúkMÄwœo‹øø·6Ï6Z«ãË–9~ àVHÏ“åm ~²C…aõÌÛLRˆ52™ðüË—¶1ÎÂï‰dPâßíe7›j-ê8Üóô)ügri·9¿^É7/n³£é²oçéñúà-=Jûþ: ÞÕþ¼|FªÙ!F…ßMkW4åµQ¥ œ­SÂî6»Öd[¡S&Ò‚aˆYãÊY·« ›øµÒ\Â;aL Oo”£I´íõh…aSW‚»@ek*|Ñåk@9òúƒw¤†Tÿ$ñ¦œìv2“ü¾­ão@3ÌèYð£6Ç\^§ªv³¡Å ÐúiMPùqÚ Nrzf´[XÙ0]=—{?ªlx®ÓÎí§Ê¬¼±7¸#ä1ÄÉ.ìÜëŸ –cƒ©ƒe„gʪÄQC`P6昪D1rEO£6üþ%0h"¾k íÚ†hä9,¾ËK(]€yÖ}¹éna¥cªÀ…–J{ öxO¡d²—˜%È*øü$…RMAõ·HuF…¸ýG›!pûÐë7 ¸`ºƒ­Ág9Që;®†¨¢‚5Ÿx·Oî/TÍŸÉ]q¶¥º9ˆDì*’ß§ñIë.4ÜF݇LÑv 6¬ ³è•‘7l#ö¶ª®ÿp^ø5ø9ÙÈXGÖü޳½÷íâá-:·]„Ô‘ºü꺇rȧ ±aœXi¡v;Æ¿²Ílt÷©ïm|ë'8|ý›»=šÁ3eÆa¤ù°‘˜õƒšŠÎ–°3G~p]Ó!ëSYݰ¹¥^g  –Å>+Ö+âòö±ßðÏ(Ð ø>–ºÝEi7üo “Îæ3&”¡-óò8rlfA¬ß“·Â%5`ipËÞ¢XQT£šAlhÖµ(ÅŸoƹ,/FI²ç Žcٺ۔߸›æÜŠ ñHÔwsƒì næc1B¤Sªc ¥m|ʣеf¯S­~Öï$BXã¿¡NsèbÊzDNyµ¾¾ƒ£b¤{¥r)]BK6¢ƒxºßÊu§PrdÜLa2Ôqx–À’‹¡:ay~«ôÔȦ’’!9½¦—nëÖ_v¡U­½h¤Oÿ0̸³kœs8óØÇû‚-—sÉÓ”Oÿ7g|ÃxEp»iÂSEegyôÜRZÄžxëiº,ÊÀõiHKŽ\½Ë±Ð¥z¢ÿ1"§éaâ3+líðŸå÷%5¦A­€ý®smøXÀÖbÿ†ø•UYIFò»O²û–B”’²Tmn;ú¹åyRŸ[“ln µRâœYbSCy ›ç`ÖžÛa'& ’Vïõ2Ïb[¶iªø‰ÅX-½m¦ÇT4©D¿–P¶Ãê›,ÉšAˆõ¶eòdàUÙ½]‚()±¯ˆ»‹Ø^7*«ö¯ö)à+(”Ü’Ü Ù•Þ¿F¤74Õå—±ì?”ÓÕ÷fŽ£wýÈxø¬xJ³åh°"3±ÄîÝîzŸ¡¯hWvÍaÆÆ‘–‹‘vW9(«ìlÆœséHõt®Å‡ß±¾Ã iTíù,`Uzb"þÎwû&ðÅþ&Sõ'há'÷åá@â* øœ†˜võRÚ[mtð»XYÙø‹¦‡Ê]*„Ÿ^Ÿº.&‘ϰP4Zz(ÝÝ&vĬû•Õâ{¥Ý6=Wá+­b|º{¢Ë®GmœûÈ% Æ®¼'ÂÙX³TtW5#Ô„”o5ú¬Ð:™|ì[.»k}þªÒ¹?-¡6Ë¥¾æ„‡ÇªM“nb¢Ïö3“…ÚYd[‘ vù¬]õ/‰8‹Cð“ç;oC¤GÍ[š&ûJ‡b—oZíC?&±JÝðÖFñn>lôLa2]^ic÷Õp$v©$ÏÌ|s¡@Byí÷¶9Ÿ=@'f=¡èöTv;túD–„’-2y“ìéÀÜ5ZéÜ„zÈÍÕYýb²W~,“9E–œàÔA•ƒ_”ذÏTn"»*•ÉXdˆ½^û$µÝ„ÚøŠªs´3twT×úô´»AÈo$yþÚ—r2{Q°b©ø:…3§~h ù”ùék¾öÄe³¢…K„¥o!PhNÄXgÐ&Ó5W‡l_F¯ý‡Ëޱv蘷àQºŒ»LÍâj( ›­‹rŠä“ó,|I4»±º†¶f¿±%JÁr‹a²¥õ8d¿¹`à>Ùc1·AÈBR¾Ñ„wúÏç;tô¡B`® ð¢ n™Hœçá’oÂDö┊#ßÍ+‰ÐœOÊ Y>çsJŒ¢†0³ßªvúÓAEù^‹;Íä‹pÚ¡ mRâuYý§ËØMëmiÆjÑlPÒÜn0Êpw”w`ˆ@Êá `‹DŸ¸µ¸€MYº[­ýv>S"ƒ•€WÙB}½à´iý+>žð# ÆH„vŽd"ÂE3ßòžÆ—hãh¬=@ÖD¦È«Î3O u”§4Â;ïS ·¬Ó‹ m@O¤#á¤&ùÓ¹&-në‡i°p1‘‡J]Áf 4›ZÇhkG­Ž%s¦Ùa ¥Ü¸sM0 æ¨oSq™ûܳ“~<¯Cºêâ .éûà‡‡Ï ý}7IPš×­ è _¾häªâªŽ|t)fÁoo›Hú0dƒ4¨‚;­ÓgaAÕúì EÖ#ä9pU}8¯Gn„Èövfžb!*ì?uèv 8#ÁKXæŒå¼"¬'´á9Κ@ÍP—Çâܾ£Î:>dúþóŠB!t‡EE>ZB¸“öyÐ.µÄIÛëYÇpPãhÛ®IS'}½ØH ºIÞy^×l_*‰Yìø÷%caŸÜhÙzÖBÁsºØøÈÆJfÁ!‰­Fqú\#Ù†^Ó›ÎÕÔ*«ËØuwµ?(”ÿ …JÚE?ÂFLSS$b0š7ÌÐA€ oãòXÍ#ÔdPÊüµŸÌ |±5ž=ˆCS')ž%Ëó9Þ]ny]ÿNÚÔKlš@IÌÕ€´ûú’{.,zm†Ò°ó‚Ôˆ½´á7›vgˆ@ö’Q \›CTVèäÿMïî©&Úþq¦ªŒAlŽ!éà †=›ù/‰ÜóF2ô è¾(«ü\O$i’2RFò²Ö,™ÊÑ–ë.:M/¦Â8½Á*¢EÊGõŃv/t³m×Ð]<Êý†O0zŒ°á¶>™yÄéNŸÓÄ&l%áÿ;š’Væù°Ø®¯•¥ÅÉÒbá=aø:Þ–;òª'IMLÛª”< 2€jp5Ée¤‡-¼Z|R'±"¤Þ l=Û…¹Áhz"{s÷¬äÓÔF{cZÕ¥ˆ.Ù¦j¬:ÖBÜìNeMnÌýÏ»Äð†à­çK_dèDzOeFéØö!³H"¢„:,’ŒøÒ4 È+¬ÆÎi, ¢^擄/5Udÿ„¿y¥ K8èñÈÿ_ ’ ëú‹W™‘$xu0\¹vedw‘ÐIÕ°yyr_‚á£Ú”ìYBkmeÌtÆ•mÂ÷'ô_¿2qòˆÁI}É„Þ%0µ°ÊtüDðáK¶uK×hÂ''cqŸÀÇš‘Íü"¹'?,®u`‰øY±`·&(gcú&Ù–‡«šÅ[OJ!þ»-—Â8ÎÈÎCɦ³=Ó|åÇq9‡i3÷J¥š„¦/ý4uTÓ5¶±¯°îΖÀiû2[À ¾¯ÞŸâ6+£årÆl6Ø¡æ•õùt¨°Ó¯°¹¨×'eÉê#m!ÿ6ÏÔ3{ @ç;ü$w(˜‡‚ôt1Àb½çJv©ÕR«@è*dP0/ý¥d×_bo`“]Þ¬£Ñ‹w}åé ŒÖwשœÚ=h9ÐþjH/hè‘›T¡w/“@ã4ïÎÁßÃ>ÀŽú@Êú±Ý)ÿ Ãw¦æÈ½RüQdã ¢3ÍýŠúßõ&`ŒÖÞ#I¯ª©5ÖóºÉjsˆwËÎiS"|s Q,a´rJšÌY·Ó"O”gUþÝ,ºð{Ò`ì¡i±þ¸  R ³=1¶–Ù•~Æ¿ÈCXŠ g×Ä…÷BïL0VÉ Ì‚c<¡“ƒ´ò1Ǫu¥Êg®ut#bH3Ïâ$”§jDij MU@¤ÆÆ Æûb>{vJiá÷RI&%QË¥ÅJÐ×= ÜJÄ>þæ•óµêR§ˆy‘Ö¿ M’Rù)rP¬”Jò–W¿´ ÛZ’‘™Ò³çQXËÌ7XÂ,Ñ€&R‰ÞêBDÐls‡Önz´”%#ªUã+Ìö²DØìÇÛc«v]e°/ÎúãÒÊÌÜiíÛ'”8iZH»!¾ 9Öbó¥axeúÍ8Fî2Rõ<]„$Öe{嬘¼=ä tØV&YÁLÆ&%8ÿSÎùPE¢û:=„)n*þ 嫲ˆÊ·mì‡ÑjLÏX×™ "wUP1N®i cû8=Ô²’ %a›t‡t}…Ky)“ç³-¾™ cüõjgÎ`üi“RhH2î8ô&|0%š¦®zé°è&‹·Ä[Wd p<õˆ,»n™ÿP`¨8äVBÚy¬žã»˜B¨Â•†>Þ„ómžæXS ÎXÑÃ)øD¸Ô˜ÎùVø:X#ΪÝ\–e y;j˜:µî09bñ¾“8½Æ«¶7 Rüü0AùƆ$Λ¬³Ù,Ç«¯Ùgn¤À߯²² „¡Ýõ‰b,:ïÔ| ÈÖðý?þ—v˜.Õ”— ÃÀòQ—s–«ékPÐxʼnUªÃ˜¬¬b•#ÓY?ÐÀ6œÐnF”Õ6åÃæVëK\´Ik¦÷ÖÊï´\hðÿ5^jj®ògAøã`¨¿(«Y,›rÏ«*nº6r{}%¯TagH$Ï òI2ÊŠ&5÷@õ+ÃEâ÷è‘ ¸öà6d›çœŠM»¦èŽ›™#fÊ7~°ofn1ß'¹°,"Ù×M Þ‰ßû³¨4Ѱí´*Õ1S¿à+®æà· |ù%–ÒÉ'ÌÉÖ“ùð )øAc€“HæÍÓ¼Œ6ô|ç”ÑTùå6ãKnXœêV:Éåå›Ëê¢Ä–·¾1‡;ð]@güÚtd¦ç·òbl…¤°²/qžËméé’o”ìhàïúG\[ÚGeü¹13=ïK#t7Èß' _Þ·MxåpË´%Îíí]øn`ÎÎ%‹Ô+sôÒ‚~>`º¸­™éâe‰L\¹™'òoÝ@Œµ*ŽÓ=ʈÿM–5¶Ù”„…JÁÒ!ƒò3“ÃA¿®ÇÑGÇCÔ˜¸ç^&úCÈ ü9”ù#ùwï½êeºaš˜Or=ムblË¥.´Ï&Ÿ^Œ“þ窪s6˽dµB0ÛðÞñîñ}jÙfQqXG'TkBäÏ 'ŒÔ5ƒ x@Cã>ïV&—>&qUù{ J¥Ý­=o¡Å|¯¡PVgs×€Øj\¼ÅV‚Ñ*ªœ¿›ÌáÙŒªöÛˆùòÚžÍ3â6ÿ]¡¥Hôáž´€šï¦QD´Ë©lx—#æ;dɉ”ˆ%5–Öº×XB“gð„b¸i>æçÁÕi^†™½–x´¥UøtgÒ*1Š•ï ÅT®ý2a»¥÷"êEp¨)X'ö wÁÀ1—š+ó¾½÷ÐÀѺiô ¢ýÞÇdòФî¹Â‹âjº@¬FN6¿°é‹æ‰‡ÆB•ÜTùgL “Ü'Úlj2ÓQb·av)Ý(FbXI o~0̲°] E:­ï?2ÒÄù\a·Š´ª·¸–ƒÇ«òô*æ›óc£Ö¬‡yá L±¨ËÇ—P.ÀTÏ„Yöæ«òsÃU±ŸZq‰6ª¡€çK3?¥9(¡‹íÞ—Ü/.¡|Ä60)¦eÈx P˜“68hCƽ:¡kNˆZ{RM\|SæHÏóË=Òæ%Ãk#šÅœ•?ÛeKï> ËÝŸÊþ‡ÀêÍÞÌmðŠsÞ+Æo1ۜħé'ià)*v>¤G_”½²4ë‹;d&®fþc@^mƒYÛ¤]|;RVØ¡zVé‡aeO¡‹.è¸ÉŒþ_ë}6ÙjÎ ÷9îvr‹aœÆL[j þ –‚‘ˆ‡ *cþŒÇA»¸¬ r†‚2l=½1/‚"&•etèÆt…óèïÕEßÇ4Féb·MAÞ^®‘ºî‡SLüÂrX’˜”Zâ„xX¬öB&½'ҙ؜M(õ¯AÐ «ÇÙi1Ò¯ÑÁe[¹£œU‚´Ü®•öJÜÖ\§SŠ÷l}^^&þ=n¡ÕÊ0HW¦´û¹M}¯TËÙ€–¡(ôÛîÏÕž4H÷HNä‘tPuþ¡A1>…}‚¿¸Nη ¼)6(c7á…hé‘áÜM¹ÅöFÃVâ3&Éþ ðUlóä—1{ZpM•hkÜç핆ÅR:²è‹5rü-u–‡‰:¾¥¶„€Äùéj2-ðÐ ñ¶l±É¹û?ãž„}„HR1¾³Èl9Iàº]4UÞŠì„#ßo_ÈT•¯dU½-Çkôœ¬™ŒÄT‹âÙg4X® ü‰—›|Ê_Ò{ß<–ª vƒKJ‚U;u»WÕ•bÊ =‚œ‹ê,Eë*oô½(4p>NèX€¾‹Õ…TŸsmÊãÊs3ù7tDïVê[¢aåÓ.»£øcªArˆ()~v(ÉyqÜ?y†bÿ -˜¹5<%m)(sBï7WKÄ%Èk¸x¤o¢!ò·Ã……´ÂÒï-®Dzh¡Mv‘¤=!Nxò¥ŠÛCÇ>²çAë$†0fBâ¬)™N¿*mÌÉH¾›At¡pgšJJõ¸ó{êýJœÌÚ OËYAM]µŠ‡ÌLºm‘ɨÉtE¼TP« ýþæɘ¼bÖ]̲^„P>ˆœ/NÁ ÆŒ%½<¤ü7ÀðV±÷Þtj9 (i&¶ý`ò Ñâkúð‘Ñ¢Š]Ñ1_aß̪@q¢«æ«ñ]•ë‘,„cÃA%+‡Cºí{ë`æ˜ÄRNŽ,CìÚ¨3-Ò±:bsü·& ½ô-×âÜs_DÊÌ ÒÓÐ5,Jžv:T–€ÈÏ~µ_Þ8•ë¡þG[u¹KlÿQÊdi@¥†QƒZ\07¿gôÓ)¤‹ Z„ Í‹þËÚƒD²3uV;!ÅÈÙ’…¿Oøi¼½#ñÊ~Ú=žÙíÓ±.ôá`JQë¾]‘WÈÿt¡êdÄr‹ iq“]Z뀪ëÀ£á.=0§NmaUðÁÿt»}—ËÒ5í1ìè0Ë·5†ÛùŠEÖŠXm°+_oÏÖgK´ðºEðáŸc‹@ OÚ„ä·> ;º[ gA$¦˜Ó·I‹›|¯úßhƒ­Ò%ˆî£™w×T2Žf¿½Õ†Ã-ôU÷CŸEOËÕÿ%t¶«ë點á¦w°ªHйK Põ{~Hí--!WXæeHR’@ÿNCݽ73õ÷Ä~´W‘s 0¹kì(Êq6 ÿz×Y2Jâ• ”|™ÐnR™ö¯ã;¼€˜uàšúŽœ÷º…i¯u¨>_P„¶Ì§jûÔ%ÖBüFš„ Ï)QàVCÏU4ÍÇ·zÿYšj=OÍd%PŠwX¬u5´ÕF&LݽƒÆ½uާ„)\ãk=mì@µÏ€¾¥Y±ìñTÜkªÚââ[Fg6p}”já™}Ÿå²±ê­òáÈX̉U¥p—Ù‘Üu©[¬XÅ&ê?húæ’$îÜÚ3á´Ûܲâp 3™5MßÑrK±úLmUÙúó±vÄÇ}ÅÖV£ðò!›Ïx°ãI{\ñÏõ ô=/Mv¯^ϧ›M¹A³èE– ùŠ, ìUiU‘'À_ÐŒ‘2«„.A,NÍúx´êÍÞãùʯ±ð¬»‰p¡Æþ€¹At5Vkõž}•ô¬Ö9 P†•L?õ- ÃìÓbz_[nvgç—ŸŒ®x^Ì5^—úø;D·ü|wPŒ÷í6_¶`RžÃ¨O¡ê‹æn·RÆiW†Ô°½œõ©ÚP<Ó.K‰5)—ÿ$ˆÖS’« 3þ y“âíÄt!&u ZRcÿPLôN¨hûî‚FE>Ãr Ñ(‡F›w<ÿI|îyÌŒå\#ÆÇñEŠâÞþ…©à}‹#•P€ÞîSGŒz”þÛ8ªC»Ò½eY |Œd!©ƒÙµX.è~ÊqÃÿÍXßÒ%ßna‚÷˜ƒ†})sª¬Ž õ§ºÓ¨KcÔ©ª¯ß]“×Q߆33¦$³ãnJÕth vcR‰È ¨8jÕÀvö“ ]^>Èç#@s+²‹ú!,/Òú,Ü ¹7yE¡è¿ ÒœûZÚ„ 4®=äùŸçñá ášœó8ú“49‰ƒÃV쾺Vsèu³«÷9é· `0 hHš‚2§Kõ"À³ÚØq¤ÑÖ Ùóød?,g!\”B¹Œ£÷ …8郌ÐUél¢’º—æ «ÓÄ6y*áÅ移˱ö›ÔÕ/ècÍoyŸ©ÜtÐlŠlu“$XoûJAÖH14ì¿üÓùtó—6\]†áS'³wŽ^½¬£Qñ_ˆq)£­”vbñxËF¢zvøøzjI…Œ¥‡3œ^ºðO‰!©L<Ü“ºTZ¦>e Åp‡»Ò2Ñí;‘_ÖØ³2ò#j}é>qì¾dÃ)4'‡*yrBbsk‹³}7+ÒÛàTÙ)&‰]ÅìÞàÍÓ/×ëåÎz,óšíw³ð÷¨‰îÁÞÅWªN!¿PùŽM춦_µ=Ç,ȳHô¬ÞØÜnͧ\¦»°\ˆÚ>ö:GÁ° Á‘¶î\…yr”­_‡+ééÆ \y†–3ZºhöðJŠPÅ *º”¿™U¬t2PDVb¾wDB»‘Õ"yê †?±³‹E¨ƒ]6Ï.Áí«I—$îÑø2)»ÎLüÄ(²>´cÝÚïaâ ½!\qû;Óš¥`ù ³÷{ˆ ¶f¥òÇêª>¤bê˜2“6òNK‘¯å^EX–@‡‡×VçÇ‚S¶=íù2t|4mê«¶F:Üc­ËOœ ¯•ï.r#òÍEú_f?)/zì-D®J‹ó! Eè:îuÃf-úW#8'£ðÖ–­“J”ø(„ðSȯ¡±˜’€]Ò¬çñÉæ|¸ôB‘²W_ÿF‚¡ÜPKz؃Ã6G=ØÓ ¨kšÁ YÝd“;²ç~c׳½WTõÈ3$D—¢ÚîW­jTÿ¿=\ºwíó·!ìI´á!¤‡èÕ"‘ГÙüØRUXœôЦx.7úRlïkWo _ ¼^‰gõKd'j ¥™?Î2ôÖÝ&´Î‚óñ-¼=iº¨5eâ} Måí1‚7R¼ä$kÄØ)„F1 ³_™ø—_}†Ó`žX‡snÿ]º£ÇÉYÝíª c¹n;ˆf·èùI/;\ÒDˆrŒ¤š¹ºü•†.κ²ÀÃÉÀ=’4éÅ먇œ_d8ò&¢H‘Ôh´ô)D-ée6œíPc%´ˆUo$@hʃœ^ÃiÞp6Ër.¥ÄÆ>ðsóù,C6K)áæµA6:g–ñy]üÝGJ·›(ÊmL‚–I`)<=³EžïµÁU^Oñ0±egµ `z&Iˆ­M‰·KewNÎ;ŒÞ_ËúàYµ2"å²H~¬˩٠oÐgŠ%ƒô'ÌFÖ ƒ×ý!jº'k3Y˜©h^ϦmT‡m  &wzޏÉ2À|öÙVÂAÕYÆ+AL€X½))˜ÐëãÞ8FB¾\ÙéGЇB1z ÷OÞ3ùùPCåPFˆ”ÓÞ­ËÊèmsx!åtMAV4CÃ^³›ý»šSܦ 2¯pÎNOëŸò>·‰UOÞe¹têaî„/P¡òw½ÑÊ¿<ûD2ÊÔçÇJ²í±çИ£ï“ìͬäWFÿP£ ò¦Ý £¿,Íe–0Úà롈^,±`ÁMeÇ÷ƒ²±½~ÔUO"Î1˜=r8E¤Þ­º“¬åÒ53¬“«»4•Céqnsé³kX„¡è®|&ÙýMtLíoàer²: h¢tm.m¶®Ù oc(uÿtþ üíËCú¤/BÞ›÷”'ŠU­áÜR¢i·¥Ñ-Æ$:ù# •oºŸ‘¾4º`Õî§@·xÉ—÷#Z[â†ÌúL?t·¨Ü3p‰¬Þ2ú¼*‘Ždƒ›skÓ*ÝMâ\¯u.°êÈꆭøýÅj Ìw8‘`NøäQkfUÃUsª¦,*/CBa«ß3.6ŽA™¯ìF^‘*€ct}¡FSé,!­Þœ1v·Û:ƒ\ô•ÅÈye¦8rìƒl[=ËhÒ÷´I{$ǃü!¦ãÕCZáåÆÉ‹*³smVaËqúÞâà}¦ÜbÔ Ó>zsY‡¯K ”x|¦?‡sÑÚM5Škÿ ׄž°eˆkÖƒ§äˆï®«®AÛx56'B~¼dógß©ÿ(Ô‘ºÐ‡¢{1BÚòhW¹ö®L•”!cÂ,mÖqÚhIz°M¨yÀ†¼¦NS©£€Î»UC[Ä´ [_xhYkÏì+Š7DWfäröæ4Úë b†üDuÓ`l`žŽ±µÌI†¤Ø8Ó÷‘Øþ›¹ru6Œ¢—½ü‚Âíâ‚æÉR¶Ô׬r‘'=pד´«e<Áa7´®½{e0Y6HŸ&& “q(€ë½ÏäAÇ›qH¸­âÜrf· Ífþ×Д:YÍP^,0ËŸ€´ðo«Ï\a^ð†:êâßø{ùÊä8– œü €=¹8 ÷bÔmrñÙÙÜ”û&v;#[fh€SRÏ¢›Üp¡Âýý YHÉN^hK”ÆÄxqMÎ‹Øø† E1”ËskHóš4\¢%¯Ðñ™óA±À÷ÈÚ3®ã±w:…^¬¸‹=CÞ\šOBiXLg%”üÙ™ZPÔT1”zÍpÝþ qI°c€( až•":ÖZËÅðpСA:ë*»'×õ–%ñ·žÜþ-&ì{ êÒH_’-™&Ö)3ÃæFÕ¯£i´”c"™Õ^˜Äˆ“‹§ý‡ ðxéËU)b)fm÷‰¬Wø[¶ƒ{>ïd—)¹V¾ÕêJ>Ñ!蓕ɨ›LþäÒL„#¨ öõT“Þm°ŽÙ“öŸÏÑ𿽻¯]{¨ÒÏäLÇ»áDÚ»òA+A6¯àù—ÌÅU®”ö¼µ)F9ªâÆör¿ß<ÅF;ŸŒ(’<ë¶4OUr[ì¦_Ê©_z)öuö!ˆ×§†Æs`üdf· dOÝ!û,G»’_¡wG\`ÞÃ1xZO•¸(jÁcŠ3ô›¤‘ÁîA«´Ÿ°´chÆHj_¹¸þþ·ÙÍÈwÀ‹f½§+Pc8RgÁdï ;·/Qx °Ù˜”ÁnF] ð¸øœ d k›Glì‡Ï'Èɬ4v\/Ñ2i$ö*$7íŒE‰Œ3\ôØ5ÐŽ‹‘‹ øLÊê2'CJ¼ ¾k,(;GÂØUío̺©‡`¾Oâè»S ³i ╆ÉÎü(…¤A®VÒÿ;*˜ÖþDÙïêÝà$ÄuÃúÓèK"`îKîÇsñKÓÈs 5tÛzríz¥@ö%'ÉÒÈ4"æ˜h¼GCÿA…HЗ|Ï@,W‡-«5 fN½O69àZŸ©âw}d…=^­\(to5™òI‹"-oªKpУl. 8W>xùu2I†XË l/N$Ç+èéÅžƒH:yA< DŽSúå[H—»ûl//<Ûÿ4@ÕÚ‰S1 w•3Ͳ˜ß5\ð/Öc‹EàÙ·áD;ðÔÇ'”DÈu¡f6Ð/ÿ®æŽMý@·¡É>a5EÈcXâÐø„ŠUE¤»óJÎÜÆÙ„‚ZoÇ#(+sجµ@w×%aù É×@‚•´»HèÓ'í¬ë‘ãà*Ÿ[tdX üZ²V5Rc2­*†Ç vS.,_Ñù†ß4îß=(>Õ Â­ùzSçé)B$€ux™¸Ï9p Y’wª¬0(¸J»FÜ:tÔ@£[Ÿ@|_Ií3A›‘ÔË;!ÎS` ¨“Ïî”R«õÚæwM=Jáû‹¾ËÐo ƒúÑ G(,`Ay¢ÆuXu`Ýÿr®ö2ð\§ºÿHõÙ?Ê âOÎ_œQÆb~¸PžÌxëí_óˆÙº¦ ø£[•Ô…y˜`OIýŒ8°%uë¯Ï]:§¨QVf`Ç B+ŽÒ^éòÑÝFµ¹åûƒZ9EõU~×¾F3C?XÐäbú Vª8?´P ?ò}qvYZÞ'<ÿb½XEc‚mÚµ¾qŠ%oÅâ\ÛÏô누ÿ`ü ¶—” ߦXÜiT*;¸ä`)¡Ä &mÛBˆ=7Ñð² Ã@õ)þH»¨Žì ›¼Ý1ÍÚÅI˜äÆÑq Ú~l•éÿ24^®ñ£ÆJDÕF.¢ì?E¿ºÁ´á;5T­ÜÞ<;­=Wóháëp]þ€÷ä'„ôÔIˆÚ¹ž›½Ä œ|0ÒÆmÆ£©EòiŽÏÃ^¹fØÈ7ÛÑÛ—ò00^‘Xû7h™ÒXz76-¿D êNõiÉÆ@™…¦æ +@×& MPTH¤Wð,ð'$+J¶Nf}Ò¥me1ê–¡”' ÊE½ÖÖÿ-ÙÚŠÒìB˜šŸÆ¬r(² é–¨2[Ρ­h‘V ¼HÎÜeá¶î1÷Äp°ÊųŒÃtè§wø5º²'Œ’×Õéª(ÆT3,XЉÃˆL®÷ö452¹ÈÒ õ/;‚aÙXbàʵê…ÌÝ]u¬Ê~p0S=Uâê¡þ% E¯Ý9¶“6G]¾€ðèkú<\èÚS¼é —ßÛ6v +UËÀfV%ÿS«PÄHiÜÙJƒÙ¹òþZŠa í«¬ÅíOóÔ‘‘Úf«å&Rk8gÏdL µXw*šh ïMǪº ?^óî{^NYÀ ØÉUå¥vFšòQ4;-ÁëEÕÏ?«uk¾¯ÐÙ:½×tÆ„'¤dJ(<Êm½¨ÉOö èæ¦ƒ„§‡[Ú—Ð#BÐn¢-'ÞíßyÑá’*ƒ77Y¾ ›y•æÜT9¦˜v ø±ðÛ±iŠê°Å¼ê¿iÖòVÚËõ̱Èwé1~ŽÆKü‚CŠ¥Pù, ¶Qw›€'þŒGšŸðC`¡^Ewd‡¬M·»Ö[ˆŠŠæ{MÞJ¢3í’Öû8bxâÝÙŠI«àNÖ‹ ªõÞìÝG´~î£÷äÞ&þoK9¹ 5@Χæ¬‰ž7­}¤v}©—‹x Ö֢ʬ¨´ˆHÔ…1HI©íV.Ð-ÎàÌ;R|˜†o®Ð®L ƒÜŽë;ôÐêŠ ò4ßÕRìÆ÷Ôórš³´Ú8Ö, w ô³íkþ/«rŸà‚"âdl[÷Q7¡÷›A÷g J»¢ôÕ>ZÿBPÛIŽ‹¤Ó>œÇ=Ä8ÊѤíâmVü~Ú?­A7±µ«ÈQ«ˆáΉÑk¥Žâr÷îú*Ê Ä”œð¿}Ðÿ é-ä}%ݦ1©6Òo~e«¾Ì쳚”OöîÍšîNïs‡jI:}Ó©W4+׋'8Ûc-õºôSçO@Ö>™%æ×`ðð5†öžª|Õ~ˆ¶ï R8ÍÊ.îCK‘:´Iq4š*ruL Qû)žf(cÚâÏ?vÀ³òÛ4x7èÅ5ÚZŸÈ'iß1Yl´°u¸cýõ= ÿNé®Á×€Çú´®qzg»'†S<Þê}“¶IĈ>þ¸UÅ{âòL·•gá`¢ÕF0G“æ„\Šm‘G;ˆÙ-ô¤ŒM'óËOs«힨h|ÏÃÇa«¾Ä1ÿTï‹òý~Έ«´qµyãF t˜:ѯ¸:½áélwv$ésó»úv‚Õ¬o_;:ÆÛM.É¡y¿8Ä ¹gИž³¡—$ÝZ™ñ4žŠŽˆÖjóãJ²uµhc)‚zæ,Åî-ǸânŸfªÖ¿dµñZm†Õ€äÆàÊ!fæç5‡¦JÒËs}«Töï¶Î_gÙ*|Ý/â]x…À¡eW€¼ÊäÊȈ@•4{u,àÀ#ëæ§œ‹ÎÔ h¢e—wîe{­Â}è‚dkrGÆÐœG ½ðDQv×6†èeqWXÍ*k"EÀ:f§Â­ioc¥á©ô>Õîæë\ó&U4Ý °¹Dÿq²½õSPÿ9y|Gõ…L8Ç! gngNW¤ÿDOÔOüR37ÍE †ê†¥ûj&Ð-eì„5‘« ’Äž“CX^k—'º ë™ÓßA§‘믯ê"fçÕtòTP¤³ëB@tg8e&×þ ^¯©ÁÙ9Œ›œc2ݬŸk×ÚÍS®"p°Çæj gbŠ­Î0cB˜¿a_k4E{î¹dºæ1y¦€OËâŒ/}SvL?xÏÅ–­î«84f¿×Â&¬©_<"ç>p/2˜Å€‰Ï_ùqt„Tø°3>œ“÷;71 $Ц®R:§"+¸(9-yøÀõõpò›ß6þB.‚¯´j±Ø•11Ç£ïÐx'&`½H?jÇ¢@c#™!×mnJ^Š%ºTîëE½zÑIJºÙ¸a±ìös¡ “m;B½î ³·7]r²)r Þ<6ñ›„ï€a#”"€|ÌÌÿmNîë)#îÃX˜/ô~íï¿‹ŽPVNפ&{DÁNQ°?M Áʦ³p6^(hÒúk˜Û Db&ˆßëE³£Æ½ŽÄ‘:-uâÿ b&¡æ½)6[£‘‰ÄC£ÍNÆ&½h–OÚ~ (€»ò•'Éf/Ô»Ï6œäÓd4€â— ›8Íd£åIÄ£JÈ::FW]… ¥*½Îÿw¡§3îæéÎvÃêqe[tp©S†šŽm†¶•¤­%Ø"S@Ÿíÿ4ÜF½O,w%¦:1HqD¦g¹mÿ.º®Y–Ÿ ›òÆ0ö$KJ§/I/ EÓ˜+ïž@­ŠŠ—z3M–¶Nƒxæï{­½[ºp FG#%x˜›Ž<™Ò‹b.YóS)ERÐ!¨>óÁ)ú!KYö*(r¶'‡pŸ† ÃAÙ.*°­Ž5 NTP9˜® ÕMêÔ+c~i3ð)kœÇŸ»íî™_›‰ùØ u{2*º¥Ë—"nô9µ0ìJØ Œêe63ꉛõm/iAÛk{îO¹Î3×(éÔÁ —•‚hWÙ|U:8Ž˜@XÀK•Þ08r°Q\×§pÃ[Q÷ÿ èi 7¼Èwm>íUJ–HðXˆ“ð²–êΦ]|$`û–:â?:ë6$]>.µí¥a×ß™°¸‡'ºÙí†>¦ÜÚËjÑøb˜žÞ·A°zJ)¼[8Ê¢l8ôOΞmpWSE½ÝŒO’úAÛ;h=Ü+ŸÉö†'€SWÒtÙm˜æ¼a-ÆÂ]úUžÄh–ÀvÁ´ÙöäÖ¬9–%ðO9–, ÇywÍ©+Ýÿ7•Q].@Œã¶“¹øªlY[jiíÅý‚=·ð#™ï‘çp·¶Ù7, ï8Âô‰ƒÈö¹x~t¡§Å퉔,®å³š¬W‹kr5 û#t(ê:gâ–%ʳ{YE$J pþÔ ™†ü\¸è쿊Ù\Tñ#VbÁô{úC;è‚ ¡¡1c ’Êå.F—¤ üe •œ²Ìòœ Ç^ÞÄH[2rèÚ¥Ù¨5d뵤n;æ ¦HGí>ýÛ¯<„侩!Å«wÜÊðÖLƒÌ*òèë!jõÑ8…VµÍ—ù 5sˆHûXT$4y EÅÑŽØŽ¿iú„x }±­2L5âêûXŒÓ³ž“*k ñÅ^uû’Û|بÂñFÒv¤ë–ÇÍJõÍeüæ5VË}îßL·t€P|–b¢…vòa ZO-I},¹#ÞfÏdS4S7>â,W³Cgñ•šßZ°¤Xk«Ú·Õµä ¤Sú'Ʊw€‚ïàÂt>:ƒßy¬Öã­1ð}oÁ \šåˆyÊ@¯ØË8´ ¡ÂzÄ5P¡¬=RÜnȯ óÂrNEqà“ª&•Ù¹ 7üü\‹Âê>ÆÇ;S0@’kkcåì{Áðƒv§Câ,ä…­.Ö d0×)½•‰CXâºÜ”ë žz¼<¦2Z7¶»WëuóÂëÖ íJwðcX—Ð=;¡(O͉"¾9¤¯£G¹f'—×Õ°âÉÇZySGo¨ˆY ù8wƒkA„ÞËs¥G8î4iàF=˜MGl Ö:nûAZ<+÷:*z<:à>7gÌžc 7€»ùãºê\hÌšäô{Àí‹1§\¥:ózY 6x½…æ›üYÅ[Äoø´³‹ ;Ú,Æu¹…0Šn=㿪Tµµñ¿‰¾¯ìËj"›èÞ¢è^Åå9(õ„8IkTÀò t[šd. `™–SœââS.å`Õ€JÀ•Ü\ -ü 6qwä¡¶¾‹ð3ŸŸ8 ˜ùã_Ÿ5¿b ½°-Oþ’¡,ïç¥ m¹ÈØJN¹WÓ3»v~UÉðŠä)EôYõ$ÐÎgY‹¾™Vë^ÿhïaÄÆÜÄ­Õ¥‘N@ƒ—ü›£À4——ØÊ\ÎÑþx2œ“ß[Ê}ì•6”çÎZ¡1¹Ð^$}XΆuÞTkIA£èÖS ï\}4c™sŽsXÓ`¤ž»UNÙíWß™ƒX¼rN鎹†©ðÛËoåÁû¹ßý©-ßfé¼ÈDÿpO#råÓ+íxWWuô’Ë#–·bË`Ö² 1Ï»ª/'6_[Ôô¦âð¯q%ò»ç¨ËÈhž~Ogcí®²¼[×mñÞ¹ÇT"Ý+‚'ö-ƒbm÷5<íBf; ,-‘¾Ìu]`{´º´¯ðÝ5Ÿd~£f¾|.òN„d©¾x ÄYÉÁ ñ}eeeï—ÂÜQ¯ñ“ñ×ö\µkßC´Q¯ã‘R6»)ÈW* 0me9‘F'£ç]_k†ù&¹R·oçÔ%®‚;àú*=U›V´MÞÍ4 :“{çƒáÀ‰Êì W'Yž4Οb}¾ko(þoqër×é†F?‹¸îhú[eÞ©Pì6ÉôHU%òÿαMî¹TÑ…ûœÛ¦Ê¢íÜ&´ƒç÷m¶ŒÁer™‹*žàe`ª*)ì€L‘ŒMdæD~ÿpulÖY7ÓÚÌ6³š±” åÂvÁá6 œ*§1æÁkÉQ¬›)O¦iTîÝ6vé0Z š~Aºo~P9¥Ø^@bm åM½¶s-ÍAX&Mi[™`ª"áÏàÐnÛ;¥Gg£–Kk*عs‚ ÷†î%OÝ#$²þ«‘ç.øO­(*f¡òA}9ÆeìÉðœÔlÔ–è„Â64íX'“<¯gK9ŠA3·OM(ÃÖ\"Ù¥L%.¬s™$ëR!Vóäª?I™/öjºÁŒWñ†ð“º T[Õ«¤HÙœ ÀÆäªgËð°ÖÈ#Iû·!«Ü û™O\ÛT¾^PÔUIÊé›[HÚ ÿtkâ¯f†~Õ9|J;|‰¥–:ð´ÑÁê²B‹wb¸”2(Ñ5«~žöh ã`´zÛ•eWTe`µ‘øÏsì)³VÃg¼»g,p»5u»æ`w›nêúâèõA ßß3XoýâOX³ðälc¦{׫í˪ÌÅСÀ–qìY•$?^Ç0.iß>ÒNú³ë1Pq¹³ýŠã”ïçp}‹û)ÈÅíß&æ D±Å³™ÉÖ. E|±bAõŸ­«p™¾,‹R¢©úÝg¯¼C®Ž—ÉÒõ˜â=?b˜"à[2]JcÕÂêÍžuf|ä±–¬Ìh]5oò¸´†0½G‘xßË$¬2ûúâR[:-Ržž~ÿT¼2è…·äï/¿VÙŠbJ`KºŸÞÅÉ2øVÑ‹*R"ËLŸ)Di8Ò9að; Ͷ6=õcÛþ~ÊV`NWðŠ,l™úõ¯^¡Ï×@ÛV¯Ükæ÷6R'2viÿAR¡HÏŽß¡ªz™3ÂÒã]ØÈ¼¯WGZ| Cí6~k”ûœ ÆŽ7C†á@ºtSG¤_4,Å=¤†S6]"bÿ7B{L˼Á; 'çOëÌ=g!òëVº`Ãó®º.•Ø¡Á4‡¶Èµÿ}Fø‘Ù´‚O^TÄy! Gˆ•Êñˆã'¹¯ðºhá:´5œ‰ÉZ@j s^Š–¾²¶‰6ì¶Ëóêýf˜dªÓh¿<­àì×ç˜?6âÓ£é[X"×’ó(1çæC¦ò“a+è`Æ×Ç~}u±< äÆÇ÷ •e‹ø2üxðêùîáUà­k‹cÞŸ+`ŽxÈ´8V³4ª PÍDŒü%‚(‘øåÌKæ[⃠ó‡!8_î"YÃài@÷œd‡ò‹Ž3êJΘŒxÓÇ F|¸&xk·]$™úê}õ¾KÙ?q@õä3š”zÌþÐ.!b³ô–º 늃L¼žn$i5Œ¼ˆÙ´i2œk%“Äï¼AN¼Ã«UKBË@OÕp@…z ·aœ¤Jæªމ±©hÞ=.oÑòµ\ŠØªp`³t” ¨| ŠÄŒñ®W…ú1­C]ÈÉ—¾Ã˜š¿_ðáÑêoõ¬Q2EÅAšô#Pa î62öÕAì°7ë¨ß'` ¤ VáÑÎ'N–© v!v<›ÈÞÐ#4W¼va±Ðs¡ T†~øÝÞ](=õ+^ú|¥MdήÃ!1TƒL- ˜ª¨Œeéeá¥bndc …K ÈJ§2ŸDíÊûµ«ZiÌzK\’`гccCÞ†g4…Ý¥jëÓ7Å9 ý±]‘ÉGå«[ÖŸƒ[2,ñ§éÃEÕ e|áª}_$Îj›#âé7Íw‹¨}*ÁýýÎ?z¿ñ½ÜãbЋ†N­tr|Æ1/ „²\â°h¯z<ºÛBèC:`í×>+S?Ú»+©æ§kÍ|ÞKIZ*%÷ÀÔÜ#¼ÎZ^ƒÝ‘@…Fûú‰Ä%Zûþ#½nSé„FvÍl®G¹b ã<CMÑmŽ,¯¢ µÞÿS …òÞ‡ì!‡~Ê™˜…ï“k»c’ñÁ‘â$͈WŽÌYVÜÙä’KYÂ39› pgo{iš!jžM»2Ç‹„¦œ×i PËn“ßyÎýÕ¡Jÿzg?ÜÀñE`Dú¡G½f›Gh™Þ.ƒfÚ¯ÚüÂîѪG¬^ÓþRöAówºáȆqd— ªâíò.›ƒ© ¨{Êc†èîÖMíà8ŒrÃõ*AZöH´ßØõñ5¹Bx»BÎg&ÐûN” Ä[þbƆMÆëÙiTÙÚå*Õl¾µ=ް”‰â* ¤Rw<ÞäÊœ€p½/2¾æ£F{ŒËá|DäiÄð `¹6L0^£”ˆÌš8ãI ÑY«ÿªc%÷Ê™i•%5!äHüö¸üõ§ü7ºû{bÑòuöúZ¯·dÿ7hn‘äH~MÉqkêÙOÛÞ÷?[‡¥júº2¾Þ¸†¾äH?%¾É^síÚŸçÚÞ‡ÉÖëíôzGÕ´“êÚ¯á¥@ø’" dÛ9±Iœƒ^’òü 6ã]ÀŽSŽÀšq¿õ”`ÅãÓ¬u]bͲ‚ìqÎ8¢Gv—AAëu ì\uYÿ –¨ÜÏ~¸p¾©9ÏÑG PâOÿpÔý™Øßjÿb—¡ÇyÁXøÞ@ø 1WtMO‚›ûž=`СÐ]:)ôE‡ h×-#¼œsµ Ùƒ“„ëNˆ#ír)6+QÆmo»IÔõÅõÇ-£™þnD¡BDªhœõ©OÜ÷—§ &÷×Þœ-\N+™W» ¯Œ˜ùzE½Ú¼=¹™^Mn[ bi⊣= š¬¢ô~ÿyÇ¿–ƒ &kH^‘7/˜Ž7Ä<¿œùïc½rn=·¢8ùÕRzTFé²#ì?ï\ÿS½”ú¦¡ö¡¡°/-\ bÅ=ˆºê‘'ر—bÊ,â~Ï¿saÖª3ËĆv¿‡!qDÿW£ˆF ªN…Ü\¸qõBƒ³¤O÷µ:y °×:úqA¶?´Ö·ueõ²'WVa7hâ8ÓÐɳó/\}6vz°{©T¡*ÿ}Þ/͈‡²°(1 9õÓ$ŒäRpîJÖdgï!¯cÈ"_–港¢âä(NìèÌl®^~ÒÄòL³¢k§m&sº_„©ïµÓ/€MJ…4–(¹›Y@a“ˆ ˜i›Ih‘dc°5"H0Šâ†ªÿ\…žH@†Ô¢ÑÕ´/Möé"‡[aY iIýGزÑê}Sеá >rübI>É,0<ìÎ̃>ŸJPá"Þ/{‡NO[©ûŽa±5¾ó6LzBШŸÍ÷胿Ú7M± äž%[H°¹aŒ EˆÏ ÀÒ¶ÕÌoÍ–ÜËX+¸›ëµ¡¬/U›†Žìû®ÐRý’­¾Ôø?—ŒÄÖqÐo,ôßæv½ûž‰9 Ê"F¬€a3táQ¤Àâñ`<$}Î'Îá,«C…‹·£RÆù(È«RÛŒ<¯?ÂbëÐÑáž#\ìü)d›IVºSt•z‡è-Á›I…¼oêÆ€J¥P'tâ 3†g?’bOŸn©"s°WÏ.ÿ1"/+¾+ö“™˜À£_– –x«ãÛ%ZøxF]ýM¶"”X.9Ÿ›FÎdÝI#vñ~Qζ^½s!1À¸f.Wœ6ËÒ¬­g`7äq,ãŽÅsa”m¤ûŽ ¨Ð««'…¬f ´ê„æfâ€ìA½ÝÆ@š”fH@#/eØW7:¶ÎÃ)7µ–¹Û9Tý€Ô%ÇQ÷¦›O? ìÀÊÞ@Õ)‘¤½yÛhõØkèÛ‡I´š:?d1žòÖ‘'Ꮈìð¤=\TU» ’CÆ>†C»K7ƒM’Ê*oÚ{¸åu“­qIqmlóT§{ 5&íñ¸ ì®haYm§'ÚúKÎ*C¬¤¶—UZ­Ñ9b€QIó8¡ÕtÚ;ÄÊ&–SØãÔ ã­&áê|˜´…Õ­¢Çr¸Ý4/p vàT£O.uz™v”4Æ)+ªºÕ~M›‡WéàƒÙDʺ(B³;££©P™JLx‘—:M.²"¹‚üý$0SgÑŸÐm¢H}V‚_¸¼}Ú´Wš•ÏãÁ»µ ÿ N/šÜç¶?MIÓ$7ù˜]9gÙ0æ—Å*ß•zÞä„ö·:ãÙ?Qkª"DùÐn†ìU™õ}nV¡›×ïY) ž.µQpz¼ÿw¤Kú6ïhöÆx™½ ËÀ®/ÖÑÜ”×a…†AÁÙ‘—’a}ˆÀÖ‡þQYn½gà-ÌnM”TS‰Áÿ9óóÛiÔÃжëAà¹`WttÑóÜÕ5‰±î±^Îê„\0ÑRê ¥=¶´¹°rInÙõm€Wù;¡í¤|½Æ[Z_IUè¹ey–•|FdbºË£ønu©,ûŒÅg¼ûCr›ÑP?]»]zFsÛÔ'œ™k0^š~øµDeVÕÁ"è" ñëJô¦Úƒ4O9›í€zudÏÇ ]—p$…' °r[Ë(ÌÒøÑ.Ĺltì+˜C°ˆÃ?ÈßµDRÈ%ëAó\,°N•8TC¹nåsrçrÓF-‹5QçŒÔlÓ˜0hÝåÔÿ N$Z­ñI>b¶Aylï5'ùPMÒ„™Ú™)œ¡êSþ· ë:&¿Û™XºH. ?ß²fòõEU­–?ðd1iƒ¢‹[D­n cÛ•O$-‚Æl Ñyö|ËóI+F!å·” Ÿƒª?û‚†Â_†Fb>¦ë¨MZÚ ÈCi˜°€µc€êC` ?_SE3#%§‚ŒÍƦl)ªcž«nôž^É ?y²œžb <´aðírîàñàÝ"±²‘IiÍ‚r&Ë<÷3æO˜=€“»Çdh\)O7¯ßX°‹YžòÎ@Æl…Y§ G Ä˜·xs-©6¡xÍpÄ•Î³ÆÆè„`rhqÄŠ¦u2·Ñ›A™‘e'䧸‡ççò ~ÑŒÓw½7&J!…cìaåØçÜ›¿vOS¨ÙH´íR‚ÜfJ]æä˜ Ç—ÇcðüÞÀfä~ç@©5:Æ–Š¹n+'ìŽSiöõûtÛ yßOÀž»6fã EÜ“?*|| áícu?î¸éõ¿Ž7¸•…÷°ä'–e!ÕµPÞ£`b⓱p[á‹ZÀ5Ì‹¬J!Ó˜ªÀ…ÀÝ\±fѾ’¬4¢×ú]g–Ž´†^±…p°^ec?ØÌ,ö‘‹,àýNÅlDnø:o¹W†rË`•“Uj±UæGH¯ý1M}êi9ÿ!cÙ¾|QaŒIM² ô¼¸Ç˜ø€«gâÝPwp2߽ĥûå`ºžS3Z,Ì‹‘Ú¸éõ²A\¢þ ]Œº >”ÙM9yDo¦ßm€–EJüïBb*+2¥ìœÅd/6½¦ÿo9â§ñeomCï « Ó>÷*&"*‡‹[iáFþˆýßE/GBÇJ=+Šsl5]k^£5"°ã$a©b3ÒÐÆÐð—ÁÒ#K€v¡m0ñ§ƒ•4äYéïˆÊý¼VT?j”jy&›/úòJ¹)²˜8È ªm›×ø(µÆ~僠\ÓQÿ%¶©-@bl lAšGËñ¥E‹™¥å¿"‚Ì3›•š–iÿ%ŸÒÌÊçïÝä.6€‘#ü!Ö’ŒM÷=')‰êNE¤;5ò¹coCwþvò–„›cC¤4B¼r'ŽÇkÿa»É[$N•ÝK{jî;:SªdDñ¢ª®ÄNgüqvxÒìNòÁYßd.ÈjŽ€nù÷JHYhàa7‡fìî ‚f<;¢É•ê{nó# †V0ô? .!ÿ )-uEF8“$Δ@–tL4ˆÏÞL©×TÜvJó>ì$çï$ .áΤ B féB¯ÄqÕD‚ä@ g/^âÐ7ýÙÒëŽÐ{[Á4bý£¢jó¡#ÿ6•t½LŽH„Û'£PD¨«ÑE×´‹¡ˆE@|­­Ä‡×Ó³‡úl;;"9ѾßYÒ br‘¹:~½wÏm^)0ÆÒ{BXñ¡qXP-Ú!dö9í+dâÒ¨;Xd4ˆ¦uûoS@dõzrÆF¯ËaâúÒøŠ/HüpùÜ|µã" ºw~Þ!¹ v£f1³üUy¿ðÇâ¨Ç÷²G Bª)ý‹M¤´·‰H ¿ûŽxɹ‹.Jã:1¡?/mõ§ÁÞá‰)%™½®,ÿ@^—APcÕ´@ÿQðäýÍ«M«1ˆ’`ƒ#½ì×ïøÃö óÈÝõ$ÇËÒÏluɯ"ÃE> žfå@ürmfêzL®²Q‘iÀ ²Ç*¡Ž­ûJÍþ*••UyKÖó¶Ø*1z–ljñ£àa”¬ElÄ»½·à ÄKTËlËø Æ£­qßRàúH¦ ª³Sü|%(é7OÇf¨¥ÃÜW5¼6ó}‹J p¿˜ÒpÎú ‹þ¾ÑÖôŽøŒP âb5?¹Ï¿‹ là*fvɇ£H&ÜJMA•Öµ;[É?Çø«™€ÿÙûàsÊñ¬#­OÞ `›@œ–ÜN,=‘Ûç“W…lbòxÐz%ï&EÕ»d¤‡½);L°dêéÊ–KÚµ¨]òD( wáýc zÒ€¡«‹N1ëí«2ýDη:@óœjêËÀÖÅ\4Ør@cb^*ÇÉ“ÊZ½LÙõ—àΰjvÛøšuqðJ‡â]W¬”¦jÌŽEî·"¿`¤º)—yÕJF1VìzÂx@‡ÿOŽ3TO<£ïéÀÊRÌßWSž]ð?¢ÝOw¤t²Ä1Ÿ‹yTÊŸ#û‡Ov95Pm;ôø¬½Ìë\7{ Ô|öÍ侓<9ýº‡÷k™°/“°~èÊó”ÛÍŒè,.$ øPмÏDd+‰ã˜µ³vu_µ­„XÖǬÁÀÎÑ=;Á0†Õ353ÞçaPq‡#®r}ãëP5¢º¨¡à.cgÆ ÊßÀ;Cˆo•\+lÊÙv|dGxăÅ˭“V³fQªRÿ{ -cCU¹ôÂf†³?º ÒÕÁ•Æoÿ\ýe,ŽÈÞ~÷W ·~(ûmŠï3Ý3ü‚i{9å8°ŠÄ*õÉÑ]Í_¨}­R%ªÇï®IÝ#?Ñ—øì’’âzBO.²‹rkécÜQƒE¿5/`^®Âݳa(Æ<`ί6w1/Ï-ò°ÕÓÜÍk/ùýAzC¼ØóÐÿ@-Q0óS±?èÕˆÄW/ÈQ{#J;‡ Óo]Ù£Œ1‹|0>QÒWO9Ýœyó{í“F|ˆ£² O¦ÞD•ú&—¨ìÓR€–¯h×/ªË.œ.Píà,ëu~ F§N¬í'_Ríøß@Íÿ:®Ý*ÎŒµŒ ë.mMØ—Lãò;MbwÎ"'LN%«íb»Ì©¹ÐAƒ×òyk'øFýÇ'ÿ?¢ý¯î•¼ÃBÅBkœÏ±ýž:»Ýèps­ÔkÛ3¹÷µŒ!„¢•¬ÍxBƒßde……–zûTÝÐp¶Õíçs£ÙÒId¥BÜèÊÏʳEÛòãd¯àÕ0ú*\ªœÛ&t~¦J˜hËp–ÇÕT$ŸË`?5˜nQ"œ!±L 5=Â/køê~h hs~ʰn:2­ù|jÅ»Ö|ÙÉ6¤º”<Ä0\ž¿ò½Õ¨—Su-핚!ÿPœQ~5g¦¨¿ÜªóZ€/¨Ð×zŒøJÅì]‚ÁW9hf¸®D“§“2&Åöù;ï?Ú˜pó\2Ÿê.™Бíè»Þ~>\ÑŠ^dÿX3ÖOîÍ–‡@×Ãj¹[\ÌÔºÁ‹4¥µ ä&Lø›é†òèx|é¡!¦­ r ÙÅüŠ3¶vQÉë©¶2á}Uܵõ‘>@6Ⱥ€˜dnUOkTèœÑþµèëæ~I¶¯Š;|ñ ¨_+‡”g{¬bj™æ`ÿ|ã7Ó"^è× üè˜F©‚,®@zæ›ôyk·Å²è”;³óïJ0\Б?‡ Ô«(bÙ-ñ0¸¶]¡ƒI.ƒÛ0rãjä^6¨Sð5­ÌAÙBP3¯áƒ5\‹œòMQÈŒhøÝÃ(›)}Ãï†ú[‚~oXÆtxíe"Ž*iHÏüºPv»M»x-£vؤ†{ ¸a÷§îâÜ1‰€)‹«â|µÕöÁs!m’æž™êµ^äxQXxQ¢çâX$Á!¬Ei²:„®í²»ù#ͨ/ôíÙ±)³-Ý"’¤¯å‘TÏw(ÿvzVÊ×4æÁîÜ5Ff¹Ìè‘èÍ›„Æ7çÛ3;Ûƒ£XQµ÷³("誂0Ú°}2ö6ÂÈøà#"-mr™-æâÞÉ´vAŸ6ï~ß9Øõt©žÏ¯k+¸ÝŒ¯gb—ŠÕâ¨Ý…æ­¾YÙ¼spui¹`{5jt7JÅ+)Û*n÷v>6èÞb —Qî» ‰{Ðz.YZ,Þæín›j ÚˆºT'Fß4J¾\¡rL`cWûÞ¨èšQõã‚n©½ÐY3ßpòÑKh—„f-B«R¸ÑüЄÚV׌8‚Î<± Ô–…¸¢¿â–[Û_¯jžŒ•êeÒS !LH¶*O:K€8½W´ñ6£d7\˜Ž^ /ªÒÒ¶FØb ÐáÌÎÞ£Û¤z :\bÌÈ”ŒÖ@"NzÈ´²Oâ[±0iaWõêF°æQp²E™*šl„ ÿX8¦õýõÐzòͳ£ç„Kß ¸s~M âœuþ?|ºѵ_sÙ.´X·ºò£¦7M}ô¶˜f䥜þzÒ¯.¸6AÛýø–±8Í+=ŽŠù+áèÚ;?MâY ò)mS€­hb¦|”Ïl’Q.”¾c-S¦ù 8ð þ½!áh×T9Ž.K+ƒ'ÿwç2^YÈêµèçzm×\ÅË’Ù⤑Ghò ^÷\õ}vZvÕ>$¥xöܬ⢋Þ*“ÄÞÉ~e\Õ¡™Ãª›wÀý\z, É©6ÍAš†²àÂzä÷š‘ÏN8erО\ؼjp«[97(Á¸ ÈÅíìP?f¤âŸ¡íŸ˜”á¢ÔŽª£‚”æ™ók%°Âò\­–| ÃæHò¢úÍDÜñOxÞŒ×@1?• WüÀ]m ×Si×C$.M6v`¨L´oYJ—'ºÝ=W£ntîý~V.:š¶-i:܈‡Ëzøh¦_‡=¸I¥šþn‚$pÞÈŠ¿Ynáòìon{ÄœrŠƒÌaÝØ Á¥82Õ'Ù ¹-g2€KþɃX´ƒ#ÍØ­ a1rÑY>p|3†ºú[Apü˜ƒ×<{èÔûZ¾Þá}°amj½•µ‚7~»§˜ƒAî¿øß7 ñÌpqɆ ä=“hÒPõNu IR˜±{ÏÖÆéÿQ =âS*5~¨ŒRj4»7cNæa Âéíq,0ž·ÞI;Å«°5ËFÐkõãÄRáÍÉÔ#„ÌЈ]h‹[‰ÅìŸâ.³f“½nUœ”Eä®]¹· üóÀH …h­Â¦&jGÜïr»ðZžy™ªÆ×÷‰gðõ دñAéDXÞºcqÃÙ° Â‹á ZèÙœ«"S ‚;Oë±r=ÃM¼‹µ•ü¤d–Úä &÷µ¤6úÇ ºÅ°®0%­¸C2ì'hŠn {ƒV A–“ö«6$¬´ÑýWe›ú;Urß(P³6£w«“'²³³2Ü´ÈžÑ#Ýåœzø–‚Oe•¯¥/úäÕì‘ÚäÛóÆÍe%ÞìàH{†¦)¢[¡Ÿf šVÖz ’ÇPqקhÉ Œ^QP›ê¸*íÜØÅÙ½ñJŽfÓóÙˆ?wÁmK¡d-jØ2ÜL¨54Íi89ûíz¶nÄô*X¾¢„N¤Çx1šµ±cÁL’6Ð'Ìód+ˆ…SiøD«ýqkýñ̹éMLñ_œj‰í^Ññ øTÊÁæXÎ)ö™o3Þ{f,£mJì] r©˜ ÝšDeÒ^Ö~³Yˆ5–ª!c(í:iïB0æ‡GÅÞ‚ï®­!îžÍ’*OáÚ眷xe,Nø§Þ¾Á‚K§w.½Ê%é¶? "…ã€Þ’%Ô4»@PÛ¦;+í˜>êAÀ‘˜˜Ð‰VJÃI·3äÈ›UU:€›î”?»V«“Cw¬=ZÄæLòaûïùMµ$à´bïm]æ™ØpËçml9“ mó0·jŠk®ÐB ”—}º±#b(4àñÑ´12lò\Ú9Ñ?EòFè&‹jÞ¯šãv¬Ûñ(Ƕ·kP§Ëòx¯LVd$,ϲŠ~;•£•ú²1iD˜Áõº*ò{¥˜‰¥L‘ÝþPõ.¬C¥Uø_™8ÔbägìÍY ½5üBµ*¬>(ªÌ ì«çû!D¢Pâm!7†c€®bþAw­~öžÙ-- “õØn*Jïøýë~KO³ Ž£óó—œDác–4âñ8'v\&©ÛÎ.æküt|Þ4|à¸í˜š{“š®¼}§PÞ@%8Ûv†ÇÂ&ÉÜ|Ã"›¥ÐÙOÍ.IŠŠõÅöØn„ÊØ¤q€º(Éé¤pËm¬aq…ÔÖ×xUåY}Àôç(²Aè',ì:1pþ¤Í|šö¦W"¡¶7/üb2çÄü±Íå F¹çÛ`µ­%ÕÖ¿Dœ÷VŽ9˜­—öìS”«·Å–£#i¢¶Á¿Ô˜mK¹ßVÐõ°æuŸY¨ õÅã‰}†B¤ ˆb µ\Œ|¤|ý\EÊÛw æÀºý@©¹ Ѽqc –5£ *~âó‰…æŠÁaw¸¼¯ßÙK—Þ«N¾¦"'«ï¢|k#°Âý¨…dÜ^֦͂m÷¨‚²õØ×‘ùñ&Âøþ]A¢ÐÐ©ê £mP(ßKŽTiÓc“L!Àûò®ýMÑ;ã lxDªwŠª¬«« ˆó¤®‰4ªVVÓöau—ìMÓ|Nªë.kKü}C™j²q{‹#AH‰PÜô쌰’ …"N¾W3`˜OÃì¤7"jm$mŠ—.~nÊ%ÊÓtô¦°Ò·¦’yÂ=©P–B.6» ë¡ÇÄDÔt‹÷Ä£JìMÛOÍ›ÓÙbKP‹…Owò CAò^U=þ«¨7éïF&è-˧M«ÖZÖ„Lyµ&ÆÍ:%c½WÚÉã!×Ê´ Âß9Šºa¢xº†ååŒý–Üs—ª–DºýVD`×5œ+ù2±4é7Ü4k¡±ÉäÛ‰Õ~æùa‹Ø·—㈣X­Ù­Mc«ƒs| ÀعvW™Â ³äK° 9èNs§°TÓ0ÙHìd))œðe_±‘ïýqTÒ•/ùμ¬â¸Èz­$i‘«Ö`ž±×ô3aJ(øœæY쓈`yùÚôH‚,qX©ðJs]‡Lm彦1à6¯)\¶¥£ }ê”b*m+æàR6³¿™(d=è2µˆ5†Ê—£~îVGÊ;¥3‡QäKú„¥pÑ34F¦a0âåƒI£íb.„úÈZ‡*§èŒ1£ú£3žÃ87i>fÓl§<%„ÞÆ^«4þRYuþÌv,ÇPì°Mmlk_5¤¥}EŽZÂÒgÈ­lË: Ú[7ü…âv"[Åò4:/×™w‘~£fX«Ö¸ÛZôûKÿXÀÈ*Ì釽ä7¼Ó;“f¦Ö5tŠ,œ™Øo­²Ò´Dí˜Ö`y/Æâ…²~O~\܈bf]Y.Î-û':åe”*2x—ñ“A¿÷ ?`>Í(ÎÔ,\ó2,ðW´tþ6¥bp¯Œ2XÈÃ9mÏëò¾-n ØcÖõ]‹“wO3€¥5oáÿ"÷‰bmÀDÈѹÞ2õ$ IÀFRT5*¾wåíÉTtŸbDñ„<³†~‹ëýÔ ˆº˜a@’X6PÉŠp ïÛëÞjáFqW+j|^¯<)¯-ã/¨-€‘(¤!öú?†‹ ²ý´Dàì8²¤ÓJü—ʆ ‡ŠåË :â©§1’4c>w{|KBj¼9ÊË—ºï°^sãëÃ%Êätv”zk`<+u³™Á‹³Ê&K1ëØÿrR%yä²­µOLë5„npÕÌÐ2» Y¼AêªP^´;%ãN“lqÆ.#9[hò¨B(‘:ÆlµÈ·k5wõŒD<-®µGpøº®$ÑdªõCö‹Ñ Ö«!U¤ÒN% ”pÙ‰³W2)á—ÿbØáUʘz’‹ˆV¼³•L¼ ÑU0žƒºOÐ`M;^{Bå±!dÕ! —ŠmÓ@sT˜ÉtŸ´3Ýô‚\¯¨Y hŒu¤]ü‚ÎB\hÌA•jÕ¢®í±çÑ4¢¼eKžb&•bcçõÞLçïcFç96°ƒ$GÑ‘Ĺˆ%ý*aìÍMkQÁcÁ¢#7ÿ&¾]¶ÃL0‹³rj+ð¶ŽŠƒ¬v‘i]Ö+¸M8ëxÜ€Jù-¶Ìãmÿ$\´H\Úr-ךàýß=í³IgÙ­‹\ó¦ÁÂñªÄÄs ¼€È¢äíWcjþ-Ä ºç«¢>/™ðnä/Ã_ûàæM‚DÁ<ØH•ä®>.ÝÿðÕ¿íGËÞÑAåà½æ…úÁ"g"?¯/¿”’d7Р6ÝŒ˜bsZÞ«z+j‹L ôsäñMxʦ”&[}Z÷b ò°{œQÞä3npXFáÅVïðFç’ªV M ÉÈ/™J¬¦Wvߢž$ ÐoÐ1Ιã˜'öçW9%»’èívîå¿Xèoxãœ9€³ØŒF¬­Ä§OÍÇÔëlÑ› ÔÍcðÉÙÃÇûø‰ì8{›)‹ŒXˆ®”I~ŸÕ&˜e©V€f·1'PñÐ~¡„†]<@é$œù”XuìîÙOñí‡AôŠ'c¡NìL‡æ[;§æ‘­ñb$Ù_fœ´ß^#­ ¶ÿmµT“Õ$~¹u|gòˆ‚Sײ´nøPç’«åû¡F¼ê,w#-þ—ëàÈ@ŠßÏbiKŽo"pº~UÛ§ôµú0’Fô{»Þµ©WüÌ#ßɹúo] ¿çÉ{dîcß3~û…Ç@e·6‡Á„Sž÷Ø>ZÖXçG´ÉÒ¬?§ò¿F/s.?=;Z å¨Iˆi‰цµ$2,@(xÄGŸ&{.¹×ɨØlI¥<°Ò8f®òZ‘BÇ•¢md®(HK x~lRÉ`twBT…'Fü”Ã`ë_H’ÚÌõë€7ñ'pÂ%ò -׆·\9ÜèÆg(E)õ’aŠ„PÝÒ1ïµdäNôüçP;%XeéOµ¬Žc¢×Üñ:)F{O„VhP`f!)ÉÄ=´l9>Úš>Tˆí¯4“™¤%µŠ"wèžž®­ÑÑαäRÕ•gXç:_Lœ=‰øO¯ËùK§á°54A$:w,wp§•/Ïœ ¡ Å6èV%I—¢é5$|óÿ)æ/f¡æèx~3¬áÆ 4/ᚊã7íÝ©<ÿñˆˆ¢†–Þ]X‘“ƒ …7N«`Á n9ºÈÍ8Îý–X­¹Ä‘q0ÈóÈ?i‹s‡¬Ë“ÅÀ¢È¯ÖβOt @5Ëæ¡ïÓÍ@Jk]h Q,÷6^9“g"è͸e.ã²$Nõ9s7-š¨çNÐUOÞ>„B-D—¸‘—¬Ì#ÍY7{½ð ×mr¶“rD刧n|êCWÆ«`©&_RBU5Bˆx INJš>÷P×à“¥‹zM¤~çey§8©$tW¤rñž˜¶è¤rˆ˜ ËxŠÀy‘Ø ºÒa´º½8ŒåíHF®V- –½ì ÛïUÀzw¨oÛØO’l‹2VËœæ@](eóQ~ÏÃ(± lÆÛ0\¸>v«ÕX”¨·ÄL#Ûc´½‹@Me8ƒ9'ÙU VOÇf±ß-‡?«¯ñ;µM8¹Ï´–U¾”õ÷u<†.&nUÍO´‰ù‹¼—éÕL´íSœ êèý7ÏÓàªî:už:ßYì¥ÃT!MŒºÔÃ`ó1†,>‡*9’Gx,§«Œ‰þÃ_·>ó[Ö6;iiîm)¾YöKx§JÚ¬>J¹Xuã°Ê–yUìÂÍÝT,>,2èµ…#%yÐ ~ç\â½/ÉpÒöA“Ô¦,ÕŸåV>šÀ¡Ò7Ë›6ŠkazójƒÿLã#xp=ú" J/${[Ÿ.¢ßøÜ ò`µ‘J3è¬[¶Ý,¦îÆMw¶² Qh§.+5¦ñ}ÉÜt1o++7.=- ¥9#p¿nþ¯äÕñ‹|7e9¥LÑ\ßšЭÕ&»p÷†ÐŠ`ÔÇÁÁxÏ‚ºõÖ/÷q½ÆFö*ÇïJqÒš ®OìC[ZÝLov<U(4Ø¥ÔêÏ üEK &LBÕþ/Ììë<_–G ÍE` +à~Q èh4*Å…~‹ß³A³Ä,MÛnp"{ D•„mÌ­ðݜ֛ªíÄVï²ÌŒ"Ä“bwÇ Ÿ”aT¦·ó·‰O9†’徿Z€gk ‹]›ä˜¾ EOÑ'¤ª®"üi ƒëƒ#Ëb3ðå-Pÿdi ½-¦"Ï¢E4^2 ©ü7tÄit8ÌŽ&›O—BµŽùv€Öˆ%׈°@M*zbù0sÜ9§(dÊ¡ËL»™ ª¼ÑØÄl€ÜÅÁ…+ø®O·ºž(þšÚ+B‰óÍŽ”EÇ@|ÝÍ aiìäf0XòaFO^e·¥28E[J–¹lcJinfG{Žú«ì×ôr•|Ô”ÓfŒøIcû´>BµywÁ•ý«8¢|È7mùøæúv7ìhѦDšM²‚a‹†kj VJªàÇõ$V‡®ÌYÔqªê02¦¦»ÀédóO2~ç.Äo…N=€PNñ\HšL¸`¶Øð™ÿX r¦¤çœOÀî–鵑]_{¢ÈÑÊ,ÜÆ8ŒT*ÀO•mU·PpGHô¹®VW6—C'½0fw[0ÈÔ/gº“bßrƒRGh¤lF3˜:;Šf4^I¦Pc®ž€ÀPÌõk)í¤mwóö¥„y-ÿ^¦=0•⾦âÒ(B©Ë¯T‚t‹š¥´S¯¬‡ÖxÏA ñv¥o$ë·Çt ÊMì÷Ó[ÚHG; ï#™œ‡ŸÊÞx 'å°ÉÕGÔ¨ ñuÊÓÜÎ*K“Ÿ•Vt¶3ÏÐ÷ý“Ë:"ÞWrQB4³Fte]'‘[åþñ3E?¤„4ðJ¬ñ+á@8¹%‹—N‰e†_º!ìl¬œÿT{£jçn 9c\xbZjð½ùîŸà:bÜåKÏoV½ñ uØbSÛˆ1$3×~.$q¥˜"´ƒ[Ö4ÎNvl%¾â²Žá3šm•˜p’ëz\œv’zFÜ"‘1µÐì‹v¦ †0ÚǹŽpæ+——FÚó 1´`N5þ½Î‘¹0èÏd°OÇópËž{%ÏŠïÀ—Kµ—v͆L¹5›×–RJºSnsa n”?¾|”¸Ú›T2GnY]H„ä,|XuG˜BÐŒíIº ì²²z€uË ·Ý±[ÁÛÜ,ñF r\'dªÙÿ1ó=¦Ñ j­†½b€`ÏÊcZ°Ç^ ?Û³Ph.äŒ&³ ‚SÚokøå¶7CøQŒ6ÒT&`ý¥Ì„a…är`®Br"³fÖn5GgéÚŠ9“—ù£'ú¾ã«äùßWÏÝ?£¿t»ÿH_& %ä[ÉÐô°a Ú½ Yt¸~Þž{9Aa`é}I¨\Óµÿk_سӧ,=˜BÃÐÜE…:£…­R˜0º´Èn±UŠ¢í0tz1ÃKÙõ|=2iÜ TIC@5'‹Ån"­âª—[©«UœèWÓ œ¿¢õQ§“Œ–èŠ õ±¼§ÕÕj…[42§±O÷¹v4T¡?¾bßùµûàI"qATÇÛŒ1ô(úpÀsäiÚ©ë t]/jgúßBü§àÅës­¬oÍ\ÅJ0é;î[u^œk|ÔåÉþ{òŒZtþZ)9ï1âDønžôAIþáê¡¢„2ij©Ò$*x$Pü×¼>ô™ÿ$ëïýWFó¸jAxÆÏÇ8ÊŠ[GuvvÄaEñöèî–þ"mÏáxXÁq<ºåC˜qUÙOöz—s¢7|æy•-Ú»øAflŸoŠ.ý/.­IëÄb;E4´•=Ÿù‡J²^:Î`_Øcâ.Æ£c?ÏÙ’ þKj Í‚ÜKIS"HDåW_² ÿU3¿ ôŽ{94ÚXG Œsá—_vYì¬YÍ0YÂÁ&CšÄQ7È>ƒ#ÉÛï¿ ó>§×B 1,'‘#±mȤu8ï ÿzc€¶~¨;‘çG <’¢Úø1ôQB€÷€ÏÅwS±©ée(Ø8ã+Ûs*4–" ìðk<Ïý@‡›VÑ|TצšF2ñ‡¼žpQIžCÞΉ3eÖWÛF®«ˆƒe± ™¼íÁU¾öŸ²KÙÞX\œÃâFæÐ³EŽn¢ŸÔÀû¦{âØÝ¿ä/¦dCBíÖ\7&VŒŒ!‹ྒྷ¨.¿q‡‘Ì7eèÝeôÛûkûsƒcò€o‹|KKàÕ‚šÍƒAüs¿µ½Ïû´7Þ†s(cc«{-©K¤R¢¹›†äì'Uáu®¼â)@ûÂJó¹%Áy]eñŽƒ”§íŠÞÅk2!¼5ÏFšsWzÛ™é2ahu.s¥ó鉞è¿bëá @Á†í+>‘^ØòYåÑ<Ô3>M[¾wÉF$`+q3!êËøˆÌ¶ì¿ßœ¨:–qØW(1Ñ­÷k}±Ï«Z?‡°÷>¯Háì*ŸWI7ÛßoðÖ\ˆŸ««ùú½?UÇßn¿Z>?Ã×?mo·«Ÿá¢@ô€úkÇoÂŒ¬q§V,ù ò¶üå‘ÔŠ@:–ólMs´úfý>CÑr_Ž5z¸ &W,[1G0a©}wzN“›l&²”h@:!¯GúƒŒp©ß® ¤*^TîáÞz’éV¿•Eí÷š!õ‚ĉG9Cš>Ùr#>ß’3tƒ…ÞÇ^ #Ö:2¡U²<+3_Ì8ÎEç^ª‚Z3Ó9Ù‘ëa\SJ:D£D›Úýøxþþ “jvÒ”âþÏOüxÊÃh¿öP6n— PQ~JCdÚ4–zyKà GN8Ò™y'×@ÈO­ßßß­”"x‰±)J‘âhûtç'nß”£a¬%©JÈéÍ[±»âÐ+ÛYi+Ä“Ý5bÂÊÞú»ŸÌeÀ# %¸6iý¾|…ºyÓQô}•½Š…KR©!_ ¢ç÷¼sÈ–’´„ïö"¡Ð¡]­ÚßQJ¼ñ´ôhF-E¦ˆ)û¸ånA«vútÞ-¦ŠèVΑç':{°¹Ä³õHˆ~þ#úœõþx¹âlš§ Ž(J8ov½Ë[=ÚÀN&˜À»=Æ‘’ž~*Ž¥I&Pç7+Åï‘ÂõH‡ì”Ã2®ÊÓ¦XÔ@iñŒ¸c—ÉߺýÉùþÀÐÌë«6¿2Èë7 ¥˜ZlØûúcÉk m=f4BÍkÛ@kåËê?ÁÛ¤F¦*ƒu\>ñ‰3Ìez[ÞSàI¡úœ1“ËKhŒG–} .~ ¾SmAóþš˜MLº©àø=ƒ‘¸ö¶”XÔÓñ¡. ê‘¬ÉØnÙÖ¿&~[¡+ñØÀ (Ÿ#îÚ”Œm„9Ý1Öm‡þ{ mßüèK:v”zGA¥ ÞŠ>›<3Œ+< ®\R..ÇŠ"ذ~P\À`Uq·ÚÊš™có8L›‘¢çŒj«Â5¹ˆŸ‚›R"°¾6tj·¢âñl¨ïHÆ,fsãY;m¤aTl×%~™Âb ]EßÙÇmý|ÞÇèS Ú0þ'ydT4f.eVϧºnˆh-x®T ÿu­™ÙÑU—€Àвm_!É[J@£l]äOìïÕ¿… [5dý°/ÝÅœë:ô \’k’@£«_g|Z(Â4*•×7¡z¨?"@|9­«ò]Àñ“6$.ÅÔdÞCcžšÅ|?†ðcAO˜?ïËeÃLFŸ†–—æŒ"„¦N®¹Îá8 ú“ï-‰W÷V§©øýö‰Ëv î£E ?·¢*³-ô¬¿E¦PEW=7§ÖòؤŒe!Béœ .ÿ Â}å7j(çÈ¡±| Gk~^ñY‘•}”7™vQf¬±×)žÔ)”zìmˆAc XQ‰\ Ê™Š–ÐU ¸7â1CJ .ÏíõÜ|TX2øH·ñuâ U¬k‡µj0ÌÆí¢™òY¼x]zqê=!J€¤ÖúÖ´Îýä=TxÙñ^F¡õӚ϶3Ïߌn½6›Í‹qRÁ‚ŸõTp§»š9»ôæ¼Ò‰»€lãHˆ'hã´=ˆ2&]nKäo¼É G¶Ã\øŸ†à-e9ëU¹z›Öyç 'Qü¿4uSÙ»Å`>hTzyÓŠnËíêr D—ùÆðœa#''¬ ï¡ËϪ¨ø/,Aìi\¤ŽÖÛ7}ë ëx, ‡íåÐyÖé\“öÁ¢nÀS%XS×k?[ǹ¾¿xõz`C8ÆpXÈÌã\È( „‰?¬Ð3ža–'…ÇgO<$‡† užLÓžé;IÆÏgã­uÿW{ûµ¼¶oZJ/8¦ÇD¨“©ìüÞÅ‘ë~]2¤†£UÉ}M–Ž«ªÒ+¯&w”–lã«+dà‚<†rì(Ï>xÕvXƒbUB»û‹#íå¶MÀna¸ùTбХto­u™ nœé푯ßÒøu¦Qn×Ra\ä†ádáÛE?°›JèÐç4Ù¥àk h¯ü‹o5Ag´|W¹‚#¾Û7 Ù W9Vdíëÿvk5nVýûÁöÀæ gž; ˜f(Ô÷å°©5ÂìcïSVJž*f›IµæË.·ŠéÚ2¬Ž«¹ŸÎô‘xZ×Cߦ Ö æ@›Äu÷ÓBNÌ §iºÁ5¾Cä.ºøt{†í™Öú[«' CÎП³v¬eØ,?Â?-ÊÛ ˆÁtô=S²QÔ€Ý nÓÝi&—ÆæK”Ò¸µýS÷Kó¼5—$ËÛIQTþËxõsiR_ià ð6øW„+â¨ñmˆÚ“®¹<9sÁÿ61cp¬…ÌÍ<·v¼š”„îçUý÷Þt­½'Òô"lÂ[.õé¸QÁ¹~ºUð3 ü0¬_Ówi#odáðo*dHSÖ÷#iECåŒósòôÈc¢•½‰þq– Ö´!bÌ™ˆ%½î“lïjäÿ$üiôþ÷`Ìmbþ¶Ð.†9\¶‡UþQ—†CrCóm 'P4QE!èá±Qs,jkøâçù! èûÐíè´‡Ã!2 ønïYluÔÄŸƒñGKv¬6µøj ±"RZ m÷y\u æMõÒ`æˆS¬|ì|ùzîÕßm$´35‹ñÛ|uµÛü[y.q2?1aÀä·€´¢Ex˜˜¡4¤->@ÉÍ飩ÓK ¶:êÏ#LmK¿HojÈÓ«ÝÏ$N¿A⥎P­W„:N›U'ã™ã¢ùÖ÷sÑMðG¦³”úð S Tì°õß—4ìÝ6T»££tºß%í¹©(…׿`T1À‡ô™GŽÞI­b<²n¨Ìº_ˈȑŠw!13ŒùD@<(±Ó&Ø¢G g \Û7Ã6…,jz¨Õ ÷×ÞÊå~;9­ò#u/YQ-ÈB‚[Šm$K$‘y«ÑbSyÖ¨ÂõfL¡õ¯\·»ã†æÝMuŠçï!.­˜‰·tJÑajLÕi¡–û Ý€ÎÇŽ4ƒ‘{¸E/4à&åîóÏTD„¢™C© ƒuºÊJš˜)y ÷=+z?UÍ3Š.ç]|sý¥J ðŒ’-Ÿµ9 bº%ç— >hî 6ÂJ³{—G!,ây‹y²Ú¬À”5͈Žá‰G›Ä…°–LŽHq܃ªÇC¦GFmÏ•²¥Uz‡ü vºw$•*_ÿmìÎòšÉsîxqâ¤x ù$MӾĸÛÀ&é§ãmqé$hft÷±ô¿-nP™ž™8ØEÇØR"¢7Âãk[b¼›y„…t½hìÔ5ýc~„ £}``¾R/jШL7PåŠÆ³z9¢ÓÌKëù¾NËü°•81è+äqŽ­ÆÃp±jªž/w³‡oSCX Ä ;l2¬[ùw-€gus¶2ö[«vÌœ¨S ‡’®J 'Ô2§[ùÄ_¾øÒ¡©1ánô¿ß3¡Ù«éåTWP¹ˆmð'œzÛ+`h$fظ¥º>aD8×êiV³=2^#bÃèú²Ú‰lëY‘è·ŸÓeAÇ á×éý-N½I¯$ë`–ŠW8€`tˆÈÄy¤/>.ЂÆJµÓ(=*Cs-±u׃„„× Ö È×mw~D[X:²h%ï«X™ic‰áú {’¶”÷L"è›À-~—¹­ÄRsfú”¥§cJëaÆÝO[Ñ '?D‚½,ë’4Ò\CÉj*ùûÕÉB1ºÂbiŸëþj×;àQ,þˆ#àéù>·íµŒ‡¾yìAx9ªöõ-äÖЇØ0§ãJa(Ïômv‘"e ³%õå ½¨àEÒßMu󜃒TÂtg&YŸn+ÇÅ"Ôµ›ÆÊY%º“†æÑ×%}æ/¨z-ø YPç„è«Í¾E[ïïÅ„}`zooü«.ùO ‹ÏÁÿmLYÂÈ5™n«qõå‡NÀ"Ôd6ýê‰pF¥Xw;‹ŒU  "󥦶M#%唋Ðí …c¤ÃË&†r-¿Cî%Õ]¿÷v²Ê.&vÏ= ¼”.fÀ'–ƒÔa‰…ŸPÌíÜh@q¨`RGÞ‹›èfQhvØÖi,\½É§­&+Åò¿ô2BÅ‘ÞUõ îˆp}ŽØä¡ã*Ðaeþ¹'WÀJLűÒü$R¹‹öxúýõ2år*ßk7Býã4Rjhµÿ4ƒoWѧŸ\ ÐoY'©j™|’—Á±;œRˆD9¨#—Ü0y•×§áË,£Ù˜¨1ÆòA—êDlpcž¼ÀÎñ&ý)ª7&µ’ Ô9¦ƒ-Áõü£÷ç{×j’]Lx\!8¤éÂî> @BDgÈ­ÄÑ|}¡ú>uMîúœ÷ÛŸËÊspȽԨTÄzoGù:³ËíÐo•È à9ÁÏ*b•„ ¦º=Ÿ]üàtÂŽUN?ÃÑW(~k›”ï&Õçª]Ïš¥©ž·Ç4÷Ù5ö­®b]ƒ`Ò=EoI5ˆ6żÞê…JÊÄ)^_C!+yCöì’— ä¡~γLŸéïëøUJÝŽÚ"þo2ÐF—Ú‰žì㨖ª6~“ øžP-l4K¶Lç^ÒZã{RÛs³ÁSdžú  —Ì#fm…?Iw€èÞ ò Xûÿ†?\ÿQÃæÏ¶U- ›¯‚W¼`6%åÁUõ­ØŒDätÑMá(3PmÐÙ‰ŸèvøÊvpNíÚµ•dzk·ãòLD” äèÚD.è>¤DÒM7ži¯Š=tf ;¬P"Ú£€ä2IÁÆ.ÂÈ·[zGe‹K•Óm‰Òî¿ÚsoD,#‹à솋ë'{ŸÉ#šøzk¿ÚÔZ QðG …O™ªÈÜÑSÒÚ3Žàk˜cY—‡Z‘Õ³B` nëèä‹«»Šüì걸†xÂÓ¼ÇGKîç”^²ªn 9h»¤pƒ) %›ð ~û¢Òîwœ“<&Êz„MðaN_¨˜Óê^0³cœ½›ÙM‰Ú=çB‰9¦rÛ­³ï:õÜxËl®ª\Rjv—Âwcýi}Òdžî:Å[[Ô%ˆ…wdQÎ)Á4cü¶ÿMH ôoèÊV±„€ß5¨¼rÉ.‚³ân7¾÷b{õ&Îp½æ{}CuIi"ñsÄÍå9ÔnIÀ™} bµãª페Tõ÷I³“¨)ܹµ¾ô#xÕgÔòv@à; î'Ï}¿Åtãýâ}1~ÉV!ÂbÌ+ß—±J 8ʲÁc¥˜ úA®OPüEŸ\§øƒÃµ6Á­Átµñ| ¸Ì°Œ­WyØC¾} Ö·Ãb”!Ð\^oÑI€X%FhÎvNc;38\nŸ ÷|Ýp¸­0zÓü¡è—Êìç’ŒÆxÀ`äD)ç)й`âE‰tÐß$ßBÓl؈Ã6‚è5¾Ïˆ– bÒŠqó?™¡‘•›ÉÉH½ª0Qs¯×R‹U t ‹¦¾ôþmÃ/.²“î:=N¾ý\¶«r]±:47¢ÁAèæ¾­Ý éo¼µ¯ãòWÖÚÔ^ÝÏ|Ì-R/i¼‡º(†Á“a­Úcxæî¦ηÉ¥X÷Q :P +ÏÚ‚7Ï’ŒŸ#Å8wn–"ú/òíB×XTJÑ0¸“$æH«â¯PËB1<Ë jiM†‚{;;XƯ ãëCÕ­Ðöúç&ÞÆË( %€~|í™ë)óƒZje½«$x'Þ C–§ÎÀ²Oÿ –o16ÛÆë·ÿy ‰±›4ÄQššÎº'¬{H}µxÊ3^ÏzGÄåX÷mF¶$:x%£b¿–§/­ ‹uØ„[!y5ÝÐæ5Ö¶iœÂúçÐÀ3®9ÓJœ6Àa\ÖÚ¾1¤§(qÒmu„rŒQ‡ ä"ædù¤DN°Œ¬Ä$á¥\iF—ÒŸËâ‚hóÛ´ˆÄw!¿Ë­xxê;‰æSù°] 1‘F¯}TE†;2Ÿ‚ @áÿG€M+X<´Íû:«Õêiøu,x5·%6QÞË ÂÓ~tK,Ç'€…–ÙÐ Ý X· ?«rôKø%z8òê øN‘æBe”™e°¦:F}Š{p{f…ô"JcyDï‘á.cL±#‡GF%˜¥k°Ù@Þ <¤3+9¤m‰ Yö$Åxø¦\(Ö.7Á'mÑðs³þIPÓî*a$1¶Žj3²Ã·¤ÿG>]’skÈþ«¥yË;‡áÃ5@±_£™¢¯ãØl.ŠL ‹ ²î/…=•ÍQ¥¼ñËŽÕˆ¯¿6s7FDÂST“µ€ñÏÿL°‘ c„wïóÈø³Ã^GvÄ[¾µØ¬åŒÃ.°ï÷–Êk  §áŽFÞ*Ï™ÁqcÍßÔ›¬i½Ýè%el…ë ïu)ÛÛùñµÙE³)ë'j»>«Ø¤´6|À`ã®9 æwСî·Ì Ú¡Z¥®Ò˜Í¦{[’¬IÙøàþÆÑ;š^@ÄS˃¦«Æ4óS"‘'Ì™í½X+ßzŒóý¬ßïiŒþGzÚ\Ú³yògð$å!Â2µ2Up«Ø¸aÐe?žhň¥¹LÎ2ÍPðQU½NúãÿôsÃm¨rÓhB¾Ü©xt‡|tÊÔ´~'äS{R¸ÐKÂk1á«!u¢× e…Ü…°´{idåYÞ¾ °ð[œŸô~a—tQ@@é–T]>6|#\cÖ¯ {HZG3,Öµ› `~ˆï[”Ó(fzåD9ÄÆâI+) ø]Òì‰cÊQëÞvsÿpsX¥NpbÇÚ+jÅÜR¼J†‘ûÙ¡ Š(ûx-Œ9}‘ôðÏpfxÓ$R|ÀÌdrÚ Æ>㈣.ó€Ë ‡!q#Ê”4éO]dm¢®iy8{ýM)ûÝ|L*°öâ¬Û•9¥2—LÉUWh9¾EE?Y{ƒH?{ýîÌ÷tVZ­§¯ Úןóꨲ۟°ßÄÊ~~RçÆóš©øV±T([„Tû¬Ù›íÔOŠÓÈej§†ý£zÑdêùʆšÊv„IçœÖ'^nÚÅûIøA>•ñ4¡Zâ+» -ª/±ØæuÝá(þ<oTþ‹È0 "yýÞ5:?ËøíÕæ f®ÛA;ÇL$TþpÐé@ÀgZ8û‰˜¾ŽT³±·ú~Î%ÁªÀÞ0!SEX-BX%NäÝýžqUšûì¼ñþê®ï|™Õê;€6ØF” ]´Hé[G™¢²„#…ÏÒaAÔÚ“Mú©Á1\CÂ)K/ǧk6¹‘øc ãÜ×±3¡.­T+¤j8hW(ÌD¬ùOuÔSͦD%Î7ÃBO­výߢ̸™Ç¦7béôøDc¢9†2ÔÁÉ®D'çF=@ùšÁ¢ÔéPhjNj1åØ HWŠ8V­±•êÜSÚ®8óàMÿu4”}E¦sØÚ©(Ò>PzÆ>ho7~ÖÜÙAžJ¼-†¸ë³Nëì êïõ‰´6ÉzÑ‘Ã8 U« ¢CÕLˆƒ²5w/6!,Kƒa…“r«eEÿ.dL ‚Ú\•álJ¤Îkt\OÛ“ð ÊIºó@fƒÖJ¢—XÉ­;Eö¨„È9æîjf³2ÓÁÃmǶ‰pvx]ÝþVcé©R­,ÅjOÒܳ¹Ï´×Ï$­ˆ”‚nþç-t2Z˜;šÅ€Yú6£Çƒ-ãß¾ëq÷…KÃÌ—Ø«Œâo«ð¾ßOVsq’éÀŸ”êˆ}¯ÇJ±.@ƒ<Éc€íé W™ÑRsÕfBx`è5™Žõ…NæP]oÜëˆ9gtçÃÝ7 Ùl¾¯®M ·ª_–f Þ²®…ž»:=E0P®wHhìB€ú9¶·càUêÝû0fË$ÓèÿUûZ.<ÌhÐq>#ƒ?þKÈë ÿ".ÅÚÏ Z’æb–ûšiçõðïˆKüáyK@h©QOÇç »<µ]gÈØ O9syQÚ9¼ö{\£xÉó$ à•(+ö'¢üaHo¬n ŽAèpDØ!CcûN…D_²ø\ yÎ-jÉD|üS:ËÄ¥™…&KiŒ„î?6ÞµU„¨vŒ|×ÔÆBw®c@i\ñë}ôá·8ÉÆ 9ºÑTòý@ bÄ…]ÔE98–ÇTÜyÅqY0ÏMº{.Œ¤…俇œž€·j{ù¹ºCØoºçòþ 73œóáþR€ëñë½XבŽXžbN­À]þûຕ}•/#‹<$P,[óNÚ7øQT;rEv³ ,¹1‚ˆwh£mFKv!ì$ú¿žJcK{Âõ Ê[‡.Ì;ÈÙy¿Ó)4Ë’âBÌTv» ÆG~Ó¸ØØqJ”(9ÏcbØ9b»a½yt"|¿N¡k¦0[œ×8”͹ÊNЕž%¹†ÎÎÉ®o"i3 7œ6Á‚Ð ߆d X"tb8œ4)àrža¹7^`Õ¼g©^$ü<—¦x±……!0÷Ä]}øWpjVã5Ðâ{Ní¨[E¿T©²Svïo°°Zy*—ÐÓ#Óæïv¦j?7¨¦§¥!…Pð<@Ú9šÝk›xäxî};¯|=¬ZpÖ^^…ÀbQüøO”® çT@™¾É§«âMj'4~+¤ÇÌ>Êæ"½Oƒëf^ Ûª‘y²'#ŒcŠH¹¢ŽÕó®Žèß<3ãEÙ98­Oìu![Ð×·JúNì“f¥žãø´é£Ë?<ßήî…nãw`Õ«Àv=vÒ)Ú`¨¶ióèw¦À…‘c7 µf«1ù]\´UAö4ÂФ#(žþ×°îPX¸kwaI_wÎRëÃÓõªx{%#Ãá.c  ˆ’Ü“Ý.û”¶1šTOO”]" Ä@ ~Ì}Ô@/C°]‡T¤ tråR|±ÓÑ4g¤Šá%H«›Åºb"?ÎJjêŸMЙl³…õªJj*o_E]˜v¤^{øõpÒâ•ÇG?2qÃ<æè^¢½2Vb¦gï$¦æþ@`5n¯£ %zTl¡$!A\¥=mSCäE#ÉiN®ŸO ÆªK¶ŒÊ$šAVºMß³5«l­q¡%)¸Kà€ª bpú#nË>óãÌè«ðÕò®÷­êzwÙ4ÕÇ£1Q}åÌ^L¾¦õu¾-ù6 ”Âc´Jf/”¸d¡kV…âDIP=pÓ>Æ =Ìã‚M }·¡MÊþ¥ov×€—¹ý¹ÿèñMA5¢.‡S™¯:àyç`¯ ¤Øgþt³7kz©n%Î˃ûÆ‚Çy3·3ŠF-/uÙs¡Ó¸ŸØÕ”HÉÉ Ó×ÜÑq¿€RQ=¸½fp˜])™ óöåf=í]çÊùwI;³³L± ƒ—<›oeZ§ÅƒÌ"úhjĹ)LG˜÷–»ŒH¹ºýˆà®áÏž¸¥ºiRÐ×ÿ£º1í³Œ0®ç|+\N Qnc€Óì­ù¹Œ—´%ÌŸŸÛ/|°gýÆ&qîçÀLgã˜Á­:ß—Ê#LÚ˜¼ÆÝ E<šÉö‚÷ì>|ÿO}ŸG¸)»Hæ ƒvq%GÛ#4CƼy§¬vDcÓñÀãM$ÕŸÁÙñMº [ÜêƒÇW!uã4çåe|Ìx?DöA™+n¼Tœ7õ0Êk0çpó–ޤʾb!$Þª‡v¤ –Îo* ú–£#Ç 3w¨¾oŒ:sÑÄNL€x5è”d@0EVÛ†@ˆŽ%Ö4cc5_ ³+Ø€ æ5WÎtqb<ï¼BvåStd>Þ·÷Í¥(2cë¸% O·›3D3‡I­"Èë·Žho]ÊiÛ™èN¶–~-gäÒØ ë2oωJ‡l&9óOô®Z׎¹{Ãæ÷±I·e¿—…²3¯tˆæ˜„sPù*ØsJA3Íú#zØCeg+h•ðÛˆ$—Y.Í "óÒg9"»ò)‘Ž6+ þ"Œ"-¿Zs8um&À퇱ñ±«â’@N«¥ºëg›rl¥|dváÈ„¦6z ™`Tâ$x7ÕMÊÖäœc·¼ˆg”BˆB3äea5à‚¬+ݲ/? ×:L9|Z÷ò©å‘aê‘~]Á=Èaᄟ²g}®Î@€nîm¹Ýèç±´ÍÂäÌØ8WiXߌw®› [øÊ¼W›–Γ¡jEúÐXVÆ—µ‰€rÝ–B[êé×wì]ßûFúŽÚ5äSðܸMøÁ/·‰-UÅš"ŸÝ¬Pû(I¼0§}Šjœðï«ÔI¿À1:a.˜;f0†-QÏbIr­µéé­L6O…†÷yv;Í.´aS3Nº' ;öˆj˜Kº¶ès=‚«^¾‹Q?LÃÝîc"E?vêü½[ä°È¦êr"°ŠÙõ ıVÙŸk˜åè¬*´üL9@PÜHÝ/Çw1läLÑa^ò–жí)|fÝÓÍMšñ-¡Ì„õPR\ŠnªsÁ¾  øÉR£ñ+þ¦,Ü¥Moçº Uúd6õÓ5.9º -,'ZPøT¦Ǻv¥. EÕ²ôÀ{¼ùó|óRéô5¦åå×–w†Dù‹Üßnɾ>¸œµcâZy¸•# UÏŒ€Kì/ /6­\¢#ÀIßBA<äÈ”ª[ÒmÞîd]»>͈L$M¬|‡ì`Z&žfG×*4 ãì‚S{›®PcÜM´1œ¥»–E‰ž'V‹KcèT±«šd9m ŠVIý8=aÔÓë ¢,HöFCFj>9tèpôôLkךsssÊÍUsPWæÄ#[XÈ47›úÉu/Ü›¾¶:¯"þ¯VùR.øÆë ¸Ú½¤¶¸¸bv8¯ùˆ/Ò–Š“^ VÊY|àµX€.$–#‹îɳoÀ{㨗ù›[h#FjJÆ®@d隇…ðûhŸî>e`€»ªš8RŽ´×îh9®ùòä8FÖS»ä`%c‘”¤¥·G€¾Lù×ûû†XZ¤;·8^'²µµý:®ÚG˜LV4ÑÄå°œ¹dXÝ?S³ö!ª ,µ7¬¾£["ž™Ø2öê·½ ™ˆÍGòXµ£ß É–"ÚX ½öòæÉ˲äû<¿|ÜÛ«wýl\´—²làq(€Ðg„3¢Î$º$_Dò ™ÊLB¾KRòûÿ~)¥*_Ö³¦–Õþ2 ÞËG£u·•Í|f{1ô¤ZxPL=í'Ò}WNŠC,,0ăÌt¤ý#Øv7Ó~‘™£c“µ4·t ÷7í)ì8iøÌ¡H¨Ïþ[0S)ô—`¸7Ç:ôTO”/…@›ç9\}I¸K“Dz@yºV?·hj…×ïŽ÷Ø?HV£ŸA_åö}àØƒs°S½ºá1|J.y‚ ÌÈÉ0´,™Ô?]ǘas”.¥4“»ED@ó·!NÉJtiafGo²?æATÒWÚ§•øK÷ƒ‡C¹çÖ_=0qÁÐNz½ “¶Jê' 4è³]¤{¨x­¯0¡I|åF”°}¹p‡Q¸uw¬GdF0Ñ2ð¸"Œ[ý­2@½†:¾ÿbAîB!‘?YS3Rï&'*¡£8(˜k»I•'H ÷)N]'ÁÏXeDm†Ð‹K&­l9ÙB8hÔÞ§,¦8=ÆÊœLD ´žLq-FÑø{µèPŠßä¦À7ŸÎ%ÆÂ„&½Qðï=Zš¬•ýMÂe+ÿ^™~QFB„áZ—*ԸͬK3®‰h ýÐví8ð•__«õj½Çnô¦ Ø®à0ÖÌVÀÊ;§¬0°-º_¶×kõèÌ–´Ší¤ðZ"bÌÏõç=1<q²81žW·‚Eí8˜±tÅP° «2UÜÞçWÀ%zóMlJJÊØq›ï9]$RÎ_¤SfûAzÚÍ1=G øü'¨ÎÏ#—z‡[ÞÖ4~½X(ºZ2ç³Ö5Ó*„¦KGƒ«¿Ÿ4ê Ùš2£ ÇþŽaxÒö©ãïdY›¸£”hÞXᜫv¾'Æ'Ø«*¡"é’àö£Úòô—ìöØni'܆”î£j”™iNµüh±v÷­æ»{Y ÅGPÖ¶†~±¿'*^¾´î'žwW¶k'8Öå¿f½n©÷¬¨`b@‘DUêLê]9 v,PÍ´!´2”'èëþ•—žäI‹P~»º;@E‰ÅòÝŸ0izºe­O#ˆŽ¦iV0ÿWô¤¹£~=9àøÅ ;v–b¥"ÎMùz}¨b×IàèNSµC½£÷j€àšh"úXÂÊËO6Ф‰>†隷Øl–æ8â a5uà‰óÊ×z8Îæ.S7ZyÏb´Æ2Ä“½ ¼­/]lÏiÅÕ1ƒ€±SÅ ÚüXÍmñ#¾V!¡<òª6)ŠuZjq/p³^?>k)‰Ëœñ•„ñ-ßÀœB~Š6] °3ÜwúR- ÈÜ…Ž‚/ ‡ ;h˜U5¨áÒjÆ[(-VÔ¿¤ciWéÜô‚¢Þº¸Õj:?ËÖ»®ûІ /u)Ê5kSíìx€ç¹¨‘ŠQèE‘t§Jrï¾1“„5D‚)³ÇÅ<ÕѼ+ËN5**žvªµÞ¶Oû £Œ%Ô>H0±£à²¶ðS†˜áC¯Xâs9“Ò-ÖC:<ï>öíüæ[õÝCeœ-û›®7ÎX‚&l6JÊ¢u›ÀÔ[q30”·’kŽT·Å‰·ŽJ‡fféÙ›:°Û¯–{–úm›£¶þåëõY¥¸÷ÔÃ^‰:˜cžúp%FÛh¥S8´Ó³•½ð ¨Ô!<Ù²I 㜿Ù%œþÍv<¡Vf¿šHli·ï5ª^³ò¾Ä‘ôùQo¶“Þßî ü+Rœ™Õ ,KÑÿ%¤­YšzmþÙšÄ\³` ˜ùNó¢æx|J~»èË(G4dþi–j‚%¨©©iã)0š=ŒkH$§Ã¦™¾CQ7E#XŠ5µgó ŒÉÆ£vžÜ‘?µ\¥sØØ´1Gp®ïé”8[f:%{ÐI%íþwõì>˜k'ΕÿxG6‹Üðõ>¦:~òo^Žlô)R β³bãþcÙûMdF5Â¥)Ù@oÙÓÖ©Û¨›ÞÜ›ûi®„ð•ôÄÇ 9±¶Å4hë$V• L –Ísénå#çB_Û1'kJ§J B7…ˆA”šzÖ³RïKø=µ#DëŸûzˆJ£Ñâï”uŠóÙë ðEUÉÀ† a`G• ±2Ò–œsJ ¨ªÖëúöd]ˆ¶²d¥‚I:GÖðf“<×ëWæãÝÊ•|¸ßÓ •ê$.¯œÏÙÛ¿éùI<Ä<˜Eeæ-WÄ`cõÝ®ö5TÓ:5¶÷Ññïr•±@›DiT5¼æ^,ø $èæ›TK¼ó-Ï·ÅÁlPQe#iÙ¼ÇÔ‚âFÿ(ÝRÿ ƒº„° 7røÏè,ÜݸLB‘rÞò°ÇTVÚÛîÓñÊÑ]´d–qŽEµc £¿0U">4ƒSMÙUYÑ'?]õtyZS1¿² ( Kvb\›„U&[NBg îþ@Òa±ÝºD:?Ì´r ÊïO”U  vEÎõвQÍõ‰ÝJXΉ$Bˆð`rè¤æ®µégÀ/Á}³z ´„ógÌe«ca:_ÊúÀ'(¶)![€,¢ÿ:urš©ˆC›hWÀ}[Ž*÷¤Ãwô`ˆ)ž†ÑvA&ºø™“Lìì9Ë8ÄqóL%4ö–?@MåÍìalrƒ v…L€6-+j[+*b–)öã ëôDàB[T9±îR–Ê$Ÿ©ÄJúONc!Y…éoÜÀRkçĵ{³Å g¬šnë°²dPO¦ï0ŸÓæ–adFÕ¾ï¿ô¥0Ä|Ek³)7/_ï˜Ê!l®‚Kè"ú ™{Mbjy\݆àMŽç6G^YÀð—RSTp”×z]*ÿ1:š0¢Ì±‹"y²;}`…¨H˜&ËÒ×"H]Âöð…çG]’i7ͳ)0L «Å‹¸˜›¡ÞÁÀßÁG§Š ¥»Pô ±|€ð²z³"j~åÀù ¤ÅN2<{h? ¶ò–Åós=?Lý1qÀ…½_T~„î~±Ä¡*³t:1~žâÛl |fhÇÀ×Gѿɓ¨±Ÿ¨X·û†þ/ú” íÙE¬ÃiåaQà@~e¸Ó7[Õ‚y`®à8÷ù„ †•HK;Ê9;o¶œÞWÏ}ÀùÀö7T»Ã¦.ƒl2¡&¤%ù­Ž÷›5F:¹èÓãró«Ž´ÚóIFÿ‘â0D|½¿¯wZj3Îã壌uf¡~1 ‡£ÖuVôÅ@>Ïï7ƪAíQž\¶ØKc QÈ>ºxÄy®!<~˜’ëID4<l'yV‰]G¡(¿¬1Ìl¹ï7®ñ9¼ Ž‡@“Ÿ†ÊKWœâî¡®HaÛú_›ºö½}:]ìléÖÙ“lš›Mt˜LÔ Ðžéø“0=÷Âê%+û3¤«d;p¼víë{.ì0Z(Á‘@?'}nç³—¥hÅy†8•àŸÖ%yÜã#xÿPq»éR\°SíĬ÷`r‰‰ã=cÖŒœ—0$YRÜäKCdÁGøE©‡éÂ#`ù°òP/oAÅÖ‚ž ‰!£§v†I.Å=]¸0:¹‚äé[ÕX…£(ÉO5Áò…VkÃ'³ xJÙ ¸¨ÿ*jÄŒM#z«¹Ÿô=b’›ŒKËÌ{”o·GáD"‰@ÜP Y”P²b/íñÈ;zei‡©]6üüSi®íõÒJ: Ê ­üfuGþ™¯ ¹{mÛNúvŽŒÒcí[Züx€!!ˆö\É5¾þ[iÅ,Þ Ùìóe7ÄkÑ=­àfæÃ^Áùu·ó{™ñùJú?(Õ½ÐàIm±èm¶ÓÂÜ{ «VUÝwܽPÖAd Ç[fÙ¢QG ÔØ¹’IAZ`æRõBâeX–œ~²¿ý%c6žšª*îè HW+-&Y‰Ì‹Ž‹ÈEÎó~I‘êBÙÈ»‹–©ì Ô ‰²d!öhl‘ÊÈÌ"MS»÷Àðwrû œ°¬*0~ÛÃú©ˆºg÷ ñ昺‚K1:‘ó*N™äÁÒCÜdçˆ>À ÑDE‹Um$ÁÓ†A]NtˆF;ÈC>ËÚÌñ¶t!ÓTg†´¶n—lWÐüjw|`3Ê&4«ÒÙŽ!L£5˜¦ §Ö”þ$ty9j#œy¨>rÛyXÏsŸj1xú¼”vWm7Eí/løtr 9‰\W÷2]}1jQhÞ|w!PHûiü®{yô8f'(D›°d·¾Ü…Å8&¿´:8„Ç_ÏEÆ1r¥³WZÿnçš96f^é+o§A¡ž§–á* ¾e?Ù Î â©SòµuÛq?æ¦I!_¾'YÿvC [ÐàÍ´_p!yn}ÚÌEÊÕ®ÙZþìžÑy´ö–Lg uòÅD–‚ j™ºÂ(<õâgšÊùúq®Rׯ÷ÿ„û§Khtgè?Žu™ä­áËNÌlðà RWisGON¼Ü ¶ã>­Ç'íjAÞ(¹— %6™ÉÙ9Raˆ|»á#$ÎaX…—­¥ÝñkÙ¥g:Ö‰ú™$ãU½v}Ê1¼¼†Tý·uZ(Ç‘ß±Š¹GÌïžO0ª °÷N·I*ö]®®Ñßòe©C¢Ïêì]œÛîê&iµ_Ñ­ä½õ.¦;wOÝÿ+ýu+B·ê%ÍZ#næ–û£gc,ÎoWL^äóîØ‚Õ&Ñ+dœÈä¦È(£Á3+ ²BWºÔ“¶ÿˆ¦ y¤‡Yÿ)sø ÀÇ$P6V¥z_hv±“k”Ç÷ÛÔö¥Þàáþ|«»tP£Rúj{YD‹pP(÷ÂzÆÈªÌï?Pò?Še]”3\ÃhÌ ^ÓPµo•wžÃÈ~ú¿ò'׿‹MH©¶ëªÔ¦û¤Ä©ˆy@àäý‚ ÊÁl ê®ÌÍéãôî@à¢Hó²XÃܨ‚‡·æÔO_Õƒ & jnvq$ïúuC‚Fw= a*³#+únѦқ¦z!Á¿æ»* ÞWºÝ²„—´qþο«J;»‚µgÂ%PIzÓmDµk,Šøô+k"Ð¼Ž±t5D@L¦Æ‘BûwüY|ÈC-±aª–)ÌÕªMê‰[r‡àwõdÆhq²v1oyjB…ª,£UõMAf‚û¢û×+ß%ð)ñ½÷XÂ:C)»HÚŒ±šz€.æz¥+–ÐÌ$’ƒç>Æb2j÷Ê.a©œ*ÍZ9s(¹’àl³ &Ƀ÷Ëݳ çj4a²Ì$É”úC¢A[ÿ÷š ⮤{h™ÔéyæáÁfÕˆÖ0FhÇï²—|)È8ˆ 'Akâv/vòÁœf ºË“ìF~e¾®BP,T JªF³Y›³•híy°Úº´ç1‘í¾Goã¾×á|Egl÷ð#? 1>òöãà;WÿZá/ñ”§àò/WÔ;¢KC•Ç “Á`¸¤º;:¯mË$a¼ì¯·?Ì*FKÎòl¤‹I(k¾”u€óP‹"ÑùýF¼›ýýütrº…€ ^–گ탨l±Ö _pá\‰zéx®o\¤²Êܯà}x¡ Ûw¨ÙJ1[úë@®µ98ÑÔÆPœú‹ˆêÿu³wŸ›9WF‘ÚxÄjÒsúYÏ,¹9jejý šù%_4• ¹-{ÌòëY…ê²á©³k¾‚Y<6L‰—×QxÏ"÷c˜…fïÜ£®ÅîRˆ&—ôf\zçJÒÔ¯êJ` Ҏ˧˜A€í¨BA[Í”8·¥©PÞ07Š.\廿哒V\týhúÜ«œÈ{úTO©–f¸™W"A;Ði÷h#Ä‹& aù¹XiˆÐ¹l2jgSymá†â1 s"…5¬±ndí,ìÀõp·×ÎäA¤’i¦%IøzÒ®»‘ú}ø…*Lc¥(É÷g!ÐNºn¦dÝ´œoG‰¯ft,@¹Go¬ûˆ˜‹5/îK”U’å.6©z;”]teìù%~ÏK­C×.KˆÄçŸF'Ϥé,°ðùkÚìÕÁ•0o¢æ¦UUÛ`Sžó¢«;æ&ÍÇE#Hí_þ‡"±Tüõ¿pɤÞ.¬È‰IáŸLh®–ž£–Ç\ù¬8ïž,6É£[òÖu÷3‘¶¯±áª…¬ŒÙè=0w—|€a8!/ä›?V¤©DHïzeµhì¾,ÿ2‰ÐÙŠ'uŒ`Em'JEÀÞÔ]λ¥ Ø{· )öÛný1쪣•C‡q Ö˜„Ø¿¿uä|Ú‚>ÃtMkxͯúÀ‘õ;1Ï5Ï®§.&ÿf”™yVédüÂÝqŒ }ϲ¼™Z ëAõ\¶ú•ë ><ÂýËN0]½ÃAy ê/k ; ÅëKib—øâkÜJˆÕ„zŸ±§øÀQSjÑõ¬‰‰tpdÙÖâEójÞ4·Ë¸]´c_¾sÏÖÈ%Y;)‡‡]æ[½ÔŤTøcw[!1/‘i—Å˱±SyèX2b‘Ä'[ò“¯’ž»»`½ÕâkmĹ² hå„©ÜjÃŽ]‘*ß¾TˆÅÊ­Dɰdt—S|…¹íIÇVˆ”70¨<‰­Ô9°›ŽL&Qb«?Iо9 § ú0y¾®îŒ•“ç$–K° cÃ!tïÓ0I]÷L?lq5v«LX4BQ!ÕÃ~$à 8â[¥7ý‡“²³„8è«DKÜ}fw3iÛùo‡X‘’5×HÑe:%ÀJd“Y‡B§,ÖsÅЧÇUÊ•-ŒµìÁÏ©2ˆ:‚¤'"ÏI¥<nž¹è)áeyM•0Çn“(ïÕ ³b<¶%¿ÖR/„¥¢%¡ðˆ±jÍgV LìÓÝÅ^GhU>ÕaRP¦è(w)^Kla¼± ‹ÑeQEJ#Ís®„{<71´.5ñ~ízDVá’‡¶Üx&Ê 7wj^–Òiv¨õ žÕiˆ—H²€ûr9 #£—£€¤Ç5+úê:Yö)Õ}{\‹ñ«A\W—úÎmSÈE¹½/K¾L³½—!Ããý"¯!‚:[MÍaä5f³b;JeSþêßA†,Ý(üUàÓI‡Ø#911¿F»_Ô,.ñyÙüµ‡ Eãºn@訴'Èý»C=L‰Âòùÿr›Œ7zÕϨµ{×¢Y¼4¤1Ù!þ [YÁ¯$ÉHüÞñxzÊéAhÿH¼[Q@8øáv@ò[yI ›£16‹É‰p4IÐÏ;©ªÂÈu4JÜJ”%E‡öÅÓi ¼é%ÅÝõ¼>ÖEÉUSœ­Vo„7*¡†×ä¨ëHE»}S‰! ª9 Â.[Ö9—åp*®’K÷HNæt+=X/œP¿|ý5h†n¨\~Hõ5EÇÎ&ÊI8ôhÞàorÜŸg ª€YÎÜ‹údô°odŽÿ³uŠÈü‡âêwëJ¶ô–¯þãǯÅm‰бß6êÝ-×CÿKjZš«1#°Žþ Ìkÿpú¸zPtÐG(Ì?RœÜâ) 3t45Ÿ@=‚rƒÔ[&­ ]0Ö\ÞÄWO—ˆ À’2å[‰^¬û­Äë¢Q@n©mkv“ºè5Ѩ û2BxúXA3ªèòÄñ‡(!Êl|º5,Ÿ¦æ 'ë š·¸Â…,l7=O‘¿Ä2TKòìÄþD_¤\“®µ+œùüXG€ÔÊJR^&à Üzdo P^ÑKád”ñ¨ 8øó  Üõéc÷@Ûâ‚‚xdÓf.Ý¥DÒ™³Z8p.¢»`úÛ6œ™O™¯æu ”Ï ÄÂëÌõf+Ü­u}y-… Î$ƒ˜Å!cTûPQ½¦%1“ÚŸ_=¨ïÙ ÝÃ÷ n愃ÊéÐv…²TÚ>xºZlŽ]3 {¯3 „t?Ò¸½ÔbRô›Ãþv ¦Õ\>bµ,%—“îÃã E+Vš<ª úaû}§¥48’X8Òî¢ôm(Õù—bËþ6Н»}ã7ó™.I­6 }ŸÐÀYFUºñhèãRò`¡ÉÈH“©ôs:3ùiÌ% 124™; û;"ôZ ( ?î,ŸŠ5xËü¬öç´îô«„£R`Æòy»‡X Fȳ{œ9ñÿ+•µÒ7o[Öâ ò»å\Ê…GAì‰BmJ@5 ¦0‹i);þôÄl zÿyÍüµþ¶XVû›HÛ*]cmžÀ-õŸÀÇFŸ³Œ ܽŠ0Ø©1ؾ0úÄe rk5À$nYÆ…NŠA±û©õÜÒzjˆ•u ¿ƒÆãlkõ#¾0fr‚m’XÅJ¼XG— ³léƒZº—¾ÃŒ‰“k_GA^Î]'áX5Ì¿Wc*±­šÉ¦çãqµØ¯„m©mÓTføk4fï«ØÄÿReòñŒîèd/·K4šYÅçƒáTyq0Çp5ß‘à´VüïlõІ{‘ÎqFÏÕPÝa,üJÓ§Ù6½Ê&ïÄÙÃ|™OÍ’ï7S’ÁÖ ±T?‡B{øîÄ8Zi°É=‘•{ maVS"êÁbB3¢$u×) $›éŠçÂN½K}!ÝRIX?¤"pÖ·Áÿ&à ñ€oܳ”B‘ï…ÑÎhx`<—ÿÛIõ±ÌÀZ°äázÄ{áIQ'CX)i4$æ,›U_Õps\¹ŸëôÔj‚¤ Á:”@ ²²È´ådàAÓ/—>èÑݶ_Ù?ì4á$ ¿{n7®bòŒR#YÐ_‰¬:c˜C„]3hî®"r!^ÓÍÆrfÈ–"ëÀórhPÚ™ÿgŽ@Ã#+k˜?8~ˆgå·—Rb0}w.'´µ%(È‘nAÍì±{kÙºUùW àAL°ã\LÞVr =CÖ_d>«S ¿ü¦eoB‚vfmýÏ3t6Z¹æƒ[»wŽÚEÕ‘e‘ÏŒËh<ƒ©âûªù^†$£¡[$Ð&\Ã<Fd½œEDïqn3öå”D™Íf„Èv†[Fy-ÿOÞŠÏ"–¶Øé/Ë3·Üìõ— {#8¨AZ¾#é$…Ìr<f΂+bŒzVëà&$ ܹxÿ.äK!J£+qÛYlñÏCf¾`ö”Kš*•(Ì›*hÃnûGÓcaÝòTyaÔ`™¶iCzU?g¸zÅs‰¬¯W!s]X©í[¨.«5ð74RáÝàÝòš'·Ó ™<^ÙŽ¬uD×T¦‹q]¦’=c8«ƒ%¬Oll¼ð´ ÷Eír†¦qv²öÖûH¹þ/ñÉ‹&¼°”1íåçæíŽ+C%í[<ÛygFÈô‹û·|bÑøƒÁVòƨgwªFåW›AïbÆ †ÎY€¬N’¼Ÿ½d`–»[ZàëXéLJ6[¨›ïgΘìuzúy)&âÔè°q8ZT^:ÅÐ\у ¥Kz§‡¸~Ë#>½þ´LOzÏëC“Á9fŠlH×œŠ›—#}ôXšYxœ (Ô¿_PåH‡¹(Ð òVà}P–« "‹³XQM»]i$dÀÇžMäº$Õ)\m¶hõMí¿(ln½ò®zý´UêæFnÔd5oséd 6¢%(êQ”pF8[“dåï bì‘ vª ‰vÐ’¦ç¡û«×Aw=õ"^OUÿÈ aš_îįɱƒB@€QÍ|”#6:áââÀHbl0ÌÐë?mÚQ ¹7­G jÛ:¥É)Ÿ«× ðî4Ѧhy4izJ!Ô&E½ü¢3á*½÷€€Ö>ÊÀ¢ëØÙ‘IðXþåD‹˜¼²ó+2öÌb7`±ÔM湋&„©5±ºûräq5·{*md›þÊ3.oGMWÇ©RLrià yC Ìx”éeÏåxnÞØü;Ž«ÙuæM\aÌLXήEºôì÷†]Òˆ€ ÑǪ"µ|‡. =‘ç•|tdžÀ¼Qo±´J‹bNÅ]Þšª½ É#[i ¾VÌIgÉuÇ„?Òû•* <«Ëâó¤:Úƒåÿÿó].Kk±*z&7)–uòa1ïc„êùfì©¿—Ínþ¨[­ÚÁ Ò“™LÁ0/6H¥,í„Ð,ó_ìÜŸ²_ÞùÁán' .χ¯)çóÚåµÃæ^Ì2ÓÍHÇã'ج͊dSSØù;Ðãldß¼¦|I€Š NI¬¯ XöCàKP;.Œ'wd¬‡*esè‘1N4`Üm#‘Xãíqð±8rö ÆÉEÙÓŒ±îß“ áŽã¨N¹Rõm7ÂN5Ip#/ðcs<ÜþŸÝŽÂK¹ð+î6ÀÁ#ŸzÍ(ÝôÇ òØ="Zà¿¡÷Ø>ZÖYSÀÿX¸AHϱ½Ç7ËkäašûXÓË1@ÿËü:{ÿxB Óõêé Ú^äë=˜™iõX|'Yñ˘cTVåA]Âst¢Ôà(è9"¤ øu}lrÔŠñm ^`7~ÎäëÛù·Ýâb'¢t‚6’sh!¡ ”MIz ‚"=ŽyJ$,‹'¨îÙD2B0)H·PKtêfÁ Jç5£åB::¿xaCÜh8E´†â§Ã”&t3¢G¢=¹pp8² ›óSHÕ/ÅäÖäü5?OßaF•Þb[±TN pœ!D0fâÇÄ@;‘ã4ÅÍ4¦€f‹;µÊõ¸Îë -„o¾˜JÀ])x°ðÕÀÔŽ Ú¢ý.Iô^XÍ~Jã>r§Šà·1tëE|„ (²f”ä2²îè®1¡f7ðOXç8x§pgì’<  ¤Å!x2î.3hèè$özŒ‘ZZ½RMjèxU§«!ñÊëz¾P!ŸGuíѯÁEÁqÅCrvJ_´G¾E–7R€ë C‡(¾xm›EËÒûø ,¢Å=’pœûDX`hÞO¶Í÷ž¨L—¡–¿±³L.ýêõj GGÓ&žšéeiX1“¶`/eyåw¦åã4?à ˆ ¼Ý=êMº ¬™™;ûë»—˜Ûfß°’5Ür–Î.ó/ ó›þmék}²D·ÙLLÅéZ9ê>uŒ'S #¸ì‹±°2¤ %PI"YªßÖ¾ŸÐøüRª)³Þ\3W]jdÖo9ÞIÜTåG‚/C>ášÒpJ'¦ßN"¦ ØXÉ^ð)kä*A·ˆ¥I%)êI¾ï½„ôtžt÷ý°¯BS“Œ$eþ^Ò=‡Œ6k€­d´›«]¶ :§?ÖˬKôÜë[w‚É©9j‹T M¤ƒôØM!ÿ·”MÿLû6…e²ë܉~Ú6¡ë“2…«‡XƒðL#eŽ’ˆŠ‹ŽQy"æS)ÖOp!%¯rB¨©jPxJjä¾u‘xä y!0¦£û¾?rä6/m³·¶.Px[š„ê…qÇõänväŒH3[ XMzZûô ë*tñ¢—Fí¿:Yˆ™~óüÌ„žü,Pºô£x½"‚†Í),°²î³æ{ý¼×ß ÿm‰€û1 ŠÎ<ù6,ëÙW•¾ÝÁ±ú0P^0Žv2DÍÉ‚÷'ÖðW°ñŽáÏ—'êò·Td‘¡¢T >ÂOî;ìHBHï3*íÇÒ¯@8¼PÃ$²Å ·Í*úw%1[ƒP…HÁ`ÞÞ¼1¯Áò¼Ð2¡´—7 ”Kñîó¥ÒÐpHu^]}c´½W‡³¶d‚c¤ÆæÌBÖШžž5wúÞÿDÕÎëa` Iž'ä=¡7.¯Ãº2öÉÉq›¦Fª&d#íÆ×C>3;¾óê‹»^s!ÜÄâ;](4"€^n7ß Ë°5"š„rê êYм´¥Na½0U×r‰ÉOÏåÉERÉ‘çê³øÃeÈ‚9S ^È}cîÀ®õ/õ~ñà´†_wi¹ðOà‘¼xÉFíí¾`̬²mFõaÇ·Îì_“SwÊ€—e…=ÐA‡×‡[Äžš{Ñ^½Ó–~Á-)éç‘|ÈÕ½@²™]2ofp­’ç‘Ûx)£žåE†üIt7§žTâ¹à¶jÊü’LÚy›žRˆÛy:?Huï>q‹ŒÕ¸2çë3¿óµøßìèWÁ3ôõžúä1âfõ:2ƒXÔ(‘ ”Ê ˜ˆbÃáa¸ç·¸v*™oŸ1¼€Ñ#{¦”FCêÝÑuÚäËàkÌç–ä©!¯¼Œ\ÌzšCø÷ÑU»Í»xÓúÐÿ&h©…CDíH±Ÿ$ÞÖ(°níƒ<£¨¤–¼0Ð5DŒ§\b¥r^yÓל;÷È\Nm*ð*žú´) ‹tNSádvH£a·•Äzwè¡ÁÀt¾{ŸÇ#l¯ºšÿr B µÃ–ßýNèlÁBWº‰5~å®bd§äŒkÌ¡ œ*Ÿc‚Àé¦à»0»jEg·)&q®÷J òÏÔL¥+jÒYâÂõaccY»¢Ÿ„Û’}£2#–ë:i,Ÿ¶_Þº.ôIÁ°ztmD3UÑÍÙ¹ª8)S Qª¬ÒU4€i7YZ™7h9è”ùtéÑ7VÆgÊüÝIý„˜a…„z)6ÁŠž„ðð¸2»>K¯DÙ¤óR—ÀeMÁŒË™Ê5£º{›àñ ƒ ß.^ L×ÀvÏÍHÜë&§(Ä+µÒȤàsƒô½ÕfIÎJÕˆxt ÅEõŽPå8Uè,ÔÝç΃]Qêó ëQw Í^òûýŸ¶î┤9º ˆ…q©ßŠg ’‘-Ì„P³ ÿ6øp«O¹!¥r."n%Ž&q8Šr/¨rÔG´®6¤.ÜdPé,éc\¦„cÅmù˜(øþÜáQh‡:òú3cíã/ÜÂkÍuæ`Šõwƒ#ímxÖ÷v8}Bd>üÑå´Zýd%.4P1&-PÑÄ]Lå&Êî´Ïz’›¯áŸI Ú×0èŠúT‰Ähß#T—Yˆº¨»|RKgTÈß^TÒ‹éݤ}Õ^8Ù¡‰Öm6üæq®SµjÀÑ?5‰¸ôùõ7†à!ÍÛ~¼(Kâa(8Àë|õô.¼Ê®ÚCT’Gõ¿‰ 1/›PM¿ ˆáÓl¬¬XŠDiŽËÍξR¹«A8@ÄHëÞ[sÄÉîhÿW†µ¼±ž}Êv˜7"äò€—CÆš_•ýDÝšm[Ágš&ÔåaÂ# Ôôõp憎!A¿'ÀO­²KwöÝMp÷E ÁÈÅ®1ÌÕʶ:Ÿ`d¤ÍÒTNEe¹Rg(¥N êÏžÛ(KƽäÃåWFôⱑo¼®:>¯å>ldÇog¿óLÍ›gnfÊã³:Aõ@ìÉ ½ûËÅ}nRLTÄsǃä§ccˆgR—z† •w700Öļk[[“­e‹ržõ4wþx‹Q»¶ì~EJˆ ü>ç,ëša/¹"U ¢¢úùT6¨/ô°¤"[5çxpŽÊVJtœžM~piß­~?ëb²ƒþáq ÖƒÅ!àeâ61‡cÄ\}—oðÔÓ”>óÂv%ë´½ «¨v~Œ§èC,ò‡û¦þÏôqÉâE†Öÿ1ÙÔô_Yœ "ër²&Ø3h6†‚=ž¨HpÊ›k^±$²Ÿ–¢5-ð ¦mö?®3{TXy×Fn£u&ãQ8 X×r†}†1H #!# ž1q{¨¼¦Æ^ð¼ð\$”O‚Û îM éæÞÌ¢À?\ÕpÙ‰åÿZ{æRtµ×äsV“0:¹»n³e,¬¸-}rÂejï\ަËÝ^¸EBæþm}M)²mÞ ›Öÿ'>Š=„·OICá²?ž[B?A£3ÄTÊüdpà,žv[»ÿM†GbbcÐ¥4¹ÂÀÓ™SuaʯŸÒ^F¿ÈPF¿µósžìPU¹íM6:øæsõ«¶jÆ<Â=(6&À\ôõ“Àíl 0¦ý Û™Ã|ö6A¡h5*xS1†™†7bC^ÐÉÄ™`aÝeýІ ¦Y¡Ã\ºàj œÜl/¼SQT—FùDópý‰íæUƒ?¤l™`÷ÛøÉJìÒ5Ð*ç[1²zJ¾V'’„‹ð¡0ƒ}ß`'õ]º¤B«¿v™Ú¡d´Y© ɾ3ØüŽ fXæHš{)ë¿ "2j~#G FÂOÖ.Ú+>3¿“¶›VoWêǹûpš±Ø_?ûj>"øêÊg¬Ú¥ß  q’>ö)øÀåoè 3døÉ›º—-e ¿Lu®ª¾r š^ü¢oÜ¥i¹Yïœé£hRö¢ó~ ä7KЫØà)½ï&çS1¤Ô—„bfù„{n„Ÿ<«Ý’ US8¾}˜ñÑ&É*ÐÕÀhW¨gZÝÕQÓÐÜs¶x{æy§‹¨ß~\çùcY¡‹3ÒÑ?ŸgéäHo^Ù~9 &\§„øš½è ç§þ3Ÿ ¼ï:Q»OW~uˆŸ a åù¡‘Õk¥#¶Ëïw€]Ý{¼îÐ@l¤ç¶ŸÁ޹ˆOèCÿ>7ÍNQ"µHÁò,%¤ÙGÌðDpƒ ‡\Xõïyå /ÅBE¤ 8­)8üì¹§HŠ!-!’3ê–(‘ÀÝBÃiTÑ$"á<€£¡]ðá.#!‰±3¾ölܤ•»6„Q­í‘VŠÃNx ý, ÑîóRüŒäz=Pliêÿ9¾‘l[A7\©ŠB2Ž-y÷Q4n/Inâ€9GM˜í°£ƒKîˆWï˜ZOfR<É £ºÔÍò.Ï< øôqôŒêÈ÷LY•ÝîD®kÓ˜Õ™µ8„7~nı ñJ?!ÐZäÿH—K­§+±ùmõ®RFgbSg2üñFh²‹¿EE[u!‡wáÏÞ׊»ç+üãV:ï¾d§ªŠ]›!hQÚpz±ÝD9a'9%Q~£µÉt-¡_ø<íuâWs ÏùYL°ßR39dás”JjÞUèÙ_Œâr`¬Ò¡K$1èÓ—%ÇßÔÒ„Öë9É~DƒÔNM¤ÚuŸU•×h^ãï}*1=c ljA‘*ԓ߉œŠ•¤œ?‘ îMÿ4Õ4º%X š .A§µœ¸Žî–û”÷g¤G„𞊠}>i¿mK( ùa’l2"7]òEýÿk®¥åå¿v4þ ÕÝf7LŽkÒ½MÏN4ºÃk`ë[N&šñ´¯Ú(Z¬ÆB<í©Èã‚ 7Š!•p·÷¡2çÖ|ú_µÄ£#É»Öe!Ø4P×Ï-!ùÊCÿ3÷Ff.#µî—tƒÔï’ZóÐb„F¹}öƒ ‹•uŒV¿ºh<ë?ó„ˆ[t**XVàH ÕaaUøŽ-ò-ÚótPºÆT–gèŨuN/ÙŽ6ÒÞÍÓ‰€¥èís›ÕšÇq(˜óDHzŒå‡J[À¤¢ɤrìs˜…’Èctƒ]¤(Xެ·>íp<ŒfǨ²ˆ¥<]'‚A»åˆò*dî1~ßžîg ÿO^=“lŠ“lšØõW…œekð[ÁË’QQs„— x6ê´lö®»ð\y #ÞŪ1¾¯V¦ „´ h™‚F K‹Ôù«yþ$z½ånÕ;èOö Ðî_‰&D€Hò¯z2 e•³:1®ÄOõQŽ{œƒ:rü—œ˜íNä.ªZ2:C›²]a%\<‰{güIþ±Ó 0¬Ôå@‰·k´ˆ¯öÐ_Åœ×h¿ãã_b3y¹ÿ†À<Š<¤ÊŒ/a»®aFU(pdr¨Ífô(ÚÔ¦«“`5Gvûáù é4ª'†‘êF©¹[ð>ôu@Ç'?rãNŽº¯ÏŽ”ÛÒkÛ5}âÁ\ê­?8Ö*ymz>Ø¥ºË$žXÀ}&xƒþÍŽA¨ÙØÌöŸ6ßá>¸ŒõÍ^”@ÖFÄhó¡¸jVCc9|¯ê-Díȃ¢ð]nAú.Eª)\1ÀõVЉË|dz؉»ntl\i§ÅÛî)Æ"ÝãqV;-1lˆßùådb T}~àò`"ÜkuZ¸¼àèVgoX€P²åèøü×£ë‚m¤ ™*®çê—°b½ƒìPP¹ƒì`U’çwDvK-±DZ“6ge!šBI‹Á|Q®yrù}èkž+ z ½™­—[Ó=¹H½¥.'›hXÿ «Ùà€…)w~R±zëâ n /a<*%,´W6^Àw=½†¾ ÊÁ½én.¹1å×2Þç’(·º‰FŽZseÝ›±y¼Ò†ãÕºy\0º§€àGL¶h—ÝônÞCoaç/µp{+¶ ‰1á9ræñdX´ÄC¤óƒ¿‰K¾ÑQìh¢¬FFcXޱì-"<§EÂDÛmK‰·XÖNÞÓì¡›ŒZ±g+»ÿo׸ëJQ‘ë•ù„¼ø[Ê¥Œ´òT ¬ŒLܘÒkŽ{=1ùçL¸YVû±]€þxõÕdý3NÜ}X­7Bð‚¹O*…›Ìá”eð¡&5B2#[)ƒá><-c|Rw5r Að,oƒÊxú$Gãìy¿?%”øí“­›öAØW±\ø¹Xd‡&7DoÓ’f·;Øy>_„„>c„©WÑãDüŠ?yú(¸¹žî{4<¢›€Aœb ˜©•ß«ÛÛ$D‹H.†ªM×Á7W »@­a6‰©ÍV…bÔ‡^ ?ûl>õ§,æÛód@å !3öØ€í\eŸN–Å¡Q5ëR&àÅaÙn£™CúM\L÷GÜ@Š8 Ÿ+‹_”}örq©"¸üÒõ­wÍ•¼P/‹¨€Í‡^­á'…Y[¨aiS£#&‘ôªNn9<U®l3‚`¢¥½ßc&4 ÍŤí‘ln•15„l µþNëJ‰9wpõŽ"xK€{7 #o2(kî"Za5,˶¢®ÄƒKüü$>)‡4˜F‹qõE¸›X#ˆ=æõ ZͰdGI Ø¿òGûa`JòÙ˜£K*»@GZ"GÝ%á·ÁŒù‰(èhsqn}ɇbU6¹@VýË6s±Ã ½«âwú·1ÄxsŸÆ1yû;r‹lüß°[ß'¨  JÏM¦d.Ž1¬¾^7ã¨à»Ê»Âò™;…7éÒót„Õi”JDæ7ù¦þñßÇ‚ÙÕm¥+¡1xxáyoHJ½XÊpP÷ÔÖ¾´gà‹…Äwq8Õc„jôÝ ÜôÉO‰ÂöÚüóÏv¿S/É–r•yÁÒvŸ Áç¤hàn8ðó¢Î0½‹Þœ_ã¥;´Ö Ç&:?g`ºv" S±á7Ý%_ÚÀ%¹jCLÑç|дmßQPqžÔ $deЇ3¤ýn¡®>F=Æ5±nÈHT0ß舮⳪'šXª‚[AÂuZ´Âžc°Ö²`a²…êtkÏu]AWš9,Ô˜‰îßÛÓôTMHoÿ65YŠ„Œ-qHªnÃb¥-¢—+B&µ)€–óF$Ÿç6 »Û3ùJçIY$© X–J."pŒb#Öy3þáT0T°é‘a•ÿ^½k¶^÷6­RñÖ2mÀ¼1ÒHzÀk÷¹e{š’X_3±¡3¤ÈpRôïF^ATØS(7pSzg•æ_µöêJýµßí¡ÿ6Èß¶­ýº†Û~Ýcýº>ªZ}OÙ‹õþ­2_ªµýTê¯7ê©UÍnÄ~­RýW×í¦¯©ß0Q¿êЧõT?©ÃõUê¤?U—V«~­+ýV½óßShöÖe(ãyK3ÓL¸ =ÀŽÎŒª(Ù~ÞÖØZýôn!zŽéØ` &Ù¢}›p^Ón íq… ôzö#DÈ-Â7>æ®`í~uíÁ ¥×Ó¹–›[aš ™o ¾ìÿ5Å}u ¥\Ç pük,;ç?÷¹ºÌ°•Cçð¦ýegýáj3ß–â Íqv¿FXí‚Ô>d@ŽsM:<Ë=ÌïðKxÔM »m}åôSY¸üê¹pìDŽÔÖgBÖµøÈ~,༢b ãÐ NˆD¯‹‡ÊmªA~ÅXîàÿ/a~‚c¢€{Ï,“•šÀão™’€ß ó4s•ÀDc242bkó”Wê,\ß`ëë‹5t# uIñ!n¯©r‘¤Oã‰a:à[¥ì›ôKPõÃæŽ9#Ù¡Ùñ7É€ƒ(az=÷|ÈòÑÞsè ë³/1Õ,Àd#¾S©'NK LfßO’˜T}IÓ~ˆ]÷QTy‹Â¦âïEØn:î5‹ûé—ètœÔ³ü¡{‡[ÎõÚªÊ[€üÕ¹ENú\¤Ì QÖF¹#jçì€çÖßô#èç­h[½jÔ [¡÷ÇDƒÊÌÔ 4øDFÍÎf+iÌK˃ˆ+ *@òѬ>ÃF,€Ørž­Ã£‡­±¤x>ìQ,›{Ù!"Ù¢wKNö¢C€q£qS`ÿuÔha(¼ Ù*~Ð[½.%1êK€;˜`ÀòÆmÍ" Útå ÿñ1öÁf´Èô7Ÿ’Ø Ü2?ÇÐöír–!¢¤ôØl«¾ŠO—‹–¿“íÜH ã"¹‚µD…–§Ë:–Ö/@ä žÙ66ÄÜ»jµÞy%MýÌ–Ýîax&Î"ˆ3™æ§@Ûœó`•ÚUÏ÷-â—2T®C|Ù€—@è¾áE–´G˺=H¨£#‘ªž0ZT3^¥#Ð:kø¼“®_»e¥Í›±‡Òx¿ârŸ[ßå–<0QŒÀ v%•,b†¸»ÎΕ ‡®Öëv@Y6)^‡(áð`"~N˜òŸîFËöe 3.‡¼tAƒ_“Œjeýõ9ͱ“³6[¶`“7ƒyF‹¸üɇ$[½D /{ë-ašJá ÖñPn,³¿RMÜ—ov#pAÁ4ZÖvQâËÁ]9¯ÁÁ‰¤‡@¶âÅjÂ8 ƈ^Б6 =ý¸øŽú]˜s‡¼^Ř>vX—N ¥ä–¢{ô¸ó¬X;õ«AÕ½Øxô\–…å²}ä¶é±ždXÈr ¼5$K?÷aÐsá«w_­ZÊ­Tºèùfª6LÐcÍ,-å†<'…ÛÜ—(]“^noóÌI<}¤µ Uµþt£¤¿÷.ƒ„JÜ‹YuéêÖ. ¥«\G¹5c ?LE‚•ñÁùï¡ßµXà_Î|M~{%+)sîŒr¸§’ç/SÖ 5*$Bó<ÍðX «ÜñÔ‰¼ò&ßáµá*‚môìT‡¥JïÎ0®@/ÓS£ñÍš®-òöP¬…= 9Ø~®9›Wà¥Ì>þ€[]óó]º%¬£DÈ6t˜Ä9Cb)aý(dµæ oÕš«f¿ËÔÔî{Ñ z7FÔå?këðyâŠà²a%èàjŠpwÅúÅȹÑïˆ -™¿oÁÄOyU .0sžfÌfûýÀ@ׄ”û›ÝK¨´ XÅühPñ.„ár@/ ð®„ë]²±‡¾ »¥C†O,Q0¬uû†±05ãn©y8õéÝÚLÖ ¸ÜTaH ÝŒ´s¬«”9ÝÕÀÓÝ`›¹cTðø¨ öEDÂq5XJ¿¢(Zv{_Пæœú"I\!½»òˆó°RDHƒGe÷X*>¤3xу¦†ðÿ*~}$†¡ ù˜â‘\»Üvœì[àã 1€7h0 f«8rwt¤ðî Yº¼’·n£ o‚!Ž™¤ò”(¸VÕ¬Ý|ÉP¹ÔǕܷ :³€ßmÖ£±[ %÷·Z¨Ô$ vŸVv xôê² „ª…iVÙ˜ü«Ž ççÀ÷þd1-ÍÓu'SË\5hzf+wôö-Ͷ Û_Hš_ÊèÒ"=Æ—ià8Ky!ã‚ü«씞³—·ÜŠÙ!¤f>¹×"a„ï¯ÇMü¼b•þˆ:R|®`ˆ”ëƒçÐ&Ý~*±‰qY¢G ‘T=qŽSP àÿ1»1…߉UY·Š#H¦Ÿ­Õe¥ Ƚ–#;„@+¯åáApÙTyÓûÕ6cÁXô0Èí]y¥ÚÉ&ºo) ùÀ¤Ì,ÀßÁÁv<Úè,pçÊêéÌm³ŒÐI”f„”}&æ`ômC,B³èrjñ]L¢Pkð'ïúþVe(ò­­®`ÜUìØ’8SÅž_Œê_ŸŸJö]AÇTé˜@/<¸CE¹µÐ¨³¹*‹úoÔfCx³¶AVœ²äW¾ÀûÉZª ’Í1[P‘ÈQÙ€y‰œÓbæf8 ‹ÊËß‘ã},'`dú}#¥–aKü ‰Ãm€·gÚ»œÈº ž²À ·”7Qòšôºÿ9ƒì…óÎVÒX5mf à—ïl›Þ„ÉN¹[£øeÑ-ÈàcÎÌõùv^@B½Õÿ?ËžëÏ$ø~úýnlcq|uÖB‘n•‰Yg±‚Ö/ñîi*—zÕ=WD›ñm {–ccAYÙë‹§-ßXµ83n±@Cpõ˃¼:ãâûË‘Lâá,!ž€?A°•“Â̳ʃ±(ih’BC’ctUeœ_îMÄ»t.üfz+õÇÜÎ’±×Œö iÝøsöõÐ ðMÝÜ?žß­®îã1•Mç†ã¨ù1˜(BÙ3Ø_Uˆkƒ$L_ýPùLC|§¢‡3‚Ê%˜Þª »;Ö€ƒ ²A&oX¿Àrn¹*Ó 7{aWhâúQùÁßw*$˜ä™TN¦a¹ð¥ú?q`-Ò»üpS}þìDâËÃPÓ%\u¼á°@bßÃ;6+N}7¥…”CĈ‹C –]F—…¾Q?®xgõ¨½3·§QìåÏ?·ÿ|Ÿ5ñ`EÉ(°yºåç‰4½´MOÛÏ -ß#¹æ˜#dÍàA%ñ]±LIÚË“''Ñÿ&1©¬7¤´†8"x*§`5ñÒ@¦`\½ØJ²-]‚øMnOžõ¾N‡‡’²ûÛ¼¦^Ç£ZIå~rNßÝ6éRÎÉîåóqÏ€&£èk4æ öÿ ²€€ˆ²dÊTº)}¹Ó¼ ±Û¼ÖÐù æïl ÕÀ{@O9·dÿaÒ|HÇ»‹}hvšŠb+^Ùõµ`4!f‰Åd ƒЂTá_AÈÌ£e¿g—LÄõ”P}”©bÏSÝšÌVÔhÛq;(½`qM˜Ô»{´ÚTÚ¨ˆÅj›ØØëâJE>ε(bÏ WœtÞý§â÷٠˯3`%Î6½0Ã,êYÀ‘Ý6½ê¥ŒËfÚÑËi繿™$»§à®°ò³ Ñì£ÜÍ?òž0Æ%£‡Áeƒ % ïÇÙæÒç¼!*½}Áäí®>o4¿ÒŽ_2 Xç߸“Ñ™¼˜Á·»§+™H޶•h]³^Qæ:)I»‚‰¨Q÷_²î Gü‰!Gio@² ’€•z6Y¯·Éák“íYzû+DO5eŽ¢¬Býêˆ\³‹mã]‹"ÇrÏ(Â'õŽ€sªVƒtÔíL˜l¯L$?‡<º… D:5¢š¡ØØ%†0Uâ UPí-äaÚ‡ò 0žÌ|¤ TÊ€J–jþÊeõ´¦öp0{ýBjæ¨YJÀh:Ó8ª;o×áìdºí-¼~Æû¯Z h¡&=\qXúô?–Wé iÙ}ª/¨2ÖæP5×%{šÌW€I J wÅF(y"Ê#E´+øxœ2³TÏØc ?˜C¡ØÚk<Æ5ÆTIò×3VyLìp¯U;Õ-ö¦éLž˜«{uDPý>«  Df8K&6…u6± :J¥ë{¡ñë;‚éM¶ßΦå¤OUÓs$ÓðúxÅDo7Gô wåá¿i`ÿB· s{‚âëC÷¼aìå! ²ŸU⓯»>±3W;Hk¶ S— Öß ÿdÃet!ŽYóÂp Þ`xÏeÙJŪ„Ñ=ôÛoùV˜wÂåù#ïP­ã@«Æ ±ppÜè*ôÓŠO¨É‹L„ôr‰Èj÷¬KcbNïšêïXÕÁYàFCX!>¥éulÇÆ¦y­w©·)ïæìà 'Ž×gÝø½0Π(=4 ·v²JZ,Ëg½`®B±y„Ý–`Gp˜™]?–J#W“•Ÿ+¶íÑ[ÚC³•vºzx)_Ý`Kh€…jå6 LÒýù4-úÏæE’»­,ÊTaŠË—¾µßt°øªõlr]¢ :àK]$pºÁÄ‚ÈÝ$wf¯¯‚:dð.ÞšÜõ¨ž'Á^_Ô(X‹"ZkŒ 9ŠÖíwfOÜ2™ž{ºÿ} ôJ¿&-!€=™ ²ÝDÙóñ\î´¯!‚fFÊAñÁ1kºI®#{¸<Í Ë$æ•ÔžgšúI¶M°3Kƒkh?òªP~Âbu}6À¤ ‰èB¯V&ƒ[o$4[šx*ÌÄpçaG\©0:ä&7 æDnîã rx+ «Ø¡÷Úø  ‚§ÕHét6(‹"™Ì6pßBr®î-ÚT ½lw–€¨¼ccxìêk ½Ÿ}—›x/vÀüZ3‡}y’7ëx¦IÉÓÇEô0߸DÞö:ò±Î‘¬ê$lóÖ„á#ÿUž¦ºöÒu¶qº+*³oŒÔ•Æ-ÿq6 Ý®'…ÏhŠ¿1åí7Q™%( (i5`„(;`â–;WÞÿ8—Vj“Pß§ú4¹I¾Ú8ó C­ÍE„HPd«XP£ÔL-C7ÚÝå5îaªßßÃeVfà0 Ð~²mâ¼ùF(º{¡³Ô.!ècýÀ§™Ñsòòar]ë¡Ó$Ç W:b÷üªO)ªDÚ×2^ ltÁÁ¸¿úQmÕWüËd&°4`:¤4hrÀÀ—˜|„W¹ÛžÊ2¥BÆuß^-ÞüvÓe´ ©×€=œqÅÌq-ŽX˜üR†<@}Òþì/"ÌŽgf´ê*Ù÷ˆãJ®Àãq&Z­ŸstK‹Ëü‰x­ ¥¾ËÝK=ˆHŸ¾€jPg~ü[QðÊÞpAÏéÜ3ŸgðUHÛlˆ“pð>dbÌÃ\¢fH âÇ¢@E·Õ¤ú´zM‘Ä«-ŠØÐœŸ^ä)Ï!Õo‰ ¬ùcæUx™Äy¥¾a¹»æâßZ?â½$¤*Yç¨Nÿv¯’nügä^žR¦îËG›Ñš«†ʥΦÔOÆž¦ò¶MÅälË!üôòjØûyy‡Ð-=™ˆ\+‹yMXª4xØþmÜ7µ«ydw(»Ò˜*öîÁG!¶Í†Ìk]÷$´nuG¤Ûa6Ü,Á¢TõЇ¯§]4ÄÂM0 aÆê߯°þ79J<[×6øL¯ .Éú ÇŽUêáxѲìbAÖPÝÈ"ÆYè¨/1Bf›¢—¯õ •ºG9´©ídÒ– ¹L¸¿‚o5Å••uEiûå=á<³ewÎÁzƒ]^æÀŒÊ’ÝHçGÛF€G« ÷…ÁGP°…QNò”z§ã5Çñ:ö½êOsnØ{Í g?ðÄÇ@33=öA\Ðx³²a¦ÔJ<;Všø")·%œM·@E$¾ÐNˆ>ÊïS¼1eMz g0šsw|¤ŽVQaŠŸpIûtƒ˜½xGÕ)°Z‡ñ¹y>-ÒЧÔÔ[ql+õg¶“›ÏZ„o¡˜iJ9m@šúšB›Îˆ¿¼äÑÒ‘ÞˆåæÆË¯C‚¥§–[¶¤‰E³›’ß‚’jå’5§'M4;´ªMˆ]&˜ÒаáÄÂN¥Óôë‚E&¯â« Ç—0|¼­¦AE‘Pí—Á=ÞÁ™Ud‡¸$dÌÉîï&í‘ç!û§ðŸ,Ìþµn›¯¯V·E·È/šLh†K¹Ö¦·iE4½Ÿù§3àbÅÔ$ËžgÒWž¾ÿ>`ĸa<Šw”¬¯ÿ^*TPqát{É&­Ë>Ó频LÄx¶%"2œ'o¤³»óò­Fü`ºìí‹ ~ÆYRTyšýì/L­Ä´ÇÕ¬ ¡ æXMÍ^\y«T’ò±?À; óÕÅ@–=Qª¶®&@:Ëí~òg³Ѽ³áR&'ö£1˜’J8Orÿ|½“íFBÿT#d¢'¤s®¥öpSu­\búœÊ4‘ò†“;éÁv‚ÿUÖø¥]‡ãs†¿ÈÝ¿õìQU£L“6ÎúÓÃ>7f…’çÁq!ÉçpÒãgK®&Î+ÐÚ´gOø¥ý"Xá ë×A«¨„;¥{#äÌ{‘³Ž’Y4"ŒÍöŽAc{¹8X…õ‘«o‘­±š¾'R¸¾C%4µ­/Ý/ÄO”b#+È‘«*Üžêö«hàÖ%ës $½*}fçE eüÞ &6èRHHÅ0§uý¬ë} L(×SꛂîØÜîÝÁ–ˆ£FoG`’½’?÷æÏpŸ‘–°:îæÇ=¬ }Y¤oïÓv—mÿX ©Šÿ1Tƒ¼j‡ Õø+)ـр|Oo~5”§âÎ6J•ÜEN‡Òbä],^n*5JþEæÀŸ‡¼]g´^º JÔzP–ÛNýí@•µiàXìë»8*!Ü¥8‚³û*›™ð¦¼vÌyÜ2×–Ëàö÷Âc¦ˆ·+iàöƒƒõS8À[n¸+HKÍ©cAÂý´_o³@æ-ž‚µiÈ„Z»atðªhpj]4‰Ã>ÿP;5!VWÿÙspatialite_gui-2.0.0-devel/mac_resource/Makefile.am0000664000175000017500000000003112543275035017237 00000000000000 EXTRA_DIST = wxmac.icns spatialite_gui-2.0.0-devel/Makefile-static-MinGW0000664000175000017500000001010212543275035016440 00000000000000# SandroFurieri (c) 2008 # Makefile ( Mingw & wxwidgets) for spatialite-GUI SRC = Main.cpp TableTree.cpp QueryView.cpp ResultSetView.cpp BlobExplorer.cpp \ Dialogs.cpp Shapefiles.cpp Network.cpp Exif.cpp TextCsv.cpp \ Objects.cpp QueryViewComposer.cpp MalformedGeoms.cpp DialogsGraph.cpp \ Raster.cpp Styles.cpp RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp Wfs.cpp win_resource/resource.rc OBJ = Main.o TableTree.o QueryView.o ResultSetView.o BlobExplorer.o \ Dialogs.o Shapefiles.o Network.o Exif.o TextCsv.o Objects.o \ QueryViewComposer.o MalformedGeoms.o DialogsGraph.o \ Raster.o Styles.o RasterSymbolizers.o VectorSymbolizers1.o \ VectorSymbolizers2.o Wfs.o win_resource/resource.o EXE = ./static_bin/spatialite_gui.exe INCLUDE = Classdef.h # Define default flags: CXXFLAGS = $(shell wx-config --cxxflags) LIB = -Wl,--subsystem,windows /usr/local/lib/libwx_mswu-3.0.a \ -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 \ -lcomctl32 -lcomdlg32 -ladvapi32 -lwsock32 -lgdi32 EXTRAFLAGS = -Wall -Wextra -Wno-ctor-dtor-privacy \ -fno-strict-aliasing -I/usr/local/include -D_LARGE_FILE=1 \ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 REZ = $(shell wx-config --rescomp) EXTRALIBS = /usr/local/lib/librasterlite2.a /usr/local/lib/libspatialite.a \ /usr/local/lib/libxml2.a /usr/local/lib/liblwgeom.a \ /usr/local/lib/libgeos_c.a /usr/local/lib/libiconv.a \ /usr/local/lib/libgeos.a /usr/local/lib/libproj.a \ /usr/local/lib/libcairo.a /usr/local/lib/libpixman-1.a \ /usr/local/lib/libfreexl.a /usr/local/lib/libfontconfig.a \ /usr/local/lib/libfreetype.a /usr/local/lib/libexpat.a \ /usr/local/lib/libgeotiff.a /usr/local/lib/libtiff.a \ /usr/local/lib/libpng.a /usr/local/lib/libjpeg.a \ /usr/local/lib/libsqlite3.a /usr/local/lib/libcurl.a \ /usr/local/lib/libwebp.a /usr/local/lib/libgif.a \ /usr/local/lib/libssl.a /usr/local/lib/libcrypto.a \ /usr/local/lib/libz.a /usr/local/lib/liblzma.a \ /usr/local/lib/libCharLS.a /usr/local/lib/libopenjp2.a EXTRALIB2 = -lmsimg32 -lws2_32 -lwldap32 all: $(EXE) $(EXE): $(OBJ) $(EXTRALIBS) $(CXX) $(OBJ) -o $(EXE) $(EXTRALIBS) $(EXTRALIB2) $(LIB) \ -static-libstdc++ -static-libgcc strip --strip-all $(EXE) clean : $(RM) $(OBJ) $(EXE) Main.o: Main.cpp $(INCLUDE) $(CXX) -c Main.cpp $(CXXFLAGS) $(EXTRAFLAGS) TableTree.o: TableTree.cpp $(INCLUDE) $(CXX) -c TableTree.cpp $(CXXFLAGS) $(EXTRAFLAGS) QueryView.o: QueryView.cpp $(INCLUDE) $(CXX) -c QueryView.cpp $(CXXFLAGS) $(EXTRAFLAGS) ResultSetView.o: ResultSetView.cpp $(INCLUDE) $(CXX) -c ResultSetView.cpp $(CXXFLAGS) $(EXTRAFLAGS) BlobExplorer.o: BlobExplorer.cpp $(INCLUDE) $(CXX) -c BlobExplorer.cpp $(CXXFLAGS) $(EXTRAFLAGS) Dialogs.o: Dialogs.cpp $(INCLUDE) $(CXX) -c Dialogs.cpp $(CXXFLAGS) $(EXTRAFLAGS) Raster.o: Raster.cpp $(INCLUDE) $(CXX) -c Raster.cpp $(CXXFLAGS) $(EXTRAFLAGS) Styles.o: Styles.cpp $(INCLUDE) $(CXX) -c Styles.cpp $(CXXFLAGS) $(EXTRAFLAGS) RasterSymbolizers.o: RasterSymbolizers.cpp $(INCLUDE) $(CXX) -c RasterSymbolizers.cpp $(CXXFLAGS) $(EXTRAFLAGS) VectorSymbolizers1.o: VectorSymbolizers1.cpp $(INCLUDE) $(CXX) -c VectorSymbolizers1.cpp $(CXXFLAGS) $(EXTRAFLAGS) VectorSymbolizers2.o: VectorSymbolizers2.cpp $(INCLUDE) $(CXX) -c VectorSymbolizers2.cpp $(CXXFLAGS) $(EXTRAFLAGS) DialogsGraph.o: DialogsGraph.cpp $(INCLUDE) $(CXX) -c DialogsGraph.cpp $(CXXFLAGS) $(EXTRAFLAGS) Shapefiles.o: Shapefiles.cpp $(INCLUDE) $(CXX) -c Shapefiles.cpp $(CXXFLAGS) $(EXTRAFLAGS) Network.o: Network.cpp $(INCLUDE) $(CXX) -c Network.cpp $(CXXFLAGS) $(EXTRAFLAGS) Exif.o: Exif.cpp $(INCLUDE) $(CXX) -c Exif.cpp $(CXXFLAGS) $(EXTRAFLAGS) TextCsv.o: TextCsv.cpp $(INCLUDE) $(CXX) -c TextCsv.cpp $(CXXFLAGS) $(EXTRAFLAGS) Objects.o: Objects.cpp $(INCLUDE) $(CXX) -c Objects.cpp $(CXXFLAGS) $(EXTRAFLAGS) QueryViewComposer.o: QueryViewComposer.cpp $(INCLUDE) $(CXX) -c QueryViewComposer.cpp $(CXXFLAGS) $(EXTRAFLAGS) MalformedGeoms.o: MalformedGeoms.cpp $(INCLUDE) $(CXX) -c MalformedGeoms.cpp $(CXXFLAGS) $(EXTRAFLAGS) win_resource/resource.o: win_resource/resource.rc $(REZ) -i win_resource/resource.rc -o win_resource/resource.o spatialite_gui-2.0.0-devel/depcomp0000775000175000017500000004426712543275035014134 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: spatialite_gui-2.0.0-devel/Makefile.am0000664000175000017500000000142712543275035014602 00000000000000ACLOCAL_AMFLAGS = -I m4 bin_PROGRAMS = spatialite_gui AM_CPPFLAGS = @CFLAGS@ AM_CPPFLAGS += -I$(top_srcdir) spatialite_gui_SOURCES = Classdef.h BlobExplorer.cpp \ Dialogs.cpp DialogsGraph.cpp Exif.cpp \ Main.cpp MalformedGeoms.cpp Network.cpp \ Objects.cpp QueryView.cpp QueryViewComposer.cpp \ ResultSetView.cpp Shapefiles.cpp TableTree.cpp \ TextCsv.cpp Wfs.cpp Raster.cpp Styles.cpp \ RasterSymbolizers.cpp VectorSymbolizers1.cpp \ VectorSymbolizers2.cpp LDADD = @WX_LIBS@ @LIBSPATIALITE_LIBS@ \ @LIBRASTERLITE2_LIBS@ @LIBFREEXL_LIBS@ @LIBXML2_LIBS@ -lgeos_c EXTRA_DIST = Makefile-static-MinGW \ Makefile-static-Linux \ Makefile-static-MacOsX \ indent_me AUTOMAKE_OPTIONS = dist-zip foreign SUBDIRS = icons win_resource mac_resource gnome_resource spatialite_gui-2.0.0-devel/install-sh0000775000175000017500000003253712543275035014560 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: spatialite_gui-2.0.0-devel/configure0000775000175000017500000230007412544013516014452 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for spatialite_gui 2.0.0-devel. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and a.furieri@lqt.it $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='spatialite_gui' PACKAGE_TARNAME='spatialite_gui' PACKAGE_VERSION='2.0.0-devel' PACKAGE_STRING='spatialite_gui 2.0.0-devel' PACKAGE_BUGREPORT='a.furieri@lqt.it' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS LIBRASTERLITE2_LIBS LIBRASTERLITE2_CFLAGS LIBSPATIALITE_LIBS LIBSPATIALITE_CFLAGS LIBLZMA_LIBS LIBLZMA_CFLAGS LIBWEBP_LIBS LIBWEBP_CFLAGS LIBXML2_LIBS LIBXML2_CFLAGS LIBFREEXL_LIBS LIBFREEXL_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG GEOS_CPPFLAGS GEOS_LDFLAGS GEOSCONFIG LIBOBJS WX_LIBS WXCONFIG CXXCPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL OBJDUMP DLLTOOL AS host_os host_vendor host_cpu host build_os build_vendor build_cpu build LN_S CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock with_wxconfig with_geosconfig enable_freexl enable_libxml2 enable_openjpeg enable_webp enable_charls enable_rl2extra enable_sqlite_stmtstatus_autoindex ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR LIBFREEXL_CFLAGS LIBFREEXL_LIBS LIBXML2_CFLAGS LIBXML2_LIBS LIBWEBP_CFLAGS LIBWEBP_LIBS LIBLZMA_CFLAGS LIBLZMA_LIBS LIBSPATIALITE_CFLAGS LIBSPATIALITE_LIBS LIBRASTERLITE2_CFLAGS LIBRASTERLITE2_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures spatialite_gui 2.0.0-devel to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/spatialite_gui] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of spatialite_gui 2.0.0-devel:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-freexl enables FreeXL inclusion [default=yes] --enable-libxml2 enables libxml2 inclusion [default=yes] --enable-openjpeg enables OpenJpeg inclusion [default=yes] --enable-webp enables WebP inclusion [default=yes] --enable-charls enables CharLS inclusion [default=yes] --enable-rl2extra enables RasterLite2 extended support [default=no] --enable-sqlite_stmtstatus_autoindex enables SQLITE_STMTSTATUS_AUTOINDEX [default=yes] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-wxconfig=FILE specify an alternative wx-config file --with-geosconfig=FILE specify an alternative geos-config file Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path LIBFREEXL_CFLAGS C compiler flags for LIBFREEXL, overriding pkg-config LIBFREEXL_LIBS linker flags for LIBFREEXL, overriding pkg-config LIBXML2_CFLAGS C compiler flags for LIBXML2, overriding pkg-config LIBXML2_LIBS linker flags for LIBXML2, overriding pkg-config LIBWEBP_CFLAGS C compiler flags for LIBWEBP, overriding pkg-config LIBWEBP_LIBS linker flags for LIBWEBP, overriding pkg-config LIBLZMA_CFLAGS C compiler flags for LIBLZMA, overriding pkg-config LIBLZMA_LIBS linker flags for LIBLZMA, overriding pkg-config LIBSPATIALITE_CFLAGS C compiler flags for LIBSPATIALITE, overriding pkg-config LIBSPATIALITE_LIBS linker flags for LIBSPATIALITE, overriding pkg-config LIBRASTERLITE2_CFLAGS C compiler flags for LIBRASTERLITE2, overriding pkg-config LIBRASTERLITE2_LIBS linker flags for LIBRASTERLITE2, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF spatialite_gui configure 2.0.0-devel generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------- ## ## Report this to a.furieri@lqt.it ## ## ------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by spatialite_gui $as_me 2.0.0-devel, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.15' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='spatialite_gui' VERSION='2.0.0-devel' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ac_config_headers="$ac_config_headers config.h" # supporting SPATIALITE_AMALGAMATION # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Check whether --with-wxconfig was given. if test "${with_wxconfig+set}" = set; then : withval=$with_wxconfig; WXCONFIG="$withval" else WXCONFIG="" fi if test "x$WXCONFIG" = "x"; then # WXCONFIG was not specified, so search within the current path # Extract the first word of "wx-config", so it can be a program name with args. set dummy wx-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_WXCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $WXCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_WXCONFIG="$WXCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_WXCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi WXCONFIG=$ac_cv_path_WXCONFIG if test -n "$WXCONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WXCONFIG" >&5 $as_echo "$WXCONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # If we couldn't find wx-config, display an error if test "x$WXCONFIG" = "x"; then as_fn_error $? "could not find wx-config within the current path. You may need to try re-running configure with a --with-wxconfig parameter." "$LINENO" 5 fi else # WXCONFIG was specified; display a message to the user if test "x$WXCONFIG" = "xyes"; then as_fn_error $? "you must specify a parameter to --with-wxconfig, e.g. --with-wxconfig=/path/to/wx-config" "$LINENO" 5 else if test -f $WXCONFIG; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified wx-config file: $WXCONFIG" >&5 $as_echo "Using user-specified wx-config file: $WXCONFIG" >&6; } else as_fn_error $? "the user-specified wx-config file $WXCONFIG does not exist" "$LINENO" 5 fi fi fi CXXFLAGS=`$WXCONFIG --cxxflags` AM_CXXFLAGS=`$WXCONFIG --cxxflags` WX_LIBS=`$WXCONFIG --libs std,aui` # Checks for header files. for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF else as_fn_error $? "cannot find stdlib.h, bailing out" "$LINENO" 5 fi done for ac_header in stdio.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF else as_fn_error $? "cannot find stdio.h, bailing out" "$LINENO" 5 fi done for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF else as_fn_error $? "cannot find string.h, bailing out" "$LINENO" 5 fi done for ac_header in memory.h do : ac_fn_c_check_header_mongrel "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default" if test "x$ac_cv_header_memory_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MEMORY_H 1 _ACEOF else as_fn_error $? "cannot find memory.h, bailing out" "$LINENO" 5 fi done for ac_header in math.h do : ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" if test "x$ac_cv_header_math_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MATH_H 1 _ACEOF else as_fn_error $? "cannot find math.h, bailing out" "$LINENO" 5 fi done for ac_header in float.h do : ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default" if test "x$ac_cv_header_float_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FLOAT_H 1 _ACEOF else as_fn_error $? "cannot find float.h, bailing out" "$LINENO" 5 fi done for ac_header in fcntl.h do : ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCNTL_H 1 _ACEOF else as_fn_error $? "cannot find fcntl.h, bailing out" "$LINENO" 5 fi done for ac_header in inttypes.h do : ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" if test "x$ac_cv_header_inttypes_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H 1 _ACEOF else as_fn_error $? "cannot find inttypes.h, bailing out" "$LINENO" 5 fi done for ac_header in stddef.h do : ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" if test "x$ac_cv_header_stddef_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDDEF_H 1 _ACEOF else as_fn_error $? "cannot find stddef.h, bailing out" "$LINENO" 5 fi done for ac_header in stdint.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" if test "x$ac_cv_header_stdint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H 1 _ACEOF else as_fn_error $? "cannot find stdint.h, bailing out" "$LINENO" 5 fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF else as_fn_error $? "cannot find sys/time.h, bailing out" "$LINENO" 5 fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF else as_fn_error $? "cannot find unistd.h, bailing out" "$LINENO" 5 fi done for ac_header in sqlite3.h do : ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default" if test "x$ac_cv_header_sqlite3_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SQLITE3_H 1 _ACEOF else as_fn_error $? "cannot find sqlite3.h, bailing out" "$LINENO" 5 fi done for ac_header in sqlite3ext.h do : ac_fn_c_check_header_mongrel "$LINENO" "sqlite3ext.h" "ac_cv_header_sqlite3ext_h" "$ac_includes_default" if test "x$ac_cv_header_sqlite3ext_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SQLITE3EXT_H 1 _ACEOF else as_fn_error $? "cannot find sqlite3ext.h, bailing out" "$LINENO" 5 fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { volatile int x; int * volatile y = (int *) 0; return !x && !y; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_volatile=yes else ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 $as_echo "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then $as_echo "#define volatile /**/" >>confdefs.h fi # Checks for library functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat accepts an empty string" >&5 $as_echo_n "checking whether lstat accepts an empty string... " >&6; } if ${ac_cv_func_lstat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_lstat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return lstat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_empty_string_bug=no else ac_cv_func_lstat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_empty_string_bug" >&5 $as_echo "$ac_cv_func_lstat_empty_string_bug" >&6; } if test $ac_cv_func_lstat_empty_string_bug = yes; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_LSTAT_EMPTY_STRING_BUG 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } if ${ac_cv_func_memcmp_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_memcmp_working=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_memcmp_working=yes else ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 $as_echo "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in strftime do : ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strftime (); int main () { return strftime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else ac_cv_lib_intl_strftime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } if test "x$ac_cv_lib_intl_strftime" = xyes; then : $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi fi done for ac_func in memset sqrt strcasecmp strerror strncasecmp strstr fdatasync ftruncate getcwd gettimeofday localtime_r memmove strerror do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Checks for installed libraries { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_prepare_v2 in -lsqlite3" >&5 $as_echo_n "checking for sqlite3_prepare_v2 in -lsqlite3... " >&6; } if ${ac_cv_lib_sqlite3_sqlite3_prepare_v2+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 -lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqlite3_prepare_v2 (); int main () { return sqlite3_prepare_v2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sqlite3_sqlite3_prepare_v2=yes else ac_cv_lib_sqlite3_sqlite3_prepare_v2=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_prepare_v2" >&5 $as_echo "$ac_cv_lib_sqlite3_sqlite3_prepare_v2" >&6; } if test "x$ac_cv_lib_sqlite3_sqlite3_prepare_v2" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSQLITE3 1 _ACEOF LIBS="-lsqlite3 $LIBS" else as_fn_error $? "'libsqlite3' is required but it doesn't seem to be installed on this system." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_init_plus in -lproj" >&5 $as_echo_n "checking for pj_init_plus in -lproj... " >&6; } if ${ac_cv_lib_proj_pj_init_plus+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lproj -lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pj_init_plus (); int main () { return pj_init_plus (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_proj_pj_init_plus=yes else ac_cv_lib_proj_pj_init_plus=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_init_plus" >&5 $as_echo "$ac_cv_lib_proj_pj_init_plus" >&6; } if test "x$ac_cv_lib_proj_pj_init_plus" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPROJ 1 _ACEOF LIBS="-lproj $LIBS" else as_fn_error $? "'libproj' is required but it doesn't seem to be installed on this system." "$LINENO" 5 fi #----------------------------------------------------------------------- # --with-geosconfig # # Check whether --with-geosconfig was given. if test "${with_geosconfig+set}" = set; then : withval=$with_geosconfig; GEOSCONFIG="$withval" else GEOSCONFIG="" fi if test "x$GEOSCONFIG" = "x"; then # GEOSCONFIG was not specified, so search within the current path # Extract the first word of "geos-config", so it can be a program name with args. set dummy geos-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GEOSCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $GEOSCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GEOSCONFIG="$GEOSCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GEOSCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GEOSCONFIG=$ac_cv_path_GEOSCONFIG if test -n "$GEOSCONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEOSCONFIG" >&5 $as_echo "$GEOSCONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # If we couldn't find geos-config, display an error if test "x$GEOSCONFIG" = "x"; then as_fn_error $? "could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter." "$LINENO" 5 fi else # GEOSCONFIG was specified; display a message to the user if test "x$GEOSCONFIG" = "xyes"; then as_fn_error $? "you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config" "$LINENO" 5 else if test -f $GEOSCONFIG; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using user-specified geos-config file: $GEOSCONFIG" >&5 $as_echo "Using user-specified geos-config file: $GEOSCONFIG" >&6; } else as_fn_error $? "the user-specified geos-config file $GEOSCONFIG does not exist" "$LINENO" 5 fi fi fi # Extract the linker and include flags GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` GEOS_CPPFLAGS=-I`$GEOSCONFIG --includes` # Ensure that we can parse geos_c.h CPPFLAGS_SAVE="$CPPFLAGS" CPPFLAGS="$GEOS_CPPFLAGS" for ac_header in geos_c.h do : ac_fn_c_check_header_mongrel "$LINENO" "geos_c.h" "ac_cv_header_geos_c_h" "$ac_includes_default" if test "x$ac_cv_header_geos_c_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GEOS_C_H 1 _ACEOF else as_fn_error $? "could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig" "$LINENO" 5 fi done CPPFLAGS="$CPPFLAGS_SAVE" # Ensure we can link against libgeos_c LIBS_SAVE="$LIBS" LIBS="$GEOS_LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing GEOSTopologyPreserveSimplify" >&5 $as_echo_n "checking for library containing GEOSTopologyPreserveSimplify... " >&6; } if ${ac_cv_search_GEOSTopologyPreserveSimplify+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char GEOSTopologyPreserveSimplify (); int main () { return GEOSTopologyPreserveSimplify (); ; return 0; } _ACEOF for ac_lib in '' geos_c; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_GEOSTopologyPreserveSimplify=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_GEOSTopologyPreserveSimplify+:} false; then : break fi done if ${ac_cv_search_GEOSTopologyPreserveSimplify+:} false; then : else ac_cv_search_GEOSTopologyPreserveSimplify=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_GEOSTopologyPreserveSimplify" >&5 $as_echo "$ac_cv_search_GEOSTopologyPreserveSimplify" >&6; } ac_res=$ac_cv_search_GEOSTopologyPreserveSimplify if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "could not find libgeos_c - you may need to specify the directory of a geos-config file using --with-geosconfig" "$LINENO" 5 fi LIBS="$LIBS_SAVE" LIBS=$LIBS$GEOS_LDFLAGS' -lgeos_c' #----------------------------------------------------------------------- # --enable-freexl # # Check whether --enable-freexl was given. if test "${enable_freexl+set}" = set; then : enableval=$enable_freexl; else enable_freexl=yes fi if test x"$enable_freexl" != "xno"; then if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFREEXL" >&5 $as_echo_n "checking for LIBFREEXL... " >&6; } if test -n "$LIBFREEXL_CFLAGS"; then pkg_cv_LIBFREEXL_CFLAGS="$LIBFREEXL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freexl\""; } >&5 ($PKG_CONFIG --exists --print-errors "freexl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFREEXL_CFLAGS=`$PKG_CONFIG --cflags "freexl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBFREEXL_LIBS"; then pkg_cv_LIBFREEXL_LIBS="$LIBFREEXL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freexl\""; } >&5 ($PKG_CONFIG --exists --print-errors "freexl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBFREEXL_LIBS=`$PKG_CONFIG --libs "freexl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBFREEXL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "freexl" 2>&1` else LIBFREEXL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "freexl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBFREEXL_PKG_ERRORS" >&5 as_fn_error $? "'libfreexl' is required but it doesn't seem to be installed on this system." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "'libfreexl' is required but it doesn't seem to be installed on this system." "$LINENO" 5 else LIBFREEXL_CFLAGS=$pkg_cv_LIBFREEXL_CFLAGS LIBFREEXL_LIBS=$pkg_cv_LIBFREEXL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else $as_echo "#define OMIT_FREEXL 1" >>confdefs.h fi #----------------------------------------------------------------------- # --enable-libxml2 # # Check whether --enable-libxml2 was given. if test "${enable_libxml2+set}" = set; then : enableval=$enable_libxml2; else enable_libxml2=yes fi if test x"$enable_libxml2" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML2" >&5 $as_echo_n "checking for LIBXML2... " >&6; } if test -n "$LIBXML2_CFLAGS"; then pkg_cv_LIBXML2_CFLAGS="$LIBXML2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBXML2_LIBS"; then pkg_cv_LIBXML2_LIBS="$LIBXML2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` else LIBXML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBXML2_PKG_ERRORS" >&5 as_fn_error $? "'libxml2' is required but it doesn't seem to be installed on this system." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "'libxml2' is required but it doesn't seem to be installed on this system." "$LINENO" 5 else LIBXML2_CFLAGS=$pkg_cv_LIBXML2_CFLAGS LIBXML2_LIBS=$pkg_cv_LIBXML2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi $as_echo "#define ENABLE_LIBXML2 1" >>confdefs.h fi #----------------------------------------------------------------------- # --enable-openjpeg # # Check whether --enable-openjpeg was given. if test "${enable_openjpeg+set}" = set; then : enableval=$enable_openjpeg; else enable_openjpeg=yes fi if test x"$enable_openjpeg" != "xno"; then # # testing OpenJpeg-2 headers # they could be either on -/include/openjpeg-2.0 # or on -/include/openjpeg-2.1 # for ac_header in openjpeg-2.0/openjpeg.h do : ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.0/openjpeg.h" "ac_cv_header_openjpeg_2_0_openjpeg_h" "$ac_includes_default" if test "x$ac_cv_header_openjpeg_2_0_openjpeg_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENJPEG_2_0_OPENJPEG_H 1 _ACEOF fi done for ac_header in openjpeg-2.1/openjpeg.h do : ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.1/openjpeg.h" "ac_cv_header_openjpeg_2_1_openjpeg_h" "$ac_includes_default" if test "x$ac_cv_header_openjpeg_2_1_openjpeg_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENJPEG_2_1_OPENJPEG_H 1 _ACEOF fi done if test x"$ac_cv_header_openjpeg_2_0_openjpeg_h" != x"yes" && test x"$ac_cv_header_openjpeg_2_1_openjpeg_h" != x"yes"; then as_fn_error $? "'OpenJpeg-2' is required but the header (openjpeg.h) doesn't seem to be installed on this system" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_create_decompress in -lopenjp2" >&5 $as_echo_n "checking for opj_create_decompress in -lopenjp2... " >&6; } if ${ac_cv_lib_openjp2_opj_create_decompress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lopenjp2 -lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opj_create_decompress (); int main () { return opj_create_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_openjp2_opj_create_decompress=yes else ac_cv_lib_openjp2_opj_create_decompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjp2_opj_create_decompress" >&5 $as_echo "$ac_cv_lib_openjp2_opj_create_decompress" >&6; } if test "x$ac_cv_lib_openjp2_opj_create_decompress" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBOPENJP2 1 _ACEOF LIBS="-lopenjp2 $LIBS" else as_fn_error $? "'libopenjp2' is required but it doesn't seems to be installed on this system." "$LINENO" 5 fi # testing for OpenJpeg 2.0 or 2.1 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_OPENJPEG_2_1_OPENJPEG_H #include #else #include #endif int main () { void *d; opj_stream_t *s; opj_stream_set_user_data (s, &d, NULL); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define OPENJPEG_2_1 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else $as_echo "#define OMIT_OPENJPEG 1" >>confdefs.h fi #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --enable-webp # # Check whether --enable-webp was given. if test "${enable_webp+set}" = set; then : enableval=$enable_webp; else enable_webp=yes fi if test x"$enable_webp" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBWEBP" >&5 $as_echo_n "checking for LIBWEBP... " >&6; } if test -n "$LIBWEBP_CFLAGS"; then pkg_cv_LIBWEBP_CFLAGS="$LIBWEBP_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp\""; } >&5 ($PKG_CONFIG --exists --print-errors "libwebp") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBWEBP_CFLAGS=`$PKG_CONFIG --cflags "libwebp" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBWEBP_LIBS"; then pkg_cv_LIBWEBP_LIBS="$LIBWEBP_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libwebp\""; } >&5 ($PKG_CONFIG --exists --print-errors "libwebp") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBWEBP_LIBS=`$PKG_CONFIG --libs "libwebp" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBWEBP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libwebp" 2>&1` else LIBWEBP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libwebp" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBWEBP_PKG_ERRORS" >&5 as_fn_error $? "'libwebp' is required but it doesn't seems to be installed on this system." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "'libwebp' is required but it doesn't seems to be installed on this system." "$LINENO" 5 else LIBWEBP_CFLAGS=$pkg_cv_LIBWEBP_CFLAGS LIBWEBP_LIBS=$pkg_cv_LIBWEBP_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else $as_echo "#define OMIT_WEBP 1" >>confdefs.h fi #----------------------------------------------------------------------- #----------------------------------------------------------------------- # --enable-charls # # Check whether --enable-charls was given. if test "${enable_charls+set}" = set; then : enableval=$enable_charls; else enable_charls=yes fi if test x"$enable_charls" != "xno"; then for ac_header in CharLS/interface.h do : ac_fn_c_check_header_mongrel "$LINENO" "CharLS/interface.h" "ac_cv_header_CharLS_interface_h" "$ac_includes_default" if test "x$ac_cv_header_CharLS_interface_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CHARLS_INTERFACE_H 1 _ACEOF else as_fn_error $? "cannot find CharLS/interface.h, bailing out" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JpegLsEncode in -lCharLS" >&5 $as_echo_n "checking for JpegLsEncode in -lCharLS... " >&6; } if ${ac_cv_lib_CharLS_JpegLsEncode+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lCharLS -lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char JpegLsEncode (); int main () { return JpegLsEncode (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_CharLS_JpegLsEncode=yes else ac_cv_lib_CharLS_JpegLsEncode=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_CharLS_JpegLsEncode" >&5 $as_echo "$ac_cv_lib_CharLS_JpegLsEncode" >&6; } if test "x$ac_cv_lib_CharLS_JpegLsEncode" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCHARLS 1 _ACEOF LIBS="-lCharLS $LIBS" else as_fn_error $? "'libCharLS' is required but it doesn't seems to be installed on this system." "$LINENO" 5 fi else $as_echo "#define OMIT_CHARLS 1" >>confdefs.h fi #----------------------------------------------------------------------- pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBLZMA" >&5 $as_echo_n "checking for LIBLZMA... " >&6; } if test -n "$LIBLZMA_CFLAGS"; then pkg_cv_LIBLZMA_CFLAGS="$LIBLZMA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLZMA_CFLAGS=`$PKG_CONFIG --cflags "liblzma" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBLZMA_LIBS"; then pkg_cv_LIBLZMA_LIBS="$LIBLZMA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblzma\""; } >&5 ($PKG_CONFIG --exists --print-errors "liblzma") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBLZMA_LIBS=`$PKG_CONFIG --libs "liblzma" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblzma" 2>&1` else LIBLZMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblzma" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBLZMA_PKG_ERRORS" >&5 as_fn_error $? "'liblzma' is required but it doesn't seems to be installed on this system." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "'liblzma' is required but it doesn't seems to be installed on this system." "$LINENO" 5 else LIBLZMA_CFLAGS=$pkg_cv_LIBLZMA_CFLAGS LIBLZMA_LIBS=$pkg_cv_LIBLZMA_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSPATIALITE" >&5 $as_echo_n "checking for LIBSPATIALITE... " >&6; } if test -n "$LIBSPATIALITE_CFLAGS"; then pkg_cv_LIBSPATIALITE_CFLAGS="$LIBSPATIALITE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"spatialite\""; } >&5 ($PKG_CONFIG --exists --print-errors "spatialite") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBSPATIALITE_CFLAGS=`$PKG_CONFIG --cflags "spatialite" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBSPATIALITE_LIBS"; then pkg_cv_LIBSPATIALITE_LIBS="$LIBSPATIALITE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"spatialite\""; } >&5 ($PKG_CONFIG --exists --print-errors "spatialite") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBSPATIALITE_LIBS=`$PKG_CONFIG --libs "spatialite" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBSPATIALITE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "spatialite" 2>&1` else LIBSPATIALITE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "spatialite" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBSPATIALITE_PKG_ERRORS" >&5 as_fn_error $? "'libspatialite' is required but it doesn't seem to be installed on this system." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "'libspatialite' is required but it doesn't seem to be installed on this system." "$LINENO" 5 else LIBSPATIALITE_CFLAGS=$pkg_cv_LIBSPATIALITE_CFLAGS LIBSPATIALITE_LIBS=$pkg_cv_LIBSPATIALITE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # testing for libspatialite-amalgamation if test "x$(pkg-config --cflags spatialite|grep "DSPATIALITE_AMALGAMATION=1")" != "x"; then $as_echo "#define SPATIALITE_AMALGAMATION 1" >>confdefs.h fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBRASTERLITE2" >&5 $as_echo_n "checking for LIBRASTERLITE2... " >&6; } if test -n "$LIBRASTERLITE2_CFLAGS"; then pkg_cv_LIBRASTERLITE2_CFLAGS="$LIBRASTERLITE2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rasterlite2\""; } >&5 ($PKG_CONFIG --exists --print-errors "rasterlite2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBRASTERLITE2_CFLAGS=`$PKG_CONFIG --cflags "rasterlite2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBRASTERLITE2_LIBS"; then pkg_cv_LIBRASTERLITE2_LIBS="$LIBRASTERLITE2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"rasterlite2\""; } >&5 ($PKG_CONFIG --exists --print-errors "rasterlite2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBRASTERLITE2_LIBS=`$PKG_CONFIG --libs "rasterlite2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBRASTERLITE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "rasterlite2" 2>&1` else LIBRASTERLITE2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "rasterlite2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBRASTERLITE2_PKG_ERRORS" >&5 as_fn_error $? "'librasterlite2' is required but it doesn't seem to be installed on this system." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "'librasterlite2' is required but it doesn't seem to be installed on this system." "$LINENO" 5 else LIBRASTERLITE2_CFLAGS=$pkg_cv_LIBRASTERLITE2_CFLAGS LIBRASTERLITE2_LIBS=$pkg_cv_LIBRASTERLITE2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi #----------------------------------------------------------------------- # --enable-rl2extra # # Check whether --enable-rl2extra was given. if test "${enable_rl2extra+set}" = set; then : enableval=$enable_rl2extra; else enable_rl2extra=no fi if test x"$enable_rl2extra" != "xyes"; then $as_echo "#define OMIT_RL2EXTRA 1" >>confdefs.h fi #----------------------------------------------------------------------- ac_config_files="$ac_config_files Makefile icons/Makefile win_resource/Makefile gnome_resource/Makefile mac_resource/Makefile" #----------------------------------------------------------------------- # --enable-sqlite_stmtstatus_autoindex # # Check whether --enable-sqlite_stmtstatus_autoindex was given. if test "${enable_sqlite_stmtstatus_autoindex+set}" = set; then : enableval=$enable_sqlite_stmtstatus_autoindex; else sqlite_stmtstatus_autoindex=yes fi if test x"$enable_sqlite_stmtstatus_autoindex" != "xno"; then OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS= else OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS=-DOMIT_SQLITE_STMTSTATUS_AUTOINXED fi # checks for SQLite version-depending constants ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_LOOKASIDE_USED" "ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_USED" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_USED" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_USED 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_LOOKASIDE_HIT" "ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_HIT" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_HIT" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_HIT 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE" "ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL" "ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_CACHE_USED" "ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_USED" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_USED" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_CACHE_USED 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_CACHE_HIT" "ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_HIT" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_HIT" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_CACHE_HIT 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_CACHE_MISS" "ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_MISS" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_MISS" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_CACHE_MISS 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_CACHE_WRITE" "ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_WRITE" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_CACHE_WRITE" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_CACHE_WRITE 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_SCHEMA_USED" "ac_cv_have_decl_SQLITE_DBSTATUS_SCHEMA_USED" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_SCHEMA_USED" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_SCHEMA_USED 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "SQLITE_DBSTATUS_STMT_USED" "ac_cv_have_decl_SQLITE_DBSTATUS_STMT_USED" "#include " if test "x$ac_cv_have_decl_SQLITE_DBSTATUS_STMT_USED" = xyes; then : $as_echo "#define HAVE_DECL_SQLITE_DBSTATUS_STMT_USED 1" >>confdefs.h fi cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by spatialite_gui $as_me 2.0.0-devel, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ spatialite_gui config.status 2.0.0-devel configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "icons/Makefile") CONFIG_FILES="$CONFIG_FILES icons/Makefile" ;; "win_resource/Makefile") CONFIG_FILES="$CONFIG_FILES win_resource/Makefile" ;; "gnome_resource/Makefile") CONFIG_FILES="$CONFIG_FILES gnome_resource/Makefile" ;; "mac_resource/Makefile") CONFIG_FILES="$CONFIG_FILES mac_resource/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi spatialite_gui-2.0.0-devel/Dialogs.cpp0000664000175000017500000072042512544026240014633 00000000000000/* / Dialogs.cpp / various dialog classes / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/spinctrl.h" #include "wx/listctrl.h" #include "wx/tokenzr.h" #include "wx/html/htmlwin.h" bool SanitizeAllGeometriesDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; if (wxDialog::Create(parent, wxID_ANY, wxT("Sanitize All Geometries")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void SanitizeAllGeometriesDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *msgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(msgSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxString msg = wxT ("Do you really intend attempting to sanitize all invalid Geometries ?\n\n"); msg += wxT("This will imply evaluating ST_MakeValid() for each single invalid\n"); msg += wxT("Geometry eventually stored within any \"layer\" defined in \n"); msg += wxT ("\"geometry_columns\", and could possibly require a substantial time\n"); msg += wxT("for a huge DB\n\n"); msg += wxT("A HTML diagnostic report will be created."); wxStaticText *msgLabel = new wxStaticText(this, wxID_STATIC, msg); msgSizer->Add(msgLabel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: TMP_PREFIX wxBoxSizer *tmpSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tmpSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tmpLabel = new wxStaticText(this, wxID_STATIC, wxT("&Prefix for Temporary Tables:")); tmpSizer->Add(tmpLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tmpCtrl = new wxTextCtrl(this, ID_SANEGEOM_PREFIX, wxT("tmp_"), wxDefaultPosition, wxSize(150, 22)); tmpSizer->Add(tmpCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // YES - NO buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *yes = new wxButton(this, wxID_YES, wxT("&YES")); okCancelBox->Add(yes, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *no = new wxButton(this, wxID_NO, wxT("&NO")); okCancelBox->Add(no, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handlers Connect(wxID_YES, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SanitizeAllGeometriesDialog::OnYes); Connect(wxID_NO, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SanitizeAllGeometriesDialog::OnNo); } void SanitizeAllGeometriesDialog::OnNo(wxCommandEvent & WXUNUSED(event)) { wxDialog::EndModal(wxNO); } void SanitizeAllGeometriesDialog::OnYes(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *tmpCtrl = (wxTextCtrl *) FindWindow(ID_SANEGEOM_PREFIX); TmpPrefix = tmpCtrl->GetValue(); if (TmpPrefix.Len() < 1) { wxMessageBox(wxT("You must specify some Prefix !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxDialog::EndModal(wxYES); } bool CheckGeometryDialog::Create(MyFrame * parent, wxString & table, wxString & geom) { // // creating the dialog // MainFrame = parent; if (wxDialog::Create(parent, wxID_ANY, wxT("Check Geometry Column")) == false) return false; Table = table; Geometry = geom; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void CheckGeometryDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: Layer selection (Table/Column) wxBoxSizer *msgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(msgSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString msg = wxT ("Do you really intend checking for validity this Geometry Column ?\n\n"); msg += wxT ("This will imply evaluating ST_IsValid() for each single Geometry stored\n"); msg += wxT ("within the select Column, and could require a substantial time for a\n"); msg += wxT("huge Table\n\n"); msg += wxT("A HTML diagnostic report will be created."); wxStaticText *msgLabel = new wxStaticText(this, wxID_STATIC, msg); msgSizer->Add(msgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *lyrSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *lyr1Sizer = new wxBoxSizer(wxHORIZONTAL); lyrSizer->Add(lyr1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tblLabel = new wxStaticText(this, wxID_STATIC, wxT("Table:")); lyr1Sizer->Add(tblLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tblCtrl = new wxTextCtrl(this, wxID_ANY, Table, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); lyr1Sizer->Add(tblCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *lyr2Sizer = new wxBoxSizer(wxHORIZONTAL); lyrSizer->Add(lyr2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *geoLabel = new wxStaticText(this, wxID_STATIC, wxT("Geomety:")); lyr2Sizer->Add(geoLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *geoCtrl = new wxTextCtrl(this, wxID_ANY, Geometry, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); lyr2Sizer->Add(geoCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // YES - NO buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *yes = new wxButton(this, wxID_YES, wxT("&YES")); okCancelBox->Add(yes, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *no = new wxButton(this, wxID_NO, wxT("&NO")); okCancelBox->Add(no, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handlers Connect(wxID_YES, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & CheckGeometryDialog::OnYes); Connect(wxID_NO, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & CheckGeometryDialog::OnNo); } void CheckGeometryDialog::OnNo(wxCommandEvent & WXUNUSED(event)) { wxDialog::EndModal(wxNO); } void CheckGeometryDialog::OnYes(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxYES); } bool SanitizeGeometryDialog::Create(MyFrame * parent, wxString & table, wxString & geom) { // // creating the dialog // MainFrame = parent; if (wxDialog::Create(parent, wxID_ANY, wxT("Sanitize Geometry Column")) == false) return false; Table = table; Geometry = geom; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void SanitizeGeometryDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: Layer selection (Table/Column) wxBoxSizer *msgSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(msgSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString msg = wxT ("Do you really intend attempting to sanitize all invalid Geometries for this Geometry Column ?\n\n"); msg += wxT ("This will imply evaluating ST_MakeValid() for each single invalid Geometry eventually\n"); msg += wxT ("stored within the selected column, and could possibly require a substantial time\n"); msg += wxT("for a huge Table\n\n"); msg += wxT("A HTML diagnostic report will be created."); wxStaticText *msgLabel = new wxStaticText(this, wxID_STATIC, msg); msgSizer->Add(msgLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *lyrSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(lyrSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *lyr1Sizer = new wxBoxSizer(wxHORIZONTAL); lyrSizer->Add(lyr1Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tblLabel = new wxStaticText(this, wxID_STATIC, wxT("Table:")); lyr1Sizer->Add(tblLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tblCtrl = new wxTextCtrl(this, wxID_ANY, Table, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); lyr1Sizer->Add(tblCtrl, 0, wxALIGN_RIGHT | wxALL, 5); wxBoxSizer *lyr2Sizer = new wxBoxSizer(wxHORIZONTAL); lyrSizer->Add(lyr2Sizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *geoLabel = new wxStaticText(this, wxID_STATIC, wxT("Geomety:")); lyr2Sizer->Add(geoLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *geoCtrl = new wxTextCtrl(this, wxID_ANY, Geometry, wxDefaultPosition, wxSize(150, 22), wxTE_READONLY); lyr2Sizer->Add(geoCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // Second row: TMP_PREFIX wxBoxSizer *tmpSizer = new wxBoxSizer(wxHORIZONTAL); lyrSizer->Add(tmpSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tmpLabel = new wxStaticText(this, wxID_STATIC, wxT("&Prefix for Temporary Tables:")); tmpSizer->Add(tmpLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tmpCtrl = new wxTextCtrl(this, ID_SANEGEOM_PREFIX, wxT("tmp_"), wxDefaultPosition, wxSize(150, 22)); tmpSizer->Add(tmpCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // YES - NO buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *yes = new wxButton(this, wxID_YES, wxT("&YES")); okCancelBox->Add(yes, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *no = new wxButton(this, wxID_NO, wxT("&NO")); okCancelBox->Add(no, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handlers Connect(wxID_YES, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SanitizeGeometryDialog::OnYes); Connect(wxID_NO, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SanitizeGeometryDialog::OnNo); } void SanitizeGeometryDialog::OnNo(wxCommandEvent & WXUNUSED(event)) { wxDialog::EndModal(wxNO); } void SanitizeGeometryDialog::OnYes(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *tmpCtrl = (wxTextCtrl *) FindWindow(ID_SANEGEOM_PREFIX); TmpPrefix = tmpCtrl->GetValue(); if (TmpPrefix.Len() < 1) { wxMessageBox(wxT("You must specify some Prefix !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxDialog::EndModal(wxYES); } bool GisLayerAuthDialog::Create(MyFrame * parent, wxString & table, wxString & geom, bool rdOnly, bool hidden, bool is_table) { // // creating the dialog // MainFrame = parent; Table = table; Geometry = geom; ReadOnly = rdOnly; Hidden = hidden; IsTable = is_table; if (Hidden == true) ReadOnly = false; if (wxDialog::Create(parent, wxID_ANY, wxT("GIS Layer authorizations")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void GisLayerAuthDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_ANY, Table, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); tableCtrl->Enable(false); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: GEOMETRY COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&Geometry name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_ANY, Geometry, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); colCtrl->Enable(false); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: HIDDEN / VISIBLE wxBoxSizer *authSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(authSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString hidden[2]; hidden[0] = wxT("&Visible [ordinary GIS Layer]"); hidden[1] = wxT("&Hidden [not usable as a GIS Layer"); wxRadioBox *hiddenBox = new wxRadioBox(this, ID_AUTH_HIDDEN, wxT("&GIS Layer status"), wxDefaultPosition, wxDefaultSize, 2, hidden, 1, wxRA_SPECIFY_COLS); authSizer->Add(hiddenBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); if (Hidden == true) hiddenBox->SetSelection(1); else hiddenBox->SetSelection(0); // fourth row: READ-ONLY wxString rdOnly[2]; rdOnly[0] = wxT("&ReadWrite [allows editing]"); rdOnly[1] = wxT("&ReadOnly [not editable]"); wxRadioBox *rdOnlyBox = new wxRadioBox(this, ID_AUTH_RDONLY, wxT("&Editing mode"), wxDefaultPosition, wxDefaultSize, 2, rdOnly, 1, wxRA_SPECIFY_COLS); authSizer->Add(rdOnlyBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); if (ReadOnly == true) rdOnlyBox->SetSelection(1); else rdOnlyBox->SetSelection(0); if (Hidden == true) rdOnlyBox->Enable(false); if (!IsTable) rdOnlyBox->Enable(false); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handlers Connect(ID_AUTH_HIDDEN, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & GisLayerAuthDialog::OnHiddenChanged); Connect(ID_AUTH_RDONLY, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & GisLayerAuthDialog::OnReadOnlyChanged); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & GisLayerAuthDialog::OnOk); } void GisLayerAuthDialog::OnHiddenChanged(wxCommandEvent & WXUNUSED(event)) { // // HIDDEN / VISIBLE selection changed // wxRadioBox *hiddenCtrl = (wxRadioBox *) FindWindow(ID_AUTH_HIDDEN); wxRadioBox *rdOnlyCtrl = (wxRadioBox *) FindWindow(ID_AUTH_RDONLY); switch (hiddenCtrl->GetSelection()) { case 0: Hidden = false; break; case 1: Hidden = true; break; }; if (Hidden == true) { ReadOnly = false; rdOnlyCtrl->SetSelection(0); rdOnlyCtrl->Enable(false); } else { if (ReadOnly == false) rdOnlyCtrl->SetSelection(0); else rdOnlyCtrl->SetSelection(1); rdOnlyCtrl->Enable(true); } if (!IsTable) rdOnlyCtrl->Enable(false); } void GisLayerAuthDialog::OnReadOnlyChanged(wxCommandEvent & WXUNUSED(event)) { // // READ-ONLY selection changed // wxRadioBox *rdOnlyCtrl = (wxRadioBox *) FindWindow(ID_AUTH_RDONLY); switch (rdOnlyCtrl->GetSelection()) { case 0: ReadOnly = false; break; case 1: ReadOnly = true; break; }; } void GisLayerAuthDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool VirtualShpDialog::Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs) { // // creating the dialog // MainFrame = parent; Path = path; Table = table; Default = defCs; TextDates = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Creating Virtual Shapefile")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void VirtualShpDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Shapefile path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_VIRTSHP_TABLE, Table, wxDefaultPosition, wxSize(350, 22)); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: SRID wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); int srid = 0; if (MainFrame->GetMetaDataType() != METADATA_CURRENT) srid = -1; // old default SRID wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_VIRTSHP_SRID, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, -1, 1000000, srid); sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: CHARSET wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Charset Encoding"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); sridSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *charsetCtrl = new wxListBox(this, ID_VIRTSHP_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Default); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // DBF dates interpreatation wxBoxSizer *dbfDatesBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(dbfDatesBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString dbf_dates[2]; dbf_dates[0] = wxT("as Julian Day numbers"); dbf_dates[1] = wxT("as PlainText strings"); wxRadioBox *dbf_dates_sel = new wxRadioBox(this, ID_VIRTSHP_TEXTDATES, wxT ("interpretation of &DBF DATE values"), wxDefaultPosition, wxDefaultSize, 2, dbf_dates, 2, wxRA_SPECIFY_COLS); dbf_dates_sel->SetSelection(0); dbfDatesBox->Add(dbf_dates_sel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VirtualShpDialog::OnOk); Connect(ID_VIRTSHP_TEXTDATES, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & VirtualShpDialog::OnTextDates); } void VirtualShpDialog::OnTextDates(wxCommandEvent & WXUNUSED(event)) { // // the mode of user defined DBF TextDates changed // wxRadioBox *radioCtrl = (wxRadioBox *) FindWindow(ID_VIRTSHP_TEXTDATES); if (radioCtrl->GetSelection() == 0) TextDates = false; else TextDates = true; } void VirtualShpDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_VIRTSHP_TABLE); Table = tableCtrl->GetValue(); if (Table.Len() < 1) { wxMessageBox(wxT("You must specify the TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (MainFrame->TableAlreadyExists(Table) == true) { wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_VIRTSHP_SRID); Srid = sridCtrl->GetValue(); if (Srid <= 0) ; else if (MainFrame->SridNotExists(Srid) == true) { wxMessageBox(wxT("invalid SRID value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_VIRTSHP_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxDialog::EndModal(wxID_OK); } bool VirtualTxtDialog::Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs) { // // creating the dialog // MainFrame = parent; Path = path; Table = table; Default = defCs; if (wxDialog::Create(parent, wxID_ANY, wxT("Creating Virtual CSV/TXT")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void VirtualTxtDialog::CreateControls() { // // creating individual control and setting initial values // FirstLineTitles = true; Separator = '\t'; TextSeparator = '"'; DecimalPointIsComma = false; wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the CSV/TXT path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_VIRTTXT_TABLE, Table, wxDefaultPosition, wxSize(350, 22)); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: OPTIONS wxBoxSizer *optSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *modeSizer = new wxBoxSizer(wxVERTICAL); optSizer->Add(modeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *mode1Sizer = new wxBoxSizer(wxHORIZONTAL); modeSizer->Add(mode1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *titleCtrl = new wxCheckBox(this, ID_VIRTTXT_TITLES, wxT ("First line contains column names"), wxDefaultPosition, wxDefaultSize); titleCtrl->SetValue(true); mode1Sizer->Add(titleCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *sepBox = new wxStaticBox(this, wxID_STATIC, wxT("Separators"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sepSizer = new wxStaticBoxSizer(sepBox, wxVERTICAL); modeSizer->Add(sepSizer, 0, wxALIGN_LEFT | wxALL, 0); wxBoxSizer *mode2Sizer = new wxBoxSizer(wxHORIZONTAL); sepSizer->Add(mode2Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxString quotes[3]; quotes[0] = wxT("&Double \""); quotes[1] = wxT("&Single '"); quotes[2] = wxT("&None"); wxRadioBox *textSeparatorBox = new wxRadioBox(this, ID_VIRTTXT_QUOTE, wxT("&Text separator: quotes"), wxDefaultPosition, wxDefaultSize, 3, quotes, 3, wxRA_SPECIFY_COLS); mode2Sizer->Add(textSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *mode3Sizer = new wxBoxSizer(wxHORIZONTAL); sepSizer->Add(mode3Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxString separators[6]; separators[0] = wxT("&Tab"); separators[1] = wxT("&Space"); separators[2] = wxT("Co&mma ,"); separators[3] = wxT("&Colon :"); separators[4] = wxT("S&emicolon ;"); separators[5] = wxT("&Other"); wxRadioBox *separatorBox = new wxRadioBox(this, ID_VIRTTXT_SEPARATOR, wxT("&Column separator"), wxDefaultPosition, wxDefaultSize, 6, separators, 2, wxRA_SPECIFY_COLS); mode3Sizer->Add(separatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *mode4Sizer = new wxBoxSizer(wxHORIZONTAL); sepSizer->Add(mode4Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *charSeparatorLabel = new wxStaticText(this, wxID_STATIC, wxT("&Custom separator:"), wxDefaultPosition, wxDefaultSize, 0); mode4Sizer->Add(charSeparatorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dummy = new wxTextCtrl(this, ID_VIRTTXT_CHARSEPARATOR, wxT("Dummy Text pq"), wxDefaultPosition, wxDefaultSize, 0); wxSize sz = dummy->GetSize(); delete dummy; sz.SetWidth(40); wxTextCtrl *charSeparatorCtrl = new wxTextCtrl(this, ID_VIRTTXT_CHARSEPARATOR, wxT("TAB"), wxDefaultPosition, sz, 0); charSeparatorCtrl->SetMaxLength(1); charSeparatorCtrl->Enable(false); mode4Sizer->Add(charSeparatorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *mode5Sizer = new wxBoxSizer(wxHORIZONTAL); sepSizer->Add(mode5Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxString points[2]; points[0] = wxT("&Point ."); points[1] = wxT("&Comma ,"); wxRadioBox *decimalSeparatorBox = new wxRadioBox(this, ID_VIRTTXT_POINT, wxT("&Decimal separator"), wxDefaultPosition, wxDefaultSize, 2, points, 2, wxRA_SPECIFY_COLS); mode5Sizer->Add(decimalSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: CHARSET wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Charset Encoding"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); optSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *charsetCtrl = new wxListBox(this, ID_VIRTTXT_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Default); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VirtualTxtDialog::OnOk); // appends event handler for radioboxes Connect(ID_VIRTTXT_QUOTE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & VirtualTxtDialog::OnQuote); Connect(ID_VIRTTXT_SEPARATOR, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & VirtualTxtDialog::OnSeparator); Connect(ID_VIRTTXT_POINT, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & VirtualTxtDialog::OnDecimalSeparator); } void VirtualTxtDialog::OnDecimalSeparator(wxCommandEvent & WXUNUSED(event)) { // // POINT selection changed // wxRadioBox *decimalSeparatorCtrl = (wxRadioBox *) FindWindow(ID_VIRTTXT_POINT); switch (decimalSeparatorCtrl->GetSelection()) { case 0: DecimalPointIsComma = false; break; case 1: DecimalPointIsComma = true; break; }; } void VirtualTxtDialog::OnQuote(wxCommandEvent & WXUNUSED(event)) { // // QUOTE selection changed // wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_VIRTTXT_QUOTE); switch (separatorCtrl->GetSelection()) { case 0: TextSeparator = '"'; break; case 1: TextSeparator = '\''; break; case 2: TextSeparator = '\0'; break; }; } void VirtualTxtDialog::OnSeparator(wxCommandEvent & WXUNUSED(event)) { // // SEPARATOR selection changed // wxTextCtrl *charSeparatorCtrl = (wxTextCtrl *) FindWindow(ID_VIRTTXT_CHARSEPARATOR); wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_VIRTTXT_SEPARATOR); switch (separatorCtrl->GetSelection()) { case 0: Separator = '\t'; charSeparatorCtrl->SetValue(wxT("TAB")); break; case 1: Separator = ' '; charSeparatorCtrl->SetValue(wxT("SP")); break; case 2: Separator = ','; charSeparatorCtrl->SetValue(wxT(",")); break; case 3: Separator = ':'; charSeparatorCtrl->SetValue(wxT(":")); break; case 4: Separator = ';'; charSeparatorCtrl->SetValue(wxT(";")); break; case 5: Separator = '|'; charSeparatorCtrl->SetValue(wxT("|")); break; }; if (separatorCtrl->GetSelection() == 5) charSeparatorCtrl->Enable(true); else charSeparatorCtrl->Enable(false); } void VirtualTxtDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxCheckBox *firstLineCtrl = (wxCheckBox *) FindWindow(ID_VIRTTXT_TITLES); FirstLineTitles = firstLineCtrl->IsChecked(); wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_VIRTTXT_TABLE); Table = tableCtrl->GetValue(); if (Table.Len() < 1) { wxMessageBox(wxT("You must specify the TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (MainFrame->TableAlreadyExists(Table) == true) { wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_VIRTTXT_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_VIRTTXT_SEPARATOR); if (separatorCtrl->GetSelection() == 5) { wxTextCtrl *charSeparatorCtrl = (wxTextCtrl *) FindWindow(ID_VIRTTXT_CHARSEPARATOR); wxString separator = charSeparatorCtrl->GetValue(); if (separator.Len() != 1) { wxMessageBox(wxT ("you must specificy a single char as Custom Column Separator"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } char dummy[64]; strcpy(dummy, separator.ToUTF8()); Separator = *dummy; } wxDialog::EndModal(wxID_OK); } bool VirtualDbfDialog::Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs) { // // creating the dialog // MainFrame = parent; Path = path; Table = table; Default = defCs; TextDates = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Creating Virtual DBF")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void VirtualDbfDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the DBF path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_VIRTDBF_TABLE, Table, wxDefaultPosition, wxSize(350, 22)); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: CHARSET wxBoxSizer *optSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Charset Encoding"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); optSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *charsetCtrl = new wxListBox(this, ID_VIRTDBF_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Default); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // DBF dates interpreatation wxBoxSizer *dbfDatesBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(dbfDatesBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString dbf_dates[2]; dbf_dates[0] = wxT("as Julian Day numbers"); dbf_dates[1] = wxT("as PlainText strings"); wxRadioBox *dbf_dates_sel = new wxRadioBox(this, ID_VIRTDBF_TEXTDATES, wxT ("interpretation of &DBF DATE values"), wxDefaultPosition, wxDefaultSize, 2, dbf_dates, 2, wxRA_SPECIFY_COLS); dbf_dates_sel->SetSelection(0); dbfDatesBox->Add(dbf_dates_sel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VirtualDbfDialog::OnOk); Connect(ID_VIRTDBF_TEXTDATES, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & VirtualDbfDialog::OnTextDates); } void VirtualDbfDialog::OnTextDates(wxCommandEvent & WXUNUSED(event)) { // // the mode of user defined DBF TextDates changed // wxRadioBox *radioCtrl = (wxRadioBox *) FindWindow(ID_VIRTDBF_TEXTDATES); if (radioCtrl->GetSelection() == 0) TextDates = false; else TextDates = true; } void VirtualDbfDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_VIRTDBF_TABLE); Table = tableCtrl->GetValue(); if (Table.Len() < 1) { wxMessageBox(wxT("You must specify the TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (MainFrame->TableAlreadyExists(Table) == true) { wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_VIRTDBF_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxDialog::EndModal(wxID_OK); } bool VirtualXLDialog::Create(MyFrame * parent, wxString & path, wxString & table) { // // creating the dialog // MainFrame = parent; Path = path; Table = table; FirstLineTitles = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Creating Virtual XL")) == false) return false; GetWorksheets(); WorksheetIndex = 0; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void VirtualXLDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the XL path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_VIRTXL_TABLE, Table, wxDefaultPosition, wxSize(350, 22)); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Worksheets wxBoxSizer *optSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *sheetBox = new wxStaticBox(this, wxID_STATIC, wxT("Worksheet Selection"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sheetSizer = new wxStaticBoxSizer(sheetBox, wxHORIZONTAL); optSizer->Add(sheetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *sheetCtrl = new wxListBox(this, ID_VIRTXL_WORKSHEET, wxDefaultPosition, wxSize(400, 100), WorksheetCount, Worksheets, wxLB_SINGLE | wxLB_HSCROLL); sheetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); sheetCtrl->SetSelection(0); sheetSizer->Add(sheetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // fourth row: First Line Titles wxCheckBox *titleCtrl = new wxCheckBox(this, ID_VIRTXL_TITLES, wxT ("First line contains column names"), wxDefaultPosition, wxDefaultSize); titleCtrl->SetValue(false); optSizer->Add(titleCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & VirtualXLDialog::OnOk); } void VirtualXLDialog::GetWorksheets() { // attempting to build the Worksheet List #ifndef OMIT_FREEXL /* only if FreeXL is enabled */ Invalid = true; Worksheets = NULL; WorksheetCount = 0; int ret; const void *xl_handle; char dummy[1024]; unsigned int info; unsigned int idx; const char *utf8_string; // opening the .XLS file [Workbook] strcpy(dummy, Path.ToUTF8()); ret = freexl_open_info(dummy, &xl_handle); if (ret != FREEXL_OK) goto error; // checking if Password protected ret = freexl_get_info(xl_handle, FREEXL_BIFF_PASSWORD, &info); if (ret != FREEXL_OK) goto error; if (info != FREEXL_BIFF_PLAIN) goto error; // Worksheet entries ret = freexl_get_info(xl_handle, FREEXL_BIFF_SHEET_COUNT, &info); if (ret != FREEXL_OK) goto error; if (info == 0) goto error; Worksheets = new wxString[info]; WorksheetCount = info; for (idx = 0; idx < info; idx++) { // fetching Worksheets entries unsigned int rows; unsigned short columns; ret = freexl_get_worksheet_name(xl_handle, idx, &utf8_string); if (ret != FREEXL_OK) goto error; ret = freexl_select_active_worksheet(xl_handle, idx); if (ret != FREEXL_OK) goto error; ret = freexl_worksheet_dimensions(xl_handle, &rows, &columns); if (ret != FREEXL_OK) goto error; if (utf8_string == NULL) sprintf(dummy, "%3u] NULL (unnamed) [%urows / %ucols]\n", idx, rows, columns); else sprintf(dummy, "%3u] %s [%urows / %ucols]\n", idx, utf8_string, rows, columns); Worksheets[idx] = wxString::FromUTF8(dummy); } Invalid = false; freexl_close(xl_handle); return; error: freexl_close(xl_handle); if (Worksheets) delete[]Worksheets; Worksheets = new wxString[1]; Worksheets[0] = wxT("ERROR: no Worksheet found"); WorksheetCount = 1; #endif /* end FreeXL conditional support */ } void VirtualXLDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // if (Invalid) { wxMessageBox(wxT("You cannot confirm: INVALID XL datasource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_VIRTXL_TABLE); Table = tableCtrl->GetValue(); if (Table.Len() < 1) { wxMessageBox(wxT("You must specify the TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (MainFrame->TableAlreadyExists(Table) == true) { wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *sheetCtrl = (wxListBox *) FindWindow(ID_VIRTXL_WORKSHEET); int idSel = sheetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Worksheet from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } WorksheetIndex = idSel; wxCheckBox *firstLineCtrl = (wxCheckBox *) FindWindow(ID_VIRTXL_TITLES); FirstLineTitles = firstLineCtrl->IsChecked(); wxDialog::EndModal(wxID_OK); } bool LoadXLDialog::Create(MyFrame * parent, wxString & path, wxString & table) { // // creating the dialog // MainFrame = parent; Path = path; Table = table; FirstLineTitles = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Load XL spreadsheet")) == false) return false; GetWorksheets(); WorksheetIndex = 0; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void LoadXLDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the XL path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_LDXL_TABLE, Table, wxDefaultPosition, wxSize(350, 22)); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Worksheets wxBoxSizer *optSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *sheetBox = new wxStaticBox(this, wxID_STATIC, wxT("Worksheet Selection"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sheetSizer = new wxStaticBoxSizer(sheetBox, wxHORIZONTAL); optSizer->Add(sheetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *sheetCtrl = new wxListBox(this, ID_LDXL_WORKSHEET, wxDefaultPosition, wxSize(400, 100), WorksheetCount, Worksheets, wxLB_SINGLE | wxLB_HSCROLL); sheetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); sheetCtrl->SetSelection(0); sheetSizer->Add(sheetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // fourth row: First Line Titles wxCheckBox *titleCtrl = new wxCheckBox(this, ID_LDXL_TITLES, wxT ("First line contains column names"), wxDefaultPosition, wxDefaultSize); titleCtrl->SetValue(false); optSizer->Add(titleCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadXLDialog::OnOk); } void LoadXLDialog::GetWorksheets() { // attempting to build the Worksheet List #ifndef OMIT_FREEXL /* only if FreeXL is enabled */ Invalid = true; Worksheets = NULL; WorksheetCount = 0; int ret; const void *xl_handle; char dummy[1024]; unsigned int info; unsigned int idx; const char *utf8_string; // opening the .XLS file [Workbook] strcpy(dummy, Path.ToUTF8()); ret = freexl_open_info(dummy, &xl_handle); if (ret != FREEXL_OK) goto error; // checking if Password protected ret = freexl_get_info(xl_handle, FREEXL_BIFF_PASSWORD, &info); if (ret != FREEXL_OK) goto error; if (info != FREEXL_BIFF_PLAIN) goto error; // Worksheet entries ret = freexl_get_info(xl_handle, FREEXL_BIFF_SHEET_COUNT, &info); if (ret != FREEXL_OK) goto error; if (info == 0) goto error; Worksheets = new wxString[info]; WorksheetCount = info; for (idx = 0; idx < info; idx++) { // fetching Worksheets entries unsigned int rows; unsigned short columns; ret = freexl_get_worksheet_name(xl_handle, idx, &utf8_string); if (ret != FREEXL_OK) goto error; ret = freexl_select_active_worksheet(xl_handle, idx); if (ret != FREEXL_OK) goto error; ret = freexl_worksheet_dimensions(xl_handle, &rows, &columns); if (ret != FREEXL_OK) goto error; if (utf8_string == NULL) sprintf(dummy, "%3u] NULL (unnamed) [%urows / %ucols]\n", idx, rows, columns); else sprintf(dummy, "%3u] %s [%urows / %ucols]\n", idx, utf8_string, rows, columns); Worksheets[idx] = wxString::FromUTF8(dummy); } Invalid = false; freexl_close(xl_handle); return; error: freexl_close(xl_handle); if (Worksheets) delete[]Worksheets; Worksheets = new wxString[1]; Worksheets[0] = wxT("ERROR: no Worksheet found"); WorksheetCount = 1; #endif /* end FreeXL conditional support */ } void LoadXLDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // if (Invalid) { wxMessageBox(wxT("You cannot confirm: INVALID XL datasource !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_LDXL_TABLE); Table = tableCtrl->GetValue(); if (Table.Len() < 1) { wxMessageBox(wxT("You must specify the TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (MainFrame->TableAlreadyExists(Table) == true) { wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *sheetCtrl = (wxListBox *) FindWindow(ID_LDXL_WORKSHEET); int idSel = sheetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Worksheet from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } WorksheetIndex = idSel; wxCheckBox *firstLineCtrl = (wxCheckBox *) FindWindow(ID_LDXL_TITLES); FirstLineTitles = firstLineCtrl->IsChecked(); wxDialog::EndModal(wxID_OK); } bool LoadXmlDialog::Create(MyFrame * parent, wxString & path) { // // creating the dialog // MainFrame = parent; Path = path; Compressed = true; Validate = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Loading an XML Document")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void LoadXmlDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Xml path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: Compressed XmlBLOB wxBoxSizer *comprSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(comprSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *compressedCtrl = new wxCheckBox(this, ID_LDXML_COMPRESSED, wxT("Compressed XML BLOB"), wxDefaultPosition, wxDefaultSize); compressedCtrl->SetValue(true); comprSizer->Add(compressedCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // third row: Schema Validation wxStaticBox *schemaBox = new wxStaticBox(this, wxID_STATIC, wxT("Schema Validation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *validateSizer = new wxStaticBoxSizer(schemaBox, wxVERTICAL); boxSizer->Add(validateSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *valSizer = new wxBoxSizer(wxHORIZONTAL); validateSizer->Add(valSizer, 0, wxALIGN_LEFT | wxALL, 0); wxCheckBox *validateCtrl = new wxCheckBox(this, ID_LDXML_VALIDATE, wxT("Apply Schema Validation"), wxDefaultPosition, wxDefaultSize); validateCtrl->SetValue(false); valSizer->Add(validateCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *schemaUriSizer = new wxBoxSizer(wxHORIZONTAL); validateSizer->Add(schemaUriSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *schemaLabel = new wxStaticText(this, wxID_STATIC, wxT("&Schema URI:")); schemaUriSizer->Add(schemaLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *schemaUriValue = new wxTextCtrl(this, ID_LDXML_SCHEMA_URI, wxT(""), wxDefaultPosition, wxSize(350, 22)); schemaUriValue->Enable(false); schemaUriSizer->Add(schemaUriValue, 0, wxALIGN_RIGHT | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadXmlDialog::OnOk); Connect(ID_LDXML_COMPRESSED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & LoadXmlDialog::OnCompressionChanged); Connect(ID_LDXML_VALIDATE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & LoadXmlDialog::OnValidationChanged); } void LoadXmlDialog::OnCompressionChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Compressed (on/off): // wxCheckBox *compressedCtrl = (wxCheckBox *) FindWindow(ID_LDXML_COMPRESSED); if (compressedCtrl->IsChecked() == true) Compressed = true; else Compressed = false; } void LoadXmlDialog::OnValidationChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Schema Validation (on/off): // wxCheckBox *validateCtrl = (wxCheckBox *) FindWindow(ID_LDXML_VALIDATE); wxTextCtrl *schemaUriCtrl = (wxTextCtrl *) FindWindow(ID_LDXML_SCHEMA_URI); if (validateCtrl->IsChecked()) schemaUriCtrl->Enable(true); else { SchemaURI = wxT(""); schemaUriCtrl->SetValue(SchemaURI); schemaUriCtrl->Enable(false); } } void LoadXmlDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxCheckBox *validateCtrl = (wxCheckBox *) FindWindow(ID_LDXML_VALIDATE); if (validateCtrl->IsChecked()) { wxTextCtrl *schemaUriCtrl = (wxTextCtrl *) FindWindow(ID_LDXML_SCHEMA_URI); wxString schemaUri = schemaUriCtrl->GetValue().Trim(false); SchemaURI = schemaUri.Trim(true); if (SchemaURI.Len() < 1) { wxMessageBox(wxT("You must specify some Schema URI !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } wxDialog::EndModal(wxID_OK); } bool LoadTxtDialog::Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs) { // // creating the dialog // MainFrame = parent; Path = path; Table = table; Default = defCs; if (wxDialog::Create(parent, wxID_ANY, wxT("Load CSV/TXT")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void LoadTxtDialog::CreateControls() { // // creating individual control and setting initial values // FirstLineTitles = true; Separator = '\t'; TextSeparator = '"'; DecimalPointIsComma = false; wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the CSV/TXT path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_LDTXT_TABLE, Table, wxDefaultPosition, wxSize(350, 22)); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: OPTIONS wxBoxSizer *optSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *modeSizer = new wxBoxSizer(wxVERTICAL); optSizer->Add(modeSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *mode1Sizer = new wxBoxSizer(wxHORIZONTAL); modeSizer->Add(mode1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *titleCtrl = new wxCheckBox(this, ID_LDTXT_TITLES, wxT ("First line contains column names"), wxDefaultPosition, wxDefaultSize); titleCtrl->SetValue(true); mode1Sizer->Add(titleCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticBox *sepBox = new wxStaticBox(this, wxID_STATIC, wxT("Separators"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sepSizer = new wxStaticBoxSizer(sepBox, wxVERTICAL); modeSizer->Add(sepSizer, 0, wxALIGN_LEFT | wxALL, 0); wxBoxSizer *mode2Sizer = new wxBoxSizer(wxHORIZONTAL); sepSizer->Add(mode2Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxString quotes[3]; quotes[0] = wxT("&Double \""); quotes[1] = wxT("&Single '"); quotes[2] = wxT("&None"); wxRadioBox *textSeparatorBox = new wxRadioBox(this, ID_LDTXT_QUOTE, wxT("&Text separator: quotes"), wxDefaultPosition, wxDefaultSize, 3, quotes, 3, wxRA_SPECIFY_COLS); mode2Sizer->Add(textSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *mode3Sizer = new wxBoxSizer(wxHORIZONTAL); sepSizer->Add(mode3Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxString separators[6]; separators[0] = wxT("&Tab"); separators[1] = wxT("&Space"); separators[2] = wxT("Co&mma ,"); separators[3] = wxT("&Colon :"); separators[4] = wxT("S&emicolon ;"); separators[5] = wxT("&Other"); wxRadioBox *separatorBox = new wxRadioBox(this, ID_LDTXT_SEPARATOR, wxT("&Column separator"), wxDefaultPosition, wxDefaultSize, 6, separators, 2, wxRA_SPECIFY_COLS); mode3Sizer->Add(separatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *mode4Sizer = new wxBoxSizer(wxHORIZONTAL); sepSizer->Add(mode4Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *charSeparatorLabel = new wxStaticText(this, wxID_STATIC, wxT("&Custom separator:"), wxDefaultPosition, wxDefaultSize, 0); mode4Sizer->Add(charSeparatorLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dummy = new wxTextCtrl(this, ID_LDTXT_CHARSEPARATOR, wxT("Dummy Text pq"), wxDefaultPosition, wxDefaultSize, 0); wxSize sz = dummy->GetSize(); delete dummy; sz.SetWidth(40); wxTextCtrl *charSeparatorCtrl = new wxTextCtrl(this, ID_LDTXT_CHARSEPARATOR, wxT("TAB"), wxDefaultPosition, sz, 0); charSeparatorCtrl->SetMaxLength(1); charSeparatorCtrl->Enable(false); mode4Sizer->Add(charSeparatorCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxBoxSizer *mode5Sizer = new wxBoxSizer(wxHORIZONTAL); sepSizer->Add(mode5Sizer, 0, wxALIGN_LEFT | wxALL, 0); wxString points[2]; points[0] = wxT("&Point ."); points[1] = wxT("&Comma ,"); wxRadioBox *decimalSeparatorBox = new wxRadioBox(this, ID_LDTXT_POINT, wxT("&Decimal separator"), wxDefaultPosition, wxDefaultSize, 2, points, 2, wxRA_SPECIFY_COLS); mode5Sizer->Add(decimalSeparatorBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: CHARSET wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Charset Encoding"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); optSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *charsetCtrl = new wxListBox(this, ID_LDTXT_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Default); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadTxtDialog::OnOk); // appends event handler for radioboxes Connect(ID_LDTXT_QUOTE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & LoadTxtDialog::OnQuote); Connect(ID_LDTXT_SEPARATOR, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & LoadTxtDialog::OnSeparator); Connect(ID_LDTXT_POINT, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & LoadTxtDialog::OnDecimalSeparator); } void LoadTxtDialog::OnDecimalSeparator(wxCommandEvent & WXUNUSED(event)) { // // POINT selection changed // wxRadioBox *decimalSeparatorCtrl = (wxRadioBox *) FindWindow(ID_LDTXT_POINT); switch (decimalSeparatorCtrl->GetSelection()) { case 0: DecimalPointIsComma = false; break; case 1: DecimalPointIsComma = true; break; }; } void LoadTxtDialog::OnQuote(wxCommandEvent & WXUNUSED(event)) { // // QUOTE selection changed // wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_LDTXT_QUOTE); switch (separatorCtrl->GetSelection()) { case 0: TextSeparator = '"'; break; case 1: TextSeparator = '\''; break; case 2: TextSeparator = '\0'; break; }; } void LoadTxtDialog::OnSeparator(wxCommandEvent & WXUNUSED(event)) { // // SEPARATOR selection changed // wxTextCtrl *charSeparatorCtrl = (wxTextCtrl *) FindWindow(ID_LDTXT_CHARSEPARATOR); wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_LDTXT_SEPARATOR); switch (separatorCtrl->GetSelection()) { case 0: Separator = '\t'; charSeparatorCtrl->SetValue(wxT("TAB")); break; case 1: Separator = ' '; charSeparatorCtrl->SetValue(wxT("SP")); break; case 2: Separator = ','; charSeparatorCtrl->SetValue(wxT(",")); break; case 3: Separator = ':'; charSeparatorCtrl->SetValue(wxT(":")); break; case 4: Separator = ';'; charSeparatorCtrl->SetValue(wxT(";")); break; case 5: Separator = '|'; charSeparatorCtrl->SetValue(wxT("|")); break; }; if (separatorCtrl->GetSelection() == 5) charSeparatorCtrl->Enable(true); else charSeparatorCtrl->Enable(false); } void LoadTxtDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxCheckBox *firstLineCtrl = (wxCheckBox *) FindWindow(ID_LDTXT_TITLES); FirstLineTitles = firstLineCtrl->IsChecked(); wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_LDTXT_TABLE); Table = tableCtrl->GetValue(); if (Table.Len() < 1) { wxMessageBox(wxT("You must specify the TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (MainFrame->TableAlreadyExists(Table) == true) { wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_LDTXT_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxRadioBox *separatorCtrl = (wxRadioBox *) FindWindow(ID_LDTXT_SEPARATOR); if (separatorCtrl->GetSelection() == 5) { wxTextCtrl *charSeparatorCtrl = (wxTextCtrl *) FindWindow(ID_LDTXT_CHARSEPARATOR); wxString separator = charSeparatorCtrl->GetValue(); if (separator.Len() != 1) { wxMessageBox(wxT ("you must specificy a single char as Custom Column Separator"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } char dummy[64]; strcpy(dummy, separator.ToUTF8()); Separator = *dummy; } wxDialog::EndModal(wxID_OK); } LoadDbfDialog::~LoadDbfDialog() { // destructor if (PKFields != NULL) delete[]PKFields; if (PKFieldsEx != NULL) delete[]PKFieldsEx; } bool LoadDbfDialog::Create(MyFrame * parent, wxString & path, wxString & table, wxString & defCs) { // // creating the dialog // MainFrame = parent; Path = path; Table = table; Default = defCs; PKCount = 0; PKFields = NULL; PKFieldsEx = NULL; TextDates = false; LoadPKFields(); if (wxDialog::Create(parent, wxID_ANY, wxT("Load DBF")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void LoadDbfDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the DBF path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_LDDBF_TABLE, Table, wxDefaultPosition, wxSize(350, 22)); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: CHARSET wxBoxSizer *optSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(optSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Charset Encoding"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); optSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *charsetCtrl = new wxListBox(this, ID_LDDBF_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Default); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // User Defined Primary Key wxBoxSizer *userdefBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(userdefBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *userPKeyBox = new wxStaticBox(this, wxID_STATIC, wxT("Primary Key Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *gPKeySizer = new wxStaticBoxSizer(userPKeyBox, wxVERTICAL); userdefBox->Add(gPKeySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxString pkey_selection[2]; pkey_selection[0] = wxT("Automatic"); pkey_selection[1] = wxT("User specified"); wxRadioBox *gpkey_sel = new wxRadioBox(this, ID_LDDBF_USER_PKEY, wxT("&Mode"), wxDefaultPosition, wxDefaultSize, 2, pkey_selection, 2, wxRA_SPECIFY_COLS); gpkey_sel->SetSelection(0); gPKeySizer->Add(gpkey_sel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxComboBox *pkeyList = new wxComboBox(this, ID_LDDBF_PKCOL, wxT(""), wxDefaultPosition, wxSize(180, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); pkeyList->Enable(false); gPKeySizer->Add(pkeyList, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // DBF dates interpreatation wxBoxSizer *dbfDatesBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(dbfDatesBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString dbf_dates[2]; dbf_dates[0] = wxT("as Julian Day numbers"); dbf_dates[1] = wxT("as PlainText strings"); wxRadioBox *dbf_dates_sel = new wxRadioBox(this, ID_LDDBF_TEXTDATES, wxT ("interpretation of &DBF DATE values"), wxDefaultPosition, wxDefaultSize, 2, dbf_dates, 2, wxRA_SPECIFY_COLS); dbf_dates_sel->SetSelection(0); dbfDatesBox->Add(dbf_dates_sel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadDbfDialog::OnOk); Connect(ID_LDDBF_USER_PKEY, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & LoadDbfDialog::OnUserPKey); Connect(ID_LDDBF_TEXTDATES, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & LoadDbfDialog::OnTextDates); } void LoadDbfDialog::LoadPKFields() { // loading the Primary Key Fields list char dbf_path[1024]; char charset[1024]; char dummy[1024]; wxString dummyName; int cnt; int seed; int dup; int idup; wxString *charsets = MainFrame->GetCharsets(); wxString cs; int idSel = MainFrame->GetCharsetIndex(Default); gaiaDbfPtr dbf = NULL; gaiaDbfFieldPtr dbf_field; if (PKFields != NULL) delete[]PKFields; PKFields = NULL; PKCount = 0; // opening the DBF in order to fetch field names dbf = gaiaAllocDbf(); strcpy(dbf_path, Path.ToUTF8()); cs = *(charsets + idSel); strcpy(charset, cs.ToUTF8()); gaiaOpenDbfRead(dbf, dbf_path, charset, "UTF-8"); if (!(dbf->Valid)) { gaiaFreeDbf(dbf); return; } /* checking for duplicate / illegal column names and antialising them */ dbf_field = dbf->Dbf->First; while (dbf_field) { /* counting DBF fields */ PKCount++; dbf_field = dbf_field->Next; } PKFields = new wxString[PKCount]; PKFieldsEx = new wxString[PKCount]; cnt = 0; seed = 0; dbf_field = dbf->Dbf->First; while (dbf_field) { /* preparing column names */ dummyName = wxString::FromUTF8(dbf_field->Name); dup = 0; for (idup = 0; idup < cnt; idup++) { if (dummyName == PKFields[idup]) dup = 1; } if (dummyName == wxString::FromUTF8("PK_UID")) dup = 1; if (dup) { sprintf(dummy, "COL_%d", seed++); dummyName = wxString::FromUTF8(dummy); } PKFields[cnt] = dummyName; PKFieldsEx[cnt] = dummyName; dummyName = wxT(" [TEXT]"); switch (dbf_field->Type) { case 'N': if (dbf_field->Decimals) dummyName = wxT(" [DOUBLE]"); else { if (dbf_field->Length <= 18) dummyName = wxT(" [INTEGER]"); else dummyName = wxT(" [DOUBLE]"); } break; case 'D': dummyName = wxT(" [DOUBLE]"); break; case 'F': dummyName = wxT(" [DOUBLE]"); break; case 'L': dummyName = wxT(" [INTEGER]"); break; }; PKFieldsEx[cnt] += dummyName; cnt++; dbf_field = dbf_field->Next; } // memory cleanup gaiaFreeDbf(dbf); } void LoadDbfDialog::OnUserPKey(wxCommandEvent & WXUNUSED(event)) { // // the mode of user defined Primary Key Column changed // wxRadioBox *radioCtrl = (wxRadioBox *) FindWindow(ID_LDDBF_USER_PKEY); wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_LDDBF_PKCOL); if (radioCtrl->GetSelection() == 0) { // automatic comboCtrl->Clear(); comboCtrl->Enable(false); } else { // user specified int i; for (i = 0; i < PKCount; i++) { // setting PK Fields wxString str = PKFieldsEx[i]; comboCtrl->Append(str); } comboCtrl->Enable(true); comboCtrl->SetSelection(wxNOT_FOUND); } } void LoadDbfDialog::OnTextDates(wxCommandEvent & WXUNUSED(event)) { // // the mode of user defined DBF TextDates changed // wxRadioBox *radioCtrl = (wxRadioBox *) FindWindow(ID_LDDBF_TEXTDATES); if (radioCtrl->GetSelection() == 0) TextDates = false; else TextDates = true; } void LoadDbfDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_LDDBF_TABLE); Table = tableCtrl->GetValue(); if (Table.Len() < 1) { wxMessageBox(wxT("You must specify the TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (MainFrame->TableAlreadyExists(Table) == true) { wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_LDDBF_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxRadioBox *radioCtrl = (wxRadioBox *) FindWindow(ID_LDDBF_USER_PKEY); wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_LDDBF_PKCOL); if (radioCtrl->GetSelection() == 0) { // automatic UserDefinedPKey = false; PKColumn = wxT(""); } else { // user specified idSel = comboCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT ("you must select some User defined Primary Key Column from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } UserDefinedPKey = true; PKColumn = PKFields[idSel]; } wxDialog::EndModal(wxID_OK); } LoadShpDialog::~LoadShpDialog() { // destructor if (PKFields != NULL) delete[]PKFields; if (PKFieldsEx != NULL) delete[]PKFieldsEx; } bool LoadShpDialog::Create(MyFrame * parent, wxString & path, wxString & table, int srid, wxString & column, wxString & defCs) { // // creating the dialog // MainFrame = parent; Path = path; Table = table; Srid = srid; Column = column; Default = defCs; Coerce2D = false; Compressed = false; SpatialIndex = false; PKCount = 0; PKFields = NULL; PKFieldsEx = NULL; TextDates = false; LoadPKFields(); if (wxDialog::Create(parent, wxID_ANY, wxT("Load Shapefile")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void LoadShpDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // first row: the Shapefile path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 1); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_LDSHP_TABLE, Table, wxDefaultPosition, wxSize(350, 22)); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 1); // third row: GEOMETRY COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&GeomColumn name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxTextCtrl *colCtrl = new wxTextCtrl(this, ID_LDSHP_COLUMN, Column, wxDefaultPosition, wxSize(350, 22)); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 1); // fourth row: SRID wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_LDSHP_SRID, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, -1, 1000000, Srid); sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); // fifth row: CHARSET wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Charset Encoding"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); sridSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxListBox *charsetCtrl = new wxListBox(this, ID_LDSHP_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Default); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // 2D + Compress wxBoxSizer *compressBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(compressBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *storageBox = new wxStaticBox(this, wxID_STATIC, wxT("Geometry storage"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *storageSizer = new wxStaticBoxSizer(storageBox, wxHORIZONTAL); compressBox->Add(storageSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxCheckBox *coerce2DCtrl = new wxCheckBox(this, ID_LDSHP_COERCE_2D, wxT("Coerce 2D geometries [x,y]"), wxDefaultPosition, wxDefaultSize); coerce2DCtrl->SetValue(Coerce2D); storageSizer->Add(coerce2DCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxCheckBox *compressCtrl = new wxCheckBox(this, ID_LDSHP_COMPRESSED, wxT("Apply geometry compression"), wxDefaultPosition, wxDefaultSize); compressCtrl->SetValue(Compressed); storageSizer->Add(compressCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxCheckBox *rtreeCtrl = new wxCheckBox(this, ID_LDSHP_RTREE, wxT("With Spatial Index (R*Tree)"), wxDefaultPosition, wxDefaultSize); rtreeCtrl->SetValue(SpatialIndex); storageSizer->Add(rtreeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxStaticBox *userGTypeBox = new wxStaticBox(this, wxID_STATIC, wxT("Geometry Type"), wxDefaultPosition, wxDefaultSize); // User Defined Geometry Type wxBoxSizer *userdefBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(userdefBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *gTypeSizer = new wxStaticBoxSizer(userGTypeBox, wxVERTICAL); userdefBox->Add(gTypeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxString gtype_selection[2]; gtype_selection[0] = wxT("Automatic"); gtype_selection[1] = wxT("User specified"); wxRadioBox *gtyp_sel = new wxRadioBox(this, ID_LDSHP_USER_GTYPE, wxT("&Mode"), wxDefaultPosition, wxDefaultSize, 2, gtype_selection, 2, wxRA_SPECIFY_COLS); gtyp_sel->SetSelection(0); gTypeSizer->Add(gtyp_sel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxComboBox *typeList = new wxComboBox(this, ID_LDSHP_GTYPE, wxT(""), wxDefaultPosition, wxSize(180, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); typeList->Enable(false); gTypeSizer->Add(typeList, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // User Defined Primary Key wxStaticBox *userPKeyBox = new wxStaticBox(this, wxID_STATIC, wxT("Primary Key Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *gPKeySizer = new wxStaticBoxSizer(userPKeyBox, wxVERTICAL); userdefBox->Add(gPKeySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxString pkey_selection[2]; pkey_selection[0] = wxT("Automatic"); pkey_selection[1] = wxT("User specified"); wxRadioBox *gpkey_sel = new wxRadioBox(this, ID_LDSHP_USER_PKEY, wxT("&Mode"), wxDefaultPosition, wxDefaultSize, 2, pkey_selection, 2, wxRA_SPECIFY_COLS); gpkey_sel->SetSelection(0); gPKeySizer->Add(gpkey_sel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxComboBox *pkeyList = new wxComboBox(this, ID_LDSHP_PKCOL, wxT(""), wxDefaultPosition, wxSize(180, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); pkeyList->Enable(false); gPKeySizer->Add(pkeyList, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // DBF dates interpreatation wxBoxSizer *dbfDatesBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(dbfDatesBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString dbf_dates[2]; dbf_dates[0] = wxT("as Julian Day numbers"); dbf_dates[1] = wxT("as PlainText strings"); wxRadioBox *dbf_dates_sel = new wxRadioBox(this, ID_LDSHP_TEXTDATES, wxT ("interpretation of &DBF DATE values"), wxDefaultPosition, wxDefaultSize, 2, dbf_dates, 2, wxRA_SPECIFY_COLS); dbf_dates_sel->SetSelection(0); dbfDatesBox->Add(dbf_dates_sel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & LoadShpDialog::OnOk); Connect(ID_LDSHP_USER_GTYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & LoadShpDialog::OnUserGType); Connect(ID_LDSHP_USER_PKEY, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & LoadShpDialog::OnUserPKey); Connect(ID_LDSHP_TEXTDATES, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & LoadShpDialog::OnTextDates); } void LoadShpDialog::LoadPKFields() { // loading the Primary Key Fields list char dbf_path[1024]; char charset[1024]; char dummy[1024]; wxString dummyName; int cnt; int seed; int dup; int idup; wxString *charsets = MainFrame->GetCharsets(); wxString cs; int idSel = MainFrame->GetCharsetIndex(Default); gaiaDbfPtr dbf = NULL; gaiaDbfFieldPtr dbf_field; if (PKFields != NULL) delete[]PKFields; PKFields = NULL; PKCount = 0; // opening the DBF in order to fetch field names dbf = gaiaAllocDbf(); strcpy(dbf_path, Path.ToUTF8()); strcat(dbf_path, ".dbf"); cs = *(charsets + idSel); strcpy(charset, cs.ToUTF8()); gaiaOpenDbfRead(dbf, dbf_path, charset, "UTF-8"); if (!(dbf->Valid)) { gaiaFreeDbf(dbf); return; } /* checking for duplicate / illegal column names and antialising them */ dbf_field = dbf->Dbf->First; while (dbf_field) { /* counting DBF fields */ PKCount++; dbf_field = dbf_field->Next; } PKFields = new wxString[PKCount]; PKFieldsEx = new wxString[PKCount]; cnt = 0; seed = 0; dbf_field = dbf->Dbf->First; while (dbf_field) { /* preparing column names */ dummyName = wxString::FromUTF8(dbf_field->Name); dup = 0; for (idup = 0; idup < cnt; idup++) { if (dummyName == PKFields[idup]) dup = 1; } if (dummyName == wxString::FromUTF8("PK_UID")) dup = 1; if (dup) { sprintf(dummy, "COL_%d", seed++); dummyName = wxString::FromUTF8(dummy); } PKFields[cnt] = dummyName; PKFieldsEx[cnt] = dummyName; dummyName = wxT(" [TEXT]"); switch (dbf_field->Type) { case 'N': if (dbf_field->Decimals) dummyName = wxT(" [DOUBLE]"); else { if (dbf_field->Length <= 18) dummyName = wxT(" [INTEGER]"); else dummyName = wxT(" [DOUBLE]"); } break; case 'D': dummyName = wxT(" [DOUBLE]"); break; case 'F': dummyName = wxT(" [DOUBLE]"); break; case 'L': dummyName = wxT(" [INTEGER]"); break; }; PKFieldsEx[cnt] += dummyName; cnt++; dbf_field = dbf_field->Next; } // memory cleanup gaiaFreeDbf(dbf); } void LoadShpDialog::OnUserGType(wxCommandEvent & WXUNUSED(event)) { // // the mode of user defined Geometry Type changed // wxRadioBox *radioCtrl = (wxRadioBox *) FindWindow(ID_LDSHP_USER_GTYPE); wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_LDSHP_GTYPE); if (radioCtrl->GetSelection() == 0) { // automatic comboCtrl->Clear(); comboCtrl->Enable(false); } else { // user specified wxString str = wxT("LINESTRING"); comboCtrl->Append(str); str = wxT("LINESTRINGZ"); comboCtrl->Append(str); str = wxT("LINESTRINGM"); comboCtrl->Append(str); str = wxT("LINESTRINGZM"); comboCtrl->Append(str); str = wxT("MULTILINESTRING"); comboCtrl->Append(str); str = wxT("MULTILINESTRINGZ"); comboCtrl->Append(str); str = wxT("MULTILINESTRINGM"); comboCtrl->Append(str); str = wxT("MULTILINESTRINGZM"); comboCtrl->Append(str); str = wxT("POLYGON"); comboCtrl->Append(str); str = wxT("POLYGONZ"); comboCtrl->Append(str); str = wxT("POLYGONM"); comboCtrl->Append(str); str = wxT("POLYGONZM"); comboCtrl->Append(str); str = wxT("MULTIPOLYGON"); comboCtrl->Append(str); str = wxT("MULTIPOLYGONZ"); comboCtrl->Append(str); str = wxT("MULTIPOLYGONM"); comboCtrl->Append(str); str = wxT("MULTIPOLYGONZM"); comboCtrl->Append(str); comboCtrl->Enable(true); comboCtrl->SetSelection(wxNOT_FOUND); } } void LoadShpDialog::OnUserPKey(wxCommandEvent & WXUNUSED(event)) { // // the mode of user defined Primary Key Column changed // wxRadioBox *radioCtrl = (wxRadioBox *) FindWindow(ID_LDSHP_USER_PKEY); wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_LDSHP_PKCOL); if (radioCtrl->GetSelection() == 0) { // automatic comboCtrl->Clear(); comboCtrl->Enable(false); } else { // user specified int i; for (i = 0; i < PKCount; i++) { // setting PK Fields wxString str = PKFieldsEx[i]; comboCtrl->Append(str); } comboCtrl->Enable(true); comboCtrl->SetSelection(wxNOT_FOUND); } } void LoadShpDialog::OnTextDates(wxCommandEvent & WXUNUSED(event)) { // // the mode of user defined DBF TextDates changed // wxRadioBox *radioCtrl = (wxRadioBox *) FindWindow(ID_LDSHP_TEXTDATES); if (radioCtrl->GetSelection() == 0) TextDates = false; else TextDates = true; } void LoadShpDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_LDSHP_TABLE); Table = tableCtrl->GetValue(); if (Table.Len() < 1) { wxMessageBox(wxT("You must specify the TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (MainFrame->TableAlreadyExists(Table) == true) { wxMessageBox(wxT("a table name '") + Table + wxT("' already exists"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *columnCtrl = (wxTextCtrl *) FindWindow(ID_LDSHP_COLUMN); Column = columnCtrl->GetValue(); if (Column.Len() < 1) { wxMessageBox(wxT("You must specify the GEOMETRY COLUMN NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_LDSHP_SRID); Srid = sridCtrl->GetValue(); if (MainFrame->SridNotExists(Srid) == true) { wxMessageBox(wxT("invalid SRID value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_LDSHP_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxCheckBox *coerce2DCtrl = (wxCheckBox *) FindWindow(ID_LDSHP_COERCE_2D); Coerce2D = coerce2DCtrl->GetValue(); wxCheckBox *compressCtrl = (wxCheckBox *) FindWindow(ID_LDSHP_COMPRESSED); Compressed = compressCtrl->GetValue(); wxCheckBox *rtreeCtrl = (wxCheckBox *) FindWindow(ID_LDSHP_RTREE); SpatialIndex = rtreeCtrl->GetValue(); wxRadioBox *radioCtrl = (wxRadioBox *) FindWindow(ID_LDSHP_USER_GTYPE); wxComboBox *comboCtrl = (wxComboBox *) FindWindow(ID_LDSHP_GTYPE); if (radioCtrl->GetSelection() == 0) { // automatic UserDefinedGType = false; GeometryType = wxT(""); } else { // user specified idSel = comboCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT ("you must select some User defined Geometry Type from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } UserDefinedGType = true; GeometryType = comboCtrl->GetValue(); } radioCtrl = (wxRadioBox *) FindWindow(ID_LDSHP_USER_PKEY); comboCtrl = (wxComboBox *) FindWindow(ID_LDSHP_PKCOL); if (radioCtrl->GetSelection() == 0) { // automatic UserDefinedPKey = false; PKColumn = wxT(""); } else { // user specified idSel = comboCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT ("you must select some User defined Primary Key Column from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } UserDefinedPKey = true; PKColumn = PKFields[idSel]; } wxDialog::EndModal(wxID_OK); } bool DumpShpDialog::Create(MyFrame * parent, wxString & path, wxString & table, wxString & column, wxString & defCs) { // // creating the dialog // MainFrame = parent; Path = path; Table = table; Column = column; Default = defCs; if (wxDialog::Create(parent, wxID_ANY, wxT("Dump Shapefile")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void DumpShpDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Shapefile path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_STATIC, Table, wxDefaultPosition, wxSize(350, 22)); tableCtrl->Enable(false); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: GEOMETRY COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&GeomColumn name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_STATIC, Column, wxDefaultPosition, wxSize(350, 22)); colCtrl->Enable(false); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: CHARSET wxBoxSizer *csSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(csSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Charset Encoding"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); csSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *charsetCtrl = new wxListBox(this, ID_DMPSHP_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Default); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DumpShpDialog::OnOk); } void DumpShpDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_DMPSHP_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxDialog::EndModal(wxID_OK); } bool DumpTxtDialog::Create(MyFrame * parent, wxString & path, wxString & target, wxString & defCs) { // // creating the dialog // MainFrame = parent; Path = path; Default = defCs; if (wxDialog::Create(parent, wxID_ANY, wxT("Dump ") + target) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void DumpTxtDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the Shapefile path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: CHARSET wxBoxSizer *csSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(csSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Charset Encoding"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); csSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *charsetCtrl = new wxListBox(this, ID_DMPTXT_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Default); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DumpTxtDialog::OnOk); } void DumpTxtDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_DMPTXT_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxDialog::EndModal(wxID_OK); } bool DumpKmlDialog::Create(MyFrame * parent, wxString & table, wxString & column) { // // creating the dialog // MainFrame = parent; Table = table; Column = column; isNameConst = true; isDescConst = true; if (wxDialog::Create(parent, wxID_ANY, wxT("Dump KML")) == false) return false; ColumnList.Populate(MainFrame->GetSqlite(), Table); // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void DumpKmlDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_STATIC, Table, wxDefaultPosition, wxSize(350, 22)); tableCtrl->Enable(false); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: GEOMETRY COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&GeomColumn name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_STATIC, Column, wxDefaultPosition, wxSize(350, 22)); colCtrl->Enable(false); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // precision wxBoxSizer *precBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(precBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *precBox = new wxStaticBox(this, wxID_STATIC, wxT("Precision"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *precSizer = new wxStaticBoxSizer(precBox, wxVERTICAL); precBoxSizer->Add(precSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); PrecisionCtrl = new wxSpinCtrl(this, ID_KML_PRECISION, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, 1, 18, 8); precSizer->Add(PrecisionCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3); // the NAME pane wxBoxSizer *nameSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(nameSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *nameBox = new wxStaticBox(this, wxID_STATIC, wxT("Name"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *name2Sizer = new wxStaticBoxSizer(nameBox, wxHORIZONTAL); boxSizer->Add(name2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticBox *nameColBox = new wxStaticBox(this, wxID_STATIC, wxT("from Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameColSizer = new wxStaticBoxSizer(nameColBox, wxVERTICAL); name2Sizer->Add(nameColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); NameCtrl = new wxComboBox(this, ID_KML_NAME, wxT(""), wxDefaultPosition, wxSize(150, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboColumns(NameCtrl); nameColSizer->Add(NameCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *nameConstBox = new wxStaticBox(this, wxID_STATIC, wxT("Constant value"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameConstSizer = new wxStaticBoxSizer(nameConstBox, wxVERTICAL); name2Sizer->Add(nameConstSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); NameConstCtrl = new wxTextCtrl(this, ID_KML_NAME_K, wxT(""), wxDefaultPosition, wxSize(250, 22)); nameConstSizer->Add(NameConstCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // the DESCRIPTION pane wxBoxSizer *descSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(descSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *descBox = new wxStaticBox(this, wxID_STATIC, wxT("Description"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *desc2Sizer = new wxStaticBoxSizer(descBox, wxHORIZONTAL); boxSizer->Add(desc2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticBox *descColBox = new wxStaticBox(this, wxID_STATIC, wxT("from Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *descColSizer = new wxStaticBoxSizer(descColBox, wxVERTICAL); desc2Sizer->Add(descColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); DescCtrl = new wxComboBox(this, ID_KML_DESC, wxT(""), wxDefaultPosition, wxSize(150, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); InitializeComboColumns(DescCtrl); descColSizer->Add(DescCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *descConstBox = new wxStaticBox(this, wxID_STATIC, wxT("Constant value"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *descConstSizer = new wxStaticBoxSizer(descConstBox, wxVERTICAL); desc2Sizer->Add(descConstSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); DescConstCtrl = new wxTextCtrl(this, ID_KML_DESC_K, wxT(""), wxDefaultPosition, wxSize(250, 22)); descConstSizer->Add(DescConstCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DumpKmlDialog::OnOk); Connect(ID_KML_NAME, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & DumpKmlDialog::OnNameSelected); Connect(ID_KML_DESC, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & DumpKmlDialog::OnDescSelected); } void DumpKmlDialog::InitializeComboColumns(wxComboBox * ctrl) { // // initializing a column list ComboBox // ctrl->Clear(); AuxColumn *pColumn; wxString col = wxT("none, use Constant"); ctrl->Append(col); pColumn = ColumnList.GetFirst(); while (pColumn) { if (pColumn->GetName() != Column) { col = pColumn->GetName(); ctrl->Append(col); } pColumn = pColumn->GetNext(); } ctrl->Select(0); } void DumpKmlDialog::OnNameSelected(wxCommandEvent & WXUNUSED(event)) { // // Name-column selection changed // if (NameCtrl->GetSelection() == 0) { // using a Constant value isNameConst = true; NameConstCtrl->Enable(true); return; } isNameConst = false; NameConstCtrl->Enable(false); NameConstCtrl->SetValue(wxT("")); } void DumpKmlDialog::OnDescSelected(wxCommandEvent & WXUNUSED(event)) { // // Desc-column selection changed // if (DescCtrl->GetSelection() == 0) { // using a Constant value isDescConst = true; DescConstCtrl->Enable(true); return; } isDescConst = false; DescConstCtrl->Enable(false); DescConstCtrl->SetValue(wxT("")); } void DumpKmlDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // Name = wxT(""); Desc = wxT(""); Precision = PrecisionCtrl->GetValue(); if (isNameConst == true) Name = NameConstCtrl->GetValue(); else Name = NameCtrl->GetValue(); if (Name.Len() == 0) { wxMessageBox(wxT("you must specify a NAME (Column or Constant)"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (isDescConst == true) Desc = DescConstCtrl->GetValue(); else Desc = DescCtrl->GetValue(); if (Desc.Len() == 0) { wxMessageBox(wxT("you must specify a DESCRIPTION (Column or Constant)"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxDialog::EndModal(wxID_OK); } bool DumpSpreadsheetDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; DecimalPoint = '.'; DateTimes = true; if (wxDialog::Create(parent, wxID_ANY, wxT("Dump Spreadsheet")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void DumpSpreadsheetDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: Decimal Point wxBoxSizer *row = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(row, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *pt = new wxBoxSizer(wxHORIZONTAL); row->Add(pt, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString decimal_points[2]; decimal_points[0] = wxT("POINT [.]"); decimal_points[1] = wxT("COMMA [,]"); wxRadioBox *Point = new wxRadioBox(this, ID_SHEET_DECIMAL_POINT, wxT("&Decimal Point"), wxDefaultPosition, wxDefaultSize, 2, decimal_points, 2, wxRA_SPECIFY_ROWS); Point->SetSelection(0); pt->Add(Point, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // second row: Dates and Times wxBoxSizer *dt = new wxBoxSizer(wxHORIZONTAL); row->Add(dt, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString dates[2]; dates[0] = wxT("Don't care"); dates[1] = wxT("Convert to SpreadSheet format"); wxRadioBox *Dates = new wxRadioBox(this, ID_SHEET_DATE_TIME, wxT("&Dates, Data-Times and Times"), wxDefaultPosition, wxDefaultSize, 2, dates, 2, wxRA_SPECIFY_ROWS); Dates->SetSelection(1); dt->Add(Dates, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DumpSpreadsheetDialog::OnOk); Connect(ID_SHEET_DECIMAL_POINT, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & DumpSpreadsheetDialog::OnDecimalPointSelected); Connect(ID_SHEET_DATE_TIME, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & DumpSpreadsheetDialog::OnDateTimesSelected); } void DumpSpreadsheetDialog:: OnDecimalPointSelected(wxCommandEvent & WXUNUSED(event)) { // // DECIMAL POINT radio box // wxRadioBox *Point = (wxRadioBox *) FindWindow(ID_SHEET_DECIMAL_POINT); if (DecimalPoint == '.') { DecimalPoint = ','; Point->SetSelection(1); } else { DecimalPoint = '.'; Point->SetSelection(0); } } void DumpSpreadsheetDialog:: OnDateTimesSelected(wxCommandEvent & WXUNUSED(event)) { // // DATE/TIMES radio box // wxRadioBox *Dates = (wxRadioBox *) FindWindow(ID_SHEET_DATE_TIME); if (DateTimes == true) { DateTimes = false; Dates->SetSelection(0); } else { DateTimes = true; Dates->SetSelection(1); } } void DumpSpreadsheetDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool SqlScriptDialog::Create(MyFrame * parent, wxString & path, wxString & defCs) { // // creating the dialog // MainFrame = parent; Path = path; Default = defCs; if (wxDialog::Create(parent, wxID_ANY, wxT("SQL script execute")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void SqlScriptDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the SQL script path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Path:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pathValue = new wxTextCtrl(this, wxID_STATIC, Path, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(pathValue, 0, wxALIGN_RIGHT | wxALL, 5); // second row: CHARSET wxBoxSizer *csSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(csSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Charset Encoding"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxHORIZONTAL); csSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *charsetCtrl = new wxListBox(this, ID_SCRIPT_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Default); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SqlScriptDialog::OnOk); } void SqlScriptDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_SCRIPT_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT("you must select some Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxDialog::EndModal(wxID_OK); } bool DefaultCharsetDialog::Create(MyFrame * parent, wxString & charset, bool ask) { // // creating the dialog // MainFrame = parent; Charset = charset; AskCharset = ask; if (wxDialog::Create(parent, wxID_ANY, wxT("Charset settings")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void DefaultCharsetDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the DEFAULT CHARSET wxBoxSizer *csSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(csSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticBox *charsetBox = new wxStaticBox(this, wxID_STATIC, wxT("Default Output Charset"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *charsetSizer = new wxStaticBoxSizer(charsetBox, wxVERTICAL); csSizer->Add(charsetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxListBox *charsetCtrl = new wxListBox(this, ID_DFLT_CHARSET, wxDefaultPosition, wxDefaultSize, MainFrame->GetCharsetsLen(), MainFrame->GetCharsetsNames(), wxLB_SINGLE | wxLB_HSCROLL); charsetCtrl->SetFont(wxFont (8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); int idSel = MainFrame->GetCharsetIndex(Charset); if (idSel != wxNOT_FOUND) charsetCtrl->SetSelection(idSel); charsetSizer->Add(charsetCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // second row: the ASK CHARSET wxBoxSizer *askSizer = new wxBoxSizer(wxHORIZONTAL); charsetSizer->Add(askSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *askCtrl = new wxCheckBox(this, ID_DFLT_ASK, wxT("Ask output charset every time"), wxDefaultPosition, wxDefaultSize); askCtrl->SetValue(AskCharset); askSizer->Add(askCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DefaultCharsetDialog::OnOk); } void DefaultCharsetDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxListBox *charsetCtrl = (wxListBox *) FindWindow(ID_DFLT_CHARSET); int idSel = charsetCtrl->GetSelection(); if (idSel == wxNOT_FOUND) { wxMessageBox(wxT ("you must select some Default Charset Encoding from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxString *charsets = MainFrame->GetCharsets(); Charset = *(charsets + idSel); wxCheckBox *askCtrl = (wxCheckBox *) FindWindow(ID_DFLT_ASK); AskCharset = askCtrl->GetValue(); wxDialog::EndModal(wxID_OK); } bool RecoverDialog::Create(MyFrame * parent, wxString & table, wxString & column) { // // creating the dialog // MainFrame = parent; Table = table; Column = column; Srid = 0; Dimension = wxT("XY"); if (wxDialog::Create(parent, wxID_ANY, wxT("Recover Geometry Column")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void RecoverDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_ANY, Table, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); tableCtrl->Enable(false); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: GEOMETRY COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&Column name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_ANY, Column, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); colCtrl->Enable(false); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: SRID wxBoxSizer *triSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(triSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sridDimsSizer = new wxBoxSizer(wxVERTICAL); triSizer->Add(sridDimsSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); sridDimsSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_RCVR_SRID, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, -1, 1000000, Srid); sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxStaticBox *dimsBox = new wxStaticBox(this, wxID_STATIC, wxT("Dims"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *dimsSizer = new wxStaticBoxSizer(dimsBox, wxHORIZONTAL); sridDimsSizer->Add(dimsSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString dims[4]; dims[0] = wxT("XY"); dims[1] = wxT("XYM"); dims[2] = wxT("XYZ"); dims[3] = wxT("XYZM"); wxListBox *coordDims = new wxListBox(this, ID_RCVR_DIMS, wxDefaultPosition, wxDefaultSize, 4, dims, wxLB_SINGLE | wxLB_HSCROLL); dimsSizer->Add(coordDims, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // fourth row: GEOMETRY TYPE wxStaticBox *typeBox = new wxStaticBox(this, wxID_STATIC, wxT("Geometry Type"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *typeSizer = new wxStaticBoxSizer(typeBox, wxHORIZONTAL); triSizer->Add(typeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxString types[8]; types[0] = wxT("POINT"); types[1] = wxT("MULTIPOINT"); types[2] = wxT("LINESTRING"); types[3] = wxT("MULTILINESTRING"); types[4] = wxT("POLYGON"); types[5] = wxT("MULTIPOLYGON"); types[6] = wxT("GEOMETRYCOLLECTION"); types[7] = wxT("GEOMETRY"); wxListBox *geomType = new wxListBox(this, ID_RCVR_TYPE, wxDefaultPosition, wxDefaultSize, 8, types, wxLB_SINGLE | wxLB_HSCROLL); typeSizer->Add(geomType, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & RecoverDialog::OnOk); } void RecoverDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_RCVR_SRID); wxListBox *geomType = (wxListBox *) FindWindow(ID_RCVR_TYPE); wxListBox *coordDims = (wxListBox *) FindWindow(ID_RCVR_DIMS); Srid = sridCtrl->GetValue(); if (MainFrame->SridNotExists(Srid) == true) { wxMessageBox(wxT("invalid SRID value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } Type = geomType->GetStringSelection(); if (Type.Len() < 1) { wxMessageBox(wxT("you must select some Geometry Type from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } Dimension = coordDims->GetStringSelection(); if (Dimension.Len() < 1) { wxMessageBox(wxT("you must select some Coord Dimension from the list"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxDialog::EndModal(wxID_OK); } bool ElementaryGeomsDialog::Create(MyFrame * parent, wxString & table, wxString & geometry) { // // creating the dialog // MainFrame = parent; InTable = table; Geometry = geometry; MainFrame->ElementaryGeoms(InTable, Geometry, OutTable, PrimaryKey, MultiID, Type, &Srid, CoordDims, &SpatialIndex); if (wxDialog::Create(parent, wxID_ANY, wxT("Elementary Geometries")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ElementaryGeomsDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: input TABLE name wxStaticBox *inputBox = new wxStaticBox(this, wxID_STATIC, wxT("Input Table"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *inputSizer = new wxStaticBoxSizer(inputBox, wxVERTICAL); boxSizer->Add(inputSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *inTblSizer = new wxBoxSizer(wxHORIZONTAL); inputSizer->Add(inTblSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *inTblLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); inTblSizer->Add(inTblLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *inTblCtrl = new wxTextCtrl(this, wxID_ANY, InTable, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); inTblCtrl->Enable(false); inTblSizer->Add(inTblCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: GEOMETRY COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); inputSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&Geometry name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_ANY, Geometry, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); colCtrl->Enable(false); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: output TABLE name wxStaticBox *outputBox = new wxStaticBox(this, wxID_STATIC, wxT("Output Table"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *outputSizer = new wxStaticBoxSizer(outputBox, wxVERTICAL); boxSizer->Add(outputSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *outTblSizer = new wxBoxSizer(wxHORIZONTAL); outputSizer->Add(outTblSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *outTblLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); outTblSizer->Add(outTblLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *outTblCtrl = new wxTextCtrl(this, ID_ELEMGEOM_TABLE, OutTable, wxDefaultPosition, wxSize(350, 22)); outTblSizer->Add(outTblCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fourth row: output Primary Key wxBoxSizer *pKeySizer = new wxBoxSizer(wxHORIZONTAL); outputSizer->Add(pKeySizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pKeyLabel = new wxStaticText(this, wxID_STATIC, wxT("&Primary Key name:")); pKeySizer->Add(pKeyLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *pKeyCtrl = new wxTextCtrl(this, ID_ELEMGEOM_PKEY, PrimaryKey, wxDefaultPosition, wxSize(350, 22)); pKeySizer->Add(pKeyCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // fifth row: MULTI ID wxBoxSizer *multiSizer = new wxBoxSizer(wxHORIZONTAL); outputSizer->Add(multiSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *multiLabel = new wxStaticText(this, wxID_STATIC, wxT("&MultiID name:")); multiSizer->Add(multiLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *multiCtrl = new wxTextCtrl(this, ID_ELEMGEOM_MULTI_ID, MultiID, wxDefaultPosition, wxSize(350, 22)); multiSizer->Add(multiCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // sixth row: GEOMETRY TYPE wxBoxSizer *typeSizer = new wxBoxSizer(wxHORIZONTAL); outputSizer->Add(typeSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tpLabel = new wxStaticText(this, wxID_STATIC, wxT("&Geometry Type:")); typeSizer->Add(tpLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *typeCtrl = new wxTextCtrl(this, ID_ELEMGEOM_TYPE, Type, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); typeCtrl->Enable(false); typeSizer->Add(typeCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // seventh row: SRID wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); outputSizer->Add(sridSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); char xdummy[64]; sprintf(xdummy, "%d", Srid); wxString dummy = wxString::FromUTF8(xdummy); sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *sridCtrl = new wxTextCtrl(this, wxID_ANY, dummy, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); sridCtrl->Enable(false); sridSizer->Add(sridCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // heigth row: COORD DIMENSION wxBoxSizer *dimSizer = new wxBoxSizer(wxHORIZONTAL); outputSizer->Add(dimSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *dimLabel = new wxStaticText(this, wxID_STATIC, wxT("&Coord Dimension:")); dimSizer->Add(dimLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *dimCtrl = new wxTextCtrl(this, wxID_ANY, CoordDims, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); dimCtrl->Enable(false); dimSizer->Add(dimCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // nineth row: Spatial Index wxCheckBox *rtreeCtrl = new wxCheckBox(this, ID_ELEMGEOM_RTREE, wxT("With Spatial Index (R*Tree)"), wxDefaultPosition, wxDefaultSize); rtreeCtrl->SetValue(SpatialIndex); outputSizer->Add(rtreeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ElementaryGeomsDialog::OnOk); } void ElementaryGeomsDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *textCtrl = (wxTextCtrl *) FindWindow(ID_ELEMGEOM_TABLE); OutTable = textCtrl->GetValue(); textCtrl = (wxTextCtrl *) FindWindow(ID_ELEMGEOM_PKEY); PrimaryKey = textCtrl->GetValue(); textCtrl = (wxTextCtrl *) FindWindow(ID_ELEMGEOM_MULTI_ID); MultiID = textCtrl->GetValue(); wxCheckBox *boxCtrl = (wxCheckBox *) FindWindow(ID_ELEMGEOM_RTREE); if (boxCtrl->IsChecked()) SpatialIndex = true; else SpatialIndex = false; wxDialog::EndModal(wxID_OK); } bool SetSridDialog::Create(MyFrame * parent, wxString & table, wxString & column) { // // creating the dialog // MainFrame = parent; Table = table; Column = column; OldSrid = 0; Srid = 0; if (wxDialog::Create(parent, wxID_ANY, wxT("Changing SRID")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void SetSridDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, wxID_ANY, Table, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); tableCtrl->Enable(false); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: GEOMETRY COLUMN name wxBoxSizer *colSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(colSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *colLabel = new wxStaticText(this, wxID_STATIC, wxT("&Column name:")); colSizer->Add(colLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *colCtrl = new wxTextCtrl(this, wxID_ANY, Column, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); colCtrl->Enable(false); colSizer->Add(colCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: SRID wxBoxSizer *mySizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(mySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *oldSridSizer = new wxBoxSizer(wxHORIZONTAL); mySizer->Add(oldSridSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *oldSridLabel = new wxStaticText(this, wxID_STATIC, wxT("&old SRID:")); oldSridSizer->Add(oldSridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *oldSridCtrl = new wxSpinCtrl(this, ID_SRID_OLD, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, -1, 1000000, OldSrid); oldSridSizer->Add(oldSridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // fourth row: SRID wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); mySizer->Add(sridSizer, 0, wxALIGN_RIGHT | wxLEFT, 20); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&new SRID:")); sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_SRID_SRID, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, -1, 1000000, Srid); sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SetSridDialog::OnOk); } void SetSridDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxSpinCtrl *oldSridCtrl = (wxSpinCtrl *) FindWindow(ID_SRID_OLD); wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_SRID_SRID); OldSrid = oldSridCtrl->GetValue(); Srid = sridCtrl->GetValue(); wxDialog::EndModal(wxID_OK); } bool SearchSridDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; SearchBySrid = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Searching a SRID by its name")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void SearchSridDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // First row: SEARCH string wxBoxSizer *searchSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(searchSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *searchLabel = new wxStaticText(this, wxID_STATIC, wxT("&Search:")); searchSizer->Add(searchLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *searchCtrl = new wxTextCtrl(this, ID_SEARCH, wxT(""), wxDefaultPosition, wxSize(150, 22)); searchSizer->Add(searchCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // Second row: by SRID / by Name wxBoxSizer *bySridSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(bySridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString opts[2]; opts[0] = wxT("by EPSG &SRID code"); opts[1] = wxT("by &name"); wxRadioBox *bySridSel = new wxRadioBox(this, ID_BY_SRID, wxT("&Search mode"), wxDefaultPosition, wxDefaultSize, 2, opts, 2, wxRA_SPECIFY_ROWS); bySridSel->SetSelection(1); bySridSizer->Add(bySridSel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & SearchSridDialog::OnOk); Connect(ID_BY_SRID, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & SearchSridDialog::OnSearchBySrid); } void SearchSridDialog::OnSearchBySrid(wxCommandEvent & WXUNUSED(event)) { // // BY SRID radio box // wxRadioBox *bySridSel = (wxRadioBox *) FindWindow(ID_BY_SRID); if (SearchBySrid == true) { SearchBySrid = false; bySridSel->SetSelection(1); } else { SearchBySrid = true; bySridSel->SetSelection(0); } } void SearchSridDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *searchCtrl = (wxTextCtrl *) FindWindow(ID_SEARCH); wxString txt = searchCtrl->GetValue(); if (SearchBySrid == true) { // searching by SRID long srid; if (txt.ToLong(&srid) == false) { wxMessageBox(wxT("You must specify a numeric code to search for !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } Srid = srid; } else { // searching by NAME String = txt; if (String.Len() < 1) { wxMessageBox(wxT("You must specify a string to search for !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } wxDialog::EndModal(wxID_OK); } bool HelpDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; if (wxDialog::Create(parent, wxID_ANY, wxT("SQLite + SpatiaLite help"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window MainFrame->OpenHelpPane(); Centre(); // setting up an event handler [dialog closing] Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, (wxObjectEventFunction) & HelpDialog::OnClose); return true; } void HelpDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxHtmlWindow *helpWin = new wxHtmlWindow(this, ID_HELP_HTML, wxDefaultPosition, wxSize(400, 200)); wxString html; MainFrame->GetHelp(html); helpWin->SetPage(html); boxSizer->Add(helpWin, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // QUIT button wxBoxSizer *quitBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(quitBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *quit = new wxButton(this, wxID_CANCEL, wxT("&Quit")); quitBox->Add(quit, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // setting up the event handlers Connect(wxID_CANCEL, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & HelpDialog::OnCancel); Connect(wxID_ANY, wxEVT_SIZE, (wxObjectEventFunction) & HelpDialog::OnSize); } void HelpDialog::OnSize(wxSizeEvent & WXUNUSED(event)) { // // this window has changed its size // wxSize sz = GetClientSize(); wxHtmlWindow *helpWin = (wxHtmlWindow *) FindWindow(ID_HELP_HTML); wxButton *quit = (wxButton *) FindWindow(wxID_CANCEL); wxSize btnSz = quit->GetSize(); helpWin->SetSize(sz.GetWidth() - 6, sz.GetHeight() - 20 - btnSz.GetHeight()); int x = (sz.GetWidth() - btnSz.GetWidth()) / 2; int y = sz.GetHeight() - 6 - btnSz.GetHeight(); quit->SetSize(x, y, btnSz.GetWidth(), btnSz.GetHeight()); } void HelpDialog::OnClose(wxCloseEvent & WXUNUSED(event)) { // // this window has been closed // MainFrame->CloseHelpPane(); Destroy(); } void HelpDialog::OnCancel(wxCommandEvent & WXUNUSED(event)) { // // all done: // MainFrame->CloseHelpPane(); Destroy(); } bool NetworkDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; FromColumn = wxT(""); ToColumn = wxT(""); NoGeometry = false; GeomColumn = wxT(""); GeomLength = true; CostColumn = wxT(""); Bidirectional = true; OneWays = false; NameEnabled = false; AStarSupported = true; OneWayFromTo = wxT(""); OneWayToFrom = wxT(""); NameColumn = wxT(""); DataTable = wxT(""); VirtualTable = wxT(""); if (wxDialog::Create(parent, wxID_ANY, wxT("Build Network")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void NetworkDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *row0Sizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(row0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // the Main TABLE wxBoxSizer *tableSizer = new wxBoxSizer(wxHORIZONTAL); row0Sizer->Add(tableSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticBox *tableBox = new wxStaticBox(this, wxID_STATIC, wxT("Base Table [graph]"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *tableNameSizer = new wxStaticBoxSizer(tableBox, wxVERTICAL); tableSizer->Add(tableNameSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); int nTables; wxString *tables = MainFrame->GetTables(&nTables); wxSize size = wxSize(160, 360); wxListBox *tableCtrl = new wxListBox(); tableCtrl->Create(this, ID_NET_TABLE, wxDefaultPosition, size, nTables, tables, wxLB_SINGLE | wxLB_HSCROLL); tableNameSizer->Add(tableCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); size = wxSize(140, 80); wxSize size2 = wxSize(140, 60); wxString table; if (MainFrame->GetCurrentlySelectedTable(table) == true) { // automatically selecting the current table int sel = tableCtrl->FindString(table); if (sel != wxNOT_FOUND) tableCtrl->SetSelection(sel); } // the NodeFrom COLUMN wxBoxSizer *netSizer = new wxBoxSizer(wxHORIZONTAL); row0Sizer->Add(netSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticBox *netBox = new wxStaticBox(this, wxID_STATIC, wxT("Network configuration"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colSizer = new wxStaticBoxSizer(netBox, wxVERTICAL); netSizer->Add(colSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxBoxSizer *row1Sizer = new wxBoxSizer(wxHORIZONTAL); colSizer->Add(row1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxBoxSizer *fromSizer = new wxBoxSizer(wxHORIZONTAL); row1Sizer->Add(fromSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticBox *fromBox = new wxStaticBox(this, wxID_STATIC, wxT("NodeFrom Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *fromColSizer = new wxStaticBoxSizer(fromBox, wxVERTICAL); fromSizer->Add(fromColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxListBox *fromCtrl = new wxListBox(this, ID_NET_FROM, wxDefaultPosition, size, 0, NULL, wxLB_SINGLE | wxLB_HSCROLL); fromCtrl->Enable(false); fromColSizer->Add(fromCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // the NodeTo COLUMN wxBoxSizer *toSizer = new wxBoxSizer(wxHORIZONTAL); row1Sizer->Add(toSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticBox *toBox = new wxStaticBox(this, wxID_STATIC, wxT("NodeTo Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *toColSizer = new wxStaticBoxSizer(toBox, wxVERTICAL); toSizer->Add(toColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxListBox *toCtrl = new wxListBox(this, ID_NET_TO, wxDefaultPosition, size, 0, NULL, wxLB_SINGLE | wxLB_HSCROLL); toCtrl->Enable(false); toColSizer->Add(toCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // the Geometry COLUMN wxBoxSizer *geoSizer = new wxBoxSizer(wxHORIZONTAL); row1Sizer->Add(geoSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *geoBox = new wxStaticBox(this, wxID_STATIC, wxT("Geometry Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *geoColSizer = new wxStaticBoxSizer(geoBox, wxVERTICAL); toSizer->Add(geoColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // NoGeometry wxCheckBox *geomEnable = new wxCheckBox(this, ID_NET_NO_GEOM, wxT("&NoGeometry")); geomEnable->SetValue(false); geoColSizer->Add(geomEnable, 0, wxALIGN_LEFT | wxALL, 1); // the Geometry COLUMN wxListBox *geoCtrl = new wxListBox(this, ID_NET_GEOM, wxDefaultPosition, size2, 0, NULL, wxLB_SINGLE | wxLB_HSCROLL); geoColSizer->Add(geoCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // UNIDIRECTIONAL / BIDIRECTIONAL wxBoxSizer *row2Sizer = new wxBoxSizer(wxHORIZONTAL); colSizer->Add(row2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *row22Sizer = new wxBoxSizer(wxVERTICAL); row2Sizer->Add(row22Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *row222Sizer = new wxBoxSizer(wxHORIZONTAL); row22Sizer->Add(row222Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxString dirs[2]; dirs[0] = wxT("&Uni-Directional"); dirs[1] = wxT("&Bi-Directional"); wxRadioBox *dirSel = new wxRadioBox(this, ID_NET_BIDIR, wxT("&Arc connections"), wxDefaultPosition, wxDefaultSize, 2, dirs, 2, wxRA_SPECIFY_ROWS); dirSel->SetSelection(1); dirSel->Enable(false); row222Sizer->Add(dirSel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // the COST is Lenth selection wxString costs[2]; costs[0] = wxT("&Using Length as Cost"); costs[1] = wxT("&Using Cost Column"); wxRadioBox *costSel = new wxRadioBox(this, ID_NET_LENGTH, wxT("&Cost type"), wxDefaultPosition, wxDefaultSize, 2, costs, 2, wxRA_SPECIFY_ROWS); costSel->SetSelection(0); costSel->Enable(false); row222Sizer->Add(costSel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); // enabling A* support wxBoxSizer *row223Sizer = new wxBoxSizer(wxHORIZONTAL); row22Sizer->Add(row223Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxString algorithms[2]; algorithms[0] = wxT("&A* + Dijkstra"); algorithms[1] = wxT("&Dijkstra only"); wxRadioBox *aStarSel = new wxRadioBox(this, ID_NET_A_STAR, wxT ("&Supported Shortest Path Algorithms"), wxDefaultPosition, wxDefaultSize, 2, algorithms, 2, wxRA_SPECIFY_COLS); aStarSel->SetSelection(0); aStarSel->Enable(false); row223Sizer->Add(aStarSel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // the COST COLUMN wxBoxSizer *costSizer = new wxBoxSizer(wxHORIZONTAL); row2Sizer->Add(costSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticBox *costBox = new wxStaticBox(this, wxID_STATIC, wxT("Cost Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *costColSizer = new wxStaticBoxSizer(costBox, wxVERTICAL); costSizer->Add(costColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxListBox *costCtrl = new wxListBox(this, ID_NET_COST, wxDefaultPosition, size, 0, NULL, wxLB_SINGLE | wxLB_HSCROLL); costCtrl->Enable(false); costColSizer->Add(costCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // One Ways wxBoxSizer *row3Sizer = new wxBoxSizer(wxHORIZONTAL); colSizer->Add(row3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxBoxSizer *oneWaySizer = new wxBoxSizer(wxHORIZONTAL); row3Sizer->Add(oneWaySizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticBox *oneWayBox = new wxStaticBox(this, wxID_STATIC, wxT("OneWay Columns"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *colWaySizer = new wxStaticBoxSizer(oneWayBox, wxVERTICAL); oneWaySizer->Add(colWaySizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // OneWay Enable wxCheckBox *oneWayEnable = new wxCheckBox(this, ID_NET_ONEWAY, wxT("Enable &OneWays")); colWaySizer->Add(oneWayEnable, 0, wxALIGN_LEFT | wxALL, 1); // the OneWay FromTo COLUMN wxBoxSizer *fromToSizer = new wxBoxSizer(wxHORIZONTAL); colWaySizer->Add(fromToSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticBox *fromToBox = new wxStaticBox(this, wxID_STATIC, wxT("From -> To"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *fromToColSizer = new wxStaticBoxSizer(fromToBox, wxVERTICAL); fromToSizer->Add(fromToColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxListBox *fromToCtrl = new wxListBox(this, ID_NET_FROM_TO, wxDefaultPosition, size, 0, NULL, wxLB_SINGLE | wxLB_HSCROLL); fromToCtrl->Enable(false); fromToColSizer->Add(fromToCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // the OneWay To From COLUMN wxStaticBox *toFromBox = new wxStaticBox(this, wxID_STATIC, wxT("To -> From"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *toFromColSizer = new wxStaticBoxSizer(toFromBox, wxVERTICAL); fromToSizer->Add(toFromColSizer, 0, wxALIGN_RIGHT | wxALL, 1); wxListBox *toFromCtrl = new wxListBox(this, ID_NET_TO_FROM, wxDefaultPosition, size, 0, NULL, wxLB_SINGLE | wxLB_HSCROLL); toFromCtrl->Enable(false); toFromColSizer->Add(toFromCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // Name wxBoxSizer *nameSizer = new wxBoxSizer(wxHORIZONTAL); row3Sizer->Add(nameSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxStaticBox *nameBox = new wxStaticBox(this, wxID_STATIC, wxT("Name Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *nameColSizer = new wxStaticBoxSizer(nameBox, wxVERTICAL); nameSizer->Add(nameColSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // Name Enable wxCheckBox *nameEnable = new wxCheckBox(this, ID_NET_NAME_ENABLE, wxT("Enable &Name")); nameColSizer->Add(nameEnable, 0, wxALIGN_LEFT | wxALL, 1); // the Name COLUMN wxListBox *nameCtrl = new wxListBox(this, ID_NET_NAME, wxDefaultPosition, size, 0, NULL, wxLB_SINGLE | wxLB_HSCROLL); nameCtrl->Enable(false); nameColSizer->Add(nameCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); // output tables wxBoxSizer *outSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(outSizer, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 0); wxStaticBox *outTablesBox = new wxStaticBox(this, wxID_STATIC, wxT("Output Tables"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *outTablesSizer = new wxStaticBoxSizer(outTablesBox, wxHORIZONTAL); outSizer->Add(outTablesSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *dataTableLabel = new wxStaticText(this, wxID_STATIC, wxT("&binary data Table:")); outTablesSizer->Add(dataTableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxTextCtrl *dataTableCtrl = new wxTextCtrl(this, ID_NET_DATA, wxT(""), wxDefaultPosition, wxSize(150, 22)); outTablesSizer->Add(dataTableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); outTablesSizer->AddSpacer(15); wxStaticText *virtualTableLabel = new wxStaticText(this, wxID_STATIC, wxT("&VirtualNetwork Table:")); outTablesSizer->Add(virtualTableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxTextCtrl *virtualTableCtrl = new wxTextCtrl(this, ID_NET_VIRTUAL, wxT(""), wxDefaultPosition, wxSize(150, 22)); outTablesSizer->Add(virtualTableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnOk); // appends event handlers for radio buttons etc Connect(ID_NET_TABLE, wxEVT_COMMAND_LISTBOX_SELECTED, (wxObjectEventFunction) & NetworkDialog::OnTable); Connect(ID_NET_BIDIR, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & NetworkDialog::OnDirection); Connect(ID_NET_LENGTH, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & NetworkDialog::OnCost); Connect(ID_NET_ONEWAY, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnOneWay); Connect(ID_NET_NAME_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnNameEnabled); Connect(ID_NET_NO_GEOM, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & NetworkDialog::OnNoGeometry); } void NetworkDialog::OnTable(wxCommandEvent & WXUNUSED(event)) { // // TABLE selection changed // wxListBox *tableCtrl = (wxListBox *) FindWindow(ID_NET_TABLE); TableName = tableCtrl->GetStringSelection(); wxTextCtrl *dataTableCtrl = (wxTextCtrl *) FindWindow(ID_NET_DATA); wxString data_table = TableName + wxT("_net_data"); dataTableCtrl->SetValue(data_table); wxTextCtrl *virtualTableCtrl = (wxTextCtrl *) FindWindow(ID_NET_VIRTUAL); wxString net_table = TableName + wxT("_net"); virtualTableCtrl->SetValue(net_table); int n_cols; wxString *columns = MainFrame->GetColumnNames(TableName, &n_cols); wxListBox *fromCtrl = (wxListBox *) FindWindow(ID_NET_FROM); fromCtrl->Clear(); fromCtrl->InsertItems(n_cols, columns, 0); fromCtrl->Enable(true); wxListBox *toCtrl = (wxListBox *) FindWindow(ID_NET_TO); toCtrl->Clear(); toCtrl->InsertItems(n_cols, columns, 0); toCtrl->Enable(true); wxListBox *geomCtrl = (wxListBox *) FindWindow(ID_NET_GEOM); geomCtrl->Clear(); geomCtrl->InsertItems(n_cols, columns, 0); geomCtrl->Enable(true); wxListBox *costCtrl = (wxListBox *) FindWindow(ID_NET_COST); costCtrl->Clear(); costCtrl->InsertItems(n_cols, columns, 0); costCtrl->Enable(false); wxListBox *fromToCtrl = (wxListBox *) FindWindow(ID_NET_FROM_TO); fromToCtrl->Clear(); fromToCtrl->InsertItems(n_cols, columns, 0); fromToCtrl->Enable(false); wxListBox *toFromCtrl = (wxListBox *) FindWindow(ID_NET_TO_FROM); toFromCtrl->Clear(); toFromCtrl->InsertItems(n_cols, columns, 0); toFromCtrl->Enable(false); wxRadioBox *dirSel = (wxRadioBox *) FindWindow(ID_NET_BIDIR); Bidirectional = true; dirSel->SetSelection(1); dirSel->Enable(true); wxRadioBox *costSel = (wxRadioBox *) FindWindow(ID_NET_LENGTH); GeomLength = true; costSel->SetSelection(0); costSel->Enable(true); wxCheckBox *oneWaySel = (wxCheckBox *) FindWindow(ID_NET_ONEWAY); OneWays = false; oneWaySel->SetValue(false); oneWaySel->Enable(true); wxListBox *nameCtrl = (wxListBox *) FindWindow(ID_NET_NAME); nameCtrl->Clear(); nameCtrl->InsertItems(n_cols, columns, 0); nameCtrl->Enable(false); wxCheckBox *nameEnable = (wxCheckBox *) FindWindow(ID_NET_NAME_ENABLE); NameEnabled = false; nameEnable->SetValue(false); nameEnable->Enable(true); wxRadioBox *aStarSel = (wxRadioBox *) FindWindow(ID_NET_A_STAR); aStarSel->Enable(true); } void NetworkDialog::OnDirection(wxCommandEvent & WXUNUSED(event)) { // // BIDIRECTIONAL radio box // wxCheckBox *oneWaySel = (wxCheckBox *) FindWindow(ID_NET_ONEWAY); wxRadioBox *dirSel = (wxRadioBox *) FindWindow(ID_NET_BIDIR); wxListBox *fromToCtrl = (wxListBox *) FindWindow(ID_NET_FROM_TO); wxListBox *toFromCtrl = (wxListBox *) FindWindow(ID_NET_TO_FROM); if (Bidirectional == true) { Bidirectional = false; dirSel->SetSelection(0); OneWays = false; oneWaySel->SetValue(false); oneWaySel->Enable(false); fromToCtrl->Enable(false); toFromCtrl->Enable(false); } else { Bidirectional = true; dirSel->SetSelection(1); OneWays = false; oneWaySel->SetValue(false); oneWaySel->Enable(true); fromToCtrl->Enable(false); toFromCtrl->Enable(false); } } void NetworkDialog::OnCost(wxCommandEvent & WXUNUSED(event)) { // // COST radio box // wxRadioBox *costSel = (wxRadioBox *) FindWindow(ID_NET_LENGTH); wxListBox *costCtrl = (wxListBox *) FindWindow(ID_NET_COST); if (GeomLength == true) { GeomLength = false; costSel->SetSelection(1); costCtrl->Enable(true); } else { GeomLength = true; costSel->SetSelection(0); costCtrl->Enable(false); } } void NetworkDialog::OnOneWay(wxCommandEvent & WXUNUSED(event)) { // // OneWay check box // wxCheckBox *oneWaySel = (wxCheckBox *) FindWindow(ID_NET_ONEWAY); wxListBox *fromToCtrl = (wxListBox *) FindWindow(ID_NET_FROM_TO); wxListBox *toFromCtrl = (wxListBox *) FindWindow(ID_NET_TO_FROM); if (OneWays == true) { OneWays = false; oneWaySel->SetValue(false); fromToCtrl->Enable(false); toFromCtrl->Enable(false); } else { OneWays = true; oneWaySel->SetValue(true); fromToCtrl->Enable(true); toFromCtrl->Enable(true); } } void NetworkDialog::OnNameEnabled(wxCommandEvent & WXUNUSED(event)) { // // Name check box // wxCheckBox *nameEnable = (wxCheckBox *) FindWindow(ID_NET_NAME_ENABLE); wxListBox *nameCtrl = (wxListBox *) FindWindow(ID_NET_NAME); if (NameEnabled == true) { NameEnabled = false; nameEnable->SetValue(false); nameCtrl->Enable(false); } else { NameEnabled = true; nameEnable->SetValue(true); nameCtrl->Enable(true); } } void NetworkDialog::OnNoGeometry(wxCommandEvent & WXUNUSED(event)) { // // NoGeometry check box // wxCheckBox *noGeom = (wxCheckBox *) FindWindow(ID_NET_NO_GEOM); wxListBox *geomCtrl = (wxListBox *) FindWindow(ID_NET_GEOM); wxRadioBox *aStarSel = (wxRadioBox *) FindWindow(ID_NET_A_STAR); wxRadioBox *costSel = (wxRadioBox *) FindWindow(ID_NET_LENGTH); wxListBox *costCtrl = (wxListBox *) FindWindow(ID_NET_COST); if (NoGeometry == true) { NoGeometry = false; noGeom->SetValue(false); geomCtrl->Enable(true); aStarSel->SetSelection(0); aStarSel->Enable(true); costSel->Enable(true); GeomLength = true; costSel->SetSelection(0); costCtrl->Enable(false); } else { NoGeometry = true; noGeom->SetValue(true); geomCtrl->Enable(false); aStarSel->SetSelection(1); aStarSel->Enable(false); costSel->Enable(false); GeomLength = false; costSel->SetSelection(1); costCtrl->Enable(true); } } void NetworkDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxListBox *tableCtrl = (wxListBox *) FindWindow(ID_NET_TABLE); TableName = tableCtrl->GetStringSelection(); if (TableName.Len() < 1) { wxMessageBox(wxT("You must select some TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *fromCtrl = (wxListBox *) FindWindow(ID_NET_FROM); FromColumn = fromCtrl->GetStringSelection(); if (FromColumn.Len() < 1) { wxMessageBox(wxT("You must select some 'NodeFrom' COLUMN !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *toCtrl = (wxListBox *) FindWindow(ID_NET_TO); ToColumn = toCtrl->GetStringSelection(); if (ToColumn.Len() < 1) { wxMessageBox(wxT("You must select some 'NodeTo' COLUMN !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (NoGeometry == false) { wxListBox *geomCtrl = (wxListBox *) FindWindow(ID_NET_GEOM); GeomColumn = geomCtrl->GetStringSelection(); if (GeomColumn.Len() < 1) { wxMessageBox(wxT("You must select some 'Geometry' COLUMN !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (GeomLength == true) CostColumn = wxT(""); else { wxListBox *costCtrl = (wxListBox *) FindWindow(ID_NET_COST); CostColumn = costCtrl->GetStringSelection(); if (CostColumn.Len() < 1) { wxMessageBox(wxT("You must select some 'Cost' COLUMN !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } } else { wxListBox *costCtrl = (wxListBox *) FindWindow(ID_NET_COST); CostColumn = costCtrl->GetStringSelection(); if (CostColumn.Len() < 1) { wxMessageBox(wxT("You must select some 'Cost' COLUMN !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } if (Bidirectional == true && OneWays == true) { wxListBox *fromToCtrl = (wxListBox *) FindWindow(ID_NET_FROM_TO); OneWayFromTo = fromToCtrl->GetStringSelection(); if (OneWayFromTo.Len() < 1) { wxMessageBox(wxT("You must select some 'OneWay From->To' COLUMN !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxListBox *toFromCtrl = (wxListBox *) FindWindow(ID_NET_TO_FROM); OneWayToFrom = toFromCtrl->GetStringSelection(); if (OneWayToFrom.Len() < 1) { wxMessageBox(wxT("You must select some 'OneWay To->From' COLUMN !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } else { OneWayFromTo = wxT(""); OneWayToFrom = wxT(""); } if (NameEnabled == true) { wxListBox *nameCtrl = (wxListBox *) FindWindow(ID_NET_NAME); NameColumn = nameCtrl->GetStringSelection(); if (NameColumn.Len() < 1) { wxMessageBox(wxT("You must select some 'Name' COLUMN !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } else NameColumn = wxT(""); wxRadioBox *aStarSel = (wxRadioBox *) FindWindow(ID_NET_A_STAR); if (aStarSel->GetSelection() == 1) AStarSupported = false; else AStarSupported = true; wxTextCtrl *dataTableCtrl = (wxTextCtrl *) FindWindow(ID_NET_DATA); DataTable = dataTableCtrl->GetValue(); if (DataTable.Len() < 1) { wxMessageBox(wxT ("You must specify some 'binary data' Table to be created !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *virtualTableCtrl = (wxTextCtrl *) FindWindow(ID_NET_VIRTUAL); VirtualTable = virtualTableCtrl->GetValue(); if (VirtualTable.Len() < 1) { wxMessageBox(wxT ("You must specify some VirtualNetwork Table to be created !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (DataTable.CmpNoCase(VirtualTable) == 0) { wxMessageBox(wxT ("'binary data' and VirtualNetwork Tables must have different names !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxDialog::EndModal(wxID_OK); } bool ExifDialog::Create(MyFrame * parent, wxString & dir_path, wxString & img_path) { // // creating the dialog // MainFrame = parent; DirPath = dir_path; ImgPath = img_path; Folder = false; Metadata = true; GpsOnly = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Import EXIF Photos")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ExifDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *row0Sizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(row0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the path and file/folder selection wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); row0Sizer->Add(pathSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticBox *pathBox = new wxStaticBox(this, wxID_STATIC, wxT("Import from source"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *pthSizer = new wxStaticBoxSizer(pathBox, wxVERTICAL); pathSizer->Add(pthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxStaticText *pathLabel = new wxStaticText(this, ID_EXIF_PATH, ImgPath); pthSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString imgFolder[2]; imgFolder[0] = wxT("Import &selected image only"); imgFolder[1] = wxT("Import &any EXIF from selected folder"); wxRadioBox *imgFolderSel = new wxRadioBox(this, ID_EXIF_FOLDER, wxT("&Source selection"), wxDefaultPosition, wxDefaultSize, 2, imgFolder, 2, wxRA_SPECIFY_ROWS); imgFolderSel->SetSelection(0); pthSizer->Add(imgFolderSel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // second row: the metadata and gps-only selection wxBoxSizer *modeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(modeSizer, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 0); wxString metadata[2]; metadata[0] = wxT("Feed full EXIF &Metadata"); metadata[1] = wxT("&Skip EXIF Metadata"); wxRadioBox *metadataSel = new wxRadioBox(this, ID_EXIF_METADATA, wxT("&EXIF Metadata tables"), wxDefaultPosition, wxDefaultSize, 2, metadata, 2, wxRA_SPECIFY_ROWS); metadataSel->SetSelection(0); modeSizer->Add(metadataSel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString gpsOnly[2]; gpsOnly[0] = wxT("Import any EXIF file"); gpsOnly[1] = wxT("Import EXIF only if containing &GPS tags"); wxRadioBox *gpsOnlySel = new wxRadioBox(this, ID_EXIF_GPS_ONLY, wxT("&GPS position"), wxDefaultPosition, wxDefaultSize, 2, gpsOnly, 2, wxRA_SPECIFY_ROWS); gpsOnlySel->SetSelection(0); modeSizer->Add(gpsOnlySel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ExifDialog::OnOk); // appends event handlers for radio buttons etc Connect(ID_EXIF_FOLDER, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ExifDialog::OnFolder); Connect(ID_EXIF_METADATA, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ExifDialog::OnMetadata); Connect(ID_EXIF_GPS_ONLY, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ExifDialog::OnGpsOnly); } void ExifDialog::OnFolder(wxCommandEvent & WXUNUSED(event)) { // // File/Folder radio box // wxRadioBox *folderSel = (wxRadioBox *) FindWindow(ID_EXIF_FOLDER); wxStaticText *pathLabel = (wxStaticText *) FindWindow(ID_EXIF_PATH); if (Folder == true) { Folder = false; folderSel->SetSelection(0); pathLabel->SetLabel(ImgPath); } else { Folder = true; folderSel->SetSelection(1); pathLabel->SetLabel(DirPath); } } void ExifDialog::OnMetadata(wxCommandEvent & WXUNUSED(event)) { // // Metadata radio box // wxRadioBox *metadataSel = (wxRadioBox *) FindWindow(ID_EXIF_METADATA); if (Metadata == true) { Metadata = false; metadataSel->SetSelection(1); } else { Metadata = true; metadataSel->SetSelection(0); } } void ExifDialog::OnGpsOnly(wxCommandEvent & WXUNUSED(event)) { // // GpsOnly radio box // wxRadioBox *gpsOnlySel = (wxRadioBox *) FindWindow(ID_EXIF_GPS_ONLY); if (GpsOnly == true) { GpsOnly = false; gpsOnlySel->SetSelection(0); } else { GpsOnly = true; gpsOnlySel->SetSelection(1); } } void ExifDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool XmlDocumentsDialog::Create(MyFrame * parent, wxString & dir_path, wxString & xml_path) { // // creating the dialog // MainFrame = parent; DirPath = dir_path; XmlPath = xml_path; Folder = false; Compressed = true; Validated = false; InternalSchema = false; OkSuffix = false; OkSchemaColumn = true; OkInPathColumn = true; OkParseErrorColumn = true; OkValidateErrorColumn = true; if (wxDialog::Create(parent, wxID_ANY, wxT("Import XML Documents")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void XmlDocumentsDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *row0Sizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(row0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // first row: the path and file/folder selection wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); row0Sizer->Add(pathSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticBox *pathBox = new wxStaticBox(this, wxID_STATIC, wxT("Import from source"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *pthSizer = new wxStaticBoxSizer(pathBox, wxVERTICAL); pathSizer->Add(pthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, ID_XML_PATH, XmlPath); pthSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString xmlFolder[2]; xmlFolder[0] = wxT("Import &selected XML Document only"); xmlFolder[1] = wxT("Import &any XML Document from selected folder"); wxRadioBox *xmlFolderSel = new wxRadioBox(this, ID_XML_FOLDER, wxT("&Source selection"), wxDefaultPosition, wxDefaultSize, 2, xmlFolder, 2, wxRA_SPECIFY_ROWS); xmlFolderSel->SetSelection(0); pthSizer->Add(xmlFolderSel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *sufSizer = new wxBoxSizer(wxHORIZONTAL); pthSizer->Add(sufSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *okSufCtrl = new wxCheckBox(this, ID_XML_OK_SUFFIX, wxT(""), wxDefaultPosition, wxDefaultSize); sufSizer->Add(okSufCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); okSufCtrl->SetValue(false); okSufCtrl->Enable(false); wxStaticText *sufLabel = new wxStaticText(this, wxID_STATIC, wxT("File &suffix:")); sufSizer->Add(sufLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *SufValue = new wxTextCtrl(this, ID_XML_SUFFIX, wxT(""), wxDefaultPosition, wxSize(50, 22)); SufValue->Enable(false); sufSizer->Add(SufValue, 0, wxALIGN_RIGHT | wxALL, 0); // second row: Compressed XmlBLOB wxBoxSizer *comprSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(comprSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxCheckBox *compressedCtrl = new wxCheckBox(this, ID_XML_COMPRESSED, wxT ("Compressed XML Documents [DEFLATE-zip]"), wxDefaultPosition, wxDefaultSize); compressedCtrl->SetValue(true); comprSizer->Add(compressedCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // third row: Schema Validation wxStaticBox *schemaBox = new wxStaticBox(this, wxID_STATIC, wxT("Schema Validation"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *validateSizer = new wxStaticBoxSizer(schemaBox, wxVERTICAL); boxSizer->Add(validateSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *valSizer = new wxBoxSizer(wxHORIZONTAL); validateSizer->Add(valSizer, 0, wxALIGN_LEFT | wxALL, 0); wxCheckBox *validateCtrl = new wxCheckBox(this, ID_XML_VALIDATED, wxT("Apply Schema Validation"), wxDefaultPosition, wxDefaultSize); validateCtrl->SetValue(false); valSizer->Add(validateCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString internalSchema[2]; internalSchema[0] = wxT("Use &External SchemaURI"); internalSchema[1] = wxT("Use &Internal SchemaURI"); wxRadioBox *internalBox = new wxRadioBox(this, ID_XML_INTERNAL_SCHEMA, wxT("&SchemaURI mode"), wxDefaultPosition, wxDefaultSize, 2, internalSchema, 2, wxRA_SPECIFY_ROWS); valSizer->Add(internalBox, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); internalBox->SetSelection(0); internalBox->Enable(false); wxBoxSizer *schemaUriSizer = new wxBoxSizer(wxHORIZONTAL); validateSizer->Add(schemaUriSizer, 0, wxALIGN_LEFT | wxALL, 0); wxStaticText *schemaLabel = new wxStaticText(this, wxID_STATIC, wxT("&Schema URI:")); schemaUriSizer->Add(schemaLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *schemaUriValue = new wxTextCtrl(this, ID_XML_SCHEMA_URI, wxT(""), wxDefaultPosition, wxSize(350, 22)); schemaUriValue->Enable(false); schemaUriSizer->Add(schemaUriValue, 0, wxALIGN_RIGHT | wxALL, 0); // fourth row: target Table / Column wxStaticBox *targetBox = new wxStaticBox(this, wxID_STATIC, wxT("Destination: Table/Columns"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *targetSizer = new wxStaticBoxSizer(targetBox, wxVERTICAL); boxSizer->Add(targetSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *tblSizer = new wxBoxSizer(wxHORIZONTAL); targetSizer->Add(tblSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tblLabel = new wxStaticText(this, wxID_STATIC, wxT("&Table name:")); tblSizer->Add(tblLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *tableValue = new wxTextCtrl(this, ID_XML_TARGET_TABLE, wxT(""), wxDefaultPosition, wxSize(250, 22)); tblSizer->Add(tableValue, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *pkSizer = new wxBoxSizer(wxHORIZONTAL); targetSizer->Add(pkSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pkLabel = new wxStaticText(this, wxID_STATIC, wxT("&Primary Key Column:")); pkSizer->Add(pkLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *pkColValue = new wxTextCtrl(this, ID_XML_PK_NAME, wxT("pk_uid"), wxDefaultPosition, wxSize(250, 22)); pkSizer->Add(pkColValue, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *xmlSizer = new wxBoxSizer(wxHORIZONTAL); targetSizer->Add(xmlSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *xmlLabel = new wxStaticText(this, wxID_STATIC, wxT("&XMLDocument Column:")); xmlSizer->Add(xmlLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *xmlColValue = new wxTextCtrl(this, ID_XML_BLOB_COLUMN, wxT("xml_document"), wxDefaultPosition, wxSize(250, 22)); xmlSizer->Add(xmlColValue, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *skSizer = new wxBoxSizer(wxHORIZONTAL); targetSizer->Add(skSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxCheckBox *okSkCtrl = new wxCheckBox(this, ID_XML_OK_SCHEMA_URI, wxT(""), wxDefaultPosition, wxDefaultSize); skSizer->Add(okSkCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); okSkCtrl->SetValue(true); wxStaticText *skLabel = new wxStaticText(this, wxID_STATIC, wxT("&SchemaURI Column:")); skSizer->Add(skLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *SchemaColValue = new wxTextCtrl(this, ID_XML_SCHEMA_URI_COLUMN, wxT("schema_uri"), wxDefaultPosition, wxSize(250, 22)); skSizer->Add(SchemaColValue, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *inPthSizer = new wxBoxSizer(wxHORIZONTAL); targetSizer->Add(inPthSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxCheckBox *okPthCtrl = new wxCheckBox(this, ID_XML_OK_PATH, wxT(""), wxDefaultPosition, wxDefaultSize); inPthSizer->Add(okPthCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); okPthCtrl->SetValue(true); wxStaticText *pthLabel = new wxStaticText(this, wxID_STATIC, wxT("&InputPath Column:")); inPthSizer->Add(pthLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *PathColValue = new wxTextCtrl(this, ID_XML_PATH_COLUMN, wxT("file_name"), wxDefaultPosition, wxSize(250, 22)); inPthSizer->Add(PathColValue, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *parseSizer = new wxBoxSizer(wxHORIZONTAL); targetSizer->Add(parseSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxCheckBox *okParseCtrl = new wxCheckBox(this, ID_XML_OK_PARSE_ERR, wxT(""), wxDefaultPosition, wxDefaultSize); parseSizer->Add(okParseCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); okParseCtrl->SetValue(true); wxStaticText *parseLabel = new wxStaticText(this, wxID_STATIC, wxT("&Parse Errors Column:")); parseSizer->Add(parseLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *ParseColValue = new wxTextCtrl(this, ID_XML_PARSE_ERR_COLUMN, wxT("parse_errors"), wxDefaultPosition, wxSize(250, 22)); parseSizer->Add(ParseColValue, 0, wxALIGN_RIGHT | wxALL, 0); wxBoxSizer *validSizer = new wxBoxSizer(wxHORIZONTAL); targetSizer->Add(validSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxCheckBox *okValidateCtrl = new wxCheckBox(this, ID_XML_OK_VALIDATE_ERR, wxT(""), wxDefaultPosition, wxDefaultSize); validSizer->Add(okValidateCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); okValidateCtrl->SetValue(true); wxStaticText *validateLabel = new wxStaticText(this, wxID_STATIC, wxT("&Validate Errors Column:")); validSizer->Add(validateLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxTextCtrl *ValidateColValue = new wxTextCtrl(this, ID_XML_VALIDATE_ERR_COLUMN, wxT("validate_errors"), wxDefaultPosition, wxSize(250, 22)); validSizer->Add(ValidateColValue, 0, wxALIGN_RIGHT | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & XmlDocumentsDialog::OnOk); // appends event handlers for radio buttons etc Connect(ID_XML_FOLDER, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & XmlDocumentsDialog::OnFolder); Connect(ID_XML_COMPRESSED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & XmlDocumentsDialog::OnCompressionChanged); Connect(ID_XML_VALIDATED, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & XmlDocumentsDialog::OnValidationChanged); Connect(ID_XML_INTERNAL_SCHEMA, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & XmlDocumentsDialog::OnInternalSchemaChanged); Connect(ID_XML_OK_SUFFIX, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & XmlDocumentsDialog::OnSuffixChanged); Connect(ID_XML_OK_SCHEMA_URI, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & XmlDocumentsDialog::OnSchemaColumnChanged); Connect(ID_XML_OK_PATH, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & XmlDocumentsDialog::OnInPathColumnChanged); Connect(ID_XML_OK_PARSE_ERR, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & XmlDocumentsDialog::OnParseErrorColumnChanged); Connect(ID_XML_OK_VALIDATE_ERR, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & XmlDocumentsDialog::OnValidateErrorColumnChanged); } void XmlDocumentsDialog::OnFolder(wxCommandEvent & WXUNUSED(event)) { // // File/Folder radio box // wxRadioBox *folderSel = (wxRadioBox *) FindWindow(ID_XML_FOLDER); wxStaticText *pathLabel = (wxStaticText *) FindWindow(ID_XML_PATH); wxCheckBox *okCtrl = (wxCheckBox *) FindWindow(ID_XML_OK_SUFFIX); wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_SUFFIX); if (Folder == true) { Folder = false; folderSel->SetSelection(0); pathLabel->SetLabel(XmlPath); OkSuffix = false; okCtrl->SetValue(false); okCtrl->Enable(false); wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(false); } else { Folder = true; folderSel->SetSelection(1); pathLabel->SetLabel(DirPath); OkSuffix = true; okCtrl->SetValue(true); okCtrl->Enable(true); wxString val = wxT(".xml"); colCtrl->SetValue(val); colCtrl->Enable(true); } } void XmlDocumentsDialog::OnCompressionChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Compressed (on/off): // wxCheckBox *compressedCtrl = (wxCheckBox *) FindWindow(ID_XML_COMPRESSED); if (compressedCtrl->IsChecked() == true) Compressed = true; else Compressed = false; } void XmlDocumentsDialog::OnValidationChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Schema Validation (on/off): // wxCheckBox *validateCtrl = (wxCheckBox *) FindWindow(ID_XML_VALIDATED); wxTextCtrl *schemaUriCtrl = (wxTextCtrl *) FindWindow(ID_XML_SCHEMA_URI); wxRadioBox *internalCtrl = (wxRadioBox *) FindWindow(ID_XML_INTERNAL_SCHEMA); if (validateCtrl->IsChecked()) { schemaUriCtrl->Enable(true); internalCtrl->Enable(true); internalCtrl->SetSelection(0); } else { SchemaURI = wxT(""); schemaUriCtrl->SetValue(SchemaURI); schemaUriCtrl->Enable(false); internalCtrl->Enable(false); internalCtrl->SetSelection(0); } } void XmlDocumentsDialog:: OnInternalSchemaChanged(wxCommandEvent & WXUNUSED(event)) { // // InternalSchemaURI radio box // wxRadioBox *internalCtrl = (wxRadioBox *) FindWindow(ID_XML_INTERNAL_SCHEMA); wxTextCtrl *schemaUriCtrl = (wxTextCtrl *) FindWindow(ID_XML_SCHEMA_URI); if (internalCtrl->GetSelection() == 0) { InternalSchema = false; SchemaURI = wxT(""); schemaUriCtrl->SetValue(SchemaURI); schemaUriCtrl->Enable(true); } else { InternalSchema = true; SchemaURI = wxT(""); schemaUriCtrl->SetValue(SchemaURI); schemaUriCtrl->Enable(false); } } void XmlDocumentsDialog::OnSuffixChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Suffix (on/off): // wxCheckBox *okCtrl = (wxCheckBox *) FindWindow(ID_XML_OK_SUFFIX); wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_SUFFIX); if (okCtrl->IsChecked() == true) { OkSuffix = true; wxString val = wxT(".xml"); colCtrl->SetValue(val); colCtrl->Enable(true); } else { OkSuffix = false; wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(false); } } void XmlDocumentsDialog::OnSchemaColumnChanged(wxCommandEvent & WXUNUSED(event)) { // // changed Schema Column (on/off): // wxCheckBox *okCtrl = (wxCheckBox *) FindWindow(ID_XML_OK_SCHEMA_URI); wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_SCHEMA_URI_COLUMN); if (okCtrl->IsChecked() == true) { OkSchemaColumn = true; wxString val = wxT("schema_uri"); colCtrl->SetValue(val); colCtrl->Enable(true); } else { OkSchemaColumn = false; wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(false); } } void XmlDocumentsDialog::OnInPathColumnChanged(wxCommandEvent & WXUNUSED(event)) { // // changed InPath Column (on/off): // wxCheckBox *okCtrl = (wxCheckBox *) FindWindow(ID_XML_OK_PATH); wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_PATH_COLUMN); if (okCtrl->IsChecked() == true) { OkInPathColumn = true; wxString val = wxT("file_name"); colCtrl->SetValue(val); colCtrl->Enable(true); } else { OkInPathColumn = false; wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(false); } } void XmlDocumentsDialog:: OnParseErrorColumnChanged(wxCommandEvent & WXUNUSED(event)) { // // changed ParseError Column (on/off): // wxCheckBox *okCtrl = (wxCheckBox *) FindWindow(ID_XML_OK_PARSE_ERR); wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_PARSE_ERR_COLUMN); if (okCtrl->IsChecked() == true) { OkParseErrorColumn = true; wxString val = wxT("parse_errors"); colCtrl->SetValue(val); colCtrl->Enable(true); } else { OkParseErrorColumn = false; wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(false); } } void XmlDocumentsDialog:: OnValidateErrorColumnChanged(wxCommandEvent & WXUNUSED(event)) { // // changed ValidateError Column (on/off): // wxCheckBox *okCtrl = (wxCheckBox *) FindWindow(ID_XML_OK_VALIDATE_ERR); wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_VALIDATE_ERR_COLUMN); if (okCtrl->IsChecked() == true) { OkValidateErrorColumn = true; wxString val = wxT("validate_errors"); colCtrl->SetValue(val); colCtrl->Enable(true); } else { OkValidateErrorColumn = false; wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(false); } } void XmlDocumentsDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxCheckBox *validateCtrl = (wxCheckBox *) FindWindow(ID_XML_VALIDATED); if (validateCtrl->IsChecked() && InternalSchema == false) { wxTextCtrl *schemaUriCtrl = (wxTextCtrl *) FindWindow(ID_XML_SCHEMA_URI); wxString schemaUri = schemaUriCtrl->GetValue().Trim(false); SchemaURI = schemaUri.Trim(true); if (SchemaURI.Len() < 1) { wxMessageBox(wxT("You must specify some Schema URI !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_XML_TARGET_TABLE); TargetTable = tableCtrl->GetValue(); if (TargetTable.Len() < 1) { wxMessageBox(wxT("You must specify some Table name !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *pkCtrl = (wxTextCtrl *) FindWindow(ID_XML_PK_NAME); PkName = pkCtrl->GetValue(); if (PkName.Len() < 1) { wxMessageBox(wxT("You must specify some PrimaryKeyColumn name !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxTextCtrl *columnCtrl = (wxTextCtrl *) FindWindow(ID_XML_BLOB_COLUMN); XmlColumn = columnCtrl->GetValue(); if (XmlColumn.Len() < 1) { wxMessageBox(wxT("You must specify some XMLColumn name !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (Folder == true && OkSuffix == true) { wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_SUFFIX); Suffix = colCtrl->GetValue(); } else Suffix = wxT(""); if (OkInPathColumn == true) { wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_PATH_COLUMN); InPathColumn = colCtrl->GetValue(); if (InPathColumn.Len() < 1) { wxMessageBox(wxT("You must specify some FileNameColumn name !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } else InPathColumn = wxT(""); if (OkSchemaColumn == true) { wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_SCHEMA_URI_COLUMN); SchemaUriColumn = colCtrl->GetValue(); if (SchemaUriColumn.Len() < 1) { wxMessageBox(wxT("You must specify some SchemaURIColumn name !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } else SchemaUriColumn = wxT(""); if (OkParseErrorColumn == true) { wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_PARSE_ERR_COLUMN); ParseErrorColumn = colCtrl->GetValue(); if (ParseErrorColumn.Len() < 1) { wxMessageBox(wxT("You must specify some ParseErrorColumn name !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } else ParseErrorColumn = wxT(""); if (OkValidateErrorColumn == true) { wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_XML_VALIDATE_ERR_COLUMN); ValidateErrorColumn = colCtrl->GetValue(); if (ValidateErrorColumn.Len() < 1) { wxMessageBox(wxT ("You must specify some ValidateErrorColumn name !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } else ValidateErrorColumn = wxT(""); wxDialog::EndModal(wxID_OK); } bool AutoSaveDialog::Create(MyFrame * parent, wxString & path, int secs) { // // creating the dialog // MainFrame = parent; Path = path; Seconds = secs; if (wxDialog::Create(parent, wxID_ANY, wxT("MEMORY-DB AutoSave settings")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void AutoSaveDialog::CreateControls() { // // creating individual controls and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: export path wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(pathSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, wxID_STATIC, wxT("&Save as:")); pathSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxString pth = Path; if (pth.Len() == 0) pth = wxT("*** not set: AutoSave IS DISABLED ***"); PathCtrl = new wxTextCtrl(this, ID_AUTO_SAVE_PATH, pth, wxDefaultPosition, wxSize(350, 22), wxTE_READONLY); pathSizer->Add(PathCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: CHANGE PATH button wxBoxSizer *changeBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(changeBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *change = new wxButton(this, ID_AUTO_SAVE_CHANGE_PATH, wxT("&Set the export path")); changeBox->Add(change, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // third row: INTERVAL wxBoxSizer *modeSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(modeSizer, 0, wxALIGN_LEFT | wxALL, 0); wxString modes[6]; modes[0] = wxT("&Disable AutoSaving"); modes[1] = wxT("Every &30 seconds"); modes[2] = wxT("Every &minute"); modes[3] = wxT("Every &2 minutes"); modes[4] = wxT("Every &5 minutes"); modes[5] = wxT("Every &10 minutes"); IntervalCtrl = new wxRadioBox(this, ID_AUTO_SAVE_INTERVAL, wxT("&AutoSave interval"), wxDefaultPosition, wxDefaultSize, 6, modes, 6, wxRA_SPECIFY_ROWS); if (Seconds <= 0) IntervalCtrl->SetSelection(0); else if (Seconds <= 30) IntervalCtrl->SetSelection(1); else if (Seconds <= 60) IntervalCtrl->SetSelection(2); else if (Seconds <= 120) IntervalCtrl->SetSelection(3); else if (Seconds <= 300) IntervalCtrl->SetSelection(4); else IntervalCtrl->SetSelection(5); modeSizer->Add(IntervalCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & AutoSaveDialog::OnOk); Connect(ID_AUTO_SAVE_CHANGE_PATH, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & AutoSaveDialog::OnChangePath); Connect(ID_AUTO_SAVE_INTERVAL, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & AutoSaveDialog::OnIntervalChanged); } void AutoSaveDialog::OnChangePath(wxCommandEvent & WXUNUSED(event)) { // // exporting the MEMORY-DB into an external DB // int retdlg; wxString lastDir; wxFileDialog fileDialog(this, wxT("Saving the MEMORY-DB"), wxT(""), wxT("db.sqlite"), wxT ("SQLite DB (*.sqlite)|*.sqlite|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); retdlg = fileDialog.ShowModal(); if (retdlg == wxID_OK) { // exporting the external DB wxString pth = fileDialog.GetPath(); wxString extPth = wxT("*** not set: AutoSave IS DISABLED ***"); MainFrame->SetExternalSqlitePath(pth); if (MainFrame->MemoryDbSave() == true) { wxMessageBox(wxT("Ok, MEMORY-DB was successfully saved"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxFileName file(fileDialog.GetPath()); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); extPth = MainFrame->GetExternalSqlitePath(); PathCtrl->SetValue(extPth); } else PathCtrl->SetValue(extPth); } } void AutoSaveDialog::OnIntervalChanged(wxCommandEvent & WXUNUSED(event)) { // // Interval selection changed // if (IntervalCtrl->GetSelection() == 0) Seconds = 0; else if (IntervalCtrl->GetSelection() == 1) Seconds = 30; else if (IntervalCtrl->GetSelection() == 2) Seconds = 60; else if (IntervalCtrl->GetSelection() == 3) Seconds = 120; else if (IntervalCtrl->GetSelection() == 4) Seconds = 300; else Seconds = 600; } void AutoSaveDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxDialog::EndModal(wxID_OK); } bool DumpPostGISDialog::Create(MyFrame * parent, wxString & table) { // // creating the dialog // MainFrame = parent; SchemaName = wxT(""); TableName = table; Lowercase = true; CreateTable = true; SpatialIndex = true; if (wxDialog::Create(parent, wxID_ANY, wxT("SQL Dump for PostGIS")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void DumpPostGISDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: SCHEMA name wxBoxSizer *schemaSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(schemaSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *schemaLabel = new wxStaticText(this, wxID_STATIC, wxT("&PostGIS Schema name:")); schemaSizer->Add(schemaLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *schemaCtrl = new wxTextCtrl(this, ID_POSTGIS_SCHEMA, SchemaName, wxDefaultPosition, wxSize(350, 22)); schemaSizer->Add(schemaCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // second row: TABLE name wxBoxSizer *tableSizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(tableSizer, 0, wxALIGN_RIGHT | wxALL, 0); wxStaticText *tableLabel = new wxStaticText(this, wxID_STATIC, wxT("&PostGIS Table name:")); tableSizer->Add(tableLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxTextCtrl *tableCtrl = new wxTextCtrl(this, ID_POSTGIS_TABLE, TableName, wxDefaultPosition, wxSize(350, 22)); tableSizer->Add(tableCtrl, 0, wxALIGN_RIGHT | wxALL, 5); // third row: Lowercase wxBoxSizer *lowerSizer = new wxBoxSizer(wxHORIZONTAL); tableSizer->Add(lowerSizer, 0, wxALIGN_LEFT | wxALL, 0); wxCheckBox *lowerCtrl = new wxCheckBox(this, ID_POSTGIS_LOWER, wxT("Lowercase column names"), wxDefaultPosition, wxDefaultSize); lowerCtrl->SetValue(true); lowerSizer->Add(lowerCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // fourth row: Create Table wxBoxSizer *createSizer = new wxBoxSizer(wxHORIZONTAL); tableSizer->Add(createSizer, 0, wxALIGN_LEFT | wxALL, 0); wxCheckBox *createCtrl = new wxCheckBox(this, ID_POSTGIS_CREATE, wxT("Create PostGIS Table"), wxDefaultPosition, wxDefaultSize); createCtrl->SetValue(true); createSizer->Add(createCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // fifth row: Spatial Index wxBoxSizer *spindexSizer = new wxBoxSizer(wxHORIZONTAL); tableSizer->Add(spindexSizer, 0, wxALIGN_LEFT | wxALL, 0); wxCheckBox *spindexCtrl = new wxCheckBox(this, ID_POSTGIS_SPINDEX, wxT("Create PostGIS Spatial Index"), wxDefaultPosition, wxDefaultSize); spindexCtrl->SetValue(true); spindexSizer->Add(spindexCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(ID_POSTGIS_LOWER, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & DumpPostGISDialog::OnLowercase); Connect(ID_POSTGIS_CREATE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & DumpPostGISDialog::OnCreateTable); Connect(ID_POSTGIS_SPINDEX, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & DumpPostGISDialog::OnSpatialIndex); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DumpPostGISDialog::OnOk); } void DumpPostGISDialog::OnLowercase(wxCommandEvent & WXUNUSED(event)) { // // Lowercase check box // wxCheckBox *lowerCtrl = (wxCheckBox *) FindWindow(ID_POSTGIS_LOWER); if (Lowercase == true) Lowercase = false; else Lowercase = true; lowerCtrl->SetValue(Lowercase); } void DumpPostGISDialog::OnCreateTable(wxCommandEvent & WXUNUSED(event)) { // // Create Table check box // wxCheckBox *createCtrl = (wxCheckBox *) FindWindow(ID_POSTGIS_CREATE); wxCheckBox *spindexCtrl = (wxCheckBox *) FindWindow(ID_POSTGIS_SPINDEX); if (CreateTable == true) { CreateTable = false; SpatialIndex = false; spindexCtrl->SetValue(false); spindexCtrl->Enable(false); } else { CreateTable = true; SpatialIndex = true; spindexCtrl->SetValue(true); spindexCtrl->Enable(true); } createCtrl->SetValue(CreateTable); } void DumpPostGISDialog::OnSpatialIndex(wxCommandEvent & WXUNUSED(event)) { // // Spatial Index check box // wxCheckBox *spindexCtrl = (wxCheckBox *) FindWindow(ID_POSTGIS_SPINDEX); if (SpatialIndex == true) SpatialIndex = false; else SpatialIndex = true; spindexCtrl->SetValue(SpatialIndex); } void DumpPostGISDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // wxTextCtrl *schemaCtrl = (wxTextCtrl *) FindWindow(ID_POSTGIS_SCHEMA); SchemaName = schemaCtrl->GetValue(); wxTextCtrl *tableCtrl = (wxTextCtrl *) FindWindow(ID_POSTGIS_TABLE); TableName = tableCtrl->GetValue(); if (TableName.Len() < 1) { wxMessageBox(wxT("You must specify the PostGIS TABLE NAME !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxDialog::EndModal(wxID_OK); } bool DxfDialog::Create(MyFrame * parent, wxString & dir_path, wxString & dxf_path) { // // creating the dialog // MainFrame = parent; DirPath = dir_path; DxfPath = dxf_path; Folder = false; OkPrefix = false; OkSingle = false; Force2D = false; Force3D = false; LinkedRings = false; UnlinkedRings = false; ImportMixed = true; AppendMode = true; if (wxDialog::Create(parent, wxID_ANY, wxT("Import DXF Drawings")) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void DxfDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxBoxSizer *row0Sizer = new wxBoxSizer(wxVERTICAL); boxSizer->Add(row0Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // first row: the path and file/folder selection wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); row0Sizer->Add(pathSizer, 0, wxALIGN_CENTRE_VERTICAL | wxALL, 0); wxStaticBox *pathBox = new wxStaticBox(this, wxID_STATIC, wxT("Import from source"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *pthSizer = new wxStaticBoxSizer(pathBox, wxVERTICAL); pathSizer->Add(pthSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *pathLabel = new wxStaticText(this, ID_DXF_PATH, DxfPath); pthSizer->Add(pathLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 0); wxString dxfFolder[2]; dxfFolder[0] = wxT("Import &selected DXF drawing file only"); dxfFolder[1] = wxT("Import &any DXF drawing file from selected folder"); wxRadioBox *dxfFolderSel = new wxRadioBox(this, ID_DXF_FOLDER, wxT("&Source selection"), wxDefaultPosition, wxDefaultSize, 2, dxfFolder, 2, wxRA_SPECIFY_ROWS); dxfFolderSel->SetSelection(0); pthSizer->Add(dxfFolderSel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // second row: SRID / Append wxBoxSizer *sridSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sridSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *sridLabel = new wxStaticText(this, wxID_STATIC, wxT("&SRID:")); sridSizer->Add(sridLabel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxSpinCtrl *sridCtrl = new wxSpinCtrl(this, ID_DXF_SRID, wxEmptyString, wxDefaultPosition, wxSize(80, 20), wxSP_ARROW_KEYS, -1, 1000000, -1); sridSizer->Add(sridCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxCheckBox *AppendCtrl = new wxCheckBox(this, ID_DXF_APPEND, wxT ("Append to already existing tables"), wxDefaultPosition, wxDefaultSize); sridSizer->Add(AppendCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); AppendCtrl->SetValue(true); // third row: table-name prefix wxStaticBox *prefixBox = new wxStaticBox(this, wxID_STATIC, wxT("Prefix for DB Table names"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *prefSizer = new wxStaticBoxSizer(prefixBox, wxHORIZONTAL); boxSizer->Add(prefSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *okPrefCtrl = new wxCheckBox(this, ID_DXF_OK_PREFIX, wxT(""), wxDefaultPosition, wxDefaultSize); prefSizer->Add(okPrefCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); okPrefCtrl->SetValue(false); wxTextCtrl *PrefValue = new wxTextCtrl(this, ID_DXF_PREFIX, wxT(""), wxDefaultPosition, wxSize(250, 22)); PrefValue->Enable(false); prefSizer->Add(PrefValue, 0, wxALIGN_RIGHT | wxALL, 0); // fourth row: single selected DXF layer wxStaticBox *singleBox = new wxStaticBox(this, wxID_STATIC, wxT ("Select a single DXF layer to be imported"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *selSizer = new wxStaticBoxSizer(singleBox, wxHORIZONTAL); boxSizer->Add(selSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); wxCheckBox *okSingleCtrl = new wxCheckBox(this, ID_DXF_OK_SINGLE, wxT(""), wxDefaultPosition, wxDefaultSize); selSizer->Add(okSingleCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); okSingleCtrl->SetValue(false); wxTextCtrl *SingleValue = new wxTextCtrl(this, ID_DXF_SINGLE, wxT(""), wxDefaultPosition, wxSize(250, 22)); SingleValue->Enable(false); selSizer->Add(SingleValue, 0, wxALIGN_RIGHT | wxALL, 0); // fifth row: dimensions wxString dxfDims[3]; dxfDims[0] = wxT("&authomatic 2D/3D"); dxfDims[1] = wxT("always force 2D"); dxfDims[2] = wxT("always force 3D"); wxRadioBox *dxfDimsSel = new wxRadioBox(this, ID_DXF_DIMS, wxT("&Dimensions"), wxDefaultPosition, wxDefaultSize, 3, dxfDims, 3, wxRA_SPECIFY_COLS); dxfDimsSel->SetSelection(0); boxSizer->Add(dxfDimsSel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // sixth row: import mode wxString dxfMode[3]; dxfMode[0] = wxT("&mixed layers (distinct by type)"); dxfMode[1] = wxT("preserve &distinct DXF layers"); wxRadioBox *dxfModeSel = new wxRadioBox(this, ID_DXF_MIXED, wxT("&Import mode"), wxDefaultPosition, wxDefaultSize, 2, dxfMode, 2, wxRA_SPECIFY_COLS); dxfModeSel->SetSelection(0); boxSizer->Add(dxfModeSel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // seventh row: import mode wxString dxfRings[3]; dxfRings[0] = wxT("&none"); dxfRings[1] = wxT("&linked rings"); dxfRings[2] = wxT("&unlinked rings"); wxRadioBox *dxfRingsSel = new wxRadioBox(this, ID_DXF_RINGS, wxT ("&Special Rings handling (holes)"), wxDefaultPosition, wxDefaultSize, 3, dxfRings, 3, wxRA_SPECIFY_COLS); dxfRingsSel->SetSelection(0); boxSizer->Add(dxfRingsSel, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // OK - CANCEL buttons wxBoxSizer *okCancelBox = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(okCancelBox, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *ok = new wxButton(this, wxID_OK, wxT("&OK")); okCancelBox->Add(ok, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); wxButton *cancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); okCancelBox->Add(cancel, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5); // appends event handler for OK button Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & DxfDialog::OnOk); // appends event handlers for radio buttons etc Connect(ID_DXF_FOLDER, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & DxfDialog::OnFolder); Connect(ID_DXF_OK_PREFIX, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & DxfDialog::OnPrefixChanged); Connect(ID_DXF_OK_SINGLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & DxfDialog::OnSingleLayerChanged); Connect(ID_DXF_DIMS, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & DxfDialog::OnDimensionChanged); Connect(ID_DXF_MIXED, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & DxfDialog::OnModeChanged); Connect(ID_DXF_RINGS, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & DxfDialog::OnRingsChanged); } void DxfDialog::OnFolder(wxCommandEvent & WXUNUSED(event)) { // // File/Folder radio box // wxRadioBox *folderSel = (wxRadioBox *) FindWindow(ID_DXF_FOLDER); wxStaticText *pathLabel = (wxStaticText *) FindWindow(ID_DXF_PATH); if (Folder == true) { Folder = false; folderSel->SetSelection(0); pathLabel->SetLabel(DxfPath); } else { Folder = true; folderSel->SetSelection(1); pathLabel->SetLabel(DirPath); } } void DxfDialog::OnDimensionChanged(wxCommandEvent & WXUNUSED(event)) { // // Dimensions radio box // wxRadioBox *dimsSel = (wxRadioBox *) FindWindow(ID_DXF_DIMS); Force2D = false; Force3D = false; if (dimsSel->GetSelection() == 1) { Force2D = true; Force3D = false; } if (dimsSel->GetSelection() == 2) { Force2D = false; Force3D = true; } } void DxfDialog::OnRingsChanged(wxCommandEvent & WXUNUSED(event)) { // // Rings radio box // wxRadioBox *ringsSel = (wxRadioBox *) FindWindow(ID_DXF_RINGS); LinkedRings = false; UnlinkedRings = false; if (ringsSel->GetSelection() == 1) { LinkedRings = true; UnlinkedRings = false; } if (ringsSel->GetSelection() == 2) { LinkedRings = false; UnlinkedRings = true; } } void DxfDialog::OnModeChanged(wxCommandEvent & WXUNUSED(event)) { // // Import mode radio box // wxRadioBox *modeSel = (wxRadioBox *) FindWindow(ID_DXF_MIXED); ImportMixed = true; if (modeSel->GetSelection() == 1) ImportMixed = false; } void DxfDialog::OnPrefixChanged(wxCommandEvent & WXUNUSED(event)) { // // Prefix check-box // wxCheckBox *okCtrl = (wxCheckBox *) FindWindow(ID_DXF_OK_PREFIX); wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_DXF_PREFIX); if (okCtrl->IsChecked() == false) { OkPrefix = false; wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(false); } else { OkPrefix = true; wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(true); } } void DxfDialog::OnSingleLayerChanged(wxCommandEvent & WXUNUSED(event)) { // // selected Single Layer check-box // wxCheckBox *okCtrl = (wxCheckBox *) FindWindow(ID_DXF_OK_SINGLE); wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_DXF_SINGLE); if (okCtrl->IsChecked() == false) { OkSingle = false; wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(false); } else { OkSingle = true; wxString val = wxT(""); colCtrl->SetValue(val); colCtrl->Enable(true); } } void DxfDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // if (OkPrefix == true) { wxTextCtrl *prefixCtrl = (wxTextCtrl *) FindWindow(ID_DXF_PREFIX); Prefix = prefixCtrl->GetValue(); if (Prefix.Len() < 1) { wxMessageBox(wxT("You must specify some DB Table-name Prefix !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } if (OkSingle == true) { wxTextCtrl *singleCtrl = (wxTextCtrl *) FindWindow(ID_DXF_SINGLE); SingleLayer = singleCtrl->GetValue(); if (SingleLayer.Len() < 1) { wxMessageBox(wxT("You must specify some DXF Layer name !!!"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } } if (OkPrefix == true) { wxTextCtrl *colCtrl = (wxTextCtrl *) FindWindow(ID_DXF_PREFIX); Prefix = colCtrl->GetValue(); } else Prefix = wxT(""); wxSpinCtrl *sridCtrl = (wxSpinCtrl *) FindWindow(ID_DXF_SRID); Srid = sridCtrl->GetValue(); if (Srid <= 0) ; else if (MainFrame->SridNotExists(Srid) == true) { wxMessageBox(wxT("invalid SRID value"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } wxCheckBox *appendCtrl = (wxCheckBox *) FindWindow(ID_DXF_APPEND); AppendMode = appendCtrl->IsChecked(); wxDialog::EndModal(wxID_OK); } spatialite_gui-2.0.0-devel/icons/0000775000175000017500000000000012544030130013717 500000000000000spatialite_gui-2.0.0-devel/icons/srids.xpm0000664000175000017500000001011512543275035015525 00000000000000/* XPM */ static const char * srids_xpm[] = { "16 16 207 2", " c None", ". c #4D8BC8", "+ c #4F8CC8", "@ c #4F8DC8", "# c #4F8CC9", "$ c #4F8BC7", "% c #4B89C5", "& c #3B76C4", "* c #4985C4", "= c #ECF2F7", "- c #EEF4F8", "; c #EDF4F8", "> c #EDF3F8", ", c #ECF2F8", "' c #D7E6F2", ") c #7DB2E2", "! c #6594DB", "~ c #4B88C5", "{ c #F2F6FA", "] c #C7E0FA", "^ c #C9E1FB", "/ c #C9E2FB", "( c #C8E0FB", "_ c #C5DFF9", ": c #C1DBF8", "< c #B8D6F4", "[ c #F8FBFF", "} c #B4D8F6", "| c #7DB0E1", "1 c #6492DB", "2 c #4C89A5", "3 c #91BD8A", "4 c #80B778", "5 c #78B474", "6 c #7BB379", "7 c #89B896", "8 c #B7D4E1", "9 c #C2DCF8", "0 c #BAD6F5", "a c #F8FBFD", "b c #CDE6FC", "c c #C9E5FA", "d c #84B6E2", "e c #4279BF", "f c #8DBD7D", "g c #CEE3BD", "h c #CEE8CF", "i c #B7DED7", "j c #ABD5D0", "k c #94C3A6", "l c #73A970", "m c #AACAD3", "n c #BCD9F6", "o c #DFE9F4", "p c #F3F7FB", "q c #E9EFF5", "r c #457EC2", "s c #8CBF77", "t c #D2EFBE", "u c #CFF2CD", "v c #BEE4D4", "w c #A3DBDB", "x c #84C3DA", "y c #8CC3D1", "z c #ACD2A6", "A c #689F64", "B c #ACCBD9", "C c #BBD6F5", "D c #B5D4F3", "E c #B3D2F1", "F c #F0F4F8", "G c #4682C4", "H c #63A256", "I c #C1E0A7", "J c #ABF1BB", "K c #BAECC9", "L c #9AD5D8", "M c #7AC0D6", "N c #67BCB7", "O c #71D693", "P c #91DF8B", "Q c #90B77A", "R c #75A186", "S c #BDDAF6", "T c #BBD8F6", "U c #EFF4FA", "V c #4683C6", "W c #80B66F", "X c #B0E4A1", "Y c #8CE7A1", "Z c #BDEAD5", "` c #6AB4CC", " . c #77C8C5", ".. c #5BDB7D", "+. c #45DA5F", "@. c #5BC361", "#. c #ABCA92", "$. c #629164", "%. c #C3DDF9", "&. c #EDF4FA", "*. c #4582C6", "=. c #86BA74", "-. c #A0DC90", ";. c #79D995", ">. c #82C6CA", ",. c #59A6CD", "'. c #70BCC0", "). c #6CCFAC", "!. c #55B99C", "~. c #52A564", "{. c #AAC990", "]. c #5D8E5E", "^. c #CCE3FB", "/. c #C7DFFA", "(. c #C6DFFA", "_. c #EAF2FA", ":. c #4280C6", "<. c #78AE67", "[. c #ADDC98", "}. c #83D5B0", "|. c #63AEC8", "1. c #57ABDB", "2. c #50A1D3", "3. c #4589C0", "4. c #4F91C0", "5. c #66A383", "6. c #A0C083", "7. c #5F8D65", "8. c #CDE2FC", "9. c #CBE1FB", "0. c #F2F7FB", "a. c #3F7CC5", "b. c #4E8F44", "c. c #A7CD90", "d. c #7CC574", "e. c #6AB5AA", "f. c #58A5D5", "g. c #56A9E1", "h. c #4D98BC", "i. c #56A18A", "j. c #88B27C", "k. c #6D9B5D", "l. c #7DA295", "m. c #CCE2FC", "n. c #C9E0FB", "o. c #C8E1FB", "p. c #F7FAFD", "q. c #3B76C1", "r. c #5F9651", "s. c #A3CA86", "t. c #8ECAAF", "u. c #6EAECE", "v. c #68ACD9", "w. c #67A5A2", "x. c #8AB96D", "y. c #83A96D", "z. c #3B806C", "A. c #4FAEEB", "B. c #51B2F7", "C. c #4FB2F7", "D. c #F5F9FC", "E. c #366FBF", "F. c #498255", "G. c #88B589", "H. c #92BAB7", "I. c #8EB7BD", "J. c #9BC09E", "K. c #6C9E5A", "L. c #528B70", "M. c #8ECDF0", "N. c #95D6FF", "O. c #94D5FF", "P. c #93D4FF", "Q. c #65BEFB", "R. c #F4F7FB", "S. c #3167BB", "T. c #356EA7", "U. c #7AA081", "V. c #44815F", "W. c #427F5B", "X. c #468464", "Y. c #468F95", "Z. c #61B9F2", "`. c #62BDFC", " + c #63BDFB", ".+ c #61BCFB", "++ c #60BEFC", "@+ c #62BCFC", "#+ c #2D64B9", "$+ c #3369BC", "%+ c #EAF1F8", "&+ c #DFECF7", "*+ c #DEEBF6", "=+ c #DEEAF6", "-+ c #DCEAF6", ";+ c #EBF3FA", ">+ c #F3F7FC", ",+ c #F4F8FC", "'+ c #FDFEFE", ")+ c #2A60B7", "!+ c #3065BA", "~+ c #3166BB", "{+ c #3066BA", "]+ c #2F65BA", "^+ c #2E65B9", "/+ c #2E64B9", "(+ c #2C62B7", " . + + + + @ # $ % & ", " * = - ; > > > , = ' ) ! ", " ~ { ] ^ / ( _ : < [ } | 1 ", " 2 3 4 5 6 7 8 9 0 a b c d e ", " f g h i j k l m n o = p q r ", " s t u v w x y z A B C D E F G ", "H I J K L M N O P Q R 9 S T U V ", "W X Y Z ` ...+.@.#.$.] %.9 &.*.", "=.-.;.>.,.'.).!.~.{.].^./.(._.:.", "<.[.}.|.1.2.3.4.5.6.7.8.9.^ 0.a.", "b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.", " r.s.t.u.v.w.x.y.z.A.B.C.C.D.E.", " F.G.H.I.J.K.L.M.N.O.P.Q.R.S.", " T.U.V.W.X.Y.Z.`. +.+++@+a #+", " $+%+&+*+=+-+-+;+;+_.>+,+'+)+", " !+~+{+{+{+!+]+^+^+/+/+(+ "}; spatialite_gui-2.0.0-devel/icons/Makefile.in0000664000175000017500000003312712544013516015723 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = icons ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GEOSCONFIG = @GEOSCONFIG@ GEOS_CPPFLAGS = @GEOS_CPPFLAGS@ GEOS_LDFLAGS = @GEOS_LDFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEXL_CFLAGS = @LIBFREEXL_CFLAGS@ LIBFREEXL_LIBS = @LIBFREEXL_LIBS@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS = @OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WXCONFIG = @WXCONFIG@ WX_LIBS = @WX_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = about.xpm charset.xpm column.xpm composer.xpm connect.xpm \ create_new.xpm db.xpm disconnect.xpm dumpshp.xpm exif.xpm \ exit.xpm foreign_key.xpm geometry.xpm geotable.xpm geoview.xpm \ geovtable.xpm help.xpm hs_back_no.xpm hs_back.xpm hs_forward_no.xpm \ hs_forward.xpm icon_info.xpm icon.xpm index.xpm kill_spindex.xpm \ loaddbf.xpm loadshp.xpm loadtxt.xpm loadxl.xpm malformed_geoms.xpm \ map_preview.xpm mbrcache.xpm memdb_clock.xpm memdb_load.xpm \ memdb_new.xpm memdb_save.xpm network.xpm pkey.xpm primary_key.xpm \ refresh.xpm rs_first.xpm rs_last.xpm rs_next.xpm rs_previous.xpm \ spatialidx.xpm sql_abort_no.xpm sql_abort.xpm sql_go.xpm \ sql_script.xpm srids.xpm statistics.xpm tables.xpm table.xpm \ topology.xpm tmp_table.xpm tmp_view.xpm trigger.xpm vacuum.xpm \ view.xpm virtdbf.xpm virtshp.xpm virttxt.xpm virtxl.xpm vtable.xpm \ attach.xpm sql_log.xpm db_status.xpm loadxml.xpm checkgeom.xpm \ sanegeom.xpm wfs.xpm dxf.xpm connect_ro.xpm coverage.xpm \ coverage_tiles.xpm security_relaxed.xpm security_lock.xpm \ security_rdonly.xpm vector.xpm AttributionDisclaimer.txt all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign icons/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign icons/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: spatialite_gui-2.0.0-devel/icons/dumpshp.xpm0000664000175000017500000000121712543275035016064 00000000000000/* XPM */ static const char * dumpshp_xpm[] = { "16 16 16 1", " c None", ". c #5AB24A", "+ c #41A0E9", "@ c #8BCC5C", "# c #ECF7E6", "$ c #D3EDBC", "% c #D0EBFA", "& c #0A5EC5", "* c #9BD48C", "= c #BCE7B1", "- c #94B7E3", "; c #A7D6A3", "> c #209910", ", c #638F45", "' c #106CD2", ") c #FFFFFF", " )))))) ", " ),@.,) ", " )),@@,)) ", " ),,,@@,,,) ", " )),@@@@,)) ", " )>#),@.,#=>) ", " )'#$#,,#.=>) ", " )'%$$*%%.@@=>) ", " )'%+*+++@@.;>) ", " )'%+-+++...;>) ", " )>$*.+++''>;') ", " )>$@..'&&-') ", " )>==>.'&--') ", " )>>;;--'') ", " ))>''')) ", " )))) "}; spatialite_gui-2.0.0-devel/icons/security_relaxed.xpm0000664000175000017500000000704712543275035017766 00000000000000/* XPM */ static const char * security_relaxed_xpm[] = { "16 16 174 2", " c None", ". c #A3A3A3", "+ c #A0A0A0", "@ c #9D9D9D", "# c #9A9A9A", "$ c #979797", "% c #949494", "& c #A2A2A2", "* c #BCBCBC", "= c #CACACA", "- c #CCCCCC", "; c #C2C2C2", "> c #ADADAD", ", c #8C8C8C", "' c #A1A1A1", ") c #C4C4C4", "! c #BEBEBE", "~ c #969696", "{ c #939393", "] c #AEAEAE", "^ c #848484", "/ c #BABABA", "( c #BFBFBF", "_ c #989898", ": c #878787", "< c #A8A8A8", "[ c #9E9E9E", "} c #898989", "| c #A9A9A9", "1 c #797979", "2 c #999999", "3 c #C6C6C6", "4 c #7D7D7D", "5 c #ABABAB", "6 c #767676", "7 c #E1C361", "8 c #A8A088", "9 c #919191", "0 c #8E8E8E", "a c #DCB95A", "b c #DFB855", "c c #DEB551", "d c #DDB14D", "e c #DCAD49", "f c #D7A846", "g c #787878", "h c #8D7E65", "i c #D89931", "j c #E1C260", "k c #FCF3C9", "l c #FDF3CB", "m c #FEF6D4", "n c #FFF6D7", "o c #FFF4D8", "p c #FFF8E0", "q c #FFF8DF", "r c #FFF5DA", "s c #FCF1CD", "t c #76A942", "u c #659F31", "v c #FAEBBD", "w c #D6932B", "x c #E0BF5C", "y c #FCF3C8", "z c #F9DF75", "A c #FDE689", "B c #FFE795", "C c #FFE59A", "D c #FFEEAA", "E c #FFEDA8", "F c #FFE399", "G c #F9D574", "H c #6EA334", "I c #81B35A", "J c #579828", "K c #D58D24", "L c #DFBB58", "M c #FCF1C7", "N c #F9DC6F", "O c #EDBB56", "P c #EFBD61", "Q c #FFE79B", "R c #6FA53D", "S c #6FA337", "T c #69A234", "U c #639D2F", "V c #7CAF55", "W c #AACB91", "X c #74AB4F", "Y c #478F17", "Z c #DEB753", "` c #FCF0C6", " . c #F8D96A", ".. c #FDE27C", "+. c #FFE890", "@. c #FFE999", "#. c #6BA337", "$. c #B0CE96", "%. c #ADCD94", "&. c #A8CB90", "*. c #90BC74", "=. c #A1C78A", "-. c #68A546", ";. c #358707", ">. c #DDB24E", ",. c #FBEFC3", "'. c #F8D665", "). c #ECB64C", "!. c #EFBD5A", "~. c #FFEB95", "{. c #639F31", "]. c #8EBA6F", "^. c #89B86B", "/. c #85B666", "(. c #80B361", "_. c #82B567", ":. c #98C283", "<. c #5CA03C", "[. c #257F00", "}. c #FBEEC1", "|. c #F7D35F", "1. c #FCDB6C", "2. c #FFE57F", "3. c #FFED8F", "4. c #5B9B29", "5. c #A9CA90", "6. c #A5C88D", "7. c #A1C68A", "8. c #9EC588", "9. c #85B66A", "0. c #97C282", "a. c #66A548", "b. c #217D00", "c. c #DBA843", "d. c #FBECBF", "e. c #F5CF59", "f. c #ECB041", "g. c #EFBA4E", "h. c #EFC25A", "i. c #529721", "j. c #4A911C", "k. c #448F15", "l. c #3C8B0F", "m. c #5E9F3A", "n. c #96C180", "o. c #62A346", "p. c #3F7C02", "q. c #DAA33D", "r. c #FAEBBC", "s. c #FCEBBC", "t. c #FEEEBF", "u. c #FFF4C6", "v. c #FFF8CE", "w. c #FFFAD3", "x. c #FFF8D0", "y. c #FFF2C7", "z. c #FCE9BA", "A. c #3B8B0F", "B. c #5FA143", "C. c #4A9023", "D. c #CB7105", "E. c #D99D36", "F. c #D7942C", "G. c #D69028", "H. c #D58C23", "I. c #D4881E", "J. c #D3841A", "K. c #D28015", "L. c #D17C11", "M. c #D1790E", "N. c #2F7C01", "O. c #1E7B03", "P. c #CC7004", "Q. c #CE6E01", " . + @ # $ % ", " & * = - = ; > , ", " ' ) ! ' ~ { $ ] ] ^ ", " / ( _ : < [ ", " @ ) ' } | 1 ", " 2 3 % 4 5 6 ", "7 8 9 0 a b c d e f g 6 h i ", "j k l m n o p q r s t u v w ", "x y z A B C D E F G H I J K ", "L M N O P Q R S T U V W X Y ", "Z ` ...+.@.#.$.%.W &.*.=.-.;. ", ">.,.'.).!.~.{.%.].^./.(._.:.<.[.", "e }.|.1.2.3.4.5.6.7.8.9.0.a.b. ", "c.d.e.f.g.h.i.j.k.l.m.n.o.p. ", "q.r.s.t.u.v.w.x.y.z.A.B.C.D. ", "E.i F.G.H.I.J.K.L.M.N.O.P.Q. "}; spatialite_gui-2.0.0-devel/icons/hs_back.xpm0000664000175000017500000000161712543275035016002 00000000000000/* XPM */ static const char * hs_back_xpm[] = { "16 16 32 1", " c None", ". c #244E15", "+ c #DCF2D3", "@ c #4CA82D", "# c #B0E19D", "$ c #449528", "% c #57BE39", "& c #5DC23C", "* c #C5E9B8", "= c #B3E2A2", "- c #2B5F1A", "; c #8ADD5A", "> c #77D14D", ", c #74CB5C", "' c #BCE6A9", ") c #7DD451", "! c #84DA56", "~ c #3C8324", "{ c #64C441", "] c #A3DD8C", "^ c #8FE05D", "/ c #70CB49", "( c #CEECC3", "_ c #6ACA45", ": c #D8F0CF", "< c #D3EEC9", "[ c #51BA35", "} c #34731F", "| c #8CD473", "1 c #DFF3D8", "2 c #7DCE65", "3 c #FFFFFF", " 3333 ", " 33@@@$33 ", " 3@@11+:$$3 ", " 3@11'^;#<(~3 ", " 3@1(^^;;!)=*}3 ", " 3@1^^^3!)>/*}3 ", "3@+';;33)>/_|'-3", "3$:!!333333{&'-3", "3$<))333333&%=-3", "3~(]>/33_{&%,=.3", " 3~*__{3&&%[=.3 ", " 3}*]{&&%%[|#.3 ", " 3}''2[[,##.3 ", " 3--==##..3 ", " 33....33 ", " 3333 "}; spatialite_gui-2.0.0-devel/icons/column.xpm0000664000175000017500000000161612543275035015704 00000000000000/* XPM */ static const char * column_xpm[] = { "16 16 32 1", " c None", ". c #40BA3A", "+ c #3FB739", "@ c #3FB338", "# c #3DAD36", "$ c #9BD697", "% c #C2E2C1", "& c #BBDFBA", "* c #95CC92", "= c #389D31", "- c #3FB639", "; c #C0E1C0", "> c #95D295", ", c #89CC88", "' c #A4D4A2", ") c #37942E", "! c #3EB037", "~ c #B5DCB4", "{ c #8BCC8A", "] c #85CA83", "^ c #9DD09A", "/ c #348A2B", "( c #3BA734", "_ c #95CB91", ": c #A3D4A1", "< c #9BD099", "[ c #90C28C", "} c #2F7625", "| c #38972F", "1 c #358E2C", "2 c #328529", "3 c #2D7223", " ", " ", " ", " ", " ", " .+@# ", " .$%&*= ", " -;>,') ", " !~{]^/ ", " (_:<[} ", " |123 ", " ", " ", " ", " ", " "}; spatialite_gui-2.0.0-devel/icons/help.xpm0000664000175000017500000000571012543275035015336 00000000000000/* XPM */ static const char * help_xpm[] = { "16 16 139 2", " c None", ". c #C0D8F7", "+ c #BED7F6", "@ c #BCD5F4", "# c #B9D3F3", "$ c #BDD6F5", "% c #DCE9F9", "& c #DDE8F6", "* c #DAE5F3", "= c #DCE7F5", "- c #D6E4F5", "; c #ACC8EB", "> c #B8D2F2", ", c #DFEAF7", "' c #D0DEEE", ") c #A7C1E3", "! c #89AED8", "~ c #86ACD7", "{ c #9CBBDD", "] c #C7D6EB", "^ c #D9E6F3", "/ c #9FBEE3", "( c #B3CEEF", "_ c #DDE9F6", ": c #C6D8EC", "< c #81ACD7", "[ c #9ABBDC", "} c #E3ECF6", "| c #E2ECF5", "1 c #AEC8E4", "2 c #7BA7D2", "3 c #BACEE6", "4 c #D5E2F1", "5 c #91B3DB", "6 c #D4E3F4", "7 c #CDDCEF", "8 c #7EA8D5", "9 c #77A0D0", "0 c #F5F8FB", "a c #F5F8FC", "b c #81A8D1", "c c #7BA4CF", "d c #C3D5EA", "e c #C2D4EA", "f c #A3C1E6", "g c #D9E5F3", "h c #9EBBDF", "i c #75A0CF", "j c #729ECD", "k c #E3EBF5", "l c #B4CBE4", "m c #BFD3E7", "n c #F6F8FB", "o c #BFD3E5", "p c #6B98C4", "q c #91B4D6", "r c #D2E0EE", "s c #789ECC", "t c #99B9E0", "u c #DAE5F2", "v c #7EA6D1", "w c #719DCC", "x c #6C9AC7", "y c #6B98C5", "z c #B6CCE2", "A c #EEF3F8", "B c #E8EEF6", "C c #A1BDD9", "D c #6894C2", "E c #719BC5", "F c #D6E2F0", "G c #6C95C5", "H c #8FB0D9", "I c #D9E4F2", "J c #7AA5D1", "K c #6B99C5", "L c #6A97C4", "M c #6996C4", "N c #F2F6FA", "O c #E1EAF3", "P c #6D95C2", "Q c #658FBE", "R c #648FBE", "S c #6D95C0", "T c #D5E3EF", "U c #618CBF", "V c #84A7D3", "W c #D3E1EF", "X c #95B5D9", "Y c #6C98C7", "Z c #6995C3", "` c #6793C1", " . c #6690BF", ".. c #638BBB", "+. c #638AB9", "@. c #628AB8", "#. c #86A7CB", "$. c #CCDCEA", "%. c #5783B8", "&. c #B9CCE4", "*. c #C5D6EA", "=. c #7199C7", "-. c #ECF1F7", ";. c #EAF0F6", ">. c #5F89B7", ",. c #6389B5", "'. c #BBCEE2", "). c #A6BDD9", "!. c #6A92C3", "~. c #C9D8EA", "{. c #BACDE3", "]. c #6B94C0", "^. c #628CBA", "/. c #94B0CF", "(. c #6187B2", "_. c #AAC0DA", ":. c #C0D1E4", "<. c #4675AE", "[. c #5B87BB", "}. c #C4D5E7", "|. c #BFD2E5", "1. c #85A6C9", "2. c #678EB8", "3. c #658AB6", "4. c #80A1C5", "5. c #BACCE0", "6. c #BED0E3", "7. c #4070AB", "8. c #4E7CB3", "9. c #A3BBD7", "0. c #CADAE9", "a. c #D1E0EC", "b. c #C8D8E8", "c. c #9CB5D3", "d. c #3A6CA7", "e. c #3F70AA", "f. c #3C6DA8", "g. c #3A6BA7", "h. c #3769A5", " ", " . + @ # ", " $ % & * * = - ; ", " > , ' ) ! ~ { ] ^ / ", " ( _ : < [ } | 1 2 3 4 5 ", " 6 7 8 9 0 a a 0 b c d e ", " f g h i j k l m n o p q r s ", " t u v w x y z A B C D E F G ", " H I J K L M N O P Q R S T U ", " V W X Y Z ` . ...+.@.#.$.%. ", " &.*.=. . .-.;.>.>.,.'.). ", " !.~.{.].^././.>.(._.:.<. ", " [.}.|.1.2.3.4.5.6.7. ", " 8.9.0.a.a.b.c.d. ", " e.f.g.h. ", " "}; spatialite_gui-2.0.0-devel/icons/exit.xpm0000664000175000017500000000713712543275035015364 00000000000000/* XPM */ static const char * exit_xpm[] = { "16 16 178 2", " c None", ". c #D49C6D", "+ c #D29A6A", "@ c #CF9766", "# c #D69E70", "$ c #DAB185", "% c #B9915A", "& c #CB9360", "* c #808080", "= c #7E7E7E", "- c #7C7C7C", "; c #7A7A7A", "> c #777777", ", c #757575", "' c #727272", ") c #D49E71", "! c #D69E6F", "~ c #DCB287", "{ c #E8D3AB", "] c #E6D0A9", "^ c #B89058", "/ c #C68E59", "( c #7D7D7D", "_ c #999999", ": c #9A9A9A", "< c #9B9B9B", "[ c #D39D6F", "} c #E7D1AA", "| c #E7D1AB", "1 c #E1C798", "2 c #DEC291", "3 c #B78F56", "4 c #C18952", "5 c #599152", "6 c #999A99", "7 c #9C9C9C", "8 c #D09A6C", "9 c #E5CEA7", "0 c #DFC18F", "a c #DCBD89", "b c #DCBD8B", "c c #B68D53", "d c #BC844B", "e c #458A3D", "f c #4F8A49", "g c #9D9D9D", "h c #CC9666", "i c #E3CBA2", "j c #DAB983", "k c #DAB984", "l c #B58B51", "m c #B67E43", "n c #4D9444", "o c #4B9142", "p c #488D3F", "q c #45893D", "r c #65A45D", "s c #61A05A", "t c #4B8345", "u c #9E9E9E", "v c #C99260", "w c #E2C79E", "x c #DAB883", "y c #D7B47D", "z c #D7B37E", "A c #B4894F", "B c #B1793B", "C c #4A9041", "D c #9FD294", "E c #9AD091", "F c #96CD8D", "G c #92CB89", "H c #8DC884", "I c #589851", "J c #467C41", "K c #9F9F9F", "L c #C48E5A", "M c #E0C398", "N c #D7B37C", "O c #D6AF74", "P c #EDC45E", "Q c #B3884B", "R c #AB7334", "S c #468B3E", "T c #99CE8F", "U c #87C67D", "V c #81C378", "W c #7CC073", "X c #7CC074", "Y c #81C279", "Z c #4F9049", "` c #577F54", " . c #BF8954", ".. c #DDBF94", "+. c #D4AD75", "@. c #E1B863", "#. c #FFD44B", "$. c #B88B42", "%. c #A66E2C", "&. c #42873B", "*. c #88C680", "=. c #83C37B", "-. c #7FC177", ";. c #4D8F47", ">. c #3F743B", ",. c #A1A1A1", "'. c #BA844C", "). c #DBBB8D", "!. c #D1A86E", "~. c #D1A666", "{. c #DFB45F", "]. c #B18547", "^. c #A16925", "/. c #3E8237", "(. c #3B7E34", "_. c #377931", ":. c #34752E", "<. c #509149", "[. c #4C8F46", "}. c #3D7339", "|. c #A2A2A2", "1. c #B47E45", "2. c #D9B788", "3. c #CFA367", "4. c #CC9E61", "5. c #CC9F63", "6. c #B18345", "7. c #9C641F", "8. c #606060", "9. c #A0A0A0", "0. c #41763D", "a. c #397136", "b. c #A3A3A3", "c. c #B0793D", "d. c #D7B382", "e. c #CC9F62", "f. c #C99A5A", "g. c #CA9B5E", "h. c #AF8143", "i. c #986019", "j. c #5C5C5C", "k. c #40733C", "l. c #A1A1A0", "m. c #A4A4A4", "n. c #AA7436", "o. c #D4AF7D", "p. c #C99A5B", "q. c #C79554", "r. c #C89658", "s. c #AE8041", "t. c #945C13", "u. c #585858", "v. c #A5A5A5", "w. c #A56F2F", "x. c #D2AB78", "y. c #D3AB78", "z. c #D1A773", "A. c #CDA069", "B. c #AE7F40", "C. c #91590F", "D. c #717171", "E. c #545454", "F. c #515151", "G. c #4F4F4F", "H. c #4C4C4C", "I. c #4A4A4A", "J. c #474747", "K. c #454545", "L. c #9D6725", "M. c #A87432", "N. c #AF7C3D", "O. c #B58447", "P. c #BA8A4E", "Q. c #AD7E3E", "R. c #8F570C", "S. c #925A10", "T. c #90580D", "U. c #925C13", " . + @ ", " # . $ % & ", " * = - ; > , ' ) ! ~ { ] ^ / ", " ( _ _ : : < < [ } | 1 2 3 4 ", " ; _ 5 6 < 7 7 8 9 0 a b c d ", " > : e f 7 g g h i a j k l m ", "n o p q r s t u u v w x y z A B ", "C D E F G H I J K L M N O P Q R ", "S T U V W X Y Z ` ...+.@.#.$.%.", "&.G H *.=.-.;.>.,.'.).!.~.{.].^.", "/.(._.:.<.[.}.,.|.1.2.3.4.5.6.7.", " 8.9.0.a.|.|.b.c.d.e.f.g.h.i.", " j.,.k.l.b.b.m.n.o.p.q.r.s.t.", " u.|.|.b.m.m.v.w.x.y.z.A.B.C.", "_ D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.", " S.T.U.R."}; spatialite_gui-2.0.0-devel/icons/db_status.xpm0000664000175000017500000000344112543275035016375 00000000000000/* XPM */ static const char * db_status_xpm[] = { "16 16 89 1", " c None", ". c #3476C6", "+ c #4F92DD", "@ c #EF585A", "# c #EF5759", "$ c #3475C5", "% c #3F89DE", "& c #F14D50", "* c #F24F52", "= c #F05153", "- c #3474C4", "; c #2C7FE0", "> c #3081E0", ", c #F53E41", "' c #F44043", ") c #F1484B", "! c #EE4A50", "~ c #4B93E0", "{ c #3373C3", "] c #1B76E1", "^ c #6760AF", "/ c #F53238", "( c #F63639", "_ c #337FE0", ": c #3781DF", "< c #3982DF", "[ c #3C86DF", "} c #3E88DF", "| c #3273C2", "1 c #EB2A39", "2 c #E13145", "3 c #206FE0", "4 c #2472DE", "5 c #2773DE", "6 c #F63336", "7 c #A65B88", "8 c #3272C0", "9 c #FB161A", "0 c #F9191C", "a c #3D4EBA", "b c #0A61E0", "c c #1062DF", "d c #1161DE", "e c #F92A2D", "f c #F72B2E", "g c #3071BE", "h c #FD0D11", "i c #FC0E12", "j c #0058E0", "k c #0057E0", "l c #0257E0", "m c #0357E0", "n c #F92124", "o c #306FBD", "p c #FF0206", "q c #4AA240", "r c #4BA43C", "s c #49A43A", "t c #FB171B", "u c #2F6EBB", "v c #489939", "w c #489A37", "x c #469B38", "y c #459D36", "z c #449F35", "A c #2E6DB9", "B c #418832", "C c #418932", "D c #408A31", "E c #408F31", "F c #3E922F", "G c #2D6BB7", "H c #38752B", "I c #37752D", "J c #38822C", "K c #36842B", "L c #2D6AB6", "M c #2B69B4", "N c #2B68B3", "O c #2A68B2", "P c #2A68B1", "Q c #2A66B0", "R c #2A66AF", "S c #2966AF", "T c #2965AE", "U c #2865AE", "V c #2864AD", "W c #2864AC", "X c #2863AB", " ", " . ", " . + @@# ", " $ % &**=== ", " - ;>,' )!~ ", " { ]^/( _:<[} ", " | 12 345 67 ", " 8 90ab cd ef ", " g hijklm n ", " o p qrs t ", " u vwxyz ", " A BCD EF ", " G HIH JK ", " L ", " MNOPQRSTUVVWXX ", " "}; spatialite_gui-2.0.0-devel/icons/exif.xpm0000664000175000017500000000503712543275035015343 00000000000000/* XPM */ static const char * exif_xpm[] = { "16 16 114 2", " c None", ". c #AA7128", "+ c #A96F27", "@ c #A76E26", "# c #A56C25", "$ c #A36A23", "% c #A06822", "& c #9D6620", "* c #9B641F", "= c #98611D", "- c #955F1C", "; c #A86F26", "> c #DDA252", ", c #DA934D", "' c #D59243", ") c #D1913C", "! c #CD8E3C", "~ c #CB8B3A", "{ c #BE843E", "] c #CA924B", "^ c #905B19", "/ c #D8903F", "( c #61BCF3", "_ c #62BDF3", ": c #5DB8F1", "< c #4DA6E9", "[ c #368EDE", "} c #CA9249", "| c #8C5817", "1 c #A26A23", "2 c #DD9148", "3 c #5CB6F0", "4 c #5EB8F1", "5 c #5CB7F0", "6 c #A47536", "7 c #A27234", "8 c #9F7032", "9 c #A86E26", "0 c #A16922", "a c #9E6721", "b c #D98F46", "c c #4BA4E8", "d c #4FA8EA", "e c #4CA5E8", "f c #A17233", "g c #D2A15B", "h c #CE9256", "i c #D49244", "j c #CC8D39", "k c #9A631F", "l c #D48A43", "m c #368DDE", "n c #3890DF", "o c #9B6F35", "p c #CC8F49", "q c #35C62D", "r c #40C723", "s c #3CC321", "t c #3BCD27", "u c #43D12E", "v c #57DA3F", "w c #96601C", "x c #CC8A43", "y c #6EE454", "z c #CF9037", "A c #885514", "B c #925D1A", "C c #8F5A18", "D c #6EE46E", "E c #CA8B51", "F c #845112", "G c #38BAED", "H c #58BFFF", "I c #62BBFF", "J c #44B6FF", "K c #DBEB8C", "L c #FFFF6D", "M c #78EF69", "N c #CE8F45", "O c #804E10", "P c #3BCE45", "Q c #07BE31", "R c #5AB7FF", "S c #58B6FF", "T c #97D1CC", "U c #F3FA8A", "V c #C99A40", "W c #C7883D", "X c #7D4C0E", "Y c #4BC84F", "Z c #36CB21", "` c #42C825", " . c #54B8AC", ".. c #42A6FF", "+. c #00A2FF", "@. c #7E4D0F", "#. c #7C4B0E", "$. c #7A490D", "%. c #77F35E", "&. c #A4FF8C", "*. c #ACFF77", "=. c #7CF634", "-. c #75EF55", ";. c #64FF79", ">. c #C59046", ",. c #C6954A", "'. c #E8D462", "). c #E9D461", "!. c #C99644", "~. c #8C5816", "{. c #895515", "]. c #865313", "^. c #835112", "/. c #804F10", " ", ". + @ # $ % & * = - ", "; > , ' ) ! ~ { ] ^ ", "# / ( _ ( : < [ } | ", "1 2 3 4 5 6 7 8 9 0 % & * = - ", "a b c d e f g h i j ! ~ { ] ^ ", "k l m n [ o p q r s t u v } | ", "w x . + @ # $ % & * = - y z A ", "B C ; > , ' ) ! ~ { ] ^ D E F ", " # / G H I J K L } | M N O ", " 1 2 P Q R S T U z A V W X ", " a b Y Z ` ...+.E F @.#.$. ", " k l %.&.*.=.-.;.N O ", " w x >.,.'.).!.V W X ", " B C ~.{.].^./.@.#.$. ", " "}; spatialite_gui-2.0.0-devel/icons/rs_next.xpm0000664000175000017500000000237712543275035016076 00000000000000/* XPM */ static const char * rs_next_xpm[] = { "16 16 55 1", " c None", ". c #80ABE8", "+ c #7EA9E8", "@ c #80ABEA", "# c #7CA9E8", "$ c #74A2E2", "% c #79A7E6", "& c #ADC8EF", "* c #87B0E8", "= c #6095DD", "- c #6EA0E2", "; c #A8C7EE", "> c #A3C2ED", ", c #75A4E3", "' c #4784D6", ") c #6297E1", "! c #A1C1EC", "~ c #92B7E8", "{ c #99BBE9", "] c #6197DD", "^ c #2C72CD", "/ c #538EDB", "( c #99BBEA", "_ c #80AAE3", ": c #81ABE3", "< c #8AB1E4", "[ c #4B88D6", "} c #1A62C6", "| c #4384D6", "1 c #90B5E7", "2 c #74A3E0", "3 c #77A4E0", "4 c #81ABE2", "5 c #437FD3", "6 c #1959C6", "7 c #3577D2", "8 c #87AFE4", "9 c #72A1DF", "0 c #7CA9E1", "a c #3F7AD0", "b c #1853C0", "c c #236ECD", "d c #7EA8E1", "e c #79A6E0", "f c #3D77D0", "g c #1750BD", "h c #1A62C9", "i c #75A3DF", "j c #3C74CF", "k c #164ABD", "l c #1859C4", "m c #3B71CC", "n c #1545B9", "o c #164EC0", "p c #1441B7", " ", " ", " .+ ", " @#$ ", " %&*= ", " -;>,' ", " )!~{]^ ", " /(_:<[} ", " |123456 ", " 7890ab ", " cdefg ", " hijk ", " lmn ", " op ", " ", " "}; spatialite_gui-2.0.0-devel/icons/hs_forward.xpm0000664000175000017500000000162212543275035016542 00000000000000/* XPM */ static const char * hs_forward_xpm[] = { "16 16 32 1", " c None", ". c #244E15", "+ c #DEF3D7", "@ c #4CA82D", "# c #B0E19D", "$ c #449528", "% c #74CB5C", "& c #8ADD59", "* c #57BE39", "= c #C5E9B8", "- c #B3E2A2", "; c #5DC23C", "> c #2B5F1A", ", c #BCE6A9", "' c #84D956", ") c #6BC946", "! c #78D14E", "~ c #3C8324", "{ c #A3DD8C", "] c #8FE05D", "^ c #CEECC3", "/ c #63C440", "( c #72CF4B", "_ c #D9F0D0", ": c #D3EEC9", "< c #7ED652", "[ c #51BA35", "} c #34731F", "| c #8CD473", "1 c #6DCB47", "2 c #7DCE65", "3 c #FFFFFF", " 3333 ", " 33@@@$33 ", " 3@@+++_$$3 ", " 3@++,]&#:^~3 ", " 3@+^]]&&'!-=}3 ", " 3@+]]]&3!!1=}3 ", "3@_,&&&'33))|,>3", "3$_''333333/;,>3", "3$:<<333333;*->3", "3~^{(((133;*%-.3", " 3~=1))/3;*[-.3 ", " 3}={/;;**[|#.3 ", " 3},,2[[%##.3 ", " 3>>--##..3 ", " 33....33 ", " 3333 "}; spatialite_gui-2.0.0-devel/icons/checkgeom.xpm0000664000175000017500000000546412543275035016341 00000000000000/* XPM */ static const char * checkgeom_xpm[] = { "16 16 130 2", " c None", ". c #3FB73A", "+ c #3CAC36", "@ c #3EB238", "# c #3DAF37", "$ c #3AA634", "% c #40B73A", "& c #3CAD37", "* c #3BAA36", "= c #667F46", "- c #50863A", "; c #3A9D33", "> c #58713B", ", c #3EB338", "' c #3DB138", ") c #3DAC38", "! c #3AA835", "~ c #39A534", "{ c #39A134", "] c #7EC272", "^ c #C2E3AF", "/ c #788C5F", "( c #3CAB36", "_ c #3EA938", ": c #4BAC45", "< c #ADD49E", "[ c #B8D7A4", "} c #8EC385", "| c #2D8F28", "1 c #5FB74F", "2 c #AAC897", "3 c #318D2C", "4 c #30892B", "5 c #2E852A", "6 c #3EB138", "7 c #3FA539", "8 c #A8CE90", "9 c #84B962", "0 c #7BB258", "a c #76B260", "b c #3E9738", "c c #2D8929", "d c #62A457", "e c #445026", "f c #3AA735", "g c #3EA538", "h c #56AD50", "i c #A5CC8D", "j c #80B55E", "k c #73AD4F", "l c #5DA342", "m c #59AA51", "n c #A9CB9A", "o c #95BF8E", "p c #2E8329", "q c #3B5925", "r c #39A434", "s c #38A133", "t c #389E33", "u c #ACCF94", "v c #7EB45C", "w c #72AC4E", "x c #5DA141", "y c #57A64E", "z c #98C185", "A c #73A857", "B c #99BE86", "C c #2D7E2A", "D c #2A7926", "E c #389C33", "F c #59A952", "G c #8CBC6D", "H c #70AA4D", "I c #5C9F42", "J c #54A24C", "K c #96BF83", "L c #6DA351", "M c #639D47", "N c #99BE89", "O c #2A7726", "P c #287324", "Q c #277023", "R c #266C22", "S c #379532", "T c #68AD62", "U c #91BE77", "V c #5DA044", "W c #539F4B", "X c #8CB478", "Y c #6AA24E", "Z c #629C47", "` c #85B171", " . c #6FA06A", ".. c #277124", "+. c #3A9235", "@. c #328C2D", "#. c #82B577", "$. c #549E4D", "%. c #8CB379", "&. c #6AA14D", "*. c #609A46", "=. c #84B071", "-. c #397D36", ";. c #266E23", ">. c #33872F", ",. c #237420", "'. c #9DC094", "). c #82AF6C", "!. c #679E4D", "~. c #84B070", "{. c #7AA675", "]. c #256B22", "^. c #246821", "/. c #236520", "(. c #2E7B2A", "_. c #2E792A", ":. c #6FA168", "<. c #73A26B", "[. c #2E712A", "}. c #215F1E", "|. c #205C1D", "1. c #2B7326", "2. c #276D22", "3. c #246921", "4. c #236620", "5. c #22631F", "6. c #22611F", "7. c #215E1E", "8. c #1F591C", "9. c #1E571C", " . + ", " @ # $ ", " % & * = - ; > ", " , ' ) ! ~ { ] ^ / ", " ( _ : < [ } | 1 2 3 4 5 ", "6 $ 7 8 9 0 a b c d e ", "& * f g h i j k l m n o p q ", " r s t u v w x y z A B C D ", " E F G H I J K L M N O P Q R ", " S T U V W X Y Z ` ... ", " +.@.#.$.%.&.*.=.-.;. ", " >.,.'.).!.~.{.].^./. ", " (._.:.<.[.^. }.|. ", " 1.2.3.4.5. ", " 6.7. ", " 8.9. "}; spatialite_gui-2.0.0-devel/icons/virttxt.xpm0000664000175000017500000000720412543275035016132 00000000000000/* XPM */ static const char * virttxt_xpm[] = { "16 16 180 2", " c None", ". c #4D8BC8", "+ c #4F8CC8", "@ c #4F8DC8", "# c #4F8CC9", "$ c #4F8BC7", "% c #4B89C5", "& c #3B76C4", "* c #4985C4", "= c #ECF2F7", "- c #EEF4F8", "; c #EDF4F8", "> c #EDF3F8", ", c #ECF2F8", "' c #D7E6F2", ") c #7DB2E2", "! c #6594DB", "~ c #4B88C5", "{ c #F2F6FA", "] c #C7E0FA", "^ c #C9E1FB", "/ c #C9E2FB", "( c #C8E0FB", "_ c #C5DFF9", ": c #C1DBF8", "< c #B8D6F4", "[ c #F8FBFF", "} c #B4D8F6", "| c #7DB0E1", "1 c #6492DB", "2 c #4C89C6", "3 c #F1F5F9", "4 c #CDE3FC", "5 c #CEE3FB", "6 c #CDE3FB", "7 c #CBE2FB", "8 c #C8E0F9", "9 c #C2DCF8", "0 c #BAD6F5", "a c #F8FBFD", "b c #CDE6FC", "c c #C9E5FA", "d c #84B6E2", "e c #4279BF", "f c #4B89C6", "g c #CFE3FC", "h c #D0E4FB", "i c #CFE4FC", "j c #CAE1FA", "k c #C4DDF9", "l c #BCD9F6", "m c #DFE9F4", "n c #F3F7FB", "o c #E9EFF5", "p c #457EC2", "q c #F0F4F9", "r c #D3E6FC", "s c #D4E6FC", "t c #D3E7FD", "u c #D1E4FC", "v c #C8E0FA", "w c #BBD6F5", "x c #B5D4F3", "y c #B3D2F1", "z c #F0F4F8", "A c #4682C4", "B c #4A88C6", "C c #EFF4F9", "D c #D7E7FE", "E c #D6E7FD", "F c #D5E7FD", "G c #D4E6FD", "H c #D2E6FC", "I c #CCE1FB", "J c #C7DFFA", "K c #BDDAF6", "L c #BBD8F6", "M c #EFF4FA", "N c #4683C6", "O c #4988C6", "P c #EDF4F9", "Q c #D8E8FE", "R c #D7E8FE", "S c #D6E7FE", "T c #D3E5FD", "U c #C3DDF9", "V c #EDF4FA", "W c #4582C6", "X c #4784C6", "Y c #ECF3F9", "Z c #D6E8FE", "` c #CCE3FB", " . c #C6DFFA", ".. c #EAF2FA", "+. c #4280C6", "@. c #4582C5", "#. c #EBF2F8", "$. c #CFE0F5", "%. c #A4AEBA", "&. c #8A8C8D", "*. c #9E9E9E", "=. c #86888B", "-. c #BBCADD", ";. c #C4D7EE", ">. c #87898D", ",. c #8C8D8D", "'. c #53749B", "). c #4280C5", "!. c #E8F1F8", "~. c #D1E1F9", "{. c #8A929D", "]. c #919191", "^. c #E8E8E8", "/. c #DDDDDD", "(. c #C1C1C1", "_. c #8B8E91", ":. c #8E949A", "<. c #D9D9DA", "[. c #C4C4C4", "}. c #4C4C4C", "|. c #407CC4", "1. c #E6F0F7", "2. c #4A8CBB", "3. c #71777B", "4. c #CED3D3", "5. c #577286", "6. c #4B4C4D", "7. c #656565", "8. c #929292", "9. c #797979", "0. c #858687", "a. c #737373", "b. c #3C78C1", "c. c #E3EDF7", "d. c #4E748F", "e. c #838586", "f. c #98D1F8", "g. c #434648", "h. c #BDBDBD", "i. c #CECECE", "j. c #C2C2C2", "k. c #ADADAD", "l. c #414548", "m. c #EEF0F4", "n. c #828282", "o. c #3871BF", "p. c #DFEBF5", "q. c #5083A7", "r. c #676C70", "s. c #577081", "t. c #424345", "u. c #464646", "v. c #515151", "w. c #7F8080", "x. c #676767", "y. c #3369BC", "z. c #EAF1F8", "A. c #C2CDD6", "B. c #646668", "C. c #929394", "D. c #AEAFAF", "E. c #AEAEAE", "F. c #979797", "G. c #717171", "H. c #787878", "I. c #B0B0B0", "J. c #888B8F", "K. c #4D4D4D", "L. c #3065BA", "M. c #3165B9", "N. c #335FA2", "O. c #474D58", "P. c #626468", "Q. c #696B6D", "R. c #6A6B6D", "S. c #3D6094", "T. c #39619E", "U. c #686B6F", "V. c #626467", "W. c #494B50", " . + + + + @ # $ % & ", " * = - ; > > > , = ' ) ! ", " ~ { ] ^ / ( _ : < [ } | 1 ", " 2 3 4 5 6 7 8 9 0 a b c d e ", " f 3 g h i 4 j k l m = n o p ", " f q r s t u 6 v 9 w x y z A ", " B C D E F G H I J 9 K L M N ", " O P Q Q R S T u I ] U 9 V W ", " X Y Z R E E F T h ` J ...+. ", " @.#.S $.%.&.*.=.-.;.>.*.,.'. ", " ).!.~.{.].^./.(._.:.<./.[.].}.", " |.1.2.3.4.5.6.7.8.9.7.6.0.[.a.", " b.c.d.e.4.f.g.h.i.j.k.l.m.[.n.", " o.p.q.r.4.s.t.u.v.v.u.t.w.[.x.", " y.z.A.B.C.D.E.F.G.H.F.E.I.J.K.", " L.M.N.O.P.Q.R.S.T.U.Q.V.W. "}; spatialite_gui-2.0.0-devel/icons/charset.xpm0000664000175000017500000000542012543275035016035 00000000000000/* XPM */ static const char * charset_xpm[] = { "16 16 128 2", " c None", ". c #B1D6F9", "+ c #AED5FA", "@ c #B5DAFD", "# c #526380", "$ c #7496B3", "% c #DE6164", "& c #F6F9FA", "* c #83AAC5", "= c #D26E77", "- c #799DB9", "; c #BADCFD", "> c #8CB3CC", ", c #EDF6FE", "' c #ECF1F7", ") c #C6E3FE", "! c #96BCD3", "~ c #BEDEFD", "{ c #9FC4D8", "] c #EBF2F9", "^ c #A8CBDE", "/ c #F1F4F9", "( c #EAF1F7", "_ c #E5EDF6", ": c #E5ECF3", "< c #C9E4FE", "[ c #C8E3FE", "} c #C0DFFD", "| c #5B7A9E", "1 c #9FCFFB", "2 c #E24B48", "3 c #F4F7FB", "4 c #F3F6F9", "5 c #F2F5F8", "6 c #596E8C", "7 c #DEE7EF", "8 c #BDDDFD", "9 c #AED3E5", "0 c #293143", "a c #4C5971", "b c #495469", "c c #E6423D", "d c #E54D4B", "e c #4E5E79", "f c #3D4455", "g c #424B5D", "h c #A9D3FB", "i c #EA3932", "j c #FEFEFE", "k c #ABD4FB", "l c #CAE5FE", "m c #C2E0FD", "n c #A4D1FB", "o c #C4E1FD", "p c #C6E2FD", "q c #7A8FAB", "r c #E3EAF1", "s c #E4EFF5", "t c #D38A97", "u c #A6D0FA", "v c #DB787E", "w c #8EC1F1", "x c #ABD0F5", "y c #E8EFF5", "z c #9DC5EF", "A c #94C1EF", "B c #51617E", "C c #7DA1BC", "D c #414857", "E c #E1E9F0", "F c #E3ECF7", "G c #E4EBF5", "H c #A0CAF3", "I c #BCC1DD", "J c #454F61", "K c #B4D1F1", "L c #B8DAFD", "M c #CCB6CA", "N c #BCD9F8", "O c #BE8FA3", "P c #CC6B76", "Q c #C5D6F1", "R c #7CA3C0", "S c #97BDE7", "T c #50698C", "U c #B0D2E3", "V c #E4EAF8", "W c #B0D7FC", "X c #DC5D60", "Y c #CBCDE4", "Z c #8ABDEF", "` c #556885", " . c #D5DBE4", ".. c #B2D8FC", "+. c #EEF0F2", "@. c #ADC2E3", "#. c #BCBCD6", "$. c #ACC7E8", "%. c #83B3E3", "&. c #CBCCD1", "*. c #F1F4FB", "=. c #CA8F9F", "-. c #A2D0FB", ";. c #92C8FB", ">. c #96CAFB", ",. c #97CCFF", "'. c #CD9FB0", "). c #B8C9E7", "!. c #E7EFF7", "~. c #D296A4", "{. c #59606E", "]. c #6787A7", "^. c #6F8EAF", "/. c #D1727D", "(. c #EFF1F4", "_. c #E25757", ":. c #AFD0E2", "<. c #D7E7F0", "[. c #CCAABD", "}. c #A7D2FB", "|. c #9BCDFB", "1. c #A9CAEC", "2. c #ADC8E9", "3. c #404757", "4. c #C29FB2", "5. c #455063", "6. c #D3E7F0", "7. c #FFFFFF", "j 7.7.7.7.7.7.7.7.7.7.7.7. ", "7.6.9 :.^ { ! > * C - $ ].7. ", "7.9 <.s ( !.] ' _ _ _ F w | 7. ", "7.U y [ l < p o } } ~ , Z %.6 7.", "7.^ 3 l < [ Y M } 8 ; , , 4 ` 7.", "7.{ & < ) ) v % N ; L @ ..5 B 7.", "7.! 3 p p Q d i #.@ @ W + 5 e 7.", "7.> *.o m ~.'.2 = . W k h 5 a 7.", "7.* / m } _.).=.c @.h }.n G b 7.", "7.R ' } [.d X % c O u -.1 V J 7.", "7.- ' 8 % I 2.1.= 2 H 1 |.E g 7.", "7.$ ' t i 4.+ k /.i P ,.>.7 3.7.", "7.^.& ; K $.x h n z S A ;.(.f 7.", "7.| .4 ( : : : r E E 7 +.&.0 7.", "7.q T 6 ` # e a b 5.g D f 0 {.7.", "j 7.7.7.7.7.7.7.7.7.7.7.7.7.7.j "}; spatialite_gui-2.0.0-devel/icons/loadtxt.xpm0000664000175000017500000000724612543275035016073 00000000000000/* XPM */ static const char * loadtxt_xpm[] = { "16 16 182 2", " c None", ". c #4D8BC8", "+ c #4F8CC8", "@ c #4F8DC8", "# c #4F8CC9", "$ c #4F8BC7", "% c #4B89C5", "& c #3B76C4", "* c #4985C4", "= c #ECF2F7", "- c #EEF4F8", "; c #EDF4F8", "> c #EDF3F8", ", c #ECF2F8", "' c #D7E6F2", ") c #7DB2E2", "! c #6594DB", "~ c #4B88C5", "{ c #F2F6FA", "] c #C7E0FA", "^ c #C9E1FB", "/ c #C9E2FB", "( c #C8E0FB", "_ c #C5DFF9", ": c #C1DBF8", "< c #B8D6F4", "[ c #F8FBFF", "} c #B4D8F6", "| c #7DB0E1", "1 c #6492DB", "2 c #4C89C6", "3 c #F1F5F9", "4 c #CDE3FC", "5 c #CEE3FB", "6 c #CDE3FB", "7 c #CBE2FB", "8 c #C8E0F9", "9 c #C2DCF8", "0 c #BAD6F5", "a c #F8FBFD", "b c #CDE6FC", "c c #C9E5FA", "d c #84B6E2", "e c #4279BF", "f c #4B89C6", "g c #CFE3FC", "h c #D0E4FB", "i c #CFE4FC", "j c #CAE1FA", "k c #C4DDF9", "l c #BCD9F6", "m c #DFE9F4", "n c #F3F7FB", "o c #E9EFF5", "p c #457EC2", "q c #F0F4F9", "r c #D3E6FC", "s c #D4E6FC", "t c #D3E7FD", "u c #D1E4FC", "v c #C8E0FA", "w c #BBD6F5", "x c #B5D4F3", "y c #B3D2F1", "z c #F0F4F8", "A c #4682C4", "B c #4A88C6", "C c #EFF4F9", "D c #D7E7FE", "E c #D6E7FD", "F c #D5E7FD", "G c #D4E6FD", "H c #D2E6FC", "I c #CCE1FB", "J c #C7DFFA", "K c #BDDAF6", "L c #BBD8F6", "M c #EFF4FA", "N c #4683C6", "O c #4988C6", "P c #EDF4F9", "Q c #D8E8FE", "R c #D7E8FE", "S c #D6E7FE", "T c #D3E5FD", "U c #72A846", "V c #659F31", "W c #EDF4FA", "X c #4582C6", "Y c #4784C6", "Z c #ECF3F9", "` c #D6E8FE", " . c #6BA441", ".. c #81B35A", "+. c #579828", "@. c #EAF2FA", "#. c #4280C6", "$. c #4582C5", "%. c #EBF2F8", "&. c #6FA53D", "*. c #6FA43A", "=. c #69A236", "-. c #639E32", ";. c #7CAF55", ">. c #AACB91", ",. c #74AB4F", "'. c #48911B", "). c #3F7CC4", "!. c #4280C5", "~. c #E8F1F8", "{. c #D5E5FE", "]. c #6BA337", "^. c #B0CE96", "/. c #ADCD94", "(. c #A8CB90", "_. c #90BC74", ":. c #A1C78A", "<. c #68A546", "[. c #35870A", "}. c #407CC4", "|. c #E6F0F7", "1. c #55B4F8", "2. c #56B4F7", "3. c #54B5F7", "4. c #639F31", "5. c #8EBA6F", "6. c #89B86B", "7. c #85B666", "8. c #80B361", "9. c #82B567", "0. c #98C283", "a. c #5CA03C", "b. c #257F00", "c. c #3C78C1", "d. c #E3EDF7", "e. c #6EC2FD", "f. c #A0D8FF", "g. c #9ED7FF", "h. c #5B9B29", "i. c #A9CA90", "j. c #A5C88D", "k. c #A1C68A", "l. c #9EC588", "m. c #85B66A", "n. c #97C282", "o. c #66A548", "p. c #237A1D", "q. c #3871BF", "r. c #DFEBF5", "s. c #68BFFD", "t. c #67BDFC", "u. c #65BEFB", "v. c #519723", "w. c #49911D", "x. c #438F17", "y. c #3B8B11", "z. c #5E9F3A", "A. c #96C180", "B. c #62A346", "C. c #46942E", "D. c #2C65B4", "E. c #3369BC", "F. c #EAF1F8", "G. c #DFECF7", "H. c #DEEBF6", "I. c #DEEAF6", "J. c #DCEAF6", "K. c #EBF3FA", "L. c #3A8C15", "M. c #5FA143", "N. c #4A9432", "O. c #F8FBF8", "P. c #2A60B7", "Q. c #3065BA", "R. c #3166BB", "S. c #3066BA", "T. c #2F65BA", "U. c #2E65B9", "V. c #227B0E", "W. c #1E7B03", "X. c #2E64B6", "Y. c #2C62B7", " . + + + + @ # $ % & ", " * = - ; > > > , = ' ) ! ", " ~ { ] ^ / ( _ : < [ } | 1 ", " 2 3 4 5 6 7 8 9 0 a b c d e ", " f 3 g h i 4 j k l m = n o p ", " f q r s t u 6 v 9 w x y z A ", " B C D E F G H I J 9 K L M N ", " O P Q Q R S T u I U V 9 W X ", " Y Z ` R E E F T h ...+.@.#. ", " $.%.S E E &.*.=.-.;.>.,.'.). ", " !.~.{.T T ].^./.>.(._.:.<.[. ", " }.|.1.2.3.4./.5.6.7.8.9.0.a.b.", " c.d.e.f.g.h.i.j.k.l.m.n.o.p. ", " q.r.s.t.u.v.w.x.y.z.A.B.C.D. ", " E.F.G.H.I.J.J.K.K.L.M.N.O.P. ", " Q.R.S.S.S.Q.T.U.V.W.X.Y. "}; spatialite_gui-2.0.0-devel/icons/rs_last.xpm0000664000175000017500000000327712543275035016063 00000000000000/* XPM */ static const char * rs_last_xpm[] = { "16 16 83 1", " c None", ". c #80ABE8", "+ c #7EA9E8", "@ c #659BE1", "# c #6095DF", "$ c #5990DD", "% c #528BD9", "& c #7BA7E8", "* c #72A2E2", "= c #5C92DF", "- c #8BB3E7", "; c #9ABCEA", "> c #4584D8", ", c #77A6E6", "' c #ADC8EF", ") c #88B0E8", "! c #6297DF", "~ c #84AEE4", "{ c #94B7E8", "] c #397BD2", "^ c #70A0E2", "/ c #ABC8EF", "( c #A6C3EE", "_ c #7AA6E5", ": c #4E89D8", "< c #7BA8E3", "[ c #8DB2E6", "} c #2C74CF", "| c #A5C4ED", "1 c #97BAEA", "2 c #9EBEEA", "3 c #699DDF", "4 c #397BD1", "5 c #73A2E0", "6 c #85ADE4", "7 c #1E6BCD", "8 c #9EC0EB", "9 c #87B0E6", "0 c #89B1E6", "a c #92B7E8", "b c #6E9DDF", "c c #2A72CF", "d c #81ABE2", "e c #7EA8E1", "f c #1A62C8", "g c #98BBE9", "h c #7FAAE3", "i c #82ABE3", "j c #8BB2E5", "k c #6699DD", "l c #74A3DF", "m c #76A3DF", "n c #1859C6", "o c #91B6E8", "p c #7FA9E3", "q c #89B1E4", "r c #4B87D6", "s c #1A63C8", "t c #5E92D9", "u c #709FDE", "v c #1752C0", "w c #8AB1E5", "x c #86AEE4", "y c #4685D6", "z c #1A60C6", "A c #578BD6", "B c #6A9BDC", "C c #164ABD", "D c #83ACE3", "E c #4481D3", "F c #195CC6", "G c #5385D4", "H c #6397DA", "I c #1441BB", "J c #4281D3", "K c #1959C4", "L c #4E80D2", "M c #5E94D8", "N c #133CB7", "O c #1855C0", "P c #143EB9", "Q c #133AB7", "R c #1239B6", " ", " ", " .+ @#$% ", " .&* =-;> ", " ,')! %~{] ", " ^/(_: ><[} ", " @|1234]567 ", " =890abcdef ", " %ghijk7lmn ", " >opqrsftuv ", " ]wxyz nABC ", " }DEF vGHI ", " 7JK CLMN ", " fO IPQR ", " ", " "}; spatialite_gui-2.0.0-devel/icons/security_lock.xpm0000664000175000017500000000667612543275035017301 00000000000000/* XPM */ static const char * security_lock_xpm[] = { "16 16 168 2", " c None", ". c #A3A3A3", "+ c #A0A0A0", "@ c #9D9D9D", "# c #9A9A9A", "$ c #979797", "% c #949494", "& c #A2A2A2", "* c #BCBCBC", "= c #CACACA", "- c #CCCCCC", "; c #C2C2C2", "> c #ADADAD", ", c #8C8C8C", "' c #A1A1A1", ") c #C4C4C4", "! c #BEBEBE", "~ c #969696", "{ c #939393", "] c #AEAEAE", "^ c #848484", "/ c #BABABA", "( c #BFBFBF", "_ c #989898", ": c #878787", "< c #A8A8A8", "[ c #9E9E9E", "} c #898989", "| c #A9A9A9", "1 c #797979", "2 c #999999", "3 c #C6C6C6", "4 c #7D7D7D", "5 c #ABABAB", "6 c #767676", "7 c #E1C361", "8 c #A8A088", "9 c #919191", "0 c #8E8E8E", "a c #DCB95A", "b c #DFB855", "c c #DEB551", "d c #DDB14D", "e c #DCAD49", "f c #D7A846", "g c #787878", "h c #8D7E65", "i c #D89931", "j c #E1C260", "k c #FCF3C9", "l c #FDF3CB", "m c #FEF6D4", "n c #FFF6D7", "o c #FFF4D8", "p c #FFF8E0", "q c #FFF8DF", "r c #FFF5DA", "s c #FCF1CD", "t c #FAEDC2", "u c #FAEBBD", "v c #D6932B", "w c #E0BF5C", "x c #FCF3C8", "y c #F9DF75", "z c #FDE689", "A c #FFE795", "B c #FFE59A", "C c #FFEEAA", "D c #FFEDA8", "E c #FFE399", "F c #F9D574", "G c #F3CC59", "H c #F1C84F", "I c #FAE9BB", "J c #D58D24", "K c #DFBB58", "L c #FCF1C7", "M c #F9DC6F", "N c #EDBB56", "O c #EFBD61", "P c #FFE79B", "Q c #E2A635", "R c #E1A44B", "S c #FFE290", "T c #E9AD49", "U c #E3A438", "V c #F0C449", "W c #F9E8B8", "X c #D4881E", "Y c #DEB753", "Z c #FCF0C6", "` c #F8D96A", " . c #FDE27C", ".. c #FFE890", "+. c #FFE999", "@. c #DF9F32", "#. c #B28B54", "$. c #FFE28A", "%. c #F9D06A", "&. c #F1C550", "*. c #F0C146", "=. c #F9E7B6", "-. c #D38318", ";. c #DDB24E", ">. c #FBEFC3", ",. c #F8D665", "'. c #ECB64C", "). c #EFBD5A", "!. c #FFEB95", "~. c #DD9730", "{. c #AB824D", "]. c #FFE184", "^. c #E9A941", "/. c #E19F32", "(. c #EFBE42", "_. c #F9E5B4", ":. c #D27E13", "<. c #FBEEC1", "[. c #F7D35F", "}. c #FCDB6C", "|. c #FFE57F", "1. c #FFED8F", "2. c #FFF297", "3. c #FFED93", "4. c #FFDF7C", "5. c #F8CC5B", "6. c #EFBE46", "7. c #EEBA3C", "8. c #F9E3B3", "9. c #D1790E", "0. c #DBA843", "a. c #FBECBF", "b. c #F5CF59", "c. c #ECB041", "d. c #EFBA4E", "e. c #EFC25A", "f. c #EFC660", "g. c #EFC45C", "h. c #EFB64C", "i. c #E6A537", "j. c #E19A2A", "k. c #EEB838", "l. c #F8E3B1", "m. c #D07509", "n. c #DAA33D", "o. c #FAEBBC", "p. c #FCEBBC", "q. c #FEEEBF", "r. c #FFF4C6", "s. c #FFF8CE", "t. c #FFFAD3", "u. c #FFF8D0", "v. c #FFF2C7", "w. c #FCE9BA", "x. c #F9E4B3", "y. c #F8E2B0", "z. c #CF7105", "A. c #D99D36", "B. c #D7942C", "C. c #D69028", "D. c #D58C23", "E. c #D3841A", "F. c #D28015", "G. c #D17C11", "H. c #D0760A", "I. c #CF7307", "J. c #CF7004", "K. c #CE6E01", " . + @ # $ % ", " & * = - = ; > , ", " ' ) ! ' ~ { $ ] ] ^ ", " / ( _ : < [ ", " @ ) ' } | 1 ", " 2 3 % 4 5 6 ", " 7 8 9 0 a b c d e f g 6 h i ", " j k l m n o p q r s t u u v ", " w x y z A B C D E F G H I J ", " K L M N O P Q R S T U V W X ", " Y Z ` ...+.@.#.$.%.&.*.=.-. ", " ;.>.,.'.).!.~.{.].^./.(._.:. ", " e <.[.}.|.1.2.3.4.5.6.7.8.9. ", " 0.a.b.c.d.e.f.g.h.i.j.k.l.m. ", " n.o.p.q.r.s.t.u.v.w.x.y.y.z. ", " A.i B.C.D.X E.F.G.9.H.I.J.K. "}; spatialite_gui-2.0.0-devel/icons/spatialidx.xpm0000664000175000017500000000206212543275035016545 00000000000000/* XPM */ static const char * spatialidx_xpm[] = { "16 16 42 1", " c None", ". c #97BBE6", "+ c #D2EEB1", "@ c #FFF175", "# c #EAA101", "$ c #C9ECFA", "% c #E78800", "& c #8AD26C", "* c #F3BB17", "= c #72C757", "- c #D2EDC3", "; c #0A5EC5", "> c #F1F9E7", ", c #EEB309", "' c #1F76D1", ") c #F3AD09", "! c #AACFEF", "~ c #FFFB9A", "{ c #E68F00", "] c #CDECAC", "^ c #EC9501", "/ c #E49C00", "( c #FCC927", "_ c #85CA72", ": c #45A2E9", "< c #5D95D8", "[ c #E9A702", "} c #DCB939", "| c #2D86DA", "1 c #C9EBA9", "2 c #EDB113", "3 c #F3B20C", "4 c #CC9601", "5 c #FCCC36", "6 c #F3B711", "7 c #E59600", "8 c #55B34B", "9 c #F0B512", "0 c #ACDAA7", "a c #106CD2", "b c #209910", "c c #FFFFFF", " cccccc ", " c999**c ", " c9~@5c ", " cc9~@*ccc ", " cbb9@@2[/4c ", " cb>9,,#(67bc ", " ca>++}#3%+bc ", " ca$-+&#)%1=0bc ", " ca$|0'){]=80bc ", " ca$<'^{!8880bc ", " cb-&=%!:aab0ac ", " cb-&_8a;;.ac ", " cb0+8ba;..ac ", " cbb00..aac ", " ccbaaacc ", " cccc "}; spatialite_gui-2.0.0-devel/icons/security_rdonly.xpm0000664000175000017500000000674212543275035017652 00000000000000/* XPM */ static const char * security_rdonly_xpm[] = { "16 16 170 2", " c None", ". c #A3A3A3", "+ c #A0A0A0", "@ c #9D9D9D", "# c #9A9A9A", "$ c #979797", "% c #949494", "& c #A2A2A2", "* c #BCBCBC", "= c #CACACA", "- c #CCCCCC", "; c #C2C2C2", "> c #ADADAD", ", c #8C8C8C", "' c #A1A1A1", ") c #C4C4C4", "! c #BEBEBE", "~ c #969696", "{ c #939393", "] c #AEAEAE", "^ c #848484", "/ c #BABABA", "( c #BFBFBF", "_ c #989898", ": c #878787", "< c #A8A8A8", "[ c #9E9E9E", "} c #898989", "| c #A9A9A9", "1 c #797979", "2 c #999999", "3 c #C6C6C6", "4 c #7D7D7D", "5 c #ABABAB", "6 c #767676", "7 c #E1C361", "8 c #A8A088", "9 c #919191", "0 c #8E8E8E", "a c #DCB95A", "b c #DFB855", "c c #DEB551", "d c #DDB14D", "e c #DCAD49", "f c #D7A846", "g c #787878", "h c #8D7E65", "i c #D89931", "j c #E1C260", "k c #FCF3C9", "l c #FDF3CB", "m c #FEF6D4", "n c #FFF6D7", "o c #FFF4D8", "p c #FFF8E0", "q c #FFF8DF", "r c #FFF5DA", "s c #FCF1CD", "t c #FAEDC2", "u c #FAEBBD", "v c #D6932B", "w c #E0BF5C", "x c #FCF3C8", "y c #F9DF75", "z c #FDE689", "A c #FFE795", "B c #FFE59A", "C c #FFEEAA", "D c #FFEDA8", "E c #FFE399", "F c #F9D574", "G c #F3CC59", "H c #F1C84F", "I c #FAE9BB", "J c #D58D24", "K c #DFBB58", "L c #FCF1C7", "M c #F9DC6F", "N c #EDBB56", "O c #EFBD61", "P c #FFE79B", "Q c #E2A635", "R c #E1A44B", "S c #FFE290", "T c #D88535", "U c #C45713", "V c #BC4304", "W c #C05818", "X c #C76811", "Y c #DEB753", "Z c #FCF0C6", "` c #F8D96A", " . c #FDE27C", ".. c #FFE890", "+. c #FFE999", "@. c #DF9F32", "#. c #B28B54", "$. c #E3A158", "%. c #D27539", "&. c #F7B58D", "*. c #FED6B8", "=. c #F5A872", "-. c #CB6B2D", ";. c #DDB24E", ">. c #FBEFC3", ",. c #F8D665", "'. c #ECB64C", "). c #EFBD5A", "!. c #FFEB95", "~. c #DD9730", "{. c #AB824D", "]. c #C25914", "^. c #F6B58D", "/. c #FF924D", "(. c #FF7711", "_. c #FF8621", ":. c #EB8A40", "<. c #B94403", "[. c #FBEEC1", "}. c #F7D35F", "|. c #FCDB6C", "1. c #FFE57F", "2. c #FFED8F", "3. c #FFF297", "4. c #FFED93", "5. c #FECDAE", "6. c #FFFFFF", "7. c #EF7F18", "8. c #BC4204", "9. c #DBA843", "0. c #FBECBF", "a. c #F5CF59", "b. c #ECB041", "c. c #EFBA4E", "d. c #EFC25A", "e. c #EFC660", "f. c #EFC45C", "g. c #BF510B", "h. c #F49D63", "i. c #FF7F18", "j. c #F87600", "k. c #EE7600", "l. c #E16803", "m. c #B94503", "n. c #DAA33D", "o. c #FAEBBC", "p. c #FCEBBC", "q. c #FEEEBF", "r. c #FFF4C6", "s. c #FFF8CE", "t. c #FFFAD3", "u. c #FFF8D0", "v. c #E1A470", "w. c #CA6627", "x. c #E67721", "y. c #EA7905", "z. c #DD6401", "A. c #BD4D04", "B. c #D99D36", "C. c #D7942C", "D. c #D69028", "E. c #D58C23", "F. c #D4881E", "G. c #D3841A", "H. c #D28015", "I. c #D17C11", "J. c #CB6915", "K. c #BC4B04", "L. c #BB4A03", "M. c #C35A02", " . + @ # $ % ", " & * = - = ; > , ", " ' ) ! ' ~ { $ ] ] ^ ", " / ( _ : < [ ", " @ ) ' } | 1 ", " 2 3 % 4 5 6 ", " 7 8 9 0 a b c d e f g 6 h i ", " j k l m n o p q r s t u u v ", " w x y z A B C D E F G H I J ", " K L M N O P Q R S T U V W X ", " Y Z ` ...+.@.#.$.%.&.*.=.-. ", " ;.>.,.'.).!.~.{.].^./.(._.:.<.", " e [.}.|.1.2.3.4.V 5.6.6.6.7.8.", " 9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.", " n.o.p.q.r.s.t.u.v.w.x.y.z.A. ", " B.i C.D.E.F.G.H.I.J.K.8.L.M. "}; spatialite_gui-2.0.0-devel/icons/db.xpm0000664000175000017500000000325212543275035014772 00000000000000/* XPM */ static const char * db_xpm[] = { "16 16 82 1", " g None", ". g #BABABA", "+ g #B8B8B8", "@ g #B7B7B7", "# g #B6B6B6", "$ g #B4B4B4", "% g #B3B3B3", "& g #BBBBBB", "* g #D0D0D0", "= g #E8E8E8", "- g #F3F3F3", "; g #FDFDFD", "> g #FCFCFC", ", g #EDEDED", "' g #E0E0E0", ") g #C2C2C2", "! g #ADADAD", "~ g #E1E1E1", "{ g #FEFEFE", "] g #FFFFFF", "^ g #FBFBFB", "/ g #CFCFCF", "( g #A9A9A9", "_ g #B9B9B9", ": g #F8F8F8", "< g #EAEAEA", "[ g #A7A7A7", "} g #F7F7F7", "| g #E7E7E7", "1 g #EFEFEF", "2 g #F6F6F6", "3 g #FAFAFA", "4 g #F0F0F0", "5 g #DEDEDE", "6 g #C3C3C3", "7 g #E6E6E6", "8 g #A5A5A5", "9 g #B5B5B5", "0 g #EBEBEB", "a g #D6D6D6", "b g #D5D5D5", "c g #D1D1D1", "d g #BCBCBC", "e g #C0C0C0", "f g #E5E5E5", "g g #A3A3A3", "h g #F5F5F5", "i g #EEEEEE", "j g #E2E2E2", "k g #CDCDCD", "l g #E3E3E3", "m g #A0A0A0", "n g #B2B2B2", "o g #F4F4F4", "p g #DDDDDD", "q g #C9C9C9", "r g #BDBDBD", "s g #BFBFBF", "t g #9E9E9E", "u g #B0B0B0", "v g #D9D9D9", "w g #DBDBDB", "x g #C4C4C4", "y g #9B9B9B", "z g #AEAEAE", "A g #F2F2F2", "B g #D8D8D8", "C g #DCDCDC", "D g #969696", "E g #ACACAC", "F g #D4D4D4", "G g #D2D2D2", "H g #909090", "I g #8B8B8B", "J g #CECECE", "K g #8A8A8A", "L g #A1A1A1", "M g #9F9F9F", "N g #ABABAB", "O g #959595", "P g #8D8D8D", "Q g #898989", " ", " .+@#$% ", " &*=-;>,')! ", " .~{]]]]]]^/( ", " _:{]]]]]]^<[ ", " @}|12^345678 ", " 9205abc6defg ", " $hi7j7~k))lm ", " no<~pl5qrsjt ", " u-|pv'wx+&~y ", " zAjBbCBe%@'D ", " E45FGwasu%5H ", " (5-wGwaeq7xI ", " 8J,oho1j.K ", " LMLN[OPQ ", " "}; spatialite_gui-2.0.0-devel/icons/about.xpm0000664000175000017500000000161512543275035015520 00000000000000/* XPM */ static const char * about_xpm[] = { "16 16 32 1", " c None", ". c #69BAFE", "+ c #275377", "@ c #8C9398", "# c #5FAFF1", "$ c #76B7EC", "% c #ABD6FA", "& c #5CA1DC", "* c #A1C9EB", "= c #66AAE3", "- c #579ED9", "; c #B5D9F7", "> c #C9E6FF", ", c #69ADE5", "' c #6D8293", ") c #95CDFC", "! c #2D5C84", "~ c #46627A", "{ c #1A3C59", "] c #75C0FF", "^ c #61A7E0", "/ c #FDFDFD", "( c #6FB2E9", "_ c #5FA5DE", ": c #A8CFF0", "< c #D8EDFE", "[ c #5C768B", "} c #3C4F60", "| c #6CAFE7", "1 c #539AD4", "2 c #425667", "3 c #FFFFFF", " 3333333 ", " 3~@@@''~3 ", " 3[<>>%)))!3 ", " 3[<$$$$((,]!3 ", "32<$(:333:==]{3 ", "32;$|3:,=3^=]23 ", "32;(|:,==3^^.23 ", "32;|,,=33*&_.{3 ", "32;===*3*&&_.{3 ", "32%^=^_&&&-&.{3 ", "32)-^_*3*--1.{3 ", " 3}$-111111.+3 ", " 3}$.####.+3/ ", " 3}!!++!{3/ ", " 3333333 ", " "}; spatialite_gui-2.0.0-devel/icons/virtdbf.xpm0000664000175000017500000000741412543275035016051 00000000000000/* XPM */ static const char * virtdbf_xpm[] = { "16 16 188 2", " c None", ". c #4C6D9D", "+ c #4B6D9D", "@ c #4B6C9D", "# c #4A6C9C", "$ c #496B9C", "% c #496A9B", "& c #486A9B", "* c #47699A", "= c #466899", "- c #456798", "; c #436493", "> c #3E5D84", ", c #7897BB", "' c #6282AC", ") c #6181AC", "! c #6080AB", "~ c #5F7FAB", "{ c #5E7FAA", "] c #5D7EA8", "^ c #5C7CA8", "/ c #436697", "( c #3C5C88", "_ c #7897BA", ": c #B9C5D8", "< c #D7DEE8", "[ c #D6DDE7", "} c #D6DCE6", "| c #D4DBE4", "1 c #D3DAE3", "2 c #D1D8E2", "3 c #D0D7E1", "4 c #E5E7EB", "5 c #EFEFEF", "6 c #2A3E57", "7 c #4B6C9C", "8 c #A5C2D9", "9 c #7091B5", "0 c #5F80AB", "a c #5E7EA9", "b c #5C7DA8", "c c #5B7CA8", "d c #5A7BA7", "e c #5979A6", "f c #416496", "g c #4A6B9C", "h c #A9C8DD", "i c #95BDD4", "j c #B9D4E6", "k c #B6D1E6", "l c #B5D0E4", "m c #B3CEE3", "n c #B0CBE2", "o c #ADC9E0", "p c #A9C7DF", "q c #A0BFDA", "r c #4A6B9A", "s c #A6C5DB", "t c #76A7C6", "u c #9BBFD9", "v c #93B7D1", "w c #8EB0CB", "x c #8AAECA", "y c #87ABC8", "z c #83ABCB", "A c #87B0D1", "B c #9BBBD8", "C c #486A99", "D c #A4C2D9", "E c #72A4C1", "F c #94B8D2", "G c #E4EDF5", "H c #E2ECF4", "I c #E1ECF4", "J c #E0EBF4", "K c #DFEAF3", "L c #7FA9CB", "M c #96B8D6", "N c #476999", "O c #9FBFD7", "P c #6F9FBD", "Q c #90B5D4", "R c #88ADCB", "S c #81A8C7", "T c #7DA5C6", "U c #7AA1C4", "V c #76A1C5", "W c #7BA7CB", "X c #90B4D4", "Y c #466898", "Z c #9BBBD5", "` c #699AB8", " . c #8AB3D4", ".. c #87AFD2", "+. c #82ADD0", "@. c #7DAACF", "#. c #78A6CD", "$. c #74A4CB", "%. c #75A4CC", "&. c #8AB1D2", "*. c #456797", "=. c #456799", "-. c #96B7D2", ";. c #6592B4", ">. c #80A9CB", ",. c #758DA1", "'. c #84878A", "). c #9E9E9E", "!. c #7B8085", "~. c #6D93B4", "{. c #6D9ABF", "]. c #7D8387", "^. c #7F8082", "/. c #446698", "(. c #92B4D0", "_. c #5F89AC", ":. c #627788", "<. c #919191", "[. c #E8E8E8", "}. c #DDDDDD", "|. c #C1C1C1", "1. c #7E848A", "2. c #76838D", "3. c #D7D8D9", "4. c #C4C4C4", "5. c #4C4C4C", "6. c #436597", "7. c #8EB0CE", "8. c #4E6B85", "9. c #737678", "0. c #CED3D3", "a. c #5D6C78", "b. c #4B4C4C", "c. c #656565", "d. c #929292", "e. c #797979", "f. c #4B4B4C", "g. c #4B5158", "h. c #737373", "i. c #88ACCB", "j. c #435567", "k. c #818384", "l. c #6596C1", "m. c #414345", "n. c #BDBDBD", "o. c #CECECE", "p. c #C2C2C2", "q. c #ADADAD", "r. c #3F4143", "s. c #2B3F57", "t. c #828282", "u. c #406396", "v. c #85A9CA", "w. c #445972", "x. c #676A6D", "y. c #556471", "z. c #414344", "A. c #464646", "B. c #515151", "C. c #414243", "D. c #474C53", "E. c #676767", "F. c #3F6295", "G. c #85ABCC", "H. c #7A99B6", "I. c #565D62", "J. c #8C8F91", "K. c #A7AAAD", "L. c #AEAEAE", "M. c #979797", "N. c #717171", "O. c #787878", "P. c #A4A5A6", "Q. c #8D8D8D", "R. c #4D4D4D", "S. c #3E6194", "T. c #3D6094", "U. c #3C5F92", "V. c #3C5982", "W. c #484D53", "X. c #626466", "Y. c #696B6C", "Z. c #6A6B6C", "`. c #435A7A", " + c #3F5980", ".+ c #686A6D", "++ c #646464", "@+ c #4A4A4A", " . + @ # $ % & * = - ; > ", " . + , ' ) ! ~ { ] ^ . / ( ", " + _ : < [ } | 1 2 3 4 5 6 ", " 7 8 9 0 a a b c d e $ f 6 ", " g h i j k l m n o p q r 6 ", " % s t u v w x y z A B C 6 ", " & D E F G H I J K L M N 6 ", " * O P Q R S T U V W X Y 6 ", " = Z ` ...+.@.#.$.%.&.*.6 ", " =.-.;.>.,.'.).!.~.{.].).^. ", " /.(._.:.<.[.}.|.1.2.3.}.4.<.5.", " 6.7.8.9.0.a.b.c.d.e.c.f.g.4.h.", " f i.j.k.0.l.m.n.o.p.q.r.s.4.t.", " u.v.w.x.0.y.z.A.B.B.A.C.D.4.E.", " F.G.H.I.J.K.L.M.N.O.M.L.P.Q.R.", " S.T.U.V.W.X.Y.Z.`. +.+Z.++@+ "}; spatialite_gui-2.0.0-devel/icons/loadshp.xpm0000664000175000017500000000741412543275035016043 00000000000000/* XPM */ static const char * loadshp_xpm[] = { "16 16 188 2", " c None", ". c #6EC461", "+ c #BBE1A5", "@ c #CCEABA", "# c #BEE0C5", "$ c #B4DAC5", "% c #B0D7BD", "& c #ACD7A6", "* c #69BE5D", "= c #66BA5A", "- c #A2D88C", "; c #E8F5CD", "> c #DAEDD4", ", c #D3EDCE", "' c #AFDFCF", ") c #B5DED6", "! c #A2D4D4", "~ c #A1D0CE", "{ c #AAD0C4", "] c #91C987", "^ c #5DAF53", "/ c #A0D787", "( c #DEF2C0", "_ c #D6F2C7", ": c #D5EFD5", "< c #CFE9D0", "[ c #A6DBD5", "} c #ABDEDC", "| c #90CDDB", "1 c #8BC8D7", "2 c #8EC1C9", "3 c #AFD5BD", "4 c #91C77A", "5 c #53A34A", "6 c #E2F3C0", "7 c #B4EFB5", "8 c #ACF0B5", "9 c #B7EDC1", "0 c #B7E3D4", "a c #9CD8D9", "b c #95D3DA", "c c #6DB5CD", "d c #6DB3C7", "e c #84CBB5", "f c #9ADF94", "g c #CDE7AF", "h c #4D9B46", "i c #B5DE98", "j c #CCEBB5", "k c #A7EFB1", "l c #A9EEC9", "m c #C9EAD1", "n c #8DCFD5", "o c #8BCBD9", "p c #66B4CD", "q c #67BCBC", "r c #71D69A", "s c #73DE82", "t c #71DC7A", "u c #A3D091", "v c #A4C888", "w c #438F3D", "x c #D2ECB3", "y c #A2E29B", "z c #8DEA9D", "A c #B7EDD4", "B c #C7EAD0", "C c #6EB9CF", "D c #66B1CC", "E c #75C9CB", "F c #67DB76", "G c #4DD966", "H c #4DD765", "I c #5DD36C", "J c #7EBB73", "K c #C2DBA5", "L c #3E8839", "M c #DCF0BE", "N c #83D881", "O c #6DDB77", "P c #9AE5BF", "Q c #A7DFCC", "R c #5DA8CA", "S c #6CBDC2", "T c #8BDAB8", "U c #60D8A6", "V c #68A73C", "W c #659F31", "X c #50BC59", "Y c #6CAB63", "Z c #CEE4B2", "` c #398235", " . c #6DC360", ".. c #DDEFBE", "+. c #7DD173", "@. c #6CD190", "#. c #9EE0BC", "$. c #5EA7C7", "%. c #5EB0D3", "&. c #5399C6", "*. c #6EBCC6", "=. c #7AD1AF", "-. c #64A23B", ";. c #81B35A", ">. c #579828", ",. c #67A35A", "'. c #CEE3B1", "). c #357E31", "!. c #6ABF5E", "~. c #CFE9B0", "{. c #90D483", "]. c #8ADCBF", "^. c #82CBC3", "/. c #56A2CC", "(. c #6FA53D", "_. c #6DA33A", ":. c #67A135", "<. c #619D31", "[. c #7CAF55", "}. c #AACB91", "|. c #74AB4F", "1. c #468F18", "2. c #BCD8A1", "3. c #327A2F", "4. c #AFD792", "5. c #B4DEA0", "6. c #70C684", "7. c #80D0A8", "8. c #5CA5C5", "9. c #6BA337", "0. c #B0CE96", "a. c #ADCD94", "b. c #A8CB90", "c. c #90BC74", "d. c #A1C78A", "e. c #68A546", "f. c #378809", "g. c #D3EAB5", "h. c #74BC69", "i. c #71BD6E", "j. c #6DB6BE", "k. c #639F31", "l. c #8EBA6F", "m. c #89B86B", "n. c #85B666", "o. c #80B361", "p. c #82B567", "q. c #98C283", "r. c #5CA03C", "s. c #257F00", "t. c #57A84E", "u. c #8DC076", "v. c #B3D799", "w. c #80C079", "x. c #7EC2BC", "y. c #5B9B29", "z. c #A9CA90", "A. c #A5C88D", "B. c #A1C68A", "C. c #9EC588", "D. c #85B66A", "E. c #97C282", "F. c #66A548", "G. c #237D06", "H. c #86B770", "I. c #C7E8AE", "J. c #A0D2C0", "K. c #519722", "L. c #49911C", "M. c #438F16", "N. c #3B8B10", "O. c #5E9F3A", "P. c #96C180", "Q. c #62A346", "R. c #227D07", "S. c #3F8A3A", "T. c #9DC59B", "U. c #9DC2B3", "V. c #9CC1BD", "W. c #9DC3BE", "X. c #B1D2B0", "Y. c #34880B", "Z. c #5FA143", "`. c #227B07", " + c #378033", ".+ c #347D31", "++ c #227D03", "@+ c #1E7B03", " . . . . . . ", " . . + @ # $ % & * = ", " . - ; > , ' ) ! ~ { ] ^ ", " . / ( _ : < [ } | 1 2 3 4 5 ", " . 6 7 8 9 0 a b c d e f g h ", ". i j k l m n o p q r s t u v w ", ". x y z A B C D E F G H I J K L ", ". M N O P Q R S T U V W X Y Z ` ", " ...+.@.#.$.%.&.*.=.-.;.>.,.'.).", "!.~.{.].^./.(._.:.<.[.}.|.1.2.3.", "= 4.5.6.7.8.9.0.a.}.b.c.d.e.f.3.", " ^ g.h.i.j.k.a.l.m.n.o.p.q.r.s.", " t.u.v.w.x.y.z.A.B.C.D.E.F.G. ", " h H.I.J.K.L.M.N.O.P.Q.R. ", " w S.T.U.V.W.X.Y.Z.`. ", " +.+3.3.3.++@+ "}; spatialite_gui-2.0.0-devel/icons/view.xpm0000664000175000017500000000552112543275035015360 00000000000000/* XPM */ static const char * view_xpm[] = { "16 16 132 2", " c None", ". c #B9B9B9", "+ c #B7B7B7", "@ c #B5B5B5", "# c #B2B2B2", "$ c #B0B0B0", "% c #BABABA", "& c #D6D6D6", "* c #EDEDED", "= c #F9F9F9", "- c #FBFBFB", "; c #F0F0F0", "> c #D9D9D9", ", c #ABABAB", "' c #B8B8B8", ") c #F6F6F6", "! c #F4F4F4", "~ c #A8A8A8", "{ c #93B7E7", "] c #90B5E6", "^ c #8CB2E4", "/ c #88AFE2", "( c #84ACE0", "_ c #80A9DD", ": c #7DA5DC", "< c #7AA3DA", "[ c #B6B6B6", "} c #F2F2F2", "| c #E4E4E4", "1 c #E2E2E2", "2 c #C8C8C8", "3 c #F1F1F1", "4 c #A5A5A5", "5 c #F4F7FB", "6 c #74A0D7", "7 c #B4B4B4", "8 c #F8F8F8", "9 c #DBDBDB", "0 c #EFEFEF", "a c #D0D0D0", "b c #FFFFFF", "c c #A2A2A2", "d c #93CB8B", "e c #8EC987", "f c #89C682", "g c #84C37E", "h c #80C17A", "i c #7CBE76", "j c #6F9BD4", "k c #B1B1B1", "l c #D5D5D5", "m c #CBCBCB", "n c #9E9E9E", "o c #6A97D1", "p c #AEAEAE", "q c #D1D1D1", "r c #ECECEC", "s c #C5C5C5", "t c #C6C6C6", "u c #9A9A9A", "v c #A6C3E9", "w c #6493CE", "x c #ACACAC", "y c #FAFAFA", "z c #D7D7D7", "A c #CACACA", "B c #CFCFCF", "C c #939393", "D c #ACC7E8", "E c #EBF1F7", "F c #5F8FCB", "G c #A9A9A9", "H c #EAEAEA", "I c #91959A", "J c #AEC9E9", "K c #B0C9E9", "L c #B0C8E8", "M c #B5CCE8", "N c #DEE7F2", "O c #598AC8", "P c #9CA4AF", "Q c #AAABAB", "R c #9CA0A4", "S c #A7A7A7", "T c #9CA7B6", "U c #F3F3F3", "V c #DBE5F1", "W c #5586C6", "X c #8AACD8", "Y c #DBDEE3", "Z c #A9BBD2", "` c #ADC2DB", " . c #B0C7E3", ".. c #B3CCEA", "+. c #B7CEEA", "@. c #AEC8E8", "#. c #D8E2F0", "$. c #5486C4", "%. c #82AADF", "&. c #EFF3F9", "*. c #BBD0EB", "=. c #BACFEA", "-. c #F2F6FB", ";. c #5F8DC8", ">. c #7EA8DD", ",. c #BAD0EB", "'. c #BDD1EB", "). c #B5CDEA", "!. c #5C8AC6", "~. c #7AA4D9", "{. c #EEF3F9", "]. c #BED2EB", "^. c #BFD3EB", "/. c #ADC7EA", "(. c #5F8CC6", "_. c #75A1D7", ":. c #EDF2F8", "<. c #EAF0F7", "[. c #E6EDF6", "}. c #E2EAF4", "|. c #DEE7F3", "1. c #DBE4F1", "2. c #5D8AC5", "3. c #729ED6", "4. c #6E99D3", "5. c #6896D1", "6. c #6392CE", "7. c #5E8ECB", "8. c #5B8AC9", "9. c #5687C7", "0. c #5284C3", "a. c #4277BB", " . + @ # $ ", "% & * = - ; > , ", "' ) ! = - ) ) ~ { ] ^ / ( _ : < ", "[ } > | 1 2 3 4 5 5 5 5 5 5 5 6 ", "7 8 9 0 a a b c d e f g h i 5 j ", "k 8 l 0 m m b n b b b b b b 5 o ", "p 8 q r s t b u v v v v v v 5 w ", "x y z 1 A B b C b b D b b b E F ", "G m H ; } r A I J K D K L M N O ", " P Q R S T U b b D b b b V W ", " X Y Z ` .....+.D D L @.#.$.", " %.&.+.b *.b b b =.-.b b #.;.", " >.&.,.*.*.*.*.'.).).).).#.!.", " ~.{.].b ^.b b b /.b b b #.(.", " _.:.<.[.}.|.1.#.#.#.#.#.#.2.", " 3.4.5.6.7.8.9.0.0.0.0.0.0.a."}; spatialite_gui-2.0.0-devel/icons/connect.xpm0000664000175000017500000000512512543275035016037 00000000000000/* XPM */ static const char * connect_xpm[] = { "16 16 117 2", " c None", ". c #7CA1D4", "+ c #709AD0", "@ c #81A7D9", "# c #82A7D8", "$ c #8BACD7", "% c #84A7D3", "& c #5685C1", "* c #98B8E6", "= c #93B4E3", "- c #8EB1DF", "; c #89ABDA", "> c #8CADDA", ", c #98B5DC", "' c #90AFD7", ") c #749BCC", "! c #4478B7", "~ c #9DBAE4", "{ c #ABC4E6", "] c #A4BEE2", "^ c #9CB9DE", "/ c #93B2D9", "( c #7FA3D1", "_ c #85A6D1", ": c #517FBB", "< c #86B3C5", "[ c #A3BEE2", "} c #9AB7DF", "| c #86A8D5", "1 c #7DA1D0", "2 c #739ACB", "3 c #80A2CE", "4 c #628BBF", "5 c #3C68AB", "6 c #9AB8E6", "7 c #92B2BA", "8 c #82C577", "9 c #81B0B5", "0 c #92B0D8", "a c #8FAED7", "b c #6F97C9", "c c #668FC3", "d c #769BC8", "e c #4A71B1", "f c #97B7E5", "g c #9FBBE4", "h c #85A6A0", "i c #7FC176", "j c #5A8FB0", "k c #6F96C7", "l c #7B9ECB", "m c #5985BC", "n c #6C92C3", "o c #3F63A6", "p c #8FB1E0", "q c #A4BFE2", "r c #8EADD8", "s c #7194A8", "t c #4878A4", "u c #5D84BB", "v c #698FC0", "w c #618ABC", "x c #35529C", "y c #89ABDB", "z c #A2BDE1", "A c #87AAD6", "B c #94B3D9", "C c #7A9FCE", "D c #5F8995", "E c #7CBC6D", "F c #466F93", "G c #4F75B0", "H c #4162A4", "I c #2B438F", "J c #7EA3D4", "K c #749ACC", "L c #83A4CF", "M c #769AC8", "N c #648C7D", "O c #7AB86A", "P c #35508C", "Q c #2A418E", "R c #6D98CE", "S c #86A8D3", "T c #8EACD6", "U c #7198C9", "V c #6890C4", "W c #5F8ABF", "X c #678FC2", "Y c #648BBF", "Z c #47687F", "` c #769DCE", " . c #8CACD5", ".. c #769BCB", "+. c #7CA0CC", "@. c #6F95C5", "#. c #486DAC", "$. c #7199CC", "%. c #81A3D0", "&. c #7B9ECA", "*. c #5D85BC", "=. c #4971AF", "-. c #4064A7", ";. c #38579E", ">. c #304A97", ",. c #5988C3", "'. c #7DA2CF", "). c #80A2CD", "!. c #668CC0", "~. c #4972B0", "{. c #385DA5", "]. c #4A7BBA", "^. c #5F89C0", "/. c #6289BF", "(. c #476DAF", "_. c #3D69AB", ":. c #395FA7", " . + ", " @ # $ % & ", " * = - ; > , ' ) ! ", " ~ { ] ^ / ( _ : ", " < [ } | 1 2 3 4 5 ", " 6 7 8 9 0 a b c d e ", " f g g h i j k l m n o ", " p { q r s t u v w x ", " y z A B C D E F G H I ", " J , 1 K L M N O P Q ", " R S T U V W X Y Z ", " ` ...+.d @.v #. ", " $.%.L &.*.=.-.;.>. ", ",.'.).!.~.{. ", "].^./.(. ", " _.:. "}; spatialite_gui-2.0.0-devel/icons/virtshp.xpm0000664000175000017500000000745612543275035016116 00000000000000/* XPM */ static const char * virtshp_xpm[] = { "16 16 190 2", " c None", ". c #6EC461", "+ c #BBE1A5", "@ c #CCEABA", "# c #BEE0C5", "$ c #B4DAC5", "% c #B0D7BD", "& c #ACD7A6", "* c #69BE5D", "= c #66BA5A", "- c #A2D88C", "; c #E8F5CD", "> c #DAEDD4", ", c #D3EDCE", "' c #AFDFCF", ") c #B5DED6", "! c #A2D4D4", "~ c #A1D0CE", "{ c #AAD0C4", "] c #91C987", "^ c #5DAF53", "/ c #A0D787", "( c #DEF2C0", "_ c #D6F2C7", ": c #D5EFD5", "< c #CFE9D0", "[ c #A6DBD5", "} c #ABDEDC", "| c #90CDDB", "1 c #8BC8D7", "2 c #8EC1C9", "3 c #AFD5BD", "4 c #91C77A", "5 c #53A34A", "6 c #E2F3C0", "7 c #B4EFB5", "8 c #ACF0B5", "9 c #B7EDC1", "0 c #B7E3D4", "a c #9CD8D9", "b c #95D3DA", "c c #6DB5CD", "d c #6DB3C7", "e c #84CBB5", "f c #9ADF94", "g c #CDE7AF", "h c #4D9B46", "i c #B5DE98", "j c #CCEBB5", "k c #A7EFB1", "l c #A9EEC9", "m c #C9EAD1", "n c #8DCFD5", "o c #8BCBD9", "p c #66B4CD", "q c #67BCBC", "r c #71D69A", "s c #73DE82", "t c #71DC7A", "u c #A3D091", "v c #A4C888", "w c #438F3D", "x c #D2ECB3", "y c #A2E29B", "z c #8DEA9D", "A c #B7EDD4", "B c #C7EAD0", "C c #6EB9CF", "D c #66B1CC", "E c #75C9CB", "F c #67DB76", "G c #4DD966", "H c #4DD765", "I c #5DD36C", "J c #7EBB73", "K c #C2DBA5", "L c #3E8839", "M c #DCF0BE", "N c #83D881", "O c #6DDB77", "P c #9AE5BF", "Q c #A7DFCC", "R c #5DA8CA", "S c #6CBDC2", "T c #8BDAB8", "U c #60D8A6", "V c #3FD177", "W c #46D06A", "X c #50BC59", "Y c #6CAB63", "Z c #CEE4B2", "` c #398235", " . c #6DC360", ".. c #DDEFBE", "+. c #7DD173", "@. c #6CD190", "#. c #9EE0BC", "$. c #5EA7C7", "%. c #5EB0D3", "&. c #5399C6", "*. c #6EBCC6", "=. c #7AD1AF", "-. c #6DC4B4", ";. c #5FA9AF", ">. c #57A97B", ",. c #67A35A", "'. c #CEE3B1", "). c #357E31", "!. c #6ABF5E", "~. c #CFE9B0", "{. c #90D483", "]. c #8ADCBF", "^. c #7FC5BD", "/. c #5F889F", "(. c #82888B", "_. c #9E9E9E", ":. c #768085", "<. c #4C80AD", "[. c #4782B0", "}. c #768084", "|. c #848783", "1. c #97A688", "2. c #337730", "3. c #AFD792", "4. c #B4DEA0", "5. c #6FC382", "6. c #648976", "7. c #919191", "8. c #E8E8E8", "9. c #DDDDDD", "0. c #C1C1C1", "a. c #7A848A", "b. c #6F7F8A", "c. c #D5D7D8", "d. c #C4C4C4", "e. c #425E41", "f. c #D3EAB5", "g. c #609158", "h. c #737773", "i. c #CED3D3", "j. c #596D78", "k. c #4B4C4D", "l. c #656565", "m. c #929292", "n. c #797979", "o. c #4B4C4B", "p. c #767E6E", "q. c #727372", "r. c #57A84E", "s. c #8DC076", "t. c #6D7E61", "u. c #828482", "v. c #69A5C1", "w. c #414446", "x. c #BDBDBD", "y. c #CECECE", "z. c #C2C2C2", "A. c #ADADAD", "B. c #434542", "C. c #79A566", "D. c #828282", "E. c #617E54", "F. c #6D6F6B", "G. c #5F6D72", "H. c #424344", "I. c #464646", "J. c #515151", "K. c #424342", "L. c #4A5C49", "M. c #676767", "N. c #3D7939", "O. c #4B564A", "P. c #8E918E", "Q. c #A9ACAB", "R. c #AEAEAE", "S. c #979797", "T. c #717171", "U. c #787878", "V. c #A9AAA9", "W. c #8D8D8D", "X. c #4D4D4D", "Y. c #484F48", "Z. c #626562", "`. c #696B69", " + c #6A6B6A", ".+ c #416C3F", "++ c #3E6F3C", "@+ c #6B6B6B", "#+ c #646464", "$+ c #4A4A4A", " . . . . . . ", " . . + @ # $ % & * = ", " . - ; > , ' ) ! ~ { ] ^ ", " . / ( _ : < [ } | 1 2 3 4 5 ", " . 6 7 8 9 0 a b c d e f g h ", ". i j k l m n o p q r s t u v w ", ". x y z A B C D E F G H I J K L ", ". M N O P Q R S T U V W X Y Z ` ", " ...+.@.#.$.%.&.*.=.-.;.>.,.'.).", "!.~.{.].^./.(._.:.<.[.}._.|.1.2.", "= 3.4.5.6.7.8.9.0.a.b.c.9.d.7.e.", " ^ f.g.h.i.j.k.l.m.n.l.o.p.d.q.", " r.s.t.u.i.v.w.x.y.z.A.B.C.d.D.", " h E.F.i.G.H.I.J.J.I.K.L.d.M.", " N.O.P.Q.R.S.T.U.S.R.V.W.X.", " Y.Z.`. +.+++ +@+#+$+ "}; spatialite_gui-2.0.0-devel/icons/sql_go.xpm0000664000175000017500000000533412543275035015674 00000000000000/* XPM */ static const char * sql_go_xpm[] = { "16 16 125 2", " c None", ". c #8DB1DD", "+ c #7BA7DC", "@ c #7AA6DC", "# c #7AA4DA", "$ c #79A2D8", "% c #76A0D5", "& c #759ED4", "* c #739DD2", "= c #729ACF", "- c #7099CE", "; c #6F96CB", "> c #6C94C9", ", c #7A9AC4", "' c #85ACDD", ") c #92B9E8", "! c #6F90C1", "~ c #668BC0", "{ c #7AA4DB", "] c #FFFFFF", "^ c #6387BD", "/ c #79A3D9", "( c #F9FBFC", "_ c #F8FBFC", ": c #F7F9FB", "< c #F4F7FB", "[ c #F2F7FA", "} c #F0F5F9", "| c #EDF3F7", "1 c #EAEFF6", "2 c #E7EBF5", "3 c #E4EAF3", "4 c #DEE7F2", "5 c #6085BA", "6 c #FAFDFD", "7 c #FAFCFC", "8 c #F6FAFB", "9 c #F5F8FB", "0 c #F1F6FB", "a c #EEF4F8", "b c #EBF2F7", "c c #EAF0F7", "d c #E8ECF6", "e c #5E81B7", "f c #FCFDFD", "g c #FBFDFD", "h c #F9FCFC", "i c #F7FBFC", "j c #F5F9FB", "k c #F4F8FB", "l c #F3F7FB", "m c #70A63F", "n c #659F31", "o c #E7EFF1", "p c #5C7EB5", "q c #FCFEFE", "r c #F9FDFD", "s c #F8FCFC", "t c #69A239", "u c #81B35A", "v c #579828", "w c #F9FBF7", "x c #5A7CB2", "y c #739CD1", "z c #6FA53D", "A c #6EA439", "B c #68A235", "C c #629E31", "D c #7CAF55", "E c #AACB91", "F c #74AB4F", "G c #469019", "H c #577BA9", "I c #6F97CC", "J c #FCFFFF", "K c #FDFFFF", "L c #6BA337", "M c #B0CE96", "N c #ADCD94", "O c #A8CB90", "P c #90BC74", "Q c #A1C78A", "R c #68A546", "S c #358708", "T c #6E94CA", "U c #FEFFFF", "V c #FDFEFE", "W c #639F31", "X c #8EBA6F", "Y c #89B86B", "Z c #85B666", "` c #80B361", " . c #82B567", ".. c #98C283", "+. c #5CA03C", "@. c #257F00", "#. c #6C92C8", "$. c #5B9B29", "%. c #A9CA90", "&. c #A5C88D", "*. c #A1C68A", "=. c #9EC588", "-. c #85B66A", ";. c #97C282", ">. c #66A548", ",. c #257C0E", "'. c #5171A9", "). c #688EC3", "!. c #6488BE", "~. c #6185BB", "{. c #5F83B9", "]. c #519722", "^. c #49911C", "/. c #438F16", "(. c #3B8B10", "_. c #5E9F3A", ":. c #96C180", "<. c #62A346", "[. c #247C10", "}. c #447382", "|. c #2B8301", "1. c #5FA143", "2. c #1F7B00", "3. c #217D00", "4. c #1E7B03", " ", " . + @ # $ % & * = - ; > , ", "' ) ) ) ) ) ) ) ) ) ) ) ) ) ! ", "+ + + + + + + + + + + + + + ~ ", "{ ] ] ] ] ] ] ] ] ] ] ] ] ] ^ ", "/ ] ( _ : < [ } | 1 2 3 4 ] 5 ", "$ ] 6 7 ( 8 9 < 0 a b c d ] e ", "% ] f g 6 h i j k l m n o ] p ", "& ] q g f g r s : j t u v w x ", "y ] q q q g z A B C D E F G H ", "I ] J K q q L M N E O P Q R S ", "T ] ] U K V W N X Y Z ` ...+.@.", "#.] ] ] ] ] $.%.&.*.=.-.;.>.,. ", "'.).~ !.~.{.].^./.(._.:.<.[.}. ", " |.1.2. ", " 3.4. "}; spatialite_gui-2.0.0-devel/icons/primary_key.xpm0000664000175000017500000000574012543275035016744 00000000000000/* XPM */ static const char * primary_key_xpm[] = { "16 16 140 2", " c None", ". c #A2C1EF", "+ c #9FC0ED", "@ c #9DBEEB", "# c #9ABCEB", "$ c #96BAE9", "% c #93B7E7", "& c #90B5E6", "* c #8CB2E4", "= c #88AFE2", "- c #84ACE0", "; c #80A9DD", "> c #7DA5DC", ", c #7AA3DA", "' c #A1C1EE", ") c #F4F7FB", "! c #74A0D7", "~ c #9EBFEC", "{ c #A5D59C", "] c #A1D398", "^ c #9DD094", "/ c #98CE90", "( c #93CB8B", "_ c #8EC987", ": c #89C682", "< c #84C37E", "[ c #80C17A", "} c #7CBE76", "| c #6F9BD4", "1 c #9BBDEB", "2 c #FFFFFF", "3 c #6A97D1", "4 c #98BAE9", "5 c #A6C3E9", "6 c #6493CE", "7 c #94B7E7", "8 c #A9C4E8", "9 c #ACC7E8", "0 c #EBF1F7", "a c #5F8FCB", "b c #8FB4E5", "c c #F2F6FA", "d c #AAC6E9", "e c #ACC6E9", "f c #ACC7EA", "g c #ADC7E9", "h c #AEC9E9", "i c #B0C9E9", "j c #B0C8E7", "k c #C9B186", "l c #E0B769", "m c #8B8F8B", "n c #8CB1E3", "o c #F1F6FA", "p c #AEC9EA", "q c #B0C9EA", "r c #EECFA1", "s c #ECC96F", "t c #FBF3C9", "u c #DDB65F", "v c #87AEE1", "w c #F0F4FA", "x c #B2CBEA", "y c #B3CCEA", "z c #B7CEEA", "A c #BEB39E", "B c #EAC15E", "C c #FBF0A3", "D c #F0D480", "E c #ECC77E", "F c #DDA350", "G c #82AADF", "H c #EFF3F9", "I c #BBD0EB", "J c #BACFEA", "K c #E4BC77", "L c #F9EEA9", "M c #F8E67E", "N c #F8E89A", "O c #F0D17E", "P c #F6E280", "Q c #D9983F", "R c #7EA8DD", "S c #BAD0EB", "T c #BDD1EB", "U c #B5CDEA", "V c #C8B28A", "W c #F4DD89", "X c #F6E06A", "Y c #F7E273", "Z c #F6DF5F", "` c #F6DA55", " . c #CD7F38", ".. c #7AA4D9", "+. c #EEF3F9", "@. c #BED2EB", "#. c #BFD3EB", "$. c #F7E9D4", "%. c #D6B068", "&. c #E8C167", "*. c #F2D95E", "=. c #F6DB4E", "-. c #F7DD5B", ";. c #F5D855", ">. c #CD802E", ",. c #75A1D7", "'. c #EDF2F8", "). c #EAF0F7", "!. c #E6EDF6", "~. c #E2EAF4", "{. c #DEE7F3", "]. c #DBC9AB", "^. c #DCAB5D", "/. c #F6E299", "(. c #F5DC53", "_. c #F6D946", ":. c #CD943F", "<. c #D08C46", "[. c #C78543", "}. c #729ED6", "|. c #6E99D3", "1. c #6896D1", "2. c #6392CE", "3. c #5E8ECB", "4. c #5B8AC9", "5. c #C7A460", "6. c #F8E6A1", "7. c #F2D238", "8. c #F6D647", "9. c #C89340", "0. c #6D7486", "a. c #5782BA", "b. c #4B75B0", "c. c #E3AE48", "d. c #F9E986", "e. c #F5D94D", "f. c #CC923A", "g. c #C98D34", "h. c #D59F45", "i. c #CB8D3A", " . + @ # $ % & * = - ; > , ", "' ) ) ) ) ) ) ) ) ) ) ) ) ! ", "~ ) { ] ^ / ( _ : < [ } ) | ", "1 ) 2 2 2 2 2 2 2 2 2 2 ) 3 ", "4 ) 5 5 5 5 5 5 5 5 5 5 ) 6 ", "7 ) 5 2 8 2 2 2 9 2 2 2 0 a ", "b c d e f g h i 9 i j k l m ", "n o p 2 q 2 2 2 9 2 r s t u ", "v w x y y y y z 9 A B C D E F ", "G H z 2 I 2 2 2 J K L M N O P Q ", "R H S I I I I T U V W X Y Z ` .", "..+.@.2 #.2 2 $.%.&.*.=.-.;.>. ", ",.'.).!.~.{.].^./.(._.:.<.[. ", "}.|.1.2.3.4.5.6.7.8.9.0.a.b. ", " c.d.e.f. ", " g.h.i. "}; spatialite_gui-2.0.0-devel/icons/statistics.xpm0000664000175000017500000000642112543275035016600 00000000000000/* XPM */ static const char * statistics_xpm[] = { "16 16 158 2", " c None", ". c #77A6EA", "+ c #74A4E8", "@ c #6EA0E8", "# c #6B9DE6", "$ c #6599E4", "% c #5E95E2", "& c #70A0E8", "* c #ACC8F2", "= c #A8C6F0", "- c #A6C5F0", "; c #A2C2EF", "> c #538EE1", ", c #679BE6", "' c #91B6EC", ") c #8CB3EB", "! c #9BBCEE", "~ c #4785DF", "{ c #5C92E2", "] c #A0C1EE", "^ c #89B1EA", "/ c #85AEE9", "( c #94B7ED", "_ c #3A7CDB", ": c #FE7874", "< c #FE7672", "[ c #FD716E", "} c #FC6C6A", "| c #528DE1", "1 c #99BBED", "2 c #81ACE9", "3 c #7CA8E7", "4 c #8DB3EA", "5 c #2C74D8", "6 c #FEBBB8", "7 c #FEB9B6", "8 c #FEB6B3", "9 c #FEB3B0", "0 c #4584DF", "a c #92B7EC", "b c #78A5E6", "c c #73A2E6", "d c #85ADE9", "e c #1E6BD6", "f c #FD7370", "g c #FEB7B4", "h c #FE8581", "i c #FE817C", "j c #FEAFAC", "k c #397BD9", "l c #8AB2EA", "m c #6E9FE4", "n c #6A9CE3", "o c #7DA8E7", "p c #1A62D1", "q c #FE7E79", "r c #FE7975", "s c #FEAAA8", "t c #2A74D8", "u c #83ADE8", "v c #6598E2", "w c #6095E1", "x c #76A3E5", "y c #1857CF", "z c #6CBC60", "A c #67B65C", "B c #61B057", "C c #5CA852", "D c #55A14D", "E c #FA6463", "F c #FE716D", "G c #FEA4A2", "H c #1E69D6", "I c #7BA7E7", "J c #5C92E0", "K c #568FDF", "L c #6E9EE4", "M c #164ECD", "N c #B5D9BA", "O c #B1D6B7", "P c #AED3B3", "Q c #A9D1AE", "R c #4D9645", "S c #F85B5B", "T c #FE6F6B", "U c #FE6965", "V c #FEA09E", "W c #1A60D1", "X c #74A2E5", "Y c #538CDE", "Z c #4D89DD", "` c #6699E2", " . c #1545C9", ".. c #B0D5B5", "+. c #83BD8A", "@. c #7DB883", "#. c #A3CDA7", "$. c #448B3D", "%. c #F65153", "&. c #FE6662", "*. c #FE615D", "=. c #FE9B99", "-. c #1855CF", ";. c #6C9CE3", ">. c #4A86DC", ",. c #4483DB", "'. c #5E94E0", "). c #133CC6", "!. c #ABD1AF", "~. c #7AB780", "{. c #73B279", "]. c #9CC8A0", "^. c #3C8035", "/. c #F5474A", "(. c #FE5E5B", "_. c #FE5956", ":. c #FE9795", "<. c #164CCD", "[. c #6397E1", "}. c #4180DA", "|. c #3B7DD9", "1. c #588FDF", "2. c #1235C6", "3. c #A4CDA8", "4. c #71B077", "5. c #6AAB70", "6. c #96C49A", "7. c #33762E", "8. c #F33D41", "9. c #FE9896", "0. c #FE9593", "a. c #FE9391", "b. c #1543C9", "c. c #5D93E0", "d. c #598FDF", "e. c #558DDF", "f. c #518ADE", "g. c #112EC0", "h. c #9EC9A2", "i. c #99C69D", "j. c #95C398", "k. c #91C094", "l. c #2C6D27", "m. c #804487", "n. c #7E3F83", "o. c #7D387F", "p. c #7C337C", "q. c #7B2E79", "r. c #133AC6", "s. c #1237C6", "t. c #1231C4", "u. c #102AC0", "v. c #0F27BF", "w. c #254F7C", "x. c #214A7A", "y. c #1E4677", "z. c #1B4275", "A. c #193F73", " ", " . + @ # $ % ", " & * = - ; > ", " , - ' ) ! ~ ", " { ] ^ / ( _ ", ": : < [ } | 1 2 3 4 5 ", ": 6 7 8 9 0 a b c d e ", "f g h i j k l m n o p ", "} 9 q r s t u v w x y z A B C D ", "E j < F G H I J K L M N O P Q R ", "S s T U V W X Y Z ` ...+.@.#.$.", "%.G &.*.=.-.;.>.,.'.).!.~.{.].^.", "/.V (._.:.<.[.}.|.1.2.3.4.5.6.7.", "8.=.9.0.a.b.c.d.e.f.g.h.i.j.k.l.", "m.n.o.p.q.r.s.t.g.u.v.w.x.y.z.A.", " "}; spatialite_gui-2.0.0-devel/icons/sql_abort_no.xpm0000664000175000017500000000310412543275035017063 00000000000000/* XPM */ static const char * sql_abort_no_xpm[] = { "16 16 75 1", " g None", ". g #363636", "+ g #585858", "@ g #888888", "# g #878787", "$ g #868686", "% g #858585", "& g #838383", "* g #818181", "= g #545454", "- g #353535", "; g #898989", "> g #6E6E6E", ", g #5F5F5F", "' g #5D5D5D", ") g #5C5C5C", "! g #595959", "~ g #656565", "{ g #7E7E7E", "] g #525252", "^ g #D9D9D9", "/ g #777777", "( g #5B5B5B", "_ g #717171", ": g #D7D7D7", "< g #797979", "[ g #505050", "} g #343434", "| g #F6F6F6", "1 g #F1F1F1", "2 g #707070", "3 g #F0F0F0", "4 g #F5F5F5", "5 g #D5D5D5", "6 g #5A5A5A", "7 g #747474", "8 g #5E5E5E", "9 g #757575", "0 g #666666", "a g #474747", "b g #333333", "c g #848484", "d g #464646", "e g #434343", "f g #6F6F6F", "g g #828282", "h g #565656", "i g #636363", "j g #404040", "k g #6C6C6C", "l g #808080", "m g #555555", "n g #6D6D6D", "o g #F4F4F4", "p g #EEEEEE", "q g #3D3D3D", "r g #6A6A6A", "s g #606060", "t g #D6D6D6", "u g #EFEFEF", "v g #626262", "w g #D1D1D1", "x g #4B4B4B", "y g #686868", "z g #7A7A7A", "A g #D4D4D4", "B g #414141", "C g #696969", "D g #484848", "E g #323232", "F g #3E3E3E", "G g #3B3B3B", "H g #494949", "I g #4D4D4D", "J g #676767", " ", " ........ ", " .+@#$%&*=- ", " .+;>,')!~{]- ", " .+;{^/(+_:_<[} ", " .#>^|1_234567} ", " .$891|11430a_b ", " .c)!_1443~defb ", " .g+h>1443iejkb ", " .lmn3433op'qrb ", " -{st4uivpowxyb ", " -]znAieB'w8CDE ", " -[9mejFGHyDE ", " }I2nkryJDE ", " bbbbbbEE ", " "}; spatialite_gui-2.0.0-devel/icons/geoview.xpm0000664000175000017500000000631212543275035016052 00000000000000/* XPM */ static const char * geoview_xpm[] = { "16 16 154 2", " c None", ". c #B9B9B9", "+ c #B7B7B7", "@ c #B5B5B5", "# c #B2B2B2", "$ c #B0B0B0", "% c #BABABA", "& c #D6D6D6", "* c #EDEDED", "= c #F9F9F9", "- c #FBFBFB", "; c #F0F0F0", "> c #D9D9D9", ", c #ABABAB", "' c #B8B8B8", ") c #F6F6F6", "! c #F4F4F4", "~ c #A8A8A8", "{ c #93B7E7", "] c #90B5E6", "^ c #8CB2E4", "/ c #88AFE2", "( c #84ACE0", "_ c #80A9DD", ": c #7DA5DC", "< c #7AA3DA", "[ c #B6B6B6", "} c #F2F2F2", "| c #E4E4E4", "1 c #E2E2E2", "2 c #C8C8C8", "3 c #F1F1F1", "4 c #A5A5A5", "5 c #F4F7FB", "6 c #74A0D7", "7 c #B4B4B4", "8 c #F8F8F8", "9 c #DBDBDB", "0 c #EFEFEF", "a c #D0D0D0", "b c #FFFFFF", "c c #A2A2A2", "d c #93CB8B", "e c #8EC987", "f c #89C682", "g c #84C37E", "h c #80C17A", "i c #7CBE76", "j c #6F9BD4", "k c #B1B1B1", "l c #D5D5D5", "m c #CBCBCB", "n c #ACBECB", "o c #99CBA6", "p c #73B76F", "q c #5C95D5", "r c #82AEE1", "s c #EEF5F8", "t c #6A97D1", "u c #AEAEAE", "v c #D1D1D1", "w c #ECECEC", "x c #C5C5C5", "y c #C6C6C6", "z c #CAE6CB", "A c #57AA56", "B c #D0E9BC", "C c #C8DFF1", "D c #88B6D7", "E c #408D8C", "F c #D5E3F4", "G c #6493CE", "H c #ACACAC", "I c #FAFAFA", "J c #D7D7D7", "K c #CACACA", "L c #CEDBE8", "M c #3E8C8A", "N c #E7F8C8", "O c #8ACA77", "P c #3A9AEA", "Q c #67B58D", "R c #4EA544", "S c #F7F9FB", "T c #5F8FCB", "U c #A9A9A9", "V c #EAEAEA", "W c #97BCE7", "X c #ADD6F9", "Y c #A3D88A", "Z c #4AA8B7", "` c #4BA7CE", " . c #78C94E", ".. c #4AA241", "+. c #B2C8E5", "@. c #9CA4AF", "#. c #AAABAB", "$. c #9CA0A4", "%. c #4882C4", "&. c #6EB0CC", "*. c #56AB55", "=. c #44A03A", "-. c #C3D4EA", ";. c #8AACD8", ">. c #DBDEE3", ",. c #A9BBD2", "'. c #4283CB", "). c #DBE8ED", "!. c #C2D4EA", "~. c #82AADF", "{. c #EFF3F9", "]. c #B7CEEA", "^. c #9BCD9A", "/. c #2571C6", "(. c #55A74F", "_. c #90B0D9", ":. c #7EA8DD", "<. c #BAD0EB", "[. c #E5EDF7", "}. c #4DA348", "|. c #2E9628", "1. c #9BCAFA", "2. c #3078C8", "3. c #E7EDF6", "4. c #5C8AC6", "5. c #7AA4D9", "6. c #EEF3F9", "7. c #BED2EB", "8. c #DCE7F4", "9. c #56A94D", "0. c #5491DB", "a. c #3E81CC", "b. c #D8E2F0", "c. c #5F8CC6", "d. c #75A1D7", "e. c #EDF2F8", "f. c #EAF0F7", "g. c #E6EDF6", "h. c #E2EAF4", "i. c #54A74E", "j. c #4A88CE", "k. c #E7EDF5", "l. c #5D8AC5", "m. c #729ED6", "n. c #6E99D3", "o. c #6896D1", "p. c #6392CE", "q. c #5E8ECB", "r. c #5B8AC9", "s. c #95B4DC", "t. c #AEC5E3", "u. c #89ABD6", "v. c #5284C3", "w. c #4277BB", " . + @ # $ ", "% & * = - ; > , ", "' ) ! = - ) ) ~ { ] ^ / ( _ : < ", "[ } > | 1 2 3 4 5 5 5 5 5 5 5 6 ", "7 8 9 0 a a b c d e f g h i 5 j ", "k 8 l 0 m m b n o p q r s b 5 t ", "u 8 v w x y z A B b C D E F 5 G ", "H I J 1 K L M b N O P Q B R S T ", "U m V ; } W X N Y Z ` .O O ..+.", " @.#.$.%.X D &.P ` .*.Y =.-.", " ;.>.,.'.).&.P P ` *.=.Y =.!.", " ~.{.].^.Y O Q Z P /.M Q (._.", " :.{.<.[.}.N .|././.1.2.3.4.", " 5.6.7.b 8.9.O O &.0.a.b b.c.", " d.e.f.g.h.e.i././.j.k.b.b.l.", " m.n.o.p.q.r.s.t.t.u.v.v.v.w."}; spatialite_gui-2.0.0-devel/icons/memdb_new.xpm0000664000175000017500000000565312543275035016351 00000000000000/* XPM */ static const char * memdb_new_xpm[] = { "16 16 137 2", " c None", ". c #BABABA", "+ c #B8B8B8", "@ c #B7B7B7", "# c #B6B6B6", "$ c #B4B4B4", "% c #B3B3B3", "& c #BBBBBB", "* c #D0D0D0", "= c #E8E8E8", "- c #F3F3F3", "; c #FDFDFD", "> c #FCFCFC", ", c #EDEDED", "' c #E0E0E0", ") c #C2C2C2", "! c #ADADAD", "~ c #E1E1E1", "{ c #FEFEFE", "] c #FFFFFF", "^ c #FBFBFB", "/ c #CFCFCF", "( c #A9A9A9", "_ c #EAC93D", ": c #E2C54C", "< c #EACC55", "[ c #EACA55", "} c #E9C753", "| c #E7C34E", "1 c #E8C559", "2 c #FCF7E8", "3 c #EAEAEA", "4 c #A7A7A7", "5 c #F3DC73", "6 c #F6E289", "7 c #F4DE84", "8 c #F3D981", "9 c #F1D378", "0 c #E8C14F", "a c #F0DFAF", "b c #F8F7F6", "c c #E7E7E7", "d c #D8D8D8", "e c #C7C7C7", "f c #E6E6E6", "g c #A5A5A5", "h c #E8C63B", "i c #F8E793", "j c #F4D85F", "k c #F6E090", "l c #F2D57C", "m c #E9C352", "n c #CFBD89", "o c #CCCCCC", "p c #C9C9C9", "q c #B5B5B5", "r c #C1C1C1", "s c #E5E5E5", "t c #A3A3A3", "u c #E8C63A", "v c #F1D86A", "w c #F8E796", "x c #F2CF47", "y c #F4DC89", "z c #E2B837", "A c #E3D098", "B c #E2E2E2", "C c #CDCDCD", "D c #E3E3E3", "E c #A0A0A0", "F c #E7C338", "G c #F8E68F", "H c #F7E38D", "I c #F2D260", "J c #F4D784", "K c #E1B63A", "L c #E0C47B", "M c #DDC27D", "N c #DFC179", "O c #DCC183", "P c #CBC4B6", "Q c #BDBDBD", "R c #BFBFBF", "S c #9E9E9E", "T c #E7C238", "U c #F0D76D", "V c #EFD267", "W c #EDCF66", "X c #F3D984", "Y c #F4D788", "Z c #F1CF7D", "` c #E8BD58", " . c #E6B852", ".. c #DAA425", "+. c #D9C393", "@. c #C5C2BD", "#. c #9B9B9B", "$. c #E4BC34", "%. c #E3B831", "&. c #E1B52F", "*. c #DCB137", "=. c #F0D07D", "-. c #EDC76D", ";. c #E3B345", ">. c #D8B567", ",. c #DBD3C3", "'. c #C0C0C0", "). c #969696", "!. c #DCAD2F", "~. c #E7BC52", "{. c #DBAC39", "]. c #D6C192", "^. c #D2D2D2", "/. c #DBDBDB", "(. c #D6D6D6", "_. c #B0B0B0", ":. c #DEDEDE", "<. c #909090", "[. c #DEAD2A", "}. c #E4B644", "|. c #DCB863", "1. c #F1EEE6", "2. c #C4C4C4", "3. c #8B8B8B", "4. c #DCA927", "5. c #C7A657", "6. c #CECECE", "7. c #F4F4F4", "8. c #F5F5F5", "9. c #EFEFEF", "0. c #8A8A8A", "a. c #A1A1A1", "b. c #9F9F9F", "c. c #ABABAB", "d. c #959595", "e. c #8D8D8D", "f. c #898989", " ", " . + @ # $ % ", " & * = - ; > , ' ) ! ", " . ~ { ] ] ] ] ] ] ^ / ( ", " _ : < [ } | 1 2 ] ] ^ 3 4 ", " _ 5 6 7 8 9 0 a b c d e f g ", " h i j k l m n o p q @ r s t ", " u v w x y z A B f ~ C ) ) D E ", " F G H I J K L M N O P Q R B S ", "T U V W X Y Z ` ...+.@.+ & ~ #.", " $.%.&.*.=.-.;.>.,.d '.% @ ' ).", " !.~.{.].^./.(.R _.% :.<.", " [.}.|.1./.^./.(.'.p f 2.3.", " 4.5.g 6., 7.8.7.9.B . 0. ", " a.b.a.c.4 d.e.f. ", " "}; spatialite_gui-2.0.0-devel/icons/memdb_clock.xpm0000664000175000017500000000642212543275035016646 00000000000000/* XPM */ static const char * memdb_clock_xpm[] = { "16 16 158 2", " c None", ". c #C6AB7E", "+ c #CDB378", "@ c #D0B87B", "# c #CDB47A", "$ c #C4A971", "% c #B99D71", "& c #C2AA86", "* c #D2BA78", "= c #E3D9C8", "- c #EAE7DD", "; c #F1F1EE", "> c #F0F0EC", ", c #E4E0D2", "' c #D2C4A8", ") c #B89C67", "! c #C0A885", "~ c #DCCC97", "{ c #EEEBE1", "] c #D9E1EE", "^ c #ACBEDF", "/ c #96ADD5", "( c #92AAD4", "_ c #A3B7DC", ": c #CEDAE8", "< c #DFD9C6", "[ c #B69B68", "} c #CCB374", "| c #ECE9DF", "1 c #C2CFE6", "2 c #AEBFDF", "3 c #DCE3F1", "4 c #ECF1F3", "5 c #EBF1F4", "6 c #D9E2F1", "7 c #A3BADC", "8 c #AFC1DE", "9 c #D8CFB7", "0 c #A48358", "a c #BCA177", "b c #DBCFB7", "c c #D7E0ED", "d c #AABDDE", "e c #FFFFFF", "f c #EEF0F0", "g c #DAE5E7", "h c #F7FFFF", "i c #F3FEFF", "j c #98B4DC", "k c #C4D1E1", "l c #BBA473", "m c #987C59", "n c #BEA26D", "o c #E6E1D3", "p c #A4B9DB", "q c #D6E3F1", "r c #F5FBFE", "s c #F3F5F5", "t c #959E9F", "u c #E9F0F0", "v c #F2F8F8", "w c #ADB9BE", "x c #C2DAF0", "y c #8BA7D1", "z c #D3CAA9", "A c #9B7B53", "B c #BDA16C", "C c #EEECE4", "D c #8AA5D1", "E c #E9F6FA", "F c #EEF8FD", "G c #F9FFFF", "H c #798081", "I c #A4AEB1", "J c #777F81", "K c #BAC6C9", "L c #D3F0FA", "M c #7295C9", "N c #E2DFC9", "O c #9E7B54", "P c #B89A67", "Q c #ECEADD", "R c #819FCF", "S c #E2F3FA", "T c #E9F6FD", "U c #E3F0F2", "V c #848C8D", "W c #C2CFD2", "X c #EBFBFF", "Y c #CCECFA", "Z c #6D90C7", "` c #E1DDC1", " . c #9D7953", ".. c #AD8E5E", "+. c #DDD3B7", "@. c #90AAD1", "#. c #C1DBF0", "$. c #E6F7FF", "%. c #E3F2FA", "&. c #B6C0C5", "*. c #DEEDF1", "=. c #E8FCFF", "-. c #A9C6AE", ";. c #719760", ">. c #668E4F", ",. c #5F8744", "'. c #6E773E", "). c #A0855E", "!. c #C0A978", "~. c #C6D1DA", "{. c #88AAD9", "]. c #EBFEFF", "^. c #EEFAFF", "/. c #F2FDFF", "(. c #F2FEFF", "_. c #ABC5A8", ":. c #81AB61", "<. c #B4D495", "[. c #D0E6BA", "}. c #8FBB6A", "|. c #578F2D", "1. c #376B19", "2. c #A28257", "3. c #D8CCA2", "4. c #A5B7CD", "5. c #89AAD8", "6. c #CFDFEF", "7. c #F3F6FA", "8. c #F3F5FA", "9. c #618A49", "0. c #B1D390", "a. c #B1D692", "b. c #8CBC65", "c. c #8FBC67", "d. c #A68855", "e. c #D6C896", "f. c #BFCACC", "g. c #869FC8", "h. c #7692C5", "i. c #7390C4", "j. c #4C7B31", "k. c #B6D49C", "l. c #B2D295", "m. c #9A7850", "n. c #B1975A", "o. c #CEBD85", "p. c #DED6A4", "q. c #DED5A0", "r. c #3E6E1E", "s. c #8BBA62", "t. c #87BA60", "u. c #87B960", "v. c #917553", "w. c #93724E", "x. c #97744D", "y. c #606E31", "z. c #538C28", "A. c #8DBA64", " ", " . + @ # $ % ", " & * = - ; > , ' ) ", " ! ~ { ] ^ / ( _ : < [ ", " } | 1 2 3 4 5 6 7 8 9 0 ", " a b c d e f g h h i j k l m ", " n o p q r s t u v w x y z A ", " B C D E F G H I J K L M N O ", " P Q R S T U V J W X Y Z ` . ", " ..+.@.#.$.%.&.*.=.-.;.>.,.'. ", " ).!.~.{.].^./.(._.:.<.[.}.|.1.", " 2.3.4.5.6.7.8.9.0.a.e b.c.1.", " d.e.f.g.h.i.j.k.e e e l.1.", " m.n.o.p.q.r.s.t.e u.c.1.", " v.w.x.x.y.z.A.l.A.z.1.", " 1.1.1.1.1. "}; spatialite_gui-2.0.0-devel/icons/virtxl.xpm0000664000175000017500000000726612543275035015746 00000000000000/* XPM */ static const char * virtxl_xpm[] = { "16 16 183 2", " c None", ". c #4D8BC8", "+ c #4F8CC8", "@ c #4F8DC8", "# c #4F8CC9", "$ c #4F8BC7", "% c #4B89C5", "& c #3B76C4", "* c #4985C4", "= c #ECF2F7", "- c #EEF4F8", "; c #EDF4F8", "> c #EDF3F8", ", c #ECF2F8", "' c #D7E6F2", ") c #7DB2E2", "! c #6594DB", "~ c #4B88C5", "{ c #F2F6FA", "] c #C7E0FA", "^ c #C9E1FB", "/ c #C9E2FB", "( c #C8E0FB", "_ c #C5DFF9", ": c #C1DBF8", "< c #B8D6F4", "[ c #F8FBFF", "} c #B4D8F6", "| c #7DB0E1", "1 c #6492DB", "2 c #4C89C6", "3 c #F1F5F9", "4 c #CDE3FC", "5 c #CEE3FB", "6 c #CDE3FB", "7 c #CBE2FB", "8 c #C8E0F9", "9 c #C2DCF8", "0 c #BAD6F5", "a c #F8FBFD", "b c #CDE6FC", "c c #C9E5FA", "d c #84B6E2", "e c #4279BF", "f c #588D43", "g c #568C55", "h c #669653", "i c #639554", "j c #95B9A1", "k c #83AE8D", "l c #427F2E", "m c #417F2E", "n c #48843A", "o c #458236", "p c #90B490", "q c #F3F7FB", "r c #E9EFF5", "s c #457EC2", "t c #BED3B5", "u c #B5DA9C", "v c #95C874", "w c #5F934A", "x c #74A45D", "y c #6EA159", "z c #649750", "A c #629762", "B c #B4D1E9", "C c #B5D4F3", "D c #B3D2F1", "E c #F0F4F8", "F c #4682C4", "G c #538B6F", "H c #C8D9C0", "I c #A3D382", "J c #8AC16D", "K c #60964B", "L c #649751", "M c #689A67", "N c #C3DCF4", "O c #BDDAF6", "P c #BBD8F6", "Q c #EFF4FA", "R c #4683C6", "S c #4988C2", "T c #719E61", "U c #CCDCC5", "V c #97C976", "W c #87BC73", "X c #609355", "Y c #CCE0F5", "Z c #CCE1FB", "` c #C3DDF9", " . c #EDF4FA", ".. c #4582C6", "+. c #3F7E7F", "@. c #D6E7FE", "#. c #CFE0F5", "$. c #A4AEBA", "%. c #8A8C8D", "&. c #9E9E9E", "*. c #86888B", "=. c #BBCADD", "-. c #C4D7EE", ";. c #87898D", ">. c #8C8D8D", ",. c #55759C", "'. c #4280C6", "). c #33751B", "!. c #D1E1F9", "~. c #8A929D", "{. c #919191", "]. c #E8E8E8", "^. c #DDDDDD", "/. c #C1C1C1", "(. c #8B8E91", "_. c #8E949A", ":. c #D9D9DA", "<. c #C4C4C4", "[. c #3F7CC5", "}. c #33751A", "|. c #4A8CBB", "1. c #71777B", "2. c #CED3D3", "3. c #577286", "4. c #4B4C4D", "5. c #656565", "6. c #929292", "7. c #797979", "8. c #858687", "9. c #3B76C1", "0. c #407CC4", "a. c #4E748F", "b. c #838586", "c. c #98D1F8", "d. c #434648", "e. c #BDBDBD", "f. c #CECECE", "g. c #C2C2C2", "h. c #ADADAD", "i. c #414548", "j. c #EEF0F4", "k. c #366FBF", "l. c #3C78C1", "m. c #5083A7", "n. c #676C70", "o. c #577081", "p. c #424345", "q. c #464646", "r. c #515151", "s. c #7F8080", "t. c #3167BB", "u. c #3871BF", "v. c #C2CDD6", "w. c #646668", "x. c #929394", "y. c #AEAFAF", "z. c #AEAEAE", "A. c #979797", "B. c #717171", "C. c #787878", "D. c #B0B0B0", "E. c #898C90", "F. c #2D64B9", "G. c #3369BC", "H. c #3D6EBD", "I. c #3762A4", "J. c #474D58", "K. c #626468", "L. c #696B6D", "M. c #6A6B6D", "N. c #406296", "O. c #3D64A0", "P. c #686B6F", "Q. c #636568", "R. c #56585D", "S. c #2A60B7", "T. c #3065BA", "U. c #3166BB", "V. c #3066BA", "W. c #2F65BA", "X. c #2E65B9", "Y. c #2E64B9", "Z. c #2C62B7", " . + + + + @ # $ % & ", " * = - ; > > > , = ' ) ! ", " ~ { ] ^ / ( _ : < [ } | 1 ", " 2 3 4 5 6 7 8 9 0 a b c d e ", "f g h i j k l m n o p = q r s ", "f t u v i w x y z A B C D E F ", " G H I J i K L M N 9 O P Q R ", " S T U V W f X Y Z ] ` 9 ... ", " +.@.#.$.%.&.*.=.-.;.&.>.,.'. ", " ).!.~.{.].^./.(._.:.^.<.{.[. ", "}.}.|.1.2.3.4.5.6.7.5.4.8.<.9. ", " 0.a.b.2.c.d.e.f.g.h.i.j.<.k. ", " l.m.n.2.o.p.q.r.r.q.p.s.<.t. ", " u.v.w.x.y.z.A.B.C.A.z.D.E.F. ", " G.H.I.J.K.L.M.N.O.P.L.Q.R.S. ", " T.U.V.V.V.T.W.X.X.Y.Y.Z. "}; spatialite_gui-2.0.0-devel/icons/dxf.xpm0000664000175000017500000000261312543275035015166 00000000000000/* XPM */ static const char * dxf_xpm[] = { "16 16 64 1", " c None", ". c #717171", "+ c #828282", "@ c #9F9F9F", "# c #9D9D9D", "$ c #7E7E7E", "% c #818181", "& c #6B99D2", "* c #85B2E7", "= c #95BBEB", "- c #8CB6E9", "; c #6A9FE2", "> c #9E9E9E", ", c #878787", "' c #727376", ") c #88B0E1", "! c #679EE2", "~ c #619AE0", "{ c #5996E0", "] c #5A96E0", "^ c #94B8E3", "/ c #74A6E3", "( c #80AEE6", "_ c #80AEE7", ": c #6E9458", "< c #668E4F", "[ c #598440", "} c #48783A", "| c #81AEE6", "1 c #88B3E7", "2 c #688F51", "3 c #81AB61", "4 c #B4D495", "5 c #D0E6BA", "6 c #8FBB6A", "7 c #578F2D", "8 c #376B1A", "9 c #72A5E3", "0 c #90B8E8", "a c #5D8744", "b c #B1D390", "c c #B1D692", "d c #FFFFFF", "e c #8CBC65", "f c #8FBC67", "g c #376B19", "h c #5F99E0", "i c #92B9EA", "j c #4C7B31", "k c #B6D49C", "l c #B2D295", "m c #4B84D9", "n c #91B8E9", "o c #518DDA", "p c #396C1B", "q c #8BBA62", "r c #87BA60", "s c #87B960", "t c #87B2E7", "u c #6EA3E2", "v c #538C28", "w c #8DBA64", "x c #79AAE5", "y c #78AAE3", " . ", " . . ", " +. ", " @ ", " #@ ", " $%&*=-; ", " >,')!~{~] ", " @ ^ ", " .+ /( ", ". . (_ :<[} ", " . |1 2345678", " 90 abcdefg", " hi jkdddlg", " mno pqrdsfg", " tu gvwlwvg", " xy ggggg "}; spatialite_gui-2.0.0-devel/icons/wfs.xpm0000664000175000017500000000427012543275035015205 00000000000000/* XPM */ static const char * wfs_xpm[] = { "16 16 93 2", " c None", ". c #A5C4EC", "+ c #A2C3EC", "@ c #9FBFEB", "# c #9ABEEB", "$ c #97BBE9", "% c #91B6E8", "& c #B1CDEF", "* c #B8D0F1", "= c #BBD3F1", "- c #B9D0F0", "; c #AECBED", "> c #A0C0EB", ", c #83AEE5", "' c #A4C4EC", ") c #AECAEE", "! c #B4CDF0", "~ c #A2C2EB", "{ c #95BAE8", "] c #8BB3E6", "^ c #86AFE5", "/ c #8BB3E7", "( c #99BBEA", "_ c #88B1E6", ": c #6D9FE0", "< c #AEC9EE", "[ c #ADCAEF", "} c #70A1E0", "| c #86B0E5", "1 c #7AA8E2", "2 c #5C96DD", "3 c #9CBEEB", "4 c #B0CCEE", "5 c #94B8E8", "6 c #7EAAE5", "7 c #78A7E3", "8 c #72A2E2", "9 c #5F97DD", "0 c #80ACE5", "a c #538FDB", "b c #99BCE9", "c c #A9C7EC", "d c #9BBDEA", "e c #80ABE5", "f c #8FB5E8", "g c #7FABE4", "h c #7AA7E3", "i c #80ACE4", "j c #6397DD", "k c #6EA0E0", "l c #4786D8", "m c #AECBEE", "n c #89B1E5", "o c #7BA8E3", "p c #8EB5E7", "q c #76A5E2", "r c #538EDA", "s c #4889D9", "t c #7AA7E2", "u c #3F82D5", "v c #89B2E6", "w c #ADCAEE", "x c #77A7E3", "y c #5D95DD", "z c #4A89D8", "A c #4082D5", "B c #7DAAE3", "C c #397DD5", "D c #A7C5ED", "E c #75A4E2", "F c #689DDF", "G c #BFBFBF", "H c #B6B6B6", "I c #4384D7", "J c #3C7FD5", "K c #387BD5", "L c #75A5E2", "M c #84AEE4", "N c #6A9DDE", "O c #D8D9DA", "P c #D8D9DB", "Q c #A3A3A3", "R c #4986D9", "S c #ADADAD", "T c #9A9A9A", "U c #E3E4E7", "V c #E1E2E5", "W c #909090", "X c #868686", "Y c #7D7D7D", "Z c #747474", "` c #6C6C6C", " . c #656565", " . + @ # $ % ", " + & * = - ; > , ", " ' ) ! ~ { % ] ^ / ( _ : ", " + < [ $ } | 1 2 ", " 3 4 5 , 6 7 8 9 0 a ", "b c d e f g h i j 9 k l ", "% m n o p } 2 q r s t u ", "v w 6 8 x y z A B C ", "e D E F j G H l I J h K ", "L M N G O P Q K R K ", " H S Q T ", " H S U V W X ", " S Q T W X Y ", " S Q T Y Z ` ", " Q ` . ", " Q "}; spatialite_gui-2.0.0-devel/icons/rs_previous.xpm0000664000175000017500000000236312543275035016767 00000000000000/* XPM */ static const char * rs_previous_xpm[] = { "16 16 54 1", " c None", ". c #6B9BE1", "+ c #6599E1", "@ c #6599DF", "# c #6297E1", "$ c #5990DD", "% c #6095DD", "& c #7AA6E5", "* c #9ABDEA", "= c #4A87D9", "- c #5A90DB", "; c #75A4E3", "> c #99BBE9", ", c #95B9E8", "' c #3A7CD4", ") c #538DD9", "! c #71A0E0", "~ c #86AFE5", "{ c #8DB2E6", "] c #2A72CF", "^ c #5089D9", "/ c #6B9DE0", "( c #95B8E8", "_ c #81ABE3", ": c #72A1DF", "< c #83ADE3", "[ c #1B65C9", "} c #4180D6", "| c #5F95DC", "1 c #8BB3E5", "2 c #77A4E0", "3 c #679ADC", "4 c #7AA6E1", "5 c #195CC6", "6 c #276ECD", "7 c #4885D6", "8 c #7CA9E1", "9 c #6698DB", "0 c #71A1DE", "a c #1752C0", "b c #195CC4", "c c #3D77D0", "d c #6E9FDD", "e c #699BDC", "f c #1547BD", "g c #164ABD", "h c #376BC9", "i c #6295DA", "j c #1440B9", "k c #1339B4", "l c #315FC4", "m c #1339B7", "n c #1130B0", "o c #1233B4", " ", " ", " .+ ", " @#$ ", " %&*= ", " -;>,' ", " )!>~{] ", " ^/(_:<[ ", " }|12345 ", " 67890a ", " bcdef ", " ghij ", " klm ", " no ", " ", " "}; spatialite_gui-2.0.0-devel/icons/sql_log.xpm0000664000175000017500000000516712543275035016054 00000000000000/* XPM */ static const char * sql_log_xpm[] = { "16 16 119 2", " c None", ". c #6E97D4", "+ c #7B9ED4", "@ c #7198D0", "# c #82A4D6", "$ c #688ECD", "% c #6990CD", "& c #759AD0", "* c #7399D1", "= c #628BC8", "- c #658DCC", "; c #B0CDF3", "> c #FFFFFF", ", c #B3C7E3", "' c #A1BFEA", ") c #6089C9", "! c #5B86C7", "~ c #9EC0EF", "{ c #7DA2D9", "] c #7A9DD3", "^ c #80A3D5", "/ c #8FAEDA", "( c #779AD2", "_ c #779BD2", ": c #779CD2", "< c #7197D0", "[ c #5D88C8", "} c #A1BFEF", "| c #7599D1", "1 c #B8D2F4", "2 c #BBCDE6", "3 c #FEFFFF", "4 c #F2F6FB", "5 c #EDF1F8", "6 c #658DCA", "7 c #99B8EA", "8 c #5F89C9", "9 c #9BBDED", "0 c #618BC9", "a c #92B5E6", "b c #618BCB", "c c #9EBCEE", "d c #5481C4", "e c #97B6EA", "f c #7398CE", "g c #A1BEEA", "h c #6E93CC", "i c #F7FBFF", "j c #F1F8FF", "k c #8CAFE4", "l c #618AC7", "m c #517FC3", "n c #9AB6EF", "o c #6F96CC", "p c #91B6D6", "q c #FAFCFD", "r c #FBFCFE", "s c #FDFDFE", "t c #FCFDFE", "u c #FAFBFD", "v c #FBFCFD", "w c #85A8DD", "x c #537FC1", "y c #5583C6", "z c #BACEEF", "A c #668EC7", "B c #9CBCE0", "C c #7EA5DD", "D c #80A6DD", "E c #7CA3DB", "F c #7AA0D9", "G c #79A0D9", "H c #789FD8", "I c #789ED8", "J c #5D84BF", "K c #3368BA", "L c #5884C3", "M c #5380C5", "N c #96B2EE", "O c #81A7E2", "P c #81A7E1", "Q c #7DA3DE", "R c #7BA1DC", "S c #799FDB", "T c #779ED9", "U c #739AD4", "V c #577EBB", "W c #EAF3F3", "X c #E6F1ED", "Y c #E6F1EF", "Z c #E6F0EF", "` c #E5F1ED", " . c #EDF5F3", ".. c #799CD5", "+. c #4470B0", "@. c #E8F3EA", "#. c #84BF51", "$. c #98C96F", "%. c #99C971", "&. c #84BF54", "*. c #E9F4E4", "=. c #7B9CDD", "-. c #3A69AA", ";. c #FFFFDD", ">. c #C7EE87", ",. c #D7F4A2", "'. c #D7F6A2", "). c #C7EE8C", "!. c #FFFFE0", "~. c #85A2DD", "{. c #3E6AAB", "]. c #688BD3", "^. c #708FE1", "/. c #6C8DDC", "(. c #6D8BDA", "_. c #6E8AD7", ":. c #6C8BCD", "<. c #446DAB", "[. c #2E5FA6", " ", " . + @ # $ % & * = ", " - ; > , > > > > ' ) ", " ! ~ { ] ^ / ( _ : < = ", " [ } | 1 > 2 3 > 4 5 ' ) ", " 6 7 8 9 . + @ # $ % & * = ", " 0 a b c - ; > , > > > > ' ) ", " d e f g ! ~ > h > > i j k l ", " m n o p [ } q r s t u v w x ", " y z A B 6 7 C D E F G H I J ", " K L M N 0 a O P Q R S T U V ", " y z d e W X Y Z ` ...+. ", " K L m n @.#.$.%.&.*.=.-. ", " y z ;.>.,.'.).!.~.{. ", " K L ].^./.(._.:.<.[. ", " "}; spatialite_gui-2.0.0-devel/icons/sql_abort.xpm0000664000175000017500000000457212543275035016401 00000000000000/* XPM */ static const char * sql_abort_xpm[] = { "16 16 104 2", " c None", ". c #FF0000", "+ c #FD0000", "@ c #FF2B26", "# c #FF695C", "$ c #FF685B", "% c #FE675A", "& c #FE6558", "* c #FE6356", "= c #FE6154", "- c #FC2722", "; c #FB0000", "> c #FF6A5D", ", c #FF4743", "' c #FE3434", ") c #FE3232", "! c #FD3030", "~ c #FD2D2D", "{ c #FC3C38", "] c #FC5D4F", "^ c #FA251F", "/ c #F70000", "( c #FF5B58", "_ c #FFCFCF", ": c #FE5252", "< c #FD2F2F", "[ c #FD2C2C", "} c #FC4B4B", "| c #FECCCC", "1 c #FB4C48", "2 c #FB5749", "3 c #F9231D", "4 c #F50000", "5 c #FE4743", "6 c #FFF3F3", "7 c #FFEDED", "8 c #FC4C4C", "9 c #FC4A4A", "0 c #FFECEC", "a c #FFF2F2", "b c #FECACA", "c c #FA2F2A", "d c #FA5142", "e c #F30000", "f c #FE3333", "g c #FD5050", "h c #FEECEC", "i c #FA3E3E", "j c #F81717", "k c #F94E3F", "l c #F10000", "m c #FE6457", "n c #F93D3D", "o c #F81616", "p c #F71313", "q c #F84B3C", "r c #FE6255", "s c #FC2929", "t c #FC4848", "u c #F93A3A", "v c #F71212", "w c #F60F0F", "x c #F84838", "y c #FD5F52", "z c #FC2828", "A c #FC4747", "B c #FFF1F1", "C c #FEEAEA", "D c #F73434", "E c #F50B0B", "F c #F84535", "G c #EF0000", "H c #FD5D4F", "I c #FB3732", "J c #FECBCB", "K c #FEEBEB", "L c #F93B3B", "M c #F83939", "N c #FEF1F1", "O c #FDC5C5", "P c #F61D18", "Q c #F74333", "R c #F90000", "S c #FB584A", "T c #FB4742", "U c #FDC9C9", "V c #F61010", "W c #F73333", "X c #F73530", "Y c #F74434", "Z c #F21B14", "` c #ED0000", " . c #FA5344", ".. c #F92924", "+. c #F50C0C", "@. c #F50909", "#. c #F51B16", "$. c #F11B14", "%. c #F5201A", "&. c #F94C3C", "*. c #F8493A", "=. c #F84738", "-. c #F74334", ";. c #F74232", " ", " . . . . + + + + ", " . @ # $ % & * = - ; ", " . @ > , ' ) ! ~ { ] ^ / ", " . @ > ( _ : < [ } | 1 2 3 4 ", " . $ 5 _ 6 7 8 9 0 a b c d e ", " . % f g 7 6 7 7 a h i j k l ", " + m ! ~ } 7 a a 0 n o p q l ", " + r [ s t 7 a a h u v w x l ", " + y z A 0 a 0 h B C D E F G ", " ; H I J a K L M C N O P Q G ", " R ^ S T U L p V W O X Y Z ` ", " / 3 ...v w +.@.#.Q $.` ", " 4 %.&.*.=.F -.;.$.` ", " l l l l G G ` ` ", " "}; spatialite_gui-2.0.0-devel/icons/rs_first.xpm0000664000175000017500000000322012543275035016233 00000000000000/* XPM */ static const char * rs_first_xpm[] = { "16 16 80 1", " c None", ". c #80ABEA", "+ c #7EA9E8", "@ c #77A6E6", "# c #538DD9", "$ c #5089D9", "% c #80ABE8", "& c #B4CEF2", "* c #A2C1EE", "= c #70A0E2", "- c #4C89D8", "; c #4A89D9", "> c #4584D8", ", c #B0CBF0", "' c #9DBEEC", ") c #659BE1", "! c #4A85D6", "~ c #699DDF", "{ c #90B4E7", "] c #397BD2", "^ c #ABC8EF", "/ c #96B9EA", "( c #5C92DF", "_ c #4784D6", ": c #669ADF", "< c #8FB5E7", "[ c #8DB2E6", "} c #2C74CF", "| c #A5C4ED", "1 c #8FB4E8", "2 c #528BD9", "3 c #4180D4", "4 c #6497DD", "5 c #90B5E6", "6 c #7EA9E2", "7 c #85ADE4", "8 c #1E6BCD", "9 c #9EC0EB", "0 c #98BBE9", "a c #4384D6", "b c #73A2E1", "c c #8EB3E6", "d c #79A7E1", "e c #6B9CDD", "f c #7EA8E1", "g c #1A62C8", "h c #6D9EDE", "i c #86AEE4", "j c #71A1DF", "k c #6297DB", "l c #76A3DF", "m c #1859C6", "n c #91B6E8", "o c #77A4E1", "p c #1E69CB", "q c #4481D3", "r c #7AA7E0", "s c #6397DA", "t c #709FDE", "u c #1752C0", "v c #8AB1E5", "w c #6D9DDE", "x c #195AC4", "y c #3D77D0", "z c #6E9FDD", "A c #6A9BDC", "B c #164ABD", "C c #83ACE3", "D c #6597DB", "E c #386BCA", "F c #1441BB", "G c #7BA8E1", "H c #5E91D8", "I c #143EB6", "J c #3364C6", "K c #133CB7", "L c #195CC6", "M c #1855C4", "N c #1233B2", "O c #1239B6", " ", " ", " ..+@ #$ ", " %&*= -;> ", " @,') !~{] ", " =^/( _:<[} ", " )|12345678 ", " (90abcdefg ", " 20c]hijklm ", " >no}pqrstu ", " ]vw8 xyzAB ", " }CDg BEsF ", " 8GHm IJK ", " gLMu NO ", " ", " "}; spatialite_gui-2.0.0-devel/icons/geotable.xpm0000664000175000017500000000212012543275035016160 00000000000000/* XPM */ static const char * geotable_xpm[] = { "16 16 44 1", " c None", ". c #9BBCD7", "+ c #3A9AEA", "@ c #8CB3D9", "# c #A3D88A", "$ c #81ADD9", "% c #56AB55", "& c #4BA7CE", "* c #67B58D", "= c #3E8C8A", "- c #E7F8C8", "; c #66A0D9", "> c #78C94E", ", c #6EB0CC", "' c #D0E9BC", ") c #ADD6F9", "! c #97B7CB", "~ c #4AA8B7", "{ c #3E82B9", "] c #347BCB", "^ c #88B6D7", "/ c #78BA8A", "( c #2E9628", "_ c #DBE8ED", ": c #B6D6EB", "< c #639ADA", "[ c #9BCAFA", "} c #85B2E7", "| c #C8DFF1", "1 c #5491B9", "2 c #50A64C", "3 c #CEE2F4", "4 c #5491DB", "5 c #E0EDF2", "6 c #8EC78D", "7 c #BADFBB", "8 c #2E77C8", "9 c #8ACA77", "0 c #3D77B9", "a c #2571C6", "b c #44A03A", "c c #BEDAF5", "d c #EAF4FF", "e c #FFFFFF", "eeeeeeeeeeeee ", "e1{{00000000e ", "e.ddddddddd$e ", "e.ccccccccc@e ", "e!d;ddddddd$e ", "e!ccccc:/2]<5 ", "e.d;dd7%'e|^=e ", "e.ccc3=e-9+*'be ", "e@d;d})-#~&>99be", "e@ccc])^,+&>%#be", "e.@$$8_,++&%b#be", "eeeee6#9*~+a=*be", " eb->(aa[ae ", " eb99,4ae ", " ebaaae ", " eeee "}; spatialite_gui-2.0.0-devel/icons/memdb_load.xpm0000664000175000017500000000523412543275035016472 00000000000000/* XPM */ static const char * memdb_load_xpm[] = { "16 16 121 2", " c None", ". c #BABABA", "+ c #B8B8B8", "@ c #B7B7B7", "# c #B6B6B6", "$ c #B4B4B4", "% c #B3B3B3", "& c #BBBBBB", "* c #D0D0D0", "= c #E8E8E8", "- c #F3F3F3", "; c #FDFDFD", "> c #FCFCFC", ", c #EDEDED", "' c #E0E0E0", ") c #C2C2C2", "! c #ADADAD", "~ c #E1E1E1", "{ c #FEFEFE", "] c #FFFFFF", "^ c #FBFBFB", "/ c #CFCFCF", "( c #A9A9A9", "_ c #B9B9B9", ": c #F8F8F8", "< c #EAEAEA", "[ c #A7A7A7", "} c #F7F7F7", "| c #E7E7E7", "1 c #EFEFEF", "2 c #F6F6F6", "3 c #FAFAFA", "4 c #F0F0F0", "5 c #DEDEDE", "6 c #C3C3C3", "7 c #E6E6E6", "8 c #A5A5A5", "9 c #B5B5B5", "0 c #EBEBEB", "a c #D6D6D6", "b c #D5D5D5", "c c #D1D1D1", "d c #BCBCBC", "e c #C0C0C0", "f c #E5E5E5", "g c #A3A3A3", "h c #F5F5F5", "i c #EEEEEE", "j c #E2E2E2", "k c #CDCDCD", "l c #6EA43C", "m c #659F31", "n c #DEE1DD", "o c #A0A0A0", "p c #B2B2B2", "q c #F4F4F4", "r c #DDDDDD", "s c #E3E3E3", "t c #C9C9C9", "u c #67A036", "v c #81B35A", "w c #579828", "x c #9B9E99", "y c #B0B0B0", "z c #6FA53D", "A c #6EA338", "B c #68A134", "C c #629D30", "D c #7CAF55", "E c #AACB91", "F c #74AB4F", "G c #468F18", "H c #AEAEAE", "I c #F2F2F2", "J c #D8D8D8", "K c #6BA337", "L c #B0CE96", "M c #ADCD94", "N c #A8CB90", "O c #90BC74", "P c #A1C78A", "Q c #68A546", "R c #358707", "S c #ACACAC", "T c #D4D4D4", "U c #639F31", "V c #8EBA6F", "W c #89B86B", "X c #85B666", "Y c #80B361", "Z c #82B567", "` c #98C283", " . c #5CA03C", ".. c #257F00", "+. c #DBDBDB", "@. c #5B9B29", "#. c #A9CA90", "$. c #A5C88D", "%. c #A1C68A", "&. c #9EC588", "*. c #85B66A", "=. c #97C282", "-. c #66A548", ";. c #217D00", ">. c #CECECE", ",. c #529722", "'. c #4A911C", "). c #448F16", "!. c #3C8B10", "~. c #5E9F3A", "{. c #96C180", "]. c #62A346", "^. c #217D03", "/. c #A1A1A1", "(. c #9F9F9F", "_. c #ABABAB", ":. c #959595", "<. c #2E8306", "[. c #5FA143", "}. c #207B01", "|. c #1E7B03", " ", " . + @ # $ % ", " & * = - ; > , ' ) ! ", " . ~ { ] ] ] ] ] ] ^ / ( ", " _ : { ] ] ] ] ] ] ^ < [ ", " @ } | 1 2 ^ 3 4 5 6 7 8 ", " 9 2 0 5 a b c 6 d e f g ", " $ h i 7 j 7 ~ k l m n o ", " p q < ~ r s 5 t u v w x ", " y - | r z A B C D E F G ", " H I j J K L M E N O P Q R ", " S 4 5 T U M V W X Y Z ` ...", " ( 5 - +.@.#.$.%.&.*.=.-.;. ", " 8 >., ,.'.).!.~.{.].^. ", " /.(./._.[ :.<.[.}. ", " ;.|. "}; spatialite_gui-2.0.0-devel/icons/composer.xpm0000664000175000017500000000535712543275035016244 00000000000000/* XPM */ static const char * composer_xpm[] = { "16 16 126 2", " c None", ". c #5F93CE", "+ c #5F93CD", "@ c #5F92CD", "# c #5F90CC", "$ c #6192CD", "% c #6393CD", "& c #6191CB", "* c #5F8ECB", "= c #6492CA", "- c #8BAED8", "; c #8BACD7", "> c #FFFFFF", ", c #89AAD6", "' c #9CC4ED", ") c #9BC4ED", "! c #618CC6", "~ c #5F91CD", "{ c #C1DAF4", "] c #C2DBF4", "^ c #5884C1", "/ c #5E90CC", "( c #B1BDB0", "_ c #D8A558", ": c #DBB185", "< c #D09D46", "[ c #5D8ECB", "} c #F5E6B1", "| c #E7BE77", "1 c #F0D2B4", "2 c #FFF3E5", "3 c #EFD2AC", "4 c #C78C48", "5 c #5C8CCA", "6 c #547FBC", "7 c #4C7DBA", "8 c #4A7CBA", "9 c #DEE5F0", "0 c #DFD5AB", "a c #EED581", "b c #F9E3B2", "c c #E7C08B", "d c #F6D3AE", "e c #FCE0C4", "f c #D39F66", "g c #5B8AC8", "h c #4076B7", "i c #83A6D1", "j c #3873B6", "k c #E9DFBB", "l c #EED47D", "m c #FDF6C4", "n c #F6DD6C", "o c #EDCA6D", "p c #D7A363", "q c #C99864", "r c #5A88C7", "s c #336EB4", "t c #7EA5D0", "u c #2E6CB2", "v c #DDD6B5", "w c #EED379", "x c #FDF7C7", "y c #F5DC5F", "z c #F7E25B", "A c #F2D67A", "B c #E2A251", "C c #687A9D", "D c #5B86C5", "E c #2C67AF", "F c #75A0CD", "G c #2B64AD", "H c #E7D6B1", "I c #E7CB77", "J c #F5DC5E", "K c #F7E15A", "L c #F1D47B", "M c #DC994B", "N c #F7E8D6", "O c #5072AC", "P c #5A86C4", "Q c #749FCD", "R c #586E7D", "S c #D7BA76", "T c #FDF6C2", "U c #F7DF63", "V c #F8E25D", "W c #F0D379", "X c #DC9849", "Y c #DDDAD9", "Z c #4F71A8", "` c #5882C2", " . c #576675", ".. c #D5B67A", "+. c #D1B790", "@. c #E4C955", "#. c #F5DF5B", "$. c #EDD078", "%. c #DA9B50", "&. c #DDD9D7", "*. c #4E6FA7", "=. c #5580C0", "-. c #AA8943", ";. c #FFF2E0", ">. c #D89A54", ",. c #BE7A1A", "'. c #C59849", "). c #C78F49", "!. c #F7EADC", "~. c #4D6EA6", "{. c #557DBE", "]. c #547CBD", "^. c #537BBC", "/. c #82652D", "(. c #F9C794", "_. c #F9C991", ":. c #C98541", "<. c #A66523", "[. c #637293", "}. c #4E6FA8", "|. c #4D6EA7", "1. c #4D6EA4", "2. c #553D11", "3. c #875F28", "4. c #BD8849", "5. c #BC8D42", " ", " . . . + @ # $ % & * = - ; ", " . > > > > > > > > > > > > , ", " . > ' ' ' ) ) ) ) ) ) ) > ! ", " ~ > ' { { ] ] ] ] ] ] ) > ^ ", " / > ) ) ) ) ) ) ) ) ( _ : < ", " [ > > > > > > > > } | 1 2 3 4 ", " 5 > 6 7 8 > 9 9 0 a b c d e f ", " g > h i j > 9 k l m n o p q ", " r > s t u > v w x y z A B C ", " D > E F G H I x J K L M N O ", " P > E Q R S T U V W X Y > Z ", " ` > E ...+.@.#.$.%.&.9 > *. ", " =.> > -.;.>.,.'.).!.> > > ~. ", " {.].^./.(._.:.<.[.}.|.~.1.~. ", " 2.3.4.5. "}; spatialite_gui-2.0.0-devel/icons/loadxl.xpm0000664000175000017500000000666712543275035015705 00000000000000/* XPM */ static const char * loadxl_xpm[] = { "16 16 168 2", " c None", ". c #4D8BC8", "+ c #4F8CC8", "@ c #4F8DC8", "# c #4F8CC9", "$ c #4F8BC7", "% c #4B89C5", "& c #3B76C4", "* c #4985C4", "= c #ECF2F7", "- c #EEF4F8", "; c #EDF4F8", "> c #EDF3F8", ", c #ECF2F8", "' c #D7E6F2", ") c #7DB2E2", "! c #6594DB", "~ c #4B88C5", "{ c #F2F6FA", "] c #C7E0FA", "^ c #C9E1FB", "/ c #C9E2FB", "( c #C8E0FB", "_ c #C5DFF9", ": c #C1DBF8", "< c #B8D6F4", "[ c #F8FBFF", "} c #B4D8F6", "| c #7DB0E1", "1 c #6492DB", "2 c #4C89C6", "3 c #F1F5F9", "4 c #CDE3FC", "5 c #CEE3FB", "6 c #CDE3FB", "7 c #CBE2FB", "8 c #C8E0F9", "9 c #C2DCF8", "0 c #BAD6F5", "a c #F8FBFD", "b c #CDE6FC", "c c #C9E5FA", "d c #84B6E2", "e c #4279BF", "f c #588D43", "g c #568C55", "h c #669653", "i c #639554", "j c #95B9A1", "k c #83AE8D", "l c #427F2E", "m c #417F2E", "n c #48843A", "o c #458236", "p c #90B490", "q c #F3F7FB", "r c #E9EFF5", "s c #457EC2", "t c #BED3B5", "u c #B5DA9C", "v c #95C874", "w c #5F934A", "x c #74A45D", "y c #6EA159", "z c #649750", "A c #629762", "B c #B4D1E9", "C c #B5D4F3", "D c #B3D2F1", "E c #F0F4F8", "F c #4682C4", "G c #538B6F", "H c #C8D9C0", "I c #A3D382", "J c #8AC16D", "K c #60964B", "L c #649751", "M c #689A67", "N c #C3DCF4", "O c #BDDAF6", "P c #BBD8F6", "Q c #EFF4FA", "R c #4683C6", "S c #4988C2", "T c #719E61", "U c #CCDCC5", "V c #97C976", "W c #87BC73", "X c #609355", "Y c #CCE0F5", "Z c #CCE1FB", "` c #C3DDF9", " . c #EDF4FA", ".. c #4582C6", "+. c #3F7E7F", "@. c #37781F", "#. c #5D9148", "$. c #CDDDC7", "%. c #84C06A", "&. c #82B671", "*. c #598E44", "=. c #A1C1B1", "-. c #D0E4FB", ";. c #CCE3FB", ">. c #C7DFFA", ",. c #C6DFFA", "'. c #EAF2FA", "). c #4280C6", "!. c #33751B", "~. c #6EA05B", "{. c #5C9649", "]. c #5B9047", "^. c #71B65D", "/. c #75AE67", "(. c #588D44", "_. c #CDE2FC", ":. c #CBE1FB", "<. c #F2F7FB", "[. c #3F7CC5", "}. c #33751A", "|. c #337519", "1. c #337419", "2. c #528A44", "3. c #6B9B61", "4. c #C3D6BB", "5. c #84BB78", "6. c #6AAB61", "7. c #649657", "8. c #CCE2FC", "9. c #C9E0FB", "0. c #C8E1FB", "a. c #F7FAFD", "b. c #3B76C1", "c. c #407CC4", "d. c #E6F0F7", "e. c #D1E4FC", "f. c #C2D9E5", "g. c #709E68", "h. c #659657", "i. c #669759", "j. c #73A06C", "k. c #F5F9FC", "l. c #366FBF", "m. c #3C78C1", "n. c #E3EDF7", "o. c #F4F7FB", "p. c #3167BB", "q. c #3871BF", "r. c #DFEBF5", "s. c #2D64B9", "t. c #3369BC", "u. c #EAF1F8", "v. c #DFECF7", "w. c #DEEBF6", "x. c #DEEAF6", "y. c #DCEAF6", "z. c #EBF3FA", "A. c #F3F7FC", "B. c #F4F8FC", "C. c #FDFEFE", "D. c #2A60B7", "E. c #3065BA", "F. c #3166BB", "G. c #3066BA", "H. c #2F65BA", "I. c #2E65B9", "J. c #2E64B9", "K. c #2C62B7", " . + + + + @ # $ % & ", " * = - ; > > > , = ' ) ! ", " ~ { ] ^ / ( _ : < [ } | 1 ", " 2 3 4 5 6 7 8 9 0 a b c d e ", "f g h i j k l m n o p = q r s ", "f t u v i w x y z A B C D E F ", " G H I J i K L M N 9 O P Q R ", " S T U V W f X Y Z ] ` 9 ... ", " +.@.#.$.%.&.*.=.-.;.>.,.'.). ", " !.~.{.].$.^./.(.!._.:.^ <.[. ", "}.}.|.1.2.3.4.5.6.7.8.9.0.a.b. ", " c.d.e.e.f.g.h.i.j.e.e.e.k.l. ", " m.n.e.e.e.e.e.e.e.e.e.e.o.p. ", " q.r.e.e.e.e.e.e.e.e.e.e.a s. ", " t.u.v.w.x.y.y.z.z.'.A.B.C.D. ", " E.F.G.G.G.E.H.I.I.J.J.K. "}; spatialite_gui-2.0.0-devel/icons/table.xpm0000664000175000017500000000446212543275035015500 00000000000000/* XPM */ static const char * table_xpm[] = { "16 16 100 2", " c None", ". c #A2C1EF", "+ c #9FC0ED", "@ c #9DBEEB", "# c #9ABCEB", "$ c #96BAE9", "% c #93B7E7", "& c #90B5E6", "* c #8CB2E4", "= c #88AFE2", "- c #84ACE0", "; c #80A9DD", "> c #7DA5DC", ", c #7AA3DA", "' c #A1C1EE", ") c #F4F7FB", "! c #74A0D7", "~ c #9EBFEC", "{ c #A5D59C", "] c #A1D398", "^ c #9DD094", "/ c #98CE90", "( c #93CB8B", "_ c #8EC987", ": c #89C682", "< c #84C37E", "[ c #80C17A", "} c #7CBE76", "| c #6F9BD4", "1 c #9BBDEB", "2 c #FFFFFF", "3 c #6A97D1", "4 c #98BAE9", "5 c #A6C3E9", "6 c #6493CE", "7 c #94B7E7", "8 c #A9C4E8", "9 c #ACC7E8", "0 c #EBF1F7", "a c #5F8FCB", "b c #8FB4E5", "c c #F2F6FA", "d c #AAC6E9", "e c #ACC6E9", "f c #ACC7EA", "g c #ADC7E9", "h c #AEC9E9", "i c #B0C9E9", "j c #B0C8E8", "k c #B5CCE8", "l c #DEE7F2", "m c #598AC8", "n c #8CB1E3", "o c #F1F6FA", "p c #AEC9EA", "q c #B0C9EA", "r c #DBE5F1", "s c #5586C6", "t c #87AEE1", "u c #F0F4FA", "v c #B2CBEA", "w c #B3CCEA", "x c #B7CEEA", "y c #AEC8E8", "z c #D8E2F0", "A c #5486C4", "B c #82AADF", "C c #EFF3F9", "D c #BBD0EB", "E c #BACFEA", "F c #F2F6FB", "G c #5F8DC8", "H c #7EA8DD", "I c #BAD0EB", "J c #BDD1EB", "K c #B5CDEA", "L c #5C8AC6", "M c #7AA4D9", "N c #EEF3F9", "O c #BED2EB", "P c #BFD3EB", "Q c #ADC7EA", "R c #5F8CC6", "S c #75A1D7", "T c #EDF2F8", "U c #EAF0F7", "V c #E6EDF6", "W c #E2EAF4", "X c #DEE7F3", "Y c #DBE4F1", "Z c #5D8AC5", "` c #729ED6", " . c #6E99D3", ".. c #6896D1", "+. c #6392CE", "@. c #5E8ECB", "#. c #5B8AC9", "$. c #5687C7", "%. c #5284C3", "&. c #4277BB", " ", " . + @ # $ % & * = - ; > , ", " ' ) ) ) ) ) ) ) ) ) ) ) ) ! ", " ~ ) { ] ^ / ( _ : < [ } ) | ", " 1 ) 2 2 2 2 2 2 2 2 2 2 ) 3 ", " 4 ) 5 5 5 5 5 5 5 5 5 5 ) 6 ", " 7 ) 5 2 8 2 2 2 9 2 2 2 0 a ", " b c d e f g h i 9 i j k l m ", " n o p 2 q 2 2 2 9 2 2 2 r s ", " t u v w w w w x 9 9 j y z A ", " B C x 2 D 2 2 2 E F 2 2 z G ", " H C I D D D D J K K K K z L ", " M N O 2 P 2 2 2 Q 2 2 2 z R ", " S T U V W X Y z z z z z z Z ", " ` ...+.@.#.$.%.%.%.%.%.%.&. ", " "}; spatialite_gui-2.0.0-devel/icons/tmp_table.xpm0000664000175000017500000000431712543275035016357 00000000000000/* XPM */ static const char * tmp_table_xpm[] = { "16 16 94 2", " c None", ". c #C6D4F4", "+ c #C4D3F3", "@ c #C2D2F2", "# c #C0D0F2", "$ c #BCCEF1", "% c #BACCEF", "& c #B7CAEF", "* c #B3C8ED", "= c #AFC5EC", "- c #ABC3EB", "; c #A8C0E9", "> c #A5BDE8", ", c #A1BBE6", "' c #FAF9FC", ") c #9BB8E4", "! c #C3D2F3", "~ c #C9E3B5", "{ c #C6E2B1", "] c #C2DFAD", "^ c #BEDEAA", "/ c #BADCA5", "( c #B5DAA1", "_ c #B0D89C", ": c #ABD698", "< c #A8D494", "[ c #A3D290", "} c #96B4E2", "| c #C1D1F2", "1 c #FEFEFE", "2 c #90B0E0", "3 c #BECEF1", "4 c #CAD6F1", "5 c #8AADDE", "6 c #CCD6F0", "7 c #CED9F0", "8 c #F6F6F9", "9 c #84A9DC", "0 c #B6CAEE", "a c #F9F9FB", "b c #CDD8F1", "c c #CED8F1", "d c #CED9F1", "e c #CFD9F1", "f c #D0DAF1", "g c #D2DAF1", "h c #D2D9F0", "i c #D5DCF0", "j c #EFEFF6", "k c #7DA4D9", "l c #B3C7ED", "m c #F8F9FB", "n c #EEEEF6", "o c #78A0D8", "p c #AEC5EB", "q c #F8F8FB", "r c #D3DCF1", "s c #D4DCF1", "t c #D7DEF1", "u c #D0D9F0", "v c #ECECF5", "w c #77A0D6", "x c #A9C1EA", "y c #F7F7FB", "z c #DADFF2", "A c #D9DFF1", "B c #F9F9FC", "C c #84A7D9", "D c #A6BFE9", "E c #D9DFF2", "F c #DBE0F2", "G c #D5DDF1", "H c #80A4D8", "I c #A1BCE6", "J c #DCE1F2", "K c #DCE2F2", "L c #84A6D8", "M c #9CB9E4", "N c #F6F6FA", "O c #F5F5F9", "P c #F3F3F9", "Q c #F1F1F8", "R c #EFEFF7", "S c #EEEDF6", "T c #82A4D7", "U c #99B7E4", "V c #95B2E2", "W c #8EAFE0", "X c #89ACDE", "Y c #83A8DC", "Z c #7FA4DA", "` c #79A1D9", " . c #749ED6", ".. c #6091CF", " ", " . + @ # $ % & * = - ; > , ", " . ' ' ' ' ' ' ' ' ' ' ' ' ) ", " ! ' ~ { ] ^ / ( _ : < [ ' } ", " | ' 1 1 1 1 1 1 1 1 1 1 ' 2 ", " 3 ' 4 4 4 4 4 4 4 4 4 4 ' 5 ", " % ' 4 1 6 1 1 1 7 1 1 1 8 9 ", " 0 a b c d e f g 7 g h i j k ", " l m f 1 g 1 1 1 7 1 1 1 n o ", " p q r s s s s t 7 7 h u v w ", " x y t 1 z 1 1 1 A B 1 1 v C ", " D y E z z z z F G G G G v H ", " I y J 1 K 1 1 1 e 1 1 1 v L ", " M N O P Q R S v v v v v v T ", " U V W X Y Z ` . . . . . ... ", " "}; spatialite_gui-2.0.0-devel/icons/topology.xpm0000664000175000017500000000521112543275035016256 00000000000000/* XPM */ static const char * topology_xpm[] = { "16 16 120 2", " c None", ". c #4589C0", "+ c #659556", "@ c #4F91C0", "# c #6A9959", "$ c #4D98BC", "% c #6D9C5C", "& c #6B9D59", "* c #6C9E5A", "= c #6C9E5B", "- c #52A564", "; c #6C9F5A", "> c #56A18A", ", c #6D9F5B", "' c #6EA05C", ") c #50A1D3", "! c #66A383", "~ c #949494", "{ c #959595", "] c #67A5A2", "^ c #58A5D5", "/ c #59A6CD", "( c #999999", "_ c #7FA76A", ": c #56A9E1", "< c #57ABDB", "[ c #7CAB74", "} c #80AB72", "| c #80AC6C", "1 c #81AB73", "2 c #81AC72", "3 c #81AC73", "4 c #82AC73", "5 c #63AEC8", "6 c #84AD78", "7 c #68ACD9", "8 c #85AE77", "9 c #85AE79", "0 c #55B99C", "a c #86AF78", "b c #6EAECE", "c c #6AB5AA", "d c #88B27C", "e c #82B384", "f c #5BC361", "g c #6AB4CC", "h c #8AB96D", "i c #67BCB7", "j c #8DB878", "k c #8BB5A6", "l c #70BCC0", "m c #8DB6BB", "n c #96BA7B", "o c #92BA91", "p c #7CC574", "q c #45DA5F", "r c #7AC0D6", "s c #9AC37F", "t c #9BC385", "u c #9FC288", "v c #77C8C5", "w c #84C3DA", "x c #6CCFAC", "y c #82C6CA", "z c #8CC3D1", "A c #5BDB7D", "B c #A3C491", "C c #8ECAAF", "D c #71D693", "E c #A8C59F", "F c #A9C59F", "G c #A9C88F", "H c #A2CA9A", "I c #ABC7A1", "J c #ABC8A1", "K c #ABC8A2", "L c #79D995", "M c #9FCBBA", "N c #83D5B0", "O c #A1D18D", "P c #A3D794", "Q c #91DF8B", "R c #9AD5D8", "S c #9FDB8F", "T c #C2D4BB", "U c #8CE7A1", "V c #A3DBDB", "W c #BCDAB9", "X c #B5DCD4", "Y c #C7D9C1", "Z c #C2E2AE", "` c #CCEECD", " . c #BEE4D4", ".. c #CCEECF", "+. c #ABF1BB", "@. c #BAECC9", "#. c #BDEAD5", "$. c #CCEED4", "%. c #CCEED6", "&. c #CCEEE6", "*. c #CCEEE7", "=. c #CFF2CD", "-. c #CCEEE9", ";. c #CCEEEA", ">. c #CCEEEB", ",. c #CCEEEC", "'. c #CCEEED", "). c #CCEEEF", "!. c #CCEEF0", "~. c #CCEEF1", "{. c #CCEEF2", "]. c #CCEEF3", "^. c #CCEEF4", "/. c #CCEEF5", "(. c #CCEEF6", "_. c #CCEEF8", ":. c #CCEEF9", "<. c #CCEEFA", "[. c #CCEEFB", "}. c #CCEEFC", " ", " _.[.}.}.}.}.}.}._.~ ", " [.^./././.~.).-.}.*.{ ", " J 2 , 3 F ..!.;.}.(.^.( ", " # B W X M e a T >.}.}.}.}. ", " ' Z =. .V w z H 8 ` ,.;.&.}. ", "* t +.@.R r i D Q | E {.).'.}. ", ", P U #.g v A q f u 1 (.].{.}. ", ", S L y / l x 0 - G = :.(.(.}. ", "; O N 5 < ) . @ ! n 4 :.:._.}. ", "* j p c ^ : $ > d % I <._._.}. ", " & s C b 7 ] h _ 6 $.<.<.<.}. ", " + [ k m o * 9 Y [.[.[.[.}. ", " I } = 3 K %.}.}.}.}.}.}. ", " :.}.}.}.}.}.}.}.}.}.}.:. ", " "}; spatialite_gui-2.0.0-devel/icons/map_preview.xpm0000664000175000017500000001001712543275035016720 00000000000000/* XPM */ static const char * map_preview_xpm[] = { "16 16 203 2", " c None", ". c #4A5449", "+ c #5D6A5C", "@ c #606D5F", "# c #616D5F", "$ c #616D60", "% c #626D60", "& c #636D60", "* c #5F6A5E", "= c #4B544A", "- c #FBFCFB", "; c #FCFEFC", "> c #F8FCF7", ", c #F8FCF8", "' c #F9FCF7", ") c #EEF7EC", "! c #EEF7ED", "~ c #EDF6EF", "{ c #ECF4EE", "] c #EBF4EB", "^ c #F9F99D", "/ c #EDB46C", "( c #FE7162", "_ c #E9E780", ": c #F4F48C", "< c #CDCD52", "[ c #A4C2EC", "} c #8AADDD", "| c #97BAEB", "1 c #80A7DD", "2 c #83ABE2", "3 c #75A0DA", "4 c #D4EAD9", "5 c #646E61", "6 c #EAEA8A", "7 c #DEDD72", "8 c #F06556", "9 c #DF9F56", "0 c #E8E873", "a c #C1C146", "b c #A5BBBB", "c c #83A4D0", "d c #8EB0DE", "e c #7A9ED1", "f c #7AA2D6", "g c #7198CF", "h c #D5EBD7", "i c #646E62", "j c #F9F99F", "k c #EAE985", "l c #FAD384", "m c #F05A52", "n c #F7F287", "o c #D7DA60", "p c #CAD598", "q c #9CB7E0", "r c #A9C7ED", "s c #94B3E0", "t c #98B8E6", "u c #8CAEDE", "v c #D6ECD7", "w c #646E63", "x c #EAEA90", "y c #DEDD78", "z c #EAE981", "A c #E26B4E", "B c #EE9D63", "C c #D7D75E", "D c #C9CB5B", "E c #97B0D4", "F c #9FBAE2", "G c #8FACD6", "H c #91B0DB", "I c #86A7D4", "J c #D7EDD6", "K c #F9F9A6", "L c #EAE98B", "M c #FAF899", "N c #EBD378", "O c #FF6B65", "P c #EADC77", "Q c #DEDF70", "R c #B5C5C1", "S c #BAD1F1", "T c #A9C1E5", "U c #AEC7EA", "V c #A1BDE4", "W c #646F63", "X c #F1F19F", "Y c #DFDD81", "Z c #EBEA8A", "` c #DEDE75", " . c #EE9165", ".. c #E27E55", "+. c #DDDC68", "@. c #B7BF77", "#. c #B2C8E5", "$. c #A3BADA", "%. c #A6BCDE", "&. c #9FB7D9", "*. c #D8EDD6", "=. c #646F64", "-. c #FAFAAF", ";. c #EBEB94", ">. c #FAF9A2", ",. c #F3ED95", "'. c #EB5F59", "). c #E6D987", "!. c #D1D25C", "~. c #C9DBDC", "{. c #CDD4AC", "]. c #D4DA97", "^. c #CED177", "/. c #DBEFD4", "(. c #656F64", "_. c #EDEBA4", ":. c #DFDF8D", "<. c #EBEB97", "[. c #B7CF72", "}. c #99CA74", "|. c #B08356", "1. c #D77860", "2. c #B6C351", "3. c #CDD590", "4. c #C6C650", "5. c #DDD07E", "6. c #DB9964", "7. c #DCE4CA", "8. c #666F64", "9. c #636E61", "0. c #F9FCF8", "a. c #FBFBBC", "b. c #DFE79D", "c. c #BBE193", "d. c #97C977", "e. c #A9DA89", "f. c #98C675", "g. c #F37C71", "h. c #ADAE6B", "i. c #DDE182", "j. c #E1A758", "k. c #E68C56", "l. c #BD9F61", "m. c #DBE9D0", "n. c #F8FBF7", "o. c #C4DE9B", "p. c #93C373", "q. c #9FCF80", "r. c #8FC16F", "s. c #9DCE7E", "t. c #8CBF6E", "u. c #BBA470", "v. c #DA5848", "w. c #D17C4C", "x. c #B68D51", "y. c #9DBE73", "z. c #8FC374", "A. c #DAEFD7", "B. c #AFDB96", "C. c #9AC97F", "D. c #AAD88F", "E. c #97C87A", "F. c #A9D68A", "G. c #ACA25F", "H. c #D78855", "I. c #E05D48", "J. c #C9A879", "K. c #99C97F", "L. c #A0D087", "M. c #9ACA80", "N. c #DAEED6", "O. c #EFF8EE", "P. c #BCDBA4", "Q. c #A6CA8C", "R. c #B1D598", "S. c #A1C986", "T. c #C0AD74", "U. c #C68756", "V. c #B6C283", "W. c #AFAC77", "X. c #EB7069", "Y. c #A3C581", "Z. c #A6D08C", "`. c #A0CA85", " + c #D7E9D2", ".+ c #676F64", "++ c #606A5F", "@+ c #ECF5EB", "#+ c #D7EDD4", "$+ c #D7EED4", "%+ c #D8EED4", "&+ c #D8EED5", "*+ c #D9EED5", "=+ c #DAEFD6", "-+ c #ECE2D4", ";+ c #D6E5CF", ">+ c #D9EDD5", ",+ c #DCEFD8", "'+ c #636C61", ")+ c #4C544B", "!+ c #616A5F", "~+ c #677064", "{+ c #4E554C", ". + @ @ @ @ # # # # $ % % & * = ", "+ - ; > > > , ' , , ) ! ~ { ] * ", "@ > ^ / ( _ : < [ } | 1 2 3 4 5 ", "@ > 6 7 8 9 0 a b c d e f g h i ", "# > j k l m n o p q r s t u v w ", "# , x y z A B C D E F G H I J w ", "# , K L M N O P Q R S T U V J W ", "$ , X Y Z ` ...+.@.#.$.%.&.*.=.", "% , -.;.>.Z ,.'.).!.~.{.].^./.(.", "& , _.:.<.[.}.|.1.2.3.4.5.6.7.8.", "9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.8.", "9.n.o.p.q.r.s.t.u.v.w.x.y.z.A.8.", "5 ) B.C.D.E.F.G.H.I.J.K.L.M.N.8.", "i O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+", "++@+#+$+%+&+*+*+=+=+-+;+>+,+>+'+", ")+!+W =.(.(.8.8.8.8.8..+.+~+'+{+"}; spatialite_gui-2.0.0-devel/icons/connect_ro.xpm0000664000175000017500000000540212543275035016535 00000000000000/* XPM */ static const char * connect_ro_xpm[] = { "16 16 127 2", " c None", ". c #BABABA", "+ c #B8B8B8", "@ c #B7B7B7", "# c #B6B6B6", "$ c #B4B4B4", "% c #B3B3B3", "& c #BBBBBB", "* c #D0D0D0", "= c #E8E8E8", "- c #F3F3F3", "; c #FDFDFD", "> c #FCFCFC", ", c #EDEDED", "' c #E0E0E0", ") c #C2C2C2", "! c #ADADAD", "~ c #E1E1E1", "{ c #FEFEFE", "] c #FFFFFF", "^ c #FBFBFB", "/ c #CFCFCF", "( c #A9A9A9", "_ c #B9B9B9", ": c #F8F8F8", "< c #EAEAEA", "[ c #A7A7A7", "} c #F7F7F7", "| c #E7E7E7", "1 c #EFEFEF", "2 c #F6F6F6", "3 c #FAFAFA", "4 c #F0F0F0", "5 c #DEDEDE", "6 c #C3C3C3", "7 c #E6E6E6", "8 c #A5A5A5", "9 c #B5B5B5", "0 c #EBEBEB", "a c #D6D6D6", "b c #D5D5D5", "c c #D1D1D1", "d c #BCBCBC", "e c #C0C0C0", "f c #E5E5E5", "g c #A3A3A3", "h c #F5F5F5", "i c #EEEEEE", "j c #E2E2E2", "k c #CDCDCD", "l c #E3E2E2", "m c #C19C62", "n c #E1AB46", "o c #B2B2B2", "p c #F4F4F4", "q c #DDDDDD", "r c #E3E3E3", "s c #C9C9C9", "t c #BDBDBD", "u c #BFBFBF", "v c #DEBE91", "w c #ECC96F", "x c #FBF3C9", "y c #E7BA57", "z c #B0B0B0", "A c #D9D9D9", "B c #DBDBDB", "C c #C4C4C4", "D c #C7AC83", "E c #EAC15E", "F c #FBF0A3", "G c #F0D480", "H c #ECC77E", "I c #DDA350", "J c #AEAEAE", "K c #F2F2F2", "L c #D8D8D8", "M c #DCDCDC", "N c #D1A862", "O c #F9EEA9", "P c #F8E67E", "Q c #F8E89A", "R c #F0D17E", "S c #F6E280", "T c #D9983F", "U c #ACACAC", "V c #D4D4D4", "W c #D2D2D2", "X c #C7A570", "Y c #F4DD89", "Z c #F6E06A", "` c #F7E273", " . c #F6DF5F", ".. c #F6DA55", "+. c #CD7F38", "@. c #C5B7A2", "#. c #DCB061", "$. c #E5BE63", "%. c #F2D95E", "&. c #F6DB4E", "*. c #F7DD5B", "=. c #F5D855", "-. c #CD802E", ";. c #CECECE", ">. c #EBD3AD", ",. c #E0AE5D", "'. c #F6E299", "). c #F5DC53", "!. c #F6D946", "~. c #CB9038", "{. c #CF8335", "]. c #D28436", "^. c #A1A1A1", "/. c #9F9F9F", "(. c #ABABAB", "_. c #D6AA5A", ":. c #F8E6A1", "<. c #F2D238", "[. c #F6D647", "}. c #CD943B", "|. c #DFAD4B", "1. c #F9E986", "2. c #F5D94D", "3. c #CC923A", "4. c #C98D34", "5. c #D59F45", "6. c #CB8D3A", " . + @ # $ % ", " & * = - ; > , ' ) ! ", ". ~ { ] ] ] ] ] ] ^ / ( ", "_ : { ] ] ] ] ] ] ^ < [ ", "@ } | 1 2 ^ 3 4 5 6 7 8 ", "9 2 0 5 a b c 6 d e f g ", "$ h i 7 j 7 ~ k ) ) l m n ", "o p < ~ q r 5 s t u v w x y ", "z - | q A ' B C + D E F G H I ", "J K j L b M L e % N O P Q R S T ", "U 4 5 V W B a u z X Y Z ` ...+.", "( 5 - B W B a @.#.$.%.&.*.=.-. ", " 8 ;., p h >.,.'.).!.~.{.]. ", " ^./.^.(._.:.<.[.}. ", " |.1.2.3. ", " 4.5.6. "}; spatialite_gui-2.0.0-devel/icons/sql_script.xpm0000664000175000017500000000704112543275035016570 00000000000000/* XPM */ static const char * sql_script_xpm[] = { "16 16 174 2", " c None", ". c #5FACE2", "+ c #81BCEA", "@ c #77B7E8", "# c #6DB2E6", "$ c #68B0E4", "% c #8CC0EA", "& c #FFFFFF", "* c #F4F9FD", "= c #EAF3FB", "- c #D9EBF8", "; c #D3E6F8", "> c #C6DFF5", ", c #A6CBE9", "' c #5DA8DE", ") c #5BA4DA", "! c #9AC6EB", "~ c #E2EFFC", "{ c #E7F0FD", "] c #EBF1FD", "^ c #EEF5FD", "/ c #F1F8FD", "( c #F7FAFD", "_ c #FAFCFF", ": c #F7FBFE", "< c #C0DAF4", "[ c #589FD5", "} c #A5CAEB", "| c #FBFDFF", "1 c #D5E9FD", "2 c #D8EBFD", "3 c #DBEAFD", "4 c #DFEDFD", "5 c #E2F0FD", "6 c #E4F1FD", "7 c #E4F0FC", "8 c #70A0E0", "9 c #F9FBFF", "0 c #87B8DF", "a c #559AD0", "b c #B2D0ED", "c c #F0F6FF", "d c #CAE1FA", "e c #CCE3FB", "f c #D0E3FB", "g c #D3E6FB", "h c #D5E9FB", "i c #D8E9FC", "j c #DBEAFC", "k c #FDFFFF", "l c #719DD2", "m c #C1D9EE", "n c #5294CA", "o c #C1D9F0", "p c #E1EDFB", "q c #C0DAF9", "r c #C2DCF9", "s c #C5DEF9", "t c #C7E0FA", "u c #CAE2FA", "v c #CDE2FA", "w c #D0E5FA", "x c #FDFEFF", "y c #5A8FCB", "z c #4E8EC4", "A c #D8E7F5", "B c #D2E5FA", "C c #BCDAF9", "D c #BCDBF9", "E c #BFDBFA", "F c #C1DDFA", "G c #C4DDF9", "H c #C8E1FB", "I c #5794C8", "J c #4B88BD", "K c #F0F6FC", "L c #C7DFF9", "M c #BDDCF9", "N c #BFDCFA", "O c #C1DBFA", "P c #C3DDFA", "Q c #C2DDFA", "R c #6EA53F", "S c #659F31", "T c #F5F9F8", "U c #538DC1", "V c #4B85B9", "W c #C1DCF9", "X c #BFDCF8", "Y c #C0DBF8", "Z c #C0DDF9", "` c #67A139", " . c #81B35A", ".. c #579828", "+. c #4783B2", "@. c #5286B9", "#. c #F9FCFE", "$. c #BFDCF9", "%. c #BFDBF8", "&. c #6FA53D", "*. c #6EA339", "=. c #68A135", "-. c #629E31", ";. c #7CAF55", ">. c #AACB91", ",. c #74AB4F", "'. c #458F18", "). c #5686B7", "!. c #FDFEFE", "~. c #C2DEFA", "{. c #6BA337", "]. c #B0CE96", "^. c #ADCD94", "/. c #A8CB90", "(. c #90BC74", "_. c #A1C78A", ":. c #68A546", "<. c #358707", "[. c #3C6FA4", "}. c #8CAED5", "|. c #E5F0FD", "1. c #A2C7F7", "2. c #ADCFF7", "3. c #639F31", "4. c #8EBA6F", "5. c #89B86B", "6. c #85B666", "7. c #80B361", "8. c #82B567", "9. c #98C283", "0. c #5CA03C", "a. c #257F00", "b. c #39699E", "c. c #5985B4", "d. c #7BA5D9", "e. c #6F9ED8", "f. c #6A9BD7", "g. c #5B9B29", "h. c #A9CA90", "i. c #A5C88D", "j. c #A1C68A", "k. c #9EC588", "l. c #85B66A", "m. c #97C282", "n. c #66A548", "o. c #217D00", "p. c #366499", "q. c #85A4C7", "r. c #529722", "s. c #4A911C", "t. c #448F16", "u. c #3C8B10", "v. c #5E9F3A", "w. c #96C180", "x. c #62A346", "y. c #207C08", "z. c #6D90B8", "A. c #A3BAD6", "B. c #B3C6DF", "C. c #C3D4E7", "D. c #D3DFEE", "E. c #E2EAF5", "F. c #EFF4FB", "G. c #F6FAFD", "H. c #32870B", "I. c #5FA143", "J. c #297F14", "K. c #2B6768", "L. c #315B90", "M. c #396195", "N. c #41699A", "O. c #237D06", "P. c #1E7B03", "Q. c #2D5F7B", " . + @ # $ . . . . . . ", " % & & & & * = - ; > , ' ", " ) ! & ~ { ] ^ / ( _ & : < ) ", " [ } | 1 2 3 4 5 6 7 & 8 9 0 ", " a b c d e f g h i j k l m a ", " n o p q r s t u v w x y n ", " z A B C D E F F G H | I ", " J K L M N O P Q R S T U ", " V : W X X Y Z Z ` ...+. ", " @.#.$.%.&.*.=.-.;.>.,.'. ", " ).!.~.N {.].^.>./.(._.:.<. ", " [.}.|.1.2.3.^.4.5.6.7.8.9.0.a.", " b.c.d.e.f.g.h.i.j.k.l.m.n.o. ", "p.q.& & & & r.s.t.u.v.w.x.y. ", " z.A.B.C.D.E.F.G.x H.I.J.K. ", " L.L.L.L.L.L.L.M.N.O.P.Q. "}; spatialite_gui-2.0.0-devel/icons/icon_info.xpm0000664000175000017500000010217112543275035016350 00000000000000/* XPM */ static const char * icon_info_xpm[] = { "128 113 256 2", " c None", ". c #583F32", "+ c #653D22", "@ c #4A4625", "# c #643E2B", "$ c #4F452E", "% c #6E3C2D", "& c #3A5016", "* c #5E432D", "= c #3C4F1C", "- c #3A5211", "; c #404F23", "> c #784129", ", c #92392C", "' c #495025", ") c #873D2C", "! c #77413D", "~ c #3F590F", "{ c #3F5917", "] c #6D4745", "^ c #973D30", "/ c #42591F", "( c #8D4226", "_ c #944028", ": c #864521", "< c #84452E", "[ c #844626", "} c #475829", "| c #4F5536", "1 c #3E5F14", "2 c #3F600B", "3 c #824743", "4 c #7B4947", "5 c #9E4228", "6 c #8E453B", "7 c #6A5040", "8 c #6F4E4D", "9 c #535843", "0 c #3F6505", "a c #8B4846", "b c #4E5E24", "c c #894B3F", "d c #476221", "e c #9B4925", "f c #9C492C", "g c #964A38", "h c #944A45", "i c #6B5554", "j c #76534A", "k c #426815", "l c #4B651C", "m c #9B4946", "n c #655A43", "o c #47671C", "p c #A9473B", "q c #85504E", "r c #486815", "s c #8C4F4A", "t c #8B4F4F", "u c #466B0E", "v c #AA4844", "w c #536339", "x c #536430", "y c #924F4C", "z c #A54B47", "A c #7C5749", "B c #446F04", "C c #994F4F", "D c #476D19", "E c #436F11", "F c #586443", "G c #A14E4B", "H c #795A4A", "I c #496E12", "J c #9C504B", "K c #5C644D", "L c #417309", "M c #6B6140", "N c #506C2B", "O c #6F5E5C", "P c #985351", "Q c #B04D46", "R c #48720A", "S c #AF4D4C", "T c #9D5347", "U c #66625B", "V c #825A58", "W c #785E5C", "X c #6B6352", "Y c #4D7217", "Z c #AB514C", "` c #746153", " . c #965752", ".. c #A65350", "+. c #45770E", "@. c #497518", "#. c #77624E", "$. c #487802", "%. c #B4514A", "&. c #965958", "*. c #B4514F", "=. c #8B5C5D", "-. c #4C7710", ";. c #507424", ">. c #A35751", ",. c #AE5454", "'. c #B0544F", "). c #B75346", "!. c #915D59", "~. c #A35857", "{. c #A5594D", "]. c #A75A48", "^. c #836263", "/. c #A05B58", "(. c #AC5854", "_. c #7F6463", ":. c #B9554E", "<. c #85635E", "[. c #786766", "}. c #8B6260", "|. c #6B6C5E", "1. c #B95654", "2. c #4D7E08", "3. c #8E635C", "4. c #4F7D17", "5. c #B55954", "6. c #AF5B58", "7. c #68705A", "8. c #9E605E", "9. c #9C6254", "0. c #6E6E6B", "a. c #B65B5A", "b. c #8F6664", "c. c #A6605D", "d. c #63764B", "e. c #B95C50", "f. c #AB5F5E", "g. c #BE5A58", "h. c #956565", "i. c #976661", "j. c #8A696A", "k. c #B95D57", "l. c #AE605A", "m. c #8C6965", "n. c #677654", "o. c #9D6562", "p. c #538314", "q. c #C15C54", "r. c #777254", "s. c #627A44", "t. c #816D6C", "u. c #B4605C", "v. c #627C3B", "w. c #7C7071", "x. c #C25E5B", "y. c #508717", "z. c #51880B", "A. c #886E6D", "B. c #558520", "C. c #986B5E", "D. c #AA6752", "E. c #956B69", "F. c #AC6562", "G. c #A56766", "H. c #BE615B", "I. c #A16966", "J. c #B86360", "K. c #B3655F", "L. c #9B6B6B", "M. c #C16257", "N. c #BE6261", "O. c #568B00", "P. c #7A7572", "Q. c #767A51", "R. c #757774", "S. c #AA6963", "T. c #5F8530", "U. c #AF6865", "V. c #C7625F", "W. c #967067", "X. c #538F04", "Y. c #AA6B6B", "Z. c #B9685D", "`. c #C3655F", " + c #A56D6A", ".+ c #847676", "++ c #B96B4D", "@+ c #588E15", "#+ c #B36D51", "$+ c #728246", "%+ c #B86A69", "&+ c #B46C69", "*+ c #C56867", "=+ c #8F795F", "-+ c #C8695D", ";+ c #7B7D7A", ">+ c #C16C5A", ",+ c #817C7B", "'+ c #B66E6B", ")+ c #738460", "!+ c #BC6E6C", "~+ c #BE6E68", "{+ c #BF7052", "]+ c #5F9226", "^+ c #AB7470", "/+ c #B27270", "(+ c #5A9611", "_+ c #6E8B49", ":+ c #C56E6A", "<+ c #599902", "[+ c #977B78", "}+ c #659134", "|+ c #5D961E", "1+ c #6A8F3F", "2+ c #A37974", "3+ c #7E856F", "4+ c #818380", "5+ c #738C56", "6+ c #90807F", "7+ c #5C9E0C", "8+ c #858784", "9+ c #639F1F", "0+ c #8A8C89", "a+ c #63A518", "b+ c #AC8582", "c+ c #7E975E", "d+ c #9E8A89", "e+ c #8E8F8D", "f+ c #919390", "g+ c #6AAC21", "h+ c #949693", "i+ c #7AA648", "j+ c #8C9B83", "k+ c #71AC32", "l+ c #6FB019", "m+ c #76AA40", "n+ c #999B98", "o+ c #9C9E9B", "p+ c #9FA19E", "q+ c #7BB938", "r+ c #AFA1A2", "s+ c #A4A6A3", "t+ c #AAACA8", "u+ c #ADAFAC", "v+ c #B0B2AF", "w+ c #B3B5B2", "x+ c #C7B5B4", "y+ c #B8BAB7", "z+ c #BBBDBA", "A+ c #C0C2BF", "B+ c #C7C9C6", "C+ c #CED0CC", "D+ c #D0D2CF", "E+ c #D3D5D2", "F+ c #D7D9D6", "G+ c #DEE0DC", " ", " s+ ", " t+w+A+s+ ", " p+t+z+A+A+z+s+z+ ", " y+w+A+A+A+A+p+C+E+z+4+ ", " A+C+u+A+A+A+z+s+E+E+z+t+;+ ", " p+B+C+y+z+A+A+A+p+C+E+C+A+w+A+0+ ", " p+C+C+C+v+A+A+A+z+s+E+E+y+F+E+y+ ", " h+n+A+C+C+B+v+A+A+A+p+C+E+B+C+E+B+e+ ", " h+p+p+C+C+C+w+A+A+A+z+t+E+D+z+F+E+s+f+ ", " f+n+p+p+t+C+C+C+u+A+A+A+p+C+E+z+E+E+w+p+t+ ", " f+8+p+p+p+w+C+C+A+y+A+A+z+t+E+C+A+E+B+p+E+A+f+ ", " f+e+h+f+f+p+p+n+B+C+C+w+A+A+A+p+C+E+y+F+D+p+B+F+A+ ", " o+f+p+8+o+p+p+h+C+C+C+u+A+A+z+t+E+B+B+E+u+w+F+B+s+ ", " e+p+n+p+4+p+p+p+p+C+C+y+z+A+A+p+C+E+z+F+B+p+F+E+A+z+ ", " e+u+n+p+p+4+p+p+o+u+C+C+v+A+A+z+t+E+z+E+D+n+C+F+z+F+A+t+ ", " 8+t+u+h+p+n+8+p+p+f+B+C+B+v+A+A+p+C+C+A+E+t+z+F+z+F+F+C+y+ ", " ;+e+p+u+u+f+p+0+f+p+p+n+C+C+w+A+A+y+t+E+z+F+A+s+F+B+C+F+C+C+A+ ", " 4+h+u+u+t+f+p+4+o+p+p+s+C+C+u+A+A+p+C+B+B+D+h+D+C+B+F+C+C+C+A+ ", " 8+o+u+u+u+p+o+p+4+p+p+p+y+C+A+y+A+y+t+E+z+E+s+A+E+A+F+B+C+C+C+B+ ", " ;+h+t+u+u+u+n+p+p+4+p+p+h+B+C+w+A+A+p+C+A+D+z+s+F+z+F+C+C+C+C+C+C+ ", " 0+s+u+u+u+u+h+p+f+e+p+p+p+C+C+u+A+y+u+C+A+C+n+E+A+E+D+B+C+C+C+C+C+n+ ", " 4+o+t+u+u+u+u+f+p+e+f+p+p+v+C+y+z+A+s+C+y+E+p+B+B+C+E+B+C+C+C+C+C+C+o+ ", " s+h+t+u+u+u+t+h+p+4+o+p+s+y+C+v+A+y+u+B+B+y+t+C+B+E+B+C+C+C+C+C+C+w+y+ ", " e+z+f+u+u+u+u+p+n+o+4+p+p+n+C+B+w+A+s+D+y+C+n+F+z+E+B+C+C+C+C+C+C+u+C+F+ ", " 4+w+z+e+u+u+u+u+n+p+e+e+p+n+t+C+w+A+y+v+A+C+p+C+z+F+A+C+C+C+C+C+C+t+D+F+F+w+ ", " h+z+z+8+u+u+u+u+h+p+0+f+p+s+v+C+u+A+s+C+z+w+w+A+D+A+C+C+C+C+C+B+t+E+F+F+F+y+ ", " ;+w+s+z+8+u+u+u+u+f+p+0+f+p+s+A+A+y+y+w+z+C+n+B+B+z+B+C+C+C+C+A+t+F+F+F+F+A+z+ ", " 4+p+v+y+0+u+u+u+t+f+p+4+o+n+t+C+w+A+s+B+B+p+B+A+A+B+C+C+C+C+z+v+F+F+F+F+y+C+A+ ", " ;+u+w+u+h+u+u+u+o+o+f+0+p+p+w+C+u+y+w+y+y+z+z+B+z+C+C+C+C+v+y+F+F+F+C+z+F+F+z+ ", " ;+s+s+z+t+p+u+u+u+n+p+0+h+p+t+w+y+z+s+A+A+t+z+C+w+C+C+C+C+t+A+F+F+F+B+A+F+F+F+w+ ", " f+v+s+z+s+o+u+u+u+h+p+f+f+n+t+B+v+y+w+z+n+A+B+u+C+C+C+C+s+B+F+F+F+z+B+F+F+F+F+ ", " w.w.[..+.+[.0.U O w..+ 8+v+v+s+z+s+h+u+u+u+f+p+h+f+n+u+B+w+o+h+o+w+B+t+C+C+C+B+o+B+F+F+E+y+E+F+F+F+F+B+ ", " w.t.W W W W O W W ^.i i i i i W O [.P.4+t+v+v+s+z+s+h+u+u+t+h+n+e+o+s+v+w+y+;+0+s+z+t+C+C+C+B+p+D+F+F+B+z+F+F+F+F+F+F+A+ ", " P.[.O W O <.<.<.}.}.}.h.b.h.L.}.}.}.^.}.}.^.w.p+v+v+u+t+z+s+h+u+u+o+o+e+n+o+w+v+u+f+4+h+y+u+B+C+C+z+p+E+F+F+A+B+F+F+F+F+F+F+F+w+h+ ", " [.W W W <.^.W b.h.b.h. +}. + +h. +h.h.I.}.<.A.e+v+v+v+h+w+z+s+n+u+u+h+p+e+n+h+w+y+u+;+0+u+v+A+C+C+w+s+F+F+F+y+C+F+F+F+F+F+F+F+F+u+ ", " w.O ^.W b.}.}.}.h.h.}.}.h.h.h.i.i.}.i.h.h.=.o.h.w.p+v+v+v+f+z+y+s+o+u+u+h+p+f+f+s+v+v+e+4+p+t+y+C+C+u+u+F+F+C+z+E+F+F+F+F+F+F+F+F+E+f+ ", " [.W ^.W ^.h.}.h.h.I.i.h.I.o.&+o.&+o.&+I.&+Y.o.Y.o.[+;+p+v+v+v+n+z+u+u+n+u+u+f+n+h+f+v+t+e+;+e+t+v+C+C+s+y+F+F+B+A+F+F+F+F+F+F+F+F+F+F+A+ ", " ,+_.^.^.^.L.}.}.}.h.Y.h.I.Y.o.&+G.G.&+o.&+S.G.&+i.&+L.4+e+p+v+v+v+p+z+t+w+h+u+s+h+0+o+f+A+n+;+8+p+o+C+C+p+A+F+F+z+B+F+F+F+F+F+F+F+F+F+G+G+s+ ", " w._.^.^.h.L.h. +h.I.I.}.h.i.}.o.G.o.&+&+o.&+&+o.&+S.E.,+s+e+p+v+v+v+h+z+s+w+h+u+o+p+0+p+o+w+e+4+e+h+C+B+s+B+F+E+y+E+F+F+F+F+F+F+F+F+G+G+G+y+0+ ", " .+W m.^.L.h.h. +h.G.&+o.&+&+o.&+%+G.o.G.G.!.G.G.!.S.G.P.h+s+f+p+v+v+t+n+z+s+w+h+u+h+n+n+n+t+s+4+4+f+B+A+s+B+F+C+z+F+F+F+F+F+F+F+F+G+G+G+G+G+ ", " t.^.^.^.I.b.I. +h.G.&+G.G.&+&+o.!+!+G.!+!+!+G.~+~+G.~+W.f+o+s+f+p+v+v+s+s+z+s+w+n+u+h+h+t+e+A+8+4+8+A+z+s+C+F+A+B+F+F+F+F+F+F+F+G+G+G+G+G+G+A+ ", " t.^.m.h.h.<.i. +h.Y.&+Y.G.&+&+o.%+!+!+G.!+!+!+G.~+~+G.^+,+p+s+r+e+d+[+^+8.o.b+d+v+e+r+[+6+t+0+s+4+;+y+w+u+E+E+v+C+F+F+F+F+F+F+G+G+G+G+G+G+G+G+ ", " [.j.m.h.L.h.Y.h.V h.Y.Y.o.&+&+&+G.!+!+&+G.!+!+&+F.~+~+/+P.t+n+2+~.G G P J G .. .y t t q C .6+e+0+R.u+v+u+F+y+t+E+F+F+F+F+C+F+G+G+G+G+G+G+G+G+A+ ", " O m.<.h.L.}.Y.Y.o.S.&+o.h.o.o.S.o.!+!+!+G.!+!+!+U.%+~+~+<.o+r+L.Z y G G ..q s y .q ..G J a C y ^.,+t+t+y+D+p+y+C+F+F+F+C+A+G+G+G+G+G+G+G+G+G+F+ ", " [.^.^.h.L.h. +Y.I.G.&+&+G.&+!+!+G.8.F.G.G.!.S.S.G.o.G.F./.O V P J y t y C >...C Z ,...P G G y y h a q r+z+A+p+y+D+F+F+E+z+C+G+G+G+G+G+G+G+G+G+G+u+ ", " w._.W h.L.h.I.Y.Y.o.&+&+&+G.!+!+!+G.:+:+:+~+F.:+:+:+U.:+*+v Q h '.S *.Z C Z '.'.P Z Z ,.C J m ..s C h y !.r+s+y+E+F+F+B+A+G+G+G+G+G+G+G+G+G+G+G+F+n+ ", " ,+_.^.}.}.h.I.Y.Y.i.&+&+&+o.!+!+!+%+U.:+:+:+F.:+:+:+:+U.*+Q S S h '.S *.S P Z '.Z (.P Z ,.'.a m (.G 3 C ~.s V z+F+F+D+z+E+G+G+G+G+G+G+G+G+G+G+G+G+t+ ", " [.m.<.L.b.h.I.Y.o.&+&+&+S.U.!+!+!+G.:+:+:+:+G.:+:+:+:+U.k.S *.S h '.S *.S P Z '.Z 5.y Z ,.,.G y G m ..q .s &.b+E+z+B+G+G+G+G+G+G+G+G+G+G+G+G+E+z+ ", " w.j.^.L.L.h.Y.I.h.o.&+&+&+G.!+!+!+!+F.:+:+:+:+F.:+:+:+:+U.S S '.Q h '.S *.S '.J '.Z 5.(.C ,.'.z h h m y y t f.f.q [+F+G+G+G+G+G+G+G+G+G+G+E+y+t+z+w+ ", " _.^.E.L.b.Y.Y.Y.o.&+I.o.o.&+!+!+!+U.~+:+:+:+~+F.:+:+:+:+>.v S '.Q G G *.*.*.'.C '.'.5.'.y ,.Z m y 3 /...6. .~.J /.i.C+G+G+G+G+G+G+G+C+A+u+t+A+C+B+ ", " .+j.}.L.h.o.Y.Y.i.&+&+&+&+G.G.G.G.G.G.:+:+:+:+F.:+*+N.N.k.m S S '.Q S J *.*.*.'.C '.'.6.J y q y m Z 6.J (.(.6.t f.F.8.b+G+G+G+G+C+A+A+w+y+B+C+C+C+t+ ", " _.W L.L.h.Y.Y.Y.o.&+&+&+G.%+:+J.u.>.h 6 6 6 6 c 6 ) ) 6 m y G G ..m G s J J J J y y >...*.%.>.Z '.S S P u.6.u.c.c.F.F.!.x+C+A+A+B+z+y+C+C+C+C+C+z+ ", " .+_.<.L.b. +Y.Y.i.&+&+f.>.h g ^ , _ ) 5 ^ 5 5 5 ) 5 5 5 v '.h Z Z 5.Q %.J :.%.:.1.%.G 1.1.%.*...'.v '.N.6.>.J.J.J.&.F.f./.=.B+B+z+A+C+C+C+C+C+C+B+ ", " A.^.E.}.h.Y.G. .3 ) ) ) ) ) , _ ( ( < f e f e f < 5 f p Q 1.J %.%.:.%.%.J :.%.1.1.%.G 1.1.Q 1.*.C N.N.5.a.c.J.J.u.~. .f.8.q [+B+C+C+C+C+C+B+v+C+v+ ", " .+_.b.h.V 3 % ) % ( ( ( ( > ( ( ( ( ( [ e e f f f g f p %.Q 1.J %.%.:.%.:.J :.%.g.1.%.G 1.1.Q *.1./.k.5.N.N.l.>.6.u.J.&.&.P /.!.A+C+C+C+z+y+z+u+v+ ", " t.8 4 % % > > % % ( ( : [ < ( ( ( f < ].%.e.H.*+F.*+%.Q 1.Q 1.G %.%.:.%.:.J :.%.g.1.%.z 5.1.Q 1.1...6.k.k.k.N.c.J.6.P P &.f.f.!.b+B+y+y+B+C+w+4+ ", " 9 . # % # > > > > < > > [ > f g (.J.~+F.:+:+:+:+:+F.H.Q 1.1.%.*.>.%.:.:.%.:.J :.%.g.1.%.1...1.*.*.1.g.~.N.N.N.N.~.P /.u.u.&.f.f.P E.A+C+C+C+B+ ", " F / ' . + + # > > > > [ ( g .!.F.&+~+~+!+F.:+:+:+:+:+c.v %.1.1.%.S >.%.:.%.%.:.J :.%.g.1.Q g.(.*.g.g.`.`.c.N.f.~.~.6./.u.u.u./.P ~.c.!.x+C+C+C+f+ ", " |.F / o r @ . + + > [ > > c >.U.&+S.&+~+%+F.F.o.U.~+:+:+:+*+h *.1.1.1.%.S >.%.:.%.%.:.G '.%.g.1.Q g...1.5.u.l.l./.P a.N.N.k.P (.z ,.6.!.c.c.&.b+C+C+u+N / w ", " w / k d o d $ * + * > > c !.&+&+&+&+G.~+~+~+~+~+F.:+~+%+%+f.h y J C >...Z Z ..%.1.%.Z '.G C G >.>.J >. .>.u.N.g.g.x.~.5.5.5.*.J (.u.u.u.&.c.c.c.V B+B+s.I r k d w ", " K / r D D E D I $ # * # s G. +o.&+&+&+&+S.~+~+~+~+~+U.:+:+:+*+S Z (.:.:.k.5.Z J D.D.D.D.D.#+#+>.e.M.q.).M.e.6.g.g.g.1.1.>.k.5.5.k.N./.u.u.u.f.&.c. .=.r+0+R D I D k o } K ", " w / u r R D +.@.b * # 8 h.I. +h.&+&+&+&+&+F.~+~+~+~+!+%+:+:+:+k.S J 5.:.:.q.:.:.Z #+{+{+{+{+{+{+{.q.M.:.q.).e.G :.g.g.V.g.>.5.N.N.N.N./.u.u.u.u.&.8.8.!.[+* l D o d u d E d x n. ", " n.d d u o r d D o 2.' . }.<.I.h.h.o.&+&+&+&+G.!+~+~+~+~+%+~+:+:+:+Q S J :.:.%.q.:.:.'.#+{+{+{+{+{+{+T M.q.M.).e.M.l.V.x.g.g.x.6.u.N.N.N.N./.l.u.J.K.!.8.c.8.=.! | D o R o L o B o l d. ", " w 1 o B r L D $.D D N U ^.E.}.I.I.I.h.G.&+&+&+G.~+~+~+~+~+F.:+:+:+S Q S J :.:.%.q.:.:.(.{+{+{+{+{+{+{+T :.e.q.-+-+-+>.g.g.x.x.x.x.~.N.N.N.N.J.c.K.c.c.c.8.c./.h.I.U } u o R o R r B o o w ", " w 1 o B r L r $.D +.N P.b.E.b.I.I.L.I.S.o.o.&+G.~+~+~+~+~+F.:+:+S Q S Q J :.:.%.:.:.:.(.++{+{+{+++{+{+T q.q.-+-+M.M.l.x.x.x.x.x.V.c.N.N.N.N.J.!.c.K.K.K.!.c.F.h.I.d+ } u o D d u d o d o w ", " F d d u d D d I r $.d .+E.b.h.I.I.h.S.&+&+&+o.G.F.%+~+~+~+U.:+S v *.Q S J :.:.:.:.:.:.>.{+{+{+{+++{+{+{.).M.M.M.M.M.{.1.1.g.g.V.`.f.N.u.f.f.u.c.K.K.K.K.!./.&+o.h.[+ ; r o B r L r $.r D v. ", " s.o k B u R E E u u / .+^.<.I.I.I.h.&+&+&+&+I.!+!+&+S.F.U.U.Q S Q *.S S >.:.:.:.:.:.:.>.{+{+{+{+++{+{+{.:.M.M.M.M.-+Z.J.`.`.`.J.l./.c.J.N.N.N.f.K.K.K.K.&.F.&+I.}.[+ & 0 u u E E u E u o s. ", " o E r L r $.r $.r u w w._.^.I.I.I.h.&+&+&+&+I.!+!+!+!+!+F.h m J m J G Z >.:.:.1.:.:.:.{.{+++{+{+++{+++D.-+M.M.-+:+`.K./.l.l.l.N.`.N.f.N.N.N.N.l.f.K.K.K.&.&+&+o.b.[+ K k o B d u d I o E o ", " N o k B u B R u E E l w.j.^.h.I.I.i.&+&+&+&+G.!+!+!+!+!+G.v Z Z S S z J C ....>.G ....>.D.].D.D.].].D.9.l.l.K.K.J.J.`.l.`.`.`.x.x.k.~.a.k.k.k.5.P ..(.l.S.Y.o.I.}.[+ ' ~ d 1 B B D R d o N ", " d k o u o u o r d o w w.j.^.b.h.I.o.&+&+&+&+G.!+!+!+!+~+y v '.Z Z S S ..Z 1.*.1.%.%.*.C :.).M.e.).e.M.>.q.q.q.q.q.q.q.(.g.g.x.x.x.g.P 5.5.a.k.k./.l.!+!+!+=.I.Y.}.[+ 9 0 1 0 u L D $.D +.-. ", " s.r $.r $.r L k B k u 7. [.j.<.L.h.<.G.&+&+&+&+G.!+!+!+!+..a S Z '.Z S S J Q 1.1.1.%.%.%.J :.).e.:.M.-+-+l.V.V.V.V.V.V.q.>.g.g.g.g.x.`.c.N.N.k.k.k.P K.!+U.G.h.Y.Y.}.A. 9 0 1 u k L D $.D $.I s. ", " o D $.D $.r L k B k u 7. 6+j.<.L.L.}.o.o.S.&+S.F.!+!+!+(.z C S '.'.Z S S J %.1.%.1.%.%.:.J e.).).M.-+-+-+c.q.q.q.x.q.x.V.l.`.`.`.`.`.`.f.k.N.N.N.N.c.&+G.U.&+i.Y.Y.}.A. 9 { / 2 d u d u r $.I ;. ", " D D $.D $.r B d u r 0 K .+j.^.L.L.b.Y.Y.o.o.o.!+!+!+(.z ..h S '.'.Z S S J %.1.1.1.%.Q 1.>.e.).e.M.M.M.M.>.V.V.V.V.V.x.x.6.x.g.g.g.g.g.~.k.5.5.5.6.8.G.&+&+&+h.Y.Y.^. |.~ 1 0 u L u L o Y N D ", " I D I d D o u u 2 k { F _.^.L.L.b.Y.Y.Y.Y.i.G.F.G z z ..h *.'.'.S S S J %.1.%.1.%.Q 1.>.%.M.M.M.M.M.M.l.x.x.x.x.V.V.V.l.H.H.g.g.g.g.>.a.6./.c.%+G.&+&+&+&+i.Y.Y.W w ~ 0 2 L B I $.E 2.-.-. ", " o D $.I $.L u L k 0 1 d [.^.L.L.b.Y.Y.Y.Y.o.%+f.a a a J h *.Z '.S S S J :.%.%.1.%.Q 1.G M.-+-+-+-+-+-+l.V.V.x.x.g.x.x.6.g.x.V.H.k.6.P /.>.u.:+:+F.&+&+&+&+o.Y.h._. - ~ 0 r L u L $.R 2.-.-. ", " I -.$.+.R $.u L B k 0 2 n. t.W h.L.b.Y.Y.Y.Y.o.f.m m ..m P s C J >.,.'.S J :.%.%.1.:.%.Q >.-+-+M.M.M.M.M.l.g.q.x.V.V.V.V.6.a.(.>.>.f.N.l.(.u.:+:+:+S.&+&+&+&+o.o.}.[+ 7.& { { o u r L L +.2.2.;. ", " x 2.@.$.E $.R u E d 1 { / .+_.<.b.b.Y.Y.Y.Y.!.m G ..G m J h '.z ..G C h y ..G G ..(.S Q J e.M.M.-+-+>+>+l.u.u.l.l.l.l.l. .u.N.N.N.N.N.l.6.:+:+:+:+S.&+&+&+&+=.h.b.A. & { 2 k B u R E r Y @.z.v. ", " d.-.R $.R u I o k B 1 0 { b [.b.m.^.Y.Y.Y.Y.t m ....G m G J '.z ,.z '.z J 5.S Q 5.z ..l./.6.6.6.6.6.6.(.~.(.g.g.g.g.k.k.~.5.5.5.5.5.5.6.~+:+:+:+:+F.&+&+&+o.}.I.}. / - 2 1 B B I $.R 2.z.@.-.d. ", " o $.D -.@.L $.u B B 1 0 { { [.j.E.^.h.I.Y.y 3 G ....m G m J '.Z Z Z '.z J 5.S 5.S *.H.k.>.x.H.x.g.g.g.g.6.5.g.g.g.1.*.*.J '.5.k.k.k.k.%+!+:+:+:+:+F.&+G.o.Y.h.I.t. / - 2 1 B B u $.L 4.z.4.X.4.)+ ", " s.-.p.$.2.E L $.u B L r 0 ~ { .+^.E.b.h.h.4 a t G ....m G m J Z Z Z z '.z J *.5.S Q *.*.5.>.g.g.g.x.`.`.`.u.N.H.H.g.H.H.H./.N.N.N.N.k.:+%+%+:+:+:+:+G.o.Y.Y.o.I.L. ' = { { k k r $.$.@.z.2.z.p.1+ ", " ;.z.p.$.2.I L $.u B u d { { ' F W E.E.V a 3 q 4 P ....m G J J Z '.z z '.z J '.Q *.k.k.k.5.>.g.g.g.g.g.g.g.6.k.H.H.H.H.H.H./.N.N.N.k.*+:+%+%+:+!+F.G.o.Y.Y.Y.i.I.E. w = ~ 1 k B u u E D o z.y.p.z.T. ", " ;.z.2.$.2.I R D o k B u 1 2 - } |.E.j.] 3 t t q y t s C G J J Z '.z z '.'.J S S k.k.k.k.k.f.H.H.H.H.H.H.H.6.5.1.1.1.1.1.1.J 5.5.k.H.:+:+%+S.G.G.%+!+G.Y.Y.Y.h.h.P.; - 2 1 E B u R $.L -.z.Y @.X.T. ", " c+;.z.4.$.-.Y R $.L D E B u 1 1 - w U ] 3 t t q a C h y t a y Z '.z z ,.z C *.*.S S *.S S G *.*.1.1.1.1.1.,.'.1.1.1.1.1.k.~.5.*+*+~+U.U.o.U.!+!+!+!+o.Y.Y./+<.9 ; = { r B B D $.$.R p.z.y.y.@+;._+ ", " _+Y 4.@.2.z.p.@.L $.R u B B k 1 / = | 7 q t t t C h h C C 3 y P y C h ,./.k.k.k.5.1.5.5.>.1.1.1.g.k.H.H.u.N.`.`.`.`.`.H.P c.U.F.%+!+~+G.%+!+!+!+!+o.^+#.| & - ~ 2 u k o I $.$.@.z.z.p.X.X.@+1+ ", " 5+B.z.X.4.p.z.2.E $.$.E D o k k 1 ~ - = $ j q C h h C C 3 ....m m m P &.~.~.~.f.f.f.l./.u.u.u.u.u.u.l.f.c.f.f.f.f.f.>.F.!+~+~+~+~+~+G.!+!+!+'+ +n ; - ~ 1 k B E u I $.I D 4.z.z.p.(+@+@+c+ ", " s.B.p.X.z.4.z.z.-.E I R E u u B E 2 ~ ~ - ; n 4 y C C 3 G m G l.l.l.&.6.6.6.6.6.6.u.8.l.u.u.u.u.J.J.c.u.J.J.J.J.a.:+F.~+~+~+~+~+~+G./+W.#.| = = ~ 1 E B u u R $.$.@.-.z.@.p.@+(+@+}+ ", " T.p.z.X.p.2.z.-.-.@.L $.$.I u u B u 2 { = & = | 7 7 s ~.l.l.l.l.&.u.u.u.u.u.u.6.P 5.a.a.5.a.a.J./.u.J.J.J.a.:+:+F.~+~+!+/+C.#.| = & - ~ 2 u k k k I $.$.R -.p.X.O.p.y.@+@+@+1+ ", " )+T.y.z.z.4.p.z.z.p.-.E $.$.R u u r u u k 2 1 { & & ; | 7 A q 3./.F.6.6.6.6.6./.a.a.a.a.,.'.'.P Z '.5.!+'+^+C.H #.n | ; - - ~ 2 u B B u u u E D $.R -.p.X.z.p.@+<+(+(+B._+ ", " v.p.B.@+(+@+p.p.z.z.2.-.R $.D E I u u u B B E k 2 1 & = & & = ; ; F n #.H ` H H H 7 ` ` X n n n | ; = & & & { ~ 1 2 l B B u u u E $.$.$.R -.o z.X.z.p.@+<+(+9+|+1+ ", " 1+]+(+@+(+(+p.p.z.z.z.Y @.R R $.$.$.R I u u u u B B u u k 2 2 1 1 ~ - & - { ~ ~ ~ ~ ~ ~ ~ { 1 2 k u B B B u u k r r E $.$.$.R -.4.p.X.X.z.;.p.(+<+(+9+|+_+ ", " R.0.n.B.|+|+@+<+@+p.@.p.X.X.z.p.4.-.@.R $.$.R r E I I u u u u k u B r B B B B B B E u u u r o u u u I E R +.$.$.$.R R R 4.p.X.X.X.p.y.@+(+7+B.(+9+]+s. ", " 0+R.R.4+4+f+4+3+v.]+|+@+@+@+(+@+y.p.p.z.X.X.z.p.-.o R R R +.$.$.$.$.$.$.R r E R R R R R R +.$.$.$.I $.$.$.+.R R -.-.4.p.p.4.X.X.z.p.@+@+7+7+(+9+a+]+}+d. ", " R.4+n+0+8+f+h+0+n+4+n.T.]+a+9+(+(+7+<+X.@+y.p.p.z.p.X.X.z.z.y.p.2.4.4.-.-.o R -.-.-.-.-.-.-.-.-.-.;.4.p.p.z.X.X.X.X.@+p.p.p.4.@+<+7+(+(+a+9+9+}+5+ ", " e+;+h+h+f+8+e+n+n+e+n+e+0+p+R.)+_+]+9+9+7+(+@+(+7+<+4.@+@+@+y.y.p.p.z.@+X.X.X.p.X.X.X.X.X.X.X.X.X.X.X.p.z.z.p.p.@+@+@+@+(+7+7+7+y.(+7+a+9+]+_+ ", " 0+n+h+h+8+e+e+e+f+e+e+e+f+p+o+p+p+A+u+j+5+1+|+9+a+9+p.(+(+(+<+7+7+7+<+(+@+@+@+4.@+@+@+@+@+@+@+@+@+@+|+|+p.7+7+7+<+(+(+9+a+g+l+g+9+]+1+s. ", " 0+R.n+o+0+h+8+f+f+8+f+e+f+f+e+w+s+t+p+f+e+f+p+s+P.X M v.T.|+9+a+a+a+g+a+a+7+9+(+@+B.(+(+9+9+9+9+9+9+9+k+g+g+]+g+l+g+g+g+9+]+1+$+Q.r.3+ ", " R.R.R.f+o+f+f+8+0+n+4+h+0+0+n+n+8+0+f+p+p+n+n+e+4+8+P.8 4 q V W H #.M M x $+T.}+|+9+q+q+q+q+q+k+k+k+m+m+m+m+i+1+_+Q.r.=+W.L.L.h.h._..+ ", " ;+0.;+R.0+e+n+f+0+8+4+s+4+n+e+o+f+v+y+w+s+h+f+h+p+s+t+s+o+n+w.] ] ] 4 3 3 ! ! 4 s 8. +2+W.W.W.2+2+b+^+I.I.h. +^+^+^+Y.h. + + + +^.^.t. ", " 0.4+4+e+4+0+e+f+e+;+f+e+o+e+h+w+A+z+w+y+B+G+G+G+G+C+B+F+E+C+B+A+n+i i 8 q q q t V + + + + + +h.Y.Y.Y.Y.Y.i.I.Y.Y.Y.Y.I.h.I.h.}.W A..+ ", " R.0.0+8+0+0+8+f+8+o+4+n+R.p+A+z+t+n+n+s+w+z+w+y+A+G+G+G+G+G+G+G+G+G+B+d+W i ] V }.<.h.I. + + + +h.Y.Y.Y.Y.Y.h.Y.Y.o.h.h.<.}.b.b.[..+ ", " 0.R.;+;+8+8+f+4+h+4+p+;+s+y+p+h+s+u+t+t+p+s+p+t+w+u+t+y+A+F+G+G+G+G+G+G+G+B+w.t.j.m.E._.b.}.}.}.b.<.h.h.h.b.b.<.}.b.E.L.<.b.j.[+ ", " R.0.R.;+8+;+8+;+n+8+h+;+o+w+p+h+h+o+o+p+t+A+B+z+w+t+p+v+t+s+s+f+s+A+F+G+G+G+C+ .+A.W b.E.E.E.<.L.L.L.L.L.<.L.b.m.[+.+ ", " p+8+R.;+R.;+;+;+0+R.f+e+e+p+p+e+0+h+n+o+n+t+t+n+t+v+z+A+B+B+B+B+A+v+s+h+4+p+A+B+ [.w.t.[.W [.t.t.[.w.w. ", " p+p+e+8+;+;+;+;+8+R.;+8+f+o+s+w+o+8+e+h+f+f+p+s+n+t+u+u+s+h+p+t+w+w+w+w+v+A+o+0. ", " p+s+h+8+e+n+h+;+R.R.8+8+8+0+f+8+0+0+0+h+p+s+o+n+u+s+h+f+h+e+8+p+v+u+p+f+n+v+w+n+ ", " n+s+o+e+e+p+n+4+;+ ;+;+;+e+n+f+o+t+z+B+y+s+f+f+8+4+e+h+s+s+t+n+s+v+s+h+f+s+A+t+p+ ", " o+s+s+n+h+s+o+8+0. 0+0+8+4+R.8+4+8+p+n+w+C+F+F+F+D+z+s+h+8+f+t+w+s+p+u+t+t+ ", " h+s+t+p+p+s+s+0+R. 8+8+8+f+4+;+o+h+h+s+A+F+F+F+F+F+y+0.0.h+u+v+ ", " h+e+n+s+t+v+f+4+ 8+e+p+f+8+8+;+e+8+8+w+E+E+v+ ", " 0+4+e+f+o+n+8+ o+s+u+u+o+8+o+e+h+ ", " f+n+ s+t+p+o+ ", " "}; spatialite_gui-2.0.0-devel/icons/AttributionDisclaimer.txt0000664000175000017500000000146212543275035020722 00000000000000ATTRIBUTION DISCLAIMER All Icons used by spatialite_gui derive from the following original work released on CC-BY terms: ---------------------------------------------------------- Silk icon set 1.3 _________________________________________ Mark James http://www.famfamfam.com/lab/icons/silk/ _________________________________________ This work is licensed under a Creative Commons Attribution 2.5 License. [ http://creativecommons.org/licenses/by/2.5/ ] This means you may use it for any purpose, and make any changes you like. All I ask is that you include a link back to this page in your credits. Are you using this icon set? Send me an email (including a link or picture if available) to mjames@gmail.com Any other questions about this icon set please contact mjames@gmail.com spatialite_gui-2.0.0-devel/icons/coverage_tiles.xpm0000664000175000017500000000505112543275035017377 00000000000000/* XPM */ static const char * coverage_tiles_xpm[] = { "16 16 114 2", " c None", ". c #AA7128", "+ c #A96F27", "@ c #A76E26", "# c #A56C25", "$ c #A36A23", "% c #A06822", "& c #9D6620", "* c #9B641F", "= c #98611D", "- c #955F1C", "; c #A86F26", "> c #DDA252", ", c #DA934D", "' c #D59243", ") c #D1913C", "! c #CD8E3C", "~ c #CB8B3A", "{ c #BE843E", "] c #CA924B", "^ c #905B19", "/ c #D8903F", "( c #61BCF3", "_ c #62BDF3", ": c #5DB8F1", "< c #4DA6E9", "[ c #368EDE", "} c #CA9249", "| c #8C5817", "1 c #A26A23", "2 c #DD9148", "3 c #5CB6F0", "4 c #5EB8F1", "5 c #5CB7F0", "6 c #A47536", "7 c #A27234", "8 c #9F7032", "9 c #A86E26", "0 c #A16922", "a c #9E6721", "b c #D98F46", "c c #4BA4E8", "d c #4FA8EA", "e c #4CA5E8", "f c #A17233", "g c #D2A15B", "h c #CE9256", "i c #D49244", "j c #CC8D39", "k c #9A631F", "l c #D48A43", "m c #368DDE", "n c #3890DF", "o c #9B6F35", "p c #CC8F49", "q c #35C62D", "r c #40C723", "s c #3CC321", "t c #3BCD27", "u c #43D12E", "v c #57DA3F", "w c #96601C", "x c #CC8A43", "y c #6EE454", "z c #CF9037", "A c #885514", "B c #925D1A", "C c #8F5A18", "D c #6EE46E", "E c #CA8B51", "F c #845112", "G c #38BAED", "H c #58BFFF", "I c #62BBFF", "J c #44B6FF", "K c #DBEB8C", "L c #FFFF6D", "M c #78EF69", "N c #CE8F45", "O c #804E10", "P c #3BCE45", "Q c #07BE31", "R c #5AB7FF", "S c #58B6FF", "T c #97D1CC", "U c #F3FA8A", "V c #C99A40", "W c #C7883D", "X c #7D4C0E", "Y c #4BC84F", "Z c #36CB21", "` c #42C825", " . c #54B8AC", ".. c #42A6FF", "+. c #00A2FF", "@. c #7E4D0F", "#. c #7C4B0E", "$. c #7A490D", "%. c #77F35E", "&. c #A4FF8C", "*. c #ACFF77", "=. c #7CF634", "-. c #75EF55", ";. c #64FF79", ">. c #C59046", ",. c #C6954A", "'. c #E8D462", "). c #E9D461", "!. c #C99644", "~. c #8C5816", "{. c #895515", "]. c #865313", "^. c #835112", "/. c #804F10", " ", ". + @ # $ % & * = - ", "; > , ' ) ! ~ { ] ^ ", "# / ( _ ( : < [ } | ", "1 2 3 4 5 6 7 8 9 0 % & * = - ", "a b c d e f g h i j ! ~ { ] ^ ", "k l m n [ o p q r s t u v } | ", "w x . + @ # $ % & * = - y z A ", "B C ; > , ' ) ! ~ { ] ^ D E F ", " # / G H I J K L } | M N O ", " 1 2 P Q R S T U z A V W X ", " a b Y Z ` ...+.E F @.#.$. ", " k l %.&.*.=.-.;.N O ", " w x >.,.'.).!.V W X ", " B C ~.{.].^./.@.#.$. ", " "}; spatialite_gui-2.0.0-devel/icons/tmp_view.xpm0000664000175000017500000000533612543275035016244 00000000000000/* XPM */ static const char * tmp_view_xpm[] = { "16 16 125 2", " c None", ". c #D8CECE", "+ c #D7CCCC", "@ c #D5CACA", "# c #D3C8C8", "$ c #D2C6C6", "% c #D9CECE", "& c #EBE4E4", "* c #F6F3F3", "= c #FCFBFB", "- c #FCFCFC", "; c #F8F5F5", "> c #ECE6E6", ", c #CEC2C2", "' c #D7CDCD", ") c #FAF9F9", "! c #FAF8F8", "~ c #CBBFBF", "{ c #BACCEF", "] c #B7CAEF", "^ c #B3C8ED", "/ c #AFC5EC", "( c #ABC3EB", "_ c #A8C0E9", ": c #A5BDE8", "< c #A1BBE6", "[ c #D6CBCB", "} c #F9F6F6", "| c #F2EDED", "1 c #F1ECEC", "2 c #E2D9D9", "3 c #F8F6F6", "4 c #C9BDBD", "5 c #FAF9FC", "6 c #9BB8E4", "7 c #FBFAFA", "8 c #EEE7E7", "9 c #F7F4F4", "0 c #E7DFDF", "a c #FEFEFE", "b c #C6BABA", "c c #BADCA5", "d c #B5DAA1", "e c #B0D89C", "f c #ABD698", "g c #A8D494", "h c #A3D290", "i c #96B4E2", "j c #D2C7C7", "k c #EAE3E3", "l c #E4DCDC", "m c #C3B7B7", "n c #90B0E0", "o c #D0C5C5", "p c #E8E0E0", "q c #E0D7D7", "r c #E1D8D8", "s c #C0B3B3", "t c #CAD6F1", "u c #8AADDE", "v c #CEC3C3", "w c #E4DBDB", "x c #BAADAD", "y c #CED9F0", "z c #F6F6F9", "A c #84A9DC", "B c #CCC0C0", "C c #F5F1F1", "D c #B8AEB3", "E c #D0DAF1", "F c #D2DAF1", "G c #D2D9F0", "H c #D5DCF0", "I c #EFEFF6", "J c #7DA4D9", "K c #C1BCC5", "L c #CDC2C2", "M c #C1B8BC", "N c #C1BFCB", "O c #F9F7F7", "P c #EEEEF6", "Q c #78A0D8", "R c #B1C3E5", "S c #EEE9ED", "T c #CCCFE1", "U c #CFD5E7", "V c #D2D9ED", "W c #D4DCF1", "X c #D7DEF1", "Y c #D0D9F0", "Z c #ECECF5", "` c #77A0D6", " . c #A9C1EA", ".. c #F7F7FB", "+. c #DADFF2", "@. c #D9DFF1", "#. c #F9F9FC", "$. c #84A7D9", "%. c #A6BFE9", "&. c #D9DFF2", "*. c #DBE0F2", "=. c #D5DDF1", "-. c #80A4D8", ";. c #A1BCE6", ">. c #DCE1F2", ",. c #DCE2F2", "'. c #CFD9F1", "). c #84A6D8", "!. c #9CB9E4", "~. c #F6F6FA", "{. c #F5F5F9", "]. c #F3F3F9", "^. c #F1F1F8", "/. c #EFEFF7", "(. c #EEEDF6", "_. c #82A4D7", ":. c #99B7E4", "<. c #95B2E2", "[. c #8EAFE0", "}. c #89ACDE", "|. c #83A8DC", "1. c #7FA4DA", "2. c #79A1D9", "3. c #749ED6", "4. c #6091CF", " . + @ # $ ", "% & * = - ; > , ", "' ) ! = - ) ) ~ { ] ^ / ( _ : < ", "[ } > | 1 2 3 4 5 5 5 5 5 5 5 6 ", "@ 7 8 9 0 0 a b c d e f g h 5 i ", "j 7 k 9 l l a m a a a a a a 5 n ", "o 7 p * q r a s t t t t t t 5 u ", "v = & 1 w 0 a x a a y a a a z A ", "B l C ; } * w D E F y F G H I J ", " K L M ~ N O a a y a a a P Q ", " R S T U V W W X y y G Y Z ` ", " ...X a +.a a a @.#.a a Z $.", " %...&.+.+.+.+.*.=.=.=.=.Z -.", " ;...>.a ,.a a a '.a a a Z ).", " !.~.{.].^./.(.Z Z Z Z Z Z _.", " :.<.[.}.|.1.2.3.3.3.3.3.3.4."}; spatialite_gui-2.0.0-devel/icons/loaddbf.xpm0000664000175000017500000000754112543275035016005 00000000000000/* XPM */ static const char * loaddbf_xpm[] = { "16 16 193 2", " c None", ". c #4C6D9D", "+ c #4B6D9D", "@ c #4B6C9D", "# c #4A6C9C", "$ c #496B9C", "% c #496A9B", "& c #486A9B", "* c #47699A", "= c #466899", "- c #456798", "; c #436493", "> c #3E5D84", ", c #7897BB", "' c #6282AC", ") c #6181AC", "! c #6080AB", "~ c #5F7FAB", "{ c #5E7FAA", "] c #5D7EA8", "^ c #5C7CA8", "/ c #436697", "( c #3C5C88", "_ c #7897BA", ": c #B9C5D8", "< c #D7DEE8", "[ c #D6DDE7", "} c #D6DCE6", "| c #D4DBE4", "1 c #D3DAE3", "2 c #D1D8E2", "3 c #D0D7E1", "4 c #E5E7EB", "5 c #EFEFEF", "6 c #2A3E57", "7 c #4B6C9C", "8 c #A5C2D9", "9 c #7091B5", "0 c #5F80AB", "a c #5E7EA9", "b c #5C7DA8", "c c #5B7CA8", "d c #5A7BA7", "e c #5979A6", "f c #416496", "g c #4A6B9C", "h c #A9C8DD", "i c #95BDD4", "j c #B9D4E6", "k c #B6D1E6", "l c #B5D0E4", "m c #B3CEE3", "n c #B0CBE2", "o c #ADC9E0", "p c #A9C7DF", "q c #A0BFDA", "r c #4A6B9A", "s c #A6C5DB", "t c #76A7C6", "u c #9BBFD9", "v c #93B7D1", "w c #8EB0CB", "x c #8AAECA", "y c #87ABC8", "z c #83ABCB", "A c #87B0D1", "B c #9BBBD8", "C c #486A99", "D c #A4C2D9", "E c #72A4C1", "F c #94B8D2", "G c #E4EDF5", "H c #E2ECF4", "I c #E1ECF4", "J c #E0EBF4", "K c #DFEAF3", "L c #7FA9CB", "M c #96B8D6", "N c #476999", "O c #9FBFD7", "P c #6F9FBD", "Q c #90B5D4", "R c #88ADCB", "S c #81A8C7", "T c #7DA5C6", "U c #7AA1C4", "V c #76A1C5", "W c #6CA33D", "X c #659F31", "Y c #476A94", "Z c #9BBBD5", "` c #699AB8", " . c #8AB3D4", ".. c #87AFD2", "+. c #82ADD0", "@. c #7DAACF", "#. c #78A6CD", "$. c #74A4CB", "%. c #649F37", "&. c #81B35A", "*. c #579828", "=. c #2B4155", "-. c #456799", ";. c #96B7D2", ">. c #6592B4", ",. c #83AED1", "'. c #7FABCF", "). c #6FA53D", "!. c #6DA338", "~. c #67A134", "{. c #619D30", "]. c #7CAF55", "^. c #AACB91", "/. c #74AB4F", "(. c #458E18", "_. c #446698", ":. c #92B4D0", "<. c #608BAF", "[. c #7CA9CE", "}. c #77A6CC", "|. c #6BA337", "1. c #B0CE96", "2. c #ADCD94", "3. c #A8CB90", "4. c #90BC74", "5. c #A1C78A", "6. c #68A546", "7. c #358707", "8. c #436597", "9. c #8EB0CE", "0. c #5B85AA", "a. c #75A4CB", "b. c #71A2CA", "c. c #639F31", "d. c #8EBA6F", "e. c #89B86B", "f. c #85B666", "g. c #80B361", "h. c #82B567", "i. c #98C283", "j. c #5CA03C", "k. c #257F00", "l. c #88ACCB", "m. c #577EA6", "n. c #6E9FC9", "o. c #699DC7", "p. c #5B9B29", "q. c #A9CA90", "r. c #A5C88D", "s. c #A1C68A", "t. c #9EC588", "u. c #85B66A", "v. c #97C282", "w. c #66A548", "x. c #217D00", "y. c #406396", "z. c #85A9CA", "A. c #5478A3", "B. c #679AC6", "C. c #6298C4", "D. c #519722", "E. c #49911C", "F. c #438F16", "G. c #3B8B10", "H. c #5E9F3A", "I. c #96C180", "J. c #62A346", "K. c #207807", "L. c #3F6295", "M. c #85ABCC", "N. c #89AFD1", "O. c #88B0D2", "P. c #85ADD1", "Q. c #81AAD0", "R. c #7FA7CF", "S. c #7BA4CE", "T. c #7AA1CD", "U. c #2E8409", "V. c #5FA143", "W. c #227810", "X. c #1F433D", "Y. c #3E6194", "Z. c #3D6094", "`. c #3C6093", " + c #3B5F92", ".+ c #3A5E92", "++ c #395D91", "@+ c #385D90", "#+ c #385C90", "$+ c #375B8F", "%+ c #227C06", "&+ c #1E7B03", "*+ c #2F5F75", " . + @ # $ % & * = - ; > ", " . + , ' ) ! ~ { ] ^ . / ( ", " + _ : < [ } | 1 2 3 4 5 6 ", " 7 8 9 0 a a b c d e $ f 6 ", " g h i j k l m n o p q r 6 ", " % s t u v w x y z A B C 6 ", " & D E F G H I J K L M N 6 ", " * O P Q R S T U V W X Y 6 ", " = Z ` ...+.@.#.$.%.&.*.=. ", " -.;.>.,.'.).!.~.{.].^./.(. ", " _.:.<.[.}.|.1.2.^.3.4.5.6.7. ", " 8.9.0.a.b.c.2.d.e.f.g.h.i.j.k.", " f l.m.n.o.p.q.r.s.t.u.v.w.x. ", " y.z.A.B.C.D.E.F.G.H.I.J.K. ", " L.M.N.O.P.Q.R.S.T.U.V.W.X. ", " Y.Z.`. +.+++@+#+$+%+&+*+ "}; spatialite_gui-2.0.0-devel/icons/network.xpm0000664000175000017500000000173712543275035016104 00000000000000/* XPM */ static const char * network_xpm[] = { "16 16 37 1", " c None", ". c #707070", "+ c #C5C5C5", "@ c #A8A8A8", "# c #9A9A9A", "$ c #D1D1D1", "% c #737373", "& c #A4A4A4", "* c #979797", "= c #A0A0A0", "- c #D5D5D5", "; c #989898", "> c #777777", ", c #C7C7C7", "' c #A2A2A2", ") c #8D8D8D", "! c #9B9B9B", "~ c #A1A1A1", "{ c #7F7F7F", "] c #8A8A8A", "^ c #949494", "/ c #A7A7A7", "( c #909090", "_ c #939393", ": c #A3A3A3", "< c #7B7B7B", "[ c #A5A5A5", "} c #9D9D9D", "| c #7D7D7D", "1 c #9F9F9F", "2 c #848484", "3 c #727272", "4 c #7E7E7E", "5 c #858585", "6 c #9E9E9E", "7 c #DADADA", "8 c #FFFFFF", " ", " ", " 888888 ", " 8@/[&~=8 ", " 8@87-$,+!8 ", "888@8&=1#;;+^888", "866666:88*666668", "8777775 {777778", "855555#88%.....8", "888'8*(]24<+>888", " 8}87-$,+38 ", " 8_)5|>%8 ", " 888888 ", " ", " ", " "}; spatialite_gui-2.0.0-devel/icons/trigger.xpm0000664000175000017500000000452612543275035016055 00000000000000/* XPM */ static const char * trigger_xpm[] = { "16 16 102 2", " c None", ". c #9C9C9C", "+ c #9B9B9B", "@ c #999999", "# c #E4E4E4", "$ c #EEEEEE", "% c #969696", "& c #E2E2E2", "* c #E7E7E7", "= c #B9B9B9", "- c #939393", "; c #989898", "> c #CFCFCF", ", c #929292", "' c #8E8E8E", ") c #8C8C8C", "! c #8A8A8A", "~ c #DDDDDD", "{ c #C5C5C5", "] c #8F8F8F", "^ c #8D8D8D", "/ c #ACACAC", "( c #D7D7D7", "_ c #878787", ": c #D4D4D4", "< c #C8C8C8", "[ c #BCBCBC", "} c #BABABA", "| c #C2C2C2", "1 c #C4C4C4", "2 c #858585", "3 c #FFAB69", "4 c #F5A567", "5 c #C7C7C7", "6 c #CCCCCC", "7 c #C6C6C6", "8 c #C3C3C3", "9 c #C0C0C0", "0 c #848484", "a c #FFA965", "b c #FFB781", "c c #FFB47C", "d c #F2A76F", "e c #D2D2D2", "f c #B5B5B5", "g c #898989", "h c #838383", "i c #FFA765", "j c #FFB77E", "k c #FFCEA9", "l c #FFCDA8", "m c #FFAC70", "n c #EE9A5F", "o c #888888", "p c #FFA561", "q c #FFB67C", "r c #FFCEA8", "s c #FFBF90", "t c #FFBD8B", "u c #FFC8A0", "v c #FFA461", "w c #FA8737", "x c #FFA55F", "y c #FFB47B", "z c #FFCCA6", "A c #FFBE8E", "B c #FFB37C", "C c #FFB885", "D c #FFC59B", "E c #FF9E59", "F c #FF8129", "G c #FFA35B", "H c #FFB379", "I c #FFCCA5", "J c #FFBD8D", "K c #FFB279", "L c #FFB683", "M c #FFC399", "N c #FF9C58", "O c #FF7F25", "P c #FF9D53", "Q c #FFCBA4", "R c #FFBC8B", "S c #FFB077", "T c #FFB580", "U c #FFC398", "V c #FF9C56", "W c #FF7D23", "X c #FF9549", "Y c #FFC7A0", "Z c #FFB783", "` c #FFB47F", " . c #FFC297", ".. c #FF9953", "+. c #FF7B21", "@. c #FF913F", "#. c #FFC094", "$. c #FF9851", "%. c #FF791F", "&. c #FF852F", "*. c #FF7D21", "=. c #FF791B", " . + @ ", " + # $ % ", " + & * = - ", " ; # > , ' ) ! ", " % ~ { ] ^ / ( _ ", " - : < [ } | 1 2 ", " 3 4 , 5 6 5 7 8 9 0 ", " a b c d e f g _ 2 h ", " i j k l m n o ", " p q r s t u v w ", " x y z A B C D E F ", "G H I J K L M N O ", "P Q R S T U V W ", "X Y Z ` ...+. ", "@.v .#.$.%. ", " &.F *.=. "}; spatialite_gui-2.0.0-devel/icons/pkey.xpm0000664000175000017500000000454412543275035015362 00000000000000/* XPM */ static const char * pkey_xpm[] = { "16 16 103 2", " c None", ". c #E3B044", "+ c #FCF8DE", "@ c #FCF5CE", "# c #F9EB9E", "$ c #FBF2BE", "% c #FFFFFE", "& c #DFAB42", "* c #F8E78D", "= c #F9ECA1", "- c #FFFFFF", "; c #DFA139", "> c #C89539", ", c #F7E47E", "' c #F8E994", ") c #F8E9BC", "! c #E3AC42", "~ c #FEFCEE", "{ c #DD9832", "] c #F7E581", "^ c #FBF1BC", "/ c #F3DA8B", "( c #F5DD49", "_ c #FDF8C1", ": c #DA9030", "< c #FCF7D5", "[ c #F8E789", "} c #F7E582", "| c #F2D647", "1 c #F0CE38", "2 c #FCF5AE", "3 c #D67C29", "4 c #EAC46F", "5 c #F7E580", "6 c #F1D13D", "7 c #F5DB5D", "8 c #F6DF69", "9 c #F3D750", "0 c #EFCD34", "a c #FBEF85", "b c #D67F29", "c c #BA8634", "d c #E3B245", "e c #EAC576", "f c #FAEEAC", "g c #F2D639", "h c #F5DB4D", "i c #F7E465", "j c #F2CE3C", "k c #EFC932", "l c #D7812B", "m c #BB8835", "n c #FEFCF1", "o c #FBF1BB", "p c #F6E47B", "q c #F0D228", "r c #F5D437", "s c #F6E083", "t c #E3A93E", "u c #FCF3A0", "v c #FCF5A9", "w c #D7822B", "x c #BF8B35", "y c #F9EAAB", "z c #F3D84E", "A c #EFC92B", "B c #F3D63D", "C c #F7E18A", "D c #CA8A32", "E c #B88333", "F c #D67D29", "G c #D8852C", "H c #C18E36", "I c #FEFCF0", "J c #FAEEB0", "K c #F4D843", "L c #EEC828", "M c #F4D741", "N c #F7E289", "O c #CB8B32", "P c #B28838", "Q c #FAEFBB", "R c #F1D139", "S c #EEC528", "T c #F6DC4E", "U c #F7E285", "V c #CA8B32", "W c #B58B39", "X c #FBF4C6", "Y c #F1D643", "Z c #F5DB48", "` c #F5E182", " . c #C88831", ".. c #B78D39", "+. c #E1AC42", "@. c #F7EBC4", "#. c #F6E17F", "$. c #F7E69F", "%. c #C98A32", "&. c #BA903A", "*. c #D19636", "=. c #CC9033", "-. c #C2953B", " . . . . ", " . . + + . . ", " . . @ # $ % . & ", " . . @ * = . . - ; > ", " . + * , ' ) . ! ~ { > ", " . $ , , ] ' ^ / ( _ : ", " . < [ , , , } | 1 2 3 ", " . 4 5 6 7 8 9 0 a b c ", " . . d e f g h i j k a l m ", " . n o p q r s t u v w x ", ". . . y z A B C D E F G H ", ". I J K L M N O P ", ". Q R S T U V W ", ". X Y Z ` ... ", "+.@.#.$.%.&. ", " *.=.O -. "}; spatialite_gui-2.0.0-devel/icons/refresh.xpm0000664000175000017500000000161712543275035016046 00000000000000/* XPM */ static const char * refresh_xpm[] = { "16 16 32 1", " c None", ". c #95C6D8", "+ c #95DAF9", "@ c #92CEE4", "# c #286B96", "$ c #40B2E1", "% c #367592", "& c #256FA4", "* c #2374B6", "= c #BBE8F5", "- c #2379C5", "; c #377896", "> c #B7E1EE", ", c #247DCE", "' c #8DD2F8", ") c #41B3EC", "! c #90C9E1", "~ c #3682AE", "{ c #89ABBC", "] c #2F729B", "^ c #257ED0", "/ c #377799", "( c #397592", "_ c #87BBD9", ": c #8BCDEC", "< c #B4E3FB", "[ c #D9DEE8", "} c #DDE0EA", "| c #FEFEFF", "1 c #40B0D9", "2 c #2B6887", "3 c #FFFFFF", " 3333 33 ", " 3(%%/33]3 ", " [;=>==~_&3 ", " 32>@@1$:<*3 ", " 32{22#!$)'-3 ", " 32;333&+'',3 ", " 3%3 3#&*-,^3 ", " 3333333333333 ", " 3^,-* 3%3 ", " 3,<++&333;23 ", " 3-+)$!##2{23 ", " 3*+:$1@@.23 ", " 3&_~!!..;}| ", " 3]33/%%(3 ", " 33 3333 ", " "}; spatialite_gui-2.0.0-devel/icons/icon.xpm0000664000175000017500000000255312543275035015340 00000000000000/* XPM */ static const char * icon_xpm[] = { "32 32 9 1", " c None", ". c #5F6431", "+ c #496E14", "@ c #AF5C57", "# c #916864", "$ c #5F8B22", "% c #878882", "& c #9C9D9A", "* c #C1C2BF", " * ", " *** ", " &**** ", " &&**** ", " &&***** ", " &&&***** ", " &&&***** ", " &&&&******", " &&&&******", " #####&&&&&&*****", " #######&&&&&***** ", " #####@#&&&&&&***** ", " ####@@@##@@##***** ", " ##@@@@@@@@@@@&**** ", " ###@@@@@@@@@@@#*** ", " #@@@@@@@@@@@@@@&** ", " .#@@@@@@@@@@@@@@#* ", " .+.#@@@@@@@@@@@@@@#.+. ", " +++##@@@@@@@@@@@@@@@#+++ ", " +++ ###@@@@@@@@@@@@@@# ++ ", " +++ ###@@@@@@@@@@@@@## +++", " +++ ###@@@@@@@@@@@@@# ++$", " ++++##@@@@@@@@@@@@@@# ++$$", " $++.##@@@@@@@@@@@@##++$$ ", " $$++.#@@@@@@@@@##.++$$ ", " $$$++++......+++$$$$ ", " %%%+$$$$$$$$+$$$$$$ ", " %&%%&&%..+$$$$+.. ", " %%%&&****######## ", " %%%&&&&*&* ", " && %&&*&& ", " & "}; spatialite_gui-2.0.0-devel/icons/loadxml.xpm0000664000175000017500000000261712543275035016051 00000000000000/* XPM */ static const char * loadxml_xpm[] = { "16 16 64 1", " g None", ". g #767676", "+ g #747474", "@ g #707070", "# g #6C6C6C", "$ g #686868", "% g #636363", "& g #5E5E5E", "* g #595959", "= g #535353", "- g #4E4E4E", "; g #484848", "> g #424242", ", g #6F6F6F", "' g #6B6B6B", ") g #666666", "! g #616161", "~ g #5C5C5C", "{ g #575757", "] g #515151", "^ g #4B4B4B", "/ g #454545", "( g #646464", "_ g #5F5F5F", ": g #5A5A5A", "< g #545454", "[ g #4F4F4F", "} g #494949", "| g #434343", "1 g #3D3D3D", "2 g #373737", "3 g #313131", "4 g #2B2B2B", "5 g #252525", "6 g #585858", "7 g #525252", "8 g #4C4C4C", "9 g #464646", "0 g #404040", "a g #3A3A3A", "b g #343434", "c g #2E2E2E", "d g #282828", "e g #4A4A4A", "f g #444444", "g g #3E3E3E", "h g #383838", "i g #323232", "j g #2C2C2C", "k g #262626", "l g #202020", "m g #1B1B1B", "n g #161616", "o g #111111", "p g #0C0C0C", "q g #3C3C3C", "r g #353535", "s g #2F2F2F", "t g #292929", "u g #242424", "v g #1E1E1E", "w g #191919", "x g #141414", "y g #0F0F0F", " ", " ", " ", " .+@#$%&*=-;> ", " ", " ,')!~{]^/ ", " ", " (_:<[}|12345 ", " ", " 67890abcd ", " ", " efghijklmnop ", " ", " qrstuvwxy ", " ", " "}; spatialite_gui-2.0.0-devel/icons/foreign_key.xpm0000664000175000017500000000455312543275035016713 00000000000000/* XPM */ static const char * foreign_key_xpm[] = { "16 16 103 2", " c None", ". c #8CB2E4", "+ c #88AFE2", "@ c #84ACE0", "# c #80A9DD", "$ c #7DA5DC", "% c #7AA3DA", "& c #A2C1EF", "* c #9FC0ED", "= c #9DBEEB", "- c #9ABCEB", "; c #F4F7FB", "> c #74A0D7", ", c #A1C1EE", "' c #89C682", ") c #84C37E", "! c #80C17A", "~ c #7CBE76", "{ c #6F9BD4", "] c #9EBFEC", "^ c #A5D59C", "/ c #A1D398", "( c #9DD094", "_ c #FFFFFF", ": c #6A97D1", "< c #9BBDEB", "[ c #A6C3E9", "} c #6493CE", "| c #55A14D", "1 c #4F9947", "2 c #589A51", "3 c #ACC7E8", "4 c #EBF1F7", "5 c #5F8FCB", "6 c #539E4B", "7 c #81BD7B", "8 c #87C281", "9 c #50904A", "0 c #A9C4E8", "a c #B0C9E9", "b c #B0C8E8", "c c #B5CCE8", "d c #DEE7F2", "e c #598AC8", "f c #519B49", "g c #7AB874", "h c #579B50", "i c #3E8337", "j c #478643", "k c #AAC6E9", "l c #ACC6E9", "m c #ACC7EA", "n c #DBE5F1", "o c #5586C6", "p c #76B56F", "q c #42883B", "r c #8CB1E3", "s c #F1F6FA", "t c #AEC9EA", "u c #B0C9EA", "v c #AEC8E8", "w c #67AC60", "x c #63A75C", "y c #71B26B", "z c #408639", "A c #87AEE1", "B c #F0F4FA", "C c #B2CBEA", "D c #B3CCEA", "E c #BACFEA", "F c #F2F6FB", "G c #5FA25A", "H c #80BF7A", "I c #6DB067", "J c #82AADF", "K c #EFF3F9", "L c #B7CEEA", "M c #BBD0EB", "N c #B5CDEA", "O c #589953", "P c #3C8035", "Q c #7EA8DD", "R c #BAD0EB", "S c #ADC7EA", "T c #D8E2F0", "U c #5F8CC6", "V c #7AA4D9", "W c #EEF3F9", "X c #BED2EB", "Y c #BFD3EB", "Z c #5D8AC5", "` c #75A1D7", " . c #EDF2F8", ".. c #EAF0F7", "+. c #E6EDF6", "@. c #E2EAF4", "#. c #5284C3", "$. c #4277BB", "%. c #729ED6", "&. c #6E99D3", "*. c #6896D1", "=. c #6392CE", "-. c #5E8ECB", " ", ". + @ # $ % & * = - ", "; ; ; ; ; > , ; ; ; ; ", "' ) ! ~ ; { ] ; ^ / ( ", "_ _ _ _ ; : < ; _ _ _ ", "[ [ [ [ ; } | 1 2 [ [ [ ", "3 _ _ _ 4 5 6 7 8 9 [ _ 0 ", "3 a b c d e f g h i j k l m ", "3 _ _ _ n o 1 p q r s t _ u ", "3 3 b v w 6 x y z A B C D D ", "E F _ _ G H I i J K L _ M ", "N N N N O q P Q K R M M ", "S _ _ _ T U V W X _ Y ", "T T T T T Z ` ...+.@.", "#.#.#.#.#.$. %.&.*.=.-.", " "}; spatialite_gui-2.0.0-devel/icons/vtable.xpm0000664000175000017500000000552312543275035015665 00000000000000/* XPM */ static const char * vtable_xpm[] = { "16 16 132 2", " c None", ". c #A2C1EF", "+ c #9FC0ED", "@ c #9DBEEB", "# c #9ABCEB", "$ c #96BAE9", "% c #93B7E7", "& c #90B5E6", "* c #8CB2E4", "= c #88AFE2", "- c #84ACE0", "; c #80A9DD", "> c #7DA5DC", ", c #7AA3DA", "' c #A1C1EE", ") c #F4F7FB", "! c #74A0D7", "~ c #9EBFEC", "{ c #A5D59C", "] c #A1D398", "^ c #9DD094", "/ c #98CE90", "( c #93CB8B", "_ c #8EC987", ": c #89C682", "< c #84C37E", "[ c #80C17A", "} c #7CBE76", "| c #6F9BD4", "1 c #9BBDEB", "2 c #FFFFFF", "3 c #6A97D1", "4 c #98BAE9", "5 c #A6C3E9", "6 c #6493CE", "7 c #94B7E7", "8 c #A9C4E8", "9 c #ACC7E8", "0 c #EBF1F7", "a c #5F8FCB", "b c #8FB4E5", "c c #F2F6FA", "d c #AAC6E9", "e c #ACC6E9", "f c #ACC7EA", "g c #ADC7E9", "h c #AEC9E9", "i c #B0C9E9", "j c #B0C8E8", "k c #B5CCE8", "l c #DEE7F2", "m c #598AC8", "n c #8CB1E3", "o c #F1F6FA", "p c #AEC9EA", "q c #B0C9EA", "r c #DBE5F1", "s c #5586C6", "t c #87AEE1", "u c #F0F4FA", "v c #B2CBEA", "w c #AEC6E3", "x c #929FAF", "y c #888A8C", "z c #9E9E9E", "A c #838689", "B c #9EB3CD", "C c #A6BEDC", "D c #83868A", "E c #8B8B8C", "F c #5E799B", "G c #82AADF", "H c #EFF3F9", "I c #B4CAE6", "J c #919191", "K c #E8E8E8", "L c #DDDDDD", "M c #C1C1C1", "N c #888B8F", "O c #97989A", "P c #DADADA", "Q c #C4C4C4", "R c #4C4C4C", "S c #7EA8DD", "T c #909FB2", "U c #77787A", "V c #CED3D3", "W c #747A82", "X c #4C4D4D", "Y c #656565", "Z c #929292", "` c #797979", " . c #7D8084", ".. c #737373", "+. c #7AA4D9", "@. c #EEF3F9", "#. c #727B87", "$. c #868686", "%. c #F8F8F8", "&. c #484848", "*. c #BDBDBD", "=. c #CECECE", "-. c #C2C2C2", ";. c #ADADAD", ">. c #D3DCEA", ",. c #828282", "'. c #75A1D7", "). c #EDF2F8", "!. c #9CA0A4", "~. c #6F6F70", "{. c #787B7E", "]. c #444444", "^. c #464646", "/. c #515151", "(. c #777A7D", "_. c #676767", ":. c #729ED6", "<. c #6E99D3", "[. c #5E84B6", "}. c #505861", "|. c #8A8D91", "1. c #A4A8AC", "2. c #AEAEAE", "3. c #979797", "4. c #717171", "5. c #787878", "6. c #A4A7AC", "7. c #8A8C8F", "8. c #4D4D4D", "9. c #4A4A4A", "0. c #646464", "a. c #6B6B6B", " ", " . + @ # $ % & * = - ; > , ", " ' ) ) ) ) ) ) ) ) ) ) ) ) ! ", " ~ ) { ] ^ / ( _ : < [ } ) | ", " 1 ) 2 2 2 2 2 2 2 2 2 2 ) 3 ", " 4 ) 5 5 5 5 5 5 5 5 5 5 ) 6 ", " 7 ) 5 2 8 2 2 2 9 2 2 2 0 a ", " b c d e f g h i 9 i j k l m ", " n o p 2 q 2 2 2 9 2 2 2 r s ", " t u v w x y z A B C D z E F ", " G H I z J K L M N O P L Q J R ", " S H T U V W X Y Z ` Y X .Q ..", " +.@.#.$.V %.&.*.=.-.;.&.>.Q ,.", " '.).!.~.V {.].^././.^.].(.Q _.", " :.<.[.}.|.1.2.3.4.5.3.2.6.7.8.", " 9.0.a.a. a.a.0.9. "}; spatialite_gui-2.0.0-devel/icons/hs_back_no.xpm0000664000175000017500000000162212543275035016472 00000000000000/* XPM */ static const char * hs_back_no_xpm[] = { "16 16 32 1", " c None", ". c #244E15", "+ c #2B5F1A", "@ c #34731F", "# c #3C8324", "$ c #449528", "% c #4CA82D", "& c #51BA35", "* c #578E39", "= c #5D823C", "- c #648441", "; c #6A8A45", "> c #708B49", ", c #748B5C", "' c #77914D", ") c #7D8E65", "! c #7D9451", "~ c #8C9473", "{ c #849A56", "] c #8A9D5A", "^ c #8FA05D", "/ c #A39D8C", "( c #B0A19D", "_ c #B3A2A2", ": c #BCA6A9", "< c #C5A9B8", "[ c #CEACC3", "} c #D3AEC9", "| c #D8A0CF", "1 c #DCA2D3", "2 c #DFA3D8", "3 c #C0C0C0", " 3333 ", " 33%%%$33 ", " 3%%221|$$3 ", " 3%22:^](}[#3 ", " 3%2[^^]]{!_<@3 ", " 3%2^^^3{!'><@3 ", "3%1:]]33!'>;~:+3", "3$|{{333333-=:+3", "3$}!!333333=*_+3", "3#[/'>33;-=*,_.3", " 3#<;;-3==*&_.3 ", " 3@ c #708B49", ", c #748B5C", "' c #77914D", ") c #7D8E65", "! c #7D9451", "~ c #8C9473", "{ c #849A56", "] c #8A9D5A", "^ c #8FA05D", "/ c #A39D8C", "( c #B0A19D", "_ c #B3A2A2", ": c #BCA6A9", "< c #C5A9B8", "[ c #CEACC3", "} c #D3AEC9", "| c #D8A0CF", "1 c #DCA2D3", "2 c #DFA3D8", "3 c #C0C0C0", " 3333 ", " 33$%%%33 ", " 3$$|122%%3 ", " 3#[}(]^:22%3 ", " 3@<_!{]]^^[2%3 ", " 3@<>'!{3^^^2%3 ", "3+:~;>'!33]]:1%3", "3+:=-333333{{|$3", "3+_*=333333!!}$3", "3._,*=-;33>'/[#3", " 3._&*==3-;;<#3 ", " 3.(~&**==-/<@3 ", " 3.((,&&)::@3 ", " 3..((__++3 ", " 33....33 ", " 3333 "}; spatialite_gui-2.0.0-devel/icons/disconnect.xpm0000664000175000017500000000506612543275035016543 00000000000000/* XPM */ static const char * disconnect_xpm[] = { "16 16 115 2", " c None", ". c #81A7D9", "+ c #769ED3", "@ c #A1BEEC", "# c #9DBBE7", "$ c #97B6E4", "% c #92B2E0", "& c #8FAEDA", "* c #98B5DC", "= c #7A9FCF", "- c #5786C3", "; c #A4C0E8", "> c #B0C8E9", ", c #A9C3E5", "' c #A2BDE1", ") c #99B6DC", "! c #8AABD5", "~ c #82A4D0", "{ c #4476B5", "] c #8FB1E2", "^ c #A8C1E7", "/ c #9FBAE0", "( c #8BACD8", "_ c #82A5D2", ": c #779DCE", "< c #84A6D1", "[ c #5C86BE", "} c #88ABD9", "| c #94B2DA", "1 c #92B0D8", "2 c #7299CB", "3 c #6890C4", "4 c #789CC8", "5 c #4A72B2", "6 c #9E9E9E", "7 c #999999", "8 c #6F97C9", "9 c #7C9FCB", "0 c #5985BC", "a c #6B92C3", "b c #3E63A6", "c c #9FBEEA", "d c #9AAFCE", "e c #B7B7B7", "f c #BCBCBC", "g c #8C8C8C", "h c #406DAE", "i c #5C83BB", "j c #678FC0", "k c #608ABB", "l c #335099", "m c #9CBBE7", "n c #A3C0E8", "o c #A3BFE5", "p c #8A9DB5", "q c #AEAEAE", "r c #838383", "s c #34579F", "t c #4C72AD", "u c #3F5FA2", "v c #29418E", "w c #93B4E3", "x c #ADC6E8", "y c #A6C0E3", "z c #8FB0DB", "A c #718DB4", "B c #717171", "C c #676767", "D c #2B438F", "E c #28418B", "F c #8CAEDD", "G c #A4BEE2", "H c #89ABD8", "I c #94B3D9", "J c #5878A3", "K c #939393", "L c #A9A9A9", "M c #555555", "N c #82A6D7", "O c #7DA1D0", "P c #739ACB", "Q c #82A4CF", "R c #7499C7", "S c #586C89", "T c #878787", "U c #4E4E4E", "V c #7CA1D0", "W c #8FAED7", "X c #668FC3", "Y c #5C88BD", "Z c #648CC0", "` c #6188BC", " . c #3C5183", ".. c #608CC6", "+. c #83A6D1", "@. c #7B9FCC", "#. c #7B9ECB", "$. c #6C92C3", "%. c #658DBE", "&. c #4569A8", "*. c #5A88C4", "=. c #6892C6", "-. c #80A2CD", ";. c #7096C5", ">. c #537BB6", ",. c #466AAB", "'. c #3D5EA3", "). c #35529C", "!. c #2C4491", "~. c #4A7CBA", "{. c #5C87BF", "]. c #567EB9", "^. c #3A62A7", "/. c #3C66AB", "(. c #385DA4", " . + ", " @ # $ % & * = - ", " ; > , ' ) ! ~ { ", " ] ^ / ( _ : < [ ", " . } | 1 2 3 4 5 ", " 6 7 - 8 9 0 a b ", " c d e f g h i j k l ", " m n o p q r s t u v ", " w x y z A B C D E ", " F G H I = J K L M ", " N ) O P Q R S T U ", " V W 8 X Y Z ` . ", " ..+.@.#.R $.%.&. ", "*.=.-.;.>.,.'.).!. ", "~.{.].^. ", " /.(. "}; spatialite_gui-2.0.0-devel/icons/Makefile.am0000664000175000017500000000213312543275035015710 00000000000000 EXTRA_DIST = about.xpm charset.xpm column.xpm composer.xpm connect.xpm \ create_new.xpm db.xpm disconnect.xpm dumpshp.xpm exif.xpm \ exit.xpm foreign_key.xpm geometry.xpm geotable.xpm geoview.xpm \ geovtable.xpm help.xpm hs_back_no.xpm hs_back.xpm hs_forward_no.xpm \ hs_forward.xpm icon_info.xpm icon.xpm index.xpm kill_spindex.xpm \ loaddbf.xpm loadshp.xpm loadtxt.xpm loadxl.xpm malformed_geoms.xpm \ map_preview.xpm mbrcache.xpm memdb_clock.xpm memdb_load.xpm \ memdb_new.xpm memdb_save.xpm network.xpm pkey.xpm primary_key.xpm \ refresh.xpm rs_first.xpm rs_last.xpm rs_next.xpm rs_previous.xpm \ spatialidx.xpm sql_abort_no.xpm sql_abort.xpm sql_go.xpm \ sql_script.xpm srids.xpm statistics.xpm tables.xpm table.xpm \ topology.xpm tmp_table.xpm tmp_view.xpm trigger.xpm vacuum.xpm \ view.xpm virtdbf.xpm virtshp.xpm virttxt.xpm virtxl.xpm vtable.xpm \ attach.xpm sql_log.xpm db_status.xpm loadxml.xpm checkgeom.xpm \ sanegeom.xpm wfs.xpm dxf.xpm connect_ro.xpm coverage.xpm \ coverage_tiles.xpm security_relaxed.xpm security_lock.xpm \ security_rdonly.xpm vector.xpm AttributionDisclaimer.txt spatialite_gui-2.0.0-devel/icons/coverage.xpm0000664000175000017500000000561012543275035016200 00000000000000/* XPM */ static const char * coverage_xpm[] = { "16 16 135 2", " c None", ". c #A1B3CE", "+ c #9FB1CF", "@ c #95ABCD", "# c #8EA7CD", "$ c #8EA6CD", "% c #93AACD", "& c #9BAFCD", "* c #9FB2CF", "= c #EBECEC", "- c #F3F4F4", "; c #F4F5F7", "> c #ECF3F7", ", c #E9EFF2", "' c #97ADCE", ") c #F2F3F4", "! c #95B4E3", "~ c #8DB4D0", "{ c #80B5A9", "] c #A1CC93", "^ c #AAD184", "/ c #A6D082", "( c #94C28B", "_ c #699E9A", ": c #739DC3", "< c #779DD6", "[ c #EBF2F7", "} c #94ABCF", "| c #8FA7CD", "1 c #97B5E3", "2 c #87B7B8", "3 c #A1CB93", "4 c #A8D274", "5 c #9BCB67", "6 c #97C863", "7 c #98C96A", "8 c #8BBB83", "9 c #6A99A5", "0 c #7A9FD7", "a c #E9F0F7", "b c #F2F5F7", "c c #99B7E4", "d c #80B6A3", "e c #A7D082", "f c #98C965", "g c #91C65D", "h c #8BC259", "i c #87C158", "j c #8EC271", "k c #5F928C", "l c #7DA2D9", "m c #E8F0F6", "n c #94ABCE", "o c #F0F5F7", "p c #9BB8E5", "q c #7FB3A1", "r c #A0CD7D", "s c #90C55E", "t c #87C056", "u c #81BE52", "v c #7EBC52", "w c #87BD6C", "x c #5E9089", "y c #81A4DA", "z c #E7EFF5", "A c #EFF4F7", "B c #9DB9E6", "C c #87B3B6", "D c #93C288", "E c #8FC563", "F c #80BE53", "G c #7ABA4F", "H c #7FBD58", "I c #7CB078", "J c #6A96A3", "K c #84A7DC", "L c #E7EEF6", "M c #EEF3F7", "N c #9FBBE7", "O c #93B6D1", "P c #78AA9F", "Q c #87B26F", "R c #8ABD65", "S c #87BB61", "T c #7BAB6B", "U c #649391", "V c #7DA2C5", "W c #88A9DD", "X c #EDF2F7", "Y c #A1BDE8", "Z c #92B3D0", "` c #76825E", " . c #868E44", ".. c #878B41", "+. c #808356", "@. c #82A6C7", "#. c #8EAEE0", "$. c #8BACDE", "%. c #E6EEF6", "&. c #ECF1F7", "*. c #7AAA4E", "=. c #77A84C", "-. c #74A64A", ";. c #9A7B35", ">. c #D39F54", ",. c #D19F54", "'. c #AF863F", "). c #679A40", "!. c #65983E", "~. c #63963C", "{. c #8DA6CC", "]. c #EDF1F7", "^. c #C2DCBF", "/. c #C5D3AF", "(. c #C9C89C", "_. c #D1AF6E", ":. c #C3D9BA", "<. c #E6EDF6", "[. c #93AACE", "}. c #8EA6CC", "|. c #EDF1F6", "1. c #E6EDF7", "2. c #96ABCD", "3. c #EDEFF1", "4. c #F1F3F7", "5. c #F1F4F8", "6. c #F0F4F8", "7. c #F0F4F7", "8. c #F0F3F7", "9. c #EFF3F7", "0. c #EFF3F8", "a. c #EBEFF2", "b. c #97ADCF", "c. c #9CAFCE", "d. c #9AAECF", " ", " . + @ # # # # # $ $ $ $ % & ", " * = - ; ; ; ; ; ; ; ; > , ' ", " @ ) ! ~ { ] ^ / ( _ : < [ } ", " | ; 1 2 3 4 5 6 7 8 9 0 a } ", " | b c d e f g h i j k l m n ", " | o p q r s t u v w x y z n ", " | A B C D E F G H I J K L n ", " | M N O P Q R S T U V W L n ", " # X Y N Z ` ...+.@.#.$.%.n ", " # &.*.=.-.;.>.,.'.).!.~.%.n ", " {.].^.^.^./.(._.:.^.^.^.<.[. ", " }.|.^.^.^.^.^.^.^.^.^.^.1.[. ", " 2.3.4.5.6.7.8.9.9.9.9.0.a.b. ", " c.d.n [.[.[.[.[.[.[.[.[.' c. ", " "}; spatialite_gui-2.0.0-devel/icons/vector.xpm0000664000175000017500000000707712543275035015720 00000000000000/* XPM */ static const char * vector_xpm[] = { "16 16 176 2", " c None", ". c #D8B24B", "+ c #D7B04A", "@ c #D8B44D", "# c #D7B24B", "$ c #EAD59C", "% c #E7CC88", "& c #D5AC45", "* c #D4AA44", "= c #D8B44C", "- c #E5CF92", "; c #FCF8E6", "> c #FEF6E3", ", c #F2DDAF", "' c #F7E4B2", ") c #E1C072", "! c #D1A43F", "~ c #D9B54E", "{ c #E0C67E", "] c #F7EED1", "^ c #FFFFF6", "/ c #FFFEF0", "( c #FBEDCB", "_ c #DAAD50", ": c #F7D78B", "< c #F9E1AA", "[ c #F2D695", "} c #DBB262", "| c #CE9D39", "1 c #D9B74F", "2 c #D9B54D", "3 c #EDD9A5", "4 c #F5EBD2", "5 c #EDDEBE", "6 c #DEC995", "7 c #DBC389", "8 c #D6B870", "9 c #DDB969", "0 c #F5D790", "a c #F5CF7F", "b c #F8DB9D", "c c #FAE3AA", "d c #ECCA84", "e c #D5A651", "f c #CB9532", "g c #FEF8E1", "h c #F9EBCD", "i c #EDD292", "j c #EBCC84", "k c #E5BF6F", "l c #DBB156", "m c #C8943B", "n c #FAECCE", "o c #FFF5D9", "p c #FFEAB9", "q c #FEDF95", "r c #FFD577", "s c #FFE4A5", "t c #FBDC84", "u c #C9922F", "v c #FDF8E2", "w c #FFF3D4", "x c #FAE4B0", "y c #F1CF86", "z c #F5D07F", "A c #F5D078", "B c #E4B14C", "C c #FFE9B6", "D c #FFE19B", "E c #FED678", "F c #F5BD40", "G c #E9B53D", "H c #F1D590", "I c #C88F2D", "J c #D6B049", "K c #FDF6E2", "L c #FFF4DA", "M c #FFF3D5", "N c #FFEBBD", "O c #F7D589", "P c #F5C969", "Q c #E9B44C", "R c #FBDA8D", "S c #FFDC8C", "T c #F9C448", "U c #ECB638", "V c #E8BF48", "W c #E8BB4F", "X c #F0D08C", "Y c #C78D2B", "Z c #D5AD47", "` c #FCF6E2", " . c #FFF4D7", ".. c #FFF2CE", "+. c #FFEFC8", "@. c #FFEBBA", "#. c #FBDB92", "$. c #F1C156", "%. c #F9C248", "&. c #F0BD3B", "*. c #ECC547", "=. c #E9BD45", "-. c #E6B542", ";. c #E6B147", ">. c #EECA88", ",. c #C68A28", "'. c #FFF0C9", "). c #FFEDBE", "!. c #FFEAB3", "~. c #FFE7AD", "{. c #FED97C", "]. c #EFC748", "^. c #EAC443", "/. c #E8BE43", "(. c #E6B53F", "_. c #E3AB3A", ":. c #E1A740", "<. c #ECC583", "[. c #C58726", "}. c #D3A842", "|. c #FEFBE7", "1. c #FFF6DD", "2. c #FFEFC1", "3. c #FFEBB7", "4. c #FFE8AB", "5. c #FFE4A4", "6. c #FEE196", "7. c #EBC648", "8. c #E9BD40", "9. c #E6B43D", "0. c #E2A938", "a. c #DE9F32", "b. c #E6B66B", "c. c #EEC483", "d. c #C48524", "e. c #D2A540", "f. c #DCBD77", "g. c #F6E5BF", "h. c #FFF6DB", "i. c #FFEEC1", "j. c #FFE5A5", "k. c #FFE39F", "l. c #FEE194", "m. c #EAC146", "n. c #E6B53A", "o. c #E2AA37", "p. c #E5AF56", "q. c #EDC687", "r. c #E4B374", "s. c #CA904A", "t. c #C38322", "u. c #E0C07D", "v. c #FCEEC7", "w. c #FFF2CC", "x. c #FFE8A8", "y. c #FEE094", "z. c #E7BA41", "A. c #E4B145", "B. c #EFCA8A", "C. c #EBC182", "D. c #D09753", "E. c #C38423", "F. c #CC9834", "G. c #E5C482", "H. c #FFF4CC", "I. c #FFEFC4", "J. c #F1D28B", "K. c #F0CE8A", "L. c #D7A45F", "M. c #C48625", "N. c #C9902E", "O. c #C88E2C", "P. c #EBCD8F", "Q. c #E2B76F", "R. c #C88E40", "S. c #C58928", " . + ", " @ # $ % & * ", " = - ; > , ' ) ! ", " ~ { ] ^ / ( _ : < [ } | ", "1 2 3 4 5 6 7 8 9 0 a b c d e f ", "@ g h i j k l m n o p q r s t u ", "# v w x y z A B x C D E F G H I ", "J K L M N O P Q R S T U V W X Y ", "Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.", "* ` w '.).!.~.{.].^./.(._.:.<.[.", "}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.", "e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.", " | u.v.w.x.y.z.A.B.C.D.E. ", " F.f G.H.I.J.K.L.M.E. ", " N.O.P.Q.R.d. ", " S.[. "}; spatialite_gui-2.0.0-devel/icons/kill_spindex.xpm0000664000175000017500000000532112543275035017071 00000000000000/* XPM */ static const char * kill_spindex_xpm[] = { "16 16 124 2", " c None", ". c #ECCE40", "+ c #EBCC3F", "@ c #EACB3E", "# c #E9C93C", "$ c #E9C73B", "% c #E8C43A", "& c #E7C238", "* c #E6C036", "= c #E5BD35", "- c #E4BB33", "; c #E3B831", "> c #FAED9A", ", c #F9EB99", "' c #F9E897", ") c #F8E594", "! c #F7E291", "~ c #F6DF8E", "{ c #F5DB8B", "] c #EBC756", "^ c #F1D964", "/ c #FAEB9A", "( c #F4D848", "_ c #F3D344", ": c #F1CE3F", "< c #F0C83A", "[ c #F5DC8C", "} c #EDCB62", "| c #EACA3D", "1 c #F9E993", "2 c #F7E172", "3 c #F3D445", "4 c #F2CE41", "5 c #F0C93C", "6 c #F5DC8A", "7 c #EFD070", "8 c #E4BB3D", "9 c #EFD45B", "0 c #F9EA99", "a c #F4D647", "b c #F2D042", "c c #F0CB3D", "d c #F3D56E", "e c #F3D77F", "f c #E7C04A", "g c #F5E180", "h c #F8E68E", "i c #F3D243", "j c #F1CD3F", "k c #EFC739", "l c #EAC658", "m c #ECCD4F", "n c #F9E998", "o c #F3D54A", "p c #F1CF45", "q c #F0CA40", "r c #EEC238", "s c #F4D989", "t c #E1B42E", "u c #E0B12C", "v c #DFAE2B", "w c #DEAC29", "x c #DCA927", "y c #DBA625", "z c #DAA323", "A c #F2DA75", "B c #F8E693", "C c #F7E391", "D c #F6E08D", "E c #F5DB8A", "F c #F4D788", "G c #F2D384", "H c #F1CF7F", "I c #F0CC7C", "J c #EFC97A", "K c #E3B448", "L c #E2B62F", "M c #F3D786", "N c #EBB62F", "O c #ECBC4A", "P c #F1CE80", "Q c #D68B39", "R c #C35812", "S c #BC4204", "T c #B94503", "U c #E0B22D", "V c #EECC70", "W c #F2D283", "X c #F1CE7E", "Y c #D58A35", "Z c #D17438", "` c #F7B58D", " . c #FED6B8", ".. c #F5A872", "+. c #CB6B2D", "@. c #DFAF2B", "#. c #E7BD55", "$. c #DEAA2E", "%. c #BC4C06", "&. c #F6B58D", "*. c #FF924D", "=. c #FF7711", "-. c #FF8621", ";. c #EB8A40", ">. c #B94403", ",. c #E7BC4F", "'. c #E6BA4C", "). c #DCA726", "!. c #FECDAE", "~. c #FFFFFF", "{. c #EF7F18", "]. c #DFAE2D", "^. c #DEAB2B", "/. c #F49D63", "(. c #FF7F18", "_. c #F87600", ":. c #EE7600", "<. c #E16803", "[. c #C3571A", "}. c #C96425", "|. c #E67721", "1. c #EA7905", "2. c #DD6401", "3. c #BD4D04", " ", " . + @ # $ % & * = - ; ", " + > , ' ) ! ~ { ] ; ", " + ^ / ( _ : < [ } ; ", " | 1 2 3 4 5 6 7 8 ", " 9 0 a b c d e f ", " $ g h i j k [ l ", " m n o p q r s t u v w x y z ", "% A B C D 6 E F G H I J K z ", "& * = - ; L M N O P Q R S T ", " U V W X Y Z ` ...+. ", " @.G #.$.%.&.*.=.-.;.>.", " @.,.'.). S !.~.~.~.{.S ", " ].^.y T /.(._.:.<.T ", " w x [.}.|.1.2.3. ", " T S T "}; spatialite_gui-2.0.0-devel/icons/malformed_geoms.xpm0000664000175000017500000000503112543275035017542 00000000000000/* XPM */ static const char * malformed_geoms_xpm[] = { "16 16 113 2", " c None", ". c #EBBC3C", "+ c #EABA3A", "@ c #F1D485", "# c #F0D182", "$ c #E9BA3A", "% c #FDFAF1", "& c #FAEFD5", "* c #E6B235", "= c #E9B93A", "- c #F2D894", "; c #FEFCF3", "> c #FEFAE7", ", c #F0D38F", "' c #E3AC31", ") c #E8B738", "! c #FFFDF9", "~ c #F9E994", "{ c #FAEB9E", "] c #FEFAEC", "^ c #E1A92F", "/ c #F4DFA9", "( c #FDF9ED", "_ c #D6A33E", ": c #FCF5D4", "< c #F1D7A2", "[ c #DEA32B", "} c #EDC871", "| c #FFFEF9", "1 c #F4DC5E", "2 c #D5A23E", "3 c #F4D95C", "4 c #FEFBED", "5 c #E5BB68", "6 c #E6B436", "7 c #F7EAC8", "8 c #FDFAE6", "9 c #F4DA5D", "0 c #D5A13D", "a c #F2D757", "b c #FCF3C7", "c c #F4E3C0", "d c #D99924", "e c #E6B336", "f c #F0D28C", "g c #FEFBEA", "h c #F8E694", "i c #F4DA5C", "j c #DDB147", "k c #F2D756", "l c #F5DB5C", "m c #FDF8DE", "n c #E7C07D", "o c #D48E1D", "p c #E5B134", "q c #FEFBF3", "r c #FBF2C3", "s c #F6DC5C", "t c #F6DF64", "u c #EBCB57", "v c #F2D655", "w c #F5D954", "x c #F8E794", "y c #FBF4E3", "z c #D08717", "A c #E5B034", "B c #F1D79D", "C c #FDF9E7", "D c #F8E58B", "E c #F6DB5A", "F c #F4DA5B", "G c #F2D654", "H c #F5D852", "I c #F4D650", "J c #FCF6D8", "K c #E5BF88", "L c #C9790E", "M c #E8BF62", "N c #FEFCF4", "O c #FAEFB5", "P c #F5DA58", "Q c #F3D857", "R c #F2D758", "S c #F2D658", "T c #F4D957", "U c #F5D851", "V c #F4D74E", "W c #F6DA62", "X c #D29344", "Y c #E3AD31", "Z c #F5E3BE", "` c #FEFBEF", " . c #FEFBEE", ".. c #FEFCEF", "+. c #FEFBEC", "@. c #FEFCF2", "#. c #EBCEAB", "$. c #C16803", "%. c #E2AA2F", "&. c #E0A72D", "*. c #DFA42B", "=. c #DDA129", "-. c #DC9E27", ";. c #DA9B25", ">. c #D99823", ",. c #D69320", "'. c #D38C1B", "). c #CF8516", "!. c #CC7E11", "~. c #C9770D", "{. c #C67109", "]. c #C36C06", "^. c #BF6400", " ", " . + ", " . @ # ", " $ % & * ", " = - ; > , ' ", " ) ! ~ { ] ^ ", " ) / ( _ _ : < [ ", " } | 1 2 2 3 4 5 ", " 6 7 8 9 0 0 a b c d ", " e f g h i j 0 k l m n o ", " p q r s i t u v w x y z ", " A B C D E F 0 0 G H I J K L ", " M N O P P Q R S T U V W g X ", "Y Z N ` . .....` .4 4 +.@.#.$.", "%.&.*.=.-.;.>.,.'.).!.~.{.].$.^.", " "}; spatialite_gui-2.0.0-devel/icons/vacuum.xpm0000664000175000017500000000560612543275035015712 00000000000000/* XPM */ static const char * vacuum_xpm[] = { "16 16 135 2", " c None", ". c #BABABA", "+ c #B8B8B8", "@ c #B7B7B7", "# c #B6B6B6", "$ c #B4B4B4", "% c #B3B3B3", "& c #BBBBBB", "* c #D0D0D0", "= c #E8E8E8", "- c #F3F3F3", "; c #FDFDFD", "> c #FCFCFC", ", c #EDEDED", "' c #E0E0E0", ") c #C2C2C2", "! c #ADADAD", "~ c #E1E1E1", "{ c #FEFEFE", "] c #FFFFFF", "^ c #FBFBFB", "/ c #CFCFCF", "( c #7BB973", "_ c #B9B9B9", ": c #F8F8F8", "< c #EAEAEA", "[ c #72B569", "} c #64B35A", "| c #F7F7F7", "1 c #DCDCDC", "2 c #F9F9F9", "3 c #D7ECD4", "4 c #8FCD86", "5 c #6FC063", "6 c #6BBC60", "7 c #67B75D", "8 c #82C279", "9 c #7EBE75", "0 c #59A650", "a c #B5B5B5", "b c #F6F6F6", "c c #E2E2E2", "d c #CDCDCD", "e c #C4C4C4", "f c #B6CAB3", "g c #83C479", "h c #9CD294", "i c #B2DAAB", "j c #AFD9A8", "k c #ADD8A5", "l c #AAD6A2", "m c #A7D59F", "n c #74B46C", "o c #4E9746", "p c #F5F5F5", "q c #EEEEEE", "r c #E6E6E6", "s c #9FD099", "t c #97CF8E", "u c #B1D9AA", "v c #83C37A", "w c #61AF57", "x c #5CA952", "y c #78B76F", "z c #74B36B", "A c #4C9545", "B c #B2B2B2", "C c #F4F4F4", "D c #DDDDDD", "E c #7AC271", "F c #68B85D", "G c #75B16F", "H c #BFBFBF", "I c #5D9B56", "J c #4B9443", "K c #B0B0B0", "L c #E7E7E7", "M c #D9D9D9", "N c #DBDBDB", "O c #B7B8B7", "P c #63955D", "Q c #AEAEAE", "R c #F2F2F2", "S c #D8D8D8", "T c #D5D5D5", "U c #C0C0C0", "V c #70A16B", "W c #969696", "X c #ACACAC", "Y c #F0F0F0", "Z c #DEDEDE", "` c #D4D4D4", " . c #D2D2D2", ".. c #D2D4D1", "+. c #BEBFBE", "@. c #649B5F", "#. c #5A9554", "$. c #909090", "%. c #387B32", "&. c #33752D", "*. c #2E6F29", "=. c #2A6A25", "-. c #A9A9A9", ";. c #D6D6D6", ">. c #6AA064", ",. c #6AA962", "'. c #65A45D", "). c #3B8035", "!. c #367A31", "~. c #589751", "{. c #8DC882", "]. c #63A15B", "^. c #256421", "/. c #A5A5A5", "(. c #CECECE", "_. c #599A51", ":. c #68A760", "<. c #97CD8D", "[. c #94CB8A", "}. c #91CA87", "|. c #8EC984", "1. c #8CC881", "2. c #246320", "3. c #A1A1A1", "4. c #9F9F9F", "5. c #ABABAB", "6. c #A7A7A7", "7. c #568852", "8. c #5E9D56", "9. c #5A9953", "0. c #2F712A", "a. c #2B6B26", "b. c #276623", "c. c #236220", "d. c #296925", " . + @ # $ % ", " & * = - ; > , ' ) ! ", ". ~ { ] ] ] ] ] ] ^ / ( ", "_ : { ] ] ] ] ] ] ^ < [ } ", "@ | * 1 = 2 3 4 5 6 7 8 9 0 ", "a b c d e f g h i j k l m n o ", "$ p q r c s t u v w x y z A ", "B C < ~ D E F } G H c I J ", "K - L D M ' N e O & ~ P ", "Q R c S T 1 S U % V ' W ", "X Y Z ` .N ..+.@.#.Z $.%.&.*.=.", "-.Z - N .N ;.>.,.'.).!.~.{.].^.", " /.(., C p _.:.<.[.}.|.1.:.2. ", " 3.4.3.5.6.7.8.9.0.a.b.c. ", " &.*. ", " d. "}; spatialite_gui-2.0.0-devel/icons/memdb_save.xpm0000664000175000017500000000642112543275035016510 00000000000000/* XPM */ static const char * memdb_save_xpm[] = { "16 16 158 2", " c None", ". c #BABABA", "+ c #B8B8B8", "@ c #B7B7B7", "# c #B6B6B6", "$ c #B4B4B4", "% c #B3B3B3", "& c #BBBBBB", "* c #D0D0D0", "= c #E8E8E8", "- c #F3F3F3", "; c #FDFDFD", "> c #FCFCFC", ", c #EDEDED", "' c #E0E0E0", ") c #C2C2C2", "! c #ADADAD", "~ c #E1E1E1", "{ c #FEFEFE", "] c #FFFFFF", "^ c #FBFBFB", "/ c #CFCFCF", "( c #A9A9A9", "_ c #B9B9B9", ": c #F8F8F8", "< c #EAEAEA", "[ c #A7A7A7", "} c #F7F7F7", "| c #E7E7E7", "1 c #EFEFEF", "2 c #F6F6F6", "3 c #FAFAFA", "4 c #F0F0F0", "5 c #DEDEDE", "6 c #C3C3C3", "7 c #E6E6E6", "8 c #A5A5A5", "9 c #B5B5B5", "0 c #EBEBEB", "a c #D6D6D6", "b c #D5D5D5", "c c #D1D1D1", "d c #BCBCBC", "e c #C0C0C0", "f c #E5E5E5", "g c #A3A3A3", "h c #F5F5F5", "i c #EEEEEE", "j c #E2E2E2", "k c #6E97D4", "l c #7B9ED4", "m c #7198D0", "n c #82A4D6", "o c #688ECD", "p c #6990CD", "q c #759AD0", "r c #7399D1", "s c #628BC8", "t c #B2B2B2", "u c #F4F4F4", "v c #DDDDDD", "w c #E3E3E3", "x c #658DCC", "y c #B0CDF3", "z c #B3C7E3", "A c #A1BFEA", "B c #6089C9", "C c #B0B0B0", "D c #D9D9D9", "E c #5B86C7", "F c #9EC0EF", "G c #6E93CC", "H c #F7FBFF", "I c #F1F8FF", "J c #8CAFE4", "K c #618AC7", "L c #AEAEAE", "M c #F2F2F2", "N c #D8D8D8", "O c #DCDCDC", "P c #5D88C8", "Q c #A1BFEF", "R c #FAFCFD", "S c #FBFCFE", "T c #FDFDFE", "U c #FCFDFE", "V c #FAFBFD", "W c #FBFCFD", "X c #85A8DD", "Y c #537FC1", "Z c #ACACAC", "` c #D4D4D4", " . c #D2D2D2", ".. c #DBDBDB", "+. c #658DCA", "@. c #99B8EA", "#. c #7EA5DD", "$. c #80A6DD", "%. c #7CA3DB", "&. c #7AA0D9", "*. c #79A0D9", "=. c #789FD8", "-. c #789ED8", ";. c #5D84BF", ">. c #618BC9", ",. c #92B5E6", "'. c #81A7E2", "). c #81A7E1", "!. c #7DA3DE", "~. c #7BA1DC", "{. c #799FDB", "]. c #779ED9", "^. c #739AD4", "/. c #577EBB", "(. c #CECECE", "_. c #5481C4", ":. c #97B6EA", "<. c #EAF3F3", "[. c #E6F1ED", "}. c #E6F1EF", "|. c #E6F0EF", "1. c #E5F1ED", "2. c #EDF5F3", "3. c #799CD5", "4. c #4470B0", "5. c #A1A1A1", "6. c #9F9F9F", "7. c #ABABAB", "8. c #517FC3", "9. c #9AB6EF", "0. c #E8F3EA", "a. c #84BF51", "b. c #98C96F", "c. c #99C971", "d. c #84BF54", "e. c #E9F4E4", "f. c #7B9CDD", "g. c #3A69AA", "h. c #5583C6", "i. c #BACEEF", "j. c #FFFFDD", "k. c #C7EE87", "l. c #D7F4A2", "m. c #D7F6A2", "n. c #C7EE8C", "o. c #FFFFE0", "p. c #85A2DD", "q. c #3E6AAB", "r. c #3368BA", "s. c #5884C3", "t. c #688BD3", "u. c #708FE1", "v. c #6C8DDC", "w. c #6D8BDA", "x. c #6E8AD7", "y. c #6C8BCD", "z. c #446DAB", "A. c #2E5FA6", " . + @ # $ % ", " & * = - ; > , ' ) ! ", ". ~ { ] ] ] ] ] ] ^ / ( ", "_ : { ] ] ] ] ] ] ^ < [ ", "@ } | 1 2 ^ 3 4 5 6 7 8 ", "9 2 0 5 a b c 6 d e f g ", "$ h i 7 j 7 k l m n o p q r s ", "t u < ~ v w x y ] z ] ] ] ] A B ", "C - | v D ' E F ] G ] ] H I J K ", "L M j N b O P Q R S T U V W X Y ", "Z 4 5 ` ...+.@.#.$.%.&.*.=.-.;.", "( 5 - .. ...>.,.'.).!.~.{.].^./.", " 8 (., u h _.:.<.[.}.|.1.2.3.4.", " 5.6.5.7.8.9.0.a.b.c.d.e.f.g.", " h.i.j.k.l.m.n.o.p.q.", " r.s.t.u.v.w.x.y.z.A."}; spatialite_gui-2.0.0-devel/icons/sanegeom.xpm0000664000175000017500000000433712543275035016210 00000000000000/* XPM */ static const char * sanegeom_xpm[] = { "16 16 95 2", " c None", ". c #FFD7DF", "+ c #FFD2E6", "@ c #FFD4E2", "# c #FFF0F1", "$ c #FFD7DC", "% c #FFCFE3", "& c #FFD2E9", "* c #FFE7E7", "= c #FFD2DC", "- c #FFD6DA", "; c #FFEDEF", "> c #FFEAEC", ", c #FFC9DC", "' c #FFCCE3", ") c #FFE4E3", "! c #FFE2E2", "~ c #FFC5DF", "{ c #FFD3E6", "] c #FFD6E3", "^ c #FFD2DF", "/ c #FFECF1", "( c #FFEFF0", "_ c #FFD9DF", ": c #FFC5D7", "< c #FFCDE3", "[ c #FFE6E3", "} c #FFF0F0", "| c #FFF3F4", "1 c #FFF1F3", "2 c #FFEDF0", "3 c #FFECED", "4 c #FFE2E3", "5 c #FFCFD7", "6 c #FFDFE0", "7 c #FFCCCC", "8 c #FFECEF", "9 c #FFE9EA", "0 c #FFD0D0", "a c #FFB6CD", "b c #FFB3CA", "c c #FFBFD0", "d c #FFB0B2", "e c #FFC2C2", "f c #FFD9DA", "g c #FFE4E6", "h c #FFEAED", "i c #FFE9EC", "j c #FFE7E9", "k c #FFE6E7", "l c #FFDCDD", "m c #FF9FA3", "n c #FFCDD0", "o c #FFE7EA", "p c #FFE6E9", "q c #FFE4E7", "r c #FFE2E4", "s c #FF9296", "t c #FFC3C9", "u c #FFC0C2", "v c #FFC5C5", "w c #FFDADA", "x c #FFECEC", "y c #FFE3E6", "z c #FFE0E3", "A c #FFDFE2", "B c #FF8B92", "C c #FFB6CA", "D c #FFC5C7", "E c #FFE3E4", "F c #FFE0E2", "G c #FFDDDF", "H c #FF888D", "I c #FFC7C9", "J c #FFB6B8", "K c #FFC7C7", "L c #FFDDE0", "M c #FFDADD", "N c #FFD4D7", "O c #FF798C", "P c #FFB3B3", "Q c #FFD9D9", "R c #FFD9DC", "S c #FFC6C9", "T c #FF898F", "U c #FF8389", "V c #FF6383", "W c #FF5883", "X c #FF8BB2", "Y c #FF9BA3", "Z c #FF9395", "` c #FF7E80", " . c #FF7276", ".. c #FF686F", "+. c #FF666E", " . + ", " @ # $ % ", " & * # = ", " - ; > , ", " ' ) # ! ~ ", " { ] ^ / ( ( _ : ", " < [ } | 1 ( 2 ; 3 4 5 ", " = # ; 6 7 > 8 3 > 9 4 0 a b ", " c d e f g ; h i 9 j k g l m ", " n 1 ; l ( h o p q g r 4 s ", " t u v w ; x k q y r z A B ", " C D ; > > 3 k E 4 F 6 G H ", " I J K E 3 q 4 F L M N O ", " P Q 3 i E R S T U V W ", " X Y Z ` ...+. ", " "}; spatialite_gui-2.0.0-devel/icons/create_new.xpm0000664000175000017500000000557112543275035016527 00000000000000/* XPM */ static const char * create_new_xpm[] = { "16 16 134 2", " c None", ". c #BABABA", "+ c #B8B8B8", "@ c #B7B7B7", "# c #B6B6B6", "$ c #B4B4B4", "% c #B3B3B3", "& c #BBBBBB", "* c #D0D0D0", "= c #E8E8E8", "- c #F3F3F3", "; c #FDFDFD", "> c #FCFCFC", ", c #EDEDED", "' c #E0E0E0", ") c #C2C2C2", "! c #ADADAD", "~ c #E1E1E1", "{ c #FEFEFE", "] c #FFFFFF", "^ c #FBFBFB", "/ c #CFCFCF", "( c #A9A9A9", "_ c #B9B9B9", ": c #F8F8F8", "< c #EAEAEA", "[ c #A7A7A7", "} c #B4B8BE", "| c #C1C1C1", "1 c #EFEFEF", "2 c #F6F6F6", "3 c #FAFAFA", "4 c #F0F0F0", "5 c #DEDEDE", "6 c #C3C3C3", "7 c #E6E6E6", "8 c #A5A5A5", "9 c #9FBEEA", "0 c #9BAFCD", "a c #BCBCBC", "b c #ABABAB", "c c #D6D6D6", "d c #D5D5D5", "e c #D1D1D1", "f c #C0C0C0", "g c #E5E5E5", "h c #A3A3A3", "i c #9CBBE7", "j c #A3C0E8", "k c #A3BFE5", "l c #8C9EB6", "m c #AEAEAE", "n c #A8A8A8", "o c #CDCDCD", "p c #E3E3E3", "q c #A0A0A0", "r c #93B4E3", "s c #ADC6E8", "t c #A6C0E3", "u c #8FB0DB", "v c #748FB5", "w c #C1CBD9", "x c #9A9A9A", "y c #7A7A7A", "z c #DCDCDC", "A c #C9C9C9", "B c #BDBDBD", "C c #BFBFBF", "D c #E2E2E2", "E c #9E9E9E", "F c #8CAEDD", "G c #A4BEE2", "H c #89ABD8", "I c #94B3D9", "J c #7A9FCF", "K c #5B7AA4", "L c #939393", "M c #696969", "N c #9B9B9B", "O c #82A6D7", "P c #99B6DC", "Q c #7DA1D0", "R c #739ACB", "S c #82A4CF", "T c #7499C7", "U c #586C89", "V c #878787", "W c #828282", "X c #969696", "Y c #7CA1D0", "Z c #8FAED7", "` c #6F97C9", " . c #668FC3", ".. c #5C88BD", "+. c #648CC0", "@. c #6188BC", "#. c #3F5485", "$. c #D0D1D3", "%. c #B0B0B0", "&. c #909090", "*. c #608CC6", "=. c #83A6D1", "-. c #7B9FCC", ";. c #7B9ECB", ">. c #6C92C3", ",. c #658DBE", "'. c #4569A8", "). c #8B97BA", "!. c #C4C4C4", "~. c #8B8B8B", "{. c #5A88C4", "]. c #6892C6", "^. c #80A2CD", "/. c #7096C5", "(. c #537BB6", "_. c #466AAB", ":. c #3D5EA3", "<. c #35529C", "[. c #596BA7", "}. c #EEEFF1", "|. c #F4F4F4", "1. c #8A8A8A", "2. c #4A7CBA", "3. c #5C87BF", "4. c #567EB9", "5. c #3A62A7", "6. c #7D859D", "7. c #90939D", "8. c #9F9FA1", "9. c #959595", "0. c #8D8D8D", "a. c #898989", "b. c #3C66AB", "c. c #385DA4", " ", " . + @ # $ % ", " & * = - ; > , ' ) ! ", " . ~ { ] ] ] ] ] ] ^ / ( ", " _ : { ] ] ] ] ] ] ^ < [ ", " } | # 1 2 ^ 3 4 5 6 7 8 ", " 9 0 @ a b c d e 6 a f g h ", " i j k l m n ~ g ~ o ) ) p q ", " r s t u v w x y z A B C D E ", " F G H I J K L ( M 6 + & ~ N ", " O P Q R S T U V W f % @ ' X ", " Y Z ` ...+.@.#.$.C %.% 5 &.", " *.=.-.;.T >.,.'.).c f A 7 !.~.", "{.].^./.(._.:.<.[.}.|.1 D . 1. ", "2.3.4.5. 6.7.8.b [ 9.0.a. ", " b.c. "}; spatialite_gui-2.0.0-devel/icons/geovtable.xpm0000664000175000017500000000604212543275035016355 00000000000000/* XPM */ static const char * geovtable_xpm[] = { "16 16 144 2", " c None", ". c #A2C1EF", "+ c #9FC0ED", "@ c #9DBEEB", "# c #9ABCEB", "$ c #ABCCEA", "% c #7BB996", "& c #58A860", "* c #4183CE", "= c #6A9EDB", "- c #AFCAE8", "; c #80A9DD", "> c #7DA5DC", ", c #7AA3DA", "' c #A1C1EE", ") c #F4F7FB", "! c #D0E8D3", "~ c #5AAD5A", "{ c #D0E9BC", "] c #FFFFFF", "^ c #C8DFF1", "/ c #88B6D7", "( c #428E8C", "_ c #FBFCFD", ": c #74A0D7", "< c #9EBFEC", "[ c #A5D59C", "} c #C2DEDB", "| c #428F8A", "1 c #E7F8C8", "2 c #8ACA77", "3 c #3A9AEA", "4 c #67B58D", "5 c #44A03A", "6 c #6F9BD4", "7 c #9BBDEB", "8 c #93BBE9", "9 c #ADD6F9", "0 c #A3D88A", "a c #4AA8B7", "b c #4BA7CE", "c c #78C94E", "d c #4AA341", "e c #C5D7ED", "f c #98BAE9", "g c #A6C3E9", "h c #6EB0CC", "i c #56AB55", "j c #D1DFF0", "k c #94B7E7", "l c #4687CE", "m c #DBE8ED", "n c #C9D9ED", "o c #8FB4E5", "p c #F2F6FA", "q c #AAC6E9", "r c #91C697", "s c #2571C6", "t c #3E8C8A", "u c #52A64B", "v c #9EBADE", "w c #8CB1E3", "x c #F1F6FA", "y c #AEC9EA", "z c #4AA245", "A c #2E9628", "B c #9BCAFA", "C c #4385CE", "D c #EBF0F7", "E c #5586C6", "F c #87AEE1", "G c #F0F4FA", "H c #B2CBEA", "I c #AEC6E3", "J c #C7CED6", "K c #4A9D42", "L c #5491DB", "M c #2E73BF", "N c #CBCBCB", "O c #8B8B8C", "P c #5E799B", "Q c #82AADF", "R c #EFF3F9", "S c #B4CAE6", "T c #9E9E9E", "U c #919191", "V c #F2F2F2", "W c #51A548", "X c #2E74C2", "Y c #EBEBEB", "Z c #DDDDDD", "` c #C4C4C4", " . c #4C4C4C", ".. c #7EA8DD", "+. c #909FB2", "@. c #77787A", "#. c #CED3D3", "$. c #747A82", "%. c #999999", "&. c #C5C5C5", "*. c #CFCFCF", "=. c #ABABAB", "-. c #656565", ";. c #4C4D4D", ">. c #7D8084", ",. c #737373", "'. c #7AA4D9", "). c #EEF3F9", "!. c #727B87", "~. c #868686", "{. c #F8F8F8", "]. c #484848", "^. c #BDBDBD", "/. c #CECECE", "(. c #C2C2C2", "_. c #ADADAD", ":. c #D3DCEA", "<. c #828282", "[. c #75A1D7", "}. c #EDF2F8", "|. c #9CA0A4", "1. c #6F6F70", "2. c #787B7E", "3. c #444444", "4. c #464646", "5. c #515151", "6. c #777A7D", "7. c #676767", "8. c #729ED6", "9. c #6E99D3", "0. c #5E84B6", "a. c #505861", "b. c #8A8D91", "c. c #A4A8AC", "d. c #AEAEAE", "e. c #979797", "f. c #717171", "g. c #787878", "h. c #A4A7AC", "i. c #8A8C8F", "j. c #4D4D4D", "k. c #4A4A4A", "l. c #646464", "m. c #6B6B6B", " ", " . + @ # $ % & * = - ; > , ", " ' ) ) ) ! ~ { ] ^ / ( _ ) : ", " < ) [ } | ] 1 2 3 4 { 5 _ 6 ", " 7 ) ] 8 9 1 0 a b c 2 2 d e ", " f ) g * 9 / h 3 b c i 0 5 j ", " k ) g l m h 3 3 b i 5 0 5 n ", " o p q r 0 2 4 a 3 s t 4 u v ", " w x y ] z 1 c A s s B C D E ", " F G H I J K 2 2 h L M N O P ", " Q R S T U V W s s X Y Z ` U .", " ..R +.@.#.$.%.&.*.=.-.;.>.` ,.", " '.).!.~.#.{.].^./.(._.].:.` <.", " [.}.|.1.#.2.3.4.5.5.4.3.6.` 7.", " 8.9.0.a.b.c.d.e.f.g.e.d.h.i.j.", " k.l.m.m. m.m.l.k. "}; spatialite_gui-2.0.0-devel/icons/index.xpm0000664000175000017500000000575312543275035015524 00000000000000/* XPM */ static const char * index_xpm[] = { "16 16 141 2", " c None", ". c #A2C1EF", "+ c #9FC0ED", "@ c #9DBEEB", "# c #9ABCEB", "$ c #96BAE9", "% c #93B7E7", "& c #90B5E6", "* c #8CB2E4", "= c #88AFE2", "- c #84ACE0", "; c #80A9DD", "> c #7DA5DC", ", c #7AA3DA", "' c #A1C1EE", ") c #F4F7FB", "! c #74A0D7", "~ c #B2C3BF", "{ c #ECD45D", "] c #E0CC4B", "^ c #DEC949", "/ c #DCC547", "( c #DAC243", "_ c #D9BE40", ": c #D2BB42", "< c #93C479", "[ c #84C37E", "} c #80C17A", "| c #7CBE76", "1 c #6F9BD4", "2 c #CAC686", "3 c #F3DE74", "4 c #F6E389", "5 c #F5DE85", "6 c #F4D981", "7 c #F1D378", "8 c #E8C250", "9 c #F4E3B3", "0 c #FFFEFD", "a c #FFFFFF", "b c #6A97D1", "c c #E6C846", "d c #F8E793", "e c #F4D85F", "f c #F6E090", "g c #F2D67D", "h c #E9C352", "i c #BDBD9F", "j c #A6C3E9", "k c #6493CE", "l c #EAC93D", "m c #F1D96B", "n c #F8E796", "o c #F2CF47", "p c #F4DC89", "q c #E0B737", "r c #F2DEA6", "s c #ACC7E8", "t c #EBF1F7", "u c #5F8FCB", "v c #E8C53A", "w c #F8E690", "x c #F7E38D", "y c #F2D260", "z c #F4D784", "A c #DCB33A", "B c #C8B87E", "C c #C6B882", "D c #C8B47B", "E c #C1B386", "F c #B4C3D1", "G c #B0C8E8", "H c #B5CCE8", "I c #DEE7F2", "J c #598AC8", "K c #F0D86E", "L c #EFD368", "M c #EDCF66", "N c #F3D984", "O c #F4D788", "P c #F1CF7D", "Q c #E8BC58", "R c #E5B752", "S c #D79D22", "T c #BBB399", "U c #FDFAF5", "V c #DBE5F1", "W c #5586C6", "X c #E5BD35", "Y c #B8B484", "Z c #E8D18B", "` c #DCB33C", " . c #F0D07D", ".. c #ECC76D", "+. c #E2B244", "@. c #C9AE6C", "#. c #BBC6CE", "$. c #AEC8E8", "%. c #D8E2F0", "&. c #5486C4", "*. c #82AADF", "=. c #EEEFEE", "-. c #DCAD31", ";. c #E6BA51", ">. c #D7A839", ",. c #F0D9AB", "'. c #BACFEA", "). c #F2F6FB", "!. c #5F8DC8", "~. c #7EA8DD", "{. c #E2BE5F", "]. c #E3B543", "^. c #D0B266", "/. c #BDCDDE", "(. c #BBD0EB", "_. c #BDD1EB", ":. c #B5CDEA", "<. c #5C8AC6", "[. c #96A6A6", "}. c #DDB040", "|. c #C7C3AC", "1. c #BFD3EB", "2. c #ADC7EA", "3. c #5F8CC6", "4. c #87A2B7", "5. c #EAE4D3", "6. c #EAF0F7", "7. c #E6EDF6", "8. c #E2EAF4", "9. c #DEE7F3", "0. c #DBE4F1", "a. c #5D8AC5", "b. c #729ED6", "c. c #6E99D3", "d. c #6896D1", "e. c #6392CE", "f. c #5E8ECB", "g. c #5B8AC9", "h. c #5687C7", "i. c #5284C3", "j. c #4277BB", " ", " . + @ # $ % & * = - ; > , ", " ' ) ) ) ) ) ) ) ) ) ) ) ) ! ", " ~ { ] ^ / ( _ : < [ } | ) 1 ", " 2 3 4 5 6 7 8 9 0 a a a ) b ", " c d e f g h i j j j j j ) k ", " l m n o p q r a a s a a a t u ", " v w x y z A B C D E F G H I J ", "v K L M N O P Q R S T U a a V W ", " X Y Z ` ...+.@.#.s s G $.%.&.", " *.=.-.;.>.,.a a '.).a a %.!.", " ~.{.].^./.(.(._.:.:.:.:.%.<.", " [.}.|.a 1.a a a 2.a a a %.3.", " 4.5.6.7.8.9.0.%.%.%.%.%.%.a.", " b.c.d.e.f.g.h.i.i.i.i.i.i.j.", " "}; spatialite_gui-2.0.0-devel/icons/tables.xpm0000664000175000017500000000427312543275035015663 00000000000000/* XPM */ static const char * tables_xpm[] = { "16 16 93 2", " c None", ". c #A2C1EF", "+ c #9FC0ED", "@ c #9DBEEB", "# c #93B7E7", "$ c #8CB2E4", "% c #88AFE2", "& c #84ACE0", "* c #80A9DD", "= c #7DA5DC", "- c #7AA3DA", "; c #A1C1EE", "> c #F4F7FB", ", c #74A0D7", "' c #9EBFEC", ") c #A4CBC6", "! c #A2C4E1", "~ c #9EC1E5", "{ c #9BBFE3", "] c #92B8DF", "^ c #8BB3DC", "/ c #87B0DA", "( c #8DB2E2", "_ c #7FA8DC", ": c #9BBDEB", "< c #AECAF0", "[ c #F5F8FB", "} c #E9EFF8", "| c #98BAE9", "1 c #9FBFEC", "2 c #EEF3FA", "3 c #A4CBC9", "4 c #A2C3E6", "5 c #94B7E7", "6 c #9CBDEB", "7 c #A8C6EF", "8 c #8FB4E5", "9 c #F2F6FA", "0 c #99BBE9", "a c #A5D59C", "b c #A1D398", "c c #93CB8B", "d c #89C682", "e c #84C37E", "f c #80C17A", "g c #7CBE76", "h c #6F9BD4", "i c #8CB1E3", "j c #F1F6FA", "k c #96B8E7", "l c #FFFFFF", "m c #6A97D1", "n c #87AEE1", "o c #F0F4FA", "p c #92B6E5", "q c #EDF3F9", "r c #A6C3E9", "s c #6493CE", "t c #75A1D7", "u c #EDF2F8", "v c #93B6E5", "w c #F0F5FA", "x c #ACC7E8", "y c #EBF1F7", "z c #5F8FCB", "A c #729ED6", "B c #6E99D3", "C c #85ACE0", "D c #E5ECF7", "E c #AAC6E9", "F c #ACC6E9", "G c #B0C9E9", "H c #B0C8E8", "I c #B5CCE8", "J c #DEE7F2", "K c #598AC8", "L c #AEC9EA", "M c #DBE5F1", "N c #5586C6", "O c #B2CBEA", "P c #B3CCEA", "Q c #AEC8E8", "R c #D8E2F0", "S c #5486C4", "T c #EAF0F7", "U c #E6EDF6", "V c #DBE4F1", "W c #5D8AC5", "X c #6896D1", "Y c #6392CE", "Z c #5687C7", "` c #5284C3", " . c #4277BB", " ", " . + @ # $ % & * = - ", " ; > > > > > > > > > , ", " ' > ) ! ~ { ] ^ / ( _ = - ", " : > < [ [ [ [ [ [ > } > , ", " | > 1 2 3 4 + @ # $ % & * = - ", " 5 > 6 [ 7 > > > > > > > > > , ", " 8 9 0 2 ' > a b c d e f g > h ", " i j k [ : > l l l l l l l > m ", " n o p q | > r r r r r r r > s ", " t u v w 5 > r l x l l l l y z ", " A B C D 8 9 E F x x G H I J K ", " t u i j L l x l l l l M N ", " A B n o O P x x x H Q R S ", " t u T U V R R R R R W ", " A B X Y Z ` ` ` ` ` ."}; spatialite_gui-2.0.0-devel/icons/geometry.xpm0000664000175000017500000000122012543275035016231 00000000000000/* XPM */ static const char * geometry_xpm[] = { "16 16 16 1", " c None", ". c #45A2E9", "+ c #ACDAA7", "@ c #55B34B", "# c #D2EEB1", "$ c #8AD26C", "% c #0A5EC5", "& c #72C757", "* c #ECF8D6", "= c #F1F9E7", "- c #D2EDC3", "; c #C9ECFA", "> c #97BBE6", ", c #106CD2", "' c #209910", ") c #FFFFFF", " ", " )))) ", " ))'',,)) ", " )''*==;,') ", " )'=**#..>#') ", " ),=##@.$&#') ", " ),;-#$..@$&+') ", " ),;.+...$&@+') ", " ),;>....@@@+') ", " )'-$&...,,'+,) ", " )'-$@@,%%>,) ", " )'+#@',%>>,) ", " )''++>>,,) ", " ))',,,)) ", " )))) ", " "}; spatialite_gui-2.0.0-devel/icons/mbrcache.xpm0000664000175000017500000000210012543275035016140 00000000000000/* XPM */ static const char * mbrcache_xpm[] = { "16 16 43 1", " c None", ". c #97BBE6", "+ c #D2EEB1", "@ c #F175FF", "# c #A101EA", "$ c #C9ECFA", "% c #8800E7", "& c #8AD26C", "* c #BB17F3", "= c #72C757", "- c #D2EDC3", "; c #0A5EC5", "> c #F1F9E7", ", c #B309EE", "' c #1F76D1", ") c #AD09F3", "! c #AACFEF", "~ c #FB9AFF", "{ c #8F00E6", "] c #CDECAC", "^ c #9501EC", "/ c #9C00E4", "( c #C927FC", "_ c #85CA72", ": c #45A2E9", "< c #5D95D8", "[ c #A702E9", "} c #B939DC", "| c #2D86DA", "1 c #C9EBA9", "2 c #B113ED", "3 c #B20CF3", "4 c #9601CC", "5 c #CC36FC", "6 c #B711F3", "7 c #9600E5", "8 c #55B34B", "9 c #B512F0", "0 c #ACDAA7", "a c #106CD2", "b c #209910", "c c #FFFFFF", "d c #F175FF", " cccccc ", " c999**c ", " c9~@5c ", " cc9~@*ccc ", " cbb9@@2[/4c ", " cb>9,,#(67bc ", " ca>++}#3%+bc ", " ca$-+&#)%1=0bc ", " ca$|0'){]=80bc ", " ca$<'^{!8880bc ", " cb-&=%!:aab0ac ", " cb-&_8a;;.ac ", " cb0+8ba;..ac ", " cbb00..aac ", " ccbaaacc ", " cccc "}; spatialite_gui-2.0.0-devel/icons/attach.xpm0000664000175000017500000000454612543275035015660 00000000000000/* XPM */ static const char * attach_xpm[] = { "16 16 103 2", " c None", ". c #BABABA", "+ c #B8B8B8", "@ c #B7B7B7", "# c #B6B6B6", "$ c #B4B4B4", "% c #B3B3B3", "& c #BBBBBB", "* c #D0D0D0", "= c #E8E8E8", "- c #F3F3F3", "; c #FDFDFD", "> c #FCFCFC", ", c #EDEDED", "' c #E0E0E0", ") c #C2C2C2", "! c #ADADAD", "~ c #E1E1E1", "{ c #FEFEFE", "] c #FFFFFF", "^ c #FBFBFB", "/ c #CFCFCF", "( c #A9A9A9", "_ c #B9B9B9", ": c #F8F8F8", "< c #EAEAEA", "[ c #A7A7A7", "} c #F7F7F7", "| c #E7E7E7", "1 c #EFEFEF", "2 c #F6F6F6", "3 c #FAFAFA", "4 c #F0F0F0", "5 c #DEDEDE", "6 c #C3C3C3", "7 c #E6E6E6", "8 c #A5A5A5", "9 c #B5B5B5", "0 c #EBEBEB", "a c #D6D6D6", "b c #D5D5D5", "c c #D1D1D1", "d c #BCBCBC", "e c #C0C0C0", "f c #E5E5E5", "g c #A3A3A3", "h c #F5F5F5", "i c #EEEEEE", "j c #E2E2E2", "k c #CDCDCD", "l c #E3E3E3", "m c #A0A0A0", "n c #B2B2B2", "o c #F4F4F4", "p c #DDDDDD", "q c #C9C9C9", "r c #BDBDBD", "s c #BFBFBF", "t c #9E9E9E", "u c #B0B0B0", "v c #A8A8A8", "w c #8B8B8B", "x c #878787", "y c #B1B1B1", "z c #848484", "A c #868686", "B c #AEAEAE", "C c #919191", "D c #C1C1C1", "E c #898989", "F c #888888", "G c #D8D8D8", "H c #C4C4C4", "I c #4C4C4C", "J c #ACACAC", "K c #797979", "L c #CED3D3", "M c #7B7B7B", "N c #4D4D4D", "O c #656565", "P c #929292", "Q c #676767", "R c #737373", "S c #818181", "T c #464646", "U c #CECECE", "V c #454545", "W c #828282", "X c #727272", "Y c #6D6D6D", "Z c #7E7E7E", "` c #515151", " . c #424242", ".. c #565656", "+. c #8E8E8E", "@. c #979797", "#. c #717171", "$. c #787878", "%. c #AAAAAA", "&. c #8D8D8D", "*. c #4A4A4A", "=. c #646464", "-. c #6B6B6B", " ", " . + @ # $ % ", " & * = - ; > , ' ) ! ", " . ~ { ] ] ] ] ] ] ^ / ( ", " _ : { ] ] ] ] ] ] ^ < [ ", " @ } | 1 2 ^ 3 4 5 6 7 8 ", " 9 2 0 5 a b c 6 d e f g ", " $ h i 7 j 7 ~ k ) ) l m ", " n o < ~ p l 5 q r s j t ", " u - ' v w t x y y z t A ", " B , C C = p D E F G p H C I ", " J # K L M N O P K O N Q H R ", " ( S A L k T r U ) ! V F H W ", " X Y L Z V T ` ` T ...H Q ", " ..+.( B @.#.$.@.B %.&.N ", " *.=.-.-. -.-.=.*. "}; spatialite_gui-2.0.0-devel/QueryView.cpp0000664000175000017500000023714712544026240015215 00000000000000/* / QueryView.cpp / a panel to set SQL queries / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" #include "wx/clipbrd.h" #include "wx/filename.h" // // ICONs in XPM format [universally portable] // #include "icons/sql_go.xpm" #include "icons/sql_abort.xpm" #include "icons/sql_abort_no.xpm" #include "icons/hs_back.xpm" #include "icons/hs_back_no.xpm" #include "icons/hs_forward.xpm" #include "icons/hs_forward_no.xpm" MyQueryView::MyQueryView(MyFrame * parent, wxWindowID id): wxPanel(parent, id, wxDefaultPosition, wxSize(440, 76), wxBORDER_SUNKEN) { // // constructor: a frame for SQL Queries // MainFrame = parent; BracketStart = -1; BracketEnd = -1; IgnoreEvent = false; // SQL statement SqlCtrl = new MySqlControl(this, ID_SQL, wxT(""), wxPoint(40, 5), wxSize(20, 20), wxTE_MULTILINE | wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB | wxHSCROLL | wxTE_RICH); BtnSqlGo = new wxBitmapButton(this, ID_SQL_GO, wxBitmap(sql_go_xpm), wxPoint(340, 5), wxSize(32, 32)); BtnSqlGo->SetToolTip(wxT("Execute SQL statement")); BtnSqlAbort = new wxBitmapButton(this, ID_SQL_ABORT, wxBitmap(sql_abort_xpm), wxPoint(340, 38), wxSize(32, 32)); BtnSqlAbort->SetBitmapDisabled(wxBitmap(sql_abort_no_xpm)); BtnSqlAbort->SetToolTip(wxT("Abort SQL query")); BtnHistoryBack = new wxBitmapButton(this, ID_HISTORY_BACK, wxBitmap(hs_back_xpm), wxPoint(5, 5), wxSize(32, 32)); BtnHistoryBack->SetBitmapDisabled(wxBitmap(hs_back_no_xpm)); BtnHistoryBack->SetToolTip(wxT("History: previous SQL statement")); BtnHistoryForward = new wxBitmapButton(this, ID_HISTORY_FORWARD, wxBitmap(hs_forward_xpm), wxPoint(5, 40), wxSize(32, 32)); BtnHistoryForward->SetBitmapDisabled(wxBitmap(hs_forward_no_xpm)); BtnHistoryForward->SetToolTip(wxT("History: next SQL statement")); SetHistoryStates(); BtnSqlAbort->Enable(false); // setting up event handlers Connect(ID_SQL_GO, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyQueryView::OnSqlGo); Connect(ID_SQL_ABORT, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyQueryView::OnSqlAbort); Connect(ID_HISTORY_BACK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyQueryView::OnHistoryBack); Connect(ID_HISTORY_FORWARD, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & MyQueryView::OnHistoryForward); Connect(wxID_ANY, wxEVT_SIZE, (wxObjectEventFunction) & MyQueryView::OnSize); Connect(wxID_ANY, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & MyQueryView::OnSqlSyntaxColor); } void MyQueryView::ShowControls() { // // making all SQL controls to be visible // SqlCtrl->Show(true); BtnSqlGo->Show(true); BtnSqlAbort->Show(true); BtnHistoryBack->Show(true); BtnHistoryForward->Show(true); SetHistoryStates(); } void MyQueryView::HideControls() { // // making all controls to be invisible // SqlCtrl->Show(false); BtnSqlGo->Show(false); BtnSqlAbort->Show(false); BtnHistoryBack->Show(false); BtnHistoryForward->Show(false); } void MyQueryView::AddToHistory(wxString & sql) { // // adds an SQL statement to history // History.Add(sql); SetHistoryStates(); } void MyQueryView::SetHistoryStates() { // // updates the history buttons state // BtnHistoryForward->Enable(History.TestNext()); BtnHistoryBack->Enable(History.TestPrev()); } void MyQueryView::SetSql(wxString & sql, bool execute) { bool coverage = false; wxString tile_data_table; SetSql(sql, execute, coverage, tile_data_table, true); } void MyQueryView::SetSql(wxString & sql, bool execute, bool coverage, wxString & tile_data_table, bool reset) { // // sets an SQL statement [and maybe executes it] // int metaDataType = MainFrame->GetMetaDataType(); SqlCtrl->SetValue(sql); if (execute == true) { if (metaDataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 MainFrame->InsertIntoLog(sql); } if (MainFrame->GetRsView()->ExecuteSqlPre(sql, 0, true, coverage, tile_data_table, reset) == false) { if (metaDataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 MainFrame->UpdateLog(MainFrame->GetRsView()->GetSqlErrorMsg()); } wxMessageBox(MainFrame->GetRsView()->GetSqlErrorMsg(), wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } else { if (metaDataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 MainFrame->UpdateLog(); } } } } void MyQueryView::OnSize(wxSizeEvent & WXUNUSED(event)) { // // this window has changed its size // int vert; int vertBack; wxSize sz = GetClientSize(); // setting the SQL statement pane size SqlCtrl->SetSize(sz.GetWidth() - 80, sz.GetHeight() - 10); // setting the SQL GO button position BtnSqlGo->Move(sz.GetWidth() - 35, 5); // setting the SQL GO button size vert = sz.GetHeight() - 45; if (vert < 32) vert = 32; BtnSqlGo->SetSize(32, vert); // setting the SQL ABORT button position BtnSqlAbort->Move(sz.GetWidth() - 35, sz.GetHeight() - 37); // setting the SQL ABORT button size BtnSqlAbort->SetSize(32, 32); // setting the HISTORY BACK button position BtnHistoryBack->Move(5, 5); // setting the HISTORY BACK button size vert = (sz.GetHeight() - 15) / 2; if (vert < 32) vert = 32; BtnHistoryBack->SetSize(32, vert); vertBack = 10 + vert; // setting the HISTORY FORWARD button position BtnHistoryForward->Move(5, vertBack); // setting the HISTORY FORWARD button size BtnHistoryForward->SetSize(32, vert); } void MyQueryView::OnSqlGo(wxCommandEvent & WXUNUSED(event)) { // // executing an SQL statement // wxString tile_data_name; int metaDataType = MainFrame->GetMetaDataType(); wxString sql = SqlCtrl->GetValue(); if (metaDataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 MainFrame->InsertIntoLog(sql); } if (MainFrame->GetRsView()->ExecuteSqlPre(sql, 0, true, false, tile_data_name, true) == false) { if (metaDataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 MainFrame->UpdateLog(MainFrame->GetRsView()->GetSqlErrorMsg()); } wxMessageBox(MainFrame->GetRsView()->GetSqlErrorMsg(), wxT("spatialite_gui"), wxOK | wxICON_ERROR, MainFrame); } else { if (metaDataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 MainFrame->UpdateLog(); } } } void MyQueryView::OnSqlAbort(wxCommandEvent & WXUNUSED(event)) { // // aborting the current SQL query // MainFrame->GetRsView()->AbortRequested(); if (MainFrame->GetMetaDataType() == METADATA_CURRENT) { // current metadata style >= v.4.0.0 MainFrame->UpdateAbortedLog(); } } void MyQueryView::OnHistoryBack(wxCommandEvent & WXUNUSED(event)) { // // going backward into the SQL Queries History // MySqlQuery *sql = History.GetPrev(); if (sql) { SetSql(sql->GetSql(), false); SetHistoryStates(); } } void MyQueryView::OnHistoryForward(wxCommandEvent & WXUNUSED(event)) { // // going forward into the SQL Queries History // MySqlQuery *sql = History.GetNext(); if (sql) { SetSql(sql->GetSql(), false); SetHistoryStates(); } } bool MyQueryView::IsSqlString(wxString & str) { // checks if this one is an SQL string constant char *word = new char[str.Len() * 4]; strcpy(word, str.ToUTF8()); int len = strlen(word); if (len < 2) goto no; if (word[0] == '\'' && word[len - 1] == '\'') goto yes; if (word[0] == '"' && word[len - 1] == '"') goto yes; no: delete[]word; return false; yes: delete[]word; return true; } bool MyQueryView::IsSqlNumber(wxString & str) { // checks if this one is an SQL numeric constant double dbl; return str.ToDouble(&dbl); } bool MyQueryView::IsSqliteExtra(wxString & str) { // checks if this one is an extra SQLite keyword if (str.CmpNoCase(wxT("asc")) == 0) return true; if (str.CmpNoCase(wxT("desc")) == 0) return true; if (str.CmpNoCase(wxT("null")) == 0) return true; if (str.CmpNoCase(wxT("trigger")) == 0) return true; if (str.CmpNoCase(wxT("for")) == 0) return true; if (str.CmpNoCase(wxT("each")) == 0) return true; if (str.CmpNoCase(wxT("row")) == 0) return true; if (str.CmpNoCase(wxT("begin")) == 0) return true; if (str.CmpNoCase(wxT("end")) == 0) return true; if (str.CmpNoCase(wxT("before")) == 0) return true; if (str.CmpNoCase(wxT("after")) == 0) return true; if (str.CmpNoCase(wxT("virtual")) == 0) return true; return false; } bool MyQueryView::IsSqlFunction(wxString & str, char next_c) { // checks if this one is an SQL function if (next_c != '(') return false; if (str.CmpNoCase(wxT("raise")) == 0) return true; if (str.CmpNoCase(wxT("avg")) == 0) return true; if (str.CmpNoCase(wxT("count")) == 0) return true; if (str.CmpNoCase(wxT("group_concat")) == 0) return true; if (str.CmpNoCase(wxT("max")) == 0) return true; if (str.CmpNoCase(wxT("min")) == 0) return true; if (str.CmpNoCase(wxT("sum")) == 0) return true; if (str.CmpNoCase(wxT("total")) == 0) return true; if (str.CmpNoCase(wxT("abs")) == 0) return true; if (str.CmpNoCase(wxT("changes")) == 0) return true; if (str.CmpNoCase(wxT("char")) == 0) return true; if (str.CmpNoCase(wxT("coalesce")) == 0) return true; if (str.CmpNoCase(wxT("glob")) == 0) return true; if (str.CmpNoCase(wxT("ifnull")) == 0) return true; if (str.CmpNoCase(wxT("instr")) == 0) return true; if (str.CmpNoCase(wxT("hex")) == 0) return true; if (str.CmpNoCase(wxT("last_insert_rowid")) == 0) return true; if (str.CmpNoCase(wxT("length")) == 0) return true; if (str.CmpNoCase(wxT("load_extension")) == 0) return true; if (str.CmpNoCase(wxT("lower")) == 0) return true; if (str.CmpNoCase(wxT("ltrim")) == 0) return true; if (str.CmpNoCase(wxT("nullif")) == 0) return true; if (str.CmpNoCase(wxT("quote")) == 0) return true; if (str.CmpNoCase(wxT("random")) == 0) return true; if (str.CmpNoCase(wxT("randomblob")) == 0) return true; if (str.CmpNoCase(wxT("replace")) == 0) return true; if (str.CmpNoCase(wxT("round")) == 0) return true; if (str.CmpNoCase(wxT("rtrim")) == 0) return true; if (str.CmpNoCase(wxT("soundex")) == 0) return true; if (str.CmpNoCase(wxT("sqlite_version")) == 0) return true; if (str.CmpNoCase(wxT("substr")) == 0) return true; if (str.CmpNoCase(wxT("trim")) == 0) return true; if (str.CmpNoCase(wxT("typeof")) == 0) return true; if (str.CmpNoCase(wxT("unicode")) == 0) return true; if (str.CmpNoCase(wxT("upper")) == 0) return true; if (str.CmpNoCase(wxT("zeroblob")) == 0) return true; return false; } bool MyQueryView::IsSqlGeoFunction(wxString & str, char next_c) { // checks if this one is an SQL geo-function if (next_c != '(') return false; if (str.CmpNoCase(wxT("spatialite_version")) == 0) return true; if (str.CmpNoCase(wxT("spatialite_target_cpu")) == 0) return true; if (str.CmpNoCase(wxT("freexl_version")) == 0) return true; if (str.CmpNoCase(wxT("geos_version")) == 0) return true; if (str.CmpNoCase(wxT("proj4_version")) == 0) return true; if (str.CmpNoCase(wxT("lwgeom_version")) == 0) return true; if (str.CmpNoCase(wxT("libxml2_version")) == 0) return true; if (str.CmpNoCase(wxT("hasIconv")) == 0) return true; if (str.CmpNoCase(wxT("hasMathSql")) == 0) return true; if (str.CmpNoCase(wxT("hasGeoCallbacks")) == 0) return true; if (str.CmpNoCase(wxT("hasGeos")) == 0) return true; if (str.CmpNoCase(wxT("hasProj")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosAdvanced")) == 0) return true; if (str.CmpNoCase(wxT("hasGeosTrunk")) == 0) return true; if (str.CmpNoCase(wxT("hasLwGeom")) == 0) return true; if (str.CmpNoCase(wxT("hasEpsg")) == 0) return true; if (str.CmpNoCase(wxT("hasFreeXL")) == 0) return true; if (str.CmpNoCase(wxT("hasLibXML2")) == 0) return true; if (str.CmpNoCase(wxT("hasGeoPackage")) == 0) return true; if (str.CmpNoCase(wxT("EnableGpkgAmphibiousMode")) == 0) return true; if (str.CmpNoCase(wxT("DisableGpkgAmphibiousMode")) == 0) return true; if (str.CmpNoCase(wxT("GetGpkgAmphibiousMode")) == 0) return true; if (str.CmpNoCase(wxT("EnableGpkgMode")) == 0) return true; if (str.CmpNoCase(wxT("DisableGpkgMode")) == 0) return true; if (str.CmpNoCase(wxT("GetGpkgMode")) == 0) return true; if (str.CmpNoCase(wxT("SetDecimalPrecision")) == 0) return true; if (str.CmpNoCase(wxT("GetDecimalPrecision")) == 0) return true; if (str.CmpNoCase(wxT("GeometryConstraints")) == 0) return true; if (str.CmpNoCase(wxT("CheckSpatialMetaData")) == 0) return true; if (str.CmpNoCase(wxT("AutoFDOStart")) == 0) return true; if (str.CmpNoCase(wxT("AutoFDOStop")) == 0) return true; if (str.CmpNoCase(wxT("InitFDOSpatialMetaData")) == 0) return true; if (str.CmpNoCase(wxT("AddFDOGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("RecoverFDOGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("DiscardFDOGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("InitSpatialMetaData")) == 0) return true; if (str.CmpNoCase(wxT("AddGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("RecoverGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("DiscardGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("RegisterVirtualGeometry")) == 0) return true; if (str.CmpNoCase(wxT("DropVirtualGeometry")) == 0) return true; if (str.CmpNoCase(wxT("InvalidateLayerStatistics")) == 0) return true; if (str.CmpNoCase(wxT("UpdateLayerStatistics")) == 0) return true; if (str.CmpNoCase(wxT("GetLayerExtent")) == 0) return true; if (str.CmpNoCase(wxT("CreateSpatialIndex")) == 0) return true; if (str.CmpNoCase(wxT("CreateMbrCache")) == 0) return true; if (str.CmpNoCase(wxT("DisableSpatialIndex")) == 0) return true; if (str.CmpNoCase(wxT("RebuildGeometryTriggers")) == 0) return true; if (str.CmpNoCase(wxT("UpgradeGeometryTriggers")) == 0) return true; if (str.CmpNoCase(wxT("CheckSpatialIndex")) == 0) return true; if (str.CmpNoCase(wxT("RecoverSpatialIndex")) == 0) return true; if (str.CmpNoCase(wxT("CheckShadowedRowid")) == 0) return true; if (str.CmpNoCase(wxT("CheckWithoutRowid")) == 0) return true; if (str.CmpNoCase(wxT("CreateMetaCatalogTables")) == 0) return true; if (str.CmpNoCase(wxT("UpdateMetaCatalogStatistics")) == 0) return true; if (str.CmpNoCase(wxT("CreateTopologyTables")) == 0) return true; if (str.CmpNoCase(wxT("CreateStylingTables")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterVectorCoverage")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterVectorCoverage")) == 0) return true; if (str.CmpNoCase(wxT("SE_SetVectorCoverageInfos")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterVectorCoverageSrid")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterVectorCoverageSrid")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterVectorCoverageKeyword")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterVectorCoverageKeyword")) == 0) return true; if (str.CmpNoCase(wxT("SE_UpdateVectorCoverageExtent")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterExternalGraphic")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterExternalGraphic")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterVectorStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterVectorStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_ReloadVectorStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterVectorStyledLayer")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterVectorStyledLayer")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterRasterStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterRasterStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_ReloadRasterStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterRasterStyledLayer")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterRasterStyledLayer")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterRasterCoverageSrid")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterRasterCoverageSrid")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterRasterCoverageKeyword")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterRasterCoverageKeyword")) == 0) return true; if (str.CmpNoCase(wxT("SE_UpdateRasterCoverageExtent")) == 0) return true; if (str.CmpNoCase(wxT("SE_SetStyledGroupInfos")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterStyledGroup")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterStyledGroupRaster")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterStyledGroupVector")) == 0) return true; if (str.CmpNoCase(wxT("SE_SetStyledGroupPaintOrder")) == 0) return true; if (str.CmpNoCase(wxT("SE_SetStyledGroupRasterPaintOrder")) == 0) return true; if (str.CmpNoCase(wxT("SE_SetStyledGroupVectorPaintOrder")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterStyledGroupRaster")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterStyledGroupVector")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterStyledGroupLayer")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterGroupStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterGroupStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_ReloadGroupStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_RegisterStyledGroupStyle")) == 0) return true; if (str.CmpNoCase(wxT("SE_UnregisterStyledGroupStyle")) == 0) return true; if (str.CmpNoCase(wxT("CreateIsoMetadataTables")) == 0) return true; if (str.CmpNoCase(wxT("GetIsoMetadataId")) == 0) return true; if (str.CmpNoCase(wxT("RegisterIsoMetadata")) == 0) return true; if (str.CmpNoCase(wxT("XB_LoadXML")) == 0) return true; if (str.CmpNoCase(wxT("XB_StoreXML")) == 0) return true; if (str.CmpNoCase(wxT("CountUnsafeTriggers")) == 0) return true; if (str.CmpNoCase(wxT("CastToInteger")) == 0) return true; if (str.CmpNoCase(wxT("CastToDouble")) == 0) return true; if (str.CmpNoCase(wxT("CastToText")) == 0) return true; if (str.CmpNoCase(wxT("CastToBlob")) == 0) return true; if (str.CmpNoCase(wxT("ForceAsNull")) == 0) return true; if (str.CmpNoCase(wxT("CreateUUID")) == 0) return true; if (str.CmpNoCase(wxT("MD5Checksum")) == 0) return true; if (str.CmpNoCase(wxT("MD5TotalChecksum")) == 0) return true; if (str.CmpNoCase(wxT("EncodeURL")) == 0) return true; if (str.CmpNoCase(wxT("DecodeURL")) == 0) return true; if (str.CmpNoCase(wxT("DirNameFromPath")) == 0) return true; if (str.CmpNoCase(wxT("FullFileNameFromPath")) == 0) return true; if (str.CmpNoCase(wxT("FileNameFromPath")) == 0) return true; if (str.CmpNoCase(wxT("FileExtFromPath")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Create")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateTranslate")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateScale")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateRotate")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateXRoll")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateYRoll")) == 0) return true; if (str.CmpNoCase(wxT("ATM_CreateZRoll")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Translate")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Scale")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Rotate")) == 0) return true; if (str.CmpNoCase(wxT("ATM_XRoll")) == 0) return true; if (str.CmpNoCase(wxT("ATM_YRoll")) == 0) return true; if (str.CmpNoCase(wxT("ATM_ZRoll")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Multiply")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Transform")) == 0) return true; if (str.CmpNoCase(wxT("ATM_IsValid")) == 0) return true; if (str.CmpNoCase(wxT("ATM_AsText")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Determinant")) == 0) return true; if (str.CmpNoCase(wxT("ATM_IsInvertible")) == 0) return true; if (str.CmpNoCase(wxT("ATM_Invert")) == 0) return true; if (str.CmpNoCase(wxT("GCP_Compute")) == 0) return true; if (str.CmpNoCase(wxT("GCP_Transform")) == 0) return true; if (str.CmpNoCase(wxT("GCP_IsValid")) == 0) return true; if (str.CmpNoCase(wxT("GCP_AsText")) == 0) return true; if (str.CmpNoCase(wxT("GCP2ATM")) == 0) return true; if (str.CmpNoCase(wxT("CreateRasterCoveragesTable")) == 0) return true; if (str.CmpNoCase(wxT("CreateVectorCoveragesTables")) == 0) return true; if (str.CmpNoCase(wxT("CloneTable")) == 0) return true; if (str.CmpNoCase(wxT("CheckDuplicateRows")) == 0) return true; if (str.CmpNoCase(wxT("RemoveDuplicateRows")) == 0) return true; if (str.CmpNoCase(wxT("ElementaryGeometries")) == 0) return true; if (str.CmpNoCase(wxT("DropGeoTable")) == 0) return true; if (str.CmpNoCase(wxT("ImportSHP")) == 0) return true; if (str.CmpNoCase(wxT("ExportSHP")) == 0) return true; if (str.CmpNoCase(wxT("ImportDBF")) == 0) return true; if (str.CmpNoCase(wxT("ExportDBF")) == 0) return true; if (str.CmpNoCase(wxT("ExportKML")) == 0) return true; if (str.CmpNoCase(wxT("ExportGeoJSON")) == 0) return true; if (str.CmpNoCase(wxT("ImportXLS")) == 0) return true; if (str.CmpNoCase(wxT("ImportWFS")) == 0) return true; if (str.CmpNoCase(wxT("ImportDXF")) == 0) return true; if (str.CmpNoCase(wxT("ImportDXFfromDir")) == 0) return true; if (str.CmpNoCase(wxT("InsertEpsgSrid")) == 0) return true; if (str.CmpNoCase(wxT("Abs")) == 0) return true; if (str.CmpNoCase(wxT("Acos")) == 0) return true; if (str.CmpNoCase(wxT("Asin")) == 0) return true; if (str.CmpNoCase(wxT("Atan")) == 0) return true; if (str.CmpNoCase(wxT("Atan2")) == 0) return true; if (str.CmpNoCase(wxT("Ceil")) == 0) return true; if (str.CmpNoCase(wxT("Ceiling")) == 0) return true; if (str.CmpNoCase(wxT("Cos")) == 0) return true; if (str.CmpNoCase(wxT("Cot")) == 0) return true; if (str.CmpNoCase(wxT("Degrees")) == 0) return true; if (str.CmpNoCase(wxT("Exp")) == 0) return true; if (str.CmpNoCase(wxT("Floor")) == 0) return true; if (str.CmpNoCase(wxT("Ln")) == 0) return true; if (str.CmpNoCase(wxT("Log")) == 0) return true; if (str.CmpNoCase(wxT("Log2")) == 0) return true; if (str.CmpNoCase(wxT("Log10")) == 0) return true; if (str.CmpNoCase(wxT("PI")) == 0) return true; if (str.CmpNoCase(wxT("Pow")) == 0) return true; if (str.CmpNoCase(wxT("Power")) == 0) return true; if (str.CmpNoCase(wxT("Radians")) == 0) return true; if (str.CmpNoCase(wxT("Round")) == 0) return true; if (str.CmpNoCase(wxT("Sign")) == 0) return true; if (str.CmpNoCase(wxT("Sin")) == 0) return true; if (str.CmpNoCase(wxT("Sqrt")) == 0) return true; if (str.CmpNoCase(wxT("Stddev_pop")) == 0) return true; if (str.CmpNoCase(wxT("Stddev_samp")) == 0) return true; if (str.CmpNoCase(wxT("Var_pop")) == 0) return true; if (str.CmpNoCase(wxT("Var_samp")) == 0) return true; if (str.CmpNoCase(wxT("Tan")) == 0) return true; if (str.CmpNoCase(wxT("IsZipBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsPdfBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsGifBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsPngBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsTiffBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsWaveletBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsJpegBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsJp2Blob")) == 0) return true; if (str.CmpNoCase(wxT("IsExifBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsExifGpsBlob")) == 0) return true; if (str.CmpNoCase(wxT("IsWebpBlob")) == 0) return true; if (str.CmpNoCase(wxT("GetMimeType")) == 0) return true; if (str.CmpNoCase(wxT("BlobFromFile")) == 0) return true; if (str.CmpNoCase(wxT("BlobToFile")) == 0) return true; if (str.CmpNoCase(wxT("ExportDXF")) == 0) return true; if (str.CmpNoCase(wxT("MakePoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_Point")) == 0) return true; if (str.CmpNoCase(wxT("MakePointZ")) == 0) return true; if (str.CmpNoCase(wxT("ST_PointZ")) == 0) return true; if (str.CmpNoCase(wxT("MakePointM")) == 0) return true; if (str.CmpNoCase(wxT("ST_PointM")) == 0) return true; if (str.CmpNoCase(wxT("MakePointZM")) == 0) return true; if (str.CmpNoCase(wxT("ST_PointZM")) == 0) return true; if (str.CmpNoCase(wxT("MakeLine")) == 0) return true; if (str.CmpNoCase(wxT("MakeCircle")) == 0) return true; if (str.CmpNoCase(wxT("MakeEllipse")) == 0) return true; if (str.CmpNoCase(wxT("MakeArc")) == 0) return true; if (str.CmpNoCase(wxT("MakeEllipticArc")) == 0) return true; if (str.CmpNoCase(wxT("MakeCircularSector")) == 0) return true; if (str.CmpNoCase(wxT("MakeCircularStripe")) == 0) return true; if (str.CmpNoCase(wxT("MakeEllipticSector")) == 0) return true; if (str.CmpNoCase(wxT("BuildMbr")) == 0) return true; if (str.CmpNoCase(wxT("BuildCircleMbr")) == 0) return true; if (str.CmpNoCase(wxT("Extent")) == 0) return true; if (str.CmpNoCase(wxT("MbrMinX")) == 0) return true; if (str.CmpNoCase(wxT("MbrMinY")) == 0) return true; if (str.CmpNoCase(wxT("MbrMaxX")) == 0) return true; if (str.CmpNoCase(wxT("MbrMaxY")) == 0) return true; if (str.CmpNoCase(wxT("ST_MbrMinX")) == 0) return true; if (str.CmpNoCase(wxT("ST_MbrMinY")) == 0) return true; if (str.CmpNoCase(wxT("ST_MbrMaxX")) == 0) return true; if (str.CmpNoCase(wxT("ST_MbrMaxY")) == 0) return true; if (str.CmpNoCase(wxT("ST_MinX")) == 0) return true; if (str.CmpNoCase(wxT("ST_MinY")) == 0) return true; if (str.CmpNoCase(wxT("ST_MaxX")) == 0) return true; if (str.CmpNoCase(wxT("ST_MaxY")) == 0) return true; if (str.CmpNoCase(wxT("ST_MinZ")) == 0) return true; if (str.CmpNoCase(wxT("ST_MinM")) == 0) return true; if (str.CmpNoCase(wxT("ST_MaxZ")) == 0) return true; if (str.CmpNoCase(wxT("ST_MaxM")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_GeomFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_WKTToSQL")) == 0) return true; if (str.CmpNoCase(wxT("GeometryFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_GeometryFromText")) == 0) return true; if (str.CmpNoCase(wxT("PointFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_PointFromText")) == 0) return true; if (str.CmpNoCase(wxT("LineFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_LineFromText")) == 0) return true; if (str.CmpNoCase(wxT("LineStringFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_LineStringFromText")) == 0) return true; if (str.CmpNoCase(wxT("PolyFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_PolyFromText")) == 0) return true; if (str.CmpNoCase(wxT("PolygonFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_PolygonFromText")) == 0) return true; if (str.CmpNoCase(wxT("MPointFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_MPointFromText")) == 0) return true; if (str.CmpNoCase(wxT("MultiPointFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_MultiPointFromText")) == 0) return true; if (str.CmpNoCase(wxT("MLineFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_MLineFromText")) == 0) return true; if (str.CmpNoCase(wxT("MultiLineStringFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_MultiLineStringFromText")) == 0) return true; if (str.CmpNoCase(wxT("MPolyFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_MPolyFromText")) == 0) return true; if (str.CmpNoCase(wxT("MultiPolygonFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_MultiPolygonFromText")) == 0) return true; if (str.CmpNoCase(wxT("GeomCollFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_GeomCollFromText")) == 0) return true; if (str.CmpNoCase(wxT("GeometryCollectionFromText")) == 0) return true; if (str.CmpNoCase(wxT("BdPolyFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_BdPolyFromText")) == 0) return true; if (str.CmpNoCase(wxT("BdMPolyFromText")) == 0) return true; if (str.CmpNoCase(wxT("ST_BdMPolyFromText")) == 0) return true; if (str.CmpNoCase(wxT("GeometryCollectionFromText")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_GeomFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_WKBToSQL")) == 0) return true; if (str.CmpNoCase(wxT("PointFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_PointFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("LineFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_LineFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("LineStringFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_LineStringFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("PolyFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_PolyFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("PolygonFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_PolygonFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("MPointFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_MPointFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("MultiPointFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_MultiPointFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("MLineFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_MLineFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("MultiLineStringFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_MultiLineStringFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("MPolyFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_MPolyFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("MultiPolygonFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_MultiPolygonFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("GeomCollFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_GeomCollFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("GeometryCollectionFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_GeometryCollectionFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("BdPolyFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_BdPolyFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("BdMPolyFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("ST_BdMPolyFromWKB")) == 0) return true; if (str.CmpNoCase(wxT("AsText")) == 0) return true; if (str.CmpNoCase(wxT("ST_AsText")) == 0) return true; if (str.CmpNoCase(wxT("AsWKT")) == 0) return true; if (str.CmpNoCase(wxT("AsSVG")) == 0) return true; if (str.CmpNoCase(wxT("AsKML")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromKML")) == 0) return true; if (str.CmpNoCase(wxT("AsGML")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromGML")) == 0) return true; if (str.CmpNoCase(wxT("AsGeoJSON")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromGeoJSON")) == 0) return true; if (str.CmpNoCase(wxT("AsFGF")) == 0) return true; if (str.CmpNoCase(wxT("AsBinary")) == 0) return true; if (str.CmpNoCase(wxT("ST_AsBinary")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromFGF")) == 0) return true; if (str.CmpNoCase(wxT("AsEWKB")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromEWKB")) == 0) return true; if (str.CmpNoCase(wxT("AsEWKT")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromEWKT")) == 0) return true; if (str.CmpNoCase(wxT("CompressGeometry")) == 0) return true; if (str.CmpNoCase(wxT("UncompressGeometry")) == 0) return true; if (str.CmpNoCase(wxT("SanitizeGeometry")) == 0) return true; if (str.CmpNoCase(wxT("CastToPoint")) == 0) return true; if (str.CmpNoCase(wxT("CastToLinestring")) == 0) return true; if (str.CmpNoCase(wxT("CastToPolygon")) == 0) return true; if (str.CmpNoCase(wxT("CastToMultiPoint")) == 0) return true; if (str.CmpNoCase(wxT("CastToMultiLinestring")) == 0) return true; if (str.CmpNoCase(wxT("CastToMultiPolygon")) == 0) return true; if (str.CmpNoCase(wxT("CastToGeometryCollection")) == 0) return true; if (str.CmpNoCase(wxT("CastToMulti")) == 0) return true; if (str.CmpNoCase(wxT("ST_Multi")) == 0) return true; if (str.CmpNoCase(wxT("CastToSingle")) == 0) return true; if (str.CmpNoCase(wxT("CastToXY")) == 0) return true; if (str.CmpNoCase(wxT("CastToXYZ")) == 0) return true; if (str.CmpNoCase(wxT("CastToXYM")) == 0) return true; if (str.CmpNoCase(wxT("CastToXYZM")) == 0) return true; if (str.CmpNoCase(wxT("ST_Reverse")) == 0) return true; if (str.CmpNoCase(wxT("ST_ForceLHR")) == 0) return true; if (str.CmpNoCase(wxT("Dimension")) == 0) return true; if (str.CmpNoCase(wxT("ST_Dimension")) == 0) return true; if (str.CmpNoCase(wxT("CoordDimension")) == 0) return true; if (str.CmpNoCase(wxT("ST_NDims")) == 0) return true; if (str.CmpNoCase(wxT("ST_Is3D")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsMeasured")) == 0) return true; if (str.CmpNoCase(wxT("GeometryType")) == 0) return true; if (str.CmpNoCase(wxT("GeometryAliasType")) == 0) return true; if (str.CmpNoCase(wxT("ST_GeometryType")) == 0) return true; if (str.CmpNoCase(wxT("SRID")) == 0) return true; if (str.CmpNoCase(wxT("ST_SRID")) == 0) return true; if (str.CmpNoCase(wxT("SetSRID")) == 0) return true; if (str.CmpNoCase(wxT("ToGARS")) == 0) return true; if (str.CmpNoCase(wxT("GARSMbr")) == 0) return true; if (str.CmpNoCase(wxT("IsEmpty")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsEmpty")) == 0) return true; if (str.CmpNoCase(wxT("IsSimple")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsSimple")) == 0) return true; if (str.CmpNoCase(wxT("IsValid")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsValid")) == 0) return true; if (str.CmpNoCase(wxT("IsValidReason")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsValidReason")) == 0) return true; if (str.CmpNoCase(wxT("IsValidDetail")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsValidDetail")) == 0) return true; if (str.CmpNoCase(wxT("Boundary")) == 0) return true; if (str.CmpNoCase(wxT("ST_Boundary")) == 0) return true; if (str.CmpNoCase(wxT("Envelope")) == 0) return true; if (str.CmpNoCase(wxT("ST_Envelope")) == 0) return true; if (str.CmpNoCase(wxT("ST_Expand")) == 0) return true; if (str.CmpNoCase(wxT("X")) == 0) return true; if (str.CmpNoCase(wxT("ST_X")) == 0) return true; if (str.CmpNoCase(wxT("Y")) == 0) return true; if (str.CmpNoCase(wxT("ST_Y")) == 0) return true; if (str.CmpNoCase(wxT("Z")) == 0) return true; if (str.CmpNoCase(wxT("ST_Z")) == 0) return true; if (str.CmpNoCase(wxT("M")) == 0) return true; if (str.CmpNoCase(wxT("ST_M")) == 0) return true; if (str.CmpNoCase(wxT("StartPoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_StartPoint")) == 0) return true; if (str.CmpNoCase(wxT("EndPoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_EndPoint")) == 0) return true; if (str.CmpNoCase(wxT("GLength")) == 0) return true; if (str.CmpNoCase(wxT("ST_Length")) == 0) return true; if (str.CmpNoCase(wxT("Perimeter")) == 0) return true; if (str.CmpNoCase(wxT("ST_Perimeter")) == 0) return true; if (str.CmpNoCase(wxT("IsClosed")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsClosed")) == 0) return true; if (str.CmpNoCase(wxT("IsRing")) == 0) return true; if (str.CmpNoCase(wxT("ST_IsRing")) == 0) return true; if (str.CmpNoCase(wxT("Simplify")) == 0) return true; if (str.CmpNoCase(wxT("ST_Simplify")) == 0) return true; if (str.CmpNoCase(wxT("ST_Generalize")) == 0) return true; if (str.CmpNoCase(wxT("SimplifyPreserveTopology")) == 0) return true; if (str.CmpNoCase(wxT("ST_SimplifyPreserveTopology")) == 0) return true; if (str.CmpNoCase(wxT("GeodesicLength")) == 0) return true; if (str.CmpNoCase(wxT("GreatCircleLength")) == 0) return true; if (str.CmpNoCase(wxT("NumPoints")) == 0) return true; if (str.CmpNoCase(wxT("ST_NumPoints")) == 0) return true; if (str.CmpNoCase(wxT("PointN")) == 0) return true; if (str.CmpNoCase(wxT("ST_PointN")) == 0) return true; if (str.CmpNoCase(wxT("Centroid")) == 0) return true; if (str.CmpNoCase(wxT("ST_Centroid")) == 0) return true; if (str.CmpNoCase(wxT("PointOnSurface")) == 0) return true; if (str.CmpNoCase(wxT("ST_PointOnSurface")) == 0) return true; if (str.CmpNoCase(wxT("Area")) == 0) return true; if (str.CmpNoCase(wxT("ST_Area")) == 0) return true; if (str.CmpNoCase(wxT("ExteriorRing")) == 0) return true; if (str.CmpNoCase(wxT("ST_ExteriorRing")) == 0) return true; if (str.CmpNoCase(wxT("NumInteriorRing")) == 0) return true; if (str.CmpNoCase(wxT("ST_NumInteriorRing")) == 0) return true; if (str.CmpNoCase(wxT("NumInteriorRings")) == 0) return true; if (str.CmpNoCase(wxT("InteriorRingN")) == 0) return true; if (str.CmpNoCase(wxT("ST_InteriorRingN")) == 0) return true; if (str.CmpNoCase(wxT("NumGeometries")) == 0) return true; if (str.CmpNoCase(wxT("ST_NumGeometries")) == 0) return true; if (str.CmpNoCase(wxT("ST_NPoints")) == 0) return true; if (str.CmpNoCase(wxT("ST_NRings")) == 0) return true; if (str.CmpNoCase(wxT("GeometryN")) == 0) return true; if (str.CmpNoCase(wxT("ST_GeometryN")) == 0) return true; if (str.CmpNoCase(wxT("AddPoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_AddPoint")) == 0) return true; if (str.CmpNoCase(wxT("RemovePoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_RemovePoint")) == 0) return true; if (str.CmpNoCase(wxT("SetPoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_SetPoint")) == 0) return true; if (str.CmpNoCase(wxT("SetStartPoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_SetStartPoint")) == 0) return true; if (str.CmpNoCase(wxT("SetEndPoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_SetEndPoint")) == 0) return true; if (str.CmpNoCase(wxT("MbrEqual")) == 0) return true; if (str.CmpNoCase(wxT("MbrDisjoint")) == 0) return true; if (str.CmpNoCase(wxT("MbrTouches")) == 0) return true; if (str.CmpNoCase(wxT("MbrWithin")) == 0) return true; if (str.CmpNoCase(wxT("MbrOverlaps")) == 0) return true; if (str.CmpNoCase(wxT("MbrIntersects")) == 0) return true; if (str.CmpNoCase(wxT("ST_EnvIntersects")) == 0) return true; if (str.CmpNoCase(wxT("ST_EnvelopesIntersects")) == 0) return true; if (str.CmpNoCase(wxT("MbrContains")) == 0) return true; if (str.CmpNoCase(wxT("Equals")) == 0) return true; if (str.CmpNoCase(wxT("ST_Equals")) == 0) return true; if (str.CmpNoCase(wxT("Disjoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_Disjoint")) == 0) return true; if (str.CmpNoCase(wxT("Touches")) == 0) return true; if (str.CmpNoCase(wxT("ST_Touches")) == 0) return true; if (str.CmpNoCase(wxT("Within")) == 0) return true; if (str.CmpNoCase(wxT("ST_Within")) == 0) return true; if (str.CmpNoCase(wxT("Overlaps")) == 0) return true; if (str.CmpNoCase(wxT("ST_Overlaps")) == 0) return true; if (str.CmpNoCase(wxT("Crosses")) == 0) return true; if (str.CmpNoCase(wxT("ST_Crosses")) == 0) return true; if (str.CmpNoCase(wxT("Intersects")) == 0) return true; if (str.CmpNoCase(wxT("ST_Intersects")) == 0) return true; if (str.CmpNoCase(wxT("Contains")) == 0) return true; if (str.CmpNoCase(wxT("ST_Contains")) == 0) return true; if (str.CmpNoCase(wxT("Covers")) == 0) return true; if (str.CmpNoCase(wxT("ST_Covers")) == 0) return true; if (str.CmpNoCase(wxT("CoveredBy")) == 0) return true; if (str.CmpNoCase(wxT("ST_CoveredBy")) == 0) return true; if (str.CmpNoCase(wxT("OffsetCurve")) == 0) return true; if (str.CmpNoCase(wxT("ST_OffsetCurve")) == 0) return true; if (str.CmpNoCase(wxT("SingleSidedBuffer")) == 0) return true; if (str.CmpNoCase(wxT("ST_SingleSidedBuffer")) == 0) return true; if (str.CmpNoCase(wxT("SharedPaths")) == 0) return true; if (str.CmpNoCase(wxT("ST_SharedPaths")) == 0) return true; if (str.CmpNoCase(wxT("Relate")) == 0) return true; if (str.CmpNoCase(wxT("ST_Relate")) == 0) return true; if (str.CmpNoCase(wxT("Distance")) == 0) return true; if (str.CmpNoCase(wxT("ST_Distance")) == 0) return true; if (str.CmpNoCase(wxT("HausdorffDistance")) == 0) return true; if (str.CmpNoCase(wxT("ST_HausdorffDistance")) == 0) return true; if (str.CmpNoCase(wxT("PtDistWithin")) == 0) return true; if (str.CmpNoCase(wxT("Intersection")) == 0) return true; if (str.CmpNoCase(wxT("ST_Intersection")) == 0) return true; if (str.CmpNoCase(wxT("Difference")) == 0) return true; if (str.CmpNoCase(wxT("ST_Difference")) == 0) return true; if (str.CmpNoCase(wxT("GUnion")) == 0) return true; if (str.CmpNoCase(wxT("ST_Union")) == 0) return true; if (str.CmpNoCase(wxT("SymDifference")) == 0) return true; if (str.CmpNoCase(wxT("ST_SymDifference")) == 0) return true; if (str.CmpNoCase(wxT("Buffer")) == 0) return true; if (str.CmpNoCase(wxT("ST_Buffer")) == 0) return true; if (str.CmpNoCase(wxT("ConvexHull")) == 0) return true; if (str.CmpNoCase(wxT("ST_ConvexHull")) == 0) return true; if (str.CmpNoCase(wxT("Transform")) == 0) return true; if (str.CmpNoCase(wxT("ST_Transform")) == 0) return true; if (str.CmpNoCase(wxT("ST_Shift_Longitude")) == 0) return true; if (str.CmpNoCase(wxT("NormalizeLonLat")) == 0) return true; if (str.CmpNoCase(wxT("Line_Interpolate_Point")) == 0) return true; if (str.CmpNoCase(wxT("ST_Line_Interpolate_Point")) == 0) return true; if (str.CmpNoCase(wxT("Line_Interpolate_Equidistant_Points")) == 0) return true; if (str.CmpNoCase(wxT("ST_Line_Interpolate_Equidistant_Points")) == 0) return true; if (str.CmpNoCase(wxT("Line_Locate_Point")) == 0) return true; if (str.CmpNoCase(wxT("ST_Line_Locate_Point")) == 0) return true; if (str.CmpNoCase(wxT("Line_Substring")) == 0) return true; if (str.CmpNoCase(wxT("ST_Line_Substring")) == 0) return true; if (str.CmpNoCase(wxT("ClosestPoint")) == 0) return true; if (str.CmpNoCase(wxT("ST_ClosestPoint")) == 0) return true; if (str.CmpNoCase(wxT("ShortestLine")) == 0) return true; if (str.CmpNoCase(wxT("ST_ShortestLine")) == 0) return true; if (str.CmpNoCase(wxT("Snap")) == 0) return true; if (str.CmpNoCase(wxT("ST_Snap")) == 0) return true; if (str.CmpNoCase(wxT("Collect")) == 0) return true; if (str.CmpNoCase(wxT("ST_Collect")) == 0) return true; if (str.CmpNoCase(wxT("LineMerge")) == 0) return true; if (str.CmpNoCase(wxT("ST_LineMerge")) == 0) return true; if (str.CmpNoCase(wxT("BuildArea")) == 0) return true; if (str.CmpNoCase(wxT("ST_BuildArea")) == 0) return true; if (str.CmpNoCase(wxT("Polygonize")) == 0) return true; if (str.CmpNoCase(wxT("ST_Polygonize")) == 0) return true; if (str.CmpNoCase(wxT("UnaryUnion")) == 0) return true; if (str.CmpNoCase(wxT("ST_UnaryUnion")) == 0) return true; if (str.CmpNoCase(wxT("DissolveSegments")) == 0) return true; if (str.CmpNoCase(wxT("ST_DissolveSegments")) == 0) return true; if (str.CmpNoCase(wxT("DissolvePoints")) == 0) return true; if (str.CmpNoCase(wxT("ST_DissolvePoints")) == 0) return true; if (str.CmpNoCase(wxT("LinesFromRings")) == 0) return true; if (str.CmpNoCase(wxT("ST_LinesFromRings")) == 0) return true; if (str.CmpNoCase(wxT("RingsCutAtNodes")) == 0) return true; if (str.CmpNoCase(wxT("ST_RingsCutAtNodes")) == 0) return true; if (str.CmpNoCase(wxT("LinesCutAtNodes")) == 0) return true; if (str.CmpNoCase(wxT("ST_LinesCutAtNodes")) == 0) return true; if (str.CmpNoCase(wxT("CollectionExtract")) == 0) return true; if (str.CmpNoCase(wxT("ST_CollectionExtract")) == 0) return true; if (str.CmpNoCase(wxT("ExtractMultiPoint")) == 0) return true; if (str.CmpNoCase(wxT("ExtractMultiLinestring")) == 0) return true; if (str.CmpNoCase(wxT("ExtractMultiPolygon")) == 0) return true; if (str.CmpNoCase(wxT("ST_Locate_Along_Measure")) == 0) return true; if (str.CmpNoCase(wxT("ST_Locate_Between_Measures")) == 0) return true; if (str.CmpNoCase(wxT("SquareGrid")) == 0) return true; if (str.CmpNoCase(wxT("ST_SquareGrid")) == 0) return true; if (str.CmpNoCase(wxT("TriangularGrid")) == 0) return true; if (str.CmpNoCase(wxT("ST_TriangularGrid")) == 0) return true; if (str.CmpNoCase(wxT("HexagonalGrid")) == 0) return true; if (str.CmpNoCase(wxT("ST_HexagonalGrid")) == 0) return true; if (str.CmpNoCase(wxT("DelaunayTriangulation")) == 0) return true; if (str.CmpNoCase(wxT("ST_DelaunayTriangulation")) == 0) return true; if (str.CmpNoCase(wxT("VoronojDiagram")) == 0) return true; if (str.CmpNoCase(wxT("ST_VoronojDiagram")) == 0) return true; if (str.CmpNoCase(wxT("ConcaveHull")) == 0) return true; if (str.CmpNoCase(wxT("ST_ConcaveHull")) == 0) return true; if (str.CmpNoCase(wxT("MakeValid")) == 0) return true; if (str.CmpNoCase(wxT("ST_MakeValid")) == 0) return true; if (str.CmpNoCase(wxT("MakeValidDiscarded")) == 0) return true; if (str.CmpNoCase(wxT("ST_MakeValidDiscarded")) == 0) return true; if (str.CmpNoCase(wxT("Segmentize")) == 0) return true; if (str.CmpNoCase(wxT("ST_Segmentize")) == 0) return true; if (str.CmpNoCase(wxT("Split")) == 0) return true; if (str.CmpNoCase(wxT("ST_Split")) == 0) return true; if (str.CmpNoCase(wxT("SplitLeft")) == 0) return true; if (str.CmpNoCase(wxT("ST_SplitLeft")) == 0) return true; if (str.CmpNoCase(wxT("SplitRight")) == 0) return true; if (str.CmpNoCase(wxT("ST_SplitRight")) == 0) return true; if (str.CmpNoCase(wxT("Azimuth")) == 0) return true; if (str.CmpNoCase(wxT("ST_Azimuth")) == 0) return true; if (str.CmpNoCase(wxT("Project")) == 0) return true; if (str.CmpNoCase(wxT("ST_Project")) == 0) return true; if (str.CmpNoCase(wxT("GeoHash")) == 0) return true; if (str.CmpNoCase(wxT("ST_GeoHash")) == 0) return true; if (str.CmpNoCase(wxT("AsX3D")) == 0) return true; if (str.CmpNoCase(wxT("ST_AsX3D")) == 0) return true; if (str.CmpNoCase(wxT("ST_3DDistance")) == 0) return true; if (str.CmpNoCase(wxT("ST_3DMaxDistance")) == 0) return true; if (str.CmpNoCase(wxT("MaxDistance")) == 0) return true; if (str.CmpNoCase(wxT("ST_MaxDistance")) == 0) return true; if (str.CmpNoCase(wxT("SnapToGrid")) == 0) return true; if (str.CmpNoCase(wxT("ST_SnapToGrid")) == 0) return true; if (str.CmpNoCase(wxT("ST_Node")) == 0) return true; if (str.CmpNoCase(wxT("SelfIntersections")) == 0) return true; if (str.CmpNoCase(wxT("ST_SelfIntersections")) == 0) return true; if (str.CmpNoCase(wxT("SridFromAuthCRS")) == 0) return true; if (str.CmpNoCase(wxT("SridIsGeographic")) == 0) return true; if (str.CmpNoCase(wxT("SridIsProjected")) == 0) return true; if (str.CmpNoCase(wxT("SridHasFlippedAxes")) == 0) return true; if (str.CmpNoCase(wxT("SridGetSpheroid")) == 0) return true; if (str.CmpNoCase(wxT("SridGetEllipsoid")) == 0) return true; if (str.CmpNoCase(wxT("SridGetPrimeMeridian")) == 0) return true; if (str.CmpNoCase(wxT("SridGetDatum")) == 0) return true; if (str.CmpNoCase(wxT("SridGetUnit")) == 0) return true; if (str.CmpNoCase(wxT("SridGetProjection")) == 0) return true; if (str.CmpNoCase(wxT("SridGetAxis_1_Name")) == 0) return true; if (str.CmpNoCase(wxT("SridGetAxis_1_Orientation")) == 0) return true; if (str.CmpNoCase(wxT("SridGetAxis_2_Name")) == 0) return true; if (str.CmpNoCase(wxT("SridGetAxis_2_Orientation")) == 0) return true; if (str.CmpNoCase(wxT("ShiftCoords")) == 0) return true; if (str.CmpNoCase(wxT("ShiftCoordinates")) == 0) return true; if (str.CmpNoCase(wxT("ST_Translate")) == 0) return true; if (str.CmpNoCase(wxT("ScaleCoords")) == 0) return true; if (str.CmpNoCase(wxT("ScaleCoordinates")) == 0) return true; if (str.CmpNoCase(wxT("RotateCoords")) == 0) return true; if (str.CmpNoCase(wxT("RotateCoordinates")) == 0) return true; if (str.CmpNoCase(wxT("ReflectCoords")) == 0) return true; if (str.CmpNoCase(wxT("ReflectCoordinates")) == 0) return true; if (str.CmpNoCase(wxT("SwapCoords")) == 0) return true; if (str.CmpNoCase(wxT("SwapCoordinates")) == 0) return true; if (str.CmpNoCase(wxT("FilterMbrWithin")) == 0) return true; if (str.CmpNoCase(wxT("FilterMbrContains")) == 0) return true; if (str.CmpNoCase(wxT("FilterMbrIntersects")) == 0) return true; if (str.CmpNoCase(wxT("BuildMbrFilter")) == 0) return true; if (str.CmpNoCase(wxT("RTreeWithin")) == 0) return true; if (str.CmpNoCase(wxT("RTreeContains")) == 0) return true; if (str.CmpNoCase(wxT("RTreeIntersects")) == 0) return true; if (str.CmpNoCase(wxT("RTreeDistWithin")) == 0) return true; if (str.CmpNoCase(wxT("XB_Create")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetPayload")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetDocument")) == 0) return true; if (str.CmpNoCase(wxT("XB_IsValid")) == 0) return true; if (str.CmpNoCase(wxT("XB_SchemaValidate")) == 0) return true; if (str.CmpNoCase(wxT("XB_IsCompressed")) == 0) return true; if (str.CmpNoCase(wxT("XB_IsIsoMetadata")) == 0) return true; if (str.CmpNoCase(wxT("XB_IsSldSeVectorStyle")) == 0) return true; if (str.CmpNoCase(wxT("XB_IsSldSeRasterStyle")) == 0) return true; if (str.CmpNoCase(wxT("XB_IsSvg")) == 0) return true; if (str.CmpNoCase(wxT("XB_Compress")) == 0) return true; if (str.CmpNoCase(wxT("XB_Uncompress")) == 0) return true; if (str.CmpNoCase(wxT("XB_IsSchemaValidated")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetSchemaURI")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetInternalSchemaURI")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetFileId")) == 0) return true; if (str.CmpNoCase(wxT("XB_SetFileId")) == 0) return true; if (str.CmpNoCase(wxT("XB_AddFileId")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetParentId")) == 0) return true; if (str.CmpNoCase(wxT("XB_SetParentId")) == 0) return true; if (str.CmpNoCase(wxT("XB_AddParentId")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetName")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetTitle")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetAbstract")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetGeometry")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetDocumentSize")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetEncoding")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetLastParseError")) == 0) return true; if (str.CmpNoCase(wxT("XB_IsValidXPathExpression")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetLastValidateError")) == 0) return true; if (str.CmpNoCase(wxT("XB_GetLastXPathError")) == 0) return true; if (str.CmpNoCase(wxT("XB_CacheFlush")) == 0) return true; if (str.CmpNoCase(wxT("GEOS_GetLastWarningMsg")) == 0) return true; if (str.CmpNoCase(wxT("GEOS_GetLastErrorMsg")) == 0) return true; if (str.CmpNoCase(wxT("GEOS_GetLastAuxErrorMsg")) == 0) return true; if (str.CmpNoCase(wxT("GEOS_GetCriticalPointFromMsg")) == 0) return true; if (str.CmpNoCase(wxT("LWGEOM_GetLastWarningMsg")) == 0) return true; if (str.CmpNoCase(wxT("LWGEOM_GetLastErrorMsg")) == 0) return true; if (str.CmpNoCase(wxT("MakePolygon")) == 0) return true; if (str.CmpNoCase(wxT("ST_MakePolygon")) == 0) return true; if (str.CmpNoCase(wxT("LongLatToDMS")) == 0) return true; if (str.CmpNoCase(wxT("LongitudeFromDMS")) == 0) return true; if (str.CmpNoCase(wxT("LatitudeFromDMS")) == 0) return true; return false; } bool MyQueryView::IsSqlRasterFunction(wxString & str, char next_c) { // checks if this one is an SQL raster-function if (next_c != '(') return false; if (str.CmpNoCase(wxT("rl2_version")) == 0) return true; if (str.CmpNoCase(wxT("rl2_target_cpu")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_none")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_deflate")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_deflate_no")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_jpeg")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_png")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_fax4")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_lzma")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_lzma_no")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_charls")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_webp")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_ll_webp")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_jp2")) == 0) return true; if (str.CmpNoCase(wxT("rl2_has_codec_ll_jp2")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetMaxThreads")) == 0) return true; if (str.CmpNoCase(wxT("RL2_SetMaxThreads")) == 0) return true; if (str.CmpNoCase(wxT("IsValidPixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidPixel")) == 0) return true; if (str.CmpNoCase(wxT("IsValidRasterPalette")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidRasterPalette")) == 0) return true; if (str.CmpNoCase(wxT("IsValidRasterStatistics")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidRasterStatistics")) == 0) return true; if (str.CmpNoCase(wxT("IsValidRasterTile")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidRasterTile")) == 0) return true; if (str.CmpNoCase(wxT("CreateCoverage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_CreateRasterCoverage")) == 0) return true; if (str.CmpNoCase(wxT("CopyRasterCoverage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_CopyRasterCoverage")) == 0) return true; if (str.CmpNoCase(wxT("DeleteSection")) == 0) return true; if (str.CmpNoCase(wxT("RL2_DeleteSection")) == 0) return true; if (str.CmpNoCase(wxT("DropRasterCoverage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_DropRasterCoverage")) == 0) return true; if (str.CmpNoCase(wxT("SetRasterCoverageInfos")) == 0) return true; if (str.CmpNoCase(wxT("RL2_SetRasterCoverageInfos")) == 0) return true; if (str.CmpNoCase(wxT("SetRasterCoverageDefaultBands")) == 0) return true; if (str.CmpNoCase(wxT("RL2_SetRasterCoverageDefaultBands")) == 0) return true; if (str.CmpNoCase(wxT("EnableRasterCoverageAutoNDVI")) == 0) return true; if (str.CmpNoCase(wxT("RL2_EnableRasterCoverageAutoNDVI")) == 0) return true; if (str.CmpNoCase(wxT("IsRasterCoverageAutoNdviEnabled")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsRasterCoverageAutoNdviEnabled")) == 0) return true; if (str.CmpNoCase(wxT("GetPaletteNumEntries")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPaletteNumEntries")) == 0) return true; if (str.CmpNoCase(wxT("GetPaletteColorEntry")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPaletteColorEntry")) == 0) return true; if (str.CmpNoCase(wxT("SetPaletteColorEntry")) == 0) return true; if (str.CmpNoCase(wxT("RL2_SetPaletteColorEntry")) == 0) return true; if (str.CmpNoCase(wxT("PaletteEquals")) == 0) return true; if (str.CmpNoCase(wxT("RL2_PaletteEquals")) == 0) return true; if (str.CmpNoCase(wxT("CreatePixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_CreatePixel")) == 0) return true; if (str.CmpNoCase(wxT("GetPixelType")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPixelType")) == 0) return true; if (str.CmpNoCase(wxT("GetPixelSampleType")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPixelSampleType")) == 0) return true; if (str.CmpNoCase(wxT("GetPixelNumBands")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPixelNumBands")) == 0) return true; if (str.CmpNoCase(wxT("GetPixelValue")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetPixelValue")) == 0) return true; if (str.CmpNoCase(wxT("SetPixelValue")) == 0) return true; if (str.CmpNoCase(wxT("RL2_SetPixelValue")) == 0) return true; if (str.CmpNoCase(wxT("IsTransparentPixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsTransparentPixel")) == 0) return true; if (str.CmpNoCase(wxT("IsOpaquePixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsOpaquePixel")) == 0) return true; if (str.CmpNoCase(wxT("SetTransparentPixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_SetTransparentPixel")) == 0) return true; if (str.CmpNoCase(wxT("SetOpaquePixel")) == 0) return true; if (str.CmpNoCase(wxT("RL2_SetOpaquePixel")) == 0) return true; if (str.CmpNoCase(wxT("PixelEquals")) == 0) return true; if (str.CmpNoCase(wxT("RL2_PixelEquals")) == 0) return true; if (str.CmpNoCase(wxT("GetRasterStatistics_NoDataPixelsCount")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetRasterStatistics_NoDataPixelsCount")) == 0) return true; if (str.CmpNoCase(wxT("GetRasterStatistics_ValidPixelsCount")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetRasterStatistics_ValidPixelsCount")) == 0) return true; if (str.CmpNoCase(wxT("GetRasterStatistics_SampleType")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetRasterStatistics_SampleType")) == 0) return true; if (str.CmpNoCase(wxT("GetRasterStatistics_BandsCount")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetRasterStatistics_BandsCount")) == 0) return true; if (str.CmpNoCase(wxT("GetBandStatistics_Min")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Min")) == 0) return true; if (str.CmpNoCase(wxT("GetBandStatistics_Max")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Max")) == 0) return true; if (str.CmpNoCase(wxT("GetBandStatistics_Avg")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Avg")) == 0) return true; if (str.CmpNoCase(wxT("GetBandStatistics_Var")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Var")) == 0) return true; if (str.CmpNoCase(wxT("GetBandStatistics_StdDev")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetBandStatistics_StdDev")) == 0) return true; if (str.CmpNoCase(wxT("GetBandStatistics_Histogram")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetBandStatistics_Histogram")) == 0) return true; if (str.CmpNoCase(wxT("GetBandHistogramFromImage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetBandHistogramFromImage")) == 0) return true; if (str.CmpNoCase(wxT("Pyramidize")) == 0) return true; if (str.CmpNoCase(wxT("RL2_Pyramidize")) == 0) return true; if (str.CmpNoCase(wxT("DePyramidize")) == 0) return true; if (str.CmpNoCase(wxT("RL2_DePyramidize")) == 0) return true; if (str.CmpNoCase(wxT("GetMapImageFromRaster")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetMapImageFromRaster")) == 0) return true; if (str.CmpNoCase(wxT("GetMapImageFromVector")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetMapImageFromVector")) == 0) return true; if (str.CmpNoCase(wxT("GetTileImage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetTileImage")) == 0) return true; if (str.CmpNoCase(wxT("GetTripleBandTileImage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetTripleBandTileImage")) == 0) return true; if (str.CmpNoCase(wxT("GetMonoBandTileImage")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetMonoBandTileImage")) == 0) return true; if (str.CmpNoCase(wxT("LoadFontFromFile")) == 0) return true; if (str.CmpNoCase(wxT("RL2_LoadFontFromFile")) == 0) return true; if (str.CmpNoCase(wxT("ExportFontToFile")) == 0) return true; if (str.CmpNoCase(wxT("RL2_ExportFontToFile")) == 0) return true; if (str.CmpNoCase(wxT("IsValidFont")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsValidFont")) == 0) return true; if (str.CmpNoCase(wxT("GetFontFamily")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetFontFamily")) == 0) return true; if (str.CmpNoCase(wxT("GetFontFacename")) == 0) return true; if (str.CmpNoCase(wxT("RL2_GetFontFacename")) == 0) return true; if (str.CmpNoCase(wxT("IsFontBold")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsFontBold")) == 0) return true; if (str.CmpNoCase(wxT("IsFontItalic")) == 0) return true; if (str.CmpNoCase(wxT("RL2_IsFontItalic")) == 0) return true; if (str.CmpNoCase(wxT("LoadRaster")) == 0) return true; if (str.CmpNoCase(wxT("RL2_LoadRaster")) == 0) return true; if (str.CmpNoCase(wxT("LoadRastersFromDir")) == 0) return true; if (str.CmpNoCase(wxT("RL2_LoadRastersFromDir")) == 0) return true; if (str.CmpNoCase(wxT("LoadRasterFromWMS")) == 0) return true; if (str.CmpNoCase(wxT("RL2_LoadRasterFromWMS")) == 0) return true; if (str.CmpNoCase(wxT("WriteGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("WriteTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteJpegJgw")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteJpegJgw")) == 0) return true; if (str.CmpNoCase(wxT("WriteJpeg")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteJpeg")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionJpegJgw")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionJpegJgw")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionJpeg")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionJpeg")) == 0) return true; if (str.CmpNoCase(wxT("WriteTripleBandGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteTripleBandGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteMonoBandGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteMonoBandGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteTripleBandTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteTripleBandTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("WriteMonoBandTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteMonoBandTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("WriteTripleBandTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteTripleBandTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteMonoBandTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteMonoBandTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionTripleBandGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionTripleBandGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionMonoBandGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionMonoBandGeoTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionTripleBandTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionTripleBandTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionMonoBandTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionMonoBandTiffTfw")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionTripleBandTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionTripleBandTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionMonoBandTiff")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionMonoBandTiff")) == 0) return true; if (str.CmpNoCase(wxT("WriteAsciiGrid")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteAsciiGrid")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionAsciiGrid")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionAsciiGrid")) == 0) return true; if (str.CmpNoCase(wxT("WriteNdviAsciiGrid")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteNdviAsciiGrid")) == 0) return true; if (str.CmpNoCase(wxT("WriteSectionNdviAsciiGrid")) == 0) return true; if (str.CmpNoCase(wxT("RL2_WriteSectionNdviAsciiGrid")) == 0) return true; if (str.CmpNoCase(wxT("AutoGPKGStart")) == 0) return true; if (str.CmpNoCase(wxT("AutoGPKGStop")) == 0) return true; if (str.CmpNoCase(wxT("CheckGeoPackageMetaData")) == 0) return true; if (str.CmpNoCase(wxT("gpkgCreateBaseTables")) == 0) return true; if (str.CmpNoCase(wxT("gpkgInsertEpsgSRID")) == 0) return true; if (str.CmpNoCase(wxT("gpkgCreateTilesTable")) == 0) return true; if (str.CmpNoCase(wxT("gpkgCreateTilesZoomLevel")) == 0) return true; if (str.CmpNoCase(wxT("gpkgAddTileTriggers")) == 0) return true; if (str.CmpNoCase(wxT("gpkgGetNormalZoom")) == 0) return true; if (str.CmpNoCase(wxT("gpkgGetNormalRow")) == 0) return true; if (str.CmpNoCase(wxT("gpkgGetImageType")) == 0) return true; if (str.CmpNoCase(wxT("gpkgAddGeometryColumn")) == 0) return true; if (str.CmpNoCase(wxT("gpkgAddGeometryTriggers")) == 0) return true; if (str.CmpNoCase(wxT("gpkgAddSpatialIndex")) == 0) return true; if (str.CmpNoCase(wxT("gpkgMakePoint")) == 0) return true; if (str.CmpNoCase(wxT("gpkgMakePointZ")) == 0) return true; if (str.CmpNoCase(wxT("gpkgMakePointM")) == 0) return true; if (str.CmpNoCase(wxT("gpkgMakePointZM")) == 0) return true; if (str.CmpNoCase(wxT("AsGPB")) == 0) return true; if (str.CmpNoCase(wxT("GeomFromGPB")) == 0) return true; if (str.CmpNoCase(wxT("IsValidGPB")) == 0) return true; if (str.CmpNoCase(wxT("GPKG_IsAssignable")) == 0) return true; if (str.CmpNoCase(wxT("CastAutomagic")) == 0) return true; return false; } void MyQueryView::DoSqlSyntaxColor() { // // evidencing a nice colored SQL syntax // IgnoreEvent = true; SqlCtrl->Hide(); wxTextAttr normal_style(wxColour(128, 128, 128), wxColour(255, 255, 255), wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); wxTextAttr sql_style(wxColour(0, 0, 255), wxColour(255, 255, 255), wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD)); wxTextAttr const_style(wxColour(255, 0, 255), wxColour(255, 255, 255), wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); wxTextAttr fnct_style(wxColour(192, 128, 0), wxColour(255, 255, 255), wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD)); wxTextAttr bracket_style(wxColour(255, 0, 0), wxColour(192, 192, 192), wxFont(12, wxFONTFAMILY_ROMAN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD)); wxString sql = SqlCtrl->GetValue(); // setting the base style SqlCtrl->SetStyle(0, sql.Len(), normal_style); wxString right = sql; int from; int to = 0; int i; char c; char next_c; SqlTokenizer tokenizer(sql); while (tokenizer.HasMoreTokens()) { wxString token = tokenizer.GetNextToken(); from = to + right.Find(token); to = from + token.Len(); // extracting the unparsed portion of the SQL string right = sql.Mid(to); next_c = '\0'; for (i = 0; i < (int) right.Len(); i++) { c = right.GetChar(i); if (c == ' ' || c == '\t' || c == '\r' || c == '\n') continue; next_c = c; break; } char *word = new char[token.Len() * 4]; strcpy(word, token.ToUTF8()); if (gaiaIsReservedSqliteName(word)) { // setting the SQL keyword style SqlCtrl->SetStyle(from, to, sql_style); } else if (IsSqliteExtra(token)) { // setting the SQL keyword style SqlCtrl->SetStyle(from, to, sql_style); } else if (IsSqlString(token) == true) { // setting the SQL string constant style SqlCtrl->SetStyle(from, to, const_style); } else if (IsSqlNumber(token) == true) { // setting the SQL numeric constant style SqlCtrl->SetStyle(from, to, const_style); } else if (IsSqlFunction(token, next_c) == true) { // setting the SQL function style SqlCtrl->SetStyle(from, to, fnct_style); } else if (IsSqlGeoFunction(token, next_c) == true) { // setting the SQL geo-function style SqlCtrl->SetStyle(from, to, fnct_style); } else if (IsSqlRasterFunction(token, next_c) == true) { // setting the SQL raster-function style SqlCtrl->SetStyle(from, to, fnct_style); } delete[]word; } if (BracketStart >= 0) { // evidencing an opening bracket SqlCtrl->SetStyle(BracketStart, BracketStart + 1, bracket_style); } if (BracketEnd >= 0) { // evidencing a closing bracket SqlCtrl->SetStyle(BracketEnd, BracketEnd + 1, bracket_style); } SqlCtrl->Show(); SqlCtrl->SetFocus(); IgnoreEvent = false; } void MyQueryView::OnSqlSyntaxColor(wxCommandEvent & event) { // // EVENT: updating the SQL syntax // if (IgnoreEvent == true) { // processing is still in progress; ignoring any internally generated call return; } event.Skip(); EventBrackets(); } void MyQueryView::EvidBrackets(int on, int off) { // evidencing corresponding brackets [open/close] BracketStart = -1; BracketEnd = -1; if (on >= 0) BracketStart = on; if (off >= 0) BracketEnd = off; DoSqlSyntaxColor(); } void MyQueryView::EventBrackets() { // // evidencing brackets [balancing open-close pairs] // if (IgnoreEvent == true) { // processing is still in progress; ignoring any internally generated call return; } int pos = SqlCtrl->GetInsertionPoint(); int on; int off; wxString sql = SqlCtrl->GetValue(); char pre = '\0'; char post = '\0'; if (pos > 0) pre = sql.GetChar(pos - 1); if (pos < (int) sql.Len()) post = sql.GetChar(pos); if (post == '(') { // positioned before an opening bracket if (CheckBrackets(pos, false, &on, &off) == true) EvidBrackets(on, off); else EvidBrackets(pos, -1); return; } if (pre == ')') { // positioned after a closing bracket if (CheckBrackets(pos - 1, true, &on, &off) == true) EvidBrackets(on, off); else EvidBrackets(-1, pos - 1); return; } EvidBrackets(-1, -1); } bool MyQueryView::CheckBrackets(int pos, bool reverse_direction, int *on, int *off) { // trying to balance a brackets pair [opening/closing] int i; int len; int level = 0; char c; int single_quoted = 0; int double_quoted = 0; wxString sql = SqlCtrl->GetValue(); if (reverse_direction == true) { // going backward from CLOSE to OPEN for (i = pos - 1; i >= 0; i--) { c = sql.GetChar(i); if (c == '\'' && !double_quoted) { // single quoting start-stop if (single_quoted) single_quoted = 0; else single_quoted = 1; } if (c == '"' && !single_quoted) { // double quoting start-stop if (double_quoted) double_quoted = 0; else double_quoted = 1; } if (single_quoted || double_quoted) continue; if (c == ')') level++; if (c == '(') { if (level == 0) { *on = i; *off = pos; return true; } level--; } } } else { // going forward from OPEN to CLOSE len = sql.Len(); for (i = pos + 1; i < len; i++) { c = sql.GetChar(i); if (c == '\'' && !double_quoted) { // single quoting start-stop if (single_quoted) single_quoted = 0; else single_quoted = 1; } if (c == '"' && !single_quoted) { // double quoting start-stop if (double_quoted) double_quoted = 0; else double_quoted = 1; } if (single_quoted || double_quoted) continue; if (c == '(') level++; if (c == ')') { if (level == 0) { *on = pos; *off = i; return true; } level--; } } } return false; } MySqlControl::MySqlControl(MyQueryView * parent, wxWindowID id, const wxString & value, const wxPoint & pos, const wxSize & size, long style): wxTextCtrl(parent, id, value, pos, size, style) { // // constructor: SQL text control // Parent = parent; Connect(wxID_ANY, wxEVT_LEFT_DOWN, (wxObjectEventFunction) & MySqlControl::OnSqlMousePosition); Connect(wxID_ANY, wxEVT_KEY_UP, (wxObjectEventFunction) & MySqlControl::OnSqlArrowPosition); } void MySqlControl::OnSqlMousePosition(wxMouseEvent & event) { // // intercepting mouse clicks // if (Parent->IsIgnoreEvent() == true) return; event.Skip(); Parent->EventBrackets(); } void MySqlControl::OnSqlArrowPosition(wxKeyEvent & event) { // // intercepting arrow keys // if (Parent->IsIgnoreEvent() == true) return; event.Skip(); int key_code = event.GetKeyCode(); switch (key_code) { case WXK_DELETE: case WXK_HOME: case WXK_LEFT: case WXK_UP: case WXK_RIGHT: case WXK_DOWN: case WXK_PAGEUP: case WXK_PAGEDOWN: case WXK_NUMPAD_DELETE: case WXK_NUMPAD_HOME: case WXK_NUMPAD_LEFT: case WXK_NUMPAD_UP: case WXK_NUMPAD_RIGHT: case WXK_NUMPAD_DOWN: case WXK_NUMPAD_PAGEUP: case WXK_NUMPAD_PAGEDOWN: Parent->EventBrackets(); break; default: break; }; } SqlTokenizer::SqlTokenizer(wxString & sql) { // breaking tokens from an SQL expression Block = 1024; Max = Block; int i; char c; int single_quoted = 0; int double_quoted = 0; int white_space = 0; int start = -1; int len; // initial allocation for the token list TokenList = new wxString *[Max]; for (i = 0; i < Max; i++) TokenList[i] = NULL; Index = 0; for (i = 0; i < (int) sql.Len(); i++) { // scanning the SQL statement c = sql.GetChar(i); if (c == '\'' && !double_quoted) { if (single_quoted) { single_quoted = 0; len = i - start; len++; wxString *token = new wxString(sql.Mid(start, len)); Insert(token); start = -1; } else { single_quoted = 1; start = i; } continue; } if (c == '"' && !single_quoted) { if (double_quoted) { double_quoted = 0; len = i - start; len++; wxString *token = new wxString(sql.Mid(start, len)); Insert(token); start = -1; } else { double_quoted = 1; start = i; } continue; } if (single_quoted || double_quoted) continue; if (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '(' || c == ')' || c == ';' || c == ',') { if (white_space) continue; if (start >= 0) { // ok, we have a valid SQL token len = i - start; wxString *token = new wxString(sql.Mid(start, len)); Insert(token); } start = -1; white_space = 1; continue; } white_space = 0; if (start < 0) start = i; } if (start >= 0) { // fetching the last token i = sql.Len(); len = i - start; wxString *token = new wxString(sql.Mid(start, len)); Insert(token); } Index = 0; } SqlTokenizer::~SqlTokenizer() { // destructor wxString *token; Index = 0; while (1) { token = TokenList[Index]; if (token == NULL) break; delete token; Index++; } delete[]TokenList; } void SqlTokenizer::Expand() { // expanding the token list int newSize = Max + Block; int i; wxString **newList = new wxString *[newSize]; for (i = 0; i < newSize; i++) newList[i] = NULL; for (i = 0; i < Max; i++) newList[i] = TokenList[i]; delete[]TokenList; TokenList = newList; Max = newSize; } void SqlTokenizer::Insert(wxString * token) { // inserting a new token if (Index == (Max - 1)) Expand(); TokenList[Index++] = token; } bool SqlTokenizer::HasMoreTokens() { wxString *token = TokenList[Index]; if (token == NULL) return false; return true; } wxString & SqlTokenizer::GetNextToken() { // return the next token wxString *token = TokenList[Index]; Index++; CurrentToken = *token; return CurrentToken; } spatialite_gui-2.0.0-devel/win_resource/0000775000175000017500000000000012544030130015310 500000000000000spatialite_gui-2.0.0-devel/win_resource/Makefile.in0000664000175000017500000003110712544013516017310 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win_resource ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GEOSCONFIG = @GEOSCONFIG@ GEOS_CPPFLAGS = @GEOS_CPPFLAGS@ GEOS_LDFLAGS = @GEOS_LDFLAGS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEXL_CFLAGS = @LIBFREEXL_CFLAGS@ LIBFREEXL_LIBS = @LIBFREEXL_LIBS@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ LIBRASTERLITE2_CFLAGS = @LIBRASTERLITE2_CFLAGS@ LIBRASTERLITE2_LIBS = @LIBRASTERLITE2_LIBS@ LIBS = @LIBS@ LIBSPATIALITE_CFLAGS = @LIBSPATIALITE_CFLAGS@ LIBSPATIALITE_LIBS = @LIBSPATIALITE_LIBS@ LIBTOOL = @LIBTOOL@ LIBWEBP_CFLAGS = @LIBWEBP_CFLAGS@ LIBWEBP_LIBS = @LIBWEBP_LIBS@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ LIBXML2_LIBS = @LIBXML2_LIBS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS = @OMIT_SQLITE_STMTSTATUS_AUTOINDEX_FLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WXCONFIG = @WXCONFIG@ WX_LIBS = @WX_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = icon.ico resource.rc spatialite-icon.png all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign win_resource/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign win_resource/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: spatialite_gui-2.0.0-devel/win_resource/icon.ico0000664000175000017500000000725612543275035016704 00000000000000  ˜( 8 J˜˜˜‰‘‘‘=•••ŽŽŽššš•••­´´´g•••«««£££+¢¢¢€–––¹ŽŽŽ„„„©ŠŠŠüÿ®®®ÿ¯¯¯ÿœœœî¥¥¥î¦§¦•ªª©0õöõžžž)€€€–{{{ýÿ––•ÿ›››ÿ¨¨¨ÿ­­­ÿ¶¶¶ÿ¸¸¸ÿÉÉÉЫ«±WmnŠlgi‰§egŠÁfh‹½jk˜opŽTxy† ~~}Z€€€òÿ’’’ÿŸŸŸÿ®®®ÿ···ÿ³³³ÿ†‡™ÿMVvÿKa~ÿW{“ÿ]ƒ—ÿ^šÿ_€šÿ^r‘ÿflîmmŒl ¡£ƒƒƒŽŽŽÔŽŽŽÿÿu”…ÿVš{ÿ4‘gÿZÿ”ZÿXÿ†TÿŠTÿŠUÿŠVÿYÿ˜]ÿ"•bÿ%“aÏ(˜d…=“k?|Š„d„u(G…iç ŠZÿ…Rÿ|NÿxKÿoGÿfDÿfHÿ"cRÿ#bUÿ#dTÿ!cPÿfFÿiDÿoHÿzLÿ„Qÿ‰Vÿ‘]Ý-”dpa‘{ /†_X†Uí}NÿsIÿhDÿ!\Nÿ5Rkÿ@OÿQVœÿWZ§ÿX\¯ÿZ]®ÿ[^´ÿ[^¯ÿbe·ÿej¬ÿTe“ÿ>cuÿ!`NÿkEÿxKÿƒQÿ\Ö<“k+1‚^O|NûtIÿiDÿ'aMæNWwÿKMˆÿMP˜ÿLOÿKO§ÿOS¬ÿVY·ÿUYµÿX\¼ÿX\·ÿZ^½ÿ\_²ÿfi¹ÿikµÿhk«ÿSc€ý]Cä mEÿzLÿ…UìC‹j•›™vNàsHÿiDÿ aH–kk…šgh˜ÿVXšÿMP ÿLO¢ÿMP¥ÿNQ¨ÿPT¯ÿW\³ÿZ`»ÿY^µÿY]¹ÿY\±ÿ^a¹ÿhk¾ÿik³ÿgh¢ÿfk‚XYAÈ lDÿyLÿ#V§ŽˆoHÿnFÿeFòx… hiŠÐhjŸÿgi§ÿQU£ÿLP¢ÿMQ®ÿNR¯ÿOS¶ÿT]·ÿ\fÃÿZ`¼ÿ]bÄÿZ^¹ÿY\³ÿ\_²ÿgi²ÿik¬ÿgiˆ9_R<a@ÿpGÿyQÒõöõlK×mGÿjHóq†~ijŠôgiŸÿil®ÿjm¾ÿQT©ÿKOªÿNR«ÿOT²ÿO[¯ÿTc¹ÿZa¸ÿ\a¿ÿ\`ºÿ\`¹ÿ[_¹ÿ]`¯ÿeh¨ÿjk—¨?\S:cBÿmGÿ!tPš2nUChGönGÿ)pR”ij‹úhj¡ÿhk«ÿil·ÿdgµÿLQ®ÿNS¯ÿPW¸ÿRi¸ÿSp¾ÿR^¸ÿZd¿ÿ\`¼ÿ_b·ÿad¹ÿ_b­ÿac§ÿjm”¶ dHÈjFÿkJâ?x`7hT>!fIÝoIÿ:Qcÿ]a–ÿil²ÿil·ÿim»ÿeiÃÿNS«ÿQV²ÿRe²ÿRk·ÿPZ°ÿT\¶ÿX]¾ÿX\µÿ[^´ÿ]`°ÿ\^›ÿJopÿjGÿ&iMÁ@o\Xhb 6cPl/KXá'>oÿ8LˆÿMYÿ[c¯ÿfj»ÿ^b·ÿOT¶ÿNS°ÿMS²ÿQU·ÿPT¯ÿW[¶ÿ[^°ÿWZªÿXZ¦ÿmo£ÿ²½¸þHo_Z±±±rs†M\`‰ÿNV‘ÿ?N”ÿ4H–ÿ-E•ÿ3H™ÿ:I£ÿMQªÿLQªÿPT³ÿPT±ÿOS®ÿW[µÿ]`°ÿZ\ ÿžž´ÿÊÊÊÿÁÁÁᯯ¯ ¯¯¯ij‰Ògižÿgi¦ÿgj­ÿgi±ÿgjºÿbf»ÿSW¯ÿLP©ÿNR°ÿOS§ÿOR¢ÿJNÿTVŸÿvy©ÿÜÝÝÿÔÔÔÿËÌËÿ¾¿¾’mn€3efŠøhj¡ÿhk­ÿhj²ÿhj´ÿgjµÿdgµÿUX ÿMQ¢ÿOS¥ÿQT¤ÿLOšÿWY‘ÿ²³¸ÿÒÒÒÿÚÛÚÿßàßÿÚÛÚü°±°+mn„Sff‹öeg™ÿgi¦ÿhj®ÿikµÿil·ÿsuªÿˆ‰œÿ~€¤ÿ„†£ÿ}~–ÿ““–ÿªªªÿÆÆÆÿÔÔÔÿÛÛÛÿÞßÞÿÔÕÔžss…8ef…Öcdÿdf˜ÿefÿeg¡ÿeg ÿyz•ÿ­­­ÿ­­­ÿ¡¡¡ÿžžžÿ’’’ÿ¼¼¼ÿÊÊÊÿÓÓÓÿØØØÿØØØý°°°9ŒŒŽefy_cc~³cd…íac‰ÿ_`þcd‚â  ¡ä®®®ÿ¦¦¦ÿ˜˜˜ÿ«¬«ÿ¢¢¢ÿÅÅÅÿÉÊÉÿÑÑÑÿØØØÿÅÅʼnÀÀÀ»»¼ ¶¶·,©©©ÿ©©©ÿ———ÿ¯¯¯ÿ¶¶¶ÿ¿¿¿ÿÉÊÉÿËËËÿÑÑÑÿÍÍÍ©õöõ©©©Å¥¥¥ÿÿ   ÿ½½½ÿ½½½ÿÇÈÇÿÎÏÎÿÊÊÊÿËË˵•••-¥¥¥ú¤¤¤ÿ˜˜˜ÿ½½½ÿ¾¾¾ÿÀÀÀÿÎÏÎÿÐÑÐÿº»ºr”””q¤¤¤ü˜˜˜ÿ¸¸¸ÿºººÿÅÅÅÿÅÅÅÿÐÑÐÿ¾¿¾Fššš}———ý¬¬¬ÿÃÃÃÿ¿¿¿ÿÅÅÅÿÈÈÈõªªª±±±2¡¡¡ÕÉÉÉÿ¼¼¼ÿÈÈÈÿ¼¼¼ø’’’———ÁÁÁ‡¾¾¾þ¿¿¿ÿ¾¾¾æ«««8²³²“¦¦¦$¿ÿÿÀÿÿø‡ÿþÿÿ?ÿ€ÿþüü@ü@þÿÿÀÿàÿàÿðÿøÿüÿÿÿÿüÿÿüÿÿþÿÿÿÿÿÿÿÿÿÁÿÿÿáÿÿÿûspatialite_gui-2.0.0-devel/win_resource/resource.rc0000664000175000017500000000014412543275035017422 00000000000000#include "wx/msw/wx.rc" AFX_IDI_STD_FRAME ICON DISCARDABLE "win_resource/icon.ico" spatialite_gui-2.0.0-devel/win_resource/spatialite-icon.png0000664000175000017500000056171712543275035021062 00000000000000‰PNG  IHDRµeÄž nCiCCPICC Profilex­XwT˳îÙ@\rÌ’s–,9(A–]¢°àA‚(A¢ˆ‚d%* Š$½ "¨ˆ"‚ ’ö7 zï çž÷Ïësfû믫ª{ºfª¶6|XX0BŠ ãöc]¸aiÇp&@ KDQ_'¿,ÿþ€Í ÝCñÁ]$t¨mØÅà á&g#FûÄÇ’ÆKŠ;y<=>-!ãDjb\Rtr@ŠÓIãT™SL§æOßK+O̰ÌäËœ;Ó’•휣‹Ê}™w-ÿÔYÏÕs´ç^¶œ?}_¤UÌRõØ~„wäÝ“ÆÑ#cOž>}VöëBd‘{±ÉE¹îRDéBÙDù@EEeH•^5kõtMÛ¥ŒZïËêW˜®¼¯ëª¿Ð@n´j’h¢4¿¸Ú|-­…ЪՆi{{½õÆ©vÏ›j4ãõ·âo;tIt­ÜyÐ}±‡ÔkØÇÙ7×ónæþžú Ãàäý¶™<âF/=~=2ø¤u´x,éiÐ3ÜsíqaØû_'Æ_ö¾jz]ô&}2îmè”ï;÷iÜŒÕ{óYÓ9£M>Y~ÆÍ{| ZˆýšµXû­{ibyåßÏ=+^«I¿êÖž¬¯l mPŒ¶ýÏð­õ;é0 ¤½=Ô\r’tŽ+š‡…È4ä…ð网õQ…G’£ÇxÅZU9ëK:nŒïNˆ?¡ub)±>É?Y4ùuJáI‡T–ÔG§2N[¦1¦ ¥ggà2we¾:Sžå–Í‘ýWNr®QÈëÉO>kQÀ^0y®±0þü jE¬E‹Åc;J*K³ÊâÊC+ð•6Uªðö©æî¥òÚã—½®Ôaë‘õ†[šJšS¯†]so1kUnã¿Ns}ñÆ«ö»7;J:»oÍtAwx»Õzzcújûß ÈÞ‹œööÑ᪑ÖÑ•g1/Ü^•¼Í{oó¹ê‡%Õÿ;¹šh48gg8?:¡Èi@ Î_\ÞØ1ਠ zZ›¤ø“?8€<0^ ä€:pL‚_'¤ YCAP*T @s„"Âq q Ž2H¤:2YœA‰£üQõ¨e´.:=L#@DÓA‹¡=HÛL‡¦s§k¦§£ÇÓw0p2fxÄ(˘Ê8‹Ù‹©a¢g fzÊlÊÜÆ"ÉRÌÊɚΆb‹gÛde_ã8ÊAáLábàÊáæç®Þ¥º«—Çço#_¿ÿ¨@° J°XHEèž°·ðöœÈn‘1Ñ1N±ëânâ›%%ç¤Ò¥¥‡e"eye;å<å|…‚©Â¬bº’¼Òr¬Š©ª ê/µç»[Ô 5ŽjúkÙk›èèéªíÑÐ3з4ð†3\…ñCS„™¶ùñ½ƒì–öVÙÖc6¼¶>v ö[¶ŽåN+.–®•6Ý<i¾ûü‡˜® â¿ e «acD„E‰ñÁŒ ǨAÉ()q©'Òq2²2²©rjroå3´Þ+()-*7¨œPõTÓß-¬©ÔÑìÒªÓ.Ó)ÔÍÞ“£—§_dPmØf4d3(;˜-$#”9ì žI•ÍStTìXëqÃøÑaI¬É×N:¥®œ.K·ÍØ8ÓíË—7r6ãœÍyÌ…‡Åy%Îeå3•õÕ—t.£¯ôÖM—®âZ­M×Û%nNu–Þ&ÞïþÐ{¥Ÿ4 wïëýÚ¿‡žõCéšMZCÚKºÌ{”ôöë¤Võ¿6Ù2ã3×Ûë½/Å¢Ýò‹µÌ~¼ÍÛ§ö¬8{‡ ÇûÎô.¦®)Üé<,fx>öæÂ»ù”|ýFÈA,‡n…ø… ‡½ çGà¢8¼ˆ)>êÿçx“PžHLO™M½wº9½(óh–kŽrMþPÁÙBç ´EýK™Ë®Uà*¿VŸº$TÛzå@=WÛ¦Ú«-zmàúýö¬»[ì·Çïä÷¸ôñôO ” ú>þëû£ÎáôÏQѱügôÏO¿à˜(y%þºr’ÿmúÔ·i뙋ï§çx>~ôùtôsÒ|ÊòÂÁ¯š‹,‹Ï¿•.¹,3/w~wýþóGúÏ]?+W¤WŠWYV“V¿ýÂýj]ã^‹^{°Î±î±^½¾°¡¹µQ³ñt½¹{“¸™·Ù·¹¼%ºe»»U½õxk"EÁQâ(µ”1ªÿwê%jþ &¡Á¡d¬µ \àü¿¶àH¸†Únìð/†äcc ÷Tü!,ÂŽZ rÃ×Zx”ƒܳÂå«_ ¹ÅoŒ%âM­`,óʱ&60ÆÀØÚlŽƒ1lr Â[ÚÁ˜ÆA¾$'‡ß|tXðvK•I ‹0¦ÊóÀ¸Ø7ÜìLkl€£ËoÝr$Î Æâ°ÌØ¡P+ª|xb*­Û·ãŽ;&{íµW¯çŒ ÍË_‚Ö.„€B@!PTYˆìèÑ£‰3fL²âŠ+vMöÏþ3ùÇ?þ1OZÝëYw²ÚB@! „€h #©ŽÈÞyçN•Å^€*›Õ ¼óŠJËúEj³¾EíB@! „ÀG#±ŽÌN›6Í‘ØaÆuSeÓ—ŠJ{É%—$7ÝtÓ<Ãç™…¦ÁÖg! „€B@|¼*{Ýu×%ü傾Ö]wÝüÁ‘yM¥eéòÔ_ 6…€B@!0¯#@*®+®¸"Ù{ï½*;~üød©¥–о,ï¥2dHô˜ÞÐQJmoø´! „€B@´€PWQeQc±βéÓ2϶Ûn›\pÁÉàÁƒ“SO=užà‹óÄ"Ó`ë³B@! æH·Õ·oßL¾Æ1¾PeQW}Щ¸ê6æ¹è¢‹’7ß|3ùÎw¾“üö·¿uÖ…‹/¾8s uÏÓŽq½~í¸hÍ)„€B@ÞŽÀ!‡ÒñÌ3Ï$f'èÆ×|*®»îºË©±Ù4r9¨´ .¸`²Â +$»îºkò÷¿ÿÝÛüãs¬£‘68I7œWS ! „€B@Ô@€¯£Ž:*yõÕW“Ïþó.OlQ„§Èª´ÇsL‘¥½òÊ+Éi§æÔÛóÏ??éß¿¯ä d^•v ! „€B@ô8¨°ûí·_2hРä7Þpþ8∠$ÜsÏ= ößÿdóÍ7w¿š\àŸþô§d5ÖHFÕEh™ŸÌ _ýêW“%–X"ù¾°Æ&ÏÛÔ\½’i7uqšG! „€ó d-8öØc“ &¸%ŸwÞyÉòË/ßå•mçuä©´á9ß~ûíäÄOLfÍš•ÑNvÙe—^Å#{ÕbBà´-„€B@ùSN9¥%vß}÷M–Yf÷¸ÕE¶'ZÚK›wNˆíÉ'Ÿœ¼üòËÎa¾ß^Ã%e?ÈûÖ´_! „€mFà‘GéØ}÷Ý;¦Nš|ë[ßr„–Sþíoë1B‹Jû /$=ö˜ +ºd|¶‡z(¾ÚäÒK/E±í5V‘Ú¢oNÇ„€B@!Ð&N:餎ƒ>8Yo½õº,œŠ4]ÇoÓYçœÖ{iÉvÓ ¶‡vX2pàÀdÒ¤I‰y€;d‹ÛÎ>"µíDWs ! „€B +¯¼²Ãr¿&ãÆÃ›Ú­‡©·ÉСC»íkׇP¥%@¬JûÚ×¾æR‰‘vlÏ=÷L(Qe|Ó}Ej›FTó ! „€B ýèGguVòío{‹yaÉzÐTÞÙ‚e¸CUUÚô|ÛÕW_=yï½÷PlQ™ç±©M;ú,„€B@6!€eB»Ê*«Ìq–?ÿùÏ.ÛÁڰë´¬§ªJ.bK 2*™aO.¼ð¹BlEjÃoEÛB@! „€hTÀ{úÎ;︜¯¾°AúTùË_\•°ôþv|F¥]i¥•’wܱåé}nÝ…^89ãŒ3+ÞÐãÄV¤¶å¯Q! „€B ° Âç>÷¹ÜŽýë_“W\1Yj©¥rû4uÀ«´/¾øbK*m¸ˆ-n|ðArûí·'”ùíÉ2‘ÚðÛжB@! D€‚ ¤ÀÚ{ï½KÉ#Êé&›lÒàÙó§jR¥E}>÷ÜsÝÉ(ë»Ùf›%ì›1c†ËêÐSd"µùß·Ž! „€B 6<‚§*ØQG•¬½öÚ¥ó›vÝu×-í×j‡¦UZòÛ’Å 4ˆíˆ#\À› ë‰Òº"µ­þeh¼B@! xäΣ÷gŸ}¶[A… Ë›=™›¶I•–l ä›o¾9±4e]×±ÝvÛm“W^yÅùv¿ùÍo&¨Ö]Ú°!RÛP5¥B@!0"À£ö &$}ûöíVP¡ žÊMÛ´J{õÕW'[l±E‚xÊ”)Ý.“bÛm·#½T ;á„ÊwëÔà‘ÚÁÔTB@! „Àü‹9Z –=zôŠPéÉÜ´Mª´djx÷Ýw]žÚ>}ú$ýúõs>ÚðZ=±åÉ´ nWi]‘Úym ! „€B (ǼË?»þúëWš¡§rÓ6­Ò^sÍ5ÎKËÅn¾ùæN†4§ÄvìØ±ÉóÏ?Ÿ,³Ì2ÉäÉ“]i]Òœ¥û¶òY¤¶ô4V! „€˜ï@y|ðÁs *”ÔS¹i›TiQ\‡ ’ <Ø]ÞÖ[o<ýôÓ ×âÆÂ릸ÄÅ–”e³fÍrÈš © ×¶B@! "ˆ-¨P4]Oå¦mR¥%ø‹À62ø¶øâ‹'o¼±ó×Þÿý~w·wˆ-yz!¶ô§Åüc‚ÉQlEj»Á­B@! „€(Fà´ÓNëˆ-¨PŒ}á…\ʯ5×\3YvÙe?æ·ò.RÛ z+„€B@Ì7 Ì’ªëñÇO¾ÿýïGT(§'rÓz•ößÿþ·SRËÖTt{áì´ÓNst[gu’UVYÅ)°s v@l>øàä­·ÞJ¾üå/GZÛ\¨µá-„€B@>^xaÇž{î™,·ÜrÉb‹-æü³=µÒz*7­Wi7ÝtÓV–ëÆ¢Ò’á!Ý,7o×®‘#Gvmçmœ}öÙɘ1c’õÖ[/¯Kåý"µ•!Ó! „€B`~AuöØcM.¾øb“'+¯¼r¥ü³E8‘›–íl^¥…ˆ£¶Ò ák¬±FWpXÞ\eç9óÌ3ÝP¬ ‹.ºh#Ö&”ý ïÑ~! „€B`¾FÀ«³ï¿ÿ¾{TNª. +4Ñz*7-*íÒK/|ò“ŸliÙ‡‘ñ?lº…*múXú3D~Ú´i éÏ,p¬1BËy¤Ô¦ÑÖg! „€B`¾FÀ«³—\r‰{D¾ÄK$m´QR5ÿlˆ=‘›•–ܰd(SO‹ÖÊ1†ý¢•6qâD‡é†nØ(¡eMRj[ùf4V! „€øH!píµ×:ï,ê,%^!´«­¶Z£„Àz"7-*-¾ßVUÚ3fä‡UQiõ«_¹Œ ;ï¼s[þf¤Ô¶VM*„€B@ÌKxuö¬³ÎêRgýú‰èo²õDnÚv¨´i ªÚ{ï½×¥ñºì²Ëð%7®Ò²6)µéoHŸ…€B@ù ,uÖ@Ú©¦ j»sÓ6¥ÒÖ§OWX¡®¸âŠd¯½öj¡em"µ­|C+„€B@̳ Î’wuvÇwL 4ǵ¤ ÌѡƎvç¦õ*-åj[ñÒ2žà°¬à¸**-¶ƒ%—\2Ù|óÍk ?Döƒx¬ÔS! „€øˆ àÕÙáÇ;ïlÞeµB ³æì‰Ü´^¥É›µF¿à0Š,¤ƒÃªZ®—êa7ÞxcÒ·oß¶Øüz¥Ôz$ô.„€B@|äðêìé§Ÿž«Îz¨Öt#¥ÕСC›ž¶k¾¦TZ‚ÃfËJáÕu²ˆ »yp*íäÉ“#z·ÖE¤¶5ü4Z! „€˜Gðê,™ ȰÔRK®¼ÉjWœ¨'rÓz•¶ÕŒ¨´­Ú(ZÊK‰Ë/¿¼ë&ŠÔ6¢æB@! z-ö¸¼ãˆ#ŽèˆQgËhÚzÐîÜ´M©´÷Ýw_ËÁa7ÝtSò¯ý‹ ÉìÙ³jTòߦ·Ej›FTó ! „€½ÔÙÑ£G'ÿþ÷¿£ÔY¿pú7ÝÚ›Ö«´cÇŽ­½t‚ð dÙb½´Ì©ÝsÏ=]Ö2HP¦·Ýj­Hmí¯]…€B@ÞŠ@]uÖ_O,óýËÞÛ›Ö«´¬cƒ 6([Nîql¤[}õÕ»õ©‚%pWZi%Gh±U‚ªf×]w]·9›þ RÛ4¢šO! „€˜«xuöÅ_¬¤Î†‹7n\ø±åmTÔvæ¦õ*-©Éê6<¿¨Éûî»oÝ)œÊ‹Ý`›m¶éÊšð‰O|"yóÍ7“÷Þ{/±lm³ ˆÔÖþÚ4P! „€èM¤ÕYÒuõ–ÖÎÜ´M©´ä¤Í"ó±*ík¯½–ÜqÇÉ¿øE— Ìc¿ñÆ'ï¼óŽóé¶Ó‚ Rë×»B@!0Ï"€ˆ‡³uÖ_<]M6rµ¶“`£Ò’a •–à°wß}×)¬u¯ý¤“NJÖXc —²lúôéÉi§Ö5Êí‡~ØÖ€1‘Ú.¸µ!„€B@Ìkxuö—¿ü¥«žÕyÜ}÷Ý…’ܮܴ¨´Ï=÷\²è¢‹¶ä¥%8,Ëv«Ò^xá… aÛm·[Ï™gžé²x ©&öÆo´U­©õhë]! „€˜§hR /|Í5× ?¶´O…rÀ€-Í“7•¶OŸ>-©´ØZ ã|ðÁd¿ýösóœsÎ9Ž ?ûì³]ËZ*„µ´Í„ ±ßþö·‰©ðª´¬AJmÑ7¡cB@! „@Ë@`>øàGÈ"P)T2zè!òÏ:ß,>Mg§ -‹xá…’Å[¬åõ¤'°ó'Ûm·]zw­ÏíÊMëUÚå—_¾–JûöÛo'd<ÀK[§ýêW¿renùþðÑò=m¸á†…Seô‘ú R>jÔ¨Æl~"µ ½ ! „€#€•%”@¬vØÁ%û‡ìà¥$hìˆ#Žàå‚¿ðÍ®°Â ¹k€CêšnMæ¼EM {SkmU¥ÅúA‘…ô#ÿ•Û7G}´+¦@öƒ°ÈBÖ5fZ<¸(íø×8¡e "µYß„ö ! „€-#€à¦›nJ^zé%è…” %T>³tì¹çž >YQVÔÞ|óÍdÁLú÷ï_Ô­ò1, Y¬òDÚ‘›•öÙgŸu„¾Ž—vÆŒ÷´JCh¹,lxœi(­ø¢‹Zž?üp‚Šjß®&Om»Õ¼B@! æcPaQå ´ë®»n2`À‡͂ƒW_}5Ùm·Ý\$} L(½(µM‰M:5ù⿳„Ò>xVÛ‘›•ÛE]/­OáUzŽ;î8g; È„vçw®üüë_ÿr>Ú“O>¹qm¸d‘Ú m ! „€ pì±Ç&Ï?ÿ<$&!/©oøi «ZŽ–dÿ_hºA”› #7-¤¯ÉæUZÈ|•ö¾ûîKúôéS+8Ì«ì'tR±F-Ç"RÔ²TÚÓN;͕ҵ<Ãm±øõ4ÿ×ágÖ»B@!0_"@~ÙY³f%”µM“ Hmµ•êSe‘öuÀnjÎvå¦mE¥%8ìâ‹/®ÆXH-ùpQZ󪆅˜gZ‚Ê Õ|ín"µíFXó ! „€˜¸öÚk;°@òˆ”‰N*‚‘¼¿J{ï½÷’?ü°ñ 1+‘ì²Ë.U–’Û•¶é1¯ÒÖÍx€í€à°t±Š/íñÇïüË[n¹eiÕ0@ ¿gÒÍ7ßœ<óÌ3Éþûïï<½~»ÞEjÛ…¬æB@!0Ÿ!@ò¨Ô4dÈ.­‡•¶Nö‚×^{Í‘¦& $°&|ªuÖã¯'|'7-Þá&[+*-7¬©Np˜Ý˜$³gÏv*ûí·ß^Z5,ëš§OŸîÔ]‚ÊPñy™îÈêÛÔ>‘Ú¦Ôûì“à}¥ÀBÑHíÒK/]TÚ¦+‰¡®6eh:7­Wiñ–åïÍû@ÚvÕ/½ï²Ë.s¶ª«]z饥Uò¾gÊø®>ûÙÏv›ë˜·³‰Ô¶]Í-„€Bà#ŽÀ©§žê¢ÛßyçÄR6åG@%\h¡…*‰Qœ¥pÅWlÉ7Þx#!÷j«­¹i½JKWÕF)\TãªÁa(×»‘³—Å1UÃÒk£ÀÂäÉ“3‹3 Ô’³¸M¤¶èjn! „€a°;k$Šü³y­®õ€¢ ´&ƒÄx Κ›ðÓB!óMµVTZˆé<0‡—6Ævpúé§;åzذa]¶ƒ¢kJ«´Ï=÷œ³äU“§¶MB@! æ*pá¡%ÝVžÖ/°nö ^‚5ÕVóL­Ì ‰äÚ›T‘QiiuUZ‚Ã_|ñJ—E.Yo!¯-~Ø"kFšÐr2æÀ[ô=9ÞëpqF»}UÝ–R[1õB@! ’SN9¥ƒª$ÕO$eÁ®$¡m:HlÒ¤I Šd«­éÜ´‚â TÙKKú.¼Çéï¢L¥…˜?úè£ÉAä*†Q4#í‡ qÊ"´†áý… 5o,F‘Žo~ó›EC*©­—: ! „€æ#í¸òÊ+¡%uWÿþýKA¡*UÕ 1ʲ.¸à‚‰M™2Å)¿#GŽ,]sY‡¦sÓ¢ÒBà먴(¬uRxa;ð^h¯¶–]wxœ |O¨´e …Ü”Z×ÃGy$Yf™eæPoËæÉ;.R›‡Œö ! „€s ÀããiÓ¦uoùhý`ÔB‚ªVóAbUɰ?oÖ;Þ_ÖÑêœMç¦E¥EÍ®£Òúà°Áƒw»ä2•ÖÛFå|´(´Eö´JK…ë®».ŠÐ²0<ÌàÆMÑYg•ì»ï¾îï¨lÝ.ªàƒHm8:$„€B@tG€À­Ûn»-yÿý÷K}´~dÝ 1eu›ªúÅzP ›:CUm27-óa¨ªÒ‚­‘Ä9TÚ2¢Hvo; È œ‹|ÑiBë ,xàÑþdo?8òÈ#¡E¥å™o¢‰Ô6¢æB@!0 €ò„Np©™ŠPŠçŸ¾V%1üº3ÔË&^Ú3f$m´QËÓ5™›¶•öšk®q9i«‡{î¹Îv€Ï™Ü²Eö4¡<|´;ï¼sa@YdÅ °(´k¯½¶;Lº¶2žž'ï³Hm2Ú/„€B@t!` ý;n¼ñF§tŒT%{jâ +¬Ð5WìÊe“AbTÊ"ÊŸâ­4”ÑáÇ·2E·±uUZ<½¯¿þúênI$·0 lXÂr¶Ý–óÁX¨rcã§âïuÖ72G×D©mEÍ!„€Bà#Œùh-Û++‹'µ(ÝS ‰UÍ|€ÍÀ¢&+‰1_QÉ׬µgík27m«*m:8¬ŒÐRá©§žJ;ì°RLÖ‚°œmúzÓ*í=÷Ü“[`!=6ëóGÑ-³߇Ëê_eŸHm´ÔW! „À|ˆÀ­·Þšôë×Ïe"H§Œ*ƒ•– ±ª 1*µÐž—hû†»*o7›¶®J‹ZŒòœ+» ²$l¿ýö.c·Šíï­WvËΓunº¡ÚRÝ­‰&RÛŠšC! „ÀG &ê@™„ÌU%´@RG¥eùLñÔ6$Æ|”iÝx㙾vk27m]•–2|îsŸëve*-¶”Q¾G<±U-'òcŠ2$t[Pð5g5H­”Ú,d´O! „€h r‰|ðÁµ|´~ØV^yeÿ1ú¢ ¯½öZ²êª«F)êˆÿ?m«AbMæ¦õ*íØ±c‹–>Ç1†"¶Ý{ï½Îv@æÒp•U KÏ ¡Å¦PV`!=ŽÏçåÙ>Ø/¥6 5íB@! Aࡇê8ãŒ3’>}ú¸GöU}´~(tU-Xúöíë‚ĪFõûó¦ß~øádÉ%—Lï®ô¹ÉÜ´^¥…(V ºƒ ¢l¦S•©´W\q…³<þøãIÕªa¾ÀBQ¥±< ½o7ï8¤¶líycÓûe?H#¢ÏB@! æsŒdtà½äÑ?BulÂ:öZK7$F±©S§Vpó×àßQV›ÊMË\³gÏ.Ì ëϾ{•6ÜWF )g ¡ßl³Íœ'¶ŠíÀX CBÕF 5Ÿº«hl'±í(êsL¤6%õB@!ðEÀHçdÂÒw%(‰øhwØa‡ÚW^G¥åd¨‰¤òªªðæ-ô3ŸùLÂZFŒ‘×%jS¹i½J»Å[TRi #5Z_ðwÜá¼ÄG}t!.ª–ÎtÀ ¶ ,äÙò€C.ʪŽkÊW+R¢ªm! „€ó R U×®»îJ@V± ̹¹ IDAT%0Œ€""Ýñ¡b¨Ûꨴœ‹1rÔ6$Æ|TÌ¢LkÝÖdnÚ:*-ãªÁaŒÁ?‹g—s–U KcsÚi§U.°àç 0ClƒÔ6QUL¤6qõB@!ðAÀrÎv@Ò¾ò•¯$‹.º(¯qi¶Ï†ñ¨í€Zºb‚ĪøE9Á\¤òÂ7ÚD˜yƒ“x %rκšÊM‹Jû /$UUZTV|´U‚ÃN<ñDwc@ꯪUÃHÝ…R^§ÀBVê.0ÌkMùjEjóÖ~! „€APg!8䎥 „‡f$²ãôÓOw· Û|óÍ[¾ú:öˆ0Êöƒ&‚Ĩf×Ü’Ÿ¶ÉÜ´wß}·Ë[…,†õ¡J ¯›nºÉY.Ž:ê(§ðâ£Í»ÁHÛ(°@•¯:>Z{ÕÖTU1‘ڪȫ¿B@yŸÿüçÉZk­å<³$î_guÜÕœ}öÙ®¸AZ­†…ÐÔ±L›6Í)„M‰­¿þú.º~ôèÑáÒ*m7•›•ºŽJ[…Ðb;€Ôî±ÇÎ~€âš—Š+Mh[)°ù憤j“R[1õB@!0Ÿ#@ÞY”4ü‹DÂC`±°æÌ™ÎG ¡mÅGë!®£Ò2BFk"Hì®»îJ¨"ÖjÐYS¹i먴÷ÝwŸK«V%8ìøãOú÷€â¥?~¼Ã´ìl†¡Ð橺ys˜»[ùÛ¼~Yûå©ÍBEû„€B@L°Y\`\ÎÒ×_=4hPâÆ âHnæwÖQi9b¤¨j"HlÔ¨Q ùi«´ðR›ÊM[G¥…à“‰¢ŠJ{Ùe—¹Ta^tÑE®jX^æ‚´J{Î9縌±Y ùd‡}ä±Çs*mÖE¥ -j6ä½N`X*cé5ÉS›FDŸ…€B@LŽ=öØdå•WN^}õÕäSŸú”ëƒ*J0AXH̉*ìÄB@v…*íÉ'Ÿtþ×¼ÇåUæ>|x‚§vá…®íÏ%íó´Ún¹å§‚’/6¶‘“vܸqݺU›8q¢#ð(»ØŠª†…“¶R`—¦Z'±íÊ—\g^)µuPÓ! „€óä¤%﬷—–†zˆJ»é¦›º ¢&/§ŽJËùQYSAbV$†µ¢nk"7-8ƒbÉ:Áax‹c³P ê’‹w„ îšÉt@žá¬–¾y¡À8¯Öì#à0özòæ÷7aA© Õ¶B@>'í‡~è"è7Ø`ƒ®«#Zß*)¯šnø#«ª´ø9ylŽrØDØ*«¬âÊÃn´ÑFµ.¯©Ü´uTZ‚ÃöÝwßnë.RiÉ/`‹€„6Ù:•Ú–¦©m > B@!Ð{ð9i½JëWÊc~Hä¶Ûnëw5úŽ:‰Ý¡JcM‰QEŒFu2Š/ÔiMä¦õ*-YbUMl¦Å‡AL¹Nˆ)Ûy¾Ø4¡õbm ÃI“&%k¯½¶ÿØØ;$¹ÕR¹"µ}šH! „@ïA€Ü³\Aya¤‘Æëª«®r¶ÓD§©Õ󸽪RKÕ¯5×\³‘ 1ˆ,~ÚX"™uÝMä¦õ*-åmcê0>ÞX/íÓO? ¸tÐA $µ¨jXxþéÓ§à°o¸}ÅWäfSûÕÙæ»¢ŠY+M¤¶ô4V! „@/DÀç¤íèèp$qûí·ïZå7ÞèRw‘œ¿]Gå”á­ÒÈR o‚hc©ÀO;pàÀ*KèêÛDnÚº*-¶ƒ0óC‘íàÌ3Ïtžè—^zÉýåÙBL)°@ YÕ gœqFW*¸. ÜফèZcN%Rƒ’ú! „€˜‡ ÷,ygñWúœ´,ÿŽ;îpÙÚá£õðà§­èÅãsİDT%Ãþ¼þ…–†êY¥ —Ï{¹i«ª´(ÃU‚ÃðÑÒ¸Æë®».·jXHhéOÅ0r׿坥Oº‘=£ªM!=GÙgÙÊÒq! „€óä¤å1.éºV[mµ®JOøhyìÜt>Ú4¼XªzQ®)êf¬—4}^ÿÿ*ª/*uÝ ±VsÓr¼UñÒRh!Öv0yò仯!‡’` €pfY-Ò„– ü]TÍ-›çÓõ˜7ñÎú[­*&¥¶‰oBs! „€è% ª‘›båmÞGÛnB œw¹å–«„¾Pü´ø[­$F†‡Ûn»ÍeR¨´ˆÎÎM䦽馛óÇzi £ ÆàÁƒ»–\ô(þâ‹/va÷Þ{oaÕ°®Élƒ áñãLJ»K·g̘‘I˜KVì€RK:¬3‡vu©í‚BB@! æmÈI»À 8r¡Å‚@óaË.»lÛ/°NÊ*žÊV+‰QE ÅoêÔ©•ó®z`ZÍM ©§ÈE¬J ^irÌÆ´SO=Õ]#©¸b«†ù (®YŠnÞy©BÇyz¢±.nx¢P·‰ÔÖENã„€B@ô"ÈIûàƒ:…‚°Ùf›¹ÕF&‚ªÉõë^ªúbñ’ÒÒË«®ÁWÿ‚(Ž1¢êpçÃ%§¯ÏQyPU¥Åv@)ܘà0”Ö§žz*9òÈ#“믿>×çšÆÑXÀŽÛ¸Ah§÷:küݒάn©­‹œÆ ! „€èE“/-ðQ i¸[™Ê jáÎU5•åz!‘¤§ªJ†ÓK%hŠyðÓbg¨ÚZÍM[U¥õßO¬MÛ <ÞØ¼ªaiBK`XÕ çŸ~å‚ U±Îê¿¡ºM¤¶.r'„€B — @NZ1C(ñeâÏ„`¡Òö¡Š:ÖHø +¬àÖË{݆/òF¹X*“Õi­æ¦­£Ò¦my^Ú_ÿú׎ôCüŠª†…×}óÍ7»¾U2œtÒI•ÉÂs¶²R;eÊ”ÚSˆÔÖ†N…€B@Ì}¬A½[rÉ%]ô¸ó„¶'|´…:AbdðAbU«ùóòî3 Î#ìVsÓVUiñÑÆ‡‘ŠíÙgŸM?üðäòË/²é‚T_U2üð‡?L<ðÀÖ݆°ssfáj‹‰Ôöè×¥“ ! „€hrÒ~þóŸï²,ºè¢N¡íI­¿"ÊœVµ„AbUSùóòîsÒ¢tŽ92<µÝjnZ¯Òîºë®¥çCÑFYÆK[ÖÀr:zôhW4t\YÞØÐv@À¶ƒØ c~ T&›› ¥–ë­,&R;7¿=[! „@ ˜Ú×A¤?žTÒh‘ÎjÒ¤IÉÌ™3{Ôvà//k_,Å c¤ I™Ÿ/öýÒK/MÖ^{mWEìcûXå✧•Ü´^¥!´œ‹à0|´aê³<ÛÁ‰'žèòþBøÀ7+-[;-E7ªXÀzR:7ÇTG#UY&R[5B@!Ð @¥Å^@õ,F„üž{îÙã««$æ‹.T!Ãé‹óQúäb­c·À à3'¤çŽùìUZÿ!ï+XŨ´Ì‹ª{ÔQG¹´l1ÞX_`!‹üæ­‹ëç¦`n7ˆ;ö)µsû›Ðù…€B@ô 䤅ð l‘¾Ë§¡¢Ü,B=ÝHœ_Õz€µÿþŽäµ$¶Þzë¹ËE¡6lXåKo%7m•6Mh³TZÃCj÷Øcä„Nȵ„*í=÷Üã ,TñÑR‘¬Nú³Ê G @)溱ÐàÒ­‹”ÚnpèƒB@Þ9i!®Dûó¸Ý‡±ò>øÀUëé«€`‡ÓcÎON[‚¥ž{• 1l4QU?-*w+¹i!ž´•E´OŸ>]þ_ÆeZöc;€ðƒëÒK/™b+$´`ø‡?ü¡R`Øgœál œ¯74(†g˜'U›HmUÄÔ_! „À\F€œ´T­‚…„–eAÐÈ„ÐÓ òUEmÅûKÑÆPI¬nþK[ßu×]ŽÌC«´VrÓ¢Òò¸|Çw,=%„›à°t ¯¬ôÏM7Ý4¹ï¾û2KÛ†„–9|`XVYÖ9HÝcgÈÛ®}|¹ :4AůÚDj«"¦þB@! æ"ä¤å1;ÞÑ$ƒ êZ Ê'ÊmO7È)AL /¼pô©ñpâ§EaL´èI¬£OåõÈ#$+­´R•¡®o+¹iQi)K£ÒƇAfQt±@¸!ž½¢¡%(Œ‚ 1Ô]½Ðúus­d²RëÑ»B@ Þg™E!üÔ§>Õí*©ÎE+#AÝ5ð¡n>`ÔÎV‚ÄÖYgwx‹=Á½¤VrÓR½-V¥%8 òœöÒf­óä“ONè¼Òܰde0o°¡E‚T_±mŸ}öéñ¿‘صñ·Ëõ®j“R[1õB@!0— ÛÁo~ó›.Û5a#5ÖÜPj!¦U=±D¸StB\Ŷ^ïm·Ýæ|Åì{ï½÷’í¶Û.<\ºÝJnZÔÔ**í¸q㺭'ËK;qâDç Æ#üØceª©!¡­S`áþûïï¬ۂzÉ|µ¨Õë®»nå" "µ½äKÔ2„€B@!`$ªBBðÁFd±jU¯ôU?£:V {íµ×ZóUÄX/¤ÚÜØõ×ÍM[E¥½øâ‹“M6ÙÄ]«_W–Jëmû˜ªa¤îZl±Å2«‹ùó„ï¤îªâ¹ ÇöÔöÿûÿÏ©ßäYÆ‚@aÕ`1‘Úžú¶t! „€5 'í•W^éò¹’*O¥ej”ÜžöÔB(«*­?þ¸óu¶$æ£C!‚U‚ÄZÉM«Òr‚ÃöÝwß®o=‹Ð>ýôÓ]¶æÎÊJÚPr!Ö±Ž=öØÌ9»5—7øþŽ>úhçO¦È„·RðNÞc³L‘Ú”ÔG! „À\BàÙgŸ-µø¥¡Ô’§gO5ˆi•¢ ä`%õJ\+Ab¾ŠŠkß¾}+]nÝÜ´UTZ®3–µÈ3Ï<Ó©ïd1€Ð¦Ëü†„ÖXÈ"¾Ysó(üøñY‡zÅ>¾ÿãŽ;ÎåUþÙÏ~6Çš°VTQkEjç€P;„€B@ôÈIûÓŸþÔå_%C@˜“6k…(µ=ÝPj«‰3&Yh¡…œ§¶NÖ®ë¯"6uêT)_åºëæ¦Ui #à©,8ìôÓOw˦XF^հ𺰠 Ð–ùmýRwñ(¿76ò S5|ÅäÍÍjø¤)ÒÛDjc‘R?! „€=ˆ]ùáçG¿(8Ì/ •ÖWëI¥µ­JØË/¿Ü•«nت«®Úõ˜R=bÄCé{ÝÜ´^¥Ýe—]JÏApX™J 7kIrÈ!‡$S¦LÉTTC•ÖXÈÊ[›µ 8;½±Q´KÍ'?ùÉäÐCÍ]"Jm•`1‘Ú\(u@! „ÀÜCÒÃcr-¥pÉPÔ(¼àImQ¿&á¥pB•JbÓ¦Msùiy”¾à‚ ÖZŽ÷ÏâG¥‘ï6¶ÕÍM IäZ·Øb‹ÂSa; 8lðàÁ]ý²¼´çwž«vöÙg;Û÷’úA!¡­Z`µ*Dߟ³'Þ/¿ür—²ŒÂ!eÁkØZ¸ñ1ü:bÖ&Rƒ’ú! „€èAŒ@9Û¾S¿²rÒ¦—*µécíú\Õz€m€`·5ÖXÃU«CÂÿøÇ?vYÈëšö –]kÜ´^¥EY,jàù UÚ,B‹í€ FdU íÃ?œ\wÝuÑa¤îŠQ“‹®£]Ç(Búµ¯~õ«Ñ™°Z hÇ4‘Ú”ÔG! „@"pýõ×;2c;ðË‚PU±øq­¼W c}xMñ× £Šš÷‰BvÈgÛ œurÓ2.F¥E!¥nQñ ŸX÷a‡– 4}U-°pÒI'•ªŸ±X5ÝÌd„8òÈ#»nJbÎÁ÷[„A¤6QõB@!ÐC<úè£Ø €<ÂFÕŒi(µEd*fŽª}^|ñÅJAb]ð9vë‰ù1ÖŠ :räÈèeƒ+k¨ÒPi!—e*-ÁgövÚ©kú,•â»ÕV[%Ç|&¡ UÚÓN;͑Ԙ [ä®EõðÄ”]o¼ñ† ‹ róˤ¬¯V¤Ö£¦w! „€sSð:"À"…—6¶Aj«¦¶Š;¯k¬¢$†¥‚Æz«æ·eœOåEÖŒØó×ÍM{ûí·;\˼´×\sM7ÛkM7*f¡øÎž=ÛÛ4Y -VYe•R2Í9¾öµ¯%d:HûrÓçïéÏ|G¿ûÝïܺHÝU%õ›_k•´^"µ5½ ! „€˜Ë³”†J‘µÇ6H"¤hzæ§²J^X·þýû'uƒÄÂ*bxM«øiëä¦õÒbO@Q/ »ãŽ;r~øáŽÐ§ƒ¤BBë ,Ä(¯ä¢¥À¸75|À\p»‰!-]+!nøÊæè™¿ü²Uè¸B@ùo;Xi¥•œ¢>f†µ!1ŠÓJ<±UòÓEÑ$VÇ*᫈±î™3g&[n¹eô%ÔÉM£Òâe&ã^ZßÒ¶‚ã y£Gv¤¶ˆ¬NŸ>=A¥­ö™Ï|& qñk˜›ïÜ@`; Ä÷¾÷½–—kA©mjM „€B 5ÈIûýïß=Z'8lÔ¨Q•&D¥%“¤±§”Z¬U'ãIÅú !®¢²z0 I¾A·Ûn;ÿ±ð½NnÚX•Û„¶‹SN9ÅY- â(´i_©¿yë­·’sÎ9ÇÚ|zcê.Ôt”æ!C†$p@á÷{pèСQEDjcU?! „€mB€\¥íÆoÜL{º¹‘£…’,± ‰ 0 v¨ëZîºë®J¹qëä¦Qig̘ázQp¶ì$Gu”ó§Î<¡å"«X8ãŒ3z]ê.Rvquf×]w­ôýu–R[„ŽŽ ! „€è%`;ÀoŠoðÃ?¬æ/!Tjë4ðsž$k?¸õÖ[]+_$¡NÁs>Š$l±­jnÚX•Ö§ðÊ[‡·7–ÊYiKAHh/¹ä’¤££#*%×±ÇÛ«2¼öÚk.›J4ÖŠ*)ò° ÷ÇaR¢¦m! „€=ŒÀ~ô#÷XÞW«szTÓ*AeuÎŽá|‰Å6H¥ŶñöY8'Xùªbek¨“›6F¥õÁa(ë¾¥½´'žx¢³àç…ÐzRîûûw‚ÞÈ_›&½þxøN`ØøñãÃ]suï,Yø›øæ7¿ý½T]tL‘Úª¨ª¿B@†øÙÏ~Öñꫯ:‚È#VªKÕixiImU7«@Õs¢ÒV±ì¶ÛnÉûï¿ïÆŸ¶jXaàAg±~Úª¹icTZzYpÇ!zØÈL°á†vƒÙ«´`‰í ˆôú>u—/>á÷Ï­wl ¬ÔjÜœ¥S”5¹.T~¬ EM¤¶B@!Ð&ÌgélPŒ`³…^¸ûÁ6|‚´Å= HÊ|É÷Ó¢ÔVñòüP¥:uj2pàÀ¨«ªš›Ö«´cÇŽÍŸà0<ºE)¼˜b”;N§ï ­/°@…±²Æ|½%u|ðA2kÖ,GÚco2Ê®±è8¤ŸòÂv³Ð±çž{&Fj縩-BPÇ„€B@´#=Îv@E-Áf›mÖÒYzZ©­$áö~Z.’µ–©’!™…~Zuèc û¦·«æ¦E¥Ey ItzNŸÂËïOûh/»ì2w -´ÐUÃBB{óÍ7'è4éõó†ï?ÿùÏ“/|á ᮹¶ý‹_üÂ4r󄇶'™#N8át‡m'mw©íÉoCçB@ùl¨L!àñxYNZ¼¨E ?­£C»•Ú**-ëÆÿúî»ï:ûA 1®É?rçq7b‚Īæ¦õ*íŽ;î˜ ÷}÷Ý—`…È#Õ`ƒ:¼×^{%¬;]5ÌOL²Ä†AhÉœÐùv¹ [uÕU“ &ôØ’¸)"…ÙóÏ?ŸqÄÎê°òÊ+`ù±p"µ!ÚB@!Ðf¾õ­o%‹-¶X‚ÂGRyÈm^ûÝï~ç²äg¿·õiòX•K@W˜Ÿ¶j˜'´\„‘1­jnÚ2•b•Ná•ViO>ùäduÖIÎ?ÿü9X¯ÒbñaeÞâüàÉs¹míƒú¸ãŽsvž*àî©‘=æ˜cœ§r©Æ†T)RÛSߊÎ#„€ó=æ±ì€Ô ÿÆo椅 ‘ľÿþ…¸…Öæ®J 'Ï8X%H ?-ý}¦”é2"ž’èú°Š~Úô#ç°¸]%7-*-*k‘JëƒÃ|À[x.¶'Nœèl(ëéªažÐÒBË÷šÎ†À±°‘é€À°žð«†çMo“ø¬³Îrß#V‰tñˆtÿ&?s¡Ý}÷Ý»©ÞfùEj›D_s ! „€(@`Ò¤INY%8 ràmé!W]u• ºñÆÓ‡æø’Ú9¶a%ncƒÄP‘!—>H ‚[%HŒþap*ñˆ#J¯ŠÌÇ/íç;àÛEMÎóÒBÆñçæ‡qüHþƒÀ†Ä/$´XPéÃã~ á;¹h ãægn62M\pÁ®ür;sÐf]#j775dVHß ÞJ©ÍBMû„€B@ô³gÏvª%Šê›o¾™yÖ|Бˆí·ß¾ë±}fÇΡÇïjQ.š£Ê1¹ÇVƒ”†Abd>¨$ZxN>TO‹ÖŒÂ·é¦›ué:†J‹W·H¥%çì¸qãºÆ¤m¤åÂJrê©§Îa;ðƒb ,º‹â_ÿú×ýйòN†!áGyd´BÞêb¹q¡bÿ}~øá™Ê>¤Öûn~ZÎ+¥¶Uô5^! „@$¨œDÅ씥vBúî¸ã÷xš)c”ºžTjC]vɨ´cÆŒqÊ%éÊ ¸U*‰=ôÐCݲ „ÆXPM)7ì}¼eë,Si cÝÛl³MæTgžy¦ †#ŸÇóá½JKQ ï£Íœ$ØÉÉüã`OÏoR!Œ`0n(QåF¤•Õâ•…ÐrC’ç%î$´™§©Í„E;…€B@4S²@j³²`;=ztâsÖú÷¢•„bdh§³Jê'kóÔª•Ä §¡ÂóéOº w "úp‹Ĩ´×^{m®íïc=æ²@¢CŸ§'´œB á-#‡(“s›Ðò¸À€ɳÏ>›`ƒhwQÿýpsA†ƒ8 Ùa‡üî9Þ!µãe5‘Ú,T´O! „@ÃØ#ëŽXÀ©z¨µé†–4Eaaµ±'•ZE¨D¦¯!üŒªKZ-èIËCØQËZ•Ü´e*-¶²'æésŸwÞyλˣúñãÇwNZüŸ!áíêl|÷»ßu¥fƒ]=ºÉMÖ,<úÇCÛΤðâ ³Ü @¨Ë§M›–k© QÕ¶B@6!€“ÇØDǧI-ƒ 7 IDATD k9k—\rI·R(•)µaŽZ1w;‰HûvÖçS–ñ¹JX¨ÒBˆ™+˲~]UrÓ–©´œËCž—öôÓOwÖ ¬¨°Y¸S`‚Èñ¢öo|#á5·P“}1˜ü¹M¬•›$ˆô2Ë,ãrñfa˜>cvÛm7²Ut+‘K?‘Ú4Zú,„€B  x?-ŠcHjQZQi!´a‹QiCëA8¶]Û±Ab\#d¨OçU%H 5,p>1þâ*¹icTZ­O‘‡¡*b‡øö·¿ <¸[t¾Wi)°@ö€2BKê.ð‚ØÍF†2pÃEÚ²õ6µFŸ® »M^‘Šô¹:äÆŠì¦ú+P, > ! „€è ¼Ÿ6MjñÑBhÓÞÅR !³|ðÁ]$¬ékª’Ê‹GÙ]ðí«‰Q+$±ä%©"››Ö«´cÇŽÍ„ åBž†í€ïÌÊw#žÐú ;Y. Ådt8þøã3×Ñî“ ]Äܹe©ÆšZÏå—_žÜpà .»A™-#<'ª8v«Ø6¡¥ßœ¦žp´¶…€B@F€HæKÙ’*‰L Ô¾tó^ÔôþðsOúiQÈbSyAàQf}.ѪAb¡õ€ëE¡ƒ$µ*¹i½J›pD¡…ýöÛ¯ët¡JK©XÈ+Ö„0BßZù EþPŠ `©øå/ÙužžÜÀ ¦ÿýßÿíÝbnZ]ß#Uò°àŸ­Ú^xá…®¿©¬± díÔ>! „€B YP:!µø^yÔ !å5_³Z™Ÿ–1T% }¦¤²Zb‰%²¦kyÄ”@¶˜†-¥Óç”­$ÆãðõÖ[¯ë4|Ž ‹ÍM[¦Ò6dÈÌ ÎA¾\VÆ,Òú‡?ü!ªÀ7 s‹Ðþâ¿pVƒsÎ9Ç„õ¡Å®AÙ_òù†7]_tÄ؇Å8ÒCDjÓˆè³B@6 õÙìñi¦ÖŸ–¹1AU½U©…Ô†Eª‰Ñ7$.¬à}Qƒ4Çæ¦E¥%eU–JëýšYÁa\Ï•W^él¿ÿýï»ù@½J{Ï=÷t¥ø*ZïGáÒ¢>í:F`Ö +Ùœ|ë[ßÊ$æMŸÌcÒu•÷É'Ÿ”R[’Ž ! „€h7F&@ŒÇÚ(Íþª‰…UĸÔÑ2%‘>1¹iQi!®yÕðP 7+8 ÛׄÍ!Ìà -~OTÚðXÖ÷ð“Ÿü¤Ëkœu¼]ûP9!Óø„ï¿ÿ~W%¬,onkÌbÕ o–²{n*xÂa¶œÜ;)µ±hªŸB@€ÔâIE%# kË-·œc6ŸÎ+&HŒÁiR;Ç„ íÀ:á³”M‰ÒJ X$V¦´ú9©"f=`?ue~ÚØÜ´(†X"²TZŸVm§vòËézÇûŒOø{ßûž óÁ_žÐÒÑW +"Š<öGyÞwß}»æî‰ RvQÊœ¢ Û˜ôY­¬Í—»åyj›D]s ! „€0L¹ê ÒG×;­WËŠQi™ƒy×Zk­²éZ>yŽ%µ\/d*4W1Abÿt±É“'çFæŽÍM£Ò2Í«´—]v™Ã—ô[O=õÔÿ´½JKê.x‘ßr‰GwĈ]ãÛ¹uâĉɸñã]j±#<²q @zý矾ûŽQ†c|àéñ±Ÿ¹Q Uü¼qRjóÑ~! „€5€P BPye ¥§öé¼Bµ2Ý'üœ¶ ÔRÜ¡é†JKÈ}%1o?€x†jrÞÚ Ãa1úA0‹aLnÚ"•ë™"AÀ¼…;ªV½õÖ[¹ep³à¸øâ‹£íiR›5_ûb•ZŠ.{7Tšñ×.¿üò¥Ë _XEŒôMØ|™Ý¬ brÓæ©´¨É‡…)¼ü9N:é$—V ¢øÙÏ~Öíö„6¦À„ÿqO¤Îbqü͘Õ%Ùzë­Í…ªØ›ÍUÞÛ‘®«ìüÚM7Ý´ÐOË"µeHê¸B@HðÑ’º u5ÛA•IaÑØtŽÚv)µ¨q1Ab¬—OåÅÚ ‹ñB¦«ˆQªèqvLnZðÇcš• ­'^¥ÅvÀ*{Z‰e¿/°·6,'ï¾ûnòýï¿è«kì^Ö™3g:µ™› ˆt^ÐZ'%]–ƒC=43_oçHÏ¡]yå•Ó»3?‹Ôf¢B@! ª!`GB˜5k–óa6¬[àSÌl¨¯1b=¥ÒV ÃB€7Öç³e1Abby €ÇˆhzðËk1¹iQi‡:ÇwaEåMpa•ÀvÀM ­OIåUZ‚¾Š ,8^=U\ýÝï~×sˆlQZ±<«ì§Ü-ÿ¬·dT_·/çŒ)Ìü"µuQÖ8! „€GuTB`óøc³ÊàÝ37cUZÑt%1”Ú\0sÞº;!±Ab¬‰5ø ±ØJbܤƒÄPN‹¢öËrÓz•6+«*mh;ð*-¤å–Œ >ÌÚK.¹$A õv„4žT {ì±Ç\Ýô±v|¦Z×·¿ýmG ù{K«ÊMž“¿ÎGžeÚv*ÁYëF‰­)Y}ü>‘Z„Þ…€B@ÔD->PJ¼Rù¨ªíÀŸ6–ÔB}`™ÛŽwü´þ}Ùüx¡'Û¨–1Ab•…D Ï&ÅòÆÆä¦ÍSiï»ï¾Ìà°3Ï<ÓÙ€òÑZ ,‰!O õÕ¨ܕ·æ2ìbó7†g—@4aRе³¨Ê5ùgÛ™®«ìÚ!Õ1æQJ¯24u\!0Ÿ#`JVxE+ýA¥Kï‡ùqMñ/"ć‘ç~"dÇJAÜ„½ì#Y?ÿùÏò¬’6¦ nú ¨7Þxc×£ûôñôç,ûALM+µ|gEüºôBÉ I9ëñE'|¿ô;UÄÒÅ ‘Eã Z¬¼†JûꫯvScéKpU°aG@e…¼óÝ…~YH.>Úo|ã݈·ï«…Q ¡(¨Í÷oåÀµë®»®K¡…d§±keþôXŸ®«ér·éó”}†ÔšÝ!êÿ "µehê¸Bà#Ž^P¼(kà¼ôÒKî1+å]iŸþÔ§ÜûBN[hÿ{Èçßßyÿýd1#¶«Q}Ù‚iüþE:…óùióM¾c%Oßµ×ûFþ–Zl±ä5«´õš)ŽïÙ¾lî­¶ÚÊ‘gOx!zßüB8Þ{ï½d‹-¶ˆþ¡s‹nÓ?`‡r8{ölGŠ Feepó–ÂãútZ«¼¾UÔ¼9Êös“BØÂ /\ÖÕÝÔ "†–®Ç"Ö ÇâcýÌg>Ó­›³ÊÙÒ)&7-7ÞÏLú-ÖÏß Ï)Hà¯Çß„uÖY.C^`ûtkñ*-–”Û,)TZTùí¶Û®Û54ý2ËßÙ¾ûî뮀°¬55q^ˆ<„õB;7['¡u0bÖ!Rƒ’ú! æa ^VyP±Ø†¸òþŽ©k{î¹§#¢V(¯ÿ±¨ê•_Üm/n¤ <æútöõ°üËT°§-0ˆ¹]Î~}ƒôþËì,#¼ow’ÚÚöÇ/³è¢É@#¯‹u`Æ@zß72õ¾E®¿gJá»v Í—×vŒö§K/¥„i?À4È×öÛoÒ¥è¸A üƒByê©§:)J%§nC}-R(Ãyé›V‰Î÷„-ì[wâë§å{@ õJ­[Üþ†ŠZºŠ}™'$¢Ò ñ÷ÍSòÃb5€ów6x}}ôQGR·Ùf·,H+;o¼ñ†+ZÀNOh}OtÝ€ÎX#™ íiRökbûì³ÏvÿÝŽ7Îå mgQôÃÖ°Ã;4±ü–æàfKOl©EJý„€ó^xaÑäüóCµ·Õ€‡@B—0‚Êû’öySA2BIë"’F߃TvË7M]ÑTU×Ç~üÝ;}lã-;Ť/mˆ©a~{¶¥5zÑHÞËöãiXÐH0jìâv^>S$à ë3ËŽCpiÿ7»ÛÌýÇ3Væúo ÊⶈÍwöé§;µ—ô?¨n¼`â?7MxO9唎C9Ä©‚S§Nu7¹ <àý¨eÝ!níöÔ¢´Æ¦RÚl³Í’«®ºÊ`í1AbYUÄxÄ^DÌÉZ°ß~ûåÂãUZª˜‘¿rLÆÖ[ÔUl"TcÃzŽŸç¿»ó„O.ÿjVc?5×Îqæ¿rÐ’*D¬Ç¹êº°RÜpà ÉÐ6¸êšPÿÓY*Šæ©-BGÇ„€ó”e=æ°Ã’[­ªm #šKØáRF\ižl¾nD=ÕöïY×ϧßçvØ?/éÜÒ‚yÌ4š¼mª+j+d÷=뻦©²³íóêF"^45v•EMþj*âsFV¡›ž¨~`}?´×ÿÚ8cµnjla['çôÄ—ƒU>£/j$œ>W¶ýëãöÛCº±¾·´gyjÉ[[D³æ)Ú‡R£’¡Pó óÓò ,hНtAbyjuYnZH¨Wi!´¤óòéÑn»í6—^ ‚Dä÷î»ïv$— $O|Ácúôé ÙòRsáÉåÚÚ]-ŒÔYÜœñw Ï#ØEßaì1ÔYÔlÎíÅŽoW¿*Ab¬aÎÿ´kešW! AÀÔ×c•ƒPKgÛô×L]YÊ¥Oè„E€¶¸‘@ÚB¾È…;•MH¢ÛoïlCjÓ„ÕæØ½ö˜}+ûq}ÛéÛvÎW휣è¾Ði+˜fV!F ¯·÷%ìœKÙü·àUmMÿ0"½˜O-D2ÌÙ9/ïÐi.¤—}ôíkë]Ò^K-²Hò’dÖÀ»'Çôõ¤Ø†v5ˆ4„Ø¿<1fæ^Ä”ëWìQù5'&Ï›2eAäHå3µcÔ\ð§êÞ^ªeñˆ=¦ n×"36|ðÁ.•3ãp·]²XE·ÛÀŠbƒÄ ’Ó¦Më´„R[VI ëFºè¶˜<õ³,7­Wi!BÌí- Üt@º?ýéO;ÀâÍSƒ0ÛAYR¶¡ærCÓ®FÁˆãŽ;.Ù|óÍl¬½]ÕÉÀ B ±G¡íM ‹ƒ1ÿMúu‹Ôz$ô.„€è¥ Âò¨öt{ù–ÄÏXà¤oySGW³×’ãIlúP-CÂúº1HeHX!{_¬¼/g?úýl~úþÓH+êî[6Ï_ìÇv”[† ¨WšÒ¶º©žk©û·õEmÝÄåN¶ ©ÿZe•ä#(Ì·¶õyÒT îÿڸ׭ˆeì/ÛÜïÚgÈh;ÿ²FZ‰Ñ‡ì\œ›µC^9Î5.j/úñêg}W±¹}£/׿ÞÙ>³^>CŒiÞÛÍo ébÞËZþ/mݦv@n=ɵ 5NÝ­Ý{ï½ÉÿøG÷øòT‰ßm`Á¼Ÿil^÷<넬ÌÚ7gz?¶²ZÄ(¿(®¡Ÿ–¹À¥(·(×›uœ…¼ˆ~³òE?Ó©Ò¢üþÏÿüO¡e-nÔ_Ÿ?—}wÜq‡#´>M—·é€ï>TnéO£Ø¸´S1E©žh7\'žx¢ ƒl¦Õìÿ[MëÿâO& ìK_ú’»æÖglv²gðß"vªØ&R‹”ú ! zS:È‹é|}?žoIÖ_7u®¿ØeûõK>n„æ ë+v,´”VÔZO`!´WO`_4Ò÷”yq—F%µ×ªvÎíœ/ØþçŒ4]o Vƒáf;°|\Éd³ÅÆ¿adt-ëÃë#çñÝÖÔåmÌ—øŠ­çÏFpo²ªRØuŒÀB¢Qo_²u>bÄÕ PUûÙü«YjOX!§¬ ÒûŒáÄõýÃÖŽUæU^l¡­¢¼²­‰yðCrŸ¶óBr_6µùΛnr/|´_øÂ©yê©§\þÖUŒ 7Ñx\ß*©…Xzi«kb=±a2Àå[LJmºŠÁvyéЊrÓz•–`5nQZiäžåÑýn»íæ—–À¬³ì¼¼x4M *òâÅ,RƒÓGmV!£¨¨±„3êä8GL*-Vª‚ùV$FJ»¦UYÎIñƒtƒƒ{éGyEÑ»Én>¼–¹°+hÅË7l´ÐGËcn¾Û,[H Æ#úX{ˆ?Wì;òûêW¿ê,í*ª€¿7¥ë*ÿoQú¶¬ñ"µY¨hŸB A ±€ÄoêÈ_þ²óšBd·02@׌lÝkêØšFäP ß²}x[7²Çò^I,Zê$$6À¢~B0Óí5Ããþ—m|‘eÌ߬„v€‘¾ñf'@U ÛCv Û$3lÞ‚îƒãŽوÇE¦„~ÆÈ<ã6³ý¼ðÝÞodéÏF|ï5r¹†õÅî€JÌË·WmíÓä>o7OØ; kÆŠô³ur×½DçöºÖwÀþášC[à ¦ÞN±ss}«ÙHîºvîÅGJ,]š#zø›!9M5æË#lYçàñ~Áš&ŠYãcöALc+‰ACÕ³,HŒ§iß,Á\Ü(¤÷³Ö¢Ü´Ïtzi±p„¶þ[Ãvª´W_}µ³`!µ—·’»Új«uƒÆ”ùäŠ+®H¨–µ®nk~À§ËZÈ Ë:ÚUTÁ§ëâï6Ë/\sùm†¢Lu¼ÐÓÎÿG±d‘Þ̾9¼î,¦ûÿ}Ú¶Ø “Þv-!á]ÉÈ#^Û«l,–ˆî°NÂÙ׿BÁ¥M5œx=eXt¶žõ!Ëõ²nß° sÜgçzÚ®Û[|ˆ./Ös¿õ™bdó{Çr0ÔT”UßúØyP¤yуšû°õŸfã°,àË…3~#nÞ—ëçàõnfdyC›gì1Ç$_6eÈùWM9Æó™çû 稲 ¬BjQj³Rz½oê~J-îc+‰aÁ hŸ€P‰±öôõBb²Ê¾å¦E¥å;áå•bn(¨€½!´OàW'lüøñ]_ ªß,ór§m¨„X¶ÜrËnĸk`‹¨Òdh ^yŠ*P%¬‰ï.\7œ,æv¹Ûp]1Û`þæ©í pŽ 1”t2AÜn¹§óšHm2Ú/„€ˆ@"K$1‘ËäŠÅR°¬ýxŽ4/(Êëßíõ7#!´‘Fd—´ãÙ?Ù#X| ¤È¢6uF°Ò?Mý›©e.XÊ bë&²ªY?Ï,„v}#“{Ûš‹ÚÃF³lá˜, Bxœó 4Ì®¶áó TZ”ܰ¡¸XæƒËð䦃ËÂþl3»Â˜Àï É…£ÀbY@ò!½–R‰-ßy^l àÿãÿ¸KÕcÎQfChº¡¼ÆÚÈ*@Ë"µM­ /cŒbˆÝµû¬œ+E9ãxH6ýšQ‡³ìE¹i©~…í²ãI4$˜›Å±cÇú©“K­¤2Êì>ûìãÖÆ6ȶ&´ BAeÎv|×ü‚ó²ÖŠò˜µ†®Å×Ü ³þÙÞš®«ì² ±ù]tÑE.o1ß/гYArUZæ©-CVÇ…€ØpÇ1¦â}ýÀ“5L1\ßÑlSVI E ª+yU·0rK°W‘ §}Å™ž´±$‘æj ó˜RTGá1J¬Ÿ o,)¶þnçD¹„ïdØ.kTƒÌò¸þsv^lE ÛAUY¶ƒp\ž!ìƒ5áKvΛLõû£©g]üµY`{t…ÁeìbßÅ»YÈk(ÓÛ`±,üÅHî,ÃËÊ-Ù°~Œ0¥èS݇ ’4U7½.ŸÎ+T:Ó}ÂÏEÖƒìZ<¹ ÇTÝFyÅŸZÖP˜§X~_²øV$FP$†*GŠ­,Ÿp^nÚgL¥¥Hä›Ç÷4ÖB@þTßPhéaÆK ¡õ´ÿvÓã!˜øß?Z‡ƒ` IDATe¹  l²Afï´”c„°Æ¹}ÀZ“ç™Òu•]/Ê=ß#E(h¿üå/±$\[Q©-BGÇ„€X.ÉŽ1ö£‡­€vAbQ]ú¹ÝÀ~hÓDvíïß©Êú) ›nDöF@Qh!vŸ0UñN#uÌ·GµíÇd½gÙ MÁŠ!²Ì‡z ™e (¡ýMµ,kOÎÊv7®È‚Žm˜bG CÂs†‹'¯aŸp; .»ÃÈX\úmÃ1á6…ýn·9ø^2ÿÞ©§žê¢¯ñhŽ2…6F½ ç.ÚÆ¯IÖ‹*©¼˜Gûáv6[‡Ù òÎE?ÔÚ°¨AY3]E ?mš\rN`^†‰k®¹Æ-Ë=‘b u"ê•`¬xi)i y }´;ï¼óvª…A®ñЦט‡Aìþ³Ï>;ˆó(œ·í(ªàÓu±&Èy‘b»î¹ÑÏÛY|0&–.nVì¿ÁB•–µŠÔÎoLçB`žDÀývìm9/O2Õ€ÿÉ>läsyS×6EÛA ‘å§a#bŸ*W<ú`jê›RIå., <:ç¸o‹Ømذ¤Ù*D–¹x¼ã› Ïë·)žPf;ð}y/³ „}QiyQ‘ì\ ¤ÛÚHÉšê+cQ•½×—g¤&\ž'kûFªw;ùä„y@ˆÖ€VËàf‹}UI-~ÚeßÍlÛždªçÕæ i7^HþPȤÈ+eóÖ9ÙòDªJz®2RÛªR YбP„e8LEAÓ{…¸ ”f‘e|¶a‘Æäå¦Å{‹GÖŸƒ3p ³/`;Àç‹BëI$„"XðÕÂðNc¡h*¨Š”]öt‡üª v cÔáõ;Ä«hÒLº.®1ÌôP4f^9¡õ‡øŸ ÖŒUi¹F)µóÊ7­u !ÐV ³G}÷»ÉFh!²“MÑÃ÷šGdYL:à‹rªk¥H#~Y,³Í6@©WrÕ†»Ó’Ù‘Êlغ…ùig˜?—"4öÑ–4¢KŠ-ÿÚÚ, iëgû!¤麭ÛAxNÖVÕ‚ŽG奊ñeF¢¸1 ƒ$Ÿ÷¾FzÀ7+Ù³¦Î®Ùiï« ß¿Û÷¹ý«á¹Š‘ùÓÈLÐî1 IaÌùxô^…ÇÌéû@êó”Vß'|' Y¸–¢ 1Ž¥­Ì…Ÿ6]±++7-„õÖXAhýZýÍ©ÁÈT±²ý7F?/ÈwŠjë×yÎ9ç8’ËéB¾_Õw•ã% Œ‚ ÒQö¶)ÂÌz|¹[Š»d«¨ºæÞÖß«´7Ýt -×­Òr-"µ½íÕz„€èQ(žÀÜw¿õ-W<±«š’ú¦‘P”V<³aK|ùÌa¶QdgšÍ€ÿÉ6¢‹:[Ô<™%·m™e,žÚ{Ì­gsmayI#p‹šW¢˜nOY8ψ‡q¦>BJ)I»CQN ?ãáåÅ#úIVdŽÍÚ^£óF!ëXÌ>ÔÖɦxCJiÿ±Ïky!SÄó¦ÐÍ6¯ñ;¶Ö×í3¸@t=É%EØh»þ°­bÖðyܰ¥T))P I؟ΧŽkb¢f(›³L¥-_v<6•i¼°¤½ÀyAbøo!¿é¼¯¨šY¥xÓ¹i‰ì¿í¶Ûºlxf)y‹íà+_ùJ×e¡ÒÒðÇBh}…t`Ÿ)—‹‚÷&¸~ 7ð·ƒÒ¡m²¡Îü†¶I¢Üä[ å²îUZR Ui"µUÐR_! >2˜ÿϑ٭ê*Fñº~hDhg«O{ÍÒóö²ª‘ÚtÀ×`#wk§YÆ0^Y-¹^Ëü²Œ‰!³ØH½õ¶¶Ï[ÞˆjQCy|Øõ`#¿;tZx¼¾«)µTí"‹@ºì-d?0ïdùíí\›>Úöëv~͆ص3w•†‡õoöâý){°á¦`Õ¼À+K] Ïñ»&Jång á¦ø_cÊê?l½cSd•qqÈ­'¹#í:Î3"¹½]ÿ:©›•Ý-Gé·ìƕҹmwã<¡'µì|E…ÊÆÆ‡dÇ¡¦Q’7T8±@$³ZžJËctŸSÖ»3•›¢Èu‡¶rÏb³ð -cñÑB¶É.€‚ AÇv@F€BxùޱX4•º‹t`àö]{ÒC@¶‡&‹*€7„–ë gÙGénÈQU¥‘ÚÒ_ƒ®ER¨vŽ)³xé†Y×F^^6²´SªÐÁ ¦(╽ʈ€¯- 'ËËúºý˜¢Êz¿ì®Fä½}Þúy%v1S½V°käµ[Á·mv¾‘míóê6ž@¯ÇíEª,ˆ-놜fµÈ®acQ˜Ç™¸ÈÇÎdûŸ†ÝÓ¶Òn½c?f\æ[Íðç•¢ÍùøÁ:À¾¿.Î ™…ØÞlÇwêœÓ¯¥v{…m]»¶[¬ÿ¿lÝ[Ú5ÑvµÄøü=P9 F[°äûsZü嵊ý H©õås[Yå½_µhž3f8öåÑ¿·¤ÇBxC?«?ŽÚš¶¤sÓrͨ´Þvp÷Ýw»,jOj±pþaÆuec ÀAºÀ‚¯éµr«~-½£Ì¢X“˜ëñkmiâÎÁµt]e˜ð7H0àe—]æ‚ëÊú§‹Ô¦Ñg! >²\xá…£GNV0rÕÇÓTó¼ ¶¸)Bù‚)­k™ªw«y,G „Ðf5Rr=m~½wìv=›£Ì/˱du«ÿ“ŽQg™û|³¼mêä>V,oiVCå…Ü>n$|˜ù 7·uC³, Œ‡ÄÒ ´4N^( Ú·Ù%e!·øU!¨ñ˜#$²áü¨¿ÏÙñÍl Ûtª¾(«/u’Ü©(ÞÖgœ]Ë¥v]Öõ;û¹…ÿ@l/5¢œElƒnn2=ÀÖyƒ[ü´{Ú÷Kd:D‡G»ø/QŠzB©­Zxütê+}MÚØ 1ÔSýƒ™o\K–•õ”þ>ï¨ïÏ;ÇÂà1”ë0øŒ²·X|¶2R0¯¯YÅ7ß° }¨Åd§\R-Œó±æ0S‚Ÿ£ê;$úôÓOwç m„–À­t¾Ýªó†ýI×……‚ü¹>è-<þQÛF¥%xòÓŸþtÒ¿ÿZJ²ÿ¯÷QCJ×#„À|¹f³G„žuV²¼ýø½läßìÖFhÂF0צ ¡íùGü g<†F‘%“ÁÇí‡}#¿kÉ+k±d–y|a§Îñ+kÿk¤úSQ‡°G«Eí1[;êìÞ©kÏs¿‘KìéÆÀ â;Јâoí&€÷F–¥A~1ò© Ä"ÌË·ÌZ@Ã7[ÔÆÙù ¶wuÚŠú¶ïk°ÙL~gJákÛn›ö˜}£éËBîSKÿ`*êë—LÕ,j/˜2y‡­góÿÅ4ÔTZÚšËñWX/c¤a· ÛCº?¤ÛAL[ÕˆÊJö]\f*eYƒØ¾lóBlcÚ‘FF®¸â §ÌòˆœÇÙ‰VÈaÌyé*’±c µa¶pJm+ëŽUiÉ:@zª´º¼ÙyÒ´V›l²IzwBz®vÛOvÑÏõ`; íöÛow©žPзÜrK·o-ê.óðÅwˆJWª…A†Qj!¡é`57Q… ³¤ìòjœ€°Pq®0Ý]Q+ Žâº!êóSÃZBQ »‘©¥Ò‚•”Úùé/F×*æHÏõ›ßü&ù…ý 2’õ¤=j~×Èßp#¢+i VÔÙþ¦~:¥r¢.gŒ¶X †ÉÜÓÈf™_–ù²9Q\ÉfPä™õkñêì'lCŒXÇ´[ N·õolëòþмqäe½Ñ®ƒGõ¡'5¯?ûQi‡GkúDÖ/ÇòÀñ°+Y ¶ØÊÚ>vóðK#/Óí;@e-j[<ÀeŠí–'ä|´$þ‡(¡œâ©…µB‹ÖCí¬£Ôúܶá\MlljÑuû\¢œÌò‚Ä YJ-Ê0V ßÂÜ´¤Ãâåm”á×}ÆØñãÇû!ɤI“\€Öþûïï¬#†¡˜úGõaµ0TøV3œmÞkÖ€–ù°=@hýùºVsçë"Ì“ûšSÍSø‘ä¦ ûxR‰­n©­‹œÆ !Ðë€Ì¢œkv#B/YÁ7‹gïlØB«ÁÖÊlxœ ±%Œ¤Ýi?âË™Z8¡3+BØ'k»*™EÅ;»´ uÖ§ªÊš;Üw‰­ë_66+ ,ìç· # X™êêû£xBTó|¬¾ŸÇcK–ãÕÚRKÿ¡Fôo³GÒe¤–¾ÞŠðÝTø, ìÛQG• 4ÈZÀºûî»»Ãoؘv‰ñN‡0{@¸¶¼mÔÐrÓzuÛ¯F_öãµôß -… >ñ‰O819M ð#P‹Æ\¨´(ÁØZ%´øZQcQh¹i¦hžÝ”ùë¨úag^梠Âü@h¹Ö;þNøÛÂËÞjkÿ¹­®Pã…€9„¹f73%gu# š‡´[›©YÖÈmØŠ¬¾ß­FfQi÷ ”Ylÿ´ÇÅ“ŒPQÅŠ¢#±2)‚ÌN·TRƒmo^Õ•Rçôó†ï/AТÎh놄Å4ò±^c*ö‡ ¦êÆ42T cNTÚçmY¹_óÎ É^Ë0ˆm`w£)¯UÚH#ÙØ |:°¢±žØ’—–æ ý"櫼ݬ>à ?&ßzB©å\(µUìe9j[Qj!øyY<.¼Cæ²áCJ²T^¬{íµW8…ÛÆ7ê ,;îìÌM ™¥"—W[!´H ¿·0'^ZTnæ~øá‡T^‚µhT(£˜q|°Û_ç‚ËxNvÊÞ’ƒÒÙ”×Õ—»ýÒ—¾”™ò¬Îš{ó˜È†ëD¥åI >óV›Hm«j¼=Ž€ý€wð¸ŽG‹[ÚÛ ò¨‘Í÷íЍ²d6[™Õ€¾3ò‡BK*¬ñ¡õó@Âv7e¥öNó¦ÞjD€,®ÛÙÜÊæÇ!³Ì™}ÊÄOX¾ÖµL±ˆm„ýÙÆ†ÊÆREl²)p”¥çq*mçcÞô±¼Ï¤ãŠõÔ2‡·*T±-Œ°›‹¿Ø žÙ˜ì ŽØÚ߯¥¦ê±ýE ¤ü-ë;ymxMx]Ûí©å±|ž5\K¸‚œg= ŸlމÝFi¥AYÃþÑóÁ[¾V$œ YY¨Âa៛UÕÛ ¯ä±…¼<¸KÙõUÃÔÂÆößøF—ò‡‚ ñ†Ð¶RÑ Â9qâÄd=öpÁKfì*|n¢]~ùå ç˜Òuå‘YpD¡å¿³Ž¹‡V±“Z=‹Æ ! BÀ~¬: &3uB;ÝÈåÃFhW4b¹ƒ©žiB[f5`Yøf§iØÎ,×¢F™ØuíÇšêaÝ›Œ0=lcËêì•ö#mr„Ë#[…С%Å—¯Vv>ÃÈź‹]S¬ÌœLTZ¯l–ÇgÜR¦ Wiä¾%m•ö9»‰ À̧ú* ygÄönÃ$ª,êÄ*ë±tO(µ¨‰µ*­ŒÔdI¯Ó Äe½ÉLñ…lƉ¡ên°Ás,?-y>{óy…Žà0o;@erŒÍ€¡Å†0fÌç±%U™¼êë«…‘ß–LEdjŽ…;ÈppÁ$tûž ´¬¥ Bë•d¹·5§þÈm–}`M‘ lYY2ª"R[1õB`®!¡=ÀÊÚ.håïFJ¼ov;#*iß,VƒÛÌŠÍ"«Á)õ–‹ø»‘‹kM¥z׈&vƒ²ô\ŒÁ‚𤩦_´sŽ6‚µ—‘`¼žçÙ3Dz`wÁÜÆH)Ù ªL *P^vw#fxoca,ðEbÇÝo¤!+/mÙxJÑV¹.æÃWK‘†* ëÇÚ6îzÃ3¶Al7ßf›d1‡Bûä“OfZæC©mwá”Í2™¾¶X‹@z\ÌgæÎòĆc±PX…9ôöæ‰áyÍòÓBLÃk÷¹i ¾ò¶R;¡Š>øàƒ]>YÈ0ÁY|xgñ¶¢âúJe¤ìbmœ·jž¿V…c{8Ì‚M}ZHWXÈÁ÷­úŽzüƒü`¾H×™-#´“'ON¸‰ä¦„ GSéãýK9à‹Ôæ£ÝB@ô.<¡]ÑÈé³Fjß@M´8JÇ~ÈJøö·ì؆BK`Xlæ?/jë_ ·:*­·ø¹bÞÉ€PU©eÞÏÚÍÁ{YA`Yçýùõ^5Lž±tL3gÎtŠPÖcq~`«ø\³Î³ÕµŒD¦çùÿì œÕ™ö‹f_DEd³YPD âÚˆA[0.1:&f“˜ã—É7‰³ÄÄl~‰&c&fÄ11›»‰Š+n*PQ6Y”º¿çú¾pº¨º·ê.MwS/¿¢î­åÔ9§êöyê9Ïû¾…˜Z€r±L-¬uTô¿0Œ€Æ$Nbè•©OT(/úŸt¶f›– ’,à¸ÇùÜ‹°ìàóÝï~w{‚‹GKdÚ€ƒß)§œy]»^¾5Z\ê‡ãÌ7Z$ åÈF4ÊG?;qâÄ|ÕhÖû’€Yk ÏÒŽ3Æ6—´Î4µ%u_vrÖY4Fª ÉA; jh°‰ÒÍR¤$.)F4Š™å˜•bâ´P¾3ûâìm èèh@FÓeCÄL°Ì`yAË{:g•g⼦‰"@ÙóuîúÞ^¦S Ó2´Å' Ч5XÚ´€–kú«›EZohG›–奞3Ôw¿+¯t^å"’ÀÖ6ÊR> uL9¶¡!ôÓ’”YÈQ,IQÇ §-ä$ðDrÀ±&°²`jýÐ\lË"Æ>À±D‹Mû›ßü&˜4i»]¢d!xÂ^³2Ø<à€îé§Ÿ¾=Á‚9†!A Áõ ûZ]wrÂÿÆ0ÈW\q…s>#dr•rÄ %;L7rŸ¥NXµfqX!V6ÜXZ~‹°ó$@‰r@ Ÿ“ä{ÆÔ&é¥ì˜¬²Ø%= ö¥@K¨¬—˜½(Ýl©çÏè}RÓ“Ë ê\1§IŒè8w"hýrÆ PÃô:kMôë%Mø•BqýY€f†Ê#’A”±ïAÚ¡Ïi-Ža µ¤‰Z`uXÂÒË6­¥qö —]Œ®–2jÔÏ­Åîå ñu¢‚åW”idÒ˾Eéh­NHò9cÙqåXßu×]©Š)ÄÔÒ6Ú™ÖrÁ,¿ñÆ;1µÔ+œIŒã£ô‘8FÁ&ˆ¶Ø´&; kQ ¦K/o G"¤¼ÔÔÔS§Nu±i‡~¶0Úÿå/9móãÌ,SàHA°àpV* E7ËóGLÞ–6 3ëßd–|9r“rXúWër\5+#묲(ÐÈ ,T¡¹† ÄtÕ€è[’¨Oˆ®'4ÀÀ`’Ú¶G¨¿LûŒÎv¶^ó ä vÞÍ„Ó9‡Îø½/ÐD–®y€»°i#`Fˆ®ÞšÚ…Õ£í8„¥ÑÏríÄR!;¸@íKËzr>+sn1L+×ÄúªÝo‰]Oo·þŒÿŸ éÈ_Õæ#ÄÑÚ†íꫯvY €êä“OÒà»É˜Ê®”á•VzPɵ0­ xŸ·¹°«ÿüÏÿlPwÀkT˜è(æð[>CM-0{›ØÆ‹C}ŽŽvØP˜Hô0€Q:Zÿº°Ž$`ú¼R`F· PMjI¤ŤÝåúôOœƒý°hhc9Í«oQNb€ö(--ç¡W=á„\}ì<¹ IDATú»ò¨”÷û‰'ž<þøãÛewß}· ¯ö•¯|% ÁÓÕ8‰þ‰)kBú¥šÖ¸šN¢$uÔQ2ÕR€Y,\3L™Áö5÷u)`ÖÚν¼ì²Ë‚þð‡.ì÷O²Ÿ’Ä(?µÖËÙ:묚DÜzë­uÿO ÛZ±CøÉ’$P°†X"…¤ì,çÍÀBr@úÙMI @KH«$ñS­LXÑ^Zk°^ àõbY)ç©ÇT‡g¥E# ›ÛCà ˱ÄÒõ 0 Ó™Ö1ÌÊÐrn1Î^”0?Põ.ÆH“ËùŲ½„øúµØÆ×ô¼X ]d„wœÂŠ")ˆZ~©õ·•û3€—Ô I’–u ;Ÿ“l&Rda=-Û0댾ÕÂr…¯ãkò¢;G´¼™èf1BzÑß"-@ƒ øÝ½é¦›s|Ûm·—+‹`Z ÅuÕÈ`…-©‚9ž…ëô;íûõ¯í/WƱ¤×®ôqiû8®>Ó¦Ms”믿޽d½¢¦¦¦,€–k6üËW‹l{ÖYd=Ð= éâº[~ûÛ •˜ÇarÊZ(@×V K*5àXK¤€Ìà,…ýIj„ä¹ ¹E7(t.ÉÐÉöÐLh­\²wÝ#Pzž4»畨 Œ™rŸð$‘‚\$ „ÄB™ÛQ}tl FÙʵ5’ˆbênçë(fçÓÞeêÖi ÙÁòGÏP»þSŸr ÆÆT¸i÷ • ÛYiG1êƒcU¹A-NRiG( ÷ —x³LÓ›ƒ—å$Ê"3jõãØsk-/D=¨®®Þ.; ./#§žzªÓ£1ËÆ6Y¾Ò†îú½ðpÐÑZÈ.ØâRcÐÂ4#78øàƒ·‡!³~jÎk»gåj/h•y`Ú/ºè¢²Zê˜ÚrÝ©¬œ¬²(º4pÖqòébkö&€÷ºf,©Ô€cI¤>Aeì›$1} Ý[×&\WR+ÐÂNÞ#æn²|>@Ç>?Éž‹KüZ’,`?Õ 1BØ(# Lo[-X;­Äh…1Rèòý#•S S[ì¹ÔpŽ®Öo#Û“ýw­XÑÒ|%ƒ)_Â;á+5®ÜÆ`j‚0¯i v—ø¬å6ÊÍç$†ô€D$E€õËÂNbù²ˆ¡1åEƒ¥å3À†¬aLÿß{ï½ÛeDÀ`f-Á@ö5uÓëNðiZœ¸ˆ €œ! ÖÕàÚC„ÒçšÓ[ƒšá—rƒYºç0$$<7¤/Ö ‹ý©*[e ¶l]™”õ@ÖÅôa0F$U¨–~¶_.ÁÀj±“{ Ì‘@¡þ’@!Ÿ‘HèDˆJswn’p]Qç.«÷79• TÝN×x1C »xp¼'-ƒ)û)ºæ5G©¿NðXZ’ l65ÆÚ¶Ùw¢¬ÃŒ­ÒºJ@—T²–y¸ FFú&ďֿ˜07€ì ôþ[«²×j?€™…زësõ!îïfÕÓ-ÚFœÒ¿ËiÈŒ„a o å`«®‹§þi§æ4{árâ¾Wš©5=mÜõã¶ 1’´9-)ä$†ô Fößÿ¢à$F˜4ßⲈq àÕ¤„C[K”Ø:d¦µ…¡ÅY æí¥%X€©%….Îdü½à¦1Í`„‘ÄÉÁ¿øÅ‘¥)“c[Z¸®´ÏPÒþBB‚ô€{-ùM+tÇ•° ÔV¢W³2³Èz Qà†02Bֽ𰠑¼§)÷B`–ã‰;»LL_ÊH’Œs0´³ï ÃÎØ’Z9íƒàÈŽóiÒësÜ_Ôf@§hÙÀìÀ‡à`“Ù¹‡—Õö;¬ÿ-äý¾J€sƒ€&€€Ld€ñ³šŠÞªï,Jh–óû`ú“SÌv›ìg1¶x^R: ¼vHރϪ+ß©óbÎ.óXrö…c}óÁôÓšÒÇž)eâŸb]ríôωûÜ,-×kPãêãogª¾¡Æøíås3é 4\oq¸N€Q´±aCkŠ<Ù÷KÖ0X͹sçÕÕÕ8ÃÜ’âvÀLy€Y²…ñÒ³JF®4‘ˆ¦ð£ý(7nœ“+Q…ld8„•âÄÓK|]êJ¸®æn•³Ö/0ñ<ZÛV‰uj+Ñ«Y™Yd=P°p»^Óï (ëé^?Öà×AÚGZŸòhJ"…\wI)PF±áº8—)ÿGÑqž¤iïb Ç,€"ŽaÅÖ7t>-_ŠÍPßï滫ÿY`d};Ãÿ¢ÏÝçÅÀ´à¸,w¯ ¤†-ø 8®n×®à±áêäÿ€ ­*øq4JcÎ0HKs~’cmL›R™†Mj0µ…ê¶M/"iãÔâíç$fÒê¸H™Ø 9‰š‹vE1Ê<òÈv™Ìn–5 '-¦¤aL1Âw^­E­e CKKÙï}ï{îØ$ÿ!yÐßÇYáÁt×à%º”´” CKúÜæž¬Ò`–ûÄ ,- }_IÛùU¸’WËÊÎz ë¬Ô8„ýAkˆŽôd+gK»YÒÒϾ¤Á<Î`gI¤4Í­•C¸®ÛÅ2í'PA„ƒ4V@û†ÚˆcÖEJ¨ïÕv稳¦ þ±8g©)Ýb ¦Â>{š¦\^LÞÕKJZÛÿç?w%²X9¦¨‰.†¥åš•–p$2Ž `±ÜlLáçÓÓ"=€YEÆAÄpz\˜Ú}½ß.ÎW8”EÙ+¯¼âRãƒ>oÞ<§Ÿ%ׄ Ü)ÚµÒ‰£‰Ð‰ùúY4°_Â@%5’(ÿK_ú’ †Nmð׿þõ’-ñq´ÄÇm΀0Û€–ûK{î¹çòÛ¬(K˵2¦–^È,묭40ÕMè!7å|¨ÇT.À}K öS9Ö}çl±:aóÓÜž¥(h<“áº^ ÛÅ=J ¯Ž!?øÕH£Š5©%ai)«V¬yëu­BNb&=à\]fߨ—ŸIŒ6Mž<Ù?dûg®Å}áþ5 Öç*$ èuÐâÇ©í0 0î€a´³0¶€ÓBq†í‚°¿È`vaƒ‘˜”ÁŽ)fMt´¡ès SÏ|ç4v½ai™5ã^ú‰| Ëí˘Ú”’õ@Ö¥÷€˜!Âê^Ö¸nbÑК-Ðù®XšIóÓW` ]-Î_fá4·i-É–ˆñºPר€6i¤kkÜzšBWáXÖMLv)'=H[&`{—X®‰Þv±˜ã4öÒ1Ç8@„^“)m˜3˜ZX×´L- -)hJSGÿX®‡þþ¨ÏI/DWh3.¢ûЊÒH&ÂQ¢œÄìQѬ€bÊdÚG/˜t´³8‰a°´D« >&ËxH/¾Ÿ—ó(1iëIâ S21ì®Å EQJRêNyô Ò®R:ïŠzó‚AèµÆ² Ô6VOg×Éz`7îer>#¶f bOöXBwm(9>"›ÕP¢æöyO/Ñg)ŒHÁæ®ëvKÈ©SŠ‹d -q`‹eh¹õÅF:ð2àŒ"µ¼~Y¥J¬¬MªiKµ>ÒÒ✖Ô:_y¥›ž†íÃó¿ýö ª««ÝéÁ´à±ÒL-ŒUx ?I[Ó0µi€|>¦ÖéFÒ@¨oH|ý.À7t‡– ®8dYÉxà—] °ˆ,a̘1Û³…áÔŽÅQ,‰Á ÒP‹A 87Ín’2ÂÇÀ“n™XÇ„ÿjn¶«À,ýÄËÚlÅ-n––k–þ—ˆR2Ëz ë¬bz@zªº˹ƒAk¤˜ŽÞ^øª¹bO[ 6k€bjûA ¢œÎ×àJB…¤FªÙ{Å N“îÖÊŸ%‰ä`Šê76¶óm]j¤+‡ Ç©-¥Z¹¤Ôç.îM©† b‹ÊJjȱ€RÎ}ôÑÛOeê< ÀãÄJkj©S!g¯í ð>»—á%†"©F[ó9‰ñR€,°òÂàz\W3¢(F£ €\SSã’,|æ3Ÿ ``a^)À «J„Ÿüä'ûafÉ2E0®C´ƒB†– ‹¦É"%Ù¬”¤ hgï¿ÿ~§ñ¥NÍÉv%˜µ~‚¥%mcZ鉳¶Ùµ²Èz YõÀu×]W÷Ûë® >´€Ýr:Ö­bäpë$Àz˜'C7n©˜Ycï,¤1’)¼¬ë®ëH'-@û¢@ä:@Jý­ ‹tpfžvúÇÇ}&„1x-WÜqI¶—KzÀµ¸?°¬å0¤E œÅþ*0Ët7lœÉüëj+ÍÔN-2 <©ãWR¦–öò0¦`1ÎI 6muµTÃîÄÜ0µ¼P˜| Û6[ …ÉE^€Á—¾¸Ža7Þx£¦]tQ@±ï~÷»VLìy/8¼Ô0ÍM Z-ºÜã?>ö¼|;A†ŒÙì¯i¶óÓTö50K_ðÂÂËQ%,äëë Ôæël_ÖYÝr﮻‚ÍšþçI 6Jƒ  ÝO€dt @û¢þ(~V`øDÅB%IÂL Þøjª—Xª¤»MÖÊž.@Œì@Û+%˜¶2X—#ÒåX¯)%cÊÂLV¶­rrˆR²‰ùu@#ýªîs>[û¹Ï¹x´/‚ý¾Ëg 9€Zà…¯Qi¦Žõ®CÔ÷4 6êü¨m€Ò8P ³jQ ˆzÖÓRu2'1€ íŠÒ#ß}÷ÝÛ³†sÎ9ÁÔ©SƒñãÇ»*±ÃlèСNr@4…¯(<Ûå—_\qÅn¾ÿH½KƱ .¸ ˜2eJ0gΗT€\l–0Úë;bÄ—!,ßõ›Ò¾¦f­Oˆ>ÁËIc[iž]ÛìzYd=Ðä{g0!?å­Uš,aHFJŸ: {úަçià<;ç8ÖKLà9’Ü¡)É?hªóT\B~… à;Cƒì]ÿ "åZd Ÿ-Ж#ÒµÏBxíWFéÉЉkõñ׺•A~@™]UÑ⬷Òà~[!Ÿˆ™J\V"D9'Á„¦‰~Pi––öj+©©ë³¨í°ÆqÌ* Õ¤°má:Ó?“/QzZt³œ‹&•0]„ÂBvpðÁ;¶—)j¤üÍøÎw¾ãô¯€Z@Z>ã¼çž{Îe£¾èo ÛUlRB—Ñä„ë*%1C¾z—{_¡~*÷õ’”7{öl£±YZê–1µIîPvLÖY$ê˜ú ëÛÑsç=ÅpnÀÄjôÙ1Ÿ^‚ÿøÑjóL´êSoÐ :{ÜÔ¿Úe{lµï.ý¸=½þ$±Äþb76Àl·éÜã0÷U4€u>råôéÁkª#±$†kÛµi“^VêZôcبã Å‘í¤:la®MkÇúNbHü¨´Î³«¤eú™úSÌ,Zh @Kv.ê@ø®|¡»èÓÕØYdhgah'É5m Zêô9…ƒC‹{øá‡7Éì`Æ€770Ë}6mZ †'»òþA ð–1µ):+;4ë¬ê{€(Q)o?Öàj1h Ú¿ |hÉ&××ÚbËŽŒ«å8öe1· ¼&öéF ¾„éò @KÛrÚrF:°:–3„—•Ynéå.×ýëà0»V)ë½ŒÖ ,ÏR6¨E‹9§{@­Ï Æ]#ÎQìÎ;ït¬lÐRrYR;BSýäuûƒÎ‹2“°ok‚²û©<¤÷ X~¤çÒ V3M½ˆâ ‹LK^V9{èÞœ¯²Çäîu9V²‚Žb,}#–4uî(ÇËêt®0·aÆ kNb„¿2ý­ÉH‰ C‹SÑÈ8çÅ_tí@³ È%˲Šâdh3) a\Ç’*ÀΦ´„ƒ=¬©© ~üã»:5¥t·€|3Àls´ÔWÅ¥µ¾³uj­'²uÖY$ê$Q)o‰A  =@i\Io›Ï´›5À¦´3uö/TXÜuÆ ô~A,ìD1N‹U·ÿÖàŠ~vƒ®  ýÇiqeûÛËé€rËÂËêZnéånR?îÃ@ÚuÓ®‡k`ÿ¡²ÐÝ¥Äø8p`lø®¨²£@ížbf;ŠÁ}+êm«xôhÌa 6› á›Ï’æÁ•c(‘"˜Át†ÌlŸ­Ú<£åÉpP]Ň <ž¢e¥>¿¯}YDHÀúÉ*^›IBet`Ò®…Ü wîwóŠ£il‘@anaaai9äw¬1úa¤‘òTÑø~Oé³£Œl^²‹²-©1h­Ü¨óÂÛ~øÃº¤8Á#7 %oØÂÓþáý•øN}0^š3˜¥ ¼€L˜0a—³´Ô%µôBfYd=¨H{{­œvü”·œh1hëš/-Ç>'¦U#\Q€–ld“RfÕ*t‘â3¶èº·0 «Áÿ.1$¯áXFÌÊéÀÊ,w/Ê­„ô€r7«?; Œ•ÓN~ò²Ë.s€SÎqá»Â×5Û˜eÁFiyÅ}jø_RÐÙð¬úoã_Rä3e[¸$vˆÀßõçý9` ¨m£maÈ>©ßÂïµÿ/ZVªÃÅŽ~I瞣å`}ï«¥FË#zÖíúôO8”e³}ïEtƒBÛ¦pW‡ªl8œÆ0ä°æ€[@/`  JqP#|ÇdÚµ’¡‡F‹Üàꫯxñ`eO6‘H«K Z"²+iüXÍ$_Wô®‡³÷˜bÆ2‡¯kÓþáí•øþ鳉¨Ðnî`–þá…é/+MÁÊûר)´(«CÖYT¤ÐÐþùlò– ƒv¾<ΉA»—t®ù @‹²ð˜”Àt¶4²k4П–Rªà×…]í5È_©z%6yºûUŸŸ‰Áý ÖOèi¬Ü‘¸v¹CxY{*!= l^pì*§ŒJLoÃðõ ºº:Ñ%Œ¥õÁ¬x >¬ÐÂô¼ožBl¨¼ÿùÈ|2Žàù‘؆¬ •β#ÅÖvŒêy÷Ùã0]ª¾¡2.Õñ§Ð‰xA;@åt×EîÌïÍŸmB̺/=°úº Uÿ¡åøC€Ã™e#ꌩÉÕÅ}ã%€CÈ." àtÎd #¬hT,Z’0 wåÞÃäbÄ´%AÑ ’OœÊHÎpÉ%—ßúÖ·Ü !»ÂfLix{¥¾£¦Ÿ¨’ mK0B·rÊ)üNw©–Öú2¹ˆÈÎÈÖYd=°Ûõ€ò¡×].oå½Cˆ‰Aû‘ÊB1hé°rë¦îðÒ¿ƒ_Õ€¸Xƒì%È>@xLƒ&€û„˜ Œ°T³Ä½,Æá9]«ƒ€Â` è#¥ÉíðY¤ƒ[UN#„× 1ZáR®ƒôàÌ”ýžäz0Þýcú(ÉùácnT¿oÐ Š”ª€¿BÑü2 ÔÌDÀ¶öo_­Ÿ½]‰>"Cø•€12„ñ@ÕE>H™ìâ8Õ;ô»š¯—/¢"¼®e³jƒ»@6ê:q•=KÇߢóïÓ2Z¿ƒ°ü ,= œMbj-À–kOS\ÛNº'ÄÄ.V € zPËÆ}ú·û7vIy‹ã@v-ëC=ä2v‘àéyƒÏ8h <6°+Ð’²öN´±ÅÀë bgİÃ×~^»¦ ¨¿¡A}ž® õ°·˜­4PŽÍàrG:°vU"„eWJz@ÙL¼w‹rìKk¯ÔÔ 4øfI€ƒaœÒØvPs„?iñAí6þ¨)þ˜""7#CxZàx¼ö2ußQàÜÌIR“v‘–·´ÀÌnU9ÃrŒl> »MÇW©qvîÑë˜WկdžŽCg»·7²AϽZ+o¤€íz±Áó´0n£% ™+yÀ9pq¾É9'Ÿ|²Kì€$@‰æC#MPþ°‘ž‰‘ ™`–T@›Ä8žŒhd&CÏ‹ƒ!ìnD.amãdI®•æÚËõ¾ð…/¤9­Ù K{î¹çz‰‰ø¹5€Ž÷1 IDATÉ~i\©ìrYd=Ðtz@ƒCÝ …T"~@—ÜÔ%!»ºj í †q5Ð MÉ@¾#vÇ0bЖbJq€f´µI¬FõdÁ^Už¨ž!] ò¢%¼£Áú|és”‘¡¬D/kk¥¤”ï@mBÀfõ‰[G©€vÞ¼y.UZðAâ…|ç  HÚ«Z†ç*BD„æ6§Z!CxCå áÓú]˜6ÃÑö±ž¯ýóuή봀 : tŒcÔí.=·§—áÅáÍHÜ,L˜¯´`Ô'9¢˜FÛ{ Ü¶¨E2ñ¤~Ëãõ‚‡¬€ûDÖ0cì.¸à‚€ðk0¯èh;î8w:‘p" ƒLô·Ï) rÂ` ÙÛ$-inax‰ªpÕUW¹…¸¸Qén™ú’!XûʹFË;qâDÇΖ³Ü¦T÷œ’q4@Kÿd ¶)=%Y]²hb=pë­·Öý¯Úkë« G­¹b=“ĠݢÁ@ÛG:Û´€v™VBw• hŸeàžÃÒêîá,Œï£*o‘ꆓ>ï$؃¾À$ p`Bàì ôþ«D/+éÁÅmÛK]£Q.×hÃÚ]/Hh ¶ƒÚÊ4ÖI ÝX=›L?KÄ{*líóZ Ô:¦¶ Àül=ÈžÓÚ˜`°L¯ëXXIXØô["X[±œÄ¥ERp¸êà×úC½HáÔ5XûïW¹ŸÏSG§ÑÕqQ“J9H &ªœGôŒöP=Îz«snÂÎ]'` [6ÚB=?V9ÏèYÿ„¤'*¼Ö¡‡êd€Rd8‡q>ºZ^0xDLøÒ—¾Ô Ht¯8œ¡£Å™  =öØc…ìBž@†2¢ ï½J ½j8ºÁ/~ñ fÃÛT¦L_¸ÀœºDec+ÓešD1¼*­±µÉ…ŸÚB=”íÏz`7íbÑ~“:b'_cÈ ~„즫PÈ®R퇄֗6ÊAø6½%–•8µ_/Aºà—¹LõB–ðm¯¼¥Ú6S²Œw4àIánqÜ: Øêj?«a{¶‰ÿSk!¼®*‘‘öëjŸMz@¶µrÛj³h•îJ8j-³·Hý  Ár%1€¬o°ŽæÌäo÷?Ö—§µà4¶—®紥ݩÌdçåŽóWé÷²^Ï}e,챓}ô|øa´ÂB¶ÐAôt=K¿ÔçGUÏãô9­¨ÜöÕó8Nõš®z­¾‚•í-FÕ7¶…Ùn­èÐàc½| Öo •ôÙÏéÅã|…ñš&f@zá…wß}·+ ½-Éžzê)tÿùŸÿÙ¿D€®Ö@ËKˆ%U ~ì‘GÙàØðÒÜ¢ÑåY!9l1±h‰š®7ÄÐÕ6†Þ‰ÑKH³–nÜ/²û)N9þ”µ»Êÿ—®¬ÕË Ëz ë]ÑbÎê>ýéOÕ°V ¬ƒ =Lë} °‘ë5øÎ‹3\ ˜%¡×ЇvPëä+w­ÊAv§£ÍwnÜ>"œ¦þðm_“3BX«tmΠ̀ÝÅÚ Ht(èVÛL¾P‰^VG¤£JèG+'j½FílÃF·m‘¢F?-‡¢¿pá´•oÊ> dýr]$ƒÀÏÂ{ÕèdÅÂÎS~™ù>/ÑÎåªûJ­?T9ë´¾P׿Y}ÃàÚIýs€ÖcõœìéõÕ©UyØdâ¢&X½¦¨Ì[T&²>^9‡Õr/bÚmZ[@m;Õc”ÊxMeÜ¥~>Bu÷™Ú­:†ãÃŽsŽqVù¬÷Ôo`dAíôöýÆFÿüçÁ™òìC,kí A.¹/%D> z)m}|"E KF Z4±H Å ¤`ɇÎÿ—¿üeÐ]¿?Âu…Mέ’5ŒX¸„7û‘B2ð;˜±´8ˆ55Ë@mS»#Y}²h=À€ÑYƒ_w¢Ĉ ¡%dW!+ÐnÖû°Àðab¶ô4~…®µǰ#T²FT‚ÎIä×CúaÒñ.`xFåÀÌRòÊ$#×í¿S@v)Ã~eÒë®xª„ô€>]*€ÓQõ/ÅðŒ‡ýX>1rdÐAŸa Íð¬?æ˜c‚|@ÖŽe Ëk ÎßþL„ßh©ÑR(ñ‚×Å:vµê¹Aë-Z¸´ž´(R{è>©¥^¬gê9h­AtÂIê¤"˜s0ËÕ^*7‰ ¡AÞ­z§¨ŸþWeÎâ·^ÏfÔ ÷ C{=—Äí%vw¸"3Ü­û7‡´ ùµF/o#,ú¨Œ‡ÅŽþYŒ®º -1Z Òo`r¾8„EE)ðªæ¦ôa„Ï>ûl7µO¤XÑ0«Ï5Ðã*Ï/»˜ÏläÔ'M„Žb®Õ”ÎA3v]ò’&ÇÒÒO¨mJOKV—¬š@`áoúƒ=L¬ÃZ f«Åö%‰p }\ƒ8úÙ!E€RÚ!Ñ£S²»á.#tWwM·[È®ðþ´ßÑÒÂÒ^^BH1„ Àf1èþÚÞWÒ2Iah37+è'¥$–”¥¥,î2„Ô†þêS¶pÖ‚m¸®û·™¶é™ö+àêa]röÚèÙíH瞤maÖÓ;,ö£纖oùdo2ÿû ¨5Ö×¶MÒ ä½µÓõÌÕäÃ6ê3’‡°–ŒX»Ä¯E6ÐS36+%8@àf@í_µÿP=“x4ìD®ðcJ£“–>?`ö‡p[I¸ÇÚ|1haf-»€v†–ˆaàúÈ#8]m¸þåüL…<ÐÉ(œ†»œhâeY:ÜÛo¿½IÖ4µMò¶d•Êz`×ôÀôéÓ뾫<èhœhàê'ÐõžH8¼_C#àV   AóÈÃé_#ÉçyªçJÕå¢aÆ’”Ç1÷iàþ¤ê[Nƒ¹…>R ž%l°· ­è[/ …và;K/¤ùÅÝ€/ yÕÑ€ïA°ì:¾R¶^õƒe.ÖY8/-˜4)xK ‡ð] `I§Jò„ýT0]I ‡/ØÈtËr-°ªëµlÌ­¥ u,+\0/‹Ôg3õòV¥sÑ»rH6Àî¡}R>é‘™ëÓ:÷‡ºwê·ÓOe¦5€~H%&î*7N†wdí¼*Žƒ¡þ†f3~&v¼»ê{°^–xшšBç|@-ëþrê"aÃûbi÷R józÖþ®ßÜþ*÷]é-ù[a²@þ®8¹Á…Ã`g‘'0#HŽ3¦öÑožtÒIŽÝÌ’È ƒž…Î ³¶qå»0‹–ôœsÎqrÅ–Ó\Ï›={¶› ¥k^§g¥ø?ê„ ÔV¨c³b³hn=@Æ0âM ƒ-˜ÐöÑ2Wìgœ /­Ý€<TÜùD9è¡ÁºT@N°w½4Ûç‹™ú@ùgs}’æÜBÇ>+pzœ¦pã –µ/‹¦}±Oè>„;`oøÎPÁ}XL LôØV2­a€bXadÙÂØ¶§Œ˜´Æü®ð*Ä»“"þ{E:ÚÕz¦Ð•– úÖ÷ܬ«®vG¿$ÉÁžBgèz/äÒ*à”ÐWap @Õü¸4=¶·Y=ÇÂç‘Z`h‰ ËÊçÿÖrªúgTH+M¢?Mk>:P q¦îYºõWô¥~`ˆ£d¼´ÎÝ3ÿxZd¬Éf04Ðyª~³÷ê9ß[e£© ˲8‰ØaÒé—·4IÄ€­ÓöSõ‚r¿–Ûô[>Bà¸[Ngþ€Â}=«— ÙÅñèg‰º@Ù8³D DÃøíoë€-ÙÁ¢ÂuÁÞr+i„Ð"3@;»»/(ÄÖóT÷©O}ŠäurΫÿãÑD:%µMäFdÕÈz`W÷¹Ö-]4–i ªÒ |@Ì!-`é”7V×8C‰¡%ím1€–8´üÂ1¬TË—`¡Ø²qò ;‚[–Îd8’]”ë__šÏaà{LŽñý»@Ê0®õtÐ`_Öëð6ìæ"ÐqipY¶i©ßR›–}Ä]!@h¶}lOd@X>gzÖæˆz/Ò]§Ÿ’–VóöŽMm«kÇ€˜Ñ‘º.ßmèñy³´žhW£ÂQiw¤uU¼¬çDZr˜¯[ý¤úåÝ÷t~€3ßõ`ãd &C¸O÷jrè÷.@‹…åõìí“›ÍØ_÷âXõÁýºï'zÀ×Êr V_` ‰!Œì`£ž¯}%5X¶lYP¥:“ö“ú|ŸÊyVÇ¢ãI‡ Ú9M÷„p_!»ˆP@è­8 ³³ÄB%¡1fý,`D`[¾²â®‘t;r‹ßýîw)|¹ÞðáÓžÚ⎃¥EO² žsÂy55@K§g ¶Å=zYƒ²HßèhPÆŸ!Yèh—iJr¢ºj vKõÞåU* -ÀHÜ[_{—¾æõgܯ6M‚…$×AGëâÏj .·á(vXóZ®ëü]€ ®o`7Ñ[–pÊý—z™™ 3DÌe'±MbýH}Êàˆи²Z8!1ÎÔ8ö¿Ò1OVÙ8v² z–ÚF€²|ç(fòÙ2Þ_?3:TXÕT¯/$ì«+IÚäaŠ¿¢{ûSß%üDC€©\F€ÖÛC´cjù~¨îá µéÞŸÃÏpäƒÄú²€:fô°„Ùè^¨•©z¶ïÔ,Ï8Õg€öa+¹ÂÄC‡ Î:ë,¯ôå¹€ üâeÏv¢øº[€oxÛŽ’Êó‰ø«°³»K˜®B½Æ½@ {þÌ3Ïçw^“bh­þÉþÙÑÙ:ë¬Z\HïVw‡ò´hMG;24»¯tµf\Úã5µX Cûª>@q9íßU–K°ŒYò­ Wð<§D&5îO«ì#+e ¨F¦xiëË‹Î8) ¥|¦ª—‹ÑƒMÐÂü e?àŒg%¶# ÞkƒÝ„=Nc#5 N„wr :͹QÇúì* ç9¦«TØZߢÁüý.!D HµãL†`ßãÖ€Ú¶­fHü b¶ý“z‰«UÿÝ«zûF;zë`»téRwo¨?÷¯‡fX(ÿC\´¶ÈŽ‘³èVûrîo¬0Î-Zì«ìaQ†$™Áa‡üìg?szYbÑòòƒ´À-` YI@ ÃLB]uÕU»EÜÙ¨{âoƒ-ç·JbŒ{$‚µnª–Ú¦zg²ze=Ð=€Žg!¹ŒS¦£Ý'¤í)6 í,I´Ï‰™ù¬¦¶{Ár½)pü†Ö³ËàÌõžÌÙb’θ.§Ý¯Aç°JÓõ#Õ¿èˆ+eΣ#²B•óz\#   ,°`" FÎ×yR7ÇØË »ˆöuEÂJ»x³)û¦áËKjK9 `núÚýð`kÓXœ£˜_2 <2®¥©åx@©ÉøÈ$óWØèûKô{&ÄózAÀô÷!è¡¿ ]uØÞeºÕÕÕäs¸›~7_Ø]£>½W@y‘-çO›áÅ”EOÞA€êç?ÿy—f÷Ê+¯tSý¾´ Ex·J¦º%zÀ™ÃнÛÒ³‚¹’à¿{ï½7@CËš¾;vlº·Ç×(×! ç§ÊUjVNÖY4‹øÎw¾Tk°é$F)¬£ 7  »ú¢7m1öŽÅ4Ð}Á“6Sçúêër&X \œÃ,*ßËmkŠýs¹—ˆr—Myèiq#¬Y%mƒÀÉ’ØZ½x,@‚ɬÂDv 9É1‡= &°ƒ>£º]¬ï8*2Ê O³: ²Rù†– „!;b¢OÔî½°7ÚÐàú2†è£vÞÊy'¨¯6ªnõyßv>&é¨Ì¥Ù––­¥/|)ƒ•µ!À?K¿Í°¦ÖØY@­±Æ&=»AÏŒ/Q8Aý1[€x9€a„ïB ˜P^h£IÂÀ €ùÚÕzq]*™É…:‡ø¿ ›Ñ7·L™â¦÷Isk€–p]èXal-þ,¡º`yÙÆºF¤0‘°ÁQ!Í*qÝæR&N8á„àÏ’¨á&–¿ðæ.l\jwaçg—Îz`Wõ€ØºGõK‹u‘ÀjXGë×mƒ¢Ç4H¡Ÿ%IBZûP+ç•CC˵ŸÖ  8,W‚k²ƒ5˜ûIl_9Ö„ñšÁZ•£l+=íþbÛšŠ!;X£…=Ä̢Ä¡5ÀEq #è?, 昀L'üPC…§;d§ÿp¬JËÒºd 9𿇀á“zÆK1ßI àël[¥­µýþ:‰ôÀ?þ¤œ áa­}£>ÐzgqÒÇêê·mÖI€uœîÁz–†•°éÄ»Um‹4/)ÕõrŒñ³R¿õj¥²…mÿ¢î÷þ~èÙ/P„ œàÎ[áé;F‚……HË-;X.àý†ÀÕé9íßN.q±OYÐÓVÒKOËKE!#Ú"1M®€Yßë~³À€‡#sò2†Šï|µkšlbVga jG©- âJ1?ZšàpœÛ¤l­“äê•´>gè÷ø®€ù›¡|––]QÒ¶ó²aÌò*‹Ä5ú½"/¹C€=ì RŒûBºÜ5b×éC-àƒå>ïW]ÝàÅåKb’«œÙ:9Ã@íÇîüââÏûÔ´²È pÔàŽ=ÚWÎÿh+ÎfÈ .¾øâ€ØÜ»[V°$ýÉË&Òî±´IÎÛÕÇþ«´«k˜]?ë¬ÊÚÎ1LV{ NÛu´9\Ô…^;›{HîÖûhØ¢=ÍgìXƒ!‰•ÌY‚…/•²6®¾•tãš³ÄjUš¥m,=-ñn; ðä3-yâ ì°lzšó¢xÍÃÚ1~yLuc\¥4 =-倞¨ßÂG¥‚Z•aL}¶Ùƒ]Ûαµ;×+˶ZWý§‡~0³ÆŠRˆz–±i ùz±©€¾>9‰Ñd1²D2xJõÙ"PjQ>ÖqYÀ©9¨‘—{J¤ÛF¹Ç¯+ ×I’g| ¿órx¹þ~<¡k}âŸØ€Ëó€$¡rä °³8Ê6lwŽ;[èyBÛ “N:ãsÏ=IHþ|¡ij©£³Ëd=Ðz@Y|êê4Pu×à’DG»JÀd±Ã,P~®la`ó[ö,†÷ÀÜÔd©}@‚…I`R_RÉ¢5¦Lõ ·s£ÀQ*›–k6–ž6¸Sû–¦™Ñ†Â‚”Âá»V ä E§ou}'À Û‰áî¶Ø}ŠÿÀeºÑø£î ‡Í"åï£eÅš9†ñh¬g¸¬}uB‘Â’pqß‘!ÐW÷{àœ²ÚæX_$‘Q|Í‘ ‡,œ‚ÂH |^Ÿ—ªì7õ;pŽy9ÁA £½ïH›Xî+§0ßÞV4§½;;xðàà«úí.Ð}}L’”y:°«þ ““ºVäD?@rPn£]0ÀO=õ”c†‰=›Y| ‘†¥1b„“‡\vÙeÍÐÒ¢ ÔÆß×lOÖ-ªn½õÖºfÎ úç×B:Z?GƒÁ8 DH°ÝO€%ޱÐ+3Zƒa9Œ Õ*ï 2O¢(Tš¥- @šÛ¤ŽUÅözÚJs¿N…Ây-Rè.À Šu8| 0›oÚ…‘-l™îQ>+Z~à=×C8ç¸N¾:˜¦¦ÜðñëzhkßÏ#/ƒípù¾Y/fo«üy¹WVîZ|î1[²N÷‡{Ah®.ú­òòP%Ú²4²Ÿ’¬`¡Î}OÀuo9“öÊ…ã4² =lïœSõÃy v–—šáÊ&Ö3§—æZ'jæf‰ä ƒuÉR§(ø©‹n`bùÚ˜vaº`g)û{ßû^¦+AÂÒÖÔÔw)!m‚3šÎ!¨m:÷"«IÖëeå©»áW¿ †å¢¼)€XHG;Cƒqhç‘èl÷×°E;kF”â°";(‡‘`aåJ°´¤Â=RmØ×8娳_ÆäÇë•6À&Y¾*mù@-Ù¥­$XàAñøá»pàã ¿R%”ÐóÄØælí3ê›8£Ýq 8îû*†Úâ3¾¼X´—dXæÆ§6ú…¬aØR…_C;K(/ú ;L÷mž~Ïms‘+\R½¼ èåÍäÀΈ²°³fÜ÷×`_ &iG{±÷ó§½u]÷Åÿø;´,kK¢€©Á'?ùɲ”ÛÒ ¥%Ù6jÔ(Àm³ai©sjé…̲hÁ= iÄ:67%ÑÑ.ˆ\«íèÃ’¯{ Ø¢ØÎ”†ŽiÐ e’ X‚…‹rìP¾º¤Ý÷¶ôwµT*„õ!Œ!¼*Ƌ똞–Ï•64µQ1jq² 8~…Ãwá-†ÓñÇÕ)l!FX¯Á²Ü¦þx¥ éˆóu­¼~11KÛÓš Y–; '?àØÚµuq’ @mZ€î×÷“êwØíiZL’á¤/;èZIº€ÔÙZX>¤ûÔUù±|‘Œ×þ^ZÿIûa\ah{KÛ¾gîÅvv¾@*õ"0kl.u["ËlÅ ßÁzQ®‘&w¾–•:'Árr?‰B¦+yñàøã¦OŸÞ¤ãÑÆµ(µq=“mÏz …ôŽa50™Žö]1“ùâÑÒìù:&  µ.ØŽ>ò T#Äìé f &åy9ÊôËxLí¬$ åZk°?®Âa¼¸Ncéi¹VS;oî\ñž‡$­9*áXê™'²PV.&ªj“Ī­˜Kc.YnjÞΨk¿»®mK²ö™Õ¨Èá2öð{D¿É(K£–ó9>l—¨H–ää€~¤¾m,/„S3½-,+@•ð]˜9„±þœžã6ª÷Ÿõ¢†Cع2qƒÝ…}ßÿý·ßs˜Þ• áQÉ 6kßyªOOIx¡˜,@ËËÊ;:Æl¦þV•b$QÌ _ýõÁÑG]Jq»Ý¹ïè^Í›7/X$^þ<é~TM Ç2PÛnBV…¬*Õ×]w]ݯ¼Ò@G{HÀù¤œ8 ˜öÏ ˆIëÖEƒèšâ|LƒáÝšÂ"RA©f †¦¬K’ë> À¨9°eÛõß 0"@Pik,=-íX+P²§î·o°w8lž°°•¾fÇ0¦ª-t—nø3@Ø¢ŠU @bª<­EE /€‡æ5­³jõðਲNè2’eÌ·R¥~YƒôìÍÔ=ˆ’À–“Pa™Âsf ÐÒ¤ ô+÷¯ºzGx.¤%'IZ²YÇLW?­¸}ãÍ7#à~ŠKkQ( æö•?K@xŒ$G¨ÌbwyÑAn€§ßÞ3*÷b€í›ªaºü$ þ³ç—Ÿ}Žï´´Ä¥åh1i£Z’Ú¨^ɶe=Ðz`úôéuÑTRíëb.I´€sXZ#ýíz „ˆÙ_ƒ!Àç.P1V© ÔeêÔ,-ÉŽCÕÖXzZÚÅÔBé°ÌE~ø®ebçºëeÊX[ʈ3Ò°Hä˜þZB¿†gÂB˜l¸'þ›Â!––£Ô"y+åKˆiUљڔüÕë÷ôÖêÕÝ7ú® öç3Œ³ŸF˜p[Øaz¹äU –ÔU·Cÿ!;\Òw–Ù™Àa Öu€ØX3$°»0´—ë˜E:—XÀãСC¼À¼,)Ò_Ôh/T9=uì)À×ä ”ÛO÷`ˆ^`жòH¢pË-·¸g@/ñY»a ×hŽoºé&çÆKË+"AˆÜ\ßofYd=ÐÂz`É’%uœce·ÁOqÈ IDATëhó°´€Y´´óLÇuÓ«:¯›(‹E{ :¼n áóÛ 4$±·ÄÞ`¡ñh¹>ÎaÈpX©”­pFO{Qž>/×µŸP?·M9ý^ʵã4µ:Âw¹d ¹{MÐ~@•…Êw]ØY_Ëô5Nc€åÕb5»Eªº:èªò§‰ÞW×\¬ßÕãú>H׺X3=0³o (ïã9“m/4ô`û°Î÷A-2„ᄎÁ‘0²±óÎ;Ï…éB3ûÕ¯~µÁ1ٗ舲¦ zÚk¯½Öœ¢ kÂ[“Ñ&M¸YÕ²Èz a÷¡ûïzçÕ›b^ éhÉÆ FìÙ´6Kçæª°³ìG–@¢À- nœY‚…}4(WÂŒ¥­DÙ~™O«G4¨mL=-mÔF%_ÀóVÏQGh/âž&5žÁí VÏËv¥“ñæ_SHœ” æp·™i÷8Ft„®‹½™âù³²œ“X ºB üw±ŽEÃkÚZ@¥%K°2 ±ÓnÎã> õ@O{¼Ê'1óïõÙaì7&-´É8ž¨0«DŸX$‡!“¡](Æç1ö ÅÒ¾nºÞïôR‹Ôf’>Ÿ €„ÓØm8hP¹;)â?d´ÄÉn¸á^Ï8ã &ì±ÇË’(Dôcx“/- Õ-RY2…ÕÔÔ80  ÅÐÓâÖÜ-µÍýfõÏz Ô·ß~{ÐË­ÏBñh—Š!!kØIE„ÌZ ó€žI,tÕ€G˜¯³u¥T·ót¾ohôˆ[î v t´„¤¥’Fö°‘bŸˆÕÛÖ˜zZÚÅԢdz©l@#Ì´©NчZŠUÀ-l%–/Vm1šZÇ‚æ­=Tÿ¤ –pUf.œWžrí8ml-Û`õõÉ÷Ù1µ3α€c¤ ”ˆýšþ,W_.`'LàÆôÍPä!«õÛãþr8Ÿ]{HK9ó•H°^ä) 3xV΀7è÷ÔJǤÏĴ/T&9Øyäv|õ·}°µï«¾Ë´`8¡óöæ³Îr ñ”)S‚+¯¼2`ªdܽS>”ëO¿;m¨^~0bÕ.vŸvþ€jìîÎ{£·8¦V`-Î뺳²’˜1ªÔ!©“@ÔÂ`k¿¯i{ØÚ*ý^“–‘¯n´ÏRôÂx &u¶t®çèþ{s ;ø¥N¤¹å¾§]$Tà>p¹—HÞÖqs`çkÛA®GKVÔSi#mîouÿ)¹™ÅºHcÛUÏÑÒåR'B» 80X®6¼üòË.‰BsvçžÈ¢‘eÍ‹ õ / ¾öµ¯¹XÂÈI.ºè¢OÔî1,ím·ÝæÀoäAÍhcü¯º5"«jÖYÔ÷Œ ñhMG{¬¦üóYÃúˆÉ—5,îüYÒÌÁÐî’™²ò8ï49¥‘\Ï7iÚú1CD&‡‹²sJYÃÒžÞ@ç0¦æ#Œýјñi­ÿ× YÊßUz˜¾f»³¦­× ”FÒMÊvòõËGÒ Pû†@¯ïHÆ>¶¥Q‹dÁ@%e„m”îá,µå]íØáÿ>ªþ»1«0‹ö9úÈø­ÆÖž( g 9þè†{Hž`ш|ÀËÎj€S‹M x=B`–ºë7v‘Šà~áF" îao±·hq‰9ÛG/~0¸Üƒ}Ù`Ž~£DFé¨2Æ `ž¬{´X¶‡˜?ÎçsWæ9ú{svn–¨a- CÚ°‘úèüEzÉ=A@šzã6Zõ:í·¿-\ÈntDýéO‡M>²{”¢]²$&Íž¥¥­¨-tdzýY4“€¥½ô‹_ h@0mG±GqfYÃN)‚Q{W0׈ÍúTÐwm{? ’ShÏÐàø†¯©bµDL&pT€û’p˜å1*³Ò†¶pb‘LU1u[. 4Y@eWÀé-yªEX¨|`±PµÆTÌøŽ«v“ûÔð?§§ÍóŒ7yXðp›÷Æsƒ5ã,ý=ºI {¶ê°®7xÈ'IyüŸþ)86H —ßR¾ó[3 ‹VÖgdÿú׿ùË_œÝäÉ“ƒ!ê³$ûdFŽw-ÐÒæ Ô&¹óÙ1Y4“` ñ}ª½5íS`PL›5Ìï¢LÔTÃilƒ˜3,°œ¬Bi€Ÿ«?âpÇh@&F9iH0¿^$?€¥ý‡"B•ùå$ù¼Tà=mcÙ‹ E²cÅÔќĘö_ ý$rô–ëõÜá`sÈôwZsÎe*ËŒ¤Bµî+liT<®fníü|kÇî«#tg8†k ň|ÐÙ oå6&üG8æTž¸­uÒ°`C—1ÕœËw^Ð'¯…5GKÙU ölµëvýæNÕyöuÔok¥Žë1`@@“wõ² €=LÛȵk½'F–ûФÜ5Ÿ€[zl¢ŽŸ&0ý ^ê`„aõ©ãÞ’:˜Ã‘†ªŽ¯éåüÐN†®-ì¿03fL0a„àŸð_{íµàÑG n¾ùæ FN_—_~ùö>LÚ ¤Ä½æšk\œÚ¤ç4õã2PÛÔïPV¿¬ôqi/ùÜç‚}5(~¨kdöµØ¬aT@;FIK9l–˜ 3Bºßj•Íâ\€)ƒ›àíàP º8 UÚf©ï“¥ÝzZbÔ2 ý†¤.è-•€m'ùÍwæà•¦¿@õ@­ hsåkr€¶CkçX¦ë¦1Çî&`V;žÖ3¸F…ç‹ bÌ´‹|P;S`ñWjË{êß~)ÛdíÌÒÿÔ ]+Ó÷íõ[áUÁ²† ÔuÚjy\ìêQÚO†õ"²\ZØåćèeõ“j·Y€–2÷ÑqÈ ¸ïå„Ľ1§óÓ±/¨‡èsØ` q äÅÐMT~ ¶@ {|”ÀõFÕe†–#¼Ù•Ý­Ídé§'Ÿ|2øÿø×_Ç|pþùç³9µ¡£8qb0vìØo’©Kiz'd ¶éÝ“¬FY¤î"ô[÷¦ŒB:ÚíYÃ48¥µU1oi ù‚ôwå°g8ù‹ŠÌ ÎÂw¶Øû5eºŸÍB÷m ®H¾]¦úÆÕ‘í¾ˆzpZ#\Ëê±+ô´0µ­ÅcÊ´•‚ &4­„Ã)tù›“H$Wâ ø  œV»ËuLâP¨Ž¸;=¥¶ !3®Ï‚ü i¹Qeѧ{«½j¹8¨¥ïý~ƒÑ¶— î l*ÎVfÇóô‚7U`ñ=ݳ{ô;êÕu½\rñf9‡ˆ ´“x¦8Ž!ˆ²3Tîݯ>¨ýH/®„wã^¢· È°úX­îåó‚„C“±¾Çkÿ Ô]m ®YK¶…€,¬8!¹žzê)¥ ÄÀúÍ_Ã’#eÀ9ì_¸%ÙŽ'¥%µ*kKÖ»Qˆá¨›®,whÐ m>í* *hi'`rãºhd+—!=8'…,À.×]ç+Zò\ØÝÓJ`ÏÒ´s¶í'4›Ušs‹=vWèißQ¤À€Paú`Áâ0•Vï Óéƒ3W €–ʵ@ ÜÆÿ9ýhJžz»º£¤èO#tý¿ç$QGÎ o2Ÿ¥´ÖO~™´óLmøµúϱµºv|¢ÃxÑÒ¦ZÖ°—Õ¿³Å†.Ñïw³Ên£v ц鹦@ (F{‹\€P]º-ª~Ãt?ÚèwI2…CõB ˜¥½]$ͤ°Q¾¸´hrý„vÌñ:çq]ó¬2þͱ²wõ jY’Zzè¡ÁÉ'Ÿì¤V7“p¢¦H‰•å¯È8‡‰O÷ù…4ÑϨm¢7&«VÖI{`êÔ©Áß”62‰ŽvÀWD÷”@€º ¯~ØÑrØ#$;k¨c°»ÆðF\˜ÓÎÔWÇ5†=!ÀðŽujl=-¡»ÞW;ÛéžuàX§g@£8O¥eQaMj}ÃÔ6€#D< 0m:Zj>€Åyaã|sî ï Ÿ¨ëÏÔ5⌲țÓè`£Êƒéí¢g•HªÜ¤l­éêoXYØsëŸ%ú.ÒËÀ Õoƒ~kˆoºª-‡ªìý&¿wêy=%BÿŠä‰ml< FÌÓ$6Yýq‡@ó>ÒçöRù°¼¾ÁÊR&`Ž»‡Côwj‘–çÇz¿ãæÊÖFYâïâôåˆ $¥H ü2íó¬Y³œ„äÔSOmq€–6f Öît¶Îz ™öÀøñãƒ?ýñÁÒ§å3m Ëp*²T¸d+—½&†èóE2Æá:D\d¨-. 6@þ!aÕZWÂãÕW}ËÒX†ž6*«W¥®OاeêËMj#/#ëõ½»fÌQŠë¢qp†©iz;ŠA¥lÀF<ÔåîÓŽÿ8')@µ³¨Wˆ²cü5N\ äMP›Âf!¼Ò¦Ç —Ãw“/œ.@ø_jwZ¶ö-óªîËû³›UW˜Ø^ú^#`;JûV)š†>¶£Žq=N ø)=»Õ°ÅÑ @KRYïk ü—_1e†Ï™­ùéôúhà<Ø›¶\­k¿¬Á•¸µÈÌ9ª‘MÍÒó„ÓØ[êw†5f/ê×XzZØÐNÐFâ)¿F÷nO½tÎõÀ§`T€É †•íIkëéŸb:ë«%(ÌdÿE1ÂùN=Fm}Iõ‹2«³‹|¤…ËBba 7àô-Ä“õÙZ>¿¢ãH °NûéínêóaêçƒT¿¾z©Z&@ І‰µ¬a€Id#¼€@ Ðêtg´¶öHý¸gȈS‹#€6ÎÖzÎ_H8Öœ¿ìœ“UÆCú­uÓ /E½ÚEhÜ›ƒ $Ï<óŒÓÉÒ~Âo‘Õ+ÜßÖ7•”Ø5ü51iÛ—]vÙŽª@ ùœÚr#³fì~= ,u_¿ôÒ`? f4­ÐÀTÑ ¥d #a,íéeÔŠÞ#pTÉðZèk™–І VöhÉ/X̉IzUçÌÓ€~—ÀÛ_4=ÚV`Vz¸|bçæ“-lá¸Ð«•]Éucéi È¿\ áœ6 lQßí™cTG»@½ įƚÀÊ´°Iú Žq,YÜýXµ4t¡i-Iâ¿L®‹áYý>¡çÊ7˜I«SõÅšci½ó‰+`½[`•AÚ±#uÜ-殹T/p8ˆ! ´Ïîõqa½t¿¬ƒXÃ6N}øˆîëAºÞ^bv‰nÛJh­(ãg•~#È8pþ´ñòeû ˜ßÏßÕë„\…¨ã’lkŠ2„( {©þ&ÇÙÆÄõ%™Ã®ºêª€H9-Ù2PÛ’ïnֶݰ´kÆÆˆAݨæ-ϰ•’5Œ²´8†› 7\Ÿ%°¥—V’¥dÆ ÈáúðÀÊ2)7U˶Õ¯È^Òz†@`ªƒf´¹8¶™la•ú=íEeb±¹vk,=- €¶³€,À €Y§öò´€(c+ýz³ F4©‡DðÁ¡Mï[9ÀÆwµôPrìn Öœ»¬Ì$ëþ|DAøDè`@-ÎYiä ~ï¨KTî"­WèZ¯>66šÁy‹–ÃÕÇ>ˆõÏ·ÏZŒ‰¾úmY";@G‰õÔÌ1k}Éø³GHnð‚úòp}Ç, ¤â¡O„ž®ú­ô 9ùåroˆGK´„ÓÄÎÞ¥ï'©¥ZS!¤²´¹1%Q}LLÚQ£Fµ¸˜´QmÍ@mT¯dÛ²hâ=0}út—l¡Žq„©…¹Û¢A­­7x“vb‘,ër ”h9©ŒÎajèÇrwór¢5#RJÂõ@²O¶0MýÊMd´Á÷é{ÞýÄXu×÷JzZâwæ3À ì ‹)hÂ_¡ý$A‚Z”a”t×41€‡(€‘€O@#›æ¸„}°¯IzÁÊZœÛç P2 &-Æg¾¿Ê7ðÖàø<_.âþ,ê'@[7bóª…"ÌÕïr™úðm­?VýÖé7U«þäj¯ö!xé«òT? ÑoÚ çOUö:g¬lTÓ¸7€jîY¹Œa…Éæ¥„¨hi™ú÷ú® ö¶îóc½§*Ò³¾‘Æ©}M,âp9þ±|¶$ HU,]ëCú}Ü£—ÃOåþ^…ÏIúÂëz¶;iigΜ°Æäcd­=-1°ëúkœ÷¦OŸL›6-øÁ~àïj‘Ÿ+ÿ×·Ev[Ö¨¬vmÀÒ®°á±%{è>ºZKû˜#"ì£A­#&íÑe –w\‰[¾¶<¯s|Ê“-üFìÕ±ºÞ‡$O«¿¶ `Àê:°"ÐEËÞ½´”z¨€BGmÔçeÈ"^aºyûT¿>›ÕµâsýwþªP»õaž¥átµ´£Ù¿Ì :<˜ÿúëŽÙÌ|,¦°J¨´­ª  2›~§$–…åB#já¥v\%ú`3ÌÊÚ‘2Ó¬ú±j ;wŽ^à‹aUq«b°ô%®,õ}pdžäU•ÿú`± þf­Qóï¥e¬–õûìξ½£{ííCÜÃuîŸt`¾T½ïj‰ATˆIËKgKIÕæ ÔFõJ¶-ë&Ü7ß|s°BƒÃá!Y@1-ïi Ø.ÖàUlÖ0Rá’há+e‡¤Ã…QFÎzÜ+ŸÐ.}––mP€'áºÀÀúÎ_ÄÙ=Cí¹NÏx>pjõX)ŒÜ€˜¶IÃtâëaý~JµÔ¡‚¥§e4i™½’°Ò\Û—З“'OÞ®fS0íé§ŸÞ¢cÒFõsj£z%Û–õ@í©S§¼Þ"´fpÖ€VLÖ0šLLZØ("”ËH‡ÛFõ²”¶å*×/‡0^dŠ ãåWè3à F gÀ+`ñ„9¦°¶Õ¶`[ÕÆàÃ6õSÎÝ·Š·TÛŠRDê£t¤:†oÛmíÖ 8Xõ¿,ëBÆånrÇꉺ•r4u[+h¦u«ºÖÁŸf÷c{ü†Õb«\ö(ÊܤkoÐ3°©ª­Ö­ÄkŸêˆÃ`ˆ9ÆŒO­Ô.ñ nÓí(mÔ;èq{1´=$9è”kûÚŽ&8Â.×þ-´?gëø6ú´o“öÑö$Á€†Í\Ì6ˆì¨ýôÜ1•_å8ìÍ9f.ØNÕ²Vu­Õ±®›ôÝJ”vÓðdÁ=jPîó6ÝÓ¾*¯«êÖQç²?Ê–ê8ô¨aé)lªžÈâ8áüK5( qïˆßõ@] ñÅ;ºî}6ãù„3g,¶óì"1àÞ°Öý¬IDp«®®vì*Û‘v„{²}# IDAT¿«]3€‘ DÚnØY€ïÐaÃR'µÑê÷iª3qqÒ F©v´ÊH*Cˆ²Ä‘M d©kS”Dõ!:i¢4\{íµ;˜¨[à¶ Ô¶À›š5©eö€²öÔ}ý’K\‚¤QÖ_@„0_Å1iq;;ä%]LYþ9åL‡ë—놥=^mOb&€å0ð³MHÀøÜRµÎȪº¶õU`Z%PÙª®cðf'yvË᪶­4°°­UÖ†lZMñ·ÞÜ1ØÒqm}µ¥µ:¿VãL †)W'o_×W¢þ÷ÿöaIõÓçͪËÀÍ‚Îu[tºÀrkXGöQ-T£aU¼Âê?RFíziB;n6µ–ÔaSW^µO ”È©/øLÍë'—¥¥Õóqž î&}æjíÄîµÖg³Ú ÷¥È'jŽju|k±ÆXG*2ƒM[t,Óü›ˆ»ê0áïíƒY§{T?Q3´çD-­®zij2Xl¿>ÆÚºßœÃKV1Fv±wÕ6@- ²s`K j°¾®×¤ù2lW?>ªó.R_˜/–ÔXUÊ…‘E—Kä ˜Y€+l2`¹,<°è8•ù ¯•;A÷ýFýž¢@-1oI¢Àu-Ê‚—tý½ÀܪòËjG$/Ò³'C(¥]MUb×ç°´J²ÐâcÒFµ?µQ½’mËz  öÀTXZM ™ÆWúGÚž¼OŠõ9:Âa#_³fi°"n¹bÒr­¿ 8î¡´ép­-„ñ"£W8Œ¬+Œ’ÉjÖb€W…ü`]}àZ6«‚¶µJΫuU[ή:?\ßo×;8vÃnõÓâV—ª­Áubl·~œ´n[ÕæØ¬íXª¾ˆVñYå ”Ö¶¥þ(è¡ç»s™Ýâ÷×½;Õ3{3uûêä=Äïì’ä—ºógXwPî|Dþ-0¾wjAŠæ˜HLÿ—bNz vóËD‚0SϸÏõ‡þ´?`”ÁR¥ß·‹Žáå à˺½8‰ò±“}t.líßõ,À¬bÌ\ŒiëСC­E­«UvgÝÓ?ªÌs¾ˆæ»2„Ÿ à[4êºFª$ X[Sã¤iY®×$Qý2}úô`ðàÁAMMÍö¿6QǵÔm¨m©w6kW‹êý¡®»D9»Ûk0èžh \,0r”ؘnÀžÑ Kƒ¤ÑÞÕà\ÎT¸Ôt¸‹Ä]rh ×»”ï8f=¢Áz”Ö¤Œ’ l­ZŸ®­5Y/0'€àÔ²Ö&¿Z×j*[Ì'ŽS9€W/%…Õ¹2–­£ÖxuÇ3ŒÀžªŒÚ6ým6H Ûns°­}q º_w[w•“î²@@׃ñÛë4Ÿ9`ÍÚ³\UÉ\]‰Ž æSÏ€ÀBwyglÿsk\a=Ã=cÀ 0¬ÛV ` ð…ÕIoŒ¦7ʶIÜZ`šëS¬¥µb/ø×@~@ä×vµçÏ–þ±I?[Yùd \—vÏÓµèe‚™?k˜“Ìè÷œ€tµL=dMŠ€ü€íÆêª,ííbÂG©ÐH¸^gùrØ×õòüŸ¢‹õ7¢o÷ѯQ^ŽP»§«¼árÚƒAFLX± K €x¿,>7‰A¸Þ|çe –ö¶ÛnÛ-bÒFõAú¿ Q¥dÛ²Èz ¢=0–V€cP ³Á´jW Zl¼XÚ‡5uÐ@—D_ K;)%³[¨Áè,‰ ºið/Õœ1¼´ù øB7ˆ~s‘´j¡‚ÔZqÎXè´!€uu`Ul+Ž\Žq…yͱ®QuƒÍ,VÕŠy$ò=_Ô€9`ÓFFég[  oƒa­G‘;·­ƒb¹nPd\"D™]£*P©»Ë×Üu¨+ºuU$%Øø(ª-Pëñ«Àt;E4h]ï¸æê#˜µ“G„.Üj«R¼®í ´°@SÒÀ€…î ¾ÓWf:ti¹V ´Š¾ÏY’Xµ”ÓFqù °¶yËæ cëNj°LJù\ó±¡þõø)¿ê²\Ë>b=ë}þºûåF}ví×ï6ÎQÌΙ °?]}uš^Vý¬aÈž0ÐÈKr€¬†>ã~²-­ÁÔî©rWYÌ€øºÝ´eÅO4„ôÌ}^uLkYG༉Cã¾ú»¸X/Fµ}sZ`¦Nïÿœ}v¢â››Ä ªQĤýêW¿Š# vK+í׸[vYÖ謿ÆüUoßD=ˆ²wòF†ïx±¶h°#ôPÿ˜ó( í ýbà¨ëÚF:Ü÷5 üKaÁW¦;Y3è;8G&`ºUv=ëúNç.Áà «‚vÛö¨«°¬šµU¦uͱš1®ªE*P\©¼æ˜MˆÌz@pë*ý¬Pn°¤ÃÞÁ¸Í˃­?Š)uÇfÀ*KmÛ-AëMT×`nÌÉ]Ë‘»^ýçµ>\ÀTÓùíö †Ô­ ¶öÄU«4«k³5ºÿÐ`þüùA=Lû[謸’ÑÚÚ ±m«¢`ÙÐnŠU €lÝ&ÿ‹àØeÓsÚN•ÃÁ,­Œ€çªP}ãÚío¨/‹BG«NIA²~ø3™Þп"'Èg#ô0éÀ׳";àIÁZÞuúÍÀf¹>¿7~{#Uæó*ç¸"@g¾vØ>ØàG¾çHæ0&Áßž0¥prCN!Iù…þ–õÖ½!)Ãóê‡Ã HCš«ÄÀ58ô3UÌœwÞy¹?.¡v“¯ö÷i7inÖ̬š_Üzë­u߾⊠_Ì ÷±!Øš¾!àÚYØ‘75Œ-1k‰Š6RáÛö E°9á²üïiÒáò‡Ö±°ä9˜“ ¬— H+(Ç-ÏZ1’‹;v Ž_±RLéF-DPÝÙò±®õ$¨%Ì-`¸­<Çõ0g[¨ûomh–V êA¬ˆØŠ0¶Æ´ØZ\ª»×Ja›tíµÕ*Î#¼gµªà€¾9@Ë´7ÚÐ%z𾯊xNìj„ɲ§iA!v øÍ7íݺK˵[W « nçµB׿Xßµi°¾}&Ád°¡ù$v|¡5 §³$Ö^@sŽÀÜI¹ƒ™±øH³1´k³~Ëô·Ÿ=,I™þ1L_hq.;R37/ˆ }Mõ; Ï3៟öó™ú›v—˜Ö8PK–2Úø±Ú#²áëM°'ÀÖ-1ýÚœ%á6Û÷?ýéOÁ5×\³[Ťµ¶ûëd¿$ÿŒìsÖY4j÷Æÿú/—A,êÂoëþ¹ëáýÈ"<²bEp’€-¬­oènó}ü}Å~ž¯Á~½D\:\©U’;¬eú– €GœWK®ï„®’x@àKžïp Äʱ‰„Ú誶¤ížÁ^[‰¥º:h¥(UŠÁZµU<S÷:OnǦõ¬«€«+k““dS™€à¼¶½\âƒ6ërZÚzTÌ¥\(¿¶³€9eK§ëXÖÜEZmÑtÿºŽAm§âµµÄ©T[¨@… HE_[ßnUd[î3×u g«+b -‰"x©À¹ §/Ǫ&0Q`´V‘Zy¡ ê™ÚhÉ…Õ¨KËqØ-[ëû^ªÿ»jOZPË‹õ)Õ ÔÞ!°´IÏyR©†Mêáƒkbù¶ ½úÇó§G~7“ÅL>¢Ï'éxÊÁ °—‘¦˜²èS¤öB$„GÔÎJZÊ„<$ zBŽU5 ëÌg€ì^šuê”cd]ƒcþ#,íBõÇH½¬aÓEÔüøÇîsK¸†„þûóŸÿLœ81;v,‰vkË@ín}û³Æ7õè¿îë—^ôai7ê÷14óèaap×鸧ä°5#kÎ6åL…KÙO°2øb&$Ë”¤€“Á«÷ö¯Ïˆ…fl•¢Z\¦,±¦D&¨wÜò™;Ýý·¸m÷`ôÇkƒ6J"“KêWÌWM­»p[€Ë<¬«;!ô¬kb]­ˆ÷zu Æêšu …U«::àš×µ%ƒ—@ߦvA]û†QœÓÀTá¾Ðº:0Jè/¾³]¶°}§ JòÃ6+= ¢ ab~M¦ ±«Wm{1ÂTVXÛlx×ÃC €P‘‰Šû¿Ý;6¼FÙ S˽4à>Æÿh&ŒT>KTŽžS4µ“ôÔ#-¨°û™Ñ(«#|Œé õ]¿`4Iù¼ÔåÇxò“±öt¸€ßzÄ`T9 D'°pÐãâ¬(;½Ðý»O¿ßEj+Q *aŸh½QŒð='>%äX§òp}ˆ;WåLT™íôòñLúžzê)—t¢)&J·#Í÷ÅÊd8oÞ¼`Ú´iö× Íé-îØÊ<¥-®›²e=°kz–v½þH÷­D<¨Nà‘ÁôÁвî&Ýäj=N·š§4À$ ®^O[˜õtÀYÏZ>K¢Km«auëêyo¶Å±ûÖaùJß±ŸäZ;ΈþÈÜG/‹šªÕ¥3°¶qõBš€æ¶“À³Å”íªãÿ ÇCTcV‹©ŽËÄÎa˜’(øì±_Þí,V (–Óhìóµ6öoêÏ³Š²Ôi“ž‡¿éo!v¡žå›Ufo•7Påspù¿ÿûö>t6ƒÿƒÐO¼ÐÄ€ç0Ú¸Cv«í¨Ý­nwÖØæÔ°´—|îs±²ÚBlÚÓêa{J¨/õĤ-Å`¾0VJÚ€æ Fd¶þøŽZ£›Ö Œ‰ý“M+Q @‚¸ n«ÓY…”ÀGu;jÓJ\H \²DµÈC÷Úzc°hÎAõ¶•;9k¹0Z]ÖmÖ)ÀþÇ]ƒm׋ùÌI$ Hr—4]+€‘r ë•O’ðfUµbã¹£¶õŸ`Xxe†Õšþ‚MUÛ[mi%*µŽg€V;(\bÃïË'÷ ¤§Mx|ƒ³UŸáÝu -Œ¬Þ6˜áöRô2cj 1µd#³ |{%Z[8d` œÏ’0®hWí©« #“XZ£måpÙŽ$ oªmq`4iÝx¡ ¼8¶@ƒÞÙ>p¦^bI^0Zçõïß?饇ԀßnÉÂX½ø<&f~™ú¯w‰ †ŸˆD.À³ÔákÎß×ߥպVÚ a ÔG  ¦2ÑBx³CÔ¶gÅò’±w.¤à‚_ü"èqÕUîºMù?’cÀ*ãøÕQ/3'Ÿ|r,¨®˜´ÞSO=5ý¢)wB uË@m —šõ@%{ ¦¦ÆÅZ´õG»A úB_ûÌF’Ñ1’†¸"¬Õ`Ç0 ÆºH˲¨[O—Ij•ßJÎ\òˆP‹*‡®ºÖèLãÁcM·µ¦¬žè>ohh·á¼å±®Zµ V·î±iIêæØWÊ2ðÚfCçzÐ(­«Ïº6<¹ð·Ešû% ]µ)'O€}uÀU•u »¾ÎN’ÐN ¹£®'ëÀ³W|ÕGÊ­µ¡mP»G:míÇšøäÔRÐèg]ÑÛ¨ ]k¤ X/0Ÿ)nÂ<±„ß-`ÖE Ð cÃI¬mÛüÞú”SÏÔæ×ÔæË¤euñµ°ûicü«…±óºÔÄ V"ŒooÑ'ÕŸ¥ýÍŠbIì@¿q@Ÿz÷â÷'ðÖQ`ÆÒß&­@@ ˜L“DÁØÚO§ü›A½¢€l?ÅEöâ!¾î8MâËähŒÛ ÌÎW|^žóazV |µ¶û¯îÏ ÔÖ-N‡³fÍ ž~úidÇŒã¶!- òM”qŽÅ¤½îºë¢Ù-·e v·¼íY£›z<ÿüóuçŸu–ciÿ?{o&ÇUž ½÷ô2=»fFÛh´Û²…ä ˆÁ¾8àäIH„' ùNnøùo‚!Á„,pÉ ü$7 Æ$'‰Mò_!ŒlKXÞ´k´ÌHš}éž^¦—ÿ}O÷™©®©ê®žî‘d«?{Ô[Õ©S§««ÞzÏû½ß²ÊN¥Îëb µîKÍpñøè\ÉÖZij xbGM¶Zd ÊV‹¬fÑ– ]^€Ñ‰`X®Ÿ… <¡kYÿÀ¼z²Xðd¥”@B‚^Z_åü•ÙÈSþNÙ˜Áú`D)I 3Zbs€̇ÀC–à™ððÌÅŠS“Ëúb÷²¯è#±ã=~¹f ÀÜ.©Äº¨[ àûì»y³žy°Ð)€þ @¤%JL@Jpš%£Êçh™5¨ô4 ˜Ãe]¢vÖ…·J3K¡k€ºX¼Öïù‹Ÿm‘ë}îùçÈ$ˆ$˜ê(Ò`ŠŒ¡ ¸PV ªc×àÇG5oYÝ™a‚fÅë7 Æ÷™hfô¹5,†q'C¼€Ä@î¬È4þ–j™©·*þcf‘+.\áCî{7þf1Žô¡(‡fV´øˆzcãþëEø>A ‹Ru®´ë¢L„ez¿‹Ïô UÉR̦Á”Pš+Š‘Ý4nÇÜÙÚÿ@œ²µN¬q;7äÒâë{ø» `´RÌâx";ëÅãOà1}óà\FæZßÜŒïØß+â•¶ÝÈÏŒ¬ìž={„•ÏèAL0û©O}JþðÿÐvst;øyä¹’=i­§ j­F¥ù^s.ñ<üðÃ2–æf›j\æb N»; 0óC$…üÚÆ…“Uxã"B„4.¬Ï‹)§§*¡ ¼XL«»@kÑR‹Ø‰,*T&t‹®>+1לÊ{SÔ®RËJ à˜ë‚…¥dÀI°÷‚_FÂ1¹€\,,Á%5µ(p`dsu{¹Ö¸x¦[ñ•\[¹ —q¸*pL`Y¯zv_dî(X×Óa°È@—¹Þ•ùÃÀÒýÀ•%p¥þwº4ÑJ€Ší¸ü¼QÀöˆÙL]°ÿÒ5îÂØQƶնýmòjÅ”„Æ™{N—Ð2 GZŽƒššÇÔ2ß+Vvjy0UK…5ºè%Uñ´aŒJ^µ£F•Ñe{d˜,FPË-p$œ‚Zî_½RöA¦–:×üFFªMû[\Êþ_#cLy•¿#Ê-ŒUÃØ"=iùÛ| ~¯Ÿ`s¬´¬G@k j6©Õ­hõòdkŸÆ9ãN ÿJ€¬n[?þ4è¿á¼W ÔRnð ,³ç©ù­èÿzÜ ™c7nÞ¿þ&ð±,¯ŽKÍÖrÌÉÈÈê¦ù–Äó‚ú¬øzçÎJ7ÉjR êh E@kœÎ×Ûà£bkØì>×ËVû\/ÇG2‘v^µšU3.o÷œe|™XÅ ä.ª2Õ˪ÿ4JOË øÓþ¬¿££˜ƒU·n¿ó̬)eôž]ÆŽû¬ƒÀ”û¯\ ð»Íâ7[É•€€™ëpß7m*›î§ãA<‰uò™ÞF¥Ç×`›÷á&˜m¥~‘9¦ce ü.[Á–²‚ÇÛJ‚_ `ÿï21¬Üobû§Ðð«[!¡áX®;ÑÞ÷þßhÄ+­ÛèÏD©•% kdeÍÛùö·¿­Þºé¦›Ì-¾få°ûï¿_H~4£|š ¶|<š¯š#pÉG€wé,‰{.:V1…:§‹ÍŬ–5¾GW‚“¸]‡üñ'”O,q/ Qœ Ná‚4ÞÒ.ëaYÕ–öˆ€Œà6çKªGÝ–7‚| (^üeáZðbû AcÙÇDlÀYJJàOc]€DM}ê,É–Aì’”€¬%p.l,ã´¯SnÎW´î€5­±T¡tÿs¿»Ü àN@ìuйÝi È-BvMeÐGêYùX’(‰§ýÙ&Ák,+ f­¶C:Ñ"…Ú)R`-dÑQ#hås,{¾5*­gäF9¾Ø“ÚðHÌŒKÍíà}Þ çåšž›dàm²=d9+Z%?èUÅì‚ß™ÚZÀ(e YVáÄ£V¯çõúCÊ×õm\£?¬òH@dd¦«,^ñcÅvÔîÀ çãµõÇÝ8–”PöC°IÝ«%;ãÊ›ͪþÀåWlßkXN/o,¢`®¹³¼±YIÐ>ÀyfuŒ@v,ðJ¬¹¿„ýùßÊ›(.‹.œÅ¾ïÃñÉ›üŸÁù+ìÐ[ûzŒ×±¾9.[«YYêe)+ +{Í5öG-—çùÿCú¹Ë‹¯ùù­·ÞÚô¤]‘ò'MP[>ÍW͸ä#À‹YXÔX«ÁIڮ؂Õò|S/â¯÷Ó:ÄBy”~͹0͉$/?Ùí“(ˆh‘c±NiÏ$dƒ9«Ô8«w©ÉiØk%ÝQ™÷å£#’ BK[ƒ”@éa)I ÛÈ ˆ¥3 ¬¤£ØV0V ²ÓduÓ±*qŠ:]|†&Ùòp7`Û.$h¹“~É·/¿ÈZ[|JÉ€@20‘øŒ¹¤ë A;*ÿB|4€W2¾V!s›Â¾’aåkØ<úV8F‹æºÜ&Ó)ЊçÜßÇëq/Êãæã’P–—`Z1ÎØ ;õ¿|;·_%Ú{4Š¢œ.çÔðHNìV=%ÎÏ9µnü¤™Ó*ŠšØÒ÷YZÀ냂 P®E ÀdÉ«–< ³o±Ø ‚G»}·Ú»÷’G7Æh Æês·õ%Æd/~O¹kL Sɰ¡ÅͰ}˃븒q7Q[O0K–w%A My n¶?·Œ=8?5ÈûD¸cü0¶·笳ØVQ»Û¤¤ – ýYÇ본YØõ/VÄ~ÿûßWþ¿deû·Û+N{.8,[öÀBwò–þâ¿(÷ÝwßÅÚ—Õvš öeõu5;ûJ&ˆ}'À¥âæýuRlA¯C KÝ/FŒQ\Œ¶ÎM4ÈRZà`#ÒŒlØ=+»æ.È™–^y6ºE֥ƤsIYLîZõ§XžSöy°°ÇÛ:dC½ðŸ'‰é}&zAßjO†ÌiÑZ‹à‹ “Sþ¬®¥À'™Ó*qÖÝ&Ûr“Še&pÝ€çþ ÈGuüÖ ¬€­ØU÷xTò]ê]©§%(Àvi ¦•ÀòH4RtX‡d3²¯VÁuV`å#@'¥ü‹J^PL.n"f•¼rˆ|cÅu1&|¯X¬øÚ×ð§{½²cØ–ïU Êã÷¨BX0t3P,+ÀÖ@ ¿sNsz» åîô¹ V¨¸¼]pï£è^M +˜ÚLÚü±ïNÃã)&œqù.ôa_¹Ó N¸…xƒ€M+Æ”Ûîǘ0íÃc­¡¥šAÖUÃ6mÚTÖÔH¸,õ°ÆñZ‹±ó°XìñF†¿y²°šÍ= 7‚Ùµ&-mÙl^‰¥UŸfdc8žXÙëFôål÷ö¦ÍfÊÞÎã{â9ëµ8~ÿç«8Î`[ÿ 1÷w%±ëþŽi3¨m4[KYµ²´dcYá«+kÞ—}ûö©ßÞÞ½{åfÒøúðáÃjüyóÃã„™,.ˆÚ8ó_¡¯› öúÅ6wëå9¼ˆ„TÚmX…SпÚ[ ¦,ÛÑAFvÞïÅÌtVZ²å@–€Öë“ç¥ÛÝ"g‚½2åé͸Èx±>Ý òþ¢tÒ•”Û/[2'e†­ž4ØÐx¬È8¨iYÅB¥ÊæJÑ©æ­Z¿vCχ% ʆq=&ˆ ¼’ÕµÒÀZ¶@[À:®449Ên IDATdppÏ" £$((É€W È%£ñ€¼¡eËÒ‘q%P%xÍ”•K5€¹²ðˆ%cÍÄ/„*îfµœ'€|Ç¿ø=íâ@%X!CG;">çŸ~Î6¾€ æ[P¾´RMcB§° j2x$@íÈ©ÆR*P‹‹&/n•bzrJÖÇèë,€íäNì¼ôV|(¸¡q,Ógð8îS-¬°]ÚÅÖSíµ'pCзÀ¥œ°>ƒÏÇ‘ÀIÏQ#sKÙÁ$ÞçöŒrÝ¿Ÿ$`Ã2€W®Gv–à‡ÇÁ,õ­µ,5²´î ÃçµL?A²L¿}¡¶–\ J ¦Ð&·ı{Œrç³yŒÏ/ÔXUÌܧAüÖ Oá؈ç &Õ2áëû`eùû£¼àcû˜m‚—ݶÙYÚ÷¿ÿýò|@É…ºêy€»=zT}·¿ø‹¿È„¿& µH¼ßØo¸Â†š5G 9•G'ôÂÝwÞ)ƒ9®™ÅÅóNœ{ Sˆ•€l¾$- #;­ìšDJY>e½`jYøÀ"ŒŒ¬ ôªù 9i‘8Á®Y˜”ué¥ôœ³Ù’†ÇT)˜¦h,`9M ›‹Æ-¥z«G­‡]d-q ?‹Êvl;G†•úQ'AV6…éJ¥}E#°… ö» À~& …Aì ^« Pp‡ÛBÎë–Þ¾†•Á9Á­f_aé%a¼&h%³J{1€V7˜d¾Ç‹u¡(’þXÊV­6m~o?.xÕ8*^PiDF/PÀD& hG‚Z&t11ÉN*À~q´BhÛrŒýµ²î" ¶kÓÊÎÊØžñy €18a¬ÁßaõÌÙ?Ü>o$ê øuùÖí¯»ZBß@Èêqdb˜±j˜n–zÔCoÙ¼Y¿Uö¸@ð€Ù€a‚Þã8:fÍloÙJ¦V@¶çÝ7Óâê%-¾~ˆ&ÚpÕ3`– fÕ÷ñ1»Ïbva7öùíÐÎ>°«µµõlçfô÷9Œ·Ô®”­5Zq‘½çmcŒZûJ@Kf—àxppPȰ“±f›·ß~»²ö¢uׂ.»à·Ø†åj W¶ß¨Èå@)‚õm™õV´fØúSçïRÆÀЬ/™Ú/¯pßèN@àÈïÏ\5ŒÛ ì€À— Fæ ¥v–@¶}x¯ím®ÂæëvVdõº|¤½×ŸcÖh% VK (‘a™æ$Àì 8FNal¯Å¾üw¸KÇXÞcð&›s¢±O•žÓUÁÊÞ«Ò:æÏø›2H +[Év˼¾Ýkº"$¿ôÒKê7L ûž÷¼GöîÝ«>ø ² ²Ú0™Œ!JÀèüz+Š*Ù ò†È潃^ #;çïèbQ È—åsLñ7¥F$ŽJ^§}˜÷Ê6\HÝ ( М /×Ñò=w²E@ÈQ;‹åèH@³ÈÂ%‘ý¤ž²VE †¥]6*WÒò^¹Ðéª dIb)!€§,™ØB ™…U’ÒùâiÏu¢uIÏKÙ}w¹>Bë[G|-rëÜ´xRa°˜u`åT/5[޳ƾ:Š‹ú\”­‚•Ýx3DàÈ©b2´ °[L s hÙ®fùœŒf%¯ÚZô´lá®–¶^+Y·ØBñ_²–$‹­Grb- ¶Q…4S«Ç¶½¾¦pC¡Ÿû[é9A-A™JsÕ0²ì”ðÆÈ(;ày€`–ëR'{úÔ)ù16LÑw@ójü~gqþà¶Il5FÖ®½vo›qœüÇæ«°N‚…x#N@M½w ÓêßA¿R»[ÐÖO[×;ð;ûW€ÉzƒÉb´÷zý}i;ÕØZ#+[ÉŠk¥}$Kû‰O|B•°nÙ•ŽâÒzMP»4Íg͸d#`Rø¿~åWÊŠ-ðF,@fpâ÷ãdœ‡Ý–Èúr0Y84YãŽ$üm2˜¶IöZbd똟»3ÐÊB3Ûðè÷MË|È/§!K‰ø¤7Û\ ,ór6ެ­ zXÏt°˜ª'»©@,´­…0@·)Á«C^“CÿГ…%SŠýUÀ5Kk‚X:IJè™Ì¼r ÐbH†Bªª˜V:P»Ë¶ ê8ì`Và–ŸX7 l¥éXó¦ùzÇÁMÐæ˜ÇÅþز†a°[f@;:6¦€­N2¯o÷ZɨAµa‡Tvm˜ß׺Új ¶>í™`‚w&¿µìð~ÈIðw¤™U'ËWZ†L6ÿŒ1ˆ×L«Ôhò¦Ä\5Œm¸Ào6Èx.àûÔÝ^€,Ú×mÛ·ËNlÿkÆæ°²Ìœ¯UgknW¿~=~#ÿˆ›ìj Ö(1 > fö›øcØÿ[Ú·ãøµ‹8ɲÃñ¸¥Ârvëßß…mý+½“0ZqÑͪ@‚“vª-C@{÷Ýw7í¹ª T ŸÛM54Ò\´9ͨo>ÿùÏËF0m¼È‘¹!£±˜…F6ƒ¬ãÎÄ8fÖ¡¯„´ Õ½Iz[¥õV$;¹`Ge–èå¬YD¡XH,(ú Y0®ã¾.ø„få–Ì ™r‡ä‚»U¾Ø*=ù9Y—ƒmX -$ZWªA,YÕB(ƒŒÿêÌ‹ò‚…”`Ô–ö`N:g°.YÔVRJ¬\’°ÍHàrá¹r\ð€¹YbVõ¢fWR. x¡q%Û €NP¨YX=ÿÐÂÔ°‘)ÓŸ]ÌÇ$.þ×Ä™ãÔÐXì;8-9¨ÐYZnƒ ž@Ðäú•2dà‚^µVmš·QíµÇ¤30¾ öÅI©\n—ûTo% ÕIbº½ŸGð]e»ús»GÞdQ#l®F@•";’¯ n—`–±iÓ¦E­¥ñæ‚ÖUáû+€¦™‘m$U(ýÓÀÙ‰íZ±µf‰篣X~ÎoÛñ}•]ãp¼ö‚ ~ ãQ/¨íÂöìì½4[k.ðë¿þë–òã8¬ô9à3gÎȧ?ýiû»¸•6~¯Wÿ/ý ¼æ®7G #ïÁÂÏ£‚Øu`<÷O5pÑH:1çâiÒPNׇmÙž”ì·X–v¢½UÂe®‹ËY<)YÈ 5Y£&v“=™SjmXþíÈž—sùN9æë•¤Ï#ksIYšO’±JzZ‚Z÷,t¶XÓ l•–L)’ºTñº@{€í*ï„P¬,¨á%ˆ%‹.°²Š…E¡ƒ<ªI+âÞ'ˆÍÀº . d_c=1R f«ÅÀ„¾¥Â”nµõñù$*F§(#ƒtžÃ´ÔVÐh ¾œ2´dÂŒ [,Ûª³üû A­L?/äËÛ1~F¯Zma¥ß'X³kK/c~ô¡Z_1ˆاj¥rÅÔ*=-,%'Æ S{ ô=߯ô\|´EÙ±jodÉÂpC÷ \&‹q9‚U†¹Ôm€ú|‡ÿÀïj$ñ&lµ€¬yŸöâ7õ0À´fk̓ôÀûпß=µ¿Ž}ÒÕÈÌmÙ½Þ†ãñ1ì[#‚ö^ßÂí½úõWeÿþýòáØQ„Fôƒm¥½ÿþfU°F§nW„f4G 9—büñÂ׿þu¹ý­7 (Â:yþÈFr.ÚnaÚ zXo®E2-(†0ËR³Ô}òÏì^`²ô<%;š à3še^“m”Yàfz͆ o-QãŠq0³¡Â‚´à¡’¥Rô¯uË:”Õ]ç»ë­¬œmi•¸z¤µ“uxgæ”ü j^ ØÒ]ÝTP™Ä[UºX¼ž#K»dms&pAB ô°²Lè"ˆÍC§[ðÓŠ €ŠÎ±H%b•n°;¦À¬kÜO>Ÿ£t³ðk^¯‘¯„ p‹ £˜ °³´œæuŠ©ÀÒA€›+Gýžñ‘¬k­ÁuÌ^µvò†Jm³ƒÐrù¢B˜÷¯Â¢?¢ž–ìª9P{ÕV\Ùð!%øæªa\„Œ,oHúbiËÅýeâP7FÙo¨Me²ŸoM°õAŽP+h4t­æ§ÔÕ†pìì‡4¢£äbÀco ášÁ~^}°ÒË:Ý÷‡‰c?°½ÅtCá´ ½í½¾ïö^m˜…áøý'fÉè`à´@‚n«žÇfU°zF¯òºµŸ*·×ü´9ͨ2_úÒ— ¬Ùý?>ô~`O/.B›Øâ²ç·@^ ë.€ÕÌùe!ˆ,|Ó` Œ\Ì£*' £ýtÀÓ°ºÊ VYh± iÉGv6Ð-Ùò1ݵe@1‡ÂÊkU/dñ8©A/ªyæ"Š å"J–À˜ N”oÉ¡`Á˜Œ¹¢rÆÕ&Ýý²6;'Ò)A+>¥²$uÁÿ ì/Rb€~~ `6ˆ¿jzÙZúø&ö¯b;õ‚ZºI\›€èûM˜‰a1‰ŸÀëW£Š×Å ÊÈ ƒÐ¨ý‡t±:ù2ÞNÔ¾Œ¿¼f×_>#@‰ì?ýÓ?ɧÿ÷'á&+Â\è”´¤ºÄ7 ÔŸÁ´;Nu9ÿ¼ªòµ€Ê^Ñô¤ÚQVcõ-Kð‚$À­T‚ð?ܼoiš.áÉúä©ÅAZ)enº$ƒ2ѓݣx}D5,&UŠ\ˆzçáC‰¯gÂ~kÀxß|JÖBŸëm)­ù€«$% ¤ ‰ýºÐ–[Ó'Q` —…ؕ̅$.€ÅÄ´ââÞè$®}o†ÆùRÇ\po¸ƒ&ýãàHQ ‹‰„ÌÆ_  e»jF€i§©ÃE;9»(–ȵu (HÔŠ%-õ·:¸mª*¼ ˜Z‚Z°}æ ˜e²Ø ùÓk‚*ZxmÚ´©ìVÊ誡ÄÀÎR–À÷ v5#k²ÆFX6÷ïq3¶ÚA‰„v1 _V–)¢s8O`ÿ@™àÕÈ`2Ù¿a|WâYKðÍ›?zSë»}~ýkÅÍ Ý,H#ûnn‹,í?øA‚ZóGÍ× å¿Î4Úl¢9Í(Ž] >é­{î¹d#Jo9-©À„JúŠÍ Â2j ~®ÉG¥dÞç|1 §ŽªÆXÜÀ}èba”£Í³rÂSJêò&p©‡ô òI(Ÿc‚— EV•ªNÙ;adÙ&¬ ,¨šÖÇëITÀj‡VV:R¹€M(ë<Öƒ€A›.w,.BS²¯' !9ëï”Ã…M²f&)æ’Ò‘Ma_ÀÂÒ™ ’”SÞÙŠb Äκ¢­Q•е VuÔðÏX¹×_$ÆË°ÙeOçp^o`9åÌ1câ-_Zêb†Ù@ׄK¾  Ö¼¼ñ5A3·SoYR ³ÇØ‹›"¨1Ž×â5>¡d€Œ©Ul«ÿ-ìßmVÞã ˆ¹j?Ö²²î³t pd M«Dª,¾Ÿ!ôs †ïߨF¥çt_`+/ HÂ0Àá‹ØV?Æ÷Zlïi°³õÈ *m›ŸÕêYË›Ž!å9t˜ +K/iÆsÚ{½¶tÃøÔG?*¯þÈGÔg«ù-å${÷îÅÑÛŒÕçg¾ÕØz³Íæ¼BGàqèeÉÌþÒ»¨ŽÓ¶~>HÈLè°,À?Ö¿Ð*Ý“×)© …œoV\(;kÔÊæ†¿¬—6SL)²0 dÃЧBv`ŒZþ1¼&Ì:díÜ<0\rs¬Ã2®U¢ ȢߴÜÊ—Ù Hz 3X jjÝq0в”â²ðA¾Þµ¡"èV›Å2.¸tλ!‹˜†·íˆŒ€M>ÔÖ /L¥.à&æ%„9å‘51ù9¬´~pbd«t»¡?‹iÉËåŠÃoìÕ¥ /ÁÙqxë)x‚DZj0€¶ÖÁPò“Ô‚ ÐÒ«Ö´\-Ûj”W-¨L¸„,H·ß'#:Ш 2©V±ßÁ ¼JAàJ‰ µ´Æ KIûÎAV #KùÆj‰×aù¯àø}/ÖoDpŸ)18þ Ab0 K0 š6áÆg7޽ŸÆö¨w±øuÎnÔØßZúøüÄ6*ûKV–`Vý.0¦ôâ5í½˜àv1c¥®¿ýío+†öOþäO.榯¨m5Aíõu7wvµGw⊙ýýßw£³‰–”©=/9OJÂÉ~i›Ù † 7—x×I‰œí€N€æþÆÈùÚ¤cb\µvEȪ„®Ëš_”°ñ»¤³Ý6ÊV´yA ÂwÁBÖÓÆ _ıv¿Ã°œL²z ޹>ôÓ,ÆàÅþÓ²kafÁ¼\=¯µ˜•g-ÙXÎbð‘EHdÍ.ÆmÓÞËþ> ¶V;!¬6[K·ÊX,¥«7MP»zcÛlù œL}ôÑGåcÿ}Ìþ#‘ —ÿ¹È)h9 Ñ8 üS½„—2·æ„¤bÔè´Žl—BSúŒ<¦Þl½ixzBvÂÂãJËÊÌV ʼ)€W–l Ž -Lª¤±| ¥8ñ™ •þ¬yTùâ4ÿ%³ @ 6× dÛ$ í†ƒÃÍ")`YZoETc¥}(­äJþ€•¥N–‰¼ZÈìd½ó%#ØŠi8j ÍÎ_€^´ÐÇÀ¸°ÚÐ .ª;Àõã‚ʿՎè¾N Øˆ>Ëã†3Aå´ì'›yzž¯ vÁ£P—/5¾ïôyã¼jQ€€{-6l¸}²ì÷ÁJk¹p…7ÙǽR[›ñùI¯VEX̫֚Y¾ e¶îü£µ¥›ÀgqîØ]#¸Á>>PxÇÙ8ÚÙŠõ¯ؾÇ‚“ïý X~Ö]-PËQØ‹sö¬åïŒ,™YØØi+VÖnô¬ì½ì–­÷}2´½¨ò÷Gÿ˜šúå_þåÂ[ßúV¹ë®».—I¡zwñ²Y¿ j/›¯¢Ù‘—ÛP/K‰Áwܽì¼x -`TQŽ2tLée¹?±¹­*Œ²¹¾£’ŽN”í¦åW%Wd?]¨iïÎvà/)óíaéJŸƒã= e…/ÚW‘ eY.ŠütP­ o¿ ¦.n'‡büó$°-H¼Ð¨’eU@‰Z¹p9 ]\Ñðd*ªd $v%cj=+ ƒZ%/ Ä@Y”êeµ/YäpKXº×õH;¦53h´Üä0.ÈïëîV[OpÑàØ' r l·änÆ…¬Ñ wÛ& ºî"€gµƒþÑåq‡¨¡³¤G&„ñJX/C«7m5=oçU[ÏØÊ«V÷¡–G¯Nµ4-ãwU) PVoøs[º<®U{ðÂr×ãÑœv¶ªF*eÛ¶m3.^÷ó7ˆ~¿—j –7ŒÇ1Žðû"õÔâïømí„Ô Ö¸ ãüŸhk5c3Ú à˜ò†8 Vv=ŠTð7QklB¿Ž181ØP:FVƒ­¥¼„ZÚ‡zHÞø+×IK¢lí!Ü?[o½µpçwÊÛÞö6Ù¾}{=?¯Zwÿ»|ý¿öWìÐ4w¬9Ö#ðôÓO|ðAyç/¿:°\J/›”Ù–“ð…QÉ_S׊/¸C…°ƒ§Ë¥ÅÄ/>&UåCŠAÍ¢RV6X@BYE³¬­J ËÀ¥“ +l´r­Km'P!†²µžB¹~–l­JøBò¯ª,Ö/Ú ejÝIô+é—Œø$Õå—÷˜äûɸÚ«ìJd™¥‡®³É,xÀ¤¶p0"k:sb³uÓž«:‚W“-ÂÃr„)]²ª\¾Q ÷;˜Â´*I«ûs1Yw.¸¬2ÇiUjiÉ6Ðr”l,£1ÈÔê"úý8@Ô´œþŒŠE6:ãçV^µÆÏ>çd ?`Ñ' ¶»êt›ô‰å‘· 2µßÂc ³ sÕ0²Œdiƒ8®ù½62~  ôQüެ‚lì lûG8¦ø|3ޝ5Ö?‡ßÐn6Wõv(A`0yŒ·‘Ä~‰¥ÞX'}ùá¶p¥×6@"D‹°çŽ5¨mDŸÍmPvð¾÷½OÞú³wK®# ÿðÉ"¯Â—¥Ë'|åù?_ýÿäïxGágQ„§ÉÞšG°¶×9òjÛfséæ¼,G€zÙ/ùËòÞßúU\M‹zÙd𜆕^¶%ݵ˜üE¯ØÉÁýXëÛ|ÉViÙ+¤ø/‡ì(4 ›¯0°j‹´gŠ6^Æ"+KÖ“Q,°ôÆ=m²![¼r9Ï<*xQOK Û½kI'ë™ ‹g2 Ç…¥÷¸¼ªú•€NL.¯âD˜lsI· ‰fLüb,À~kUÇÀÌ2acù0œ Ð7wÖ/-€íÐ#!ÆŠ‰-6býïq0L¨varOá"ý02³ —,® Ûµi|ÿ.p¿ýàåÌ2_ÀA+"­Ÿ¥Gk»)Ѩ޾*PkkZSkl›Üã5>ךÚW[¶¸ZÚB¢xcE Y©T®`_Ö ƒ7p|éÙ»Å); ûÉ_<àÓ(ÊX‡ªZƪa|ö]È|Ùð \àk„? Ðü@ìaü½€}àûä…¯Pü)ëL0lƒŽ·QÑ€N]íJA­±Ô “e§Soêx@¶›¬ì›±ô¬}m:½çu˜Ço-Tú 4’­Ý·oŸã¿ø‹¿7<Û&w*éW3w¸Ä¹3ŽÁ#nøŒ?~\˜@vÛm·è?ü…/| ƒ<Ä›QÃ4Am ƒÕ\ôÊêe9uDfö>þ{À̶@/;$IØoåQE‹É_áÄ:hi½ï’TÛ’-—yÄZ&û%4Õ¯À_ÞŸBâO\²¡¢VUr)¸!d×¢Aé=4@7¤Œ| ƒÏ­Y˜Œ 'Nœ”­¥ÔÀ 'ÅÈÀ¬jÿÐÖ‹L¬;ޤ20¯îXY”•eȪ2¶bÎd¶Kv&Ä5 ¶”¥i'È@ç‘èÆR¼ì[0Ql ,-·V§p¹£X3Èåv)W8Œ‹ÞWKL®·šÍµëÛ4&Z"m30ÅvË®öûGzÈùyÀ‡q1§†”€Öœ9¿Zý €#¨0Ä$RiRÚJÆ`\_eS›ÆÏ>§W-Ç‚Á ¡£]©ÜF^0ëa¹}sô@º 1ÇbdeAÙ“švìÜi|»!Ï'±íaŒñÃOà7ðümkz-ÀÛµ‡l›úÓ6€Ù°…+@½x nH?‹ßÓ`‰gÅÀâæMÓÆ ]‹Ì¬ÑŠ‹ínÇß¿ãû?‡ý$ˆ®'Ø­ÑÞ«žöŒë “¥}àä®ÿÉ^£íäµÈÀqáËTßAý¶„fû%25 YwR†f*Y õ¼ýíooÛÅQªþ¤ j«Qs‰+pX,áóŸÿ¼:±,¸J/‹ 1 ˜½ FD'‘ÑŒ¯9¹˜üe5\‘± Îôà.Ý#éöq‰¯?*±#»q‡n¨(=› ôB®Jî lèm) \ صq/ÐÛ›õtÉ\P|sEÝk fÕŠ#ôzfá®H¥%˜É‚+‰> aìwĉ«„ IDATUàEQ&¤‘•õA^@]g7ô¯õYÝÿi\¤xön¯óBEvÖÈÐjû-‰¿ƒ=‘ä®ÅÀ˜ñ_øüÚ’ÌA½q‰þ!‹÷ ú¢“_x±_M@K6ÓX|»M‘ï72Vë–°¥Û¿å½mXᛨՂ~µg¸Úiß]j oúO2t6ÈaLÉ:²\=‘Ä6^‡q³C_Z>' íÄ÷Æd1êEéFðanÇ ý_‡„Ž ï}ï{åÆoä×ß ›h‚Z›i¾}eÀã(–@‰Á{ë=° š”íQ–\74OõÇæ6CT QvÉ_zÔZ‡|ãðŸEòÔ|ß)Ivôç Ðæ—ô¶Ls:P¬kNFq²ïó i©œILדãýëL´E:sp?ˆÍØ&ϸéz‚ȇÀÌF—Xb7½ ÐʺÏ3¹mÉ‚k:Ð-×MMK{° _eÎz_õH=íOÔ!]pÚ ru¢ .Ám/ÒcÿŠ‹l'.¼¸àvàq@ùšï¯Vвâ/þS×ÛLV[r t§¸°›CëjùÈ ¡»Pí  ^¥pÃÇ6›ËÌÔ7Ž´×Êås@c¥Éîj’ˆJ}-ûŒ ÇAµãûƒg-’™ŒA€KðÆÞZ…–(æì+_óoÆŽ=<¸Ò ¾n±øX–ís:Ÿe¤Ã? £7H_Ìx=~Oÿ†ãé8W#ˆíÀ¬Ý x£ÆÄGö•?Æ 5‚nzÖ* ŠßH5—'ûþŒÑ·pþÑžµ\g¥l­–üå_þ¥üÒ¯ÿœt½t«¤cc2׿äH£û´ž‘‰mû$<: ‘ÉJ‚0Ó û¾À¬Œ¯ß‚£SbãÛ$çZgÎ~CÞûÛÏÒë¶pï½÷J¿ýQoà |l‚Ú+ðKoîòÒ¼ç=ï)¼ð rß}Ä›.èeâÅ!횀ÅMqº1ïÎI8Þ§*våqr¡Ž´}hwQÀ$)èKB³`<áX K½™ÍøÆ#’n_Ú˜á™/F0—VzTmË•ëh‘¸'-$zMz¤;sưÆÒS&~¹ fiåå‡þî³(;»%7¼´áY%0KwWþµØÇü´G²¸7 `ÿ"mñøäÖ;±T†M®è)õ´›M``E Õ¸™ZÆq¡½¿tq¥óKåžÅxýz¦ôšïkÀKé0ïz<ÖSG~>¦µ´ªêÄMÍ<@K'ž¯6 ­4TdÑŒºZ‚Úbšb¥µ*fn³òÒöŸRÊÀ©ì€‘3å†e+)P…eë åa"Ím^ %H#è$»ª=c¹mè„k:ã,ïVK4˜5J±_\ŸïU‹4À"ÙÙVÜ 1™Šúß7a|¾†cwµ#ŽírÛIôƒÀ:Ìï‰Nü–7üž¹ÜY$ÏQŠá¤@Bµ~¿?ö± ÖÊÞ«Úöí>gÆÝwß-wýt´ÈÊ LwIddP:ß,ó]§1£VNp°DÏúk=»CÚÏïZÔÛ¦C2ºá‹zÛœ')_}ê‹òí{¾-þçNpÛ¶¦/¢ jMÒ|yeŒeÌ4}öùý2ïÇÅ&³;î’É®ç$ë[²Èêe)Û Ä{À¶v”ŸŒ|ó­ ÄÒ¾*8… ˜*bÍÔVŠÀd’¹jáߺhËåëvV^s2ã Ê´·[Ú Nî4» €–AY&{1R®ÀFNZX•Ìî8œ2%纄—>×`¶ÉC'J/˜hlÂB…%ç‚}¸ ²¦“iWÃfWôtµ¤N;C¶Ö˜ ¦€+@…ñ=ÝíY0D|Ô€—à—Ô\o.¶º¼ô»å{•/íðÙ³ @v‚åK࢟8¹Ù†S÷i¥v,-Û³òª Ôy %ëk§Õ%5k{íöËãÆ X:W,À6« o„ýP V++‡†€r–gÕ+‚R‚Û#ЉÒU# íùÞs©] © ¥WáøXG#®´ãg’ÔËr?éb`f;·`[´akt˜A,¿3ž#x3Ö^±­èÛA¼×‡ßj²ÇdºÙÏ~¸A4"˜üöƵQaeïõúäà#üÎw¾ÓÑf(;8àþÕä§—'±Á¿ðù m& Ï­ "ijë!a×+mC×Xêm#SA°¬“t`Z>÷ïŸfÎG}k&“-dÔ.EóÙ2üÇ\xïÿ5™ œ’§["é~I'eºãÐâDfqŠ÷ ­¹Æ¶ü`ñ}ã}RŠAj€Œ/™Ùø¢bs3˜é’ð™-9µMÜ,,¯˜ æö58Ìê_9dÛ '6’;J’„Öìy÷ÂU !¡ù‚¸Ód f‘Lfª0w·Iw¾˜\ÆþÁ,-» F0K—üàƒ›õÌ£ÛHøBÉZVâaQ£×I\ˆ^_ƒ·½Ò ôàU¡ÐJW¯{=²ÄVÖªaxKzAóçfÀûX9¾GÀ«.Œ’4à9®ö2@Ëir²²´GF*C(óVWþšÛµ’dU^µ„Gv.ìA!ã´B™\.CT‚ÄzÃç+öªÕÚ4Ö(=-å fpÌ_Û)|§³¿1Ô »Y°«³ÌâÇ{møÎÁû}X.†c›ò® ³“Øì²·Í‚H»¶€M~gCèËŽ©•F ûÁ.›š¹g &sÑ?ÖÊÛövŒÁ£øžw Iެ¬fWÚ«õhOFßdÊ^±¯7´½—n‡ßã°÷Ýu—~«ê#YÚûï¿_ÞþÙ‡—-›è‹¿¶c×JìÔ.ÉD'… Ö$E¦6CW‹$ÝØé«Ëô¶sÇe>6¬Ø\w.&£Á㢓É(IØ»wo·æÞ¼ü^7AíËï;köx…#ð8t³dgÿåë;ÝiKm&N”ñ5ð“õõ­î,ô““W•ØY8˜ØY㦣ç6Ó-™Vœœ6.œ¨Ÿ5jh[ÆúaÛ…šä§v¨»ðJÕz`¥• –ZW!‡¢ Ť0ÔöÄ.–kQ.w ])xÙ.gaÆ%IwT:F`ÿ·„ l¼Pº6ƒó’ÀtÈ.YØy)0Q>,ßiöà<‰ ™Æ¶:.†zÛNiÁU‹•—“6kY†šÚ74€­xÉæRÒ@û ÆwÛœÄó¦i Ãø,°; ô»p±>÷tÚš~¬eŸœ,[ÔÁZ_µ¦V·S Ôêå*=ZY…UZÞî3N¯sº» ”-­Q+S«êÀÌ 3ø.Rø~¦Êrø>T¢šç8pļøÇƒe xÛý^‰yܲZáV€ÉÇ)ù=€^j¤©#]‹éøzÂNbP­M‚¾Ã8®jµv –ev –ý`5+ÛŸÁòt0X͸¿zÖ6"hïEÂwñÛ|-nZéëËRÁN%@t;@…0yÏG~æÄö=šÞr b­=³MºÝ‚kÌ9%=0¯‘ &ìõ¶ëž …vFw*¯ð£³OÉÿóû¿%¶z¸’«“5A­ùHj¾~Ŧé `gåw>ü~™Æm¸V2¹MfÛŽK2taq5;›…ÿª;Ë…);Pì,žÏ >/ `a+…7VSOéî1I®;#á¡xÏÂ+*bðUNÞvñÃ_–á.Lðº )€—áh2…sS–›˜swIW %z§aãE0Ûf³)¸ž™–w/€™M¬$‰A__¯´–âÍ#8±_}‘˜Ó {L|©×ÊËn_œ¼?ð²Ú¥qÙ¾ÞÆnHNÁÚ‰ÓÚ-`»FqšÁÔô:ü@§1 '(þ14ôä#y7þ‘¿§Î•0䫘ÌF[|LIjÃ6ìÖJòƒFPta1s Ô>(7¢!;ã1î[7egðH DzcxäsÚ€ñ–/çzŒ9®ü#¸ñűó¸dM:%x½¹%(´’j/ÑèøYæv`v}r¦ðËsóJG¡Ô Žéöjt·bü$¦üñuíÂÎf‹ú_ʪÙQZ@0K™ËÓÙ7-˜¥ønÜ^_aÛv}rúþvOò¬å6o@_ÆwšÀ1sãv§Ã]:[¼ôÒKòØØ?JxúÙn–øÚc¶9¼fLîxZHx„F7HpºGâ½'$ݺ<ÃNo› ÎÈØ†'1Îk$:±ÄLR?ôeyêÝ?ÎF’¹½‹74A­Ó_Os¹—å° Ø=÷Ü#çÒ‡‘Q—Ž$îl‘Ðefg;'®&Å Ø_ ;k58¼';Ë+åìÕÏK6Z¿yXtÜÓ ÌzàH€ K¶ž–¸xzg‹³ùRÁ„°ÌÊ´k½Ì¹;$šŸ\Ü å ž¹Ä;b²#5!¹NèkQ2W…ÌæP±&㟃fº_‚ÙþÊ`Vo€LíÝ[#¨KÝe31¶O––‰^+Èø:uJ±ã)0M1¼· òšÎ¿ µ;M2‰4› ›+!]ªªùÇÛ!ê''ð8„¿j¥± ácl0mü# æÉß æABX&‚mRBÛ.þ$gp„.2ÆxjSØŠžÆF9­7¬×‚ö4Æú‚á}Ná눷„ä$Á¨~Ãð˜XZ ÷J"JØ.ò*ìÐßâ3Uþ(nࢀ2µ¿`* Tù ·bL[!‘Ø‚?ÖjZÐÚÇ T±ˆŠ‘‘1 á˜lÄdxbNúbahŒ—¾&~ÐrZÝ hùY+¤cØþ-ýýºILJӊÔËÒÅ ’Ä Z£Ôê2Ív –¾ºÔåV±l‹É^s$ÐRþ`eÅE ýÍUµìËìã÷±·5à&\Û{Ãö.ô߇ãÆI¥…+¼çá½’î—ÈÐVÅĆF×ËÌÀ‹’÷[Knô¬^ô,–Þ&¡1,¿ËÓ3ÜvzÛdäüm/¨Â ÑÙ²à‹Ë??ö·òè£^‘Édξ1Óà6_6GàrO@v¨ü×_;{LI |p30³³­Ó[¥e¾z8Tw8h»[Fv–Rƒjì,OR©nYhŸ”¹íKÒn íÀõâž=Š©xâ¢-W®}½tNOqK,ÓÌæ\>™ôn”®ìj#d ™Ì€W"ìÇÉ,([]gŠý6Ùœf}îå™É’“Nâ.Xç´Þ u1âLÑÞ `e,˜p1¶«·ñ]0JS¸ˆ½Ý©­?kô#­ŒŽ9¢˜,Z;Ðò¯ Œô§yïèê[áÙ™ ^vA`< CpL`<0=‡×9L³’ÁäÉÄ«|F€¨@1  !+ÍIqsFÈlÄ-[o~˜té&¢À’Aæ•åh äZ–ð£úŒÿèåô•í¡ ìÞ€Òà(‚¿µX•%?5 Ýg س”º-ó#Î Ô¶dŽªÂ úûaé;K6!¾´üû78‡ln Ë]5ܬ™%Ô¬:±[Úºõ³ iëWì]8ö”„ß·@ Ç åN‚Ì·beá;Ëà õ²lË*X2ø°ÍßÅ6V3. _âXøµmç$Æê €ä7äë¸í#ÑO—=RGËxôìßJ¦·•K{ ÕÃàím–¨--QþŒz[/ò.ìô¶zi­·ÅÜ¢¿-?óà|O÷wÒ™À„"pz¼[„’„»îº«øCÓ¼BíÏ~¯ÐnîÖ+4;;RtTwâZxË.Èhï>õ#çP;«ÙÙ©gj‹NV£c§µZÖ ¶`}‘ÁßrD2]˧“ÜiLUj@`Y\È$¹gá†ï4|ÐÏêj`ÔÙÆ2°ùò ŒâÌYØouÎɬ{­ô ` ®*s;ÅÌÎ̆pï’¾ }ŠE±ê«Ý{Gjo2œÐí–kÄû)\ÎP^*@Ë}8rK àc¥ûM°sòäIÅl¬XZ¶M0Ù¾J—rï”#è˜ËB–ߨ¦Ö­‚VQ‘h Šù¾«?ÙH¡ƒu0™ˆ’»Ä%½ÖèØ´›æ²³M££`EûéiP=†3 i yåŤO^]XÚ-µòOo~¸ôT„#‹7,WLl%@ëøeK$,ç3ÎdZbÀB²fƒê#±|‰)OÞ@1ÑÖZOb?^‡›í»| ûwÈÊR^@׃Z¬¸˜ÈEYÑ>ôanšV+éYû,úº78< #nÿþýòÐCÉ×~韖ڙÅ;‡»ã;”$a¾–^&Ïrã¸Ôª·õÏu¢x^”Ø]ô·…ÞÖX¼áBËaoøÝ+¦xCÔ¨æó—õe"ØýŸü]™Ž—Îùph«Áa¸,ÝA—³³OÛ[oï9« e‹J Çeöëv}´³.xÍz’˜ì»•!ê-Àr+˜VÔÚz`ÇUHæ•­{&"!Ì .´ÏË…^Tø’4Aé˜3U`6ç×`¶{E`–û‘°K±‹Ê›ïRÆ.bë&V3èA{.dÆüL@*1´´AÒ  Þ>ùNkˆ©—hÜ# ÐË.”¯,4°4ßZ°®Æõò<øÜK ¬ñ3ãsV#6ƒZã2NžSªÁþ·`›”d˜£µ™LZUcÛÝc´=Hú²ch¹O7ládZžK-%jšûV&1ÀñPÄ€móO{Åò˜âqÆ€;0-ÿ úÕïPÊö(Q`0Vc[+)Àv~ }؇¶VÔr;·ãòœ·êñ¬ýÖ§Ûݯ¯B~° n¹sèR¸?wÛ.ñõð–qyPv6ùª}†£ÎXzMÀÒ ×»Ù>­·Uדñ>å¤cg–‰NÈøŽˆÙß6ëO\±Åš vù1Ø|çe8_úÒ—”vvºå8t‚-²&~ä¼)€Àï/î?ƒ¯©mJ;ÛHv–h??[øÕÎo’TßÈâ6ÍO|SíâJH LÙsÁ A¼kÅWbn¹¼*‹™/ÏlT<ÓQ0¶Yɵ%àÉ9#“H‰çÛQ•‡ÉcIÉeòð¹…›ÀÚ¼½Ò»¾hÍeÞ®Ó×”ìn€6Íéö^ÀÅãRZy‘)f²] V+ÈæœÇt5Y.‚ZZÔК]'N£í«Õ‹v Ô<°Ç² +¯Z»e¾Oö´Ébn¸ d²Ûu%9¹±•ìÊŒËY=§ °ŸÂwÔ€¶½½ÓîåàEKøÝ lTÍÑ{v*¿Ü­Ä(1à ß•H ì@,)²±ÆØ  öØ'A6–¬,÷;Bm@U7Wa¾îpÛNúg· Æþ¿©•Æ×qây€€–Á¢dú7Z€Zzö³Ÿ•Ûn»M¶lÙ"ö¿/íqxÁÎWŠùµC¿Öc;$v–^­å®9æuµó2hF‰Üô&k‰œÞÖ\¼zÛGŸyPox¥&“ÙŸÍÌ#Ü|ÝËp>\øøÇ?.ú7•™È©;”©Î%Û.šMG¬½õr‹ì, )8agÉÌòŽ: vvòºèf,9 <߇ “ Êõ€Kº‚¨^6º¸Ž è…÷-—Ñ2WÖ#íóS2ÚŠ6üð=> k.ŸD‚QéÝP˜Õ§ôà«ÌZêmñ‘Lí[.âöŒÛæóa°HÚ‘ÀüY#^óH@K°Á  eM+@ËÏ¡´VzP>¿‘WÞ²¦y{ƵW-!‘•ÎÕ°¨~®*l.—÷AOÛ¯Z:)PÀ~ÅMLm­v^Æý0>g;”`ÜÜší4 eÙ_ h¹~7@’-1 œ¬l­3”wP @™Õ)ÑÚ+–Ïí‚Ébô\µ ²²Sæ 5°ºvíò}ºExÁ¨¿ˆï‰wµb¥žµ²ô&ˆ}ƒArÀ›’ÓµWzò>÷œŸúÔ§T÷?÷¹ÏÉí·ß.di);øÎã! xyºÒùÌ­’ìQàÕn_g·R’„èIXz=K¯.XzõÙ-®ì")k‹ ]µ¬ä.enžØ5ªÇ d"Sð@Ÿ•À\'ümoQv_ø²»œªR¦®‰ 2’Ïýð÷U2 ¡WRñ†Õ;Êl¿¢æÍh̰Là;ßý™ žÂ‰“ììõ*óóBï¸Tìì$üaq¸Tì,÷6|‰ccÝjÇs!º2’Ytò†'ŽŒí/¬¾P~,.Ÿ{V€nPpõ†ŸnÀ쀭+Ø-[Öu©¢ jå:ÿ™ÃI<ÎyÌL-]¸¬¼ƒÝYMPËLr-/ #(á”°™¡ÕãÆ[›ržM²:d 9oÊ«RF†Uå z¬œl v!;8iÜ"–­¢@-dõÙZŽOK°Ék~éé.÷šÕ€–Œñà¦Me›Ò r'¡£Îs¿ø½WÓëFì@,Ù~zÅV±º ã#³ø™üôÃo›I_t0 +ËvW£@ûЃ}§®v5A-·s'~kÿ €úz¾pãønÁïñUH\ƒ?Û^ôùy$ŸÐãÅ_TÉrÔÑÒíà¾;wÃ|«*¾ã…ÿÆòþÏ|@üÉ6u楼¬mÔ–}ÍÍ—ûPô¾ßú UD!èêîÄ«;;Þ½”˜edg'7£Z˜Ï^kU‹³ÇF[®¤ú1Å´a¨âpÏÁXûH»`ÎÃR«T`aqE],œÎ@; K@Ë -Ëݲ´[J¢”mDyf²ú×ó`VXÎög0ù˜ ‡¼²Ï»L¬Ââ6>9“üÏ”¦É®R×b/‚%¡•×¥ ‚Z§åqWÚÏE5†V·MÖ‹ÍÔÚ•ÉeŸÜðp%ƒê$T™\,_-SÛ€ L„âMC7{' \º³Ï•ö«Z ö©ye³V€vllí»Ê-%ã(Ȩ C_¹9’ñ`ÈR“ZÄÂ+¶^kÞ¿ 8güc5‚s,+}ÙYq™×­÷u_é¦iµ%ì§ÏÚçzŸÂ ÍÏ`^í¢73,Ê¢‹Â€LA.Â<øàƒJvpÿëÁùz…Næ%é‰I$; û®"›Ÿ<ŠB;§%úÒUŽ$ YÒ©½y IDATKÏó™Ïðø_úA-®uù?i‚ÚËÿ;jö#ð8JÜÒw–%nç[Ƥ=…)ØÙ‰nØqù–XÍΦbc2×W~gjÈZÙÙÀ4¦‡·(ëôuÏ@@•¡}´>G°$7Iz]ñ„ã›ÀÜT¡ü“×`Ž- 2,z4'³¡VHÅòâ…Á3-ó¸Ù àÂÌîBr£å,$&IÝð§^ÀÍd©öQ¥­ebe™ð´% Õ}ž[{TòÞ8* À¢³°VA)BÞ—‘ÖÓW ÙY‚Y¹ÑóÇ£Ûd>›{\žK 1_ååXn· jõ·Û|¼,GìGY‰ÛWtÍï‚E×$¬º–î:ƒÉ.‰Î *íl£ÙYždü³1 Ìmb³=PæúÇ»0õð Ð;ýºriõ²’/\w*€„± d{¼ânAu1Ò3hå%7 ðãÒâm“•†N}ˆæqBfR„ßpBÞÖ¶Z¹'`¿s™¬m´¡Û2>Rzpý ±±§Ï™ võ A‡ÓmT[ŽV^[ Ãj˯äsšÝ3Ɉ€†À¶Zp“….V(kv•Óà JÿÒ Ž)YŽåZ4´–›ÆoÁWÈá÷R>hL ó®@SK@KÝ+ÙÖ4Z׳pµ ;Ë} Îµ³£˜ ¨ûCùêñ¬KŽ?®n4ˆe¢Øj€Xn7‡ïIH`¿Àzº»+ëÃoü9ŒË58/v¼¿³ÄLÐj=˜©~ÇÖu¸Æø öŸ÷>÷8¼Ø€üðûÝŽu˜¤·€óÕ“O>)î§¾‚) ØžA àÎú$šôÈH22HÅ>x5§1¥P«ƒn8üÓ’„4´¾²™Ö)ItŸ.«8Æâ>da£gAܬڱ°l‘‰å²9ŸÌõ[_Ÿ(Q˜Øñ¤t½Q:OÜ(ƒK3›s½G%€»ÎÀ1Ú˜k{6‘&c«È¤½{÷–ÿ¸ôŽ]¦ÿè¾L¢Ù­Ëot–¸Í`üÞÐê’ùȈ½·O\­t°t9'úT†g%p[‡·«" Ô!1ë3çͨGVyçõۛ©í¬*s‹ŒS:8ag£‡wˆo àw=tRƒCeJM­;…¤è¯t2X!ˆÚMØ¿ò­Åç(™›‡ÖòéŒöÉf0A¼c'ÙNL»šƒ öMM§_D¶=펒=yY«×'†_ïðdoµ~­ïÑÊk—é¢Skõ.Ï¢ ƒcYo»zý$˜² LGóBÊÄ%'ÁeW*? Ë³ó+UsÒó2t@˜#YÕýL¥SÚH¯Zo> Ïæò„ž¢ûAùoǼ_æ×´t˜P°´0Âó݆††Ô¾Ò³6ÖZ”ÐÌÅ‹^±)Û—.•¡:ÔÍŒÙf˼íz_YYf++®[Ò¨«½ vç'ºAœÁï`½éœVï¾›“æèËû-|ÔÎâ»ø*΋´íÛ[ƒ~¾ ÇýhI LYÉ]¿ò+rÓM7ÉŸ½éÛ¡% #SêòNЧ€š4$d~$†²¸ŽªÙ·´gž€Q$‡@VåIàÚ4µmÿÒ¦gŠ…EÁ :ëTba¹šbbq‹º€¾ì6¶_\vrëÓÒ~ì:é:z³Ln:¦·8ã˜ls¤´½JÚa9ÕP&×>+üðÿ—›;BÔò›nÆe5,¢ÀÝþŽë$˜m“oÉ`ÛeÀvž¬<¡¬¦½¨žl—ð ̬עz¦kÜHöb….mqÂŒO¦w’ç¤ãøõ¶°ë¢(ŸrÖØÎpÂ5KjCìZØYZuÐ2fo‚4EÌáÆ…/—ït)¬mèI(p= ˜uðRnà“*ÉiWÒvà³·Û–I³¶çÁ†ÜV [à[[ƒ/6•¶K¦öçÀn]Ê8Ž>¼ fµ‚` :hÀ?<®hÅEoYîkµ L¤b!„K´Í"¨n¨5Yã>]VøQ€Q–f©Þ/ƒee…°Ý5ÞDSž@ŠrëÓ!äØ_ý•|ïþû%µ0‹¤0T~ÌFq-‚ÌÀ6€$±x ¿wä@„O¢°N‹Ê¹`±àð:T†¦õ°êjÇá…“Û—Sã>ð9m¾ò«E` r»P¶ì—ö»hÚ²$10¯ÃÏZÏ ÂÙÉëe,m: 9 ‚¹'ã[Ÿ”®ã{¤ëÌ(Þð4€íAùôß~B˜Ërß}÷½,Û&¨5ãÍ×—t‡vö7~ã7äÜìKü˜ MHû õ>#o*ë[dj@B%@›n-ý0q'¬Iä«å©Ÿ% ¥‡§vôýó%¡g·#Ù«È:mAõØ (Ëé%'É`Úªk¡sR»–äj#†‚C˜rš‡‹%nKÉ`⎉? °raútN¢n•xÂ$0»˜ÁEáê Ÿs=êmßi²©5k»'z» uÍÅ”ÐÊ«Ø .—2V3Iìĉ ü°T)³ç „øgfÞûÏ$±z¤®*2ã¶ôs±jApžDb—¶©ª¶¼“ÏåUK÷?ÜD¬xp§‰b´]]Ê–^³>¸*è0ZŽ×.LåŽÉ¹sçxÀÚú} L*›-0¸æèDÿN`Êcب ÖìXY«mmÁoŽ ïRÅ]•ÿ´B B%kµ?Q|WßÀoï,ÆþÜè¯tF†líIH‡^µn]QÊó*YúÙÙiØÉ„ÈÅómdË„/"þˆ” \è?ô²0…S`6µáBY7 fÛ^'/푉ûÊ>3¾Hv(=lôìVEÖÌn°¿ÆPÃ;±cŸtÄà0ÚÝnß.]¨Åm=·M’éˆÄ»†7;¾m@{Û=t³L¬; Û‡¿•’{ï½—y-—=°mÜ/mqHšOš#°²  ÅÝ L¶Ãš« ’‚ù~‰Õh­¶ªÂN\Wh¹OiþADo Þ=3²¡8NL=éWòƒLû”ÊfÕ bnè¦Z_€ d‰(yØSÞŽ±ÍÖ}°NpÏð" u!,ï Š/5K£GÖv ÊFèg«A-™X'±,d˜£ÿ„C¥L$³Š“¸ÐÜ}YÓ0-¿Ùá>Xõ·ï1Ilµªˆ±$.,-õ™!¶,Ä@žì¢Uð²WwMÐEöÎi°ð‚àGMm~°Ö½^ÚZ-‰_÷£zƒ`LJr´F™ír¼Äöq\¼yQ5‡ãzVÏ{ðÝÇ9T™ømÛ¶©ã€e¯Ó$ø‚˜`9ÝÑväIÈ´"E(3 ÌÌ òT{9 ÕmMm= mǯ•Îo²§¼&Y…–´žºJÚN\+Óƒöa\rÛÓj¹ÎChw3ÚÅl¤UP«˜`€[´ÁÔÖêÐÎ]gn€+ÂåŒðÝciyÛÛÞ¦¶/g?[g¿|½§ÍÇæ¬ÒP?û»ÐïÐkvÁ HÚèÜ€%CÛ:¾U‚ñn%9Ð ­U·4 ]€,A3´VËé÷4 ¾º4uS˜*Ku² Ån€ì!êa ñbz‰þ~´ê²‹ÀYd½ž€Ÿ-™YÅÒ’‹K\J£QpÁ…,ê­eÉ`víÐÖš6€i·~\ŸÀ4¥•õ-‹-\LÖ”ÒÚ‘]Ê ô`ábÕ¨¾À2©„€–ôLÚáš c³v€–ÛçmQ¹½m½¢ES¾ X¡Õ *îÅà2À#·¿6‰jÅÎtfM^µ´sR‘ÌØ0_$<ÆP Ib,Ì@&Õ.h9eO@ËÂÁµÅÐ -LjöZœ=!›[k¬ÃØ]Ȭ¼«¤/üv3øí“•e?½8žV”P»ºZö¹¿'ð[x³I PˆÕcA0ûÎgðÛ~¾¯ t%Ë.½^¥G7~ËYœ«”½›aAV$;O`;>>†™>hçqãã¥s ŠäøçÚd"ò¼´&*‚ÖéÍ…R·Ž£×ËÌ®}áYÃV–žòý‰«žTÌ.5±•ä\‹À·õ4Ú=v½J3“7ºe&¡e[p®‚×›–vÃ`¦3Bd|`Ñ!Þ1$Gæ’*Œ^ñ7Þxcõ“‡ÞÐE|¬>÷t;ÓÜÔ•9´ô‰ÉZ# åÈ,9¨ÐæóŽ-§‚S×,©¬×Í÷'®ÿ¾¤ºÏ‹o.ªZ–­õZ_è¢û¯•–ã’ÞpNâ{BÕ@ƒLVühó({ÁàxpÒÝ}î¾²¤µVIbÕŽ:%ÐúkXCÛg¸tPzpC Éz½•>ÒÊkÀ«¿Ž óJ·m\O¹/˜.¬ÆÏWòœÀ• –€–ß©bj1¶|ŸÎ•-·7É‹0Ž“•†Ò©æ(jÈ(Q ½‘AðÊ¢õAkãÆ$¶éRÙ.Ç¢ mÇob¬úZG‡àLR # í†Ü€¶^¡{I^Ïê±7gqÌ×)èæ™ôK%u Ñ-¾²<†ê´ìÛp{ öRÁ춯vœôc=ý!˜¥†öÏþýøý܇ïõ&l‡àf¤Ž}¥Ä£ßߘMœmàìÚ¶mÛ¥=¶EFÒØª{vŒžyÉxgeÌ£ÕB[q:uJ%­ìÈÒÅ Œ›ÑFÅZŒùœƒþ4j{ºzÅòo;Î_Ú>¥ F0û~€2´:ÂØW:œ¬4xó 7<1€W–· þÎwîÜ)]`ú³-aÜd¡ˆN² XZ®3>$)/@ëÐÕmº}L%0W¶Ôã2Qºóл.-¾Ïä2&œQ?Ë?» DAkp™(æÎ.£™H6¹i¿ª8ÖyR¾–¥³ýÃO~DXªÞ®ÍKõ~Ô^ª‘onWY…üáÿüˆÐæ<)!  'ú¥ Ùø¼T’pXÛ¡¡%CëÐRÓD@;¹Û^TÏ6P†@@›êQÖ,sÛÉäžï£úË”OnÖ¼l¬Gz'dîµO+w2(ágvÑ@wïÈd ´«;ûÀlOU1µu1mýµÛ ]_¨æ8ÔÇj¯»ˆ Ú®¿µëêKcÛ“Ð-ÐLŸÌ!Áß# e‰\‚ÍjŽ—ßzÅ„¨“uÅ Î.d™óðƒmd(¶¶X¨e[AwAfK»¾°Pd­Ö/jh×,ÚXlIÅl´ Y$3– ¬Úqú5µ´²² Zq #QíØÑ£êÆ‡Ç $´ ­Fů=ÆPƒÆÝn¿4ˆÕz9êzù÷Mì÷Jƒ`öXÿ“Hà"3«Á,ý»±ç¸a–Õ¸œÕóIXx±e'ÌK8‡ßpµØŠÙ~÷­‘NxX{Í„%6¿Y­F`›ôAîR%ebyZÆí™U6H=.-+;_ºÙ(ëþRb0·îˆbkézP)(kPíÂÁ—\b–µ3‚«àQÎYB9#<øï­JëVjóbæìŒv±{ÕÜÞ+~è}÷ÿþÕŸ")ìÅ2@;Ó}Ä–¡% µ«s­¬óðÍ5ZO:äÐF†¶)mZs°$"‹2¸rp˜d$yUQpïY#Ñï]/óS(®PÛé‘]»v)/‰“m¬FPÕP«ûNë¯Vœ¬)Mø«Ç ýœ^å ·} æ¥Nk4KKÉÁÉ“'%ø£ý§. PnÉHRçY-9Šœe=LmÑYÁ@éï^?*ùN'‘S€m#ƒÅ̺ڕ´Ï1€Ež+í:Û´*¼@@K÷ܹi`5ZzÌÒ¶‹ -§ÿù؈РnÊÀH“• £CƶIà¤YÙÓØˆí[µÅxíÇM]#CƒWýX©í7cŸ[ƒj³üªíÀ¬Þ6KæÎ®ðœ6Žc¥³ZŒMÇ£@-¥a|·”‹üÍßü-ª@ÆÄ5\¶Ó!€Ve6–¬ªbVσàÁ_¥ iÃ|êa«±»”!Ì <Ü&m'¯­Ô¬ò¹åòmgPÉrª\³h“ËèŒàÍ„dº÷”ÖýUZçAç'ŸŠ=¨ïÃ&¨­oüšk¯`8eñ©¿ù„LtÚØìVÅÐЦÃL—Y %9Ht‰#@{dc@Kq>íôUö~~ì…7Þ*‘S[%Ý5&ó뇖:fxF/ÂÈÑíJè~êjiyq+þ6‹÷Å^¹ ÏJ«lö(Ú1hgÉæuqêÔa4ÐêM> ÝÞ£OïÀ,9¸¿Âë/“qtp×mÔòÈv©¥½˜IiVýSIb5ÞPXµÃ÷h9¢üI *é@0©´z=2µüœ•®¬boÖ+)‚Z«Ö­ßËašÞ°ê$ЬjeP«@²®ÞÐ(Y¨7xÓ€N/5Åd¹ùùDY³ÐæqsÉé|ºè  ¥lDÚޘџ×ûH¶–Ì(Íʦœ)-X¿3<`Wƒ•µë÷8ï°B=¡Á«~¬¥­]qȯ¶n­`V·×‹dÄt–\/g~4²´üŒ¥Ã0µü¾I0¹ïÚk¯u}æ3ŸQÀ¶0í•öÄvµÛx 2K¶–ÅÈÖ²²X¥ 7ÝÝ,*ŠUÒͲ •l¶óIñd Ee±JÁÊddxYeŒÉbÆ`2=áÛÏí*ZjªÒº_—w½ë]ª´®qÙKñ¼ j/Ũ_ÁÛ$ ýÂC§’Âò.°•´-Én©h7 böJÑI@‹é'’UXþ´´v6*ܽlcG¯–…J‚µ Ï|X¢‡®V€6L¨¬SßyL9äPL!%¯Ûþ³òàƒJ;.\éÒ…dlå¥diõ~¢P/Æ¿½ÈÔÿôc`%¾é0HdU”\j––ûCݦn(ìÆ@Z‚*²…•V€–ë“©¥¨Æ2õH–úè‚ÍPõ©R.OZI{ºÔ& ß!±«†$4ãºvÏé\`7zJ7ª…öªÕ0¶(ÿXÒž­?ÙOwÏb“F@›@²Q£-­¸º ex 7‹¬.GVvËÖ­Òk7¥^ìÉÅ{B¿ÚÉ@%{¦Á«~¬§·d¯½ø{çƒJa³I€Ój̬¹-ÊpjM#K»¾´:zj+ijõr|¤Ýâ|IZAwÛp¨Sr¸kÕÀv®ÉWø#k'3PÌê¦ç%0ݥ܌Û0?ײ¶WI7«×£—­ÒäÂ˶RÐò‹EZ¦ú¤u¤\¶@g„d@ï$@/þè#(÷øbiÝJí®ögMP»Ú#ÜlqX•äÁ‡ÿÚgeЦºdª:YCÝ!A2´ ´¼óeÁ…™­/T´ìtÛ‹×)@Kí¬U°b+m¼ÿ8î‚gT³è™í2›?#a˜3½ûçß'<ð€‹JVeJ—Xºqœôjµ¬$ÖÓ ¦÷ã+k¤›ã\tý½ ÉOã"OiÂÁ<Òµ Þ H~ÕE˜^­ÖÏ€ÚmuŽ¥´{´§"`å{f†Võd.GÍ«ˆ»€—ÔÕöÀþs~¥N]¨¿% wö…šZz« S[M~`%#0·Å› ?¤óÒ—cÍЀ–Ïù=õõöñ© # %»F„FÛ>sö tÖCÒyZkÍÊ6j+m‡ºZ]ìBƒWýh·ÜJß#Æc…­™%˜ý Ì&½."fͬ“mך,F––zfs¯S¶–ú[cØâ €íÂTV:ãW«`k5°µ“Y¥Í¯WÌý¨Z¶à„Ýe;‹ÚYxÙúæ[m›&¸¦3‚¾ÍÒaj㳋Îéð„J Ó¥um]åš>µ«<ÀÍæ‹#@@ûåÿü¢*¬ÀwÚ§wH Ó.SkÀÂËYXÚÊß:´,Sè„¡%  LÞö¼d#åÛ4OÏ‚ùm™;@Ë2¼­‡®’ù®³‹æÚ­´‰‰ùÐï|Rt}üü¸ðj¦vìÍ›Bæ~è×3bšŠa€ä@@³þ¢¯j nwÞ€©[žàk êu9x©­¼Îë-¼@½ìñãÇÕ¨©odZfËk0eUBcÍÏì\(ºYâk;NÐÆþÐÓt)Ü~ý¢\`ù嵜º_IØÉ"X«pßjÁý8žTË¡|MK/ hpŠ3‚V‚ÎááaYÓ³FM;)|R­©tJæà€133 Ö¯4»áþ~É.ää‰ÙÆÎzTëKµÏ©«ý!ŽJ¯3(AøªE²Ù[ÚÝèÁl[…s”“þ2Yì ÎNƒ…Sv]sͲÅ×£?“¯j…oôç8àŠ ~\Û·owÁž­@¬‘sǤS®†‡í B`›wg¤m|›¸sÖep l'·¢ü-¼i l+]ç([Pž³pY`©øJÕÇxý"97?ÛXö¥eò7,(uä½ieùÕuì&É„f@¥P¶>®JìŽoÙ'ÇQÅ ÎÅ d—¶´nÔêo­ù¸j#ðÁ~°ðÐ7”éöÃjÐN¬E¦¥·| j%€–™ Õ‚wôñ#Umûs7¢ Ë‚Ì^}жYJÒ‘I¥;âB´©±”\íkå®»îb2Ø"Z à9†éül‰YÀ‹™îèm7Tú`ë°üm£b'úP«§ÞîsAyÂs¸Ø| Ssµô¶­Å ŒzÚËÁÊk¦zXZ3 åtr%@Ëñ-&dÁ—76v¬%=j¯r˜´Ué;c©\§t¿*µ§?K£•…L­nÃüHÀj"ÈvÆÛò£¬­_æqÓT”y,SVÁ?Ü,¾szÍê0Ú©é)Ù4°I´¢G] û‰„K–.­ø^W¢í\Qg®ôã¸aý~“w5ðœâpÓj1²Ågų¼¨bVð,`Ù] ·Í„0…åtqñÏvÀÚ«UÔ"J– çŠý.¸ò ôvŸÚ#³]'.iiÝ¥_žî}ó±9 Ú¯?ùe™n[´þL›Œ­ ºžò¤ h'7ï·-í§»F -ÚJ?p½¬Ö.Ц;ÊÑô2ú‘€–1s­=PfRXÖWYª\62²YFEn¼îuJnðÿð|{Y­ÃIÜ‹zÏÆ8.>´Ün›€ÕiÕ%æßQœÜ¿‡“6®Ç뛀cêi_ 饎z¬¼4 ea™0€=/^´ñ²bhõ¾d’-TŒ!Þ´“48ªÇù@o‹ Îi©\ö首íS»šÅ¾°l®9ò˜þ×ûgþÌî5½jÙ‡zƒÒ.¸¼³ÐÅLði§»–HÌËÀÀÀâ&Œ€vbrB6n^ü¬–'dey<ð8ˆ„#Cê8°jƒ‰bõï¥UËÎß33±[q<~¿ãK7ãûùÎ _…Ìi#ÎEïÆs½Ì¬yœ&‹ñ7JͳKË6•­¾o§a%3"°)Ü{ï½rèð3¥ì–å*r IDATI0¶ÿ?{oeYrÖwF®ïå¾VUVUfeÖÞ›º[Ý¢A@,`$-àØÆbÀ>6ë¶Yæ˜ÍÎxXÌhìÀÌhl@€-IÝB´„Ô­V«»º»ªºº³ª²ª2+÷=óå6ÿ_¼YñnÞûî½™ïeeWå—çåÝâFÄ»Ä?¾ø߇«¯5yÍéš”†U.!£¢_x¨—üðUëKÝ|›¢˜uÈ»A›¢]6åÁìR~¾f±Cs€XX€,ëAq†cq!x«dddö¨´¼êKEM@Éõsí–&Q§Hjm7ºg¬—„/¼ô´ùþïÿþ_ù•_1»Z7ý°Ø^Æþ¿ýˆoí_~ñ7m×ă@;Ö‡óèâ«R€Ž¿$€¶ýÜ[MÕ†¢w¿µøƒá_iÓêEdê0oŒdÍ©ãŒJI½Çˆ¦òÓòiñ|঵JåŸæ®g¶C#  h xLxoW—¹*ñËšÆs ¶\yQwüA (­8@Û,Ï:K-`–p¸¥ÄÑHCú0Ð +‡¡Þ0”J"y?µèËâeQSûM³kжñg–NQŠW;1>QúäÂQòÀ¥×Š¶Ñ–âI@Kà‹¾c}›yìÐb(71™÷G|ýÚu{/ó®¸z"­+`ûºê¶[⸰n,·Wm´¢çÄw5LS‰m8²_Ò ýÿнyFË=¯ß+#Ú÷é}*7 ¥þðpyÂgcO‡EiiÉcZÀßÍRrNß÷^} ¾&;K›{Î>jfFGM§8¶Õµ6ú”€)†ÌQâ/t\|Èö=í—2Ý/=nGdئªÍ)ØèÙg \×…Îk–/›k·6øš ´”55ð¢Àps¬k0€ñrû¨i¾vj³Šä ÀEËòÅÈ+k¼2`ª²–¼O"\¨ÔÝì4ŸúÌÓàø”ƒ°Lêôaœ<) _™Ô9÷–QË9'ƒ5>ô¥8µIꇦ÷;ä‰ÈdŸW'…Ç„~ ¨ ,ìW^ÔÇjjS‚Z@,~hÑȉ%‚–òh&ñI'¾6Mª?åîÎ¥«ŒÏÉ¥Ž^š—Â;ÔàYV»šÊ—üíÚ6ý˜ Xôæ¶ãÕ†„%áÓºŒ2z WÕeZ>­èSSÓÒÐöoº,ó-æÔ©[²Ë#j‰{0ž<[Äie£ò8*PûŠÞ»úTB‚šØ$e4 ð½¤oË7ˆwZIÁÓÂ% ÌŸWY,¡ ¥ý^Ù_”§•ïÔ²’’Ñu¾®²ЏN§¥}øá‡KVƒï®½úK|‹_Ðwð›Da(%[ ˆ-Çö™ÏBT„ű}ÙÛ›­_6fÃù³µKM&3uÀ R(­Ëº÷³šq~?ŠKÅ;AÃô!ë—vêx4•޳ˆ(f]x]?µ©-ÎíÖàµSá(Žïü¡Ë¶ß8ýœY?š÷^B_ùk¿ök·2©àÚ¾¦¶‚{·f  ýÜË7> ­YËšÑþ/„jh´“'ä^K/V)ÐnÔ¬%¢àŒÚÚÅC×KekZ/Ég­¦jJÚìðS;Õ¶ hëg4Ýx½×ÜÙÆhO2µ’ÕG1§Ž-µ¦Vd{—K“»S@ë×…¼àÜþ¨ünâìSš’à¾P0z°¼`$˜ïJ,˜’ÐZ°(í‹´ø…†dÊݧ0UÔÔÊÛÏŽ}Ôºûo¯å–%eÙ\'~jÁƒG0ÊÄ—mPâ\ryµþù¸üJ* Š(†´±¡ÑºTBC['®-â-~hG¥KhVöõ7^77uA8¯çp¼VÖø‡¦ö¦ž¿r ?ûÊÇÌlë m‰cLé×™±c[5 ×óÚ[h!²G Vši-¡³q€–À u3òYûЗ£Š6™Qù”î±>hIo ðk/˜?øi|/a™0MÍ´0?Þè4AVÔ9¬é£OxÛrɰ´ L§UBp ÆïŠÊx^.´"lý ¨ ·[Ò]Ð^¹rÅW¸šÐÒùr¨qôo˜±Ø5eRêuÁ«±O[Ñ’VKKNÔ}u¥ôÀ3X"šÓRRÊWmMmC¢ù© ‘›#f``@ôƒ¼öÑ´ããcfàøñRÕ±°ˆV– ¸ã+‡?ÙCµÏ-E«`¥˜¾&@Ïݲ~kzŽYj‰¾¸ˆã¹âžÔ HµkPI$´l„62˜?ÛGuî+#% ‹æ <¡|®ß*à|RïJ”Ñó1¬k(‘&êܤû{Uõ ˜¼çqZZÎES{Am%/è¹ùÍܼ¬ï=ßü8غ>ósóq«±…c»R3oFÚ¾hºç0™›MÝR‹™k4¹†¿·d©EÑÉFNX·ö¯áµÀú“½¯åLÀ*œY”BŽ3[œc~ àµi¤ß.ƒiðÒÐõÊcò¬pϦ({ýä›§žzjã‰'žØ:f²ÍíÒ_œmfºÚÝ×îåüòÕϘٖAÛÐŽ÷ÊÏÝR›©YÍšÚ¥fS—k¶ÎšY"¯=j—‘ÿdY)¯= ÈŠx;úÛ¨æ·fúÖ›%q~–ºG,í 2OÐfƘ™{_ŠôY[?Ùe¯ô[@Ë(–) ¬J‡ÇÏ™ßúõÿlÒ¼œ¼Å‡KL]…Õ>­³¨ ;¾}cÊó[bx ÛÉ×?ç˜:Z~Óê܆Õ|DÚ \iááu¼aèP§º›BÐ…ûvúÐ…¡Ãí¤®%H!ðµ±þ5YާÀ‡“0N툖ÃG-eÔhê=‰ä5«·êw„4µ“óéx¡€®Rp !YRihÔöõõ…ZëP¿¯Wþ¢·,€Í”¼ 8W\Í¢—*Dã¾–Czu>)$ ´Â½f@ÿ¶€Öf=V¼mð •CÎ(xµ;‘ëz§Ÿ×ÐHNØ8 ë—§vºLmìç믨Å06L’ji9—ïÙ iuÃä²!M*çÒj“ À–´–®÷‰?´î¾¶hlëV[MÍX“™ê• ÊŠÁÌ‹¦{ð1Ó2|ÚÌö\Œ,rîÀ ÉÌ(ˆÃU̾pŸëîdfK-g6 Í.`4ÊaÛ¸k{CÀÜÈÛ_þå_ôoºjý¶ˆòRàÒäËOõøK€S"y£³ä Ôeá8µnÛ_&ÕÔ®äVÌŠ¢v!My¾ú¼x°ø¡µ”ƒ±Q v¡&ø‚®,Q´²â…ÅkèÒ¹ûå¶“.ÑÐ/-.è9ycXÔs°ÒØa.½öZ¸¢iå'P‡6›AW Ü :„y˜HZvšt`ùk]^mÈ¢‘}¿Gb0aõ:¦k¿¤¶‚"P)Á À±X‹7À´ƒ P“hi]ݘáÂ_mPÑðUÙ{wàG\ÆcUÛÿŇÍ!¹ûÊÕΘ©•Aiæå&nbÀL>çªP´œ•û,¼ Ìw_‘­Iô,ÊŒ¼´_yÀŽÅEç$D®åÌŠ†ç Ý/¿ÝRýá îÅ–;dTæd‚ /½h~æg~ÆOZÖõ}P[Öæ¼û2Ðþðÿ°šºhW«zv@T¸‹U²ÀüªYÓÈ/è逑%šÕ$€–ÑåzÜôèqb]“hú#(uó­Ößžóõ Í*.N²#=ÒÌž´§¬eÍJû”™?yÑä"\|Ãß’Wëåû¤¥2?ñÃ?oÞÿþ÷§C*MÌiiHÿV|S(IÜzIìAuxåt•¢ë9­«C’U‡ò6uØü@æëêô?­á?J‚öÖÜJi€~Ð'N_)Ðâ 0‹–í˜hݹI-à&¨­°ø\|Ôž᣺²Ò.Ñ.çt­µ…v;ß‚ÚM(@,lʽ\.¸üúX ¬AVP® ]3G{woÙÆpmL´‚ƒ45^•w½cÊ]½zuÐ×ÛZçŠknvn3@ÂŠÚ °Zi¢[ëZ·”¶#ZW¤©äž¢ç¡½pƒpoÏ6XÞt³Â¯ޏ/»dýëy‡Þ9Œ·â@m9¬_>šÚ‘ûï§)Çz˜±X-­«ÚÚqµ—j1㛊׃ÀAôÇÿÁÔ·gÍÜêMÚUÓ3q<Ú åJƒ¦üªÓŸŽŸýb0›-ÛIiœè Ãðx@ßì‹5*›“Q™é÷¿ðê§Í‡?üáíô£~þaëû 6¬Uö÷%j€÷¾÷½ÔÖ6˜œFa]o˜®+ˆç3:eBÆYM…̼œ¨ŒúÙN3Û{!QZâ^QÅ tF†üàÿ h[Û_{HþúVLõ>Óxù¸ÉµOšÅ^t /¤ ;ÓwÞžËyphçäÎçï½ç1U”Ð’rQJ€íËZ¾-`‘Þjj¥ )—D…Ç-WþÁ|®©³¢\ù½£`ý ÀŸìóâ3b<Uá­pò´ïD\±†ùhojÀˆÌ¢A ´Ž’¤>´p¾ÁTî'Z"7\.µ®>ÔC§R¨òQ[S„„Ó»ólÐÑ^Ú§CPŽãâR× íîê§´]†›“æºfj¯ßÒÐå­µ¥Õú“E+ËýpÈ &iAkƒ´Àð™-E ÜtOÌ™ Ð.x;@lðZïÓû÷½waâ<@-à~XÏíJ£ -—Õ³F´ÁJ‹3sxÿཞ|è¡TEãZñ µ×io`‚–öþhiý hjÞÛ?ÿØÿkÚûÍDî’ÕØvŸ µœ;)ñƒ¯?n&ŽXþ¬ŸŸ¿>sôUÓ}ñëLËuÑŽDÓ8'  Å ý·lñŸK^SÇÅÓ½ð¨õäYÐ~ë·~ #ë ü÷’®\þF—+÷ý|îèøÐ‡>d–ÇÍô¡[Pê'FbNúâÐÖÆÑ0ã¬r‰·YÔn œÚ3|°€Xu ŠfõyqÕþoiN¿¾&7xnÜöuu̽%„ÇÔÂuÄuÚÕ0@K9hq-÷1®P§óÜ¢©UGhrB—^.N-yVWË©¦ä·+A°…iLCáñµtùª ¦ 3<ËÔ'›RÎeBy‚mv-ܯΎNÓYfű}tÂ|=^D9À݆Vç/œßtÅÅt?ZèMÐ:§ÄiZ“€Ö°:úûzëj̰4¹Á¶óÓìözŸžE|Ç: ²?ªAx9¬+‹¥ó#Ë –õJIÐXŒ÷ýp7¦L|{?#ƒ0'Pfô.ûZÚ:=cQá°Ýy¥–ô1ÿìŸý³çŸÎÌU›¥5)e–äc|ÀÌu †žºÐ.Úßø±’ –g{^3­×EW8 %NŒ·!GCð½B ×Nh ]¯0+½›)uiQAMÀÑr˸U­)Ì.J£JÐöA­kùýeª€vð¾ïùNq]oZ2hšÐ‹Õq#2¯4ZZÀfð‰Ê˜o-³¸©mJGô/_› ÙÀôθ* =j÷ùј²;Ëðï>u¸_Ö”ûaiù† ‘Äüi®°4i÷÷­e¦3”ª|G?(•.x ÍPª€..´.nÂXFi‚ý<áñžˆµtphh@¸éðh»åo²”Æ­_øB›H¾¾ ¡ÅRÝ ð¶£lOÓÞU[܆¹²Ür»XKHè«6®m\]Âxµ¥ÚóÌeÀZ8´UòÌP%­ìøÄ˜DB1hko3Haø†¦G#èå­îz‚Kg¼wXZá/-? Á´»½½ 0Ù¬çå7Ô†ôÜcèuV¿JÙà5òþVÚ‚o,Æ»Çû}æôé`Ub·ñ€0çi–ñK{¿´×å–ßùß©úØÇ>¶ñsÿæ§ÌÍåsÒÖ^6½Ó™Å¶á-¡å){®sÐdçd vMÆ`ÒÈFÉr˘¢1mPéć“44„¹#¯™–¡32Ô)¢ R3¥V›+7_gžµÅ¢4zãúW¬›/Û²}÷AmÜ]Ý?ÚDE™ï*:¡]TZƒµe˜¤ÕÒ»Mª¥µ4…¾xšBÍrƒÁ)t˜,t™®WS”×Móºü*m>ZØ=6ZØïþî­}-ú8({AS¢Q4‚.ô ô–SÒ†ÇÝiÙ# eÐ [ªBÁcghqq¯óé‚Öp{ÚŠeU üdˆ“wíð°: uTÝ2[R¾q€ÖNÝ€£ÜØïŽ9¤+ØÐà:AOVλ hÆ T)É×5Y?²¨ 68¿Q.¸6¬ŸÚâÁY0uõ³@Yíïû¹-uîÔä”ê‡G‹h¯^¹jZ3ÝflzÑœÕ>ù–¡Øuk¸­$hµ•(üÃ@ºFÚò ô Ôþåšï!˜¢²Ûãz>®oèwMíÍ:~b¡œÑ€ïÐz%µ¥QW‡Y¥= `,æüÀ¥ÝŽ–ÖÕm-<ڵ˷' ‘¹sÓ,Ïœ9cýÔ6Öt™…µqKChï×ÌèùÐl¦^0×e ¶ØjàÐF ¶..ȸKJ§Ð‰J›††@_ pEÁDHß X7_/ks+áækÔ[~;¶àÁü÷ÿøš…cÅž ¦{Ì’âLGIZ--ô$”‡ ÕW*=é 38îl0mvê Y¨‘ìŒõ¿wùÚ³æü Ò ^¿ŽÒd ˜©· ¨õ´²pkÿF€ê†¦¼Ã\}Á§=SfP»“ð¸Þ¥$ZÅóÖ0™(ƒˆDäw¿(üGUxF|JŸª€&0Œj{ ëv‡þh¹·H—:¦  õy¯6‘÷° Oe”DϹ< ÈýJ³Nm²TÿµqQÅà܆¯é™iÓÖÚY4ÊWð$ðùÛ(×ÕßrUE9a eàp¸'ÏLu€îlõ°¨µuæô©SöÔÓ§ó˰|ʹoBô„J®W°§9Ë¿[÷½Ò\¹A{AÏ—Ú {\¿{õŒ0%¨}JƒÃggÞÙ \ž^_¿v›ZZ×6}j'h¯+ŸûÊÄ¥uyûK¸¦Ï>ûìÆÿØ?‘WŽq3³rÝ4Ï=b2ÍáFc+Yƒ5ÊLô‚ñ“ym¨ŸŸ¿>×}Ù4õÇ‚ZÎICCÀŠ!BýÎôoÕÏ•6W>ä}mîl†Àìo’ Fþu„­­ÃRìïÛo@ @ð^è¸V´·uTS9ò[--#ȤÞ¨ѽk‹*WØ ¬ #ª‡ÏNô˜ùúaëüz*sIÓ¸µ6ZX¹‰ì~Ù÷І€¶6LÊíΫ\áqÃê¶-mj@عiö9ªÂŠ.ðo5ß&€ö߸¿¨)ç«ÒZ(.¨ãvþ*¡hÑ¢vê-ÐèD šDŸ–®=°¦€^†€å ¼àꘌãüªÃ ÅêCx°Šo 3Ï©7ì‰ܺzº%vU<]'PA('(3Ò‚âYà¨î1âÚ©é)ÓX'×M уŒ`~;ÙÖë šøZëe@'DsÚ¸´iŽ`_ÐóügYÿ‹f.~BÏîokù¬öµ È~³^Ô3þ?‹Zóš­xBÛ§õüh‘N¥ÁÝÕí’ÝðU˵áÎ Ú+;‘#ÒjCã"‚Ø=!³?õjWì(Ê!ê{Ì“O¼Ë´× Øì0C[%Ó=¯ÚpïÍ£ùôQéÈ€‹Íö7ŒJR´öèù¤í´šØ¢!øÂJ‹67×’÷ÂàN]ÍÎ[Î-þkË![¿åÈu?;¶ìÈñ_ü Y<ŠËø[Ÿ‡Ñ_”¤ÑÒf'¥ñíLÖ)SqÞ ¢Ê'œÁ¢@-Qˆ¾¢,»Òe²Ò:ÿÎÿù‘ØhaQå%Ýß©Qÿu2/€=¤ŽÇÉ‚êÂT`½>Äå’r‡Ç«FbNS—¶œÇ}ƒ3¨ ¬¶=ªŽèêh†$|ê”üöœ¶k=£ýýÅ€Õi©ˆauJçSÂêÏñ¨<ð0@7.nÝõ°\Òïà ?ÔnQ%\)qFL–*â«6Hg¥®Œà2È©ÅMWPS‹á Úåc}ÇìéA@‹Öùh{«yn,Ü’?Xæv¶uvvYoX§Í`‹_Ö“ºÿÛ_{Qù@!ð5°ïÕì…ÓÀ&ÍŸ°Ñ¾±XÒóÊ•í1œÚJËÛtŸÓ7šÑNß7¤ˆ´;É7ì\fÑ`>ýôÓrñ•7[^ž7d/´Ï”ºóç:¥…èT0¹t„Ðíº=Œôø¶M”Áú§U¤ækáQÌÐàvž[ÅÜ|mïÍr­²¿¼ëZà·û·Í|ûPÑu£¥µšUþÂ$ —ÖÔ8®+§q´×äÚ¶úïsÇÝÒ¦+x3pûüeCAK˾¦•óë¿öÛæ‰2…ò£Cö¹–~¹¬c4 Ã0BwZ@«KÏrJ%Ãã†ÕŽÚn§@U@k ¯÷;E1€rðºÀINÿ¬è C½çÕ©N¢­Uºƒê\ÕîL1vªþ((}Ïyð&ߣº®uÑJ šÜ&• ¬ vÑ©œ·ìÐGmê “‚eúÛö: š:Lr h¶PÇ(\~¬ûT‚à±à6ï߉kc·¾µlì.h †13;cß­cýǶzY>¸Ûå“!ph“!P»\“õõNr‡W‹‹¬$ ÖØ—õ©}Ê`ÃꎦvÕó€–¦’û¼C˨´„Z nse0’EK‹Ÿï·TÀ@,¬™’ǧë¯þo¿ >â¼™Ê]6GÆå6³i"Ôh ° èí¸ü õ–'ûÖ°$ƒèæ„!t¡!t)‚XoÖ?­Eí—ÀA!sƒææ o¿ù;ÿΠ8‹ =ÌÏßÞµ~k쯗l§³ù'éGÌòáb™U¨YE,‰’4ZÚÆ±ÞÄZZHéEˆó@P†Ré8…a¬õ¼©[k2Ý ½æ‰2Ú¨6 î‡_‹¶öÉ‚›ŒÄÊõk7Âãú×uS1(·[Æ.ñw;88hÝvu¨cƒ »,.s¯ø„ðiq¹¶¨éÄAíËišö†êþ†Ò<%Ð;­ èѯM¯øåºâ´¡µju~Bl[šÀqrñª\nM­+¬”?Ù ptçZã$OX+éš*,mT¾>ǘ4þ0·œ³S¹ýötÐbÐÇu?~Ük¬©2Ë;Ä´¯¿ñ†5îƒWÜÒÚbúEOõÚBSþƒ3œÛª•À^ä™Ó³`Ñóe  a‡Í¶ãjÑÀc±,ïK„×-ú¦®îÔ^Ô÷áÏEïø).ê½&4înFcõúnÕ´Y_–_[ÂhlâÈ‹¦ûÊ£±Fc¸ÞÌÌ ¨&¡ËuB-h,}uý¥<'`×ÂìjÓHÿæì)v1³…0ºQy&Ù¿;w$IMöÓìùÀãÁB@KÛ6¬ˆ_µò%+W!a’VK‹ÙäZÚ>ËÏ +×߇<ß—Œug ÆzS®Ç¼û»Þm>ñ‰O°¹krP kL‹  ÷ ࢵ=£e9e7ÃãRo¢‰Á?»Ý20O³N.»Q¸õGk­:&"páœÿ”(¸XëS'Ø,¾\}¡Ó‚l3-mÒUýFu¯¾, 0¥wÈ^-¼í*ë°Îl!>@³; ÿÐÔNë^£ö5Á~š­—Ž*FýÂ8µae. ñ8?µÏój‹}Õú>fIC§Ú 7BË:mñÂü‚¥‚ôôÛü‚€–ð³'OžÜ,¦A Vä’Íí¤+—/_±avy6úzûJÿ%Í3*]øÃ_Z\¶n€ªC™A½¯»Ò‚õÀ„C)Ÿ›`>QÛðã{Y®Nïù«¦÷èN+/jõ´ÞYíG•ßß•Ì5• IDATqân šË§P*ýÔO˜áµ¬'„#2«×à+×À°»XÐÂb4Ö&_c§¶z"ðSOËXÒº›4„'b=9àÚ2t:4-¾kë¥ùíxí­›îÅpóõúðs†ÈjÛñ ÏuíƒZÿîî¯G¶>ó~áßý”É.~2 ±ZÚ¸è%®P´´I]xUç2ÖåÖtÿËîôÈ%A¦^Š<ŽØD}ÞMJãÊ!ó¾÷½¨a‘é·{`M€¨V`(J±£éñ£š²ÆHŒè5å`Ön…Ç¥ÞpjwÃP,®bQ#ž, ÚUµµuä¯ã+YY¾¬Ìé¼CÚR÷p\yRÇvCFhUBSºO×tœèìüª<Àn“( ˜¤TGÝ _¾tí7š\tvåôQk3׿jÑJEËû©-~'ê;t=qè„÷jJŒW‚”ˆ¤yŽÍPà6÷ë³^o‹Û.(Ü¿  %ÿFñUWbÚ«CCÖu[«¬×:dy²quŒ;>¾¶ntïYŽéÞάmØå¢(l³9!àxNÏ^Þ¡Ù€£rqõõC¸zA-ïmT AK .m›¾¯Ø¤µ> m¹_ØA”ËPÌo´µkÒò7׿vÄÒÚ'ÌÄÑüd›ëxãë FcAîêÕŒ´¸-¦n©ÙÔ-´Zú`ëÕ{­ñØf…•ªµ­Ô …wžÿ«ÐBÃÊo¥ÜpâaÈ.µkžTÏŒi:eæz_ fm&O?oºÏ»ì~êo?nÀïyÏ{Š?R[rغcÔnm“ý=!-€Ç<û‚–v­~1VK›¨Z*´´qTW~ëÐÙDÁœ/Èëaí`u}Ùz<оóïÄÇeê),ï´ûp÷u¯@šÂrF£»w¯Z®®Ò鼃€pç\2i @‹ É  å€àÚÅ,4èvOþЛê81J[H~Uà”4C¤NÛüH®—& æ<—–Ón?.ªXX0Œß„ú9?µw.¸ÂÒ²ïšx¨i ©àS'üÝÖdjlpm6“•F}É ¾1h-(]Pý†èT×ñÕ8;Úcêf[MË5Íw­U[×a¸ô\ê1/^}ÆÈ–gCt@>ã‰$ý×'Q¶û‰î”ø½ßû=GŠ\‡X>Îr³¢–„‡›åÚñxTKËT™“ ˜)‹8‰sã—v¡î¦Í--\Ú|ä#qÙVüøUŒ”¤¹zÉ|TSgï7s§üÚy}à‰[¾[‚;¯S! n·Êwå@ƒà#G8uÖ¶§¥Ác_kˆ1¾(­¾t¦ÂÃd `Œö·„,ë~Ô¡µã^{Ð䷅ݪú†‰ã¯>™ g‰¶F€¾!+Í¿ÀO95]’&”4ó­íâ ¯mRÐøx³ÒXfíz¾-*½âØÊ†yi^ç*¯*3³\kÚfóÛ:,-¸¦Åã]^V‡ºÒ`êÇa çe) ˜$_u|]ÙÊjMfåÆšÙ¸>¡¼ròÜ­‹Q}WkD{8`Ì¥9{ê¢øª¾,¶OVçÌÿªrcC«é֠ÂU]×qù±ôv‹ÚP °ê×%nm-÷`/Üíúª8"KxZ ZØgë}piØÞr\ùtJ›úù‹M›Þ?4ëþŒëîÝÅS ÇÝ Œ†I dúûûÉÚã T G²õñÙÞ^ h£ÄÚïÐìJZ@‹f€*%OHñßôçþÍO™›ËçLMU™ÏÜPì#)†ä£v­†/À-Y­]¯•¡niY¯–_í¹ÎD –𹞅¢¨}~i¤¡ßʺÀîÂÑA»»íÕÍF­#-‹¦yø”©Z©±¸àß?û/R¹ùÚµÁVÞßÞlø,ßõ]ßeæ.oîc¥ãÆ}š˜‹œÂH£¥edÈ a<‰¸hcq<Ý87^”…׃› _µÅ§)=I¶†z­ë[¸ºõáý il¶gb@R©ŠÁ5$fùn `r/hjo¨óª×µÓ¹Y·>â2ÎjJ’¸S 7Lв6H['hyÃÜzÁÓÇMç/©NõªŸÆyÜZX0\¾NØö†\#u¨?( BȬ@³Ò²ÎÏ`-g@S=ï†ü+U€/²°P­ðÄÚ.ø¯]^†–!ÀX¿!P« !èó«¿ú«~Ò’ëû ¶dóÜÝOZZ9C&wR·$*MÌø±ZÚé2øŠö[ëòbÙ|ýd¨»-¼8©Y¹µŽk®IÌã$Îb¹ªyÍv,g Fô–¸|wûxŸ>ÚïU‡þ9üoj* p›V†Õ1pai5iËñÓC?¸ÑÄü:°NÀ‰~u†Ëê$4«ó@Lsw—pÇCgÚ $¸|}C1×A»cnéónݾ°å¢:Æú€;^j=¾v£$ªn¤Ö\ÐhvqQžÚ÷!uÞm¹*óýÙ[åá©yÓÙ$ ê ŸZX6õ5jß©iË]Í(dmR›0G›šn¶S÷fÉ\‘¡ÙË]`|œ8zÄjÊ«š×PmÊtú^´¢jSÚ¨ ¶ìþ¶m¬,?ðƒß/-í`Q‹´Ž „ÆiiEüF“Z³’Í[AjôW- H,"k–õáÔ:\»-ƒ3¡K¹õx¼¨œ¢ q})is›/ÞoªôrXÑ~ë:DÜ]^ȵ̒Èð}âÜx Ä ”+öt¾r·þÅj'‚fá[¥5ø[i #üiÔÒxGS§±›€–k%<-Ѽn§ qø{° Q¥óG«‡ÁV):à:öRé8†ÖˆN­­“¨ºgq‚6”.„z%IïçG¹¥jD˜™s‚ –}iˇ7Kû:P›ÏSÆiâĦ‰&6!ßÁÍZ=ßÐÊmnÅÐÄŽšÃ´ðk''&feà"žpkK«9qâ¸Ê¾Õæ\B«ì¨¥.ÈšŒä¸‡·¶á€Š÷Y8uiì ª÷eñ5«hÙóóüO»¡|²Í}qàÓn«],ð”æ¡ýIã@fÔºMó¯Zuš–Ö³œ¾j@XùAÕqëT…w†ú7°b¬Ù¯ë¸©ïÆY× ð Åk…3ø O³ ¯ö)ݯ T½{кz ØšÖæsîêWäbð¬©YËl¡6W/þëFü·c²ÌBøì•+Ó_®e‚Úü]%×Ñìf&»Š8µþ «Íy.o­øµ«ÒÚú²Ö8g>õ©Où»"×÷AmdÓÜÝ~OZÚùŽ¡¢FÈÌu[-íè‰gŠö^y¸ëçåŽJt‚ê5iP^~Ü’Ã-èoÆù°[ÕÃÉ:\šui€;/>jÆî+ί(so£Z[íè™g¬k4¸µšVÁÚËI€lv¼Ç¾À¸+!JŠu-€íÓj—šLõbÆ,5ß2ÛIX>¯Š¡«øÁÄGíNåk¥•zE ì϶2 KʳÝíð¸hi÷‚Ú‹.˜5uÒu>t¨¤¡u\¼¨ûáBØñ \Òqû ­šO ˇ}óz&ПXô ØÏ§Týta€9x ¤wàÔ?·ÔºõU+úAPlÞ ¢’qž ê3õ‘€V3'â>OkJü¦îÕ£÷¨q›¡˜>°Ìoç÷Q¶ødÛTÎñ·Ý:KèH ÊXg‰¸uwœgöuÛ­¢tÔ ÈÑ;Ì}ô¨Íà6ýÃMÕ5=»iA-ÞB0˜äý"ˆ‰[ç=@Ãʵ×ëµ ,ëó  Ðþ•¨AAaVŽêÃ?<´­mf–U–/Ð~›îÉ›E˜Yüø 3zv´d9—b?ò\ËZužÿw]Kr61—ló¸ó€°¹#fÅ‹Éóõ‚‘OõS[@íJû”™›MäâkÔF4îݼÛNküó"µÿõ¢fhÑ¿Üz¦BÊGKÛ?0°å9.•W©cÌ ¡ÑwÆbŸ\÷øïnƒÚVN¥‚/„•Õ#jZmmÖʪ7Šßóâôòl êàJvë Á¥£?M#Ë­cy OŠ2óOG#[;Óêï²ë«¢"È7™yê©§¶ îØµÁÙß6¿ÿû¿o:®m¶ΓfÙ©þŒ¬#™æ€‚°Ü1&çË—,Xt‰›¯t«±KË•-P b+AÚô‹p#ðØÐ8£0‰z±›®Ÿ07ó†i»a &§Ù&§ŽxE¬õjs±¹˜t‡4µü^i­þZÀW]hmKÉ®‡ÇUýo§¦vPÜ»uiA祡]РÔaÜè„KijáÜA ß¶VéD€ô_(#è&Ì?îÖ„Mê`s L­–[¸fêOAí-‘јMˆººP€'ø•Eƒæd] ­ZÚ0J€Kã–Zi_ß±"@K=ÑÊÒ‡õÎ\½zÕ@OØ—Mµ=e#ÜÏê€v´jzInœ:ÍñzE,såî•%b×å…b¯Éת=ŸÓó2­Ï • ,¿ÎÝw£Œ(—`þ¹Ô&¨“Ž[jZÝ~Iš0 1û|M2ç8àèŸ_j`kúœI8£Î›Ÿ³¿iÞ‡ -¼ÙzŽ›ÕI–ö (¸hŠÊ+l]•Þs½{ÐRg빡 t¤°ëÛǽw@Õç¸Z«à´f~–dyà¹:ú@\¾å:~DïÃTÔ¢f€C=áÂ7'˜•JZÿQƒ¸j0w¿òÿú·~Ió¹Ýéxêëô š-ÐÂk´Q%7…¹øs·^”½0©„$ÆbP¯ „^ÄJË´yùå—Cù;÷A­ßûëW!¹ì´90ø˜ ¯Ä’äÙãçMëå{4Ý_¬‘ 6—©Š ýf…Î6šïµ¾i+e ¶í€Û¯V+k@&퀜/»—²g o‡çƒaMSÎ ¼:@›÷h*-£ÚdAÖÎtÔ‹Ò>•ú´µ˜~[²„€Ú AV\.OôW­ÔKÀ,ÜYÀìßñÃLÒnR-R_@˜etFÈŽ‚°./AÉÕË•—´œq’Ö­—Í = 8c±Rõ°AT×°èchkg†gJΰ…J•´ìŽnx*pL᳄ šZ"u•èqÚ\ÿ|"ŠE‚h?á°>00°«W±^WÓòÿIÁ¾NS|oQçRiW§}Ls¥ á¤"¬9@ËÔý´8µêÀ\ªÉ*S«Žm^®ûœ€à0‰ÓÔ‚ôÀ´jƒþ9óÜÓâØa®Ô—:%•›ºŸKÄ¥wùÐ&A¾/Çì5¼ ÔÛµ—Ý‘â¾js9Æ7”7» ìqvTOŽFu~Ü~¸¨íÅ !QÅâÎå8¼Y¨g5@øIÍŽí& *Iý*‘Ƨ ÄÑîpm \SºõZ¯Ñ,Õlg,=Ñ]»5“&v9`掳ħ|ýD—Yê¹îï6+í“&;rØhf¹h¿¿±jýÖ¸‹×‡åN‡Pz¹£$*f³K_µþæ©âÜB?XßXÛUB¿k§ÝZb°0/öíz_RgñITÜB?8³  ­´h¸¦Õ‘¡ªs²$Mm‡Ú€ØñÐ\mr£d;ðè†$qç¨u°0ƒ®¨:€ÛÈ÷ IDATéQé¢öûšÚ8>-y ÷ir£/S®sÁy@fwm‡ïØk2ðÐf² h±\·ánh™Ž>}ê”—SùV[Êf ÁÊ—kqN»\.o¤¨·@O`–¨d×¼ÆÕ3Ъ¿MÌåÔ<=£¨Š•ü¹ò’.ß®gùYJ'Ì|ø4ö^ñ(ÂÀŠw«\B9¼Ó}f¶0èJš·ãÍÂuý^ÍÔôèº]2«o ¾ÄwK  ¼z¾tT1êB”ͺå³d!­[/Y5ËîkÕÖXl¶£$¨%ä}‚0AíjSžWûùÏ>² }PÙ4w×¹ÉÐkªV#¤ 0 DµëµÉ5Ni5»Iê°WÓðá¹]Ò«,¿QuÆ€Û§¿Ntˆ· h”[0L;ây_(wþä‡ë.:?¦8­†V×ÓZ°ðvå1í½¦N·Kûs2Rr€ ‰–7J8^J¬÷ƒ@‡Ë9¾FÔ•U*Ÿ9n¦zR}°Yê\—¾Tw¬Je@m Â$I]ÃÎcŸå'è´ íP«ßµkCðí”îS%mT=·³ßW¢¦ùWö\ëT¯ò¯ëÖ‰B–Tpë5®çð¨{Ið€0«°“q ¹Î {õ¾g!\º.i×+¢cœ‡¶NÏê¤ þú™ÞÐyOé›¶Û¼YÞÝE¯üª¾¦Ù¡|÷»ÍÏÿüÏû»+¶Î€Ñ`È®ºùŸ­ÅÁµ%ÃrS±«¬`Ê´n½Òz@ÀX¬v®tß³Ò"·nãƒU³\1<ýôÓ[޹û ÖµÄ]¾tš&ÔþAIÉ+‰1Y0ï4Û€`™xÆžÂ5T¯E?ÚxG°šZé ÜuÇfºÃLÝn9 ÀÖÖÛ/hz¸Üà¶Ò†b> %ç´´Ï,1@ñ…iP¤]?x¾Ð@†bQ²N-yû 6*o¿µÞ[/œ4€Õ;½äª¯ç8_*c4µ·|ÕnØiõ7® uZ ”§¡›µ|çãÇJe¹ãc6¸¹ZLõˆÊž+ÚA€ëòrÎj\ Àâ~æœæã&GˆÊ/Í~< ÀùÞkÒ¥ëöÝÛFŒí\Ó )UúD9èP;Ï«ýoxÚâ°ü–(áÍžÓý{‡¾­a¼Ù°ó*½oDÈZ vSœ[/f J…Ê]¯‘Fu%k=UË;J¨ü²¶°Ô¶úØj›U-ך¦¹ßË,ZE³›ô«kšÉ b„\ó„i˜8œø’sÍ“ñÆbn˜†‘pEÆby%\x‘Ñ=xúý½w` Øm|Ë·~³Ù¨ ײ1$‘ô… ~ó½Yè ~·»¡ÿ§ú§7&cÜ‘? P*%ÜÎD}I ð×4UŒÖöíêÿ¸]ÐâwµR‚ÏÊÑdÐÐdÊZÄ Q¥ªÔŽháúÓ¤œƒÇ´Š¾$᪆y?py“j>áûúvŽë›d¢}M*€d@šÀ·Îøõu`ßO»$¯õ‡ã¯æ¦fùEm¶”ÚÊ€vZÓí'N—¥vq›§-/mú mÁðʽr 5“‘V“"he{ì3•¶œ´éßÐcöšì¶¯Z®Ÿç{âBáöê½ÄsA”¸à _§o¼Ùí\Ûµ ´ÿEÑ5T¯Ýòεç9µ5¢ÄÌËWí-¯5k”­6Yÿµu9ÍXÕ͘¦…#¦kèQV ¾k-Xµë­Ú^«Vˆäz…&®ª7kêËéû«¤ BI_Û°‰± W†]í—´¼ÚÕ†9kEW\n3-WÏØ<¢þÙsÅí­m5«ÒÚú²Ò>e2cáÕnœ={vËÇpÔú­u—®3êá!2Úbô¹;Nªô`§µÌw[xy««D•ŸZ,vïViU§þ¤¦¿F pû›ÒÜîÜN <ÅrµmÐâï@ÕAuVÁ|ÜV¤ñ¼ø@m,hÔ&áÂF]ù£õƒo˜DµþD!ÜVê”D¸î$\Xò"­Ÿ¯o$†û¨$õE¯Ýº¥ëÈ×_µ´oC¶A|æzñšÛ7mKs‹Œ‰æ-ß¹¯ïXEíRAÃZ—[ÏWn©Üëÿ; +ZWdóWp{þ÷¨Í.­DÏÜžZé™Tƒí&ÔÆýZÚ{ï½·è’Ñl}÷€/‹’€vÖOhWš½$¸ODS»&mónÊÀ@>Tîü„©ˆíœ¼ß.¹‘+5óf¥zÞ,ÔŒ™¦\™ì:gr™|ƒ¨:vAG8|ä°Œø¶ÒC¢ÊpÀzˆ5Ðp]‘§ö\ÑÖ@KW»Þ ëhõÌ-š¯Ìæ£UE•±ö§‰*¶ÛõÝŽ¯ÚíÔ‘÷~{XÄ0GAø3 ŠàÍâoöaƽ"xY˜RÝ}yU öI¹i{ìñÇýÝ_gÐX'PË{YH¬ÙRfvµË,gÇ·ìîÈ,âš«´&7xNý|{¨'°À2¿ö­†i6k-ó6rXÇø£Vs»–•‹¸ƒ×7óZîvùÊ©`qv{¥eZ³1ƒ¡ÇöAmh³Ü];óG4uÀr_k£9N´VR E-›’ƒkirKòf•ú¡2ú‘˜YuÐ-š¦/GÛøàöe¹ÂÂÏí18·KԻܚZ+\¾|Ùrc[ rXW!¸B©kh|@`àåA´ªa’ýÛ UV˜P6\\_ÐKøœZÊæ“Hšz’Ö7bóAmš|‚õÐNLŒÛ°·G5ƒ—75´Ú±ÑQsààP@K’••œ'êðtOÝ:÷„:Y­‚æµ=+-­C¸“„éõ i˜÷¢Äùª-WÑÒž”·ƒ \ÔóƒgQµO³Úi»¼Ù`¾•Ü~]ßI|?«Ü÷í²¦Ï:Õ5⽊Rh¹î†•n³Ø )«´d˜ùÃ¥Žff»Ì\_±–6dËfÍR£™~ø+›ûëÇD[¸qÄ‚ØæÁ36Ð~la3aaeµeÖäDMurC×_¤¹ÙµÁÖº ·¡à£6JSKä¯UMg”’¤JåQ®cpfâq²›~j© Üå~i.j*í³½.€Û·Êèßó“ÿEÓÌ¥À-œÚrEÃËí Í©“kOÍWHBài…Ù†ö4èÎ à¸húâò-e$ƹâù&àopBž<¬F²ÄÀü}€W^Ð3×ÍùøíMj$ôj“a“h™ú?&‹uÐBÐâ Fb€×œ@,×¶´X0Ð*€ÖL}¦` •÷4àÊØî²M>r‹õgÛÍ©²çUZS %ÃAñi)sÛèùxAƒ ü­úÌÃ¥/JÐ^FÃÀ…gW|îÍ>§oÌW5“…ZÙwèW©à ä‹i¹äœ´Îêz>¯od˜ñR¹Ê Ëç©§žÒ¬È i9Îå…zYm3SÙsa§oîìn¥É¬4&×ÔÖ-´‰';Ÿ7ÛÌ©ôJÝ\›Áƒ/¹î1ÃÁ8,sóué…OË…{mzßg­;?ŒW»jý–½KסØÀ ÑÄ47"7¯EM÷‘°†e%BïÖ-´šê•zËÅ©ÉizE–—‹mæe䤪”ÿàb¡‰¸mçnd¶ûu¹' žrËP¬ø£]éÛÏÇŽ†M-×*&«ê€˜ÞÚK·„ÞÅ ×I9ÜyáCöõK—,wÒj7ÕÁvŠ«9¥iÈ`pWnØMh­ò(úÚI—–ýtʾûàºtI—Aðw Ö×Ô’ÞQ¨[¹$¨©åšÙÀ¤¼´ žž²\V‚+ø€vU>k´UÀpi—mûCÀ mk%y®¸4ZWè]„u<øa¤ñ%xœcÁ<‚ç)'Áôù<ŠËqy,4µØ™žO_‚õn“6ZýóYú“ £™ðøRSøæ@õ™Ñ}žÈôÅwû‚e°?øL9cLR\AR aÁ­×`ù3*ƒ(`€Ú¯Ñ÷ðûô®Qù/ Ü~H3D?¡éü½.ÎWÚOßxóÌ3Ïìj•ÿäOþD®óºÍBm¸&6)õ »$ŠBK¥ ž¹ ]a¦ïUS?Ó%òøE$QàH¤ ý)k=)yxU˜é{Åt^|›íû¢i˜Ë;f®^ÎOK:Í,~÷"±º!c’æ9spT/…êØ]©—¦ÈíËâ·7Ë¥KÎòþ"+Y|ô²êð_Öˆ> ÔV Ø²eéÀ-´„¿h nÛ´ô-•·Sà¤\ûdñlÀ”9_ŒºàÞUné ãsçIl†€Hð`§Î~ ì´L*VË1ØpŽÛ­—ʘµQlÁ|‚×<îoA×À>ŒÒ‚lÿ¼°u-³:ü´W¯^Ù¤hGGÇ줫ËN nfAY¾ÜZL’0ÜÖcéfæÞ kN¡zW5rñ5݇â¡Ï½å´¸ãIÒÛ—ÐÁA‰*§A\áFùn f毙Å̘ýù…D\ÍyÛûû+½þ}ô>ùgfN ~QšŠ€A pQéú¥ÍßÛYqéž–¦õ÷d(qBÝCº.´/qÚ[¸=ÀR­Wg¡£#æ<üÌ.i²è<é`ÙòPÃê+¨`µºtÂ&ea]ŸF, Qÿ|ÀeÆuðœƒæ9x-m®³ÜØF[ ±Úfm3ml“¨r©k£Î'ô0š6m6›Ù´#7Gì5¾¡ £ê¾—÷ãÖËÞµ›uå9µV=pÖÙæýÂëƒ PX 0óÔi]õ|¦‘ë|ps¿¤÷¬UžwŠsú½Ê¯’ZÒÔ¯iáÒâÆ ™Öµ>úè£åÈ6qõWUêAý²x®âÒ¦ÁõÒÒæäÊ+„ñi£Î¯m1+‡·jŽÑÞÎ<ö¼i:wÖÔu™ ¯vÔFµè]²Ÿé‹¿÷=ïÕ\\8u€*Âmdk0•™’&vºÓ,uŽ´²Ppã‘kÑASq4?£¥ŽÓpóh~´—À/çBH¢­ð.´^7Í GÍtËÖÑçlóeÓ¾8`žxâ ¿J_?#ËØy}üàržÔG¾’Fc+ÒZí$BXšÆ¸ªkÂú¿Ö´ô+êÄàÄý…~k¸]¸r¾Ø·ÒàºÐì^1,™QGAÇ ÷®ZÇœ§¨ÝþàfgÜÈÇ9?ûéÈË)€Ä Ç2*Þ¨ n‹ó㮑kü¦¶9‡óçÁió¨ü,EÇ船§÷¨ÑÄ´£c£Ö•t„½ DÄŠþZí…ÞªC%ŸÏá_)W¦ËÙ¶~}õüR³z瘭hc»°Vk†dY¡¦kð—F&Uî9•û•Å}èWyß¡õGwyZ>®Î¸- ïñâÎ,>Ž×ƒo•K-¾µ ñAKüâÔåÝ*'õ »Øm–¾6dfºM®m*Í)¦>†Oëg†¦vñÞ­}·KƒÆv½yÁüÁüÛe—éžØ¢S÷7î„€OË×g="hB˜˜²ña×2²lî5“ýϙίp% ‰°€Xýø­j±¸vhÖƒw"ɽô ¤ ļ”C¸ß—dÑÊ¢½W`ù»õþ6è½ÖŒK0ZçÜ)‚/ ÄÆîÒÒØGä²¥ù`¤/Ú8‰×›NÔƒ©ÃÉgL9Mí‘ˬ&°ÃâÁÁØôÕËù!?A¢¤z)kŸ6˜¶vªMØ#? |àÌg>ó™Í$û v³)îΫ©•.pA±qœÅ{]n5 “=ÈθTdýsz®™öWLj9áàPÅ´µPL?fê;¨­ÍÕO›UÖ™ú’Íýë*÷: öéóç-¨Ø¾ÙÆ’¶ô„·KƒÃïoŸÞL‰Wüª×_iîÁ)uˆLÉÒ-¢yТÚt_¤cAËð°² ¼pJ2;çGiWéø €Ú$B^¥Ü~A t…ò9×ɜҠ êxIÂË ;?lå;Zõ`p`ia‰µc¤»!Î7‘Û¸¢®ÚÓ^0jÄxv;â8?"ËýÝ!-€ïßIiºheé ³¿•ç=h˜Å=)çóR5óv=ËÏ©>Nxfàà^ˆ}I믫^m:~Jëÿ:À¥&ݵ¡! h3Êg;ïv-ä]ÚN^•8瀾-ÔÚ2©w{‰Ý’óçÏo<ù-™Þ¾Ír-Ãä­Ò¸ª€ -[9©Á” ¸Æ7-çãõ ­+¯4|Úº©v³ÒMm°Ôƒ¦S3ÝbÞþž·›ßüÍßܼ¬}P»ÙwçÊ ,Ϋ6ÄåËÜ2ši;bÝl¡¥]m’äÃfüÑgbˆ˜Ìhq1C›T»¯K[û¸©YÉ&-¢­]ìÔy ;¬”Òl¦I¥T^.´¨äjÜ %€¢÷“'õ‚àh~ýƒÚ^вŽf—º`´§eÃÝ2Ømçòþõ&]GS‹~¹5µ>p]T¸_î³û\M€vË×6»/ôÁ]þ`—“?î¼í,Ñ ^õaÉ6u”VéÝšÔò }ƒÐ½¦ûÝ¡çø-ÒÆ>¨k ‹êÝ´ÏF¸h;Å•ïö4˜Û©ë^=gTí…†ö›tŸÐ¯ˆÓÒ~âŸØ•ª?ûì³ßù÷ßK=XjЧ ¥ME,h“÷í®QðO›„OôOëÎw˪ÕZƒ‘Øz6gŽt÷Ñoq¹öA­k©»tù¿ñæï~û“f¹g+˜uMƒؠǦnV@U 5N‹#;Òk¦S€Z P¥dæR IDAT­ÅÂü¡Á¸"6'ÕÖ.7ÊÛ@mvYþåùÀ—µš%3ßxÝ<þõ¸J„³õWb©ªa…øËªCq‚¶ö¢´µµwªài×]N{ˆC4€€XíÇÆipix{‡ €wL//d€ëiiF{µìÖÏ ìÕnuȈäìïZUÀ]ÏÞi%WÑŠ:þjTB†--Qµm-À6ŒÎàƒQ€EqÆdŽŠáçáÀ,ùà‡–´N[gm¡€éés"0Õœ¤ì7[ž®Àç ³X‡:8%Ì/ínAÞW–Û ýÛ¥go\å•[¨??&¾ö•ºbUï1Ýç  ^XkyDÏíYí»GËï-PS~QôŸ÷zß'ê 5J ô_àÐ|£·—·ñÎÐvIkݨvrßhø´ß&J™Ïë¬d @=hkí‘׃›‘Å@=˜ÉÆÏzf”(- ‹+¯–tî¿Òði]$±¨‹CK»Q'o5!ÔÎÙµQ-w—ìÿØÇ>&ÿ²ò=9*×  ­ßhk³7{Ú\û¸i‘ÙjCô‚Ÿ?ëK]æã¼+¤µi´µÖÂdïPKÙpk6?¶kÚZŒ ^ýÒ—L—×i`4Ö¨æ‚>’wªÐ)2u 7–¨ayCE<­nƒî¼\;¬«ãÅÊû€ÎwÇ×upHûÿBKF!Gõë-ÐèÀ“é,€T‡' «3+%€BÀP)™W[J Z³©8PëƒÓRå¹cä w ×´hßÈ4´‰´–ž¡ç²¯¯×¶¿Ëk//ktÓjã(áÝ{•çºæ÷9àŠÖµ¾¾1KíQJóUNÜþ$ÞJåáÓx¯°\À5_ÿzS/Ì)¬À3XÜtAó9¢ŒÏhÿ·)-ZÙ à¦+(<ÿ¼¯ø$ö 6áÖ"ýýýÁS¶½ =`¯ŠÍ¨ÍÐоMƒ~}¯/k°Ð¦ï´<ì&Ÿöé§Ÿ¶|Úɺó® EK-ÔƒRÁ‰8¡J!å º0ݘžF°ÔÍw-ªLa>m’(b$¯›ì0ËLJ²±ûêÆ¥ühX²FboùÆ­Æyñ_òȬ÷¼Ù[‹ÿoþ¶wšå“òn0zÄÔζšÕÇ*¾ºår½õúIâ6 =mmv¼Gq¡ãG‹®$܃؀ G¬˜Û·L£­m˜í ÕÖ®WiŠU.¾¾íÛ¿É0½ó¶·½­¢ÚZ|þî‡>´åÒˆ4ö¢Æ¼: æµåä=¾cHÚœ›º¶fÑ ÐÌNKÔ¥©J|Ó¢YòÝyù— Eˈ¿Íu Nè˜é ÓO¶ƒú=«t5úýuÖ=ZTçØªÎÎn1ûO;$8€@Rù³¢ÿ“×RJ–u0¬.î´Ý¶[RO'€Ðrµ•T³P;l;ªCö-ƒ É´hú¦äVÍÈ…Óéo&A[γÂ5;Ã,d¹Fø­hX®--ÍöºÙ·W%HpÏÁ±­¢ædô<Œêy¿¨kÔ½ÄB±”½ߪt'µÜ®@Uc°Ó¨÷× Ïu¹S]wY@«w @{º ÁÒõv@-v»!ôMïû®wšžÞ³f¥&\a„׃$ÔlLÒR0æ®N£¬¢],Ÿöø`¢&ª]h2 1|Ú(#1 Øþž¨zû‰ör Àµ«ªÊ? « aÛxyÀÌ<í€`Ûp£×,ôÆ^ÖR÷MÓ9$ŽìáäY2%Cûk¦µN[Û<Ùof»Jƒèù­m“![€‚@ÙP6펶ŠÃã?¾E‚ÑØ ÛOI3𵚎?YøR¿7«8í,`‚‘Hh’Ø×uFigýëtÑy/K³65Ït>cö·ÿ¦ý›Õyjûª¶GÕ†Ló$iû–huYÏêXx»ÕMë@„P§åŒHb¯‰t¥hz‹t²5%í t!~ýN;¦ÅõÓ×µ´âk™J”å: -åã‹c !á`vÛ^X˜·õ‹â¡º‚á°®ä¤]]ÍkXsËyÎ(Àµº¹Ó\œ7G,Ïõ–a×·×€+„ §î¿ }€ç7w]•¬Cƒ>ðŠ€+Ë!ik¡ð{H×¥…um˜fÉsBÛõè¼Ç<#w* Å£ËGhÏjÉZÚlBíp¿ö!DëÖ /Èë´+ðê¾i—k¦m`…ªZS»‘Ь·ËéŒfÁÖLëT§i™>¾YƒªÂ7©°Ü¨Z3ëÕ9Ù,ÈKŒÜs|)‰ŸZÀérÊиT")Ÿ–  \(túÁ⯙–Ï=ºÅHÌ–µyÕû+w] H[Sõc?öcŸ»dæ š¶K”lƒÅ£×LÛ‹&µÍíc@[‹ÿ»†mjkqßUjÚ%—ÖË»l™Å†ü´™Ñ„Ïýÿðï›§žzjã‰'ž¨¨¶–Ñý¼8´Mê€|Á3 BðEu3Z«´{]æù¸‡h–áiÒù¡1Ü2j‘V)N;ë_/  # ÄwE:|ÚrÓ~Ç‚éŒ;4PÜT>ÌE¼¤ß§•ï´ê° @—–îŒ2BÓá’’Äx P§©µAQ%ÑÔúšÖ@²ÐMÚ í%íèΨ¸Ääë-÷ °‚æ|Mw•î_¹eDZ¿¦f³L~pãòol¼5¼ð+/¯i]µKî³ÕIãjC½ê=a_v|ÖÔ˘çXc©¡ƒ+ñö.å«vXÚpŸ>À58Û¡­„ Eû:¨ßEqÌ4¯ýú}­ÎÌ:!R^¹„ç-­Ï£ÅÍÞN}Ñ–«~•ÈÇZ ¸´ÀºrÆõ=qþi§õ}9³‹þi?ð˜ÿôÿÞ4¯tË÷z³Q"³V%@jrf¶ZºyõÏM7̬¼úÔè:ô"Õkùåz nÛ™ÕºyÓ$;–Úå&; ‹„ÕìœYѾx53_d¸]?ßnýÕ»|“,Óðië¦ÛJ]À@ C1³QeÜaƒ‰}Mm’»r§‘¾ùÂ?m¦Oœ³oã•Hn-~h VP?%ÎŽx³q²“` -—ÏVL[KøÜ¶›Ê?Ô²¯±¹'îÒÊrKòWþæo¶€Z@îKØjzïo|ÑÚ¾™„N­&!`Šu¦Ëé ™²$4®Qq×£“vÚD§q ;oAeeüÎ]çV ¤"Ö¶Âú£ì(¬ÓÖrÑsU»žSúý V„•6AÄ?´¢p5£.úÒ8P € íàÊÊ;xŽÛ¦N´|H„€–ûÂ~w/(j€@…ȯ¿.€†¶´A†D¬‘†€Àí¬ï¿•uø¡.b–Õ° ¸RGKÐûQ]³•j3|“ü» 0ÑHUG§cÝ 'šžYÚÛ+î¯è~\Ó}‚ {T÷é„®ýAQ¾UïO)ïI\ßÙ‚¼Q@˜w½«Tˆk×®ÝѾháÐT;-ZZŒÄœÜÔsúÞ]µzg7ž|ò¦ªkÅ W?몰¹ì^»ß,e'Ì|ÃÍ}a+K·ÍŸThû¯igáØÖ¬dÝStœÅfƒA`Ürñ ¿‘Ýúm +ÇíKç­PïÈØÜùþÒ]Èä"ÄH»jý» ×ÑF¾ë]ïÚ˜Ë]Jl0Öp­7¨Ýn0ø:ë™e…åU‡ö­ÚÔ¨Û丵 m×ÌZm4¯qµ^£Q½¤M G,å ˜FcÿÓOþ„‘ÝÆ{ÞóžŠik1ûÒ§?m(€ZŒ°®ýz­¯ÔBGøiŸϘTn—K/´³7Î``ÂÍ,@jE ³KÛN[˜äZð†@> B”‰©Jiœ ÑóZÜ~y@ ¢Séà¼ÐE« ¸Å¾øEý¬VWÀã öuè4„Æ`) Zú€FO j åøçùë€×0š…KÐK*hx}«tŒ¿XP?Ú3h¹_Ú4xåš›\ N a<~â„Ý¿²’§ÌÎåùÓ¤…>à€+ië3²*×»°SàJ€€Ùñ4מ4íµkC–›Œ¯ÚS§Nj€Rc:¤q͈×;¬:_Ó»ñŠÞ,Fdh^­Vméka“–—6]Ö3Ž„¹ïz³ø¢M{ý.½´_£÷=(VK[xpŒï4ö»!?þã?næë奨zkŸØ¹vV}æ’µ )U"k¶Ïœ5“/ZÎa†sUtúÆ¥¶[ev ‹ Èm>­„úL®)ô¶fTWšôMײÇ6 ŸMíòñk‘—@Ð…õ–9S;ÖnÂŒÄ8ñÖ×?2›ýwz ¼ûÝï6ÿ×ÿwÞ†·3ËuŽ›Æ+ý2÷jc8QÝo¯ícX80dš‡Ä}Mj·–@ qÜZƒ4§>å €Ñt^¤Úœéüœ:<ÝO4©L‘c¨ÄÔÿ±þc¤.ÉõüV@³®Ð¨C=ÆY®nJݯWTýßÌû1²¬o¨àt/ì1W¤™^[7ã ‹V» 0¹§j×Í_ëÝ9¢çÁûµÔÞN¡|žS¢'OÚ¬Ênù¢uåo¼K+Z¢:†ZªpSÏþAÝ#'€Zì#Üv¥–Ðÿúù›¹j¾<ÅÒ±.n)ø§Z.lh¡cê~3s伮Ñ›€]@mm®ÙLÞóe›P ­ ~¦]ÑG{Lu.kýÒãê+r“òi­ÿYqj×³Ñ )4µ«&MÝðH·¾â‘—´àNo(þÃ?° 6‰ÁØî½FåÙ ¿ôKD»m7ÐÖÖÏŠêÐOup÷(¶–HbQÚÚ¹Æ!óK¿ôsæÃþðÆûßÿþŠ|´¢ŒÅ¸–&#øZø~Dî—Ö YÀà/lŸ”öö:ʽ$Le/IØ"Ðd-± õÛ®vÖ¿6—›ú´`OÛQöA-”¥à‡†×÷•­.nÃ6ÙçZgX2¢ý¦ÁÕ½gXÀ`ìŒÒ¨?pžî°p«[ÔFˆ°¹_£íèQà`6´ƒ£+pŒÁáoZì÷µ±ÐöˆxÆP‰ô絬h}íµ×ì ¤A<Õir§4{“ö•Á Ü\¸ÒŽ<n_°^•ÞÎêºçwCðñº ß8@ÕV-Ù?.v7àµA  Ô:õ¬ÒzŸ´³v[ë*ªÎ?Ö`b/Š5,TìNóEËWaVïXKa0ûˆh¿¾Ä,ôƒÃ#1­ß>•ºüà7þè¿ý¾™¬ÙÚß6¯ÑŒ^³o}!¶x4´ôi=dÔ7Môš©3·ŒÈQ åÚÆí‚¹€×º™Ó|íÔ¦;Ï…ƒWm?[9%°Š²væÈ¢¥vªÍ‰e/˜(Eû 6ºýîš#„÷Kc0¶|ð¦éxVž z“y6ØN0Q~k âÔ&ÕÖV¯fÌR³|s.J{´ÒjÖjD¶¯¾¥5%œ.üa.S!ÝÜá?ŒÅ¦¥ÄG­/-Aµ‡  –cýMúè~VßGr÷Šg„kò]ùÿ³÷&pv\å™÷é¾½ï‹zQ«¥nmÖj;–± “ù€ùÈ L>ü°É7ù&,_&Ød2aý… ‰$ßLIHp $lƒ‰Á6^d˶d-–Ô’ZR«»Õ{÷íÛÛçúžVuuÝ{ë.Ý’ìûþ~·k;uêԩꪧžó¼ï ª¸© @ €jÏ‚µ•$þj«/†H“iÿ(îq,мl'ëüH„ÁLgÔ察}¸r›X6i «;!0ȹI#‰|aH¿³zþkŒó™òEÕÅpÛ¢}Ý<ËZ¦M€Ê Ãph½Ì3u¡$Ó^@‹TÄõщ„Œùean¥ƒ0È8`a1À¶® _åúÖ >vë`X½€Õ‚UÖÅu‹«ý%뺒R ^ÝzWWÐôOtŸÔêZ]©æÂw­F,Ú+霴|ü¦´´w™“˜žq7Þ|³ùêW¿ºj§¢„ñ¿þâ_˜¡È‘ǨZh35EíæbÃ%°¹¢PbE“Ú9%QB›‰¡©­;·ÃŒm=h¤©Mf¼w!¢¼YDar«Ïn6{›¦ŸÜjf†Íd÷ɤ —ø´³ÍÃÉa³ˆ™"}¬&œÄ’,€Úd=ó[Ÿ‰Ã70á½*[M´-ý? NeÕ½’,d˜ŒaF¡Cªú;mŒ;†4ÂX¹t?Åó¥&2W¥á’jÓØw­Ý­Ÿxý3,79 éŸd¦Xº¶y—Xu±!Pø}ò“Ÿ0wÜqÇòÝò¸´oß>óÈ·¾µÔ¢«%DßÖ hà@öc _)‘ˆHˆ"Ž,áŸ;‹ü Ò3Tç?—0ËIÌ &-[« ÉüærþmÉ–©¦9_F}°ªD`p‘dûôÒD2LÐ6¸f^,ŸÒ2óî7¢sžÖuª4Ú†º°ЭR?Ãð­w ˜em;ö×h¡Z€+ýã´ÈÐÕ"I@O;¨!XÎÁê[µ vç®:ÊÕau‘"36—ž©õVÀª•$«c`0…a¥ß7jz½®ƒ[uôHn­|±Ç¢ýFø¼=CKÂÒº¨,ëCñ «è$Æ(á'?óq39Èá–Ye\Î^ñ.3\/°©멬~|«œ»æÌDKOªb+¶¡¥­;»ÃLl<¾ ¬®(˜dEùð:E2W•I3¹ã˜©8µÑ4XÂìr¬^\ pVK//;K‚Âw1dí¤™´À;ëubA_;' åµã:–²OuL@9À/Q€1• ôP6È`u¿¬~z¿Ž¹duæÑ¾Ö+&Ÿs^^ª$å({ †[žV9îèa-S³ÃÚ°©  ×ÇQ¹öY§mÄ8¥,@xA÷NåôáÁùF ÆÚ±¶D°˜æÃAõŒŒŒjý¢“bDN˜sÀó®¿R¢Ìé*Š‚cV`µË’ pÀÔö—®‡°²ŽßKÝø@}1Ç¢}DÒ™]çׄx†zYZî‹AÚÕÊ$†“ò‡>ö@@[¯–cë3ÔpÐÌ*tW*«ŽJž`¤…í8ªXà¶zÚ™†!…ðº¸=ÕJë›# îØÞÅãδ~Xõ‘í¦òÌ&ë›{í8g“>•ŽÕ›IS2+Ud„f=‡FjÌm¿p[²bP›´g^‚2q#åÝBÉ|èð^€ßæ'oË8lmõù.·¶x®L¬m‰ÌTYËPÄBD^ÔŠ©[wFA¡ÿiÜ¥‹—(>éù=f¸ù ÇçÖû§ãu=¦Öt›æè l¿üœÍÍš»ï¾Û9r$žo§€TÎbzÑ:g1×ïÔEFÀì§¥³õGF˜Ñ‹OðÕ¶ :þ¼Úº @äegs´´Yƒ B‘$øÈ %>f8™dÀ¿/ &†2™…­Ëíï ëÓŒl Î]¹ ©c¦Ë´L¬N/QúccÀ ­¬>º,KŠS€+îÎmºæu~bbϨ>À/àxLº×Xâþä6èÛ˯œ{GÓ˜¦„D{dŠld‹¬y\zUêtÀ~™**6.ó›v³@)€›Iœ#&ö˜Zïî̘öÅEÕ>·eqåò”­Eö¼ìIþ|H#ŽšûÊ-põV `Õ–`MÒy¾Õ/æX´œ*é”ßR…“X##( ãÙœï÷U?¨éï»÷=æ¢$ ŠDëµH¼Âºk¤îˆ™)ås7¹UN·™ªX»"¤—'øk©í»[ª¬|=þMi—‘Tj„ul_ðqam~eýë,{[wp¯¾ùQ3~cjàQ¸¯X÷YS~jCʉS›ö½t dì0Ö¡T¸}í¡Â{Ñ‹™$c°Þ•Ê^‚w%r‚²±f3Úù¼©m“ú »“%•9A|óÙë-°%v2ØVw˜–‰ëÌ`å!ékï%¶¸ô‚95÷„¶ùN¡ ûKH5XN¢xÍï,æÝææ‰Œð‚¶ËÁFhÂ9¨Rç`µ›—hgXÛJ]ÛÃLšè:€b(àNq£–UAÙläT˜ånžÄGD:½&5Ètå½S¢ ÔöH²°G€²ß)„ÄÖ"ï k~'±ÓµûÛÍûÞ÷¾°U¤,§çhü®»î2§'Ÿ6Ñâ‹+ʆM®P/1M£»Íx»œ»ªVã{V„tàÙeÙ,€v¾~ÂLw¦ÝÞJ›MÙÅ&3þêÅø·3 ¿òžSóÌEC|ªë¬@mâ=Çjkl²‹T'  ÖÛÃ…yC­Ûn»-àœn°¶&M›Kwá0Öðô>ÔRžð^x16Ù'Y²C)ÖÝtã —‡%QRY.À–plGšŽ˜XÅʇ;v´ê‚YPÀé–¡ë-ˆÌ:c~ ú€yßûß“·Œc0µ“ðâŽE˜¯ƒëÝvÿÔEFxLÃËDF¨ÓËk5ÍZØXŒ_íÈr®€–v;¦Ñf K¼YoA‹¦~* .ýx5¬4cçVnÍ|M©f^Ã"H÷mÇRÓ÷0ä~æ–x³É-û‡6Wö<›sy±ïã@¢›†=ßrœñjÛ¥ÎÆ¼`×;O]KËÇ ™-ÀôÒ6°‘©è€E2þÙ%ù¸Ú­G €YF²³õ {N}МÁóéciÏ _wà |PzÄß¹õ#€‡/<˜-¬~¡Û&Ÿª=’ö £rîªZ–,íN*k¤Ê‹JÌø5éÛèÚS<]ajIªpÛJ™C¬ûœô³çLÅánS÷“}f¦m@’„ ë$†su*+€ÚT½óÝ†ÃØ—žìYÊ0Vvq™iª}E†P>Øf5³Éº¬l¤ÙTô·Û°^x<΋•î ÿàêõ[ôB™˜¶ blÓ[@/eš‡ä<&vÖ laoªž1úx~’3ØXµzhlA¾Ý5¨Œ•_Þ IDATw‘lÈ/±›« jae;fõvxÍ—H›KHòh9'$Nà=Gæa˜¡^2@’ÏK®‹ºL/#ë¯Ç-‡€àʧ›>’H$Òíë¶S‡—©µzTIZB/½ÀÏÐr}´---V÷ìê/L¯¼l>™rí­üAË€Qï6·Þ­ãL`mÕüoÀÒZùBb?,WêþYÚ¦2üó´wÏž+¯3rhRÀìaL¼V Û|’¬~õm»Ï©4Õáú‚å{ôý»JX¤²©v ½ñ?|êÀla$W(/®W,Úôï:’+,TMgº‹†æé l´Ù:†Þ¼È¶†=qmtïq3_wi4Ô¿ïôÎËþV¸ÆÄ¶ž1%ýM)ÄØ¿jý½XX68Œ}í;_1Ñ…Ú¨œ0ç;’‚Zº+&¶¶òTw ¨­¼Ðaå DJ˜ÞÐkÆ€±š£;LÝ)uÎØ6öÈ, `Ë>ìØ9¡ù¢BƒU1èjáH†CÙ'ÿüã<Üâz0eýÕNbõy|Z//ÿÎb#€Z×>"#¼á¤ì‡ÄíΣ³‡œlø'BAö©FŽ\¤™%mj•Ú›/ã¥Î1`dýÀ4(¬ 0ƒ©â˜Aõ"2aáˆù:$ðé·1­{£p< ^ÇÔâ´CŸøZ¤W¶y5´hÑk•»Þß®µ\NÖÇkÙ†Õ:׋­eS­s,©w=óSÒ* âh‚µ@ÔÒÄ”ûÉÑM–ÖÄvןNnìÜΜ9c6nܸ´™tÇH{ö¦a¾–v¸JfžÖ3 @»Gÿ+¿®ÑŒ ëÕ¹¿<vü¢ž¥Û$‚`ˆéwGž|*\¶°ÑHÏŠff’\¡vBln¤ÄŒ´gNåéÀ9†_'_—’Ô#­Þ´ºY1¯H ÒYÕ3ÛÍ|Lj)ëÙ ÌeÅ)ĨkQÕž®ÖÂö—T¦d÷æëmnçÉŽS2™ÚÙgV™JxS—Ž/êq«9µÕ†ð*™ªµCc×°Œ®ëÈ †)$iªéÝêVe4µºÛÚQ N3ÚQ…ç*Ä ØÖn5•S©õ…8–l›¢;LʼnN/À–ضûå¿´ÀöÒ–Ìç¬AN¿5¤àø’Eõr½CC‰€Ú/J'w\,^.Sûžyæ hyÉòRЇåÕ{ær·/ ’KëÖ¹© àë/¸,@C2ã\üægFýÛ³YÎUÒЦúãœü€0 {ëghamY mUÂŽµ4ŽËOÐ5úhX˶¥:í$rïÑ~XnBÓq>H;Ð+Ë¡ÇôööZgª“rð<~ü¸Õ•£-g™m”ƒ9çÚ !árÞ|ìÔ 5Ë )ÉIìuÓÿ)ÿKSŽïôµ€Xþ¯*$­©H«EÚÇ–©ò̧´œs‡’x휀ôE7 ®ò‹ÁúÔo'þ˜®Ù/é£þvß{~£ºhïkôÌ c3º'pc¬Gu¿ãï³[Ú2!_ýæßf +K¢·°Õ†îJ—\Ð]sJ]-ǰLÍE:ïÎ s,t´S׌V¬-½Š®0UcYÚdeÜúÚ‡n0 µÓfúßRîóÁ~ÐmJ: wU“î^Øðbí_üÅ_4ÏþÙÖIEëZ}b»™Ür,ééÂÖÎWDMÝÑ=Vb+;ÜýXʯ7€-Œ-Àv¢óxÒº“mpR„l[€-Ï0t´É `{±Eì®Û1 ñ ñåŒÎ@Õó×_þ ÃW·œÈÂq® ;UX/óñG]á,V£Òl¬Qûþ³^®ïÔË MØOÄ^<®—ì+õ°ïÔ‹0ãåÌKsCÿh3[Lã:– ÛäêE­¡íƒ…¡hø+`7*Ðá äÜ’Œ]åüPOæÜEüu7Õ9’¨€Â±ìyˆiÍÔèêàbÓ¦M€¶ `ä=-¡»³¶Z€ö”<äTD»`Jœ]NVɰ¼ÕnˆžkËud;Sï<ë0{­—Muý€HîǦ.+£õÉ €Œ.œÑ ˜s®'?,ªŽ9Õχ €·B‘Õý^àÛ§çàº1¶2Ùù] ëafq#ªÁ^þT6 ZLïTå½Ip“ßIªâ¡¶¥ÊFr"„I®Pk6uSÊ,Ö6UcòéǰXû¥÷aªã± ¢8ǰTå+ŸÝ®ÈJåfò­Úbs›†ÌC=”j»-û·NÚª ®æpcÄ‹µcÊ– Ô’Þ®lP”Úmæ°ñÖð_ŒÛÚC{.°%0ucÏuöR¥¶s¥“f¨Eew›âxÄL”-÷ðDwû•ùsÏ=÷Ä?úÑf lïÐp„Q½qs–*³˜+“lZ¥% × {½êü±u=;ßëT¯m€Û½¨Ó¬ÓÙÄð(àhF1hó¥¡õ¶ƒ—¾M»ë]é™÷'`— ×ûe ® ö÷`Âï˜å/ã]:¦w;ˆó@­ÁÒŽƒ4´$h×yâm¢´0z°¹õõêž´¼˜ÒW]Ù«a~°i—¡ºýÀÔV7¥=uoN©ß†Ôn 6˜^@Kû&в_XcØÜpÀºc_ãº?8Fg!žr¥~&Ô.«/°é0Ž®Œ›Zðš4£ês¤7}ÿGaû"L9ú˜{”>ãǽcê/$uúŸrëÂÔ·Veh+²ƒ]»v¥=$°a±Ûº®4Ñõ…u1g7ê k8‰ñ‘ÖpkÑ3ó˜þÿPþ&"-Â܃‰la‘CKÙÂtW/•ÐNU÷™hEjö“Ð]ŠE;Ö¡$ †îÊ5ÒA.Ža3ýf¶-=6@G;·uÀ,´Ž™¢IÛÙjîùÄ=¡>(.õæR·f =°ØËÆ4\_Ù»qÉa 籪ÓrÛxÎŒ¾ò±¥.›ø)Ô'®7U«µ]Ú’z†òuÏ^¯”¸—ØŽn:d-­Ll/ÂØJŠP+3cå=ì²d#ÇÍCÏ|++`{ã7ZvA`¦Í3„†!g1Õ }y(d½vêç÷œX›ÒðõV½ˆ_¦¡ê: † ­ ÕÍŠEÖð¾eèôÒv€v5CCÁt‘‰,YœYÀ* Ç…õ@äjŽÕ”Q·×2Èì‹VqJà3Ðâ™h‰ AÒ® œX[|tZ¶Y&QûcìÏö•x·Ìc^Pʱ`HÑ•†eJý@3SPjqý9¥;úã>Ã!’kÛ =§m½‚š›²)Ä6æÞà£çj5sÍìÿ™ÁÇ–;_œÄöêYÖœ“X•FCnºé¦ŒÉ w$üÇ,G¦Ó>¿Ï­¶àöâÂ3Ÿ1¥‘j™”¤gºE©Ç¥Å&e{Itižu€vj]¯Í¬¹TQÈ™\"dë†ä¢¤³ÚÜdu´±ÛåŽå?Üa~ó×~'tß@mº~ oÇaLNâM78ŒÕßkʆšf»lޱ[ö¯H…G‰ëlì1£r#3HXߥýžßcÚ òB¦–ÆÖIR[Òâ<°­‹uÛ>ûiuã÷Ýw_¨¯KΕa-Ò$þû_ýÕå V`g1,djµbYЄ%³½¬ü·£ÞnãF½°Ïˆ¹äñ•÷<Œ, ^ö̯& ¥­€@ 6™Áξ ëżßlÔ8¥ ­>ÉKÍ: %Ží¯/Óeú.›°^ÐnÚïÆðûY9*ª¼€–~´Ò8†Áâ`ai‡Ó¾ÖèÚÊ( H¥ ¬/û;0KŽ Õ¾ó½ÓúÈË”fÚO«Qžt¿Ù‘=l©ìT玄ƒyÿ‡N6õû÷©ÒýÙ¯kºF4®íÕ”|cT}ƒT ëѽ ;‹ƒ—7æl&}GÆ8îŒ6ýÿ„1œÄbº—é¸wýÎï˜TAÿ“ÕG¦0ØÝO|êÃfxANU¾hÚ Åݦ9"ÉAõqs¾ôaÉÛJLdAÎ &2/©RÖVί[Z7S:¦gs‰âºËï`¶"#éA.‘8¿lÃ\‚…‰ÛÒë~­ŽV#À“¿ð„íβ'»ÍOïøysçw†þ˜(€Údwba½í¯ÃAËovj§þ1‰ll›Tîç:Ô1Õ°À– Ûúg×5¶8Ä!EÀy,2VfÆëz‚OPk¶C 籆iy©Š¡õ îã=ß6wÝuÞÒñLu×é…Ú£‡h·˜,g±6½” °¦3€-ÌíOÄÚ~^,a—ÀÏ6²ƒáôàYK@‹ƒ–Š!uNT I€=ªßRÉ/<¿ùò„ú€˜ÊD [ÈÄÒZ<ëic‹ohÝ‚T]#Î ûÊuƒ™³`,á´Æ¹¡ùd;‡mþ©·½¥*_ªû ]u]-VpÍ“µ‡)äÀjJÌè£q_áL¹÷*ÒѺÿÜt1g3¹^H²q#á~&™‹²°³o~ó›ÍÀìd|¹¤ ¢HŽzÅ[ þÕ"ˆätŒ1]лh6"BÈóh«Šµ™ú©­f¶~ØL—Iž5Ù`jºl¢ ™Ú!«V ìRé`ôšô1omC|\ưLÃ\‚…É—)äWiê7¿Ž6ÒWošÎì0÷~òÞŒ$Pë»p…Åå=àu›XÒ4)X<O j©a¶å¢‰J°½öC’†0°¥üå¶.*B혼4S[ÎÇ1¶AÀÍí‘¡G`l ,Ìwº> Œt”q¢!´ h·ÖijÓí´½9ÁHÀ8¤{˜‹½« ø*1}Ï Œ}_ šaºz¤µ´œžân(<èœÜ:›) Ëjýì§«) Зnx ˜Î‚œÑRí¶©†åðâo#à@ËqýÑ HkŠmß.oa3ÝÕÕ•ê/©m8Hùåí/ò”Áîóqýé=éö¿œÓOëÃ#UÌÙLÚ¨ÍÔI _†[^ûZóðÇ>ÏûOúÓ)ÙÙêâVËÎN—¦Ö˜ÂÜÖOnÕˆ”Â;v0så‹£Ÿ±š‹f¼í¸Áé«tªÞÔôwÛy€ítÝ ¸Î,×HÙ8†ÑY.ÁÂ\srÌu*:ÚÙ=ç–t´È>ü‰‡étõ,޹µ…i¡<=€ÃXéD½©ëßf¦®=fÊúZLåñnO‰àÙ™õ¬YÝ!9a à†5€íØîC¦r¨ÝT ¥Ž#›¬Î\âØ.2¶LÙ\½ئ3€m$¢œÛŠeë7€í™Ù§ iyÐù·-3º^€ò”ØZg¹[RD¦’ p tƒ€#†®Ç5LÙ)ÉÁ«²ú¦¾+ÀˆÖ¯¶äÀ+ÎUŽM J¼àÊÁÔ±ªn;@ÐédÝ:¦©¢8ö×[žy«íõ0€0{a P sšÊh'Q ˆ…J3õó¬þ¡c®R BwñáA\UX9dÔûRµ †œ¯a¯Û‹©ß®Æð]ωÅæuϧŠ9›éu"òA&Nb½úßmÔ‡.þ%a v"ã»Ù ,\&7€]Ù'ÇÖr3P¿ß¤´°³m#7+¬bQ{­·-€Ühã9»}pÛc ×§Ñ•Óxê:ÓtBÇŠÊWâÜC,Ú1¼™šs ›ØY,ÛL,8í̾Û¼Lu´Þs*€Zooæ{€èÊAeÛØgfÛÍôŽS~FŽ%ú¥3€m¬³ÏjeÓ•õn‡ÙØV÷uå lI‹›‘ ¡t¡ÚÔlM»;ÙÉâes¦yj屈k{jî ËØ>ñÄi-ÎuÒñëLˆ/Ì9‹¥mH@ÂÜ$µ€ÂÃÏ?oãgÂŽ¨O°Ez o{»G/˜‹šýŽÚ©€úY…j7œJ-IžÕ8‰¥ çåŠ:ý«Øk`ÑÝIòL¢P/ Ç[Ÿ;––ñ¢/´#d>Ñ¿âÜ…v“X³èf‰zàì´âÁŽýá¹Â”åZÁàrœ1[ÂyÁÌ8q‚)ó /˜“šçÅĹ‚³oPû\®¶iCµC>Ú;¢ûÿ§î«€±?§{ð+zþ|ðüyó#É{^/É Ï®Öaú‹µ%½ k<7ß÷ßÿ{Ú,VÔiÅ}êÌùùý+äN;;^sÊ ×`&äAm±Ñ &v˜êùv V­a Yœcp·.܆Ó{M¼hÁÔßcê^' áº0UÙ2Î1 @›Iưò¾¶Ð ª÷ï4ÅÒÑFá){ÌÒCææ ?‘ŽÖ{Báé3ï^…ù—T0$NbûŸú+Ž#ÖuÎÉó¶v¡\1[SöŠgÊlØ.¢„5 l¥±E€Æh¦>õ0MP½Öyì|·ØŽl lWû°/Àv¬a¹nÖ•aZ2«t—JåW\k*g×) ztÀ-’Ï+–ßüíw™Ï}îs<üRJÈZógôGV[Kˆ¯Î ™Ù8‹Á4Áo'€úʸÀ-Ë {“ívÐC\ÍimÛ‡TÁ «“š^£åTŸ4©ØP;üË,Ǩ´üCê®ã|pcI$Ü:ן8ŠÑ¿CúÍéÞ³NFZÇuqÑ Ü5Zv°ÂÂÓ\ë ú¸ ¾+¨Ñ< FtŸ¬¶šúq,<¢ÿ…Ik—îù_Óÿ:ÚÀÝ•…slй¸udËÄI Â%quM;›‰v6¨ÖUÌ6[¹A¬¡ß ·dÆŽº:q «½ 2F´åð.éuÅЖLÖ™ê³Ý¦æôvû›­UÖ¿Ösf®zÌí¶bšcXdB¡n •`mIÓReªZͼY•ÅEsß_~Œá¬8qiïH’Cœõ”YÐÞ_0µç嵟µ‰Ü/'¯ŠzzzåV€˜ZäË­†l5i¦I`w‡Ã·G5Ý£åW S h:à0Õx]X/y›s8sÛÂ0¬€5Ú‘L×› ˆæ#ðégqÚÁ6nܸ´#½h°%lmá#Ãk\;®Ú0å‡%;'o=Óx‹©çtÌÏét‰ØŽQ7Ì:×ç8¦œ7mwQÜvïq ó«ÛWrø.XÙ‡õlÐdÿäV›õüqö¼î·:ÝCù4ô´%zn…5²0^wà æŽ$ÏhêýØÇ>f`g´úYV=ìl6ÚÙ± ™ÇŸu®m³€vJ‹¼Q„¯£×óŸÞÿ‚ ûõ®w½+0}ý¥ÿñ?ÌY1û44=%p‘mÐKc1@ÊâÞ8]ÔÐ56–azXAt™вœLC‹Êæp»_/‰K°7›Ö-ß'1/h#$%3@ËL]^³éÀl`ìê£.úÔíËzØ€«7­­+ÏtDzf~D/`Jæ0s yH&€Öî”á‚i{%jÿºD$Ž ª¼l/©`é+¦¤1f ¦uté®S@0!ÊÜ6ŽëÖ¯°.}ôK^Âÿ„_ƒ~ÏÕ+Õ}ˆ}Z?XÙ›õÁü^9EVüŸ¨íÐ=‘OÔVé~ k'4’qûîÝI‹‹I´ÚÙ+…%©!» Yˆp0W9™´í±†AÃà ¬B¿Æ¡ÍB©>^%5P?… Ïà=M]ÕbhgÛ‡B%X°:Ú¦Iãt´$X¸ó—~%ð]HÝa­jÃöT¡œõB$<Õ/¾ùV_CfÉ›šG¯³ ¼I’u¡¾¶Õ'¶*ínòá|ÿþ[› A)uG·(±CÍ%'*ÙdË™H²åcëLñœÂ2Iú«6“ëN[~ý€þq‹&Ve(кãW÷˜©Š>SÝ`ÖOßlYÛ©b  1±¢QÓ9`y¡×úí6½î]±Þ DžP„8/üsb5œ³X6™Åà'ЇÊრ`"ó ü€–åtæÀíYäñø¸äÉ.ÍÃêfc6ô¥ÎENàÖy§€Xæ°`JgH'ˆ€Ìœ[²íÞõÏ ˆû¥g- › ÐòÁ„é¤`i¹NHX‡XX†ÖÛŽÕœŒ’¹.Œ9˜>q@—yîA¶¹õŽ ö];¯ãÐÿ޶X (Ìu Ó¾CîJ ßu\ŒçÃzæàüuƒä~V6¨Ïûô?°7Ï æ• ŠaìÇúx„s}ÛÛÞf~ý×}Ù.Žýì>3;KÅ„é*_¨7¹°³åÍ–%¥ý„²Œeb°¹ŽÑ­’T¯(^d*Ïw™ÙÆÌÞ±½Ú·D Òßéh'ßð„m*:Ú—·¼Ž¤Eá©ô$'YµI:¦°:¸ˆ·šěɛäÙÙ$ë[ž1µ?ºÁÔ=r“»uñ& Þ{q-À¶FɪNu›©®žTE—m#CÀ¶~•€m2 »Pr‰ŽÕ*·{íEEfè0-ûÌdå93YÕ›Tô,a´æ¸)¸…¹­™“Xq¯‰Jš€1F.š¯?Ôg~ðÃï´ËÈ\~q´µßûÊWÌaiãÈ26 s6 –p^ÏÉQh“@ÓxÂÄŽIzSÀ€µuŒí²ŽO³°AÛGhw ОÒô€–ëT¶i~³~µiö÷n¦í°Ðsçã߀ät°n 81„NZ¯Q—Ó û% Þrþy>H¼Ö.fJí]eçó ÚëÚÛk[€ 2†+ Ю8‘4+¦ü0/žl7‚-Ö5`™~°Rõ£¿lǨ{@ÿ'Sê÷sú ÿ¸G,+¬ûœëÏ:îù«] á»+‹Vg¯—éYóKdÿ"=o‹ï'×ëS»+ijåq=ÑÞÞ¬0^î9ìŽ ;û޻łÙh|ñî¶%‹;ë¶û§D×iP¨®ÙÚQ3Ô¶ß¿9ô2ÚÙ²h½n Ùã„SXÉ”F„*çÌäu‡Måá­¦ñ_o33mfrÇ1W,pJ‚…Š3füöôç±:Zo£  ÖÛ…ùP=›ˆ?aª&nUÖ°Z±¨¯|ÊÔþð&S÷Ø fìæE/ÆT•Ù¬cO^Ÿ°EºPTŽ_ÛS±$;¾cl‹5\S}a³)Ÿh”n°Ä,hÈ%¦ø~-=Év]Zm:g¦%ä¯éï2­o–$¡ÇÜ¥¾™Ù’I3TÐTÌè‹zªÓzµŽ÷XÆ—¢N¢ðÅoõ›o|ãˆä·Ebk ñ[ôRhÐC~HlG¦†3CÈz¹Ié˜P•P¼äÑxfh][€öeš¾L+/êEÖ£ùý"u¶aî¼^f´Ç™?é[ï¦LRùÑ ^ÈĵAé`ÓàÕ$W–º°óžÞL^n{ªi‘Î,{.LÐJ9ÒÕzèHê5ü¿iÓ&ï¦U§=Ät½Üæ@°÷žHÕ&@ï˜@o™î£*]GÇür>Ì‚‘F8vŸz—€®/ 0L0ÇeÞm÷ÞG©Ž¹·q3 Ð(iÑå0ØØ§ôs¬ì[ôAÖîùÛ¦]Çz]ƒ| ö ’U¥²ƒz&žÕÿÜ«õÿúFEý‘/‰-Îûî3ŸùŒÉ7;;Þq-¡ºæŠqËÅÊ:³æÌVÝÖcb›ÎÙªf_ñ„)½ íí ݦñ¡[ÍŒƒÀ- LÝ  i,Pñ ­d÷Ü{ÏŠˆlϧj³í¹—ø~„zàâùÄZ¦v¡rZÞŽO˜ºÜljŸ¼ÎŒß¸(HOÕf‚C IDATMØ>qÄé3fzýâ?RªònÛLÓE«É­Wˆ¤©´Cnï‘|ÙX£Õt=kf+ÇÌtý¢,À[.Ý<áSÆÛ›©æ³¦Z™]ª†÷ Üž’,aù¼·¶ñ«œn3ë&ÉÆŠÎšù¢ÅøÝ‰¢>óW_º`<øàƒ†8Á?Ñ´H/[ØÔL oÿ3 U!Mæ¤^.ëÅΉ—:/?^Ú„†膑$;6¯ ïl@ãw‹Ö÷ †¸8XÒLŒö„ÃŒ]Xs °w–+M-Çqnu¦0XÎ`˜qlý³×HÄ€ì ëŽà-“í<@¦”þãç·¥ãé>¹š 0ÊG p¨> €á¼øxñj~¹Þ´ÁŽ!æÿð˵¤¿ì¼–­Xë8®s† êÏd}X£ÿ‘äB—d{¯'| ¾³³3¸À*­Ò1adÑË`¯Õ½œ +ëoÒƒ|Z˜×tÜü1µÿÎãvE#éÕÿœ“‚A0¼û·~ãŠbg+‡;LõP§™Øx<+çioŸãFJÞñ—-TÞm³mJâ _ùién{:-¸ÞpÞD·ô,#ÁBl[¯ “`!PGûsw›;R8ã-(äLø§|È Å^:=€æ“P&ú··R›4á5™ºïßbªŸÝi&¯=œ²3(?ñS‡LÍÓ»mëXkx` °ÅÓ²þŒí3f>DPéÚ3Û ¤Ñ ÎdlË!9€U˜Š‹úi· mª4ƒÉN†¬-cÒ1Ù¬.ݦ**‰˜[ØÙd­£~HÚ£û,S  Å¸ÃEÇÍÄTŸùàÇzMwûNóÿ‰1 ÄÎb³zñ’P!—0ËX¥é€-¬ Œ 7+/á0CÁ©Ž‡×-q1ÝP=û„¸? L¤bÉŽuó·€âÝ×_·¿¼w™zaô¨uu¹eoÙTó€ †fЊÁ–{ò8¶Ã”nîî^®Ouÿ¶óbì*ê8ç ë‹ZÁå@ú0¬4×…ûÀa'…`ÛÆ:¶cÜCô=÷ ›çþñc7`wÈáÇÌ%|WС‰0¦óIf°±heÏêØhe ÅÕ sÎÕVCz@|Z²3&³S:t´ÿ‡ÎáÿUÏ[I¿âýèGÍ_~áOÚìTN‘ 8n]Tï†ÙVK„K6s¡º`Dagñ÷ÈÖH¨;‹c×ø¶Ô:XØ[~ÜžÜdÊϵ›XGŸÞÁ³P=mbÝ^J#¸Eèh‹âÅfê ‹„W>u´Þ#@­·7 ó÷ÀwÞYÄ—ìç¿ýØRÁÄ+$ExhŸ©:¼ÝLíL­ÅY¨Ð°¸€m­[@.`5¬9Üp캤ÀV¶êÂF‰UZÏÎhûé%Q<Ç!„ :$†_ê¤MšUv–É–SÆ¥ ÛʈÉúBH•¦=&‘XÌ-ºÚdfe ÒäÖNv­p&Ãm0rÐŒ÷÷ÚH ·ì»Ý¼GÛûôÀÝ“Âý7>ûYó;¯|å¢öP`Ãày¯~szÉ®÷1‚0¼˜s1$c€¬d)S*€Û¡—èÖìš¿H¯ÙP_ªÓ™»[4ŒÌ¼ÐYÖ‚"2°/ý àÀ–{ÛÅ09Žax­#9Hf'Ož\« —ôó!ˆÆÖûd Éê)¬ß\'~aï/Ðu²À'? „õ?7¢—9]?ù),`Ž!ìB£qmùåÔ+‹ð·ÙA—>€–v<-Šë)Ý£Ž•}™>”ß–Åÿlªæ¬Fä2‰5'ùßÒ9ý@‘·Kr0©“¶-[Ì#Ÿ7v¶nJ1Ý5šy±S@T#|Ù˜ Õ;k O«ê\·©n5S»$PJû°æÀ-1ê‰|TÖßb&_v(íîå';VÄ£-{²ÛÜó•{²ŽG›ì P›¬g ëC÷ÚOœþéñ¿1S×+SŠB{áDVý¸bà•*´ÏÖž”u-Ûƒ6‚Ž`8„…5lëNì¶Ì«clƒXYo >ý<$øñÏNjA4³a´µþzXFÊÀÏëLxMfd–ñ:“ÕÍm°‘œ3™‹”ð½§úÌcûl~úö×›_‘3Ùçû·WTùÆ}È?~ܰl—'=r4µèg‹ÅBHc°l˜¢I½¤œÎvÙÆ  LèÅQ­—„ºi÷öÜçµÇa3¯“a¹J’°Ò–IÕñxá#Að‚CÿÁI€f8¬ †vñ‡ærÛ‚¦A€–l_½ÈG4¼ 3î€@ý.¼ÚæÍ›  Yˆ“Ð7¨¢ÌKÉ`@S Ñ#|Ð8Æ”õÞí®œwšªþ\öåÞF>dÛè%j²–*CFO(kA¯¶q\î9ÊáÇ9±Ž¶òñâ4¿5bú¹·S%ñžk6ó€X‚„|°²AmYÈèiÛõáç· õå¿èÿìV}\¶êòö÷¾×8v–P]~Ë$î,û.±³m¢Y²³.T—¢?/%Rð·+ì²Ë¯ÑèâmØ"’2µâh…‰Œ-:”ÿŒBW>p‹B|˜èµÉ ¬Š£Š¦°çœYh]*—ŽV˜iÕ%Ö!Ó†$)_µI:¦°:³ 9Ã=÷ÜÿîÁ/›èžãf®qÌL]wT¢ðk¬f–¬b©l¾fÒX­¢"dl‹æ*†7šŸ½%•Mu|·€ÕÓëúLõ¹.³îŘk›Þ–úV:“²’w,ÿÔ9“•ÍÖ[Y)½Îd„›RtX"%üð‡?´Z["%üÙ;ßi«z¹âÝþã?þ£ùÖ·¾eƒúÿôwšýÉŸØ#CÜ%z!^‚i‹Gç%Êph²þ6¦Z®ÕÆ ¯½(2µV×y1”¯Ù°a™æi«*Û¦õ{ÍÅœÌòâ÷€ØÉ½LøË-SÖ Š(Ã1Ò S¨‚Ø22ƒLÔ {8/ uÎ`–Ó‹•ä ~yׇŸ µ;8³ç ëÊüõªogt N«M9×pRµÅ»Í1ÐÞuÞywYwQ÷à”úñŒF œS™w¹TÛ(›v»úÐo´ ìŒ@õµb¯ë ´î°²ÜÏ]BÙMêc”N>N½†þšûÑÉ‹øÿ^ û‰Žÿ±˜»šÃ„âÊGVC~Ы«—ûF¨fô¿ð/êók5"B,ïi%Zøßú5+5È5²Aé|µ²‚mË™u¡º¢m½z¥~‡¦ë{ç 6µS:ÜŽì˜ÞÒfI ¥¡ÝÛcf¶-¶gêUÏ™ÊGwšÒïßl¦ö¶ï~o[ü:Úòî0wæYGë=^Ôz{£0ŸSà):qï„yøè6ãØlû <Ó•N÷H¸tºs£†p_µå¦d Ħ k¤ám<µÏ÷gR [‡+GJÁñn Jss›‹ÞÖ9“•4*^­bßVI»K°TÎd3¥£æbÃ%g²˜Qˆe&sÎdDJ˜*î7_üÖ9)áÝï~·m:™m¾¾ë®»ìòý÷ßo&å}¼GŒ#/ÊZ=ÄG5õ@…mùµÕ‘SªkAà+S@:]¯—Á=&ÍÞ½pžUÛᘷêEß­Ÿ÷%i<,N7Îgßv•ÅlR• k å{ûF›åÒàv¶Ìw€¡º¤cøÀ°®ƒî¥&!¸ä œ×"•¥æiVpçs:ïý`3–Aç®mAûd³h¯®Õ&ˆÉ¦.·÷÷¨û°à~â‡e~NOËõ³×ZÀÚ1©\3®=?ú‡2 fö(ÿ›ª«««ËÊN9ž„sKæøÅG?dܲJ2\8*àwP÷k¯ŽÍ±ôk hW#òNbÄéö€ö×~ï÷ þï~ïÛû{ƒ©.j3•‘fë6—„.ÞoªŠšÍ¬ÒË”íO‹ÜÕëeg·=–µv‡cm>Bueâ æÎÃ?ŒWË?F¬sÓ„™|Ý~ÿæ¥åè-‡MÉÙu¦bÿ6S2Xof;û—éh‹‡ª :ÚåÃæsŸûÜÒ~ùž)€Ú|÷èK¼>€-YÇî¾ûn1lrÂRÖ±ékzôb,U”ƒ=fìåz8¤I§ °*²AÝ¡ÝØé~JÇêMå©n¹/+‚Âu òŒ²“»Ø/Jbç•Kü/p ûš­ùõ¶hm‘dc$nàçœÉ¦K/Zg2tµÉŒÑŠþ%g2’7ÀÖb°·C±Êq wMw›¯(QÌÃ× f_Ñôôô˜ bpËôòºgÆKƇ—³¢×4[ƒ)êåËÔš¶÷ÖÓ&0צ7kÚ§ÿy½€ÿI/çZµ™PB{¼…}óœ_¦Æ>.‚7:VPv3?ઋ~°`ZíõÊ haÕ`ê2 £fA7ìÌõ”Y ¦y×F×ÿn øõÿhØa¦;Ÿi])åÑžÒh¢é3úˆˆ¬sË\WŒkŒS–¦€Õé[aTÙÆú|Õ0ýÃH í–­ |ŸG¦ù¢þÏ{Õ0±€Y–°;$mx£žZ¯M«¯ø¼­÷±›Þ2«1¿ÒœÄju=±WËçà«_ýª9¯XàÿùC¿g&æúÌô¨›ãsÓ˜’¢ 1ºí¦&ÒjŠJ[M¼h^!; Ž^ñ"Ý?‘)-S¼ÖòåÏÿ|±³5ŠžS1Öš—P]Ù:ƒÙŽHü);'ÒH íô r(ëJ/Y˜Û 8ïúUØbÊwšØ+Ž-éh+$;X-­·ÍPëíÂ|^z (ëXtï1™¨4µß`F_õhÚã̬Wè)… ©c;¾ëà’ ½8V¡„ ]6óItË)ËÐU6× ÕÍûM¹R÷5е% ²„\Ì«·­”3¬-5sÎd<ÄÂ$oð:“U+yCÍì¾eÎd.RÂdT™ËL§^È­æ›ßü¦eÿp" ´Ì ;®Ÿ¾çEï€ /ÿ\€Ú)êÌÔfô¢ òö‡IF_è·f½¤)Ü ß°6Ôô›*»OSì˜ÚPœxQî™ýÃJh,,û­ Õ…” N¢Š[6S™@ÃÍAõ¥j£”ñ†KµÛ\ÜU èfFɵüzìƆԇ3r.ìs.>wÏpžÞvÙVéíwCþ´Û+°Œkbû ØÅ]³Q8L«5Ì쀫W°JMͪZûô1´ýšk2ʪt0@+àÕÊ tNéoѵÚ){“úÂbýu{–^km«ù'1ÇÊþå]oµ@vb¾ß,Ä/ Ubh³e‘j3UÚoJ&²x9R3ÓaÊæë–Ü¡šƒð*Ï­Ú¼?«¨9ô1‰jûĆ*P®¡ºòá F›ÐÎÏVXvv¡jy_°=™•½ÐaJO¶›x¹œwûÌÜ–ƒŽöçîx³¹#ñh“?—wX²: ë =`Wû³Ž¹tºõ?ºÙŒ¾ò±´½„sZY€í˜4¶U§ô{¾Ã~žÚ›:®ž«<Ö)ö~ƒ$¡é¹›-k›K8”@½mkA^YÖ·AŽi‰ä •gÓ:“Ô1Ι¬v¾Óʈ€¹´»}¦~¡Ë”—Vò 1/|éKöæÿSjaùìµ€ l %³l­êÊÄ&†n˜Œ_Ôí„T˜kÄÊ5>uì˜^Ƶ®_L×w~Å6µê·I/öVmK(‹š/ýâ" ÐFßøm¯¢M¼ÐAé ½½}©2¤|T”%Ø7oû— ­Ò 5™çaå7ê7œ•èá¬~Tóawí´°xõ¯—†Ùv`Ø2¢º>|`† 0Ì6[¯€S¯ÀÇ˪¦mÊ[Mƒ$p«í'Ôß›ôAqµC$ÄØµk—í›LÛít°NNP®~ïÐý ˆ}½>hÕ_™ŒéZÊ\Ûòùàº+{ÆÇʺc•XF¶®¤ÓÆŸ,ë3C%ÉIЉ2ØÙE†¶bN2²%#ˆîк"}lÍX`šM(H)@nä#TW>œÁJ†åK"vvnà ûž¥O‹fKLÅS[õÑ+‡wî7E£Jîòµ]f^ÐÑâLN¹Õ¶¨]í~ ×OÖ±|0~ÏÞs)ë˜K§ûÈMfìÖ'ÒöáÀ*M·iØ“™Üû¼‰mî]bmÓîœ(€$aêšã&¢`ÑUG·YI¬k¦™È¼ÇóêmÎ(&­ÂµL´žÊJGåMÞP}±Ó:“ ‡±dæœÉH»Û¨üá3ó“ËœÉl¤EK¨™ï¾vÖ4È{š$Õ˜½ð6$@@ààp.Ù1ìGW;.°’‰žy0‡~³íðñZ¿¼Ú½É#ØØ<¯é~ÛÛu^„ñjÐÿ Þ¨ØÑçTnPëaªÜÌÜ͉iÐ¥M.A‚ŠYðo§>à€åX”è`×yupn6››úYM5W´9öµJýEŠeâæ†1€(ç”0jTMa­¹–Q¦kjA¨®ïR\Võ¡_°–aÎ1Ÿejuî3êXÚ;wÚ{˜óOg°°Y''´"'¸V0oÔ‡S®€ôInжµ¶|È*Þþv«•ý£$¬lE±’ˆ•…*½ h #Yœž” ëVõ¬öS…ùÊImí] ÓE”ŠÑÂN6ɸ¾?í»À%R Õìl.9Ò¼“H!Yf°°×Ñ&W8Õiåsɾ¿¾È@½´ñ]CföU‹„S¼Nìî\±!|×jëh½íÉìíãݳ0_è=p‡†H§ûá?ù€™¸õ H]:ݺÇnDà©”µr72QmfךÚýטWoо”;û6¢»ßwÀ”õ)Ñ‚2‘ÍÔÉ)MzÛ\²²xõ¶ëެ'k½-ÉFôÙ¬~@‰ ”|!]ò—v×9“f‰”PµÐju¶¥ú$P”K3<2dµ¶›¶m[ô´þþ÷mïÂއǵÍÕª§3d…A€š PÔž û Z§;ƒŠ¬"whÝ©«}DHÔyjt;´F·UuÂX:8ûÙYª‹KÀå0À:ì, ï’w{úصçrL9'Ç 2χ„w™~´º!~¦\/†þ]†3¯ àrœÃ•tÌ19Æ÷2™ -N]8r`ƒœºÞ*Ä\A¬¿Ot];C€kÿ~¹.gùÀ±²ß+;åÑʺö8V0/™WÊð>3Rn´V¶zFÒù-VGê%MPI¯AjðCF¸%$³¨Fá‚Fñ\"…\#õМÁˆn0³¡?mf0o›½ódçDn òÚÊ ÈXÖ”ÛýÚãfaÛ% \üB³­‚°“«6Yû  6YÏÖç­H§ëÏ:6–&nÉh©~FésŲŽýÛGl[¦wŸ4‡»Lýʇ'效ÙØLûI”á„-H’K>õ¶Î™Ì›¼0`©œÉè‡ùHÔTÍ˃7Þ*çØø lò‘½TבسUÏk´ogïRìÙTåÝ6¯Ü &¹‘†ÖYÉCÝÆ<Ûdî»ï>È­[¿Ó¨]‹^.ÃÆ¥óf£K’¥Ó%½nY_‹™é0Óž,%|=F¯=nJ:ä]y¸Û柆µu‘2ífö%u•¢$”m±àYA¶–o½íÊä =†HXd¡ÜÔLn²ÚÚÈB™¼3%cf¤Rµ5­š »0§pQqeK´1fFàv<~Î\­0çÇÛMeQ“y¸vú<$iB«†5½0Ó¾¨Ò0µ€¢’ZN`‰ã²ŸWj©€£×ül)Û¬ü@àã z^¿íÓ‚)ç·uZ±NmØÉ†Ð=© Ù³jßI­ëÛ¬ãԫǸur@8Aõ9—n]— ‚*×ÚP¥øXp@Õ-»)}çÀ*S€ºªšÎ²MûïÐÐxÁòÓ\‹3 ÙE_Û‘Ý+Çô¿òIXàÔ…#‘ Â8uå§UËk‰é>Þ°ÆLmXéÁ+þôOmXÙ¿ÏÙ©ùKG.¬lù|½eeag§ë.˜±6Å,ü%ˆOmÔ¨¢~Nš€D[PT ‰Žp,ñò«ri)_Î`•/t›ÒÁ&}ù3ßþ݇ܠò1öëú—ä´®h¬Â”|WzÜÑ9óƒ~hˆ†t©Õk3WµkÓÏ…£¨üYÇ‚Òé"I(Š•›èOµ’ƒ Ž›k5s¯8`J{ÛLͳ’´õg-I°)z¬tPÞ¯'ôϨX®!Àò©·uÉ¢JÞP%½mdr³dJúò/é·€6Z:¨ìIçå©[ÖUSeÊ>¦ŒCåL«i˜é6‘ùr{q*> p«¸¹ =fÄô˜‹Jyxáñã¸ÍæÑúF paŽ&ú&S«Ó z\/äùºQ] L'8/Æp}ÇǺÔ<qü¬k]Ô²-[C‚ЪzoÒ/2‰~EU}q9ƒ[;©õßQ»ëšõ[§u›Pvhýj Ÿ>:f•y~ĺ~Ì/ ÿë<`U€¥¿MÕÎq«(qR•+lKÞQÔ!]7~º—NjDbJDÃZ?¦ë€= { §®WiÄ"S§®äGÎ~ ñK6­1¨Mù E Çõß~é¬lYqu"W›™–Ã×pyæ¬l¼tÞD›û̸œqóaèfK§k ±gã%êU…+‰V›ùЍMËžÍ1òá FªÛêçv˜xí´•dÒŽ%¹ÁëWÊ Jh'{Í/ßþîËh9ìŸö™ôB¡l¡=àÏ:æÒéέSròIë»nüuéC~QÝlç3§8¸N’@ˆ/dÙR~ù –O½-²hmJ¤i¬3u£Ý†·³%²÷Zïù#Y ¦"?ëè“ÞkV3=_'úL4>dîPü¸v;.·Þô?&ç¼Ç›M›¼÷·Iƒ[ý£y«L:O.,¢—õ„~µIK^ÚsQZ]*±|.@¬Á’b Îëç˜_À\6F»\Û\"Ë`Š¥-¸Ýáq;%Æv@Ç(ùWܯh¹AçÓ®_§ÚÖ–˜OÖPÝ4«j5©:'LÀ X™/ØÚô€¬L°ôà]W©û{'ÊbÝ›u̧X÷ל>мm•>‚²éa>d²Ù1Ç}ÐÓnóý¯.ceß÷®¬,‡¬‰ˆÜV6R±ZÙ¾ÒÇÒJµØ¯t¡Ú²²U³mV-+K]~³ììh»ÕØN7÷›áÝ—ÁµUg•]òÂ3Õv64¸õ:ƒÝªú*/É,üÇOµœiìYWrØY…ò5É䣎˜ý_gºýÖzZµkÝã/ñã¹ä ïÿ„9Ðóm›uŒtºUÏì0%r›“3ÿû—·^ô²èh+fqF‹¶K£ZIáÊ¢£Û¦ÑA9xUöuJ¾Ôn¢mÁeÝ>ùp£.BuE¦jV¤ºuÇI6].7è¹T,¦Ðߨ±$7ÀqvÇŽkó\jQ©õôEavzOH²ŽýæoŽ™g$¯Í ¦´¯ÙDßú˜)y¦ÓÔ~Ož£;Òjó¢~4L³æë4œ'I‚7+Y•œÉxèLsõgª·­;»SZ¬¦@0ëúÃ%p`ˆ«LeëǺMÑTDWNbå}+‚‡»ý˜ÎF¬ê¸;‹î¶Z·iVàX Ö\@.¿b=&†N7/œQ ñò p – àVèE?šx™{4(ô&7ä:s)|Ý2ÓTúX€Ÿe~†õR"Ї”·Š´óÐ̀ء,âŠ8ºëä8æ@²ss‰¼ß±­¨RmÚ«öÐ6~QÕó«Z>¥éœÚwQ}ÅOk:"Ì”ìžýi[£@o¥¶œC¸m&7ϱ –]„­ ¶¨ÿ÷èÚ¹e®I:K•Ty‡Ëv•®žµÚS[§ó\kûKÅÒF^ðheóÌÊ2JU;³AÎ_‹¬ìds!ÚL>ŒˆUCV;k¾`&¶H‡+àšÎ©Ínµàæ¶òBg _G>œÁHu‹Ü`¾uÔLÝq ]Ó–m/®Û”i5³?Ä,l¼ÔgD7¸äË«…Sëï‘Âòšô€7ë r~ý¨‰—Ix“ÀãÎ>SöðVSúã¸ECÖò)I +Y¾C€¥ÓÛ†³þ¾ ¼ŒsJà[1ÖbZÆÄÀ .EËôSöœixawÃ[1Ûlê(Ìí°€€ Д³¿ai±ú_h2‡·˜ÆšV pm¸ªo{©Yµz)N„µ„ñjØÃ¡8Î$³‹/šZ±¤ÉŒ!w˜Y¸ž³ú±ŒÖ@Ƙ¥¬ ÕE"@ õg´’æ«`ÆŒ}«Êq°Éìbvÿs" C²2Ü:° #8¨s;¡v0?ª60uå¸õ]0 ‹m°Ànžå—ŠÑG´2ŸŒiu 5Кª/IªÀýCR… 4Ðdþº¡³Rµù'b›CþϤª'ì¶ò„Vö!µ²™°²þp\CõÙgýòŸOŘ"Í(|Wq\DÂ:%nØ|<«ðö°C¡&G…àœÒñFô?.æ–iõ™m&^£¶ÛöÛH@þ6„Y&ö,aÑ›¶3ˆ=›NnPüt«Ýtùåþ>÷´÷ïUX.ô@z€a ²Žý‡ÿ²‰×] HÏ?qìuMä”Z?¬¡V ‹ïT<Ù±óò-Ip!À¼’„\²’Ñu~½íÐæ§¬^¶tºf…Ì “®ÆÑm¢…_uN¨_'ýíÍ´ÂÞ"SHel燃·!¶è`c ÀÅÁŒè ü†õõßw¸Å<ÒdZšÖÛ÷æÍ›Mõg?kú¨ÒNbHƒ`ÀèŒyoŠ\XÜRå©Ofhz ëEtÄÙpËÐzCu‘â–D^¹ÚZØXÌ%Z(M´`K›9\ êXÀöõ9pëØ^ 8¦)óÙ‚à ó >gÞyÖy—½óþmþeY¤ÎüÛR-³íM’môêÜOxúqµ@«kcÐt@÷#×(ím²„ „ïÊwŒÙ ¶d²Ž¾ß¤{y5íZoƒ$¬¬?uí…RR_êÚ 6®L’.WP]þuŒŠ!/@f0[+Ös£ß"æxëGªÀÈ•ýv„pzë)3ÝÅ'zæFìYBu1Ò6ù:ip3Hu[r®Ù&S˜¿EYoôŒ˜zäßûÖ÷íÇÿå–ø{¦jý=RX^Ó †Ý‘#Gâoûµgʧ@ú&WZl¾KÃßú•>Ñmj~¸Ï[˜Ø°–OIÇtYɈoë$ ¹>Ðfë4¼=Údê.l7%Ò:Ù!±¢K !칕£.~ÄMÄq¡jliÙaA+×±³AûÂìº ¼$*f›ÌºØ¢ƒÎe8™pmEP¾Xoz|X!ÍfÍIŠ2ÅœùÛ¿ ªÞ®zå°›Þ3÷Ǩ{A®¿bË̪N’£RŽba¦ch‘öU;[6Ö+7@; %•o¥b·bœl3Söeê~›s"Å,’æùÁ“2ëC²Ùö@iþ8 x caAðÝbÆI¹ @tæezðvÛ¼ËÞy¶û—SÕãÍfÕ ã{Í»Ÿ¿^ŽA´Ì¯vÒÍLo=«9…$0´©lZ÷:ê+ÉÚë}[ùjßL"®l2V¶D^H8}ÕDK$)K“ºÖÛ.Ž«|¡>i’oùLæýŽ_#;ŸÉ)XбÑÍV ´[2b¦£_÷ñ°©8ÞeŠæ$[ÚÚ´KÒu¤º%™ÂlwF©n©0©ÜàL½ÕÏÝà 7¼ã²E7HzÒ‰ ËŸéJ¶z`•zà-oyKüðÄM­¼ú‘ Ìîñ|ê˜ÅCÕÜÆågƒ$Àš‰Ù@ч7ínQÜ1 Vy¢+ë`|WŸS{ä ëuFc ÀÌÎjfå–/ímÇ™( vØlF¡Ó$M@¢€Æ6Œá`V9ÓbÄá`Fx°É¸ä J,Ö€cYM1p›Í† ÌÞ½{ͺï}oEõÃJ°«5 Í+Ù©ìƒÑ´º°Ì7¦`jÁÄŽ‘Õ닟¿(Ö¶DLÙ¾’€Ö†êÒ~Î`°±È\*^Ú1.GʺuÉêó®ÔXÀ«ó"šõ cøªÚój Ko˜q@—º]BÖ])vZíý¼†£?¢¯”¶ºv|Wá䨯OQ.‡áÆÁÖ-[Òþ÷ÏŸ7ïÑýz%±µ÷ªý¿­6Õërµæ÷¾×<òÈ#æèÑ£æÉ'Ÿ”Sê´))®PrIž&Íôü°ý0vIÊ"ÕJ]Ûo£„ae½Il8.%9 ¾l>Ìïø…ÄÍl¾­üb›„¯P,éN‘ò1qV~JŒí±.é`ì–§Üê”S¤eç[­Ü “سKrƒzɕ̟L¹ÁØ(7ðwFÔú{¤°|ÙzàÎ;ïŒ?1}¿€m—)­ª0³7 ¼Jkëµ’cm·]fV)q&ËÔV~¸[4°†J·¨~E[ÈÅ`m –IV2tS•©÷!|KÅP«)nÑ—º’Ô Ù¬4þôŒ¹´Ý9˜péEyÂP¨!>Ž‹ƒYåÌ:›èÝí”2˜¡»õÀ€ ÐEšÀ­ûÖ·l†öÊÈ âÎöö.Z!iDѵ’‹PVÕ)4µTJÛv1Åÿ(€{›@e—@Y–ѱ³ÞP]„ë¢M”w@Ø9ƒ”]Äïùe3ÿ牷 0ì«èXݯ~n™>qì®›²Öw-­jÃ÷61§)¹ ‰7ÂØ€ühâ#.Lùµ(sÚô,ÛÔý¡Yð ÄÎÌ\GMtnØNi?ÉJŠÊMY¤ÆT–4hÛˆi¬ì+{ÞŒ— uŠŽ•uI’¥£ U™¯Ku‹f ˜ ãøå«&å"¤ä2ƒYÉëf6êMËßuÞ j|ƒ!¶ìäîcf¶íRo¶ÝÀTΙé¤ï )×£¯Ü`>@n0?dÌÿºÿÑ+Rnàí{.þ…åB\®øÂ¾PôàƒÆ•R×<{ÐÔ~_áG¶hI‚œÈ°¹í¬,`k£$(ÃØ¬bÕ†5Þ©›N%‘¸a¶ù¢•„Ýß_Îe%ƒµ­H v–äð®Kq ýu²lZ”‘F?Ø\ÀmãéëÌ|I"åbíECb†\Ìï`¸­Xt0›JèoÃ8˜Eým•.œþ »,‚‚Rò9ñœ©­h²÷°@ÀÿÀ¡‹õk{i-}ð–ë·5 ~-Œéy±dh`ag‘àüL(-Öà #!èîî^¼sésö…ÿŠ ÐÒ®ýu:p;«vΪ?hŸ“98YçÊ:`y+4 #·ðëŶLŒäì"gß\¯3§OÛQ>€ÂÃüWšô€È™ˆ!V€Ø·ÿ» –¾€­)•c•@lED‰ôì"×tD#QšŽé£š0[U³-¶gÅÖ.ÿ8výé Ç5Õ|6oI¨…ãW—B}ÉY+ŸæÂxœ‘Œ¿2\¼ÙñW<%ƶÛT¼ÆÌ^Xg&¯;¼¬Y¤ºEnÛ«¨AÛ–r.+°€Ü ´¿ÉÌù£xå7]¹rÿ)˜Z–¯ˆ°ÿÃ?üƒ™ª9g‡º¶Z¯EÎKãód·úž¸Í&uå³[ó&I(s)æ–¡ø‰jOÙ¢6ØÛ; û £›‹×ê®ô…@&—x¬nÐN½ý’ë<Ùo¸èÈ\üÛtfî˜ÎÁ ·d®z ࢽu&ZÒ„&SUÔbÖÕ¯7[4L‹3Méý÷›sb‰°ŒJ:˜cù‚d ý§ÒÔR?@6ó Œ6è÷z[´µÎ€x¤Ãü2ïœÁ¼räx¬s\~ù¶¿VÖ±jÛÏfɺÒV@¹¾°¼^À<ÛºŽÝeZ®ã ]f}¦†ö÷Sê«^Eòƒ/¨‰“üÿfÊ-Ó¾qåcº_`hÉ·N£ amH×êÏô!õ_|ã°û¯F¹ãºþ^ÿïIDúðcˆ `bÙ x] bGÌŒ@l²eËÀÎéù¦tµN†Pl"Ë’$[6_’,¯ã×\Õ¤-›ËóÙß_nÙ9~I \™0Óâi¥Gôzë4°kPJt±³¼{Hu»Pé9›®¾â)]£§¶š¢¹AäÉy¸ÓÊ Þÿ3n4Šzé!š®â˼ýªièeî§Âá/Cà@öéOÚ|çÌg­Ö6¢Ì£èmš–ÿã–ì°z[âÚ^ ’ä€[XV © 7׈ þK@ºÄòaG1¹Ü|Á¹c‘à ]ÇÒ%xpû1ufhp‹æè<á`¦Á±¥bRøšêâõ¦ºHQª­¾ftß¾}fþ _XjÉp–ΫDSxR qR õ—5ï Û+y€IåürœÁ‹mÐÎÌퟯéÔI'ü1«aìÂòн²/Ë #íØ^¦A,oÔ¦¾B+’*¤.¾lëYÝg_ÔGØo&1,Ûx™žÐ½ù $?ïN°Í©@,𨅸"“™ ÄÎD&,#;_té>Ì©Uε˜šÙõVŽÐ8³]é¨{­óW®£SîØ<Ϫ‡;—2~!1p$„+“ë‰YÃÐÌ"1ˆmé5óµËß]Ù£úéfºó¼´ ¦|°ÕÊ 2© ¹ÙÁæ^% ÞU.7ðŸwÔú{¤°|ÅõÀ<`ÁíÙ’§Mô¶ó»ú-¸õ6´h¦Äƶ-êÀÛu*#I‚«I)ws•$P_DÙѪî2ű2¦…‡æj0‹‡'ÐhiäÕ‚[4¸ùÔß:§ bàÍ.&xÈÆÁŒ( °‰QCö²a¥½ÞÌËûÝÝä\Ÿž*SV\“øIÿ, …±½ãŽ;Lå׿Î)'µ¨ÊäŽKvpZr…w¸RÌ+,.àÄ€Yœ¿ÐÎî‚Zô´™8ƒ%mHŠ _“#¡§îNDPHQ4ï›Ë;MĆ„óà×ËòÂtÓOôÛ”¦¥rWSûÿëº=áNi¤WÓ¸§ú$aÙ®Q1#Ã=«ûàqý®¤¹í𨙅 «{åÔbË¥‹…‘-Ž”Xv:2’ˆ…¡-ŸoÔO£oJ_ «¶SFJ£õf¼UR³&¸g˜ËøµZŽ_ÖÙWQ œÄ0K,ö|YÙÙ6SÖÛ¾85§Ôâ›å\–ä`In g°eÉrƒhm¿ù·{Þj>úÑ^•øðªlt¾nŽB=WO€X­ígŸü/Ö‘ oYÂöËkHHÜ0W=iÁíå$¡úÐ3µSa}¡—ö7›ò³ Ò=%Oû&9¸­+àúÖp˃•˜µÓŠž@…|šKð@³…Ô Üñ«c¦.Ú-¦×Tè%F4…¹øtÂZC“zÂ9++–žx äv«-Èè¢]d꺀ÓQÓ‹5OK:ð.V—H‹³w¼:g0’+¸ì`îø«1ý¶@wŸŽÿVteÓv§Û¥óÚߨÏîTŸ‹ýv€Yƒ“4€Ùv¥ØZ€Z—TAŽˆaúâ'ú;¡‹_Z‰K˜ãSÆ b‰P0<:ÐÄŽØ©±8wyå«by^9 ëo?R¨Ú ÊxXßo&Öõø7§\^ Ç/ëØ{±u‘XPƒØæ^ûìOÙ° 6s¶üD§);×jJq·XßÖQ›R¾òÁ=Š4‘–­]&7øÙ#ËŽ~5Ë –ˆ  Öß#…å+ºHÖð™Ï|Æ"æó¿HŸº$c³ë QÆè?~€Ý2±¼ny­úÕÇ}º¦ÅÔ¿i•˜poR… ɆkGºéƒŠ‚1¢›7Ô×§+š·í€XÀëÃ?löïß¿f –ÿq/ €õ²±aO`–µõ;~M7÷çýYëH$„â"ŠA¾$ô ém³#³›/˜ÙÝgÍBõJ)GÅÃ;”êP£tÊd)åßÝjæÏ—Øè’übÇÕqµ¬»ªµtr¡ùïEJ°’„ñúž¤±m‹&ä £( f¸"ãt»®Å^Iñm“ #ñ% ;K•Ékƒ,®N¦Ç.×^«ÛÕ”'À"Ø!11¸Ŧ®[\7`™\o›r‡M)W‚ç`Fˆ°%n¨™Þ`f‹å¼S.öBÓ0tap/Üä@F‰ îÉîláĉfÃ?ÿó’Ü`µÁRãÂýOW¨MuN„³r2Çò2…ùe›¸bw-èõ°¼8±åÛVÔº¤ 86æj_–¦Sàÿ¦Uß´o»2wZ+;[<úÿÖõI¾@¬«Ï;MÅÚú¿¦[44¯çk¾Í>OXÙ…˜LönÈæØvtïd§õE˜Ý&2bGúˆå+{˜Þy[o8/'7˜;o½ôü-öÉ î½÷Þ+6¡B&}Xµ™ôV¡ìÕV¶’„¯ùdÊØ¶¤ÛÜÎ5(„Lév½'[¡Ø¶¥gÐ: qƒÕÏ Ðζ*–ì¶ïn¡æËÎÉáË#O˜iàTدÕ0 îBѼ· éå˃6£]+Zˆ˜¦žŸ²S;ðb\rñ°´™œc>€.L.bhtßô¦7™–¯}-“&ä¥,)\¿ªã¿o¼ósm´cjs©'ˆåu.8V×±¼„'c]6²†Oˆ©½^û¾6ÏŽxgáÙE˜¤ aúê¯eàzµqOÛ™-ˆÅÑ‹[±È°†ýøtç‰kJzØŠù¹€7[©‘–jIФƒÍçó…còŒ©P<ó„Ö–uheË´ #»/¯Ä`¡&fYYäeù2ˆ‘²³­¦\`‰`v®3³úËt›È™&}å!Û¬ 9ƒ­›6Z¯9¹Áø†ãæÞŸÿÔUÝÀ{AóPÔ+…uWU<èm+G²¸/¶­;Òí"KˆÛ6ƒt»n'I(Rþë©k^°‰Êú” æèVËÎζdörõº©“'”p*æÕ”' yQ Dž@…\­r¸C/œn«V謎ÃÖa™Bét­‡Mèò‰Œ[È+GÈäø^ ËK•ˆ aÝŠˆ^¾ÒçÂè"M ‹Y—æoß¾ÝLÝw_&Mȸì˜dŸUØ©{^B 6U'ùY^B¹¹e~–×±!¨ÞÉëv1À· çÃhC¦IÂ÷“rV|“ô´àÙZXKý‹šØF;%s×Õbýý¨-Ó3¥l²Á‚æÚþmfrÃÉUÉøµƒ²3är³Y@m¶VzRq’'äèùü¦àè/2¹¿Ÿ  Öß#…å«¶ˆmû÷_ú¼™®êOÛÖ¥Û5“%fúZÓ ÓíÒ9N’0¹çyÅÆµ¿ò©£â~yB¬qpU†Ñ8æä ¹¦ç­íÛ® æ-&Úx.¥C /Ðå% ØÍЭ˜k°žÔ~ ‹Vç4g€[^øeŵkt?)ê½Pë.AÊ©cyavq^CÖÀõŽåÅÍ9¯}J ·‹Q}EPŽ“iR…”'ãÙøa9ßý?-Jª’ÆÉàŠ³#L{zzlâ^xÁ *2Á‰ÍËQˆûZih­ˆE›ÏH+®ýÞ©ÄÂÎ ÔMf¦N!øjGLÑëÅ/˜ÑíÏ*4WÌ»kÖóNb™/·¬ìjH ³ŒôÍìR¨Á-1Ë ˜ÿÄHs[rBY(Ÿï4¦FÑæŠÌÌ;Ÿ\*öb•,`b¦jý=RX¾ª{ ll[—nwNÃG0·™IŠÇklDƒ…Š˜‰m«Ú±ÒA*ÓzƒÊ#O(S˜b¢'¬¦ä÷|JRÀ€ØÙ:…ùªxgÕ½ÎÆìžè:fb Á©dÓ]'1¨¼Ðiæ•Èǯ|J 8~ù©˜Uç.‚Ù %þs(9ð‚ü3ÄÐ.ì»`â·ŸµE"÷Ý`b¿õÈâ|"™Â‹Qnàï¨õ÷HaùEÑĶUœ=3Öx²6qdWêl@,`–T¼°²±®Ôý–i›J†ôœ˜%íÜf²)¾l.Ž#[zhƒ)ª›7 ¯V}»‚ý Šö·™¢gMl|Ú¼²ëçÌG>ò‘Etƒt× jÓõPaûUßacÛ"I€¹M–n7 õwRñ¨€Ñ‰Eöv¾FNQbosu$óÃ-Œð`È\x° á9W>שÓßÎϘX퀉Īlx°|ÇÀ ÛNÏœlÁ½(q{¥Ž(Ü™%¼­–ÂeÖ…Ÿãöa–€j)¶Läçœ5 ›@J~fÿ€‘ZÍÏʱBhMk‡¿•kÒ›ÐJ}ðÍVë!ÊÏÛå¯Í,Ûƒ—‡'np#öÎv‡&l(ûH‚Ô!šÌÄž¡@êbm ŒE )óglSxl«ô½DýŽÏÛà=³åÜæq;½‚ÛU{ÂØWûSÝ·à™¢OÙ@·öà¯æÒ ÐÅ®ÐRÈ/÷Foê¸ ¶nºéhéÁ"¢ ‹â5ñÈB×T·Z¯x»/” À^!tô†?. kËQ€‹`@30fÙ,ÀDx ó§H…2š'Ì.‡ðé ÎügÐÎÇÜå¯n¸þä|dhK(ä–X?ºnº;ÚÒäÐßr¦Û Ak¨ªâgÅ×Ê:0)Å`u)4/ZñŒòÐÝZ+-ËY†ß:óúÿ÷uxÂÆB‡ìÒöR#té %ìÄwMí¾‰®æBj¹u¼"%LÜ'›Áa7|ùwbªB -(¾Yg‡ÎõKÃ×c¶»©fõ4³ý²‚ØÊ§¦¸Ôö:²-µ®nÇ$·ì¢ËÜ;ßùÎ!§Î†íž@mØÉòkB±më~³Àµ/ÞáÛ¥êuÓ“qËì]®eæn×®/åH€mÍÖ ŽWM'¦©3ÁäÝ=bOð#ÖlÓˆ5=¡ytSQ J¥†×óÚBE8h)Øù¢˜6AA©>* <¢PQ4šNk=Š®`W Û£S/ò„ ‹â„ èîkÐ0“R؇Ÿ˜"Û®M¾z† §2%u6%ŸnD68 À¼:O+“‚1ùSB¨‹*Àãëç*öé!w¼u¿¯NŠ!\æ_îË|yâΓz„)üŒÙRîúŽ}r×wäGͶt¤e·àV¯t3‘Ø'´Z',Û·\órAk¡ú NŽÝ|Ž;:îuXè ¢ðwÒ•…ê\Êv¾;Øšƒ ý¥ï:ù¶ŽKƒ,@¦ê}£º ¶åõ+¬Ë•Gd#$—€–N_¾ó×Ôøß–¬_¶¥Í[ jö)䚺æškÜM7ÝDgÔ!ÏtC¾¢7Xòyèµ±mo»í6÷ø¾ŸJµmtUãdî_¼Ñµ;â†}o©k¾E¯ÙëÒJPÅzWõ¼^ ­M3Û"õ¶ev÷,hõÊ£úróËÆ©Ó„âoÊ{KŒÄrŽ)nW×ì ¨ ÀdgÑ|oâõgº¶ú£îÀé/ZeÓyƒ(@—(–±hP·æaû<첪Pe­@Âø¹s®;Ïí9õäŽq¥ž`[©j:€0Ô'óª¶ÚN¸µR>I$óv§( Áç4 —Ç5Ï“_x¿;Zÿc[ê9÷Çü„¾Â¾±¿vÝIÕ+­¼-À»šתy=­'Þ‡+ˆD0rç©Û}Ý©J>ˆí©0[Åœ>ëí_,0ÛY ñbʶ<…ÀÖFýJÔnêøÅ€ ÝMY¿ì$ý’+_|ÙÄ/Û­¦N ¶[Í—ì£æödÄ…q¹#6•üêÖê×Õy>@6Ø^¥›"­´?Ý¡©Xž|l‘ÛS÷J—TÌ®žkwö3u™2ˆ*a hµDØ5K¨}•©JE®8ä4XATiB+±èe±¬œ6ç>ño tÏÔšÐo"ð÷ç‹m‘E \w­j¶+,Þ §»æÆmîøi}Hĺ ӽŠ\£~y¿¬JÈa‹Å ñËÆ]޲­K ¶lM™4[åöŠ«/UÔäÈ}®ApKœÃöÓöº¶… µ2+¿Ý°­\5¡£s™Üöaå kCì[:—1'ö-€[®¡yQlG>}Žk>åõlø ·z¯ìFúA*ϸm¦iø!oW(wðôîÜOºÝ¸€²EÂØŸS,i˃:‘að ïÿM{}ÓÀpJº°‚]y%ÓÎ9 …qës 2ÕÑ1+g}. •“ ©`jû1}ÖíUªuª²ÃƒÞ›íRZÓûµ{È;>Jð4ˆ õ•®?÷‚ u´A[]³cxíêÃ#Ý‘é›úäá4ÎÛ2¹ÉG)ˆvîòªÿóawuµ§y‹A¹Fýb[:ñÙ~Þ.ßù+Â6{J_6_öíoû Ë•mŸ.,$PÛ…FKvZ-Ø~÷»ßu÷ÜskJmuÇÆïð¯Qo«j5¾¼¬ ís›\jt<°Z粪•RXëõ:«ŒË,ömõÖ´eÀw.Óð¼]ñšÙUñÜ?ÒÎñÓ7Úª“æ€/ .Sõž±~üqq‡[ Ø5_îI;÷Áа#Z±x];|Ïl×Ô¸¢jÜs‡Œúñ ·ÖuÃ÷Mä,v…Ô0J:7ZjÓ+yKáú0¿Á%ùBè › ©ÀjewgŽ­¯4>ÓìÁ¥´ò¥­VöˆzuVdY }³2jíæµÏJÐÓçç‹m™¼W[\ç®r×ЬޭΨ–ﯶI]Õ®Qîø_s­³ötëp~[Ál1~ÙŠåzû§Ñ¿š§(ÌâÌ×݈Wç¹3§/r×_½Ì&lÖÅ+‘4\.Ùmh¶À}÷Ý—úú׿îöÚãšGïuǸÀm}Ód¯ÚzõV*n¾D§²*©·Ì‰špõ¶L¡ÁÊûvتS}Ǧ£ Wç;…¼ëQǃ®Ô\ûÁàÇEÛö–ûK2ÐõÑ/–‰¸@81:¢5Ü£‡—ïŸ a¬¿Ô¿'ê1vË9¾Ø}3{&ÊEOÔ¹;eNXwAŽÇ´;euwßrBk¡º –ŽY¥ˆsV÷ÈÃgè‹­j­ëvç®BçÓÙvÿà-€õ ‹rª¨6­³¥ÎOQG³±éï£Úç]ͪ©îèÛVèmZsgÅ´ a¡zý$ßùËM—5ë’­.ß¶ ’Æ—¥°zE2X¼ðBßùkñâÅ “ÔÂ¥­H°´öJrá°fj¬ø––?n|{»ºîÔ)ž§àU {BM«žþìJw.Ë£Þf;—É›j‘ÂYæÎe64/ac VÌмu›ø»i¬;²xeÙ®2¶…ªƒ]l¿¦Cšú¹?×:¢ Û6˵ À+y…«žÏ0`Ë5Æ[‰Êè=–™NBö™í€ÇoXìa¾§‚õ—íÆ*SAØKðÌ?bS™ã‹éMh-¦ÞµûÇ»›ÕqìÌ9Jy1ûFó˜/–XN‡ÙR(¾2vîŠ3ßg®Ój¬{ÌÒÿ¡MÃÖ¶6îñó|û5ÜwŽ«8\ïŽ\W\‡P¾[}|Ù 4ÁÀ‡äê‚_–ÁæÍ›—°X¾ Sâú¤!Kl°$ûÐlEDH jùòq/¼~]9räH·oß>7~üx×ÐÐà¶nÝêŽkÄ®c“^Ϩ·“\Š'÷ùú2U…|)ì\VîÐ`ľ­Þ6ÎÇ¿å50;0ÀC4ö-ÃéÖošî/yñ¤mùêÝÕõýÝŸÛ°{šöz£Û{Þã9§Ø2ä‚‘|üç~F±-%ñðW·_ß+E zPJ¹]Í[³s¼”XA¬”Xþþ€Ø¶iz;4Sq¾˶Ø4ì®Å.Õp½<ÿ› ü²µ¯Ìð–«ö‹· hÕq¸>æ1~ÙúíSܸæÆì` ú I¬Ø‹Sd¾¤A‹l¨$ÛÐiæææT]]ÿÛ !¾¦OŸî^zé%×ÚÚê‡!|üñÇÝ믿îæÎË„¾qNœ8áÖ¯_ïÖ¬Y㶤­ xÛ¼zKŒÕB¡ÁT ˈžàö)."#—•±s±oé\Fˆ°–‰Š«;Eñh5'>->ÚÃK^è‘‘Ì Ý9ýÍŸ;îÅ7úÁ(ŽNßX¨êy·{øzå=*å[­:NìÚÌçÖ*¿žBÈz=ü ‚Ó0 ç}š÷ eØ0qÍR·û´\˜/C±ýºˆb-Z‹iøbüµÜÃÝô ˜z”’Ç,5Û&¦}±b÷åX J)/Ì;ü'K¼·öø¹Ãéfý²³U¶³ø²q~Ù#çúQ¿¿lØÚå_N ¶ümš”8€[‹ð:gÎwÇw0ì {öÙgÝñãÇÝ)§œâY¶£Ò’€ÝsÏ=÷¤3þÉO~âÝÆÝ yoÍX'ßmLËÚðÞæ –¹Ìw.)Oª:—¡â–+YìÛ£§¯uõf¸–iR“5Ädw:˜•«n”ÓWþÜQëçkèÞQ®éœâ^A–㜠z+›35~`Ö{8î%ûCÍ1ÅeV€þÝsŸ(Çi ˜2Ì‚p|ô. ¡±ÌÉ«¢ÜccW.Êñײ®Üƒt§MBKª,¾Ø´+Ж3Uošàê;Ýwk›ºß«²Õ&9wª<¸Ä—¼Š £]å#3œÛ2\¿¶ªØ.7úéE‰_¶œ§ˆ²¨-¢‘’,ƒ¿¶mÛ–úò—¿œUcGåUÙ£G:<´—_~¹»óÎ;ÝÁƒÝ9çœãjkkÝæÍ›]MMû£?ú£œÚ¹s§{þùçÝUW]å×ß}÷Ý>_Ó1õr•÷–ÎR¥„ó˹L#˜•»sÙˆ__à ^’×jŠåäÕÚÖ ú±ä2E­ 9'Û‹ü=–{ÈŸ[)euì+opN{ÙµŽ8Ø‹gVÜ¡rËm @â—îóLq*2 §%âêZb˜aKœ—%¥°îK”K Xa)\æÏ)'(?Š[«Ñ0²‘ E°c–9PÕG‡¹êC~–üúØë;_ùÎ]K.}ÖR ˆ-ÅRPê5"\aÍJøuPaÑ^@ã—ÕÈ_±Cتp"Tü~ºkoisdz5ûƸº“½Å ñË–ÚúÝÏŸ@m÷Û0)a¶aºP`±,_¾Ü¯S¦Èï4nœ[µj•‡WƒÙ—_~Ù«µÃ‡wW^y¥Û¾}»Û»w¯«ªªr›6m"üJN ´$Sp5ü®‡b:—­X±ÂíÚµË5ÛçÎ^íêó6 ÖÙÀaç2†+%4êm¡ñÎs*|hxr¾«j•Ó1‚“ªǽ#ýØä€.ê-pÛ:AµQ‡ûÄ¢T;g1êÏ| %Ö•ø¹c^=Ï{_ÌËï§Ë9x?þàá·Dû>ßC“Ö¹á{gù3+ µG”aÓä„ë’ÇØR{uG°|yÂõíAȰTMGȰœõAùá¾áƒY\þq/^Ðof¬½º3ZñÎú¹Þð@dë¸Wø?ºøU7üñsÜÑE«|G¯î¯+ûFCmµÊë}±@숞õŸûï¼m M¨ï¾Ê¦á.u¶ÞŠÍ9äRG*¾Ù“Râ—=©IúËŠjûË•HêÑã-ðÜsÏ¥***Ü+¯¼â~÷»ßypf±à•ÅKš0a‚»ôÒK݈#@ºgÏßAìµ×^sòÚz €‹½àÑGuïyÏ{rê~ÿý÷» .¸À;֯NJð¾÷½Ï/Ó±ì‰'žp ,ðÞÛ{^Wç2Aî˜Ý¡ÁØAËà!_Bµ­B½Uh°®t.«~}‚kxútwìÒ—5òYçª$£â·•{½€¹>{È¥góèC~¹¿ØŠñ碔‡ÀCûÎaÛf»½ç­Wï`ψM§¹æ±ÄCq†Ia‚Âh~_ÀúoìË‹·õ€;<;×G9PNÁµ3h%TUŠÔê°¨eþfÛ´Noi,ºo‰;~ºFÏ›³ÍVõØÜ|±a¨-ÔØÖÆÝÙP[=up¢°Õ'ø9¡¸RsÏçí–§,æ«âžFçÖŒrmÑñ[±}¸Kü²=uUÊSnÇ{žò”—”’´@¿løÃ©[n¹ÅUVjl¤jÅÔDÄ‚aÆù9¾Fí•X`–_wÝu—· \sÍ5îÈ‘#náÂ…îÉ'Ÿt“'Ovk×®õÐK^¶¹–øl@këlN>¶Ï˜1ÃOX掚ç¶lÚâŽÔîv‡å½uÇdµ}hŠ«{àÔ¼¡ÁÉÌF3£sYÃó.õ\•·©¨Îeõ+æúB@K½Û‡ëÇoŽ”’9<Ü*¤Mí^ý(¼ªQ·ú‰mø"ŒÃ_’BnÝ®tÇ’hü܆í³Ü±‰Û}þ¡ôàÊD{·'ÆíîW±„{ëZóõ{å›ì§É?x ®ÊwÊJ§Ãd= ´ŽÓ°¾Ã4Ê_ ´:½s¶»ú×f÷Ôúb,JAj«íÌ®yfùÂÆ#–‚´;ÆÏ+ä^bÝU œ£È `ŸÝþ>lúž8É/»d¹õÜ9néô«Ý;o}§[¶lYÅ/~ñ‹ì®ÉBßµ@µ}×öÉ‘{±R©”{ÃÞàÎ<óÌœ£˜¨¶(§¨«¤|ÐmÙ²Å+±¶ø%íØ±Ã—CX/•éðáÃY¨†'MêøqDýÅkÉ–m= ñùçŸï'ì„;vì˜ àÖoÖÀÏŸãCƒåØÁGUPd Vûûs¼E _ç²a+À¾ÂÜD{÷Z‹™·M’J«I!v} m 5›õ¯ÙÒŠÔqÇ(F–ÌŸ[+®;4ÊµÌØåê_ŸäÃ1 ‡¯’×Ü~ÎçÌúPÁ´òü¢½ÒŸë`8—RÏH »¦•º[Ùò‚VÔTTUîeTÖ¶q²5h˜ŒâZ®ŠŸ·Q>Ò nøŠùîˆlÝMX j¶k8ï0ÔVã~wìÂM=n) ŽlõF=Äš¥ˆ]´G0+ì¸Âv†Ôx=è s¡k×Ë‹cS5’äõ‡ØÐèÞ2ëƒî¦¿ÉÇ—ý—ù—î6S²[ Ú26fRTÿm"` a? *ÁRô•€&~W€õ·¿ý­Ïƒý`âĉ~Ùþà ÄÒ9Ì Ô”ZË£g>b‚}šÉ&ۇㆌº |/Z´È­[·Î­^½ÚíoÛéŽLÕíØõö¿çå –š$ßë•ëü„-¡Nö„úç\^¾[¹¬ví4ßÑêð»«Ôíe~t[ghèKM–̶P-ÛBÝ6Y%ô#ã;ŸÔÈbÞŸÛwÑ€ƒÓõÃ6}§ý@ú•ë¡e+Ò!¸ŽfBq“2v¼ÖÕ™³€÷Л\TN?$©<Ÿ,£[[ô÷9PE¬À^Lûsî€í±Ii…¿˜}ŠÍÓ_ µ˜ú?ï57ìɳêOeÇvnMŠ–g–‚h¨­æ³¥ˆfFïŠîS®Ïf)¨Ú¦Îe[Æ{Wc/Þ(5V@[DªX«Î²«ÆºŠ—ƹԡj×:ò;6a³«o™â†­9ÕýéŸþ©騨8_ùÊWŠ(1ÉÒÛ-xj{»Å“ãõI ¨cWêýï¿Û¿¿·`5tçÏŸï£`?ÀR@¯h4«0ÆÚÚÚ|lÚGyÄw>ñÜš¢K„ì ¦È áÕW_u—]v™ã- ØÀñQv™“è ¦¹^ ¶Ì€6¾]|¿„pkŒóþÛÊ1ŠeJh°ÎvÈ„«\;ξøyW½g´’=þcõÎ[T\:¢1ïkÛBýk®V íÁËJ áØV½ê˜æ—+-±gí³¶ü†Ü_Õ_z»zíl×´ðÉè%2Ÿ çV©×úûÏ|®KçÚ°`¨Öðˬ?IiÅ׊= ÌJk—*³Ó°gÕF¸C—v ÿñ ë>¥ 5R*²|±mÓÊj+ZÍ“,z0ó¼æïO[ â,ÑBšô÷+€õ + å¡»eª,8²/xB ­®Ñô1s<Ⱦ÷½ïMx)Ú~ýðs¢ÔöË’T©¼-@¸®ë¯¿Þ¦‹0[@"¯øŸ~úi¸&á¹ÞøÆ7ºY³Ò=¿ãj@ž%K–äxhQ]‰€` %×€–u(À(»a¨ fn‹.‘ÿ-ö‹¶°ûð¶ŽÐ`OI½ý¼·[F.3Ÿ­•“Ò0½­—ltNS½ÔÛªæ1®bãG‡”o#È/ãíéÄ1™ú‹m¡vË× IDATîß¶pnuëg¸Éë{ë×Ò?^ È2ÀN…ÙÑ:k§d[ÿjjû×õHjSÆÐð¶©Ûn»Í]tÑEîøƒ‡Y<¬Xn¼ñÆì‘P`IqªªeÂOËèa$TVT_€ ì’f‹MëWè?@e6L€1°à0O¸Ì1iK”Gh1ü]=ö˜Û²fª&à6¹Ã„{I^ÚG4¨¡ÁÊ˦H ¤ŠÝÄ_ìðÔ) a£ÉRÅ>½ŠäÖl‘‡tµ~Ψ¹c»ö ê˜"Èí57&Ú‚Ùˆ¶P¹v¶ãÕc›FZó¡Å2E„a§ìœ:›c;81kGgYzuJŸkЃE ê¯a/Œ÷·r/vˆ4SùbÕßÊ–Ú‚ÄB —  9n¸=\¶¼>Ži)g}ÆßëóäY®Ô9[ Ë—m;–Â{$U£§¸L²<´]Å yæ·w9‚€•9PæöÀĽTµOûz«À2öšŠ6E‹©Ô²îË–ó7ºã²ôt‹/–^\Oo)¸To¡æêa¼XK÷ƦÕXo) "Ê4ykOmv5;ÇùÎk +Oõ¡¯¸æ oùš7o^ßáIØ-@íÀ¾~IícZ»Áç>÷9?!¼ˆ Kç«gžyƃí[ßúÖœ½¬Ó ™/ƒ¹sçúýPmÃNd@'j-ST){̘19Ç#?eàß S\^¶3 D¨‡ûw—ÎPŸñçâ &4;TêU[½ÔÛºT V¹k¸¾Øó¿.÷#æŒUG§3;:{¹UÛG¸ê×tOw€¯‡[YZ§îóV‚°^å^޳-øW‘ÛÇ*BÄ W¹_ÀÎ+û"‰¨Û4Í{`éí=ÐíÍä!ØuŪ¿G§nv#6+4›¦80¤Âë‡ù¶»*k;@²}dúa²ÛÀÌɯNw–rÊòçÖ¥#¿íWʼ~u£êô°3§üÅJ©G9ó†Ð °òT´fà•ѹR#YAªkj¸æ“5ÈŠ–жâp«p;zCižóRêïXwÈÒ°ibzà:u•b)ÐÁ°¸U‚XÁ,¼Òj¬b._¶ÎG^ÀRÐðò©ÞKœ¥\êA5ö;ßùN)ÕMòöóH ¶Ÿ_ ¤z¥µ€Kðv:€}ÿûß÷yÞyçùÁ…?5šð×òÚ7Ô¢ÔòJŠhÀ>¬‹-y ˜Y`›ïXa>–±(PN\YMMM¾£àË´xñbï¦ÓÙöÝ[ýÀ¨·m'޹±nœ«þù±ËS35ZÎT”Úèqùìó(ŸÓP‘>i$ŠmÝ5c]µ`²â)©¹•,ü¹'½ UWË=o•,¥D[àuã‰i{zºš}^~±êïèû–ºC—§Á%„Ç>?^®À‰YÛ]íú܇Í^®B—ç•U|Û¨­@+ð*«ëO‚Ö‡±R>²…ì©qú;›rÀU¯›ìZOÍ|t©†;…–¯ÆNT=ÙwII-2J·X¤Í}lê‰û\ë¼ô›|¿ü{~ž‡×+ߥŸµ ‰'Ûq-ãRµƒñªÑsÂn€Ë«ù Ùõ®w½Ë¥`åÊ•îºë®ËÛ*À"±°Ä%bdž¡·ØÐûÊ2*ïìÙ³OÚ= À–(ì–­–`¥¬ÐƒË6 –maÂÌDù¿úÕ¯Üèîh•TUý;|ö‹úÑ“v¥Æwl¢«Ör\õCwú~ç]©µyS½TÛBå4¶y„«}yJßuB+Ò¶pxñJwì¬uþõj‚Á~¼ŠN+ŸyÏ|Ðnð>]=$ e˜µ‹‹?ÖU¤ºÎÊÊè‰y´úuee5©í|¡]­­#¶z¨íNj9k««ÿý¼nA-ðj£wyKð*KAJ–‚T1–:xj,¼NLnr­Õïâ5ÊÿfŽN½zȯ ÿAK¶;wÀÀÚ7Úu½’ÚÆ´€Ù –/_îPT`HýÙÏ~k7ˆLâSe߸´}ûö`Â'þZâÓ¢Gy£ÑÈÌFí xzCh e7jà3ëÃ}Âã³ ›„ 8ÁhhÕ˹ÖÑÕã·É;e£ksÀCnÕá®æAvx¶«ª ¸=M½Š™cYÌæK@°aSs•ÑÛÔ-ì„Ö>¦Ã²ÐШoœmaøƒg»Ô(ýð:®žÎò¡jØßŠòRjèL¿O¹€^»Â/ùÎ@zî‡Õ|0 ÞÉð¾o„!ü_û0Ý[¥L–£µ;MVÐ" ­ú»d» ­…ê ¡MS)j­Y ª¶i ­Wb±¼}‡H¦Ð1ÙžŽR ˜±X vÕ¥ÕXuðjYºÎ«ÐtðÂR0ºz¢‡Ø«ÞwUb)(¦ayžjù짇݀ál׬YãÁô“Ÿü¤ïÆè\gu–;í´Ó 6à)oUNg¬p'"Æ)¯(¥?T]mÿ(¨Úú©S§æU†-O¨À§ÄÃ9s¦mŽUi³3 ”‘hi'|†)Í yƒÛ An% ¯–«ÒGŠïît.€Øà— ´ïÁFTaŽÝÉû.U$¥[ uÆN È1¡äæ(Æ"€âé;cõ3h-t²¨µØBµ6ÖRðF |pv –ï‹=9flËU+¥ 3v¸,Ó&ÌôK/õmH,….ØÞž@í¾øõÔ5|lêÛßþ¶ûØÇ>æÁìÚk¯õ*Ü}÷ݾóU4ºAô¥ o.qnkVNѲzΔ* äÊ›[’šk¶ë„FìÜ5‘Nh ¢.X=»2'\Љ…¥¶w,ßG [±ðë!õWV‡šƒº ü¦?‡Ö³8x¥·^Žâ›bæåV+Õ±¨M¤t xÛAªÂ{®i{KYµU×Î:cöµöŽEÀêØóô}«×ÿ§ïpU[ÔÙt£lJ]´DcÆÒÁ«eª¢(f,oGj¶OÌvðºä’KÜÒ·¦£$¼zâÊÎ2¨œ×uОÕ~ô£ÔG?úQ~X HÄ Ô,XP”ÝÀïügðiàB-jèÂ… ³¹Ãµ¶òÇ?þ±‡i€×—mù¬„ò"Ç “Õƒu(ÇaNQ”ÃznÃõá2çD¹¨ÍØøL':âçjØÇ“âê²/ÇÿûßûbÞñŽwøˆ x†™¶lÙâÖ­YçÈźp|ÖV?'N) [ó¤bLžÒÑ EWjnIÐ.J‡TÊÆÎUH±Ú—;WÀ Deh Þ3[äHhÕ›Õ¦‚•–ù½®Éà×7h'q>_,•y¬¡ÂëßnXðÔ¶ŽÓõÀ à´”/W DÊ·Ý…ûeò’ÿЛŸqõ«g¹ ½¡Èúj¦` U¿|­Ô©'U•¼Y`~@o2o *›4pÁ°6W1ñ„«µíáÚ¯ØâÚßT‚¥ Pc£1c«b—p[™˜±‹–,ò£6Z¯ž<ç¤ìÁÙ߃óü’³D- Rÿú¯ÿê! »^WMìW^y¥ïÖÓµÐ\VP ¨†¯øùƨ%/¶â0LW©V&Ñ.¾øbÿÑÔÚpËǶhⶨ§¤¢£ùí3€Œ—x¶wÜq‡Dâ _ø‚mÎÎQhðƒxo1çü| v g"d (r¥šûùö5ÛÝ‘”¬ ‚\¼¹ÍÓvøeü¸~Ô²Õd[P Tœ’7·èbDbˆ‹Û…Nhµ+g „;ŸÈžx?Yð~¤ü#´P>Ì÷[Èú`Þ^Âx~ëÛPÙFÊË’å á1V6w °–‘“?3š—•›®Gp¼ÌöôúøŸ¬œÎRAÇ©T&.n¸=\vaÞ ömͪ¹îš—¬õ¯Ý …¾²¶é¯óìCк[þð ´šE¦b‚ Uàêçg7 b»Ê Mþ3Pk©ù³]ûÁŽkjëùïàõœ,8tðRÌØ¬«˜±„ó¾ØL/¯Æ¾/‰¶_²Ü½ˆÿ†è^™ÉÞI ôH Z uàzôÑGÝK/½T”Ý ¬ Š®A%ëCð´(–?Ê‹õqö` FÞPõ%Ç3ˆ5»ƒ}6e÷‡?üaΈgìGj)­ªªòÛÒ[âÿ7àÅrðÔSOyuõmo{[ÎùÛž ÚÐjléÒ¥®…£¾¾ÞÇÇ=å”S¬_>þ]¯æjŽ]ÈEÑ=1i;zú: xVs»RLGë´Úfõ–~xù,Û -;×w»0í/ÎVz€.”êûMCMŒõAê\ª¾Å ,ý6"/ðƒ&X›û&̇©qo#rXóg–Ãò FO*;د'/]Í+Ó\åž>FkO§œe£ªâïöÀŠÚ ÀfÔ×Pm­˜%€zÌUÎ>Z ÕÅÖmIG ÉæeZ¯Æ¦#ÄÅŒ­Ý<%3vÉu¹¼²å$ I ”¡¨-C#&EôN èÂnPJtƒ°vì&{5Ï:à’(–åE¼×0EAUÑÜ¥—^êÅ8L!0Ûúp€ 5ê‹e}\b=–<¹­­­'ŧµ} f9>€ È3ªCÇ%¬÷ÜsWºo¾ùf«qù ­£ýPrMÍ%?£œ™¢»ý¹íîh‹âgzoî!AîZ½Þ›ÛbuB«"vî3Ó]ói[\jØ WûÒL߬]!½'‡%:ï„PUè\ÊvÎ){^y¬Ã´Ô¹ññrJ½R϶Ù{]íŠÆ^9V± !5´DÕÖÊYVÔÖ G²êk±Ç(”¯rªÊ]¡Ñ»–OÎŽàÆŒm»lµÁ 5–˜±ÖÁëÊ[®ä{!éàU¨“íÝnj»Ý„I½ÕŸÿüçöàñª«®ê’Ý j M9µóA©e²0EA•Ï¡Ï=÷\˜5Gfð8}úôll @Ÿ%Ê¢cЗ°pîlGÕ m–ßÎ$ºå©·°»úê«-KvnvÔUBŒ]ýõyA9»S‰ (¹LØEH¨·Ôíµ×^ós–-¤jn[¹CŠe:¡ÕýÇ9®òc¯¹Ê½ Éu´Ê¥v6ÈC¡¯¿ÍB¯º›X¯0]@ IE&H¯^×Àx'!üúe%^Ó¡ÝGǨL¹Ê]£\û¤øAYÊÝ¡E Vm-Ò"PŽz¥ô7Ò¾©Á¥öÔºöíRówk¾·ÖÏÛ*Ôyñ÷c\«bƶž¿Éw¨#flýêF7&5ÅÇŒvðºõÖ[ËQ­¤Œ¤ ¶@µ›(ÉÐ×- ^ø)ü ŸøÄ'<(z5ž¯¾(–À`˜ð¨šEÀ€<ÀÊc8pBœõÀâÆ¶lvRK;wî<)¢At”Ûh'1ÛŸclذÁŒ*µVw6îØ±Ã=ôÐC>ßg?ûÙ¬ÝÁ¯ÈügvÀ–ð^ üÿñÙhœ;Ö à¯­ Ë)uÙÊ S o.ê3p€¯i}ŽšKH±ÖsVúhyCŠ1HD"Üqë–aν1­¦Wä©8!¹ˆ— ø:Xà›Ú9*~ñc?!üúu°ü™¬ï÷IÞJ'xKÒÉ-€-£zë8YgʵQµ•A b-tÌê!µ•3Z=° Z=°®¬à•¹ï|¨ØÅí£Õ!S¢Ô°&×>[±˜ÏhvU;F{ïµÅŒUœXG/ú5XÌØ“[3Y“´@ï´@µ½ÓÎÉQºÐ„îB™åÿOúSt ’` ø ¡ÓÖç›~DSTypÝM›6´ò*ÜÁÀÖ 9Tq9&Çá“|qaºN?ýô°ŠÙeëXf`ÎñÂò8ÞO<á-  Õe™Ý ¡¡ÁÊ€ú €Ê•••r)Ûì(Ðl§]8ûœ2z_ê‡×¶”D~Ú€ý_xáW£ò¿xëÿö±u=äb_x±CÍ)6ÃCog!Å*Žª‡Úø\ëIl=Ô)fzæá$3nGüVFá÷€`xƒ@1P~³ð›QQ~û üV5ðFĶÅ_Ù>î°N4%¤¬ÚªvíÌ"ÐÑ!k¿:d `e(w !5ª¶µm£{V£§¥¯m#ô`8FÐ:M «u¤Ê£òäUDÍ«öiXmÅî­:8Ì®œä’^å¾ZIyåjjËÕ’I9ekC‡¥«û#ùˆ»à‚ |¹@œ~ýë_ûÏ¥-;i€[˜¢P ¤¡ZÊËF³üQ¥åÕ^«“ǀؠ6¬ã«¯¾ê£$XYÌ r©ƒ}î,LùÉK[TWWç-ÀIœ^Ž™/Tª,C¯\¹Òé{Í5×øã†ÿ’@,‘%P|)Ðd±N0á3æá€zà;f¢ãŸ±wð¹¯}¶uáñXFµlo¹åS÷ïþîïÜ… ›©óŬ1]ðÁoé°-¬Ùæšíö D„!ÅüHh "RÌ5 6OT¦­€kwS)ð+[C%«ñë]¯üü²EX e×+¿fPŒZ eŠpw«Ý¿rÿp Õ”û Í3T?·I¡­yyFÎég¡µØYsã£äÚÅ…ÔVàÔÇ<Ö<ª¶¢Äm‡+´V^V°ÔñKÛ°$ñ7;uæTרØè—É ËŠl«ì–´@¶@µ=Ú¼I᥶ÃÞâ—=ûì³Ýûßÿ~¿;ðHd‚ûï¿ß÷ú?zôh—ü´€YT©ôBu‘ãg$ƒSÿAÿ±ží–€µP)EÝά3 H“ø!ˆS`mÊ"L ØYb;pM=lüøñnùòå>ÀùWõW±»c7øùÏî8à#+ð#—Öhç8@—tXÈ€5ÐÅ×Ëqßô¦7e£1ÐN6ÆD©°Ïq*/çÄù“èdÆðÆ÷Þ{¯{NC7 lÇ à—÷»~» ŽëÿÅÏw¨¹´íúן4@FXH±ÊiÛ]õOgxÿŸ5L7€é8©·(¸ñ¬b²Ô2Âe>¥ìúZuòÇ` TâX`$²(ü@ñÕýf@À/ÜÚŸ×Co~Q³Ã:©›*û)í?À™MÁ2ƒ]X²<6÷ëüaè2 ŒÑ:k¯«ûý¼tTÌq•³ÕK1[}ìÖ´P·|j«÷»2"RÕVA+*,o½€V<úÓN›æÁÕ@ö¿eõz\ße{õ}ñ’r'Ë¢´PÞ|ùóco_kßdž´@_·@ð-Ð×UIŽ?”[@°”úÆ7¾á¾÷½ï9þ¬c@ ðò%ÌëòÙ³g—Ü\qP xR¶%à HŠë„L¢<’P3£`HñÄZ"¿1pwÙe—Ù¦ìœã™ (‚Z~ˆP¯ñ‹ca²íUì0TYöZ0»çÔ•Å€.õÊ9_ݹs瞤v£äà2'Îmø™ö`¢©“ׇ~\çɦ@ûõ pÛßÿ½»D?´˜NaÒqçÝ”Vs㈨:¨Øœm•îàeË)Â+Q„óJªÛþ*W¹6­P…£D¹~‚à>…_êžñúV1Gù5øÍ(Á¾ãÞ|ç¶4üz»CñÁw„üVÒƒÞ„ÜA=|û G\Kˆ!†Ë9yC@<ÚÛ4¯6§ÜðárZÙ9dzŠi^5²Ã\5"Xîp,9[_näíø*p5ãÚÝö¯su·¨3TLÌÖàÐ]^ŒS[Û7«ƒÞVYº¢¶VõÛ@µÕÀõGú“§ÈéÌOÛÔ‘u›ÎäYMkô»[oiŽë;÷ ý-^ý¿þ—{ûÛßžm—¯t²coµ@Ç·Go19NÒA  ½ÕàsŸûœ»ð }'©ÇܡΜ€ J Ààð…Œ5 +Pk€Þ#ª¶¢€F­ìcðÉ2‘Bëë€c¼¸–¨?e´ù`uôèÑêPwö|ÄÌ;üæ7¿Ù×™ÎX1h—|¡º¨Ç÷¿ÿ}aÉ’%îòË/·ªu{^ è¢Vsž„.£Ãöp­H¸X1Ü]úq}VÜ Ú1jÓ)·Ã¤º?«ä3¯+í³:£æÒ5ï š–h€ Pg®÷Tå}Ký@täJÊ%µ+3ÃuÚµ¼ž%¿~¾C#Lðë@Ðà±ð;Z%8Tk}á]ýÏ«¾R—3Þß|¤‘¿t Ú©ˆ¨¾MúÚ÷êo•k~Ã:W÷‡y®z}úaͪT É_, fË΀cxŒœ2rà´ÃQ5Ò<Ñê¬@©•Ûó]?¬U<×´2ÛÕò£j+ÐzR‡¬PmÕ[…ö¹ù½­5§dmùÔV¾<´Ri}ÿ0Òƒøj}dê,´¨´‹õ|HŸüÌg»Ag –lëW-@m¿ºC«2 y{à 7x˜"YTY ¥­­ÍáÊ«k<›¼ºÇ—J4<¡]I¦ö†ûžŒ¬|9v>¥ÖÀ˜ý®0±-Úñ‹í€•YÂü,SþUÊ‹³XÝØN,b|Áù—éðĆ@–M™ ¦€×öãÿxN†0_9—ã@»–¬ ¯¼òН?ç‚îœ9s¼O]°U„« /ŠóšU«Ü]ŸñÝ­n½ì##tÏÐ& HÁ½CÙ´Ûƒòæzï±–çêáˆIØûÑ¿uØN¸VÌQþýò^­[+®"2°Þ÷׈[]‡_ÀoÑ«^Ao~9! Ø5å·á·îßÎpsþµá"Y$’tR xxÞK'ÃüPmm_;,'üU¬Ú:¼Éµ)Z‡uÈâÁ)ÇÛê¡5ÓI+ÚÊ÷á²ø”Q[¿õÈ#n‘èáµµÔ´R弨·>Ãõ÷ÐNÑ¡¯ßzkÅw¾óR‹Jò'-Ðg-@mŸ5ýÐ=ðÃ?ìÕY^ŸBO?ý´WdQó€ZÔ€íÇ?þ±ï dvŠNK€)yº’B›íôEÁ ­–°$/q]ã •òÉC U]ÂóÎ;ÏŠÉ™³u f¡¢ ü„«rœ{… …“s*­ |ÛàCµdvà ÀóÏ?ï`”Ò0ĘåïÉ9×4j»ty@AÕ.t©çrÅWø;5Ôï]£FAêkj‡ t¿Ô«mZuŸÐ†Ü/\î–Y‡ èrmwÿŸÿ“_>×kýÔ þ ¨¢roüÄÉðëCím*+üVl”x¬øÍÀpÙ”ßàÜ“Åܨ’u¡}«P˜«¶Œ-ÀGˆ ejëØŽðW¦ø‡‘ªwq…ÔV «ÕXHµµEµ¼ êxä·ºûôv©^÷,@[jB•E©ïØs û½ »âÃNì¥6d’¿_´@µýâ2 JXˆ®_ýêW¾ÃÒO~òYt C‘ÍJ  x ÕOÀuu-ß+ìRZø1õ•ýèTsÌp}©(Çùì@ªÕ¦|,®^ä§lòpnä'f+j4j! Å>íh†¢ àb1 †/6 ³ÐFŠ-åÅž%llçacrlΛ‰}é<Â2PÊTÎDyo|ãsbö† K§4@StÿB*õíò_¯ÕùLl•ïý Wg¦|u5è¥-Bà U^Úd–z®ÝÓÿüÏn”Úż¼Gɧìðå÷´~4GùÅÓËýÙ´©É_[NüDÇžå·m⾓lÈ{{ñFâý•í¡Sø5ÐÅókʯ­ :©¥Ï ø_ÔB@°¥×Ûw(ÚË«o¸®½@^*ÝÒ$E^©-° ç-#§<¿›öë¨C{s…Ký‡¢}X-’@ëØ“Ã_…j«…¿Ê‚lTm}S£ÿ[Z£j+þÖ&½‘x2]•¢þ?¤¿ƒMz{KÆï_ÌNÛõæcµ¾w¶iÌ^)[×Czø¦!µ¿óÿ˜Ø ŠiÄ$O¿ljûåe|•¦>õ©Oyo#À(Sø¾èèôâ‹/úx¯¦6>õÔSþôÂ… ýp¸ÀZ˜°v«¨ J Ò€  •Zóë’'Lá>(¯j,ÌÃ2@H^ ‘rÉ›o„0Û×^€Šx¼$"2Q`Ñ¢Ìæß IDATE–-vÎà€-'Ø °¦<”_Úš¶RIt,c¢ Q˱G @RW–Ù*™Â„ZÌD2Xcå˜óB9&:æ‘XDZ™³nþüù~}ø_) ËyП­Î‚¯ ~«t?­U=½½ ,4²lÐ[¯zDS»ÀÓ«¼Ruktîµ*ïiµÉ\µG¨òÒ66QÎiÍ¿ÿ{Nq> ™­ÑùÑÜg{Ï:ß«üÍû›½½¥®UíQÓàš4»½ë÷z0¶óÙ€_Ûf ‡É¿æf»OÀ­®Áo ˜rû~­Wì™ "›l})€˜Þ/}¿„ûeågá¹ä.§ÂR5ò&gR¸Ýe|ÏlÂ#m©=Í!\—“W‘.,¥F˳ìxëFÞ{;|Ù³h R+=ÀÂ_™m€û;Œ$ÀƒºuÈŠS[1PuÍDe5ï˜ÿJP3õ}1Y…Ò&=(¿¤¿ýcü½èoh´ö{Qß´ð¥òÜéK_Jì…1ÙÞ¯[ Ú~}y~åð͢ȾóïôŠã²eËü+ñ»îºËªÀ?!¼HøÃ<ðgNt²¢s``ð‰‚»qãF¿O©ÿÔ! †û›: ˜wab@ÍòX]Â<,ËØ È ü ”òc×Y"/¤K¼Å¼f/&¡bM@Õ¥])ƒŽd–XÏÄ«~”OÚ¨„˸Îp¶/VÀ—2YxQŠiÀ‹ %…`ãú…œ;°&aÀ—eTx®ƒA3û‘ z©#Ë€=Ë€9àpÆgd­ (ÐÍ*3¥{äˆÔßmÚg¬ê1Iǘ¬}KI•Ú§V×KÍïv®þ_®z Óý9VÛLå5kÃ1ÿ‰Ì9›——lÕè5f>\žèY*·]ç~Lj®µaJ圪{ž{‡{ÿMÿû6®‹´1ÖÖ¶.„_@߯uxë ~ÍÛkÊoë¬õnů¹†çd›+„AD6fׇ0YÓû¥¯ofVÜJ(ÉæéåŽÈ¹ëƒŸ5ÛOŠ·¥ªã釻h.“7½¾Ú_°Ñï2ü÷ ýq R§ž2Õ‡´ÏE¼­÷*ÄÞ¶ûîsóu-{:=)+O³õÍúNì,á—]¥©N÷h£þަèï ˜Ý¦ûëßþíßü߬¾C:$êÎ K¶%-Ð[ øëïǵLª6 [@ ›â ˆbEà öá‡ö€ú–·¼ÅÿˆsräA¢x­ŽbJBÁøgNÂ’€·˜Ä~€‚%`Šu¤¨J‹Ç“²Z^‡ÉêLÇùi-/Ñ ÈCâ|y"/á‰å|9÷|1fÃ} d‰A¡«¯¾:PÔÀ†£¥ âÍ2j M§3 xäÇ5eÜë™,0M¾–'ºÏ¦ SoÚ8ÞY¦ýùL¢.”ÇÛpä:>«Øµ–XGŸ/›6ø:Æ¡@­ЮS9£uŒ1*Ÿk탲Ê>|b+˜‡“ÖY‰ÇëósRmß ¬j?¦¸ª¼À/çf^^€ÝŽÍÜ&êÂÃÇçÜiöãšþ³¡Ø¥óºJë9空¤SìàÚW7;çÖ[;…_kï4ôj8ßøöÂé®eÖn×|úë¾3‡(ˆÀŸ…åªpŠq<­Ú:_Í ZÕsËN·gîºøŸ${ËÀõ¶v( ׇ˶ŸÍÙ—v·®—­Œ†¼ïÿõ ¼­D³^meæ&¯ÐCXo¤—ªtË—žô´@ìy:oì4õõ¨¾_[ôvâ.¾Øzê©<0vÜüù KÖ'-0Z þdT<©bÿo€ï)J+F,S~ä-^˜%Y¨€|Á¢úñãN² ö3u0vøÑÕïù/ºˆ`?PEY–PÂtŠÔ%L|æ|6 Xóuú"??†äe@q 9šú—vdQSCøŒæ¥-€Ñd±?,]º4šµÓÏÑèæc¥³8p}ü«}Õˆ¡e!®`߸m¶P`*¤V[~æ´#׊ …œ9íiª°#ûÜyç>²A…Ôe5¼!0>¤ò½zXhÐ>£´ï0m3H¶9 –M5¦,Ý ºWö NÖ¨ýÇ VYÏ5ÍæÑ~!W£,k]4Å©¼¶Î,LåÔ¦©ýïíÒ1ë¥Òž 7nioSs9Æ‹ÿðÙCqTëìüÒVx¿§éå#÷Üïß<ð™¶åfÎç½Óöºï|ëQ? A¢…‡Ë!ô…Ëö7® — •æÍÂ#/”k¤ßêÞX§kü>=“:¢Òj@•`‡p9Xíž?X~FíÚ -Õ¸S`×9¬IߟD1ÀjpŠî¥Kå–¹o·è¾@¡å!‡XbÏ~å+_)pVÉæ¤N $P;p®Õ€«)¯¸yEŒÕ¥Àe˜E~pQE‰  ð ›0ðÃÍ~ä!Yh-ò…j¾Ú(´ú"ÿ…~Z  ¥ (P#Ðð˜ªÀUgJ­1e“òåÕIVh ¿e#¨± ÄcøÄ—‹ZŠ*Êky&^K3'Ù:ÿ¡Èÿâ|¬fYàØX€>Ή‡&{)ò]Êä„ Sl!ÃÔ}¥:ãzªíŽé¾jÒ9ìÖCÉp]{·VÛ,µ$]û̹PnQ9@4÷)%EÎ<Å€­A1s’qvp­îq´M¶‘¬öå¾ç<#«´ÏY<Ì)?÷0Ûø;rëhÕ+„\_˜þ;¨ºb9Eˆcµß]¦2f2 ë1ÍÈ|¾ãÆݵÔ%‰Ùyf»Í¾)…ÿ–ˆ¿m‰!†Ë¶OÍwèom êu?H¯ê]£¿ÑžNtcp„w ÄÒùë€î™ÙºÞQ‹Ínð¥/}É?°êAóä'°ž®xR~Ò=Üýã› ‡O2)¾w[à7¿ùMê›ßü¦ûå/éŒRƒÕÛë€S~Q_E^ãïüíoëÐ vÙÙT `ÂÔÖÃ¥(€¾2Á!Ô„¼²,à5È¥žw–'nnu<÷Üs½Gå9.§+V¬ðy€Z|´€, ‰=€eÔRÊhx%Ï+jÖ£°8|¦^$>3‘¢ /Ë<8Ì-¿uÞ¢.¡jlCäbÇ@Màü~1€Z|a}øŸÁ0÷yÜþ_ÿåŽégdT*^·ÔuÝ…ê©zN4NH«L@¥©¿öy¢Úû ®Õ&ݳ“›aòÌ íDz)¹Y5Wë´ÁyrÐxåžç^ŠI¬«TýB(fëÃVµ1ûR.bÔ‰NqU¸6•þxl_×áA.erðTÌùKI‡tÜ‘ý ­ÞXNdîe[×sltŸ0õt²Îa#t-Çõ¢îSî¹ú»^¤ïÖ0Õ}³B÷ ÷ÿGem‘,Ù°’åAÕ ÔªËÙw'#u)uûí·{ NùÁšxÿÐCy/-¯³ém¿Q¯? È”? ©±±Ñà @òãl?Ì¡jÊY’'½+îÌÆ0z0P›R ´reY]øLù€¤A- pà…e›ì§ÔÐ?ÿùÏ}T‚›o¾Ùûni#€ÁZÀñsF½P·4ÏBÇ7¸eNìG½€aêÆñH´ mg ózšöóp%ÃߊekÉv¢QÐÞÝyÐð*ÃÜ{R¨-ôX)ë¡¿†«žÀ"ŽÊ#º?w †pNOL­­uc´-.µ)ßF]Ó72-•ͺFÂ¥´‡V•¯?¯bò·`‰¶"ñ? /ŸSÚ‡9o˜Å£´m«òÒ1Gê:Ôƒ!~c®ÑÝ›´õ( u`=~_^>ŸÄ,æXåJÕªÛvyƒZ|¬§êþëëô’þ¶d¾Oz².Ö9l”î—ëowœîõ³tOŒ×<švè~yVÿØ Þõ®w%¡º¢ ”|t-@í »¤½{B½Ô=÷ÜãÞóž÷ø×äü¸8(y VÒñ‹Ñ°PC¯¿þú“*‰Ÿ•08¼(“€!ÐB­© ìlöƒ“ VD_a¤@@Š*µ—^zivoΠDmFQN %zê£6s¬ÐOÈ9ƨÏ7Ýt““¢í­.Jö)³a"6-ðIô°!¸Öf6Ëìʲ1ûÚ2sS‰±H èb‡0už¶Ò:ÚÙöýØÇ>æ—{ë?|ÇX7îSotÀvŒ&€;\ HÚÜj"MÐz\s°4CûlÑö—ŸggöA-¦©”ã¥5ø5(F¹mÑ6okP¡´ƒBlT=ÎÔúú[˜$=]‚¦sì:Á8©\×Ûó_•ê‚êןÊ1©¯A+ÓœˆJZî¶z]ß]/êaœÇ¤ƒºg.’gÜü²Ñc½ªï‹ Êû¥/}É«³Ÿÿüç£Y’ÏI º(í[yÐ~rBÝieË–¥®•Sü²@˜©‰÷ß¿8Êçu:¯´­SXô˜€?ð”cÊ©y£yÃϦ¦’7.Q–mCQ¼è¢‹¼í #¡zàhTQ¥l 뼨¤RýŠ˜ÿbÎÙÊözÔÃë®»ÎÃ+ñhÏ?ÿ|÷| ¦„ŽUÔŸv͸<„jtÇžå[âºtLÄÓ 6bðò‹ûƒ(ÔÕÀ˜}lùå—_öÊuXN¹–‰Ó{£|£Ü“Ûô¸  Ët\ y@Ó ÛHÜDMS2y‰»Jqv¸c‰Ë€0S1‰¯Ãº?7éaЇÂ1J\Ìþ=‘§Am°W§ý)­“-£.sú²^/ çéï¤ÜiÚ›6ë<Z,æë^`À„š<çmvƒåûÿÔ™pñâÅOhå®`R^Òý¬Šû†íg•NªÓ÷- Þû©¯}ík^u¥W= 5ö?ΫlÔ9^çóúœpQù€–ýèLx D„¢ôYX/òð#U^ÉîC¾0… f~YÀ’}HÔH^£¶Ö›iJ­wxŒ¸eòê>V ì„4C¹¶ôîw¿Û‹ž‡€K™(¸÷Þ{¯3 ,2JWOn1•%ž-Ó 7ÜÍN<]Ôܯ~õ«>¶î·¿ýíì6ìa(g¥>`!)GâAƒ×¯Ø<Ö«.35„0¡Î2MÖ¶ƒ‚[oOØ¢ÞÙàqïÒŒZî[®e”[îO:ƒ-ÔƒÀf=PíÁQ®t£Úë¸êן l÷uzEÊ7aM*TÏj_Îih€Y,õuоY?UJ0 ò%³ðÿOÿôOwß}w¾¬Éú¤e $P;(/kÏÔ3Ï<“ú††(Vy½ l¢²¡Ê¡tjÁ;;wî\o=àU<=¶;K¨šoÖ À­u  MQe_”ÜÐ~À::[±/*`4qášk®ñ«yÅw•dÔX6ûJ­ ÁzÇ7¨Å†Àçb½¢¨¼ÀåO<áêèð¶é#tïfl Lýpí,V&àžàÚÃ剛wé]^,&Ø€[:4Ä%ÖÒv^¶cOxY9 v‰¬›Û'®„Ò×q¿´Ø ¦«­HÓÑÏèþ›Û﵋©í8½­Ø™±’“¿7òìç¡#c¿èãÅ ÅvPÛE¸VQbغÞ@ìý}Ÿ.¥‹ÌF•ÿõE8SŸçt´Ø ˆ€ÀÛ³÷¾÷½ñ7vÜ $ë’D-@í º˜=y*òM¦P»>ûÙÏz ÅGÉ+yâ­âñCaÞZKtÄâ;#…åK¨¤(¦nšbÊgó´²/Pk+ _-ªp\"¯å¡¤: ¨ÊÉÇñ¢‰u€@kv‚h>ûL¾‡áz3‚¾H@|ݺu> ¿uòÝ¢^ÈåJq€ ´1ð I'³¨E \Çîj9Åm¡²» ¼(æt´Âg{L÷(Êl¾„ëv¼¶Ó¹ {ÂvÝçO<¸¶€/¬ t@ëjâÞFÙÇ;_ bÒZZ …î¾…–·§ç(¢ô ïOé°®CÄöeÂzp¡€³ØD8.@v­¾ ˜Ñ÷ {ކYÓKÕµ*ÿ<‰Óò<Ø{v­¾sêU‡Ÿ~ï{¼uêúÍ {EƒKæìk‰å¨RK ‘m°–Ÿmp _ûcIÀI@-šÏâJ\Zλ—¿&þQR6ßQ)焪 |oT'8ê‚*ý‹_üÂ?ç„rX®.ebQ``…ïéÇ®¿n¹Î=,§ðÒîØYê×µaƒWmÓÝÆÂRr—±&ÌÑÜ^Ý?Ó4Ç¢°OÓf}>š\ÝqÊ›‹'¹eÙ'”Y¼Ýü Ù[ ÛÆ|²êÉ+è6 ;QéÂ}zj¹AçL¤þ”ZÕî§ç½Þ¨çVA)–Œé‚ÒÎÒ]cóÅÒ‚@ìL}G-¬æóÆþ¼øm:¿K‹¶!Æ‹½^÷ÄZE¼X*OûmzˆÆ;k¢@guI¶%-0˜[ ÚÁ|u»yn²¤ðEâCmllt¼º%l½ö±°žDŒŒM(°¨aÀ&p‰! µÀ(ëQY¦,ƒZÊ3hDQW£àJ‹‚À±Âd~ZÂUYÀRµ(Én¾ÂÌW ü†õ²²˜Ý ñZ ›U 9g&‹çŠÂýä“Oú6 ré Ô»äÇÌpZŽD¹õCp£íhÀ»lÙ2ïÙ%ÌÜ?û™;MÐX¡kQ(¡Üâ·eš+ÐßKliÚ¨õ/j^«ûy”Ö£æz;ƒæ–¸æ<0aÏá¡.Œh`ylÎ0¹¯êÁª¯¡v’›!ûKÚ¦¿Ëü{ïÔ’0^‹ô+š¬ƒ1dY6KÁR嵨Ñ}ìs‹îŸûi;Ãe‘^:¡Ê¢Îb¯ú»›nâ-R2*˜5^2ò-@í¿ò7J%€uíµ×úLtJBu.ùæÕ=ŠÐNzü£€²%e–ºFÁ2 EÓ@ԯЀ$?þ¬SjÉG µ…Zö¥®¡õ€ü€j¨ÔR÷|¶ìÀ9Jm4¦”Ï9Ñ€Á#ŠI¨·L$ê™NT¤â&ì_—_¹|în —ã¡àŽ;îðçÂl~×îg ío€ËÃv F¦š™GùãÎ*©«§êoa¬–‡e&¬µYHœš2ŒÏãô¹Fo0ÆÄ‚Ùq1@dǰy± ŒÐ9÷'ÿh>•ÓÚ®'ç¨Ö ¸p…LÌR`ÞXTm@ö Y˜›ö €Rß„Iz¨]¬Ð–jýÝGt^£ï㛳zÓPqë­·Z–dž´@Òjj“Û o YÀ$‡M€eóÏâ)$ª¯O™¢J&ê%ðÆ>Ĭë,f±i©à ’Ø—²9Êæµl>¨º£¾Z:±OhmðÇügQb6ùú ¬îf?@A€åìj¦™.»ì2õËü·´0Ïçßýîw~t3 —ã2ï®e2˜þøÿØ5~_zJSÎ Øãú•„5ã‹_ü¢³ËýN§¨É Ü[ŠFß© #õáUÁF£€o‚¦0Õ rÁ€—´O Û>­ÖíRùì7BŠJ,àÃ|„`(šú‹¡¯cÁFÛ¥Im?:¦½¢ùzâóA=̬Ðõ›¯¿Ñé¿5×p–ˆÎÒ÷VW`{›ùIY˜f¨Ì…™ïB¢lÔwc­ÀùæO~Òixí ¬NÿøÇ{â´’2“ð-Ðñ=àO%9r·ê'–€‡tùå—ûaR‰ À°®tŒPeÃȨ®€à£>êG3à5O.e‘P5…?ªy ±€ ëEÞ¨Là²Â£J·Œh&ƒSZ"54f”â0-SoêL=PeùÁ¿.¦ó¾Ør&˜4HpQq9. ‰}ÈD9Æ'Ìz€žúèvÕ²¸XLˆnÜ*,j«(ç¹÷—²hß?û³?£ç¸-íauú[/å|²`eœîç¸x¨@ïYR[×ÈÊR-P¥Ó÷2qÜÛܳ¼ÑÀjÀ}týÐj€w@ÓzÁîó‚^<¢ãµÏt•äפÙú›ëêÒ_†Êe°ƒyyTuêÙݸîÑ÷ó}:sމB‹…€Á7Î×÷Ï4}Žvð*õØÜ?t ³Öùk¦¢ÈüÍßþ­[¶lY>ü$%-´@ç-@mçí3d·‡öÇ?þ±‡C|£ ž€B€² `Y¸-`'Z ÈÝ({pKâ>Tt-6­50`J0’Á+PiDZ|Ñ9y9ù̾ˆòè³ãG÷j±!@G·ó™}9?ì¨Á¨y&,.9×…6ÚÅ–ai{@ÓâÜbë@9þõ¯íÛ @5ÈíŠeÁ—sáa…²¿þõ¯)Àå>ÂçÍDûI‚¶¯Æª"Ø4дë àœ!`Löi.8á¾â¡i¯{à>Ãw=Féþe"˜> ?å^Ap“޵F ð¹“ðUø3Gêxq€mõéÉy*÷˜ ØïNRtW>³là:\à:–k¤ŒIj÷…úŒ¯õ!=´Lױ뵎©; ˜]¯ï¬%úŽÜ)eö7êvþ"$a’’HZ ¸H ¶¸vR¹Ô¹*E\W"Ð êð=€$J!s +ª”¢R1ÒÕš5k²€Š *ºX Bµ“2øÑ¢¬ãP‹§¶P2µÖ –:Q?tÈ—è@Æ~qÐ ð¾òÊ+ÞëÊ0«¨£ø)9ŸÐ=´ ~[,LØ+¨{´ä;~)ëQc™B›ÂÏÔ±i£`E%õÓŸþ´£ÃÁhÃÇÜ[{|¹Ø¸v¥$öaÂk;T—‡š~ðƒ~âá +ȳRÑyÕ<^=Öéȧ©œ )¾ ‚âPÙ;³¸D¯¯­§–˜,¡æîèâ³|@  T¿Ó׿¶¬¶ÝÊ)Ǽ? •‹¿wZ桹³s+®c3×у«.hÃÎìtâš­|géï¾»‰t½#\×úÞä¡ùÿ&¿ºÛ¬ÉþC¸¨Â?zê‚·ãƒc:ñ  ÓJOmK¨—Æ Ö^·²¥Ôl–ŸÏ(¸$ Œ³%„^QSjÔ8ø´²C`F¡5»@Ôz`ùQЀÚh'²fÏ=÷\K–z⺟zê)º„ìB9E¦³>[^9󊙲©+€M›•x©Ù™¼°¨ê€+ßW˜i wíÚµ~¤·ïÿû^½¦] ·XËB¸´å~ë[ßòàÆ}@P²sB!gâá¸réšcO8! !BÇLuDÜ¢ër\`´DvݷŶ•©¹Sµ¿Óýv¶`ŠH €í‘ àÚ|£à÷„, GUÛÜúH ]zÔ3¨Ä0MÌýg­Š‹Iýe¨Ü×ô°‹jLBUE]íLq-\óµÅ/õ½åä Ïk¾|…Ös½Ôµ$ Óµ¼VNüÝê»+éüU¨ñ’íI tÒ ÔvÒ8Cm~B^•2º@ô°<…#€FÇ0R¨Î¾öÚkd-”<Àõ0 ´ìGStB‹MË6-¶ÿüç?ÏZ•m€-PËqó%^õw$€èÌz`¯… ÂØ%Kpö7ó7'Áõ£]˜8Wd`1j(¿€-€ ¸w¼¨w´õdÿ®$€4Φ€M?¬©¸ò'’-ž×éºfY05—yøP‘Ý)²@[ìL¸·ß~û\¼·Ø?˜m÷_ÿõ_î¨îÓaºOÈ~p–vˆx°Bo:Þ¨¼åJÄ*=Uô²þ^€ZÔD¢0rÚ市îAÕ&½‘á—½LñõJ¯ Ñ+¿:ë9@Ò†Ê&-ÙÁRÎú CÀZ¢c•¥p=ë>Ká¶p:ÔQÚ·™zb@9Gq®ö!OgŠ«£Øù½‚P"^\šñü»_˜s£C–þ~?õ©Oe;…ù’夒èZ $PÛµvT{¡Ð~÷»ßu÷Üs{ÿûßï( •õÒ:^Xl¨”€/ë!ÔJÀ¤EA”gÀ )ªn8¾Cà™}¢É,)^f?`_ê„bfÀ-Ï@-j. &°n0ûŽw¼ã$˜ÛßTK:Îñ´¾S”l@%7„v+À—9ξ¨}Q…—¶  KÞFY˜âl ¨©Ø:hwʶaͲ@[é|FÁåM͵úÇÍ;\®Ê1êæ`L´ÕO~òòŽ®¹WÇÕ–@Uµî³GžéBm¹àj¾þ&±"ðÚúj]£bÇæ‘ЬícŠ/° ãá=¢ïÀ˜uíyzxû†ÞÞ„ÃÂÖèïÛRÎzÛRÎú<ùÉzT‡³c‚}^‘èµ+!ØÊÕ¶Vϸù£úŽâÜß®¿R»Cêýn]·J —\r‰»Xë÷½ï}(þIJZ iòµ@Ç7QùÊLJ -Â,¿S¢™€ jsÀÄT¼Ç{̃J-ëO"!\ýõîÎ;ïô¯Ñ€a¢ñ ¯´ÉsÅ¥Ùñ IDATâÕ1×Zmœ¢§:‰s¡ÛtÏ_(UžWþåJ÷éÁr†Þt÷5x©õÌPНè†ZYê1£ùwë»…ŽZï–Ÿ½7ÒrBõwq•ì=D<(”ˆ5K;Èò@ÉÃ.ß_’ßÜB ˜lOZ -üu£ñꮳ(±„©yO xuÍœ‘¶”PÂYt‚_þò—~ÀÂ>¡üµ¼òæÕ=Ê#^\^KÛ2å­xsŸ~úi¯T„ £øÒ)+\Ï~Ÿ°^(ªlÏ—(—zp.X(°D*ñ /¼à£%€²%Ι×Ê€¯ôñ§v'ñ€€‚˜ȴ%ó®¤pi ”róðÒ®<$`)xo, nhSrãme Ëù0 j®EY°‡¸}Y7Ø—ûšè4(Péô;”("´ÁwþùŸ™9¼t½ðÉv'ŽEçëí@¾Á"ºS~gûÞ©¿ãÞʸz šâŸ}k7ÿFãÊŽ®[­’ñµ3*¶Aìëz˜› z²<,ó]b;Ѳ“ÏI $-Pþèô ¹ü‡KJìËfQë`òšÄß à|@Æ«tì€+ tÑEy 4Y¡–z|¦ø[C,Ù (—×µ„CEµÄ1€Z”Hˆ& 8$Úñaó%`X#?QøQ±qn€3ëÃ!ku]Îý]⊊6ÀfA466Z‘%ÍQn9ÊlQmâì %šÉ^óó²ž6Z9?^Î'ýŒ‡à–úqî´ÙòÕ‡ëhkÀ‹šKû˜š›¯€Ëýƒ‚‹’‹E‡!»Oò³¿¬ç­Â÷¾÷=o7‘ _ô÷§ÚÌÿíañ Šm>^÷ØhÝ“D5rK}þ‚®ñvýÍ]++Po¦ûyk"å¹;COÔëgúîºPßO tГi³Ú–Á¬c^x,ÔXbɳ,c)à¡›¿ŸD [*YNZ w[ ð»”Þ­Or´j|à©n¸Á+°Î\àáØã?ê&ëP3-Ê>KÂb”@*‰ÎOq!ŠØ‡WÖqj$pE„KTa`šdËQ…ÖoÔä–QQ;K¨ÉÀ# nìÔ‰ó•¢æU“° T Åq˜SW€ˆ¦ˆµÃZA]CêK; ès%lL”è?øàƒŽŽU´ë»¸œ7S\âx<¼¸À>À L¡´G—sÀ#L7À‹³)ðC¶?ËL¬·Dû¸(æ,Ó>¡škרE6U˜¼Ë—/÷ Øß—‡8 –¶Ñ½S4ÐÒFj¯œüzCâÜ'žxÂýZ÷ÕAÁö@×C®ò ÙujŸÛßèoòÊ^P-íZVÝ8îð†J;^8G9¥³VO-þá§ô÷Bè.‹4 k–‚Sôà¾X#ò€Jÿ‚dë”,'-Ðw-óEÛwÕHŽÜ“- I}øÃö>R¾€I³x_M Ð0µŽïíD"3ü‘T{2º %«½ˆîp‘¬V¨±ü ”ûèÉsIÊNZ`(µ@¢Ôâ«Ä«Ò|ä#þ4¾TƒY^û£Î’ŠõP¼‘8ÀƒÏÀá§1M>GÐ Q. ,‡ P )¦ jY&og#{qLóób3ˆSŠQ|OΈºîºë|¾|¯Á£õ·Ï€)јn^ËôÀ&€Ëv& saN»¡h¿õ­oõËÏmfû¨·³Ưã!‰f"o˜škØf€‹’ËuìMÀ%ÂÇüÊW¾Ò'ß•¨¸Ü÷ü¢æŽÒßʵ3€ZˆçJç±®„œ¢KItŒúoýmõvg1¢ìÔ}òö•¿Pý \™-ü쇺ÕÃ@”Ù)šßü'jl¡VM¶'-ÐÿZ çëûß9Ú)„Pê?ÿó?Ý­·Þê_ã…yåËk`^ó³À* - ;ðh¢´˜€Ûù H@ j(_ø–L•å3ª%˾@-€c*)ùØ~ñÅû])ÇöFóÙì8€0?ê¡B è ú¡s>6´îMb’Äù² «¯´.à—Ža@% K[èë%ìLœ€ ЩÛ, ü’Ș¹¨’´p äRT?ËG{1Rö –©‰ 8g$ˆeÆÀõúè?Î…ëËdçkUá¼ r™½(ç´=`OÛÓqNx,°Nh5|М?ìÃùrðƽÁý˽EGB®;Lø[)ËB…ÏåL\£¯}íkþuóÇ?þñ>ZÎGíœslB‡ñwÉ=MçÌjµíý}PÛWI]$2¯Íét†jËHb#õ ÁgÖÛºR;¥…mke†½ÙYl›ÎqNÌ["«[ªùÀ€©ûo²æõjŸ­jŸe²ð Ï=€¬µf2OZ``¶@ÎæÀ<…¤ÖÖúÑO¡ªâ}ä Pàµ6VÔ& !Œ D†@-süb(§Àa@%?ò€¯ãÌ~@‡#ÔQT\€ð°0^ÌyeG9@ðjÊ/Ê+u¤ŽG5" äKÀ!õ£| °BšèP·Ñ2Oê¹ä´qxQ¥©3J/E[BØ-äá¥.FÔUU:ŽÅyp-C€HFÑ5ȵº‡”M¸†tΣQÕI2 n±1p­Ü¾œÇ/í’x¹w¸lçÑ”a . K;s]QpË ¸´9 í{Þó÷Þ÷¾·ßGbWàÞ²ÀƒÛizXk“šÊÃB«þæ zù|\ÚœYתϧº!üÚ¶|ðKT€F=ø+·7’Ŧ}›î ¬ìA–ûlŠ+óüM€ëqåoW;¼.‹Ô~©´|±Ì£ ½q.É1’HZ çZ ßa÷Ü©ž’M½A=Dáô€Y@¯*ЊÕŒŽS–Pi±U õÈ#xx £åa @ñL­£ÀL2¨5€4è¬è²u¥ µ’×õöÚŸ²PîP†Qˆ¯½öZÿÚÚê£0slêIñi¢²–šøá§^@"mH¸¥ˆbU¸å–[¼š'à&`I½á¸Ø·VÊ@Upi€8tr]8ò2'?p›ríÌ©Çá\PCiîÄÀ ËîËeڀ圀XûÌ}‚}…{Ð^^¢4ðÆ=Æ[€(à¢ÞóðTJâ^#­ ªPʾý%¯ÚΫ¹÷Þ{¯¿Ÿy`t³ñz˜š ûšQºø Ø6 ¾(üÚ¶~ t_ÅÆëº´-å k«í–Âõ¬Ë·ÖKá>ŒnÆ6êía5\v:Ø1眘óÄß×<²‰k-œÌ“|-Øè55eÐü©¼F'>²€W€ŽK$BRñ9T9,¨a€%PEb]h1ð+õ^PÊô jmÇdÀˆÕHDPØl½_Èä"@f\B‘Eá¼ùæ›Ý·¾õ-7Ê0N}€MÎr %~ؘL½Å ¼Ÿ@.Ǧh/ÔT8/zþ£ã×åü9'&Ž‹/”„rÌÄC°Šýà®»îòÐúoÉKû1Ù†.ÂñCÀ%_xÝ8&ÙH„1ãáä‡?ü¡÷¯ò#N'¹–¬Mâêm€/Ü«¨‘\îA, ¨þ´mJØ4³ˆ`£)¸<ð;¨B\=ûË:µeŽXÁwyH]¥‡"îy­ó€ˆ5³º¢Â«›Uú[œ uÀ#ÛBøpŽjw€–Ï{5g_Kä·T£ý-UGþÆëóì¬ü‡u\ŽòÌ2ªk\õ·:;+™¿ñÌýÔQ1«H2OZ iAÝÉýº¼!È¢¨²¨{¼Žêð#¢‚F=ªøïPM]ëÈ…€0¶”Y bÀÐÈò5×\ã×3ä'VüŸf ¥ècuüâX!Š" âíEÅ ?²@Û‘ÂPšÙR>½ i~I:¡Æa±@©ä|YÇD"k°[ŒšKÀ å¡xbÏ©? 0™Ýv¦NƒÄ«^Ú à7Øeý_ÿõ_3Ëúo±(\¡àòƒÛY2%–v@eÒø¡¶ë·/ùPíX(¸X¸îÀ `h ¨<¢qE Èu¨»œçH{1ñ0Åv›~ô£~÷¥]ƒ8À凷 _þò—yÈß‹|ŸÐv<`¹üÍ1ç3ë‰hÂgàÒ×^íãß=¢×ú{¡¿ã™²‹ öZx-å]Γ¿EàºSoePf‰I‹uÀ¬L<´ñ7ÈßP^‡Äµ²¶LæI $-Ðy $JmçíÓç[ùáTBEýs…ú‰ª“¨W@XjQeù@¡AõCÝâG å3J)0…JË:`ÍT~àøA…µm4 ÛQeCHÃRX°?pÁeÜHa”…ÏÖF·Bic?Öñšð&uøŠB)çkž`^;rÀ(ËDê8À·XÐà™ÈôßqǾ,¬¡µH¸À8Çeòœ¡÷pâœÜv?ö±yàD=ä:°àõßr,Ö3‘8íÂy>¬^ð$à–ëI®‰ – µ˜êƒÍz ¯E~Ê¥ÍBÀÞàûB=ýÉ2 ’µßsÏ=çèxàÞi£üÇäÞ¬P[¤xíÌDr 7ëd†‡¨%Zùĉ—¡’ž†ç;(ü¶é;‡h À<¤Z ®äT-…Ë|‡ðÅCj®|&)i¤’謆ÌxgÐß¶éÄwüàKó™¼ßm@p¹Wy[@Äb!¯ÏO:©@ÒI $-´@l äýâͬì±(d©Èc=æÕUÀ5Ï'ËØLeE¥‚PQ"Q;I³®Ê 8Fý#"ªV€o¨Æ:ÀÈpQ é&`ÜvR±„ ˆ¦N(…€êk¨v†yKYF©F±CÕäœ\T\l6Âк@nº,Ó–À ÐÌ2õÄ¢H†É¬ <  Õ€&Š:À›/ÑŽ f@›RmõßæÛ×Ö£ ™'—9Ðɵ‰ëtÆ1¨#÷¶d€Ü|€kǰ9Ç2e×À×`—ò86po*³í×sÞ*àEÙdžCݸço»í¶!cè‰vMÊLZ i¤r $PÛ‡WŵťÑ@ˆy¾´1¡:¢†/(‰¨‹„ÊâÕ6ê'ê €££¯ùIòñZð!á›ÖèIŽ·Å‹Qœ€^€H–¬S@ Ñ!xÄ¢F”¨f$\`š:X)Ë@ ••D$„RÕZ¿cðJÝñ [öJ¨po¸á† wzH¢n(¯¦è†  0QÊE½™G ª¸l§ Q޹VùûÐܨ«(ô­uöË·_t}¸´m¸@§Ù8ÎËmÄC÷QW`˱]î/ûL¬cŽùÿ·w/­rTýÇÏ3ñ-8Í\ž‰ƒd¢`¼ ¢xIÔD¢ ˜xƒDÔ‰/ ¢!ÆhÔ ŒBT¼L„€Š_…_Çù×§x~ç¿SVu÷é$kÃIõé®ÚµkUô·Ö^{h¦×ö5¼)ØÎ>Õ-â8ÕëÇyó7Ó=‘-ÿŸmG̬¢@¸ÎÈ—À>¡Ë€,çÈÊ š“È1¬Ìª/xN§®TƒœÀƒ¥bHv2-(q»8vºÅkÀXÆÖÄà ”TáÜ‚^ΰýjO[ll½ AWX«·¢ í6@,;î²®d‘ Ùáa¶¶ÝnÞëV; jß ÌÑÈ{C(¯: tµ#̵”U¶¸—M9²UplökŸ´´_Ð@®ãسgÏ¢hϬòà 0;^çD3}lS.®mœ?iÿÃôËͶάümÁ­¶Ñª {È„b‚\ׂý;?®+õ‹¤¸èáwŸ¯«È]·Å@E9mû‘×n7ez'´¹ïþÿ+[ÎUw“×ÿÞÖ‘×Q D(pã*/…5žûe@Öî ø,à’ãªûȶMjÀ éš5'À­Ü=ƒƒ€&ˆµ^Ëœ‚NÀ%&Pqq9£ºë‡sÌ‚ ÙÒ6uz¯ÍoV]—³fí×6ûçLªÛ¾Ç" UG»û¸2²â ÚK'®¦ß-cî-·V± è´“®5ØlVýœpÎ*0,@ŽYº —v^·î¬ã)'×Ò>] –mT »^DƒA}Î1`UlWqçÂ9ó£_[ä°-ÕMOõ9§njhaö û¸nÖ¸À–^nÈÔkep f=XâĉrÙÿ™u\ù, D(¢òe±âuÐAA?ØË´YȽA eVÑ@WØQu, ²U¿ ,w¬êÂåÒ‚! Ä€I $3K®ó6c«Nñ`#¯(gÛ‚—Ϫœ)U—1WØÏpÞ\ë‹m¬WÝþÜiƒÄ@˜Ñ^Ýø wÐÕMGK:=z´l€5z9rdØ„ÑßÇÜÛ:îš5À¹q¾‰)ØI±¥n|3Ix`÷è‚LZ8?c Ûº¸ÖåâÊâZÒJÑž±üí¼|j¿ñÿþÑ?¥™¥ßA®ëʈspÍt¡ýn’œ{í¸ó€ºÝ_½VL·ˆŠièÔp­Þ.|¦Ù*µ²ŒQ Dy jç)4òù² Lò À3@,md’®ZPŒÀ´n~u‚Uð[—yÕ•«~qnh€E[øÐq1êš5ç­íÕ–h׌qum£€díàþg T31 ¥äº‚c]ö–@IêWØ-÷ÐMÂ<Ð̹t©¼1äâÒøÑG6ã²ßEÜ ÈÞ‚WYS7 UÔK‡rq}6oÞVÇÃu¤=]Ô rÎ'ÐU'x®™ZЭèBëânpëÜUûæåoë]:Î;]]»Î‘sâÜ8wž"gŸ•ûv­Üy@­.à Š]_Ž¡Þs\ÜÙîºÌÿM‹ž¨¬¢@ˆ½ùâXðBè¾t—rd+'+ «ß`,0b¶ ²€í¯¿þ껨5Ôèz–W5·,8T¿'I8p ‡ZŽ—Ö’ë 8š šSÆ¥Óz+?ºª `z£Uwàì¼øâ‹=°k'@»Þ² hñcp›vƒÖrx¹4IbõÚ/ðË ASµ ìŽA3èyPä„l ë³‚Ü6\m¬%°å¨[ˆŽÍ’àæ¢\gð ÈfçÜÚŽê-h­Œ©ã›K×yr³×r²ê³¶ºï]ôå´;7–ÞŸ•¿ÕÞág ^½ŽY{íÛ s MÚnFîípÁ=gÖuf{½§‰ ÕÎïQ D(°µ3ÔZdUÙ>«iT=Ù.ȪË@/à p¡§×_~ù¥(pb\ZE—<7œ€š¶ÿðÿ•šoÔþ8ic@×n|¹‘Ú HELV…+gß·€×k? È` Ç ckŸ Éû –f`k0“¥õ¹É•ýåä‚;Ë!èmZi§Ü‚\°«¾‚\í–yîm­ï¸þîÎ1èóÚ ÀØœ¸Ö/÷Öº^›Ù‚ÓY`[u¶Kç¨sLÝÐÃ9tsàXœgûU\b–Ž{»ùÛv¿‹¼vÜb/ž0G/‘íÕ+pî¬Gõ–û_Qƒx Sr-"rÖ‰Q D™ jò¬²Ãœ¬‘ú¾ì—YÓjùÒ*!+&|@#H‘ ×îôéÓ=<ÕtTàˆr‰9Ä"`WáœÊÛro½dŸ%'$ÙôOë[ôcÇŽÙd´€MÖ  âJkû¬xÊѵ‚Þz« Þ@²ú 耰π-ÀÓµïwn®õ*²ÀÕmA(äÒÈ1rM®bÛ‚Üý]6¹-‹¸·Öª­‹+¦ñÌ3Ï´Um½v¼Îµ›íྃóEÊè–^àÝ}sk‡Êßr¾Ý¨xßMĪE\EÜÅ“çÔ)“«mô•ãæä¿òÊ+}Ì€£ p—D VU>ÛG(¢@)¨í”è qÓS½|)Ë4B„æ•v€È’Ù\dA˜Tå&Ê^ú}²O>ùäà2¦‡M@ 3€OðÇÅÔÍ[äÈÒDÐׂ¬cæîUÀ6PäLÏÙ-Àå2Š9LŸW4Á”a z™t p xE 8¬U€ýUqΡÏ@&Ô9õS ëX¹ŸÎ™eS aî#÷ZöSdaQ÷¶¶W?=,•©˜Beoµ—ӻȌ }…Í?Ühõ´Ž.=è`騀îºâ¦ròÛ뤩nîËsçÎõëDV€ìFNƒ}¼ÇMvÃ$ïíšô¤¹ýû÷çÿŸ¹êf…(¢@XTöKe6qK’'•eYà) DÀàÒE˽§åÈêÎ=|øp@¶=ÁŽå¥—^ê·ó¾vذêÒná XØ( \Á!ȶu×kí¨Ž[[€­¨€¶¶õ×úíÒ¾¸·Mà·¹ÜvÝí¾®ãä 'Ç‚ýx燛ëÇ1s}9»n`|V »gÏžþ}u\ŽbShÛ¨éèGăK_ƒÀt·Ï*¢åâºnÆb åÞZÓ 8­·lÑNλcsî¿âF@¦D»Ö¶›¿}óÍ7ÁéVŒ…C fíÃì×eÏX¶‹Q Dí*pmwãkmýU@Ö±‚OP {úñÇ_dÕe.Ð &€–A5r œ3ð¶¼dACç¦Mž«ÎaÞï`˽·eðl¦ƒÊqNmO·6šnçàT]³Þ´œJŒfZ¤?IDATÎp¹¼ÚX®4À°bP¥7¼èÊñÒˆžb ØBÛǦkß@<`縀( Uœ`[.®ö c ÀVaU'í4\\1ÐÓ‚,wÐÀHèâ Ÿ .lÊ(Ö£h9É` ´€1q .Ÿe[€­õÀ˜ìcuÛk®Œi»Mûš; ̹}`Ìq9¿²¡–S¸\û\%š0Uÿ"ïÛʘ^ ÒÁ: ë8.àï=í­.˜£ÑЩ‡t%áƒÛEá`ÒÆµâÜË*ÞÊÞºnÜ-ZoÕ1oÉ6ó‚s×]W[‘…YùÛÊÓº‰ÈܲóÎçQ D(°S ,M;µóªwU­§sˆUA, §áÒõ @!WšZË ›EA¶Õîí·ßÞÆ€‹›§k¹œGK0jEÆJµ‘Ké! bºæu×+" ©µYÛ¶ÝÖÎ1aŽ3X¸À˾§â¢ öÇ©4kÂ:£ m}í6¹) §Bp· ¶¬t’sº4r¼S1upÍ]S2ËÎÁ<÷¶Úêú¹åâîÙóÿsâ–{ës`[ƒkÛe—ê‘yK]–‹u~Án›¿uýrg¹ôO=õÔR×î²íÌvQ D(† \7PÛ9Xý`/Ýú @p&‡S; ¨ß¹›õ`„U2²UŸ/{Ž·MŒ€ó%ãé=`¤‹ÀtÔ9y+ñƒ7Þx£‡`(#ªä~8²[Ä8‘ …‹Ø–&ª ½œ_Ž#prYÀl,ª`{0v *ã6û“§Ë_S€Kðæ@Œa§¢ íñ.úÚ ƒcÿ^\ KGz_R®®ko,¦Pîm›½¥…õ-Îe¹¸¶ÓÍï¼Ôà2ïmÇn÷«žo¾ù¦?Ç® 1ˆ¶\¼x±?>3z8GþÎü?~|åë·ÝO^G(¢@XV•`jÙ®k»UAV7².pŽâ*³Ôñp³t×4\ÜI Dd[ yU­}ÖØ~ûí·=‚Ñz®Ï9‹àTw9g Ká¾Ð6j`}Çä8­Žƒ{ Ö@Èå ;6ÊÉõà‡*ê>²·ÚnåVµƒ[€+ï+÷;,ôÒN7W+š0lSû;-üÐÇØw2¸ŽS†™“ rÇfShÝ[.+-÷–¶ÙyH—ƒËÑS°­ëünǽµ> 5“…ë³-œÚŸ~ú©ïIè¢[ÿ_tçx³»v¶~o·Éë(¢@ˆWCkîKiU%r=ÁÄø@À` ìÚùJ9!€Ö4\ F75pÍ@`<òÈ#û¯ÀFãÜí§ŠÉz‚ÊÊÒ‚M™´ŒêJ6­—Q;€ ²À®õ­ NÍt°oß¾~-ÇìFÀz\`Pe{Ž4pn£ ¶åÖr69¼Ú£‹¿—Fåàw·E¦®‡Š,\ é¦€އ{ÊÁv,Þ6¦ ¿Ê¹u@-=¹·m¯¼íûík.«sR..À-÷ÖzSÓ‡ùÌuâÚåÎ÷séÒ¥þx^{íµ+ríjOJˆQ De¸& v ¸«€,hi§áÒUË¥ >S®$ÈNüYîmÁ-g‘;Ä&Hå0r9†º˜8¸àtïÞ½ýØ‚'Ç|ÿý÷÷ºšË•SÍѰ­¨à²=‡—#XO(„â öm¦1À×Î8^»)š0¥=G›#Þƒþ¦кN?}SShç;.÷v°¯ÊÙZgª¸Q+WÖÖkç 0×άhåfm[ìƒ;«}¯¿þº˜Ê5ñÿD{ y¢@ˆ7ž»öËj [ `6UAÖ¥ÑNÃÅ•©e²á±Çãjí*˜åÞ‚X@ÉIä¶¾üòËý_ø÷‹ç}êAžnæɹåàr+2`cÀâD èV­oÀ‘(ƒü²p+úPÚ¦\…vvÚÏn&Ô± —Yp3äz·42¨OšÖ5›Â<÷¶­›KëfÊ ÈXñYA.'X<Áº Ìê™h‹Á`ò³™–«U%¯£@ˆQàZP`WAí:@Vw6øLëY°ÁI4­ÓM7ÝÔw)ËÇ‚@nf=1i·ìÔÅ7åÞJ0)6\¯Çš*õ8*–3 ¨hneoº&ð©û3â¼ °bšÁròµ\[7m)À•yÖ.#·×~8·\ÈÝ0kBÛöy¯9µüqKplôñS‘Ç*Âõ¸Žu–{;Ü_l¹áõ¹sûã?öq”nÆŒþ tnÄÀ.¸åÎÚÖgC¿«þo¨cÈ2 D(¢À”Wý‹ dyt&5×iÍZ05}ÔÔpÀd6ײ€ŠSiŒ¢˜S À@ 3° ÈÎz(ÂT[wÃûSî-¸OìÑgŸ}ö²&—‹ ¶LÒoJ2n.ˆ¸UÄÜXrt«››¾ÎÈÆ´U€±shݶؾÜ!à^kÑŽí'Ÿ|Ò_Cœ~`¯XÜÊàº9s޵ž› =SÙÛV¯ákqNù{ï½·!Û‡þïÞM¤,¹GDÛ—G'wqƒ«þ°ýù= D(¢À" \•/°u,ËHp–ìUBµÓpɘʛê>²œÅ#GŽ\Ó [Ç9\:ÙÜTÜ)Ð.˽­:ÊÅ\lÅÀ47'í 'Ž*ÀÂW3"TÑ%.ƒ æ@²›ŸT6,CÀO(—¸¢ ÎÙÁƒû'Š ·¿š¿s«-'ôüùó}S€¬ÂWÀlÙaÇâfÊzô5—±©çÀ<‡•ƒ X§Š›ÙYQ@;uÖíw3ÙÙ)ó~ˆQ \ \1¨í¾ˆ7¿ÿþû?ÿüs%G<éš]È7P*€œQ {ï½÷ö€u#tÇN¹·nDª{˜rªÇÊï¿ÿ¾ñwS°÷–Ë r9¸´­ü­ì&0¸¦íªBû_ýµïz—;åRrnݼÈãjC•\ ðˆ¸ö½Û¢ ß}÷]ãµL×>àtÌn,üýüñÇ=ôÐÆûï¿ßÏœà¸îž={Jš~é&Ðzìn[{™4ù% D(®CvjÒ‡~ØëÞ4JÜl§TdÛu¬/{0k”®oN—'hYÝÀ\BÐp#€ìÔyso9©t£Mp“1Œ'¨°Z sP9†b nHÊÅŸàVÁC2žxâ‰Ëš#j_>±?ç‡sl€YûûqsbY€ †9ÄWýÜÛY³\¶ó5þÂõø]@»N7´s·ûŽ€ÙÏ>ûl˽©©º–è5zªŠQ D(pÅØQ¨í`v󫯾êáÔ{î¹g¡ƒ«Láº@–XÓpÏõÒ戬ŸÎñÚQM:ø]´Ò˜{ë¦Üê7˜aÜ\³LŒ Éa4{BEZhÊ}‚Oî«©¤jê)õqw ¨žÀfz1šÌ`àHæ×|¼-àr‚k„¿îÝùÚüàƒŽ5u­ïÙ ‘Øé¬ªóäoFŒ„[.º°Óû\«X©, D(¢ÀŠ ìÀu£¨7Ïž=ÛÃ7 @‚žE Ö:ëYÚ´Ópqù€GTéöæÈd»Š†î-˜·Î—.pO¥s}ôèÑUÊÕ·ÊwÞy™‹Ë-÷T2ur5.§VœÀ͆âÚ¶×ü·•/5p­œvƒøl£G@ÑT° pÁoEÀ4÷–³»î"#üé§Ÿn;v,]ÿë7õE(¢@Q`­P zD #˜mó³ ¶@¶&¬,Û}²W{l@ ¸1Ή5ø¨@Ôpûö_§{µmºž^ÝÛTçØà.Ž,H娶óЖ¦ª’ƒåÎVt˜Pï•‹«[]l@DÓþÜsÏU[pkèµ_£ø]CÿüóÏVÜÁ ÚàzrM˜E¡×Õ¼gœMSƒ­£È¼~ùå—gÎœÉ Ó:MQ D(P`-P+ÛÇ™•{42Ã2„ÚuƒlMÃåIaVG~þûßÿn:t( ;<)kø}èÞeï¦Â5 Û)CË¡5;Å0ž Ó̹åȾð [­©*‹ E8¸é+þPù[€ L9µ·Ýv[°êSjV1‘3ZY°lšÇÓŠPˆ:p×M0 Lûßzë­É™¶4/¢@ˆQ Dµ)°Ô•Í™åqf+Ó8Ö:P :tU¯Ë‘µÓp&Óµ0Ëí-èÙµÎ;¶¼·áœöÓ‚‰{TÎÜÖcx72ÜXQ…¶ÈÌ‚[Ÿ § ³^ëârݹ³b ¢õ€ƒÎ€)ÈåÌrã nÕÁé•©•é­¨‚z\³`Ù5äz±/õŠ&poíg‘â ò³`þwÞYéïj‘ýe(¢@ˆQàr–þò½páBïÎêÖmG¡_^ýFï¢én6e×tÕhúÁø0¾@Öû²‘²”&ù_ç(su§,®€L5ÇÒ¼ÁndÀªALhÕܳ\Z7:2­U@¯®{çw n­7æâV׌ ¼ŠpŠí ¸m£ rßfØàæŠ@¸¦]c‹Dê bÏ?ÿüÒSÃ6æ÷(¢@ˆQ`q¶ý\ƒÀÌ?ê‹ßžÚ"Ç  ÷JáÖÑ"N:Õ®¾ðku]Ä••—5Q?åÈNM,¿ðN²âZ(÷ÖôRƒ Vå]ÅAÚ¬-—ÔÍN[¬Ë½mc íçõzèâÊqs_¹¬À–{ëfpΚJ®¢ õ׬(…Á…fǘŠ&ÔÚ'uUÛ²ŒQ D(®œ Cm÷¥¿ùÑGõNØ-·Ü²•›åÀʱr«tñrŸ] V×­Éó«pïÀ ]¤¨ïçŸîë.· ÈrÏî¾ûî¾»8 »ˆ’Wro¹§€UÆ–k;tj‡ñ¿ƒÛP6ëH¸¸§ýÝ=üÁr5£‚kPo7–s+W;«¸îìÓ6b-ò»ÜàÓ§O÷ŽsEìïÒ¥K}~63hÌR4ŸE(¢@ØyæB­‘îr³\/ÎìÍ7ßÜ?´€»VpduÝêþõ¬ú©bnQzòäÉ©Uú÷etM¸op™•Ó²·–ç¶»ß0ÿì:ʽíºé7^}õÕn &MpmU”Þ¯âzšcS…Õ:ÃeëâúŒóª$vàÀÉ ¸ƒ¹^õ4Èæzˆƒ:7ir·ÚrîܹÞ^÷úæŸ(¢@ˆQ`Û L¡A`_|ñņ‡'˜² dt€ÛçXí…[j9kl¶ƒ©–˜êœ»›Í%Ê•““U€,g |Ù8aSŠ^»ï—{+B½0{ÆðÚp]T×uh:°©ÇôN©ÁU¹–\\×V Â>«èæÌVDÂÓºô<äa¥R–Q D(vŸ£PËMóÅ@k®×z<©Ñæ&·_¶È.rÂ@‰)À¸²º{•ÊÊÞwß}Ùe¾·+÷Ö<±|ðA?·0Ð,­CrÝpìÍZg·Ö[€Öí£ŸïÖv !c ]ë’ðÃ?ô7i¦“©U¾þúë~½Ìh0¦lÞ‹Q D(°{øÔvƒ±6<—a­Ñà ÖT\ó ÷k‘bþQ.™}Èzº×]wÝ%oû¯6-RgÖ¹>àÞz`»ᄏõÞá`Ž´â -èݵ!ð¸ZŽk[ ãΊÜ~ûíýܵ–€äºáêâ7¹&[Ñò: D(¢À.T`ô˺›¡`Ó—½ÂåšU®ðùçŸçÚœ=ïG(¢@ØE L~awùÃM3 (&©÷S¯-uçÖïõyæ†í%É?kV Ë+ßÍAMh£ÜZ³Yùn9l7XÌN‡î¬4Æ‘5`mìºí¢1›fIè@yòod͇™ê¢@ˆQ DÈö âeÓ+«'Uþ•“jš.3mˆ\X9ìšã·ß~ÛôÀ³˜Úkß¾}}ÌÊË?~<ƒ¯ìéËÞ¢@ˆQ ì¨Ú•7•·¦”-˜53†Y<€ðÅ‹ûÇævøðá\÷;ubRoˆQ D(¢@ˆQ D(¢@ˆQ D(¢@ˆQ D(¢@ˆQ D(¢@ˆQ D(¢@ˆQ D(¢@ˆQ D(¢@ˆQ DRÿkªV]º5¤IEND®B`‚spatialite_gui-2.0.0-devel/win_resource/Makefile.am0000664000175000017500000000006712543275035017305 00000000000000 EXTRA_DIST = icon.ico resource.rc spatialite-icon.png spatialite_gui-2.0.0-devel/ltmain.sh0000775000175000017500000105021612543275035014372 00000000000000 # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4 TIMESTAMP="" package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 spatialite_gui-2.0.0-devel/TableTree.cpp0000664000175000017500000101745512544026240015123 00000000000000/* / TableTree.cpp / tree control to show tables, columns, indices and triggers / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2008-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include #include "Classdef.h" #include "wx/filename.h" #include "wx/imaglist.h" #if defined(_WIN32) && !defined(__MINGW32__) #define strcasecmp _stricmp #endif // // ICONs in XPM format [universally portable] // #include "icons/db.xpm" #include "icons/table.xpm" #include "icons/geotable.xpm" #include "icons/vtable.xpm" #include "icons/geovtable.xpm" #include "icons/composer.xpm" #include "icons/view.xpm" #include "icons/geoview.xpm" #include "icons/pkey.xpm" #include "icons/column.xpm" #include "icons/index.xpm" #include "icons/trigger.xpm" #include "icons/geometry.xpm" #include "icons/spatialidx.xpm" #include "icons/mbrcache.xpm" #include "icons/kill_spindex.xpm" #include "icons/dumpshp.xpm" #include "icons/tmp_table.xpm" #include "icons/tmp_view.xpm" #include "icons/malformed_geoms.xpm" #include "icons/statistics.xpm" #include "icons/map_preview.xpm" #include "icons/tables.xpm" #include "icons/foreign_key.xpm" #include "icons/primary_key.xpm" #include "icons/topology.xpm" #include "icons/attach.xpm" #include "icons/checkgeom.xpm" #include "icons/sanegeom.xpm" #include "icons/coverage.xpm" #include "icons/coverage_tiles.xpm" #include "icons/vector.xpm" MyTableTree::MyTableTree(MyFrame * parent, wxWindowID id):wxTreeCtrl(parent, id) { // // constructor: TREE control to show DB objects // MainFrame = parent; Root = AddRoot(wxT("no current DB")); RootUserData = AppendItem(Root, wxT("User Data")); RootIsoMetadata = AppendItem(Root, wxT("ISO / INSPIRE Metadata")); RootStyling = AppendItem(Root, wxT("Styling (SLD/SE)")); RootTopologies = AppendItem(Root, wxT("Topologies")); RootRasterCoverages = AppendItem(Root, wxT("Raster Coverages")); RootVectorCoverages = AppendItem(Root, wxT("Vector Coverages")); RootMetadata = AppendItem(Root, wxT("Metadata")); RootInternal = AppendItem(Root, wxT("Internal Data")); RootSpatialIndex = AppendItem(Root, wxT("Spatial Index")); // setting up icons Images = new wxImageList(16, 16, true); wxIcon icons[25]; icons[0] = wxIcon(db_xpm); icons[1] = wxIcon(table_xpm); icons[2] = wxIcon(pkey_xpm); icons[3] = wxIcon(column_xpm); icons[4] = wxIcon(index_xpm); icons[5] = wxIcon(trigger_xpm); icons[6] = wxIcon(geometry_xpm); icons[7] = wxIcon(spatialidx_xpm); icons[8] = wxIcon(vtable_xpm); icons[9] = wxIcon(view_xpm); icons[10] = wxIcon(geotable_xpm); icons[11] = wxIcon(mbrcache_xpm); icons[12] = wxIcon(geoview_xpm); icons[13] = wxIcon(geovtable_xpm); icons[14] = wxIcon(tmp_table_xpm); icons[15] = wxIcon(tmp_view_xpm); icons[16] = wxIcon(malformed_geoms_xpm); icons[17] = wxIcon(tables_xpm); icons[18] = wxIcon(foreign_key_xpm); icons[19] = wxIcon(primary_key_xpm); icons[20] = wxIcon(topology_xpm); icons[21] = wxIcon(attach_xpm); icons[22] = wxIcon(coverage_xpm); icons[23] = wxIcon(coverage_tiles_xpm); icons[24] = wxIcon(vector_xpm); Images->Add(icons[0]); Images->Add(icons[1]); Images->Add(icons[2]); Images->Add(icons[3]); Images->Add(icons[4]); Images->Add(icons[5]); Images->Add(icons[6]); Images->Add(icons[7]); Images->Add(icons[8]); Images->Add(icons[9]); Images->Add(icons[10]); Images->Add(icons[11]); Images->Add(icons[12]); Images->Add(icons[13]); Images->Add(icons[14]); Images->Add(icons[15]); Images->Add(icons[16]); Images->Add(icons[17]); Images->Add(icons[18]); Images->Add(icons[19]); Images->Add(icons[20]); Images->Add(icons[21]); Images->Add(icons[22]); Images->Add(icons[23]); Images->Add(icons[24]); SetImageList(Images); SetItemImage(Root, 0); SetItemImage(RootUserData, 17); SetItemImage(RootTopologies, 17); SetItemImage(RootRasterCoverages, 22); SetItemImage(RootVectorCoverages, 24); SetItemImage(RootStyling, 17); SetItemImage(RootIsoMetadata, 17); SetItemImage(RootMetadata, 17); SetItemImage(RootInternal, 17); SetItemImage(RootSpatialIndex, 17); // setting up event handlers Connect(wxID_ANY, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, (wxObjectEventFunction) & MyTableTree::OnItemCollapsed); Connect(wxID_ANY, wxEVT_COMMAND_TREE_ITEM_EXPANDING, (wxObjectEventFunction) & MyTableTree::OnItemExpanding); Connect(wxID_ANY, wxEVT_COMMAND_TREE_SEL_CHANGED, (wxObjectEventFunction) & MyTableTree::OnSelChanged); Connect(wxID_ANY, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, (wxObjectEventFunction) & MyTableTree::OnRightClick); Connect(Tree_QueryViewComposer, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdQueryViewComposer); Connect(Tree_NewTable, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdNewTable); Connect(Tree_NewView, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdNewView); Connect(Tree_NewIndex, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdNewIndex); Connect(Tree_NewTrigger, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdNewTrigger); Connect(Tree_NewColumn, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdNewColumn); Connect(Tree_Show, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdShow); Connect(Tree_Drop, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDrop); Connect(Tree_Detach, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDetachDB); Connect(Tree_Rename, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRename); Connect(Tree_Select, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSelect); Connect(Tree_SelectTiles, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSelectTiles); Connect(Tree_Refresh, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRefresh); Connect(Tree_RefreshDeferred, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnRefreshDeferred); Connect(Tree_Recover, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRecover); Connect(Tree_ShowSql, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdShowSql); Connect(Tree_SpatialIndex, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSpatialIndex); Connect(Tree_CheckSpatialIndex, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdCheckSpatialIndex); Connect(Tree_RecoverSpatialIndex, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRecoverSpatialIndex); Connect(Tree_MbrCache, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdMbrCache); Connect(Tree_RebuildTriggers, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRebuildTriggers); Connect(Tree_GisLayerAuth, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdGisLayerAuth); Connect(Tree_CheckGeometry, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdCheckGeometry); Connect(Tree_Extent, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdExtent); Connect(Tree_UpdateLayerStatistics, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUpdateLayerStatistics); Connect(Tree_UpdateLayerStatisticsAll, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUpdateLayerStatisticsAll); Connect(Tree_ElementaryGeoms, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdElementaryGeometries); Connect(Tree_MalformedGeometries, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdMalformedGeometries); Connect(Tree_RepairPolygons, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRepairPolygons); Connect(Tree_SetSrid, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSetSrid); Connect(Tree_DumpShp, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDumpShp); Connect(Tree_DumpKml, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDumpKml); Connect(Tree_DumpTxtTab, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDumpTxtTab); Connect(Tree_DumpCsv, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDumpCsv); Connect(Tree_DumpHtml, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDumpHtml); Connect(Tree_DumpDif, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDumpDif); Connect(Tree_DumpSylk, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDumpSylk); Connect(Tree_DumpDbf, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDumpDbf); Connect(Tree_DumpPostGIS, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDumpPostGIS); Connect(Tree_Edit, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdEdit); Connect(Tree_DropColumn, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDropColumn); Connect(Tree_RenameColumn, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRenameColumn); Connect(Tree_ColumnStats, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdColumnStats); Connect(Tree_MapPreview, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdMapPreview); Connect(Tree_CheckDuplicates, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdCheckDuplicates); Connect(Tree_RemoveDuplicates, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRemoveDuplicates); Connect(Tree_CheckGeom, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdCheckGeometries); Connect(Tree_SaneGeom, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSanitizeGeometries); Connect(Tree_NewRasterStyle, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdNewRasterStyle); Connect(Tree_ReloadRasterStyle, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdReloadRasterStyle); Connect(Tree_UnregisterRasterStyle, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUnregisterRasterStyle); Connect(Tree_RasterSymbolizerContrast, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterSymbolizerContrast); Connect(Tree_RasterSymbolizerChannelRgb, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterSymbolizerChannelRgb); Connect(Tree_RasterSymbolizerChannelGray, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterSymbolizerChannelGray); Connect(Tree_RasterSymbolizerCategorize, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterSymbolizerCategorize); Connect(Tree_RasterSymbolizerInterpolate, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterSymbolizerInterpolate); Connect(Tree_RasterSymbolizerShadedRelief, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterSymbolizerShadedRelief); Connect(Tree_RasterSymbolizerMonochrome, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterSymbolizerMonochrome); Connect(Tree_RegisterExternalGraphic, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRegisterExternalGraphic); Connect(Tree_UnregisterExternalGraphic, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUnregisterExternalGraphic); Connect(Tree_RegisterTextFont, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRegisterTextFont); Connect(Tree_UnregisterTextFont, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUnregisterTextFont); Connect(Tree_NewVectorStyle, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdNewVectorStyle); Connect(Tree_ReloadVectorStyle, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdReloadVectorStyle); Connect(Tree_UnregisterVectorStyle, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUnregisterVectorStyle); Connect(Tree_SimpleLineSymbolizer, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSimpleLineSymbolizer); Connect(Tree_SimplePolygonSymbolizer, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSimplePolygonSymbolizer); Connect(Tree_SimplePointSymbolizer, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSimplePointSymbolizer); Connect(Tree_SimpleTextSymbolizer, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSimpleTextSymbolizer); Connect(Tree_ImportRaster, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdImportRaster); Connect(Tree_Pyramidize, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdPyramidize); Connect(Tree_PyramidizeMonolithic, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdPyramidizeMonolithic); Connect(Tree_DePyramidize, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdDePyramidize); Connect(Tree_RasterDrop, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterDrop); Connect(Tree_UpdateRasterExtent, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUpdateRasterExtent); Connect(Tree_Raster_SRIDs, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterSRIDs); Connect(Tree_Raster_Keywords, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdRasterKeywords); Connect(Tree_UpdateRasterExtentAll, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUpdateRasterExtentAll); Connect(Tree_VectorUnregister, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdVectorUnregister); Connect(Tree_UpdateVectorExtent, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUpdateVectorExtent); Connect(Tree_Vector_SRIDs, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdVectorSRIDs); Connect(Tree_Vector_Keywords, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdVectorKeywords); Connect(Tree_UpdateVectorExtentAll, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdUpdateVectorExtentAll); Connect(Tree_SldSeRasterStyles, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSldSeRasterStyles); Connect(Tree_SldSeVectorStyles, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCmdSldSeVectorStyles); Connect(Tree_CreateRasterCoverage, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnCreateRasterCoverage); Connect(Tree_VectorRegister, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) & MyTableTree::OnRegisterVectorCoverage); } void MyTableTree::FlushAll() { // resetting to the initial empty state wxTreeItemId child; wxTreeItemIdValue cookie; bool ok = true; DeleteChildren(RootUserData); DeleteTopologies(RootTopologies); DeleteRasterCoverages(RootRasterCoverages); DeleteVectorCoverages(RootVectorCoverages); DeleteChildren(RootStyling); DeleteChildren(RootIsoMetadata); DeleteChildren(RootMetadata); DeleteChildren(RootInternal); DeleteChildren(RootSpatialIndex); while (ok) { ok = false; child = GetFirstChild(Root, cookie); while (true) { bool kill = true; if (child.IsOk() == false) break; if (child == RootUserData) kill = false; if (child == RootTopologies) kill = false; if (child == RootRasterCoverages) kill = false; if (child == RootVectorCoverages) kill = false; if (child == RootStyling) kill = false; if (child == RootIsoMetadata) kill = false; if (child == RootMetadata) kill = false; if (child == RootInternal) kill = false; if (child == RootSpatialIndex) kill = false; if (kill == true) { Delete(child); ok = true; break; } child = GetNextChild(Root, cookie); } } } void MyTableTree::OnItemCollapsed(wxTreeEvent & event) { // a TreeItem was collapsed - freeing all children wxTreeItemId item = event.GetItem(); MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; switch (obj->GetType()) { case MY_TABLE: case MY_VTABLE: case MY_TILE_DATA: case MY_VIEW: DeleteChildren(item); AppendItem(item, wxT("placeholder"), 0); break; }; event.Skip(); } void MyTableTree::OnItemExpanding(wxTreeEvent & event) { // a TreeItem is to be expanded - appending all children wxTreeItemId item = event.GetItem(); MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; switch (obj->GetType()) { case MY_TABLE: case MY_VTABLE: case MY_TILE_DATA: DeleteChildren(item); if (obj->GetDbAlias().Len() == 0) ExpandTable(item); else ExpandAttachedTable(item); EnsureVisible(item); return; case MY_VIEW: DeleteChildren(item); if (obj->GetDbAlias().Len() == 0) ExpandView(item); else ExpandAttachedView(item); EnsureVisible(item); return; }; event.Skip(); } void MyTableTree::DeleteTopologies(wxTreeItemId & RootTopologies) { // deleting Topology Nodes Topologies.Flush(); DeleteChildren(RootTopologies); } void MyTableTree::DeleteRasterCoverages(wxTreeItemId & RootRasterCoverages) { // deleting Raster Coverage Nodes RasterCoverages.Flush(); DeleteChildren(RootRasterCoverages); } void MyTableTree::DeleteVectorCoverages(wxTreeItemId & RootVectorCoverages) { // deleting Vector Coverage Nodes VectorCoverages.Flush(); DeleteChildren(RootVectorCoverages); } wxTreeItemId & MyTableTree::GetRootNode(wxString & tableName, bool * is_coverage, bool * tile_data) { // // determines the Table Root Node // bool isTileData = false; if (is_coverage != NULL) *is_coverage = false; if (tile_data != NULL) *tile_data = false; if (tableName == wxT("geometry_columns")) return RootMetadata; if (tableName == wxT("views_geometry_columns")) return RootMetadata; if (tableName == wxT("virts_geometry_columns")) return RootMetadata; if (tableName == wxT("spatial_ref_sys")) return RootMetadata; if (tableName == wxT("spatial_ref_sys_aux")) return RootMetadata; if (tableName == wxT("spatial_ref_sys_all")) return RootMetadata; if (tableName == wxT("geom_cols_ref_sys")) return RootMetadata; if (tableName == wxT("geometry_columns_time")) return RootMetadata; if (tableName == wxT("spatialite_history")) return RootMetadata; if (tableName == wxT("raster_coverages")) return RootMetadata; if (tableName == wxT("raster_coverages_srid")) return RootMetadata; if (tableName == wxT("raster_coverages_keyword")) return RootMetadata; if (tableName == wxT("raster_coverages_ref_sys")) return RootMetadata; if (tableName == wxT("vector_coverages")) return RootMetadata; if (tableName == wxT("vector_coverages_srid")) return RootMetadata; if (tableName == wxT("vector_coverages_keyword")) return RootMetadata; if (tableName == wxT("vector_coverages_ref_sys")) return RootMetadata; if (tableName == wxT("vector_layers")) return RootMetadata; if (tableName == wxT("topology_master")) return RootMetadata; if (tableName == wxT("sqlite_stat1")) return RootInternal; if (tableName == wxT("sqlite_stat3")) return RootInternal; if (tableName == wxT("sqlite_sequence")) return RootInternal; if (tableName == wxT("layer_params")) return RootInternal; if (tableName == wxT("layer_statistics")) return RootInternal; if (tableName == wxT("geometry_columns_statistics")) return RootInternal; if (tableName == wxT("views_layer_statistics")) return RootInternal; if (tableName == wxT("views_geometry_columns_statistics")) return RootInternal; if (tableName == wxT("virts_layer_statistics")) return RootInternal; if (tableName == wxT("virts_geometry_columns_statistics")) return RootInternal; if (tableName == wxT("geometry_columns_field_infos")) return RootInternal; if (tableName == wxT("views_geometry_columns_field_infos")) return RootInternal; if (tableName == wxT("virts_geometry_columns_field_infos")) return RootInternal; if (tableName == wxT("geometry_columns_auth")) return RootInternal; if (tableName == wxT("views_geometry_columns_auth")) return RootInternal; if (tableName == wxT("virts_geometry_columns_auth")) return RootInternal; if (tableName == wxT("vector_layers_auth")) return RootInternal; if (tableName == wxT("vector_layers_statistics")) return RootInternal; if (tableName == wxT("vector_layers_field_infos")) return RootInternal; if (tableName == wxT("layer_sub_classes")) return RootInternal; if (tableName == wxT("layer_table_layout")) return RootInternal; if (tableName == wxT("pattern_bitmaps")) return RootInternal; if (tableName == wxT("symbol_bitmaps")) return RootInternal; if (tableName == wxT("project_defs")) return RootInternal; if (tableName == wxT("raster_pyramids")) return RootInternal; if (tableName == wxT("rasterlite2_styles")) return RootInternal; if (tableName == wxT("rasterlite2_metadata")) return RootInternal; if (tableName == wxT("sql_statements_log")) return RootInternal; if (tableName == wxT("wms_server_log")) return RootInternal; if (tableName == wxT("ElementaryGeometries")) return RootInternal; if (tableName == wxT("SE_external_graphics")) return RootStyling; if (tableName == wxT("SE_fonts")) return RootStyling; if (tableName == wxT("SE_external_graphics_view")) return RootStyling; if (tableName == wxT("SE_fonts_view")) return RootStyling; if (tableName == wxT("SE_raster_styles")) return RootStyling; if (tableName == wxT("SE_raster_styled_layers")) return RootStyling; if (tableName == wxT("SE_raster_styles_view")) return RootStyling; if (tableName == wxT("SE_raster_styled_layers_view")) return RootStyling; if (tableName == wxT("SE_vector_styles")) return RootStyling; if (tableName == wxT("SE_vector_styled_layers")) return RootStyling; if (tableName == wxT("SE_vector_styles_view")) return RootStyling; if (tableName == wxT("SE_vector_styled_layers_view")) return RootStyling; if (tableName == wxT("SE_styled_groups")) return RootStyling; if (tableName == wxT("SE_styled_group_refs")) return RootStyling; if (tableName == wxT("SE_styled_group_styles")) return RootStyling; if (tableName == wxT("SE_styled_groups_view")) return RootStyling; if (tableName == wxT("SE_group_styles")) return RootStyling; if (tableName == wxT("SE_group_styles_view")) return RootStyling; if (tableName == wxT("ISO_metadata")) return RootIsoMetadata; if (tableName == wxT("ISO_metadata_reference")) return RootIsoMetadata; if (tableName == wxT("ISO_metadata_view")) return RootIsoMetadata; if (tableName == wxT("SpatialIndex")) return RootSpatialIndex; if (MainFrame->IsSpatialIndex(tableName) == true) return RootSpatialIndex; wxTreeItemId *topologyNode = Topologies.FindNode(tableName); if (topologyNode != NULL) return *topologyNode; wxTreeItemId *coverageNode = RasterCoverages.FindNode(tableName, &isTileData); if (coverageNode != NULL) { if (is_coverage != NULL) *is_coverage = true; if (tile_data != NULL) *tile_data = isTileData; return *coverageNode; } return RootUserData; } wxTreeItemId & MyTableTree::GetAltRootNode(wxString & tableName, RootNodes * nodes, bool * is_coverage, bool * tile_data) { // // determines the Table Root Node [Attached DB] // bool isTileData = false; if (is_coverage != NULL) *is_coverage = false; if (tile_data != NULL) *tile_data = false; if (tableName == wxT("geometry_columns")) return nodes->GetRootMetadata(); if (tableName == wxT("views_geometry_columns")) return nodes->GetRootMetadata(); if (tableName == wxT("virts_geometry_columns")) return nodes->GetRootMetadata(); if (tableName == wxT("spatial_ref_sys")) return nodes->GetRootMetadata(); if (tableName == wxT("geom_cols_ref_sys")) return nodes->GetRootMetadata(); if (tableName == wxT("geometry_columns_time")) return nodes->GetRootMetadata(); if (tableName == wxT("spatialite_history")) return nodes->GetRootMetadata(); if (tableName == wxT("vector_layers")) return nodes->GetRootMetadata(); if (tableName == wxT("topology_master")) return nodes->GetRootMetadata(); if (tableName == wxT("sqlite_stat1")) return nodes->GetRootInternal(); if (tableName == wxT("sqlite_sequence")) return nodes->GetRootInternal(); if (tableName == wxT("layer_params")) return nodes->GetRootInternal(); if (tableName == wxT("layer_statistics")) return nodes->GetRootInternal(); if (tableName == wxT("geometry_columns_statistics")) return nodes->GetRootInternal(); if (tableName == wxT("views_layer_statistics")) return nodes->GetRootInternal(); if (tableName == wxT("views_geometry_columns_statistics")) return nodes->GetRootInternal(); if (tableName == wxT("virts_layer_statistics")) return nodes->GetRootInternal(); if (tableName == wxT("virts_geometry_columns_statistics")) return nodes->GetRootInternal(); if (tableName == wxT("geometry_columns_field_infos")) return nodes->GetRootInternal(); if (tableName == wxT("views_geometry_columns_field_infos")) return nodes->GetRootInternal(); if (tableName == wxT("virts_geometry_columns_field_infos")) return nodes->GetRootInternal(); if (tableName == wxT("geometry_columns_auth")) return nodes->GetRootInternal(); if (tableName == wxT("views_geometry_columns_auth")) return nodes->GetRootInternal(); if (tableName == wxT("virts_geometry_columns_auth")) return nodes->GetRootInternal(); if (tableName == wxT("vector_layers_auth")) return nodes->GetRootInternal(); if (tableName == wxT("vector_layers_statistics")) return nodes->GetRootInternal(); if (tableName == wxT("vector_layers_field_infos")) return nodes->GetRootInternal(); if (tableName == wxT("layer_sub_classes")) return nodes->GetRootInternal(); if (tableName == wxT("layer_table_layout")) return nodes->GetRootInternal(); if (tableName == wxT("pattern_bitmaps")) return nodes->GetRootInternal(); if (tableName == wxT("symbol_bitmaps")) return nodes->GetRootInternal(); if (tableName == wxT("project_defs")) return nodes->GetRootInternal(); if (tableName == wxT("raster_pyramids")) return nodes->GetRootInternal(); if (tableName == wxT("rasterlite2_styles")) return nodes->GetRootInternal(); if (tableName == wxT("rasterlite2_metadata")) return nodes->GetRootInternal(); if (tableName == wxT("sql_statements_log")) return nodes->GetRootInternal(); if (tableName == wxT("wms_server_log")) return nodes->GetRootInternal(); if (tableName == wxT("ElementaryGeometries")) return nodes->GetRootInternal(); if (tableName == wxT("SpatialIndex")) return nodes->GetRootSpatialIndex(); if (MainFrame->IsSpatialIndex(nodes->GetDbAlias(), tableName) == true) return nodes->GetRootSpatialIndex(); wxTreeItemId *topologyNode = AltTopologies.FindNode(tableName); if (topologyNode != NULL) return *topologyNode; wxTreeItemId *coverageNode = AltRasterCoverages.FindNode(tableName, &isTileData); if (coverageNode != NULL) { if (is_coverage != NULL) *is_coverage = true; if (tile_data != NULL) *tile_data = isTileData; return *coverageNode; } return nodes->GetRootUserData(); } void MyTableTree::AddTable(wxString & tableName, bool virtualTable, bool geometry, bool tmp) { // // appends a table to the TREE list // wxTreeItemId item; wxTreeItemData *data; bool isCoverage = false; bool isTileData = false; int icon = 1; if (virtualTable == true) icon = 8; if (tmp == true) icon = 14; if (geometry == true) { if (virtualTable == false) icon = 10; else icon = 13; } wxTreeItemId rootNode = GetRootNode(tableName, &isCoverage, &isTileData); if (isTileData == true) icon = 23; if (virtualTable == true) data = (wxTreeItemData *) (new MyObject(MY_VTABLE, tableName, tmp)); else if (isTileData == true) data = (wxTreeItemData *) (new MyObject(MY_TILE_DATA, tableName, tmp)); else data = (wxTreeItemData *) (new MyObject(MY_TABLE, tableName, tmp, isCoverage)); item = AppendItem(rootNode, tableName, icon, -1, data); AppendItem(item, wxT("placeholder"), 0); } void MyTableTree::ExpandTable(wxTreeItemId & item) { // // expands a TreeItem of the TABLE type // MyTableInfo list; MyColumnInfo *col; MyIndexInfo *idx; MyTriggerInfo *trgr; wxTreeItemId item2; wxString columnInfo; wxString indexInfo; wxString triggerInfo; MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; wxString tableName = obj->GetName(); bool virtualTable = false; if (obj->GetType() == MY_VTABLE) virtualTable = true; MainFrame->GetTableColumns(tableName, &list); MainFrame->GetTableIndices(tableName, &list); MainFrame->GetTableTriggers(tableName, &list); MainFrame->CheckGPKG(tableName, &list); col = list.GetFirstColumn(); while (col) { int icon; if (col->IsPrimaryKey() == true) icon = 2; else { if (col->IsGeometry() == true || col->IsGPKGGeometry() == true) { if (col->IsGeometryIndex() == true) icon = 7; else if (col->IsMbrCache() == true) icon = 11; else icon = 6; } else icon = 3; } columnInfo = col->GetName(); item2 = AppendItem(item, columnInfo, icon); if (virtualTable == true) { if (col->IsGeometry() == true) { SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIRTUAL_GEOMETRY, tableName, col->GetName()))); } else if (col->IsGPKGGeometry() == true) { SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIRTUAL_GPKG_GEOMETRY, tableName, col->GetName()))); } else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIRTUAL_COLUMN, tableName, col->GetName()))); } else { if (col->IsGeometry() == true) { if (col->IsGeometryIndex() == true) SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_GEOMETRY_INDEX, tableName, col->GetName()))); else if (col->IsMbrCache() == true) SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_GEOMETRY_CACHED, tableName, col->GetName()))); else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_GEOMETRY, tableName, col->GetName()))); } else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_COLUMN, tableName, col->GetName()))); } col = col->GetNext(); } // setting up Primary Key bool ok_pk = false; idx = list.GetFirstIndex(); while (idx) { indexInfo = idx->GetName(); if (idx->ContainsOnlyPrimaryKeyColumns(MainFrame->GetSqlite(), indexInfo, list.GetFirstColumn()) == true) { if (indexInfo.StartsWith(wxT("sqlite_autoindex_"))) { item2 = AppendItem(item, wxT("PrimaryKey"), 19); MainFrame->GetPrimaryKeyFields(indexInfo, item2); ok_pk = true; break; } } idx = idx->GetNext(); } if (ok_pk == false) { col = list.GetFirstColumn(); while (col) { if (col->IsPrimaryKey() == true) { ok_pk = true; break; } col = col->GetNext(); } if (ok_pk == true) { item2 = AppendItem(item, wxT("PrimaryKey"), 19); col = list.GetFirstColumn(); while (col) { if (col->IsPrimaryKey() == true) { AppendItem(item2, col->GetName(), 2); break; } col = col->GetNext(); } } } // setting up Foreign Keys MainFrame->GetForeignKeys(tableName, item); idx = list.GetFirstIndex(); while (idx) { // setting up Indices indexInfo = idx->GetName(); if (indexInfo.StartsWith(wxT("sqlite_autoindex_")) == true) { idx = idx->GetNext(); continue; } item2 = AppendItem(item, indexInfo, 4); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_INDEX, idx->GetName()))); MainFrame->GetIndexFields(indexInfo, item2); idx = idx->GetNext(); } trgr = list.GetFirstTrigger(); while (trgr) { // setting up Triggers triggerInfo = trgr->GetName(); item2 = AppendItem(item, triggerInfo, 5); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_TRIGGER, trgr->GetName()))); trgr = trgr->GetNext(); } } void MyTableTree::AddView(wxString & viewName, bool geometry, bool tmp) { // // appends a view to the TREE list // wxTreeItemId item; wxTreeItemData *data; int icon = 9; if (tmp == true) icon = 15; wxTreeItemId rootNode = GetRootNode(viewName); data = (wxTreeItemData *) (new MyObject(MY_VIEW, viewName, tmp)); item = AppendItem(rootNode, viewName, icon, -1, data); if (geometry == true) SetItemImage(item, 12); AppendItem(item, wxT("placeholder"), 0); } void MyTableTree::ExpandView(wxTreeItemId & item) { // // expands a TreeItem of the View Type // MyViewInfo list; MyColumnInfo *col; MyTriggerInfo *trgr; wxTreeItemId item2; wxString columnInfo; wxString triggerInfo; int icon = 9; MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; wxString viewName = obj->GetName(); MainFrame->GetViewColumns(viewName, &list); MainFrame->GetViewTriggers(viewName, &list); col = list.GetFirst(); while (col) { columnInfo = col->GetName(); if (col->IsGeometry() == true) { if (col->IsGeometryIndex() == true) icon = 7; else if (col->IsMbrCache() == true) icon = 11; else icon = 6; } else icon = 3; item2 = AppendItem(item, columnInfo, icon); if (col->IsGeometry() == true) { if (col->IsGeometryIndex() == true) SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIEW_GEOMETRY_INDEX, viewName, col->GetName()))); else if (col->IsMbrCache() == true) SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIEW_GEOMETRY_CACHED, viewName, col->GetName()))); else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIEW_GEOMETRY, viewName, col->GetName()))); } else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIEW_COLUMN, viewName, col->GetName()))); col = col->GetNext(); } trgr = list.GetFirstTrigger(); while (trgr) { // setting up Triggers triggerInfo = trgr->GetName(); item2 = AppendItem(item, triggerInfo, 5); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_TRIGGER, trgr->GetName()))); trgr = trgr->GetNext(); } } void MyTableTree::AddTable(wxString & dbAlias, wxString & tableName, bool virtualTable, bool geometry, RootNodes * nodes) { // // appends a table to the TREE list [ATTACHED DB] // wxTreeItemId item; wxTreeItemId item2; wxTreeItemData *data; bool isCoverage = false; bool isTileData = false; int icon = 1; if (virtualTable == true) icon = 8; if (geometry == true) { if (virtualTable == false) icon = 10; else icon = 13; } wxTreeItemId rootNode = GetAltRootNode(tableName, nodes, &isCoverage, &isTileData); if (isTileData == true) icon = 23; if (virtualTable == true) data = (wxTreeItemData *) (new MyObject(MY_VTABLE, true, dbAlias, tableName)); else if (isTileData == true) data = (wxTreeItemData *) (new MyObject(MY_TILE_DATA, true, dbAlias, tableName)); else data = (wxTreeItemData *) (new MyObject(MY_TABLE, true, dbAlias, tableName, isCoverage)); item = AppendItem(rootNode, tableName, icon, -1, data); AppendItem(item, wxT("placeholder"), 0); } void MyTableTree::ExpandAttachedTable(wxTreeItemId & item) { // // expands a TreeItem of the TABLE type (ATTACHED DB) // MyTableInfo list; MyColumnInfo *col; MyIndexInfo *idx; MyTriggerInfo *trgr; wxTreeItemId item2; wxString columnInfo; wxString indexInfo; wxString triggerInfo; MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; wxString tableName = obj->GetName(); wxString dbAlias = obj->GetDbAlias(); bool virtualTable = false; if (obj->GetType() == MY_VTABLE) virtualTable = true; MainFrame->GetTableColumns(dbAlias, tableName, &list); MainFrame->GetTableIndices(dbAlias, tableName, &list); MainFrame->GetTableTriggers(dbAlias, tableName, &list); col = list.GetFirstColumn(); while (col) { int icon; if (col->IsPrimaryKey() == true) icon = 2; else { if (col->IsGeometry() == true || col->IsGPKGGeometry() == true) { if (col->IsGeometryIndex() == true) icon = 7; else if (col->IsMbrCache() == true) icon = 11; else icon = 6; } else icon = 3; } columnInfo = col->GetName(); item2 = AppendItem(item, columnInfo, icon); if (virtualTable == true) { if (col->IsGeometry() == true) { SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIRTUAL_GEOMETRY, tableName, col->GetName()))); } else if (col->IsGPKGGeometry() == true) { SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIRTUAL_GPKG_GEOMETRY, tableName, col->GetName()))); } else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIRTUAL_COLUMN, tableName, col->GetName()))); } else { if (col->IsGeometry() == true) { if (col->IsGeometryIndex() == true) SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_GEOMETRY_INDEX, tableName, col->GetName()))); else if (col->IsMbrCache() == true) SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_GEOMETRY_CACHED, tableName, col->GetName()))); else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_GEOMETRY, tableName, col->GetName()))); } else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_COLUMN, tableName, col->GetName()))); } col = col->GetNext(); } // setting up Primary Key bool ok_pk = false; idx = list.GetFirstIndex(); while (idx) { indexInfo = idx->GetName(); if (indexInfo.StartsWith(wxT("sqlite_autoindex_")) == true) { item2 = AppendItem(item, wxT("PrimaryKey"), 19); MainFrame->GetPrimaryKeyFields(dbAlias, indexInfo, item2); ok_pk = true; break; } idx = idx->GetNext(); } if (ok_pk == false) { col = list.GetFirstColumn(); while (col) { if (col->IsPrimaryKey() == true) { ok_pk = true; break; } col = col->GetNext(); } if (ok_pk == true) { item2 = AppendItem(item, wxT("PrimaryKey"), 19); col = list.GetFirstColumn(); while (col) { if (col->IsPrimaryKey() == true) { AppendItem(item2, col->GetName(), 2); break; } col = col->GetNext(); } } } // setting up Foreign Keys MainFrame->GetForeignKeys(dbAlias, tableName, item); idx = list.GetFirstIndex(); while (idx) { // setting up Indices indexInfo = idx->GetName(); if (indexInfo.StartsWith(wxT("sqlite_autoindex_")) == true) { idx = idx->GetNext(); continue; } item2 = AppendItem(item, indexInfo, 4); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_INDEX, idx->GetName()))); MainFrame->GetIndexFields(dbAlias, indexInfo, item2); idx = idx->GetNext(); } trgr = list.GetFirstTrigger(); while (trgr) { // setting up Triggers triggerInfo = trgr->GetName(); item2 = AppendItem(item, triggerInfo, 5); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_TRIGGER, trgr->GetName()))); trgr = trgr->GetNext(); } } void MyTableTree::AddView(wxString & dbAlias, wxString & viewName, bool geometry, RootNodes * nodes) { // // appends a view to the TREE list [ATTACHED DB] // wxTreeItemId item; wxTreeItemId item2; wxTreeItemData *data; int icon = 9; if (geometry == true) icon = 12; wxTreeItemId rootNode = GetAltRootNode(viewName, nodes); data = (wxTreeItemData *) (new MyObject(MY_VIEW, true, dbAlias, viewName)); item = AppendItem(rootNode, viewName, icon, -1, data); AppendItem(item, wxT("placeholder"), 0); } void MyTableTree::ExpandAttachedView(wxTreeItemId & item) { // // expands a TreeItem of the VIEW type (ATTACHED DB) // MyViewInfo list; MyColumnInfo *col; MyTriggerInfo *trgr; wxTreeItemId item2; wxString columnInfo; wxString triggerInfo; MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; wxString viewName = obj->GetName(); wxString dbAlias = obj->GetDbAlias(); MainFrame->GetViewColumns(dbAlias, viewName, &list); MainFrame->GetViewTriggers(dbAlias, viewName, &list); col = list.GetFirst(); while (col) { int icon; columnInfo = col->GetName(); if (col->IsGeometry() == true) { if (col->IsGeometryIndex() == true) icon = 7; else if (col->IsMbrCache() == true) icon = 11; else icon = 6; } else icon = 3; item2 = AppendItem(item, columnInfo, icon); if (col->IsGeometry() == true) { if (col->IsGeometryIndex() == true) SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIEW_GEOMETRY_INDEX, viewName, col->GetName()))); else if (col->IsMbrCache() == true) SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIEW_GEOMETRY_CACHED, viewName, col->GetName()))); else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIEW_GEOMETRY, viewName, col->GetName()))); } else SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_VIEW_COLUMN, viewName, col->GetName()))); col = col->GetNext(); } trgr = list.GetFirstTrigger(); while (trgr) { // setting up Triggers triggerInfo = trgr->GetName(); item2 = AppendItem(item, triggerInfo, 5); SetItemData(item2, (wxTreeItemData *) (new MyObject(MY_TRIGGER, trgr->GetName()))); trgr = trgr->GetNext(); } } void MyTableTree::OnSelChanged(wxTreeEvent & event) { // // selecting some node [mouse action] // wxTreeItemId item = event.GetItem(); if (item == Root || item == RootUserData || item == RootTopologies || item == RootRasterCoverages || item == RootVectorCoverages || item == RootStyling || item == RootIsoMetadata || item == RootMetadata || item == RootInternal || item == RootSpatialIndex) return; MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) return; CurrentItem = item; } void MyTableTree::OnRightClick(wxTreeEvent & event) { // // right click on some node [mouse action] // wxMenu menu; wxMenuItem *menuItem; bool table = false; bool canEdit = false; bool view = false; bool column = false; bool geometry = false; bool geometry_index = false; bool geometry_cached = false; bool view_column = false; bool view_geometry = false; bool virtual_column = false; bool virtual_geometry = false; bool virtual_gpkg_geometry = false; bool index = false; bool trigger = false; bool attached_db = false; bool metadata = MainFrame->CheckMetadata(); if (MainFrame->IsConnected() == false) return; wxTreeItemId item = event.GetItem(); SelectItem(item); wxPoint pt = event.GetPoint(); if (item == RootRasterCoverages) { CurrentItem = wxTreeItemId(); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); #ifndef OMIT_RL2EXTRA // only if RasterLite2 extended support is enabled menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_CreateRasterCoverage, wxT("Create New &Raster Coverage")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_UpdateRasterExtentAll, wxT("Update Raster &Coverages Extent")); menu.Append(menuItem); #endif // end OMIT_RL2EXTRA conditional PopupMenu(&menu, pt); return; } if (item == RootVectorCoverages) { CurrentItem = wxTreeItemId(); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); #ifndef OMIT_RL2EXTRA // only if RasterLite2 extended support is enabled menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_VectorRegister, wxT("Register New &Vector Coverage")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_UpdateVectorExtentAll, wxT("Update Vector &Coverages Extent")); menu.Append(menuItem); #endif // end OMIT_RL2EXTRA conditional PopupMenu(&menu, pt); return; } if (item == RootStyling) { CurrentItem = wxTreeItemId(); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); #ifndef OMIT_RL2EXTRA // only if RasterLite2 extended support is enabled wxMenu *externalMenu = new wxMenu(); menuItem = new wxMenuItem(externalMenu, Tree_RegisterExternalGraphic, wxT("&Register New External Graphic")); externalMenu->Append(menuItem); if (MainFrame->IsSecurityLevelRelaxed() != true) menuItem->Enable(false); menuItem = new wxMenuItem(externalMenu, Tree_UnregisterExternalGraphic, wxT("&Unregister External Graphic")); externalMenu->Append(menuItem); menu.AppendSubMenu(externalMenu, wxT("External &Graphics")); wxMenu *fontMenu = new wxMenu(); menuItem = new wxMenuItem(fontMenu, Tree_RegisterTextFont, wxT("&Register New Text Font")); fontMenu->Append(menuItem); if (MainFrame->IsSecurityLevelRelaxed() != true) menuItem->Enable(false); menuItem = new wxMenuItem(fontMenu, Tree_UnregisterTextFont, wxT("&Unregister Text Font")); fontMenu->Append(menuItem); menu.AppendSubMenu(fontMenu, wxT("Text &Fonts")); wxMenu *styleMenu = new wxMenu(); wxMenu *rasterMenu = new wxMenu(); menuItem = new wxMenuItem(rasterMenu, Tree_NewRasterStyle, wxT("Add New SLD/SE &Raster Style")); rasterMenu->Append(menuItem); if (MainFrame->IsSecurityLevelRelaxed() != true) menuItem->Enable(false); menuItem = new wxMenuItem(rasterMenu, Tree_ReloadRasterStyle, wxT("Reload SLD/SE Raster &Style")); rasterMenu->Append(menuItem); if (MainFrame->IsSecurityLevelRelaxed() != true) menuItem->Enable(false); menuItem = new wxMenuItem(rasterMenu, Tree_UnregisterRasterStyle, wxT("&Unregister SLD/SE Raster Style")); rasterMenu->Append(menuItem); styleMenu->AppendSubMenu(rasterMenu, wxT("SLD/SE &Raster Styles")); styleMenu->AppendSeparator(); wxMenu *vectorMenu = new wxMenu(); menuItem = new wxMenuItem(vectorMenu, Tree_NewVectorStyle, wxT("Add New SLD/SE &Vector Style")); vectorMenu->Append(menuItem); if (MainFrame->IsSecurityLevelRelaxed() != true) menuItem->Enable(false); menuItem = new wxMenuItem(vectorMenu, Tree_ReloadVectorStyle, wxT("Reload SLD/SE Vector &Style")); vectorMenu->Append(menuItem); if (MainFrame->IsSecurityLevelRelaxed() != true) menuItem->Enable(false); menuItem = new wxMenuItem(vectorMenu, Tree_UnregisterVectorStyle, wxT("&Unregister SLD/SE Vector Style")); vectorMenu->Append(menuItem); styleMenu->AppendSubMenu(vectorMenu, wxT("SLD/SE &Vector Styles")); menu.AppendSubMenu(styleMenu, wxT("&SLD/SE &Styles")); wxMenu *toolsMenu = new wxMenu(); wxMenu *rasterSymbolizerMenu = new wxMenu(); menuItem = new wxMenuItem(rasterSymbolizerMenu, Tree_RasterSymbolizerContrast, wxT("&Contrast Enhancement")); rasterSymbolizerMenu->Append(menuItem); menuItem = new wxMenuItem(rasterSymbolizerMenu, Tree_RasterSymbolizerChannelRgb, wxT("Channel Selection [&false-colors]")); rasterSymbolizerMenu->Append(menuItem); menuItem = new wxMenuItem(rasterSymbolizerMenu, Tree_RasterSymbolizerChannelGray, wxT("Channel Selection [single &gray band]")); rasterSymbolizerMenu->Append(menuItem); menuItem = new wxMenuItem(rasterSymbolizerMenu, Tree_RasterSymbolizerCategorize, wxT("Color Map: &Categorize")); rasterSymbolizerMenu->Append(menuItem); menuItem = new wxMenuItem(rasterSymbolizerMenu, Tree_RasterSymbolizerInterpolate, wxT("Color Map: &Interpolate")); rasterSymbolizerMenu->Append(menuItem); menuItem = new wxMenuItem(rasterSymbolizerMenu, Tree_RasterSymbolizerShadedRelief, wxT("Shaded Relief (&brightness only)")); rasterSymbolizerMenu->Append(menuItem); menuItem = new wxMenuItem(rasterSymbolizerMenu, Tree_RasterSymbolizerMonochrome, wxT("Recolored &Monochrome")); rasterSymbolizerMenu->Append(menuItem); toolsMenu->AppendSubMenu(rasterSymbolizerMenu, wxT("Raster&Symbolizer tools")); toolsMenu->AppendSeparator(); wxMenu *vectorSymbolizerMenu = new wxMenu(); menuItem = new wxMenuItem(vectorSymbolizerMenu, Tree_SimplePointSymbolizer, wxT("Simple &Point Symbolizer")); vectorSymbolizerMenu->Append(menuItem); menuItem = new wxMenuItem(vectorSymbolizerMenu, Tree_SimpleLineSymbolizer, wxT("Simple &Line Symbolizer")); vectorSymbolizerMenu->Append(menuItem); menuItem = new wxMenuItem(vectorSymbolizerMenu, Tree_SimplePolygonSymbolizer, wxT("Simple Pol&ygon Symbolizer")); vectorSymbolizerMenu->Append(menuItem); menuItem = new wxMenuItem(vectorSymbolizerMenu, Tree_SimpleTextSymbolizer, wxT("Simple &Text Symbolizer")); vectorSymbolizerMenu->Append(menuItem); toolsMenu->AppendSubMenu(vectorSymbolizerMenu, wxT("VectorS&ymbolizer tools")); menu.AppendSubMenu(toolsMenu, wxT("SLD/SE &Tools")); menu.AppendSeparator(); #endif // end OMIT_RL2EXTRA conditional menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatisticsAll, wxT("Update Layer &Statistics")); menu.Append(menuItem); PopupMenu(&menu, pt); return; } if (item == Root || item == RootUserData || item == RootTopologies || item == RootIsoMetadata || item == RootMetadata || item == RootInternal || item == RootSpatialIndex) { CurrentItem = wxTreeItemId(); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_QueryViewComposer, wxT("Query/View &Composer")); menuItem->SetBitmap(wxBitmap(composer_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_NewTable, wxT("Create New &Table")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_NewView, wxT("Create New &View")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatisticsAll, wxT("Update Layer &Statistics")); menu.Append(menuItem); PopupMenu(&menu, pt); return; } MyObject *obj = (MyObject *) GetItemData(item); if (obj == NULL) { CurrentItem = wxTreeItemId(); menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); menu.AppendSeparator(); if (GetItemImage(event.GetItem()) == 22) { // this is a Raster Coverage #ifndef OMIT_RL2EXTRA // only if RasterLite2 extended support is enabled menuItem = new wxMenuItem(&menu, Tree_ImportRaster, wxT("Import &Raster file(s)")); menu.Append(menuItem); if (MainFrame->IsSecurityLevelRelaxed() != true) menuItem->Enable(false); menuItem = new wxMenuItem(&menu, Tree_Pyramidize, wxT("Build &Pyramids (by Section)")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_PyramidizeMonolithic, wxT("Build Pyramids (&Monolithic)")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DePyramidize, wxT("&Remove Pyramids")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_RasterDrop, wxT("&Drop Raster Coverage")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateRasterExtent, wxT("Update Raster &Coverage Extent")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_SldSeRasterStyles, wxT("Supported SLD/SE Raster &Styles")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Raster_SRIDs, wxT("&Alternative SRIDs")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Raster_Keywords, wxT("&Keywords")); menu.Append(menuItem); #endif // end OMIT_RL2EXTRA CurrentRasterCoverageName = GetItemText(event.GetItem()); } else if (GetItemImage(event.GetItem()) == 24) { // this is a Vector Coverage #ifndef OMIT_RL2EXTRA // only if RasterLite2 extended support is enabled menuItem = new wxMenuItem(&menu, Tree_VectorUnregister, wxT("&Unregister Vector Coverage")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateVectorExtent, wxT("Update Vector &Coverage Extent")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_SldSeVectorStyles, wxT("Supported SLD/SE Vector &Styles")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Vector_SRIDs, wxT("&Alternative SRIDs")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Vector_Keywords, wxT("&Keywords")); menu.Append(menuItem); #endif // end OMIT_RL2EXTRA CurrentVectorCoverageName = GetItemText(event.GetItem()); } else { menuItem = new wxMenuItem(&menu, Tree_QueryViewComposer, wxT("Query/View &Composer")); menuItem->SetBitmap(wxBitmap(composer_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_NewTable, wxT("Create New &Table")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_NewView, wxT("Create New &View")); menu.Append(menuItem); } PopupMenu(&menu, pt); return; } switch (obj->GetType()) { case MY_VTABLE: case MY_TABLE: case MY_TILE_DATA: table = true; break; case MY_VIEW: view = true; break; case MY_COLUMN: column = true; break; case MY_GEOMETRY: geometry = true; break; case MY_GEOMETRY_INDEX: geometry_index = true; break; case MY_GEOMETRY_CACHED: geometry_cached = true; break; case MY_VIEW_COLUMN: view_column = true; break; case MY_VIEW_GEOMETRY: case MY_VIEW_GEOMETRY_INDEX: case MY_VIEW_GEOMETRY_CACHED: view_geometry = true; break; case MY_VIRTUAL_COLUMN: virtual_column = true; break; case MY_VIRTUAL_GPKG_GEOMETRY: virtual_gpkg_geometry = true; break; case MY_VIRTUAL_GEOMETRY: virtual_geometry = true; break; case MY_INDEX: index = true; break; case MY_TRIGGER: trigger = true; case MY_ATTACHED: attached_db = true; break; }; if (obj->GetType() == MY_TABLE && obj->IsCoverage() == false) canEdit = true; CurrentItem = item; menuItem = new wxMenuItem(&menu, Tree_Refresh, wxT("&Refresh")); menu.Append(menuItem); if (table == true) { if (obj->IsAttached() == true) { wxString title = wxT("Table: ") + obj->GetDbAlias() + wxT(".") + obj->GetName(); menu.SetTitle(title); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Select, wxT("&Query table")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show columns")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_ShowSql, wxT("&Show CREATE statement")); menu.Append(menuItem); } else { wxString title = wxT("Table: ") + obj->GetName(); menu.SetTitle(title); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_QueryViewComposer, wxT("Query/View &Composer")); menuItem->SetBitmap(wxBitmap(composer_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_NewTable, wxT("Create New &Table")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_NewView, wxT("Create New &View")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatistics, wxT("Update Layer &Statistics")); menu.Append(menuItem); menu.AppendSeparator(); if (canEdit == true) { menuItem = new wxMenuItem(&menu, Tree_Edit, wxT("&Edit table rows")); menu.Append(menuItem); } else { if (obj->GetType() == MY_TILE_DATA) menuItem = new wxMenuItem(&menu, Tree_SelectTiles, wxT("&Query table")); else menuItem = new wxMenuItem(&menu, Tree_Select, wxT("&Query table")); menu.Append(menuItem); } menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show columns")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_ShowSql, wxT("&Show CREATE statement")); menu.Append(menuItem); if (obj->IsCoverage() != true) { if (obj->GetType() == MY_VTABLE) { menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Drop, wxT("&Drop table")); menu.Append(menuItem); menu.AppendSeparator(); } else { menu.AppendSeparator(); wxMenu *maintenanceMenu = new wxMenu(); menuItem = new wxMenuItem(maintenanceMenu, Tree_NewColumn, wxT("Add New &Column")); maintenanceMenu->Append(menuItem); menuItem = new wxMenuItem(maintenanceMenu, Tree_Rename, wxT("&Rename table")); maintenanceMenu->Append(menuItem); menuItem = new wxMenuItem(maintenanceMenu, Tree_Drop, wxT("&Drop table")); maintenanceMenu->Append(menuItem); maintenanceMenu->AppendSeparator(); menuItem = new wxMenuItem(maintenanceMenu, Tree_NewIndex, wxT("Create New &Index")); maintenanceMenu->Append(menuItem); menuItem = new wxMenuItem(maintenanceMenu, Tree_NewTrigger, wxT("Create New &Trigger")); maintenanceMenu->Append(menuItem); menu.AppendSubMenu(maintenanceMenu, wxT("&Maintenance")); menu.AppendSeparator(); } } menuItem = new wxMenuItem(&menu, Tree_DumpTxtTab, wxT("Export as &Txt/Tab")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpCsv, wxT("Export as &CSV")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpHtml, wxT("Export as &HTML")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpDif, wxT("Export as &DIF")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpSylk, wxT("Export as &SYLK")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpDbf, wxT("Export as &DBF")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpPostGIS, wxT("SQL Dump for &PostGIS")); menu.Append(menuItem); } } if (view == true) { if (obj->IsAttached() == true) { wxString title = wxT("View: ") + obj->GetDbAlias() + wxT(".") + obj->GetName(); menu.SetTitle(title); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Select, wxT("&Query view")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show columns")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_ShowSql, wxT("&Show CREATE statement")); menu.Append(menuItem); } else { wxString title = wxT("View: ") + obj->GetName(); menu.SetTitle(title); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_QueryViewComposer, wxT("Query/View &Composer")); menuItem->SetBitmap(wxBitmap(composer_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_NewTable, wxT("Create New &Table")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_NewView, wxT("Create New &View")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatistics, wxT("Update Layer &Statistics")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Select, wxT("&Query view")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show columns")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_ShowSql, wxT("&Show CREATE statement")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Drop, wxT("&Drop view")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_DumpTxtTab, wxT("Export as &Txt/Tab")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpCsv, wxT("Export as &CSV")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpHtml, wxT("Export as &HTML")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpDif, wxT("Export as &DIF")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpSylk, wxT("Export as &SYLK")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpDbf, wxT("Export as &DBF")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpPostGIS, wxT("SQL Dump for &PostGIS")); menu.Append(menuItem); } } if (column == true) { wxString title = wxT("Column: ") + obj->GetName() + wxT(".") + obj->GetColumn(); menu.SetTitle(title); menu.AppendSeparator(); if (MainFrame->IsPrimaryKey(obj->GetName(), obj->GetColumn()) == false) { menuItem = new wxMenuItem(&menu, Tree_DropColumn, wxT("&Drop Column")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_RenameColumn, wxT("&Rename Column")); menu.Append(menuItem); menu.AppendSeparator(); } menuItem = new wxMenuItem(&menu, Tree_CheckGeometry, wxT("&Check geometries")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_MapPreview, wxT("&Map Preview")); menuItem->SetBitmap(wxBitmap(map_preview_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Extent, wxT("&Extent")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatistics, wxT("Update Layer &Statistics")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_SetSrid, wxT("&Set SRID")); menu.Append(menuItem); if (metadata == true) { menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Recover, wxT("&Recover geometry column")); menu.Append(menuItem); } menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_ColumnStats, wxT("&Statistic snapshot")); menuItem->SetBitmap(wxBitmap(statistics_xpm)); menu.Append(menuItem); } if (view_column == true) { wxString title = wxT("Column: ") + obj->GetName() + wxT(".") + obj->GetColumn(); menu.SetTitle(title); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_ColumnStats, wxT("&Statistic snapshot")); menuItem->SetBitmap(wxBitmap(statistics_xpm)); menu.Append(menuItem); } if (virtual_column == true) { wxString title = wxT("Column: ") + obj->GetName() + wxT(".") + obj->GetColumn(); menu.SetTitle(title); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_ColumnStats, wxT("&Statistic snapshot")); menuItem->SetBitmap(wxBitmap(statistics_xpm)); menu.Append(menuItem); } if (geometry == true) { wxString title = wxT("Column: ") + obj->GetName() + wxT(".") + obj->GetColumn(); menu.SetTitle(title); menuItem = new wxMenuItem(&menu, Tree_DropColumn, wxT("&Drop Column")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_RenameColumn, wxT("&Rename Column")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show Spatial Metadata")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_CheckGeom, wxT("&LWGEOM Check geometries")); menuItem->SetBitmap(wxBitmap(checkgeom_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_SaneGeom, wxT("&LWGEOM Sanitize geometries")); menuItem->SetBitmap(wxBitmap(sanegeom_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_GisLayerAuth, wxT("&GIS layer authorizations")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_CheckGeometry, wxT("&Check geometries")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Extent, wxT("&Extent")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatistics, wxT("Update Layer &Statistics")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_SpatialIndex, wxT("&Build Spatial Index")); menuItem->SetBitmap(wxBitmap(spatialidx_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_MbrCache, wxT("Build &MBR cache")); menuItem->SetBitmap(wxBitmap(mbrcache_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_RebuildTriggers, wxT("Rebuild Geometry &Triggers")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_DumpShp, wxT("Export as &Shapefile")); menuItem->SetBitmap(wxBitmap(dumpshp_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpKml, wxT("Export as &KML")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_ElementaryGeoms, wxT("&separating elementary Geometries")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MalformedGeometries, wxT("&Malformed geometries")); menuItem->SetBitmap(wxBitmap(malformed_geoms_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_RepairPolygons, wxT("&Repair Polygons")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapPreview, wxT("&Map Preview")); menuItem->SetBitmap(wxBitmap(map_preview_xpm)); menu.Append(menuItem); } if (geometry_index == true) { wxString title = wxT("Column: ") + obj->GetName() + wxT(".") + obj->GetColumn(); menu.SetTitle(title); menuItem = new wxMenuItem(&menu, Tree_DropColumn, wxT("&Drop Column")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_RenameColumn, wxT("&Rename Column")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show Spatial Metadata")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_GisLayerAuth, wxT("&GIS layer authorizations")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_CheckGeom, wxT("&LWGEOM Check geometries")); menuItem->SetBitmap(wxBitmap(checkgeom_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_SaneGeom, wxT("&LWGEOM Sanitize geometries")); menuItem->SetBitmap(wxBitmap(sanegeom_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_CheckGeometry, wxT("&Check geometries")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Extent, wxT("&Extent")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatistics, wxT("Update Layer &Statistics")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_SpatialIndex, wxT("&Remove Spatial Index")); menuItem->SetBitmap(wxBitmap(kill_spindex_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_CheckSpatialIndex, wxT("&Check Spatial Index")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_RecoverSpatialIndex, wxT("&Recover Spatial Index")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_RebuildTriggers, wxT("Rebuild Geometry &Triggers")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_DumpShp, wxT("Export as &Shapefile")); menuItem->SetBitmap(wxBitmap(dumpshp_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpKml, wxT("Export as &KML")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_ElementaryGeoms, wxT("&separating elementary Geometries")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MalformedGeometries, wxT("&Malformed geometries")); menuItem->SetBitmap(wxBitmap(malformed_geoms_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_RepairPolygons, wxT("&Repair Polygons")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapPreview, wxT("&Map Preview")); menuItem->SetBitmap(wxBitmap(map_preview_xpm)); menu.Append(menuItem); } if (geometry_cached == true) { wxString title = wxT("Column: ") + obj->GetName() + wxT(".") + obj->GetColumn(); menu.SetTitle(title); menuItem = new wxMenuItem(&menu, Tree_DropColumn, wxT("&Drop Column")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_RenameColumn, wxT("&Rename Column")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show Spatial Metadata")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_GisLayerAuth, wxT("&GIS layer authorizations")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_CheckGeom, wxT("&LWGEOM Check geometries")); menuItem->SetBitmap(wxBitmap(checkgeom_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_SaneGeom, wxT("&LWGEOM Sanitize geometries")); menuItem->SetBitmap(wxBitmap(sanegeom_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_CheckGeometry, wxT("&Check geometries")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Extent, wxT("&Extent")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatistics, wxT("Update Layer &Statistics")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MbrCache, wxT("&Remove MBR cache")); menuItem->SetBitmap(wxBitmap(kill_spindex_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_RebuildTriggers, wxT("Rebuild Geometry &Triggers")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_DumpShp, wxT("Export as &Shapefile")); menuItem->SetBitmap(wxBitmap(dumpshp_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpKml, wxT("Export as &KML")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_ElementaryGeoms, wxT("&separating elementary Geometries")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MalformedGeometries, wxT("&Malformed geometries")); menuItem->SetBitmap(wxBitmap(malformed_geoms_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_RepairPolygons, wxT("&Repair Polygons")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapPreview, wxT("&Map Preview")); menuItem->SetBitmap(wxBitmap(map_preview_xpm)); menu.Append(menuItem); } if (view_geometry == true) { wxString title = wxT("Column: ") + obj->GetName() + wxT(".") + obj->GetColumn(); menu.SetTitle(title); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show Spatial Metadata")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_GisLayerAuth, wxT("&GIS layer authorizations")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Extent, wxT("&Extent")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatistics, wxT("Update Layer &Statistics")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_DumpShp, wxT("Export as &Shapefile")); menuItem->SetBitmap(wxBitmap(dumpshp_xpm)); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_DumpKml, wxT("Export as &KML")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_ElementaryGeoms, wxT("&separating elementary Geometries")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MalformedGeometries, wxT("&Malformed geometries")); menuItem->SetBitmap(wxBitmap(malformed_geoms_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapPreview, wxT("&Map Preview")); menuItem->SetBitmap(wxBitmap(map_preview_xpm)); menu.Append(menuItem); } if (virtual_geometry == true) { wxString title = wxT("Column: ") + obj->GetName() + wxT(".") + obj->GetColumn(); menu.SetTitle(title); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show Spatial Metadata")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_GisLayerAuth, wxT("&GIS layer authorizations")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_Extent, wxT("&Extent")); menu.Append(menuItem); menuItem = new wxMenuItem(&menu, Tree_UpdateLayerStatistics, wxT("Update Layer &Statistics")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_DumpKml, wxT("Export as &KML")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_ElementaryGeoms, wxT("&separating elementary Geometries")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MalformedGeometries, wxT("&Malformed geometries")); menuItem->SetBitmap(wxBitmap(malformed_geoms_xpm)); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_MapPreview, wxT("&Map Preview")); menuItem->SetBitmap(wxBitmap(map_preview_xpm)); menu.Append(menuItem); } if (virtual_gpkg_geometry == true) { wxString title = wxT("Column: ") + obj->GetName() + wxT(".") + obj->GetColumn(); menu.SetTitle(title); menuItem = new wxMenuItem(&menu, Tree_MapPreview, wxT("&Map Preview")); menuItem->SetBitmap(wxBitmap(map_preview_xpm)); menu.Append(menuItem); } if (index == true) { wxString title = wxT("Index: ") + obj->GetName(); menu.SetTitle(title); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show index")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Drop, wxT("&Drop index")); menu.Append(menuItem); } if (trigger == true) { wxString title = wxT("Trigger: ") + obj->GetName(); menu.SetTitle(title); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Show, wxT("&Show trigger")); menu.Append(menuItem); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Drop, wxT("&Drop trigger")); menu.Append(menuItem); } if (attached_db == true) { wxString title = wxT("Attached DB: ") + obj->GetName(); menu.SetTitle(title); menu.AppendSeparator(); menuItem = new wxMenuItem(&menu, Tree_Detach, wxT("&Detach Database")); menu.Append(menuItem); } PopupMenu(&menu, pt); } void MyTableTree::OnCmdQueryViewComposer(wxCommandEvent & WXUNUSED(event)) { // // menu event - query/view composer invoked // MainFrame->QueryViewComposer(); } void MyTableTree::OnCmdNewTable(wxCommandEvent & WXUNUSED(event)) { // // menu event - new table creation required // wxString sql; sql = wxT("CREATE TABLE ...table-name... (\n"); sql += wxT("...column1,\n...column2,\n...columnN)"); MainFrame->SetSql(sql, false); } void MyTableTree::OnCmdNewView(wxCommandEvent & WXUNUSED(event)) { // // menu event - new view creation required // wxString sql; sql = wxT("CREATE VIEW ...view-name... AS\n"); sql += wxT("SELECT ...sql-select-statement..."); MainFrame->SetSql(sql, false); } void MyTableTree::OnCmdNewIndex(wxCommandEvent & WXUNUSED(event)) { // // menu event - new index creation required // wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_TABLE) { sql = wxT("CREATE [ UNIQUE ] INDEX ...index-name...\nON "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\n(\n...column1, column2, columnN...\n)"); MainFrame->SetSql(sql, false); } } void MyTableTree::OnCmdNewTrigger(wxCommandEvent & WXUNUSED(event)) { // // menu event - new trigger creation required // wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_TABLE) { sql = wxT("CREATE TRIGGER ...trigger-name...\n[ BEFORE | AFTER ]\n"); sql += wxT("[ INSERT | UPDATE | DELETE ]\nON "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\n...sql-statement..."); MainFrame->SetSql(sql, false); } } void MyTableTree::OnCmdNewColumn(wxCommandEvent & WXUNUSED(event)) { // // menu event - new column creation required // wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_TABLE) { sql = wxT("ALTER TABLE "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\nADD COLUMN ...column-name column-type..."); MainFrame->SetSql(sql, false); } } void MyTableTree::OnCmdSelect(wxCommandEvent & WXUNUSED(event)) { // // menu event - examining table rows required // wxString sql; wxString dummy; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; sql = wxT("SELECT * FROM "); if (obj->IsAttached() == true) sql += obj->GetDbAlias() + wxT("."); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); MainFrame->SetSql(sql, true, false, dummy, true); } void MyTableTree::OnCmdSelectTiles(wxCommandEvent & WXUNUSED(event)) { // // menu event - examining table rows required // wxString tile_data_table; wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_TILE_DATA) { wxString table = obj->GetName(); table.EndsWith(wxT("_tile_data"), &tile_data_table); } sql = wxT("SELECT * FROM "); if (obj->IsAttached() == true) sql += obj->GetDbAlias() + wxT("."); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); MainFrame->SetSql(sql, true, true, tile_data_table, true); } void MyTableTree::OnCmdShow(wxCommandEvent & WXUNUSED(event)) { // // menu event - examining full infos required // wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_TABLE || obj->GetType() == MY_VTABLE || obj->GetType() == MY_VIEW) { if (obj->IsAttached() == true) sql = wxT("PRAGMA ") + obj->GetDbAlias() + wxT(".table_info("); else sql = wxT("PRAGMA table_info("); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); } if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED) { sql = wxT("SELECT *\nFROM geom_cols_ref_sys\n"); sql += wxT("WHERE Lower(f_table_name) = Lower('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')\nAND Lower(f_geometry_column) = Lower('"); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); } if (obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED) { sql = wxT("SELECT *\nFROM views_geometry_columns AS a\n"); sql += wxT("JOIN geometry_columns AS b ON ("); sql += wxT("Lower(a.f_table_name) = Lower(b.f_table_name) AND "); sql += wxT("Lower(a.f_geometry_column) = Lower(b.f_geometry_column))\n"); sql += wxT("JOIN spatial_ref_sys USING (srid)\n"); sql += wxT("WHERE Lower(view_name) = Lower('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')\nAND Lower(view_geometry) = Lower('"); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); } if (obj->GetType() == MY_VIRTUAL_GEOMETRY) { sql = wxT("SELECT *\nFROM virts_geometry_columns\n"); sql += wxT("JOIN spatial_ref_sys USING (srid)\n"); sql += wxT("WHERE Lower(virt_name) = Lower('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')\nAND Lower(virt_geometry) = Lower('"); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); } if (obj->GetType() == MY_INDEX) { sql = wxT("PRAGMA index_info("); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); } if (obj->GetType() == MY_TRIGGER) { sql = wxT ("SELECT sql FROM sqlite_master\nWHERE type = 'trigger' AND name = '"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("'"); } if (sql.Len() < 1) return; MainFrame->SetSql(sql, true); } void MyTableTree::OnCmdDrop(wxCommandEvent & WXUNUSED(event)) { // // menu event - dropping some object required // wxString sql; wxString sql2; wxString msg; char *errMsg = NULL; int ret; wxString name; char xprefix[1024]; char xname[1024]; sqlite3 *sqlite = MainFrame->GetSqlite(); MyObject *obj = (MyObject *) GetItemData(CurrentItem); wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); if (obj == NULL) return; if (obj->GetType() == MY_TABLE) { msg = wxT("Do you really intend to drop the Table named: "); msg += obj->GetName(); msg += wxT("\n[and any other related object] ?"); } if (obj->GetType() == MY_VTABLE) { msg = wxT("Do you really intend to drop the VirtualTable named: "); msg += obj->GetName(); msg += wxT(" ?"); } if (obj->GetType() == MY_VIEW) { msg = wxT("Do you really intend to drop the View named: "); msg += obj->GetName(); msg += wxT(" ?"); } if (obj->GetType() == MY_INDEX) { msg = wxT("Do you really intend to drop the Index named: "); msg += obj->GetName(); msg += wxT(" ?"); sql = wxT("DROP INDEX IF EXISTS "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); } if (obj->GetType() == MY_TRIGGER) { msg = wxT("Do you really intend to drop the Trigger named: "); msg += obj->GetName(); msg += wxT(" ?"); sql = wxT("DROP TRIGGER IF EXISTS "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); } wxMessageDialog confirm(this, msg, wxT("Confirming DROP"), wxOK | wxCANCEL | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret != wxID_OK) return; ::wxBeginBusyCursor(); if (obj->GetType() == MY_TABLE) { strcpy(xprefix, obj->GetDbAlias().ToUTF8()); strcpy(xname, obj->GetName().ToUTF8()); if (strlen(xprefix) == 0) gaiaDropTable(sqlite, xname); else gaiaDropTableEx2(sqlite, xprefix, xname, 1); goto done; } if (obj->GetType() == MY_VTABLE) { strcpy(xprefix, obj->GetDbAlias().ToUTF8()); strcpy(xname, obj->GetName().ToUTF8()); if (strlen(xprefix) == 0) gaiaDropTable(sqlite, xname); else gaiaDropTableEx2(sqlite, xprefix, xname, 1); goto done; } if (obj->GetType() == MY_VIEW) { strcpy(xprefix, obj->GetDbAlias().ToUTF8()); strcpy(xname, obj->GetName().ToUTF8()); if (strlen(xprefix) == 0) gaiaDropTable(sqlite, xname); else gaiaDropTableEx2(sqlite, xprefix, xname, 1); goto done; } ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); goto rollback; } done: ::wxEndBusyCursor(); wxMessageBox(wxT("Selected object '") + obj->GetName() + wxT("' was successfully removed"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); // appending a delayed event so to really update the Tree AddPendingEvent(evt); return; rollback: ret = sqlite3_exec(sqlite, "ROLLBACK", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT ("An error occurred\n\na ROLLBACK was automatically performed"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } void MyTableTree::OnCmdRename(wxCommandEvent & WXUNUSED(event)) { // // menu event - table renaming required // wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_TABLE || obj->GetType() == MY_VTABLE) { sql = wxT("ALTER TABLE "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\nRENAME TO ...new-table-name..."); MainFrame->SetSql(sql, false); } } void MyTableTree::OnCmdDetachDB(wxCommandEvent & WXUNUSED(event)) { // // menu event - DETACH DATABASE // wxString sql; int ret; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_ATTACHED) { wxString msg = wxT("Do you really intend to detach this database ?\n\n"); msg += obj->GetName(); msg += wxT(" AS "); msg += obj->GetDbAlias(); wxMessageDialog confirm(this, msg, wxT("Confirming DETACH DATABASE"), wxOK | wxCANCEL | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret != wxID_OK) return; char *errMsg = NULL; sqlite3 *sqlite = MainFrame->GetSqlite(); wxString sql = wxT("DETACH DATABASE ") + obj->GetDbAlias(); ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } // appending a delayed event so to really update the Tree wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } } void MyTableTree::OnCmdRefresh(wxCommandEvent & WXUNUSED(event)) { // // menu event - refreshing the Tree (via deferrend event) // wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } void MyTableTree::OnRefreshDeferred(wxCommandEvent & WXUNUSED(event)) { // // menu event - refreshing the Tree // // safe deferred event processing so to avoid any attempt from wxWidgets // itself to continue using invalid Tree Items (already being destroied) // MainFrame->InitTableTree(); } void MyTableTree::OnCmdRecover(wxCommandEvent & WXUNUSED(event)) { // // menu event - Recover Geometry // char *errMsg = NULL; int ret; wxString sql; int i; char **results; int rows; int columns; int retval = 0; int srid = -1; char dummy[128]; wxString type; wxString dims; RecoverDialog dlg; char xname[1024]; sqlite3 *sqlite = MainFrame->GetSqlite(); MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_COLUMN) { // trying to recover a geometry column if (MainFrame->CheckMetadata() == false) { wxMessageBox(wxT ("Missing Spatial Metadata tables\n\ntry to run the 'init_spatialite.sql' script ..."), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } dlg.Create(MainFrame, obj->GetName(), obj->GetColumn()); ret = dlg.ShowModal(); if (ret == wxID_OK) { srid = dlg.GetSrid(); type = dlg.GetType(); dims = dlg.GetDimension(); ::wxBeginBusyCursor(); ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } sql = wxT("SELECT RecoverGeometryColumn('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("', '"); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sprintf(dummy, "', %d, '", srid); sql += wxString::FromUTF8(dummy); sql += type; sql += wxT("', '"); sql += dims; sql += wxT("')"); ret = sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto rollback; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (results[(i * columns) + 0]) retval = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (!retval) goto rollback; ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT("Geometry column ") + obj->GetName() + wxT(".") + obj->GetColumn() + wxT(" was successfully recovered"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } return; rollback: ret = sqlite3_exec(sqlite, "ROLLBACK", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT ("Geometry column doesn't satisfies required constraints\n\na ROLLBACK was automatically performed"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } void MyTableTree::OnCmdShowSql(wxCommandEvent & WXUNUSED(event)) { // // menu event - Showing CREATE TABLE statement // wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_TABLE || obj->GetType() == MY_VTABLE) { sql = wxT("SELECT sql FROM "); if (obj->IsAttached() == true) sql += obj->GetDbAlias() + wxT("."); if (obj->IsTemporary() == true) sql += wxT("sqlite_temp_master"); else sql += wxT("sqlite_master"); sql += wxT("\nWHERE type = 'table' AND name = '"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("'"); MainFrame->SetSql(sql, true); } if (obj->GetType() == MY_VIEW) { sql = wxT("SELECT sql FROM "); if (obj->IsAttached() == true) sql += obj->GetDbAlias() + wxT("."); if (obj->IsTemporary() == true) sql += wxT("sqlite_temp_master"); else sql += wxT("sqlite_master"); sql += wxT("\nWHERE type = 'view' AND name = '"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("'"); MainFrame->SetSql(sql, true); } } void MyTableTree::OnCmdCheckSpatialIndex(wxCommandEvent & WXUNUSED(event)) { // // menu event - Check Spatial Index for validity // char *errMsg = NULL; int ret; wxString sql; wxString msg; int i; char **results; int rows; int columns; int retval = 0; char xtable[1024]; char xcolumn[1024]; sqlite3 *sqlite = MainFrame->GetSqlite(); MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj->GetType() == MY_GEOMETRY_INDEX) { // checking the Spatial Index ::wxBeginBusyCursor(); strcpy(xtable, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xtable); strcpy(xcolumn, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xcolumn); sql = wxT("SELECT CheckSpatialIndex('"); sql += wxString::FromUTF8(xtable); sql += wxT("', '"); sql += wxString::FromUTF8(xcolumn); sql += wxT("')"); ret = sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (results[(i * columns) + 0]) retval = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); ::wxEndBusyCursor(); if (retval < 0) wxMessageBox(wxT("Spatial Index idx_") + obj->GetName() + wxT("_") + obj->GetColumn() + wxT(" is badly damaged.\n\n") + wxT ("a physical column named \"rowid\" exists shadowing the real ROWID"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else if (retval) wxMessageBox(wxT("Spatial Index idx_") + obj->GetName() + wxT("_") + obj->GetColumn() + wxT(" is valid and consistent"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("Spatial Index idx_") + obj->GetName() + wxT("_") + obj->GetColumn() + wxT(" is invalid and inconsistent\n") + wxT ("Please, recover this Spatial Index as soon as possible"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } } void MyTableTree::OnCmdRecoverSpatialIndex(wxCommandEvent & WXUNUSED(event)) { // // menu event - Recover Spatial Index (rebuilding from scratch) // char *errMsg = NULL; int ret; wxString sql; wxString msg; int i; char **results; int rows; int columns; int retval = 0; char xtable[1024]; char xcolumn[1024]; sqlite3 *sqlite = MainFrame->GetSqlite(); MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj->GetType() == MY_GEOMETRY_INDEX) { // recovering the Spatial Index ::wxBeginBusyCursor(); strcpy(xtable, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xtable); strcpy(xcolumn, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xcolumn); sql = wxT("SELECT RecoverSpatialIndex('"); sql += wxString::FromUTF8(xtable); sql += wxT("', '"); sql += wxString::FromUTF8(xcolumn); sql += wxT("')"); ret = sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (results[(i * columns) + 0]) retval = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); ::wxEndBusyCursor(); if (retval < 0) wxMessageBox(wxT("Spatial Index idx_") + obj->GetName() + wxT("_") + obj->GetColumn() + wxT(" is badly damaged.\n\n") + wxT ("a physical column named \"rowid\" exists shadowing the real ROWID"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); else if (retval) wxMessageBox(wxT("Spatial Index idx_") + obj->GetName() + wxT("_") + obj->GetColumn() + wxT(" was successfully recovered"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("ERROR: unable to recover Spatial Index idx_") + obj->GetName() + wxT("_") + obj->GetColumn(), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } void MyTableTree::OnCmdSpatialIndex(wxCommandEvent & WXUNUSED(event)) { // // menu event - Spatial Index creation-destruction // char *errMsg = NULL; int ret; wxString sql; wxString msg; int i; char **results; int rows; int columns; int retval = 0; wxString name; char xname[1024]; char xtable[1024]; char xcolumn[1024]; sqlite3 *sqlite = MainFrame->GetSqlite(); MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_GEOMETRY) { // creating the Spatial Index ::wxBeginBusyCursor(); ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } strcpy(xtable, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xtable); strcpy(xcolumn, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xcolumn); sql = wxT("SELECT CreateSpatialIndex('"); sql += wxString::FromUTF8(xtable); sql += wxT("', '"); sql += wxString::FromUTF8(xcolumn); sql += wxT("')"); ret = sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto rollback; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (results[(i * columns) + 0]) retval = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (!retval) goto rollback; ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT("Spatial Index idx_") + obj->GetName() + wxT("_") + obj->GetColumn() + wxT(" was successfully created"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); // appending a delayed event so to really update the Tree wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } else if (obj->GetType() == MY_GEOMETRY_INDEX) { // dropping the Spatial Index ::wxBeginBusyCursor(); ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } strcpy(xtable, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xtable); strcpy(xcolumn, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xcolumn); sql = wxT("SELECT DisableSpatialIndex('"); sql += wxString::FromUTF8(xtable); sql += wxT("', '"); sql += wxString::FromUTF8(xcolumn); sql += wxT("')"); msg = wxT("Do you really intend to delete the SpatialIndex\n"); msg += wxT("on column "); msg += obj->GetName(); msg += wxT("."); msg += obj->GetColumn(); msg += wxT(" ?"); wxMessageDialog confirm(this, msg, wxT("Confirming Delete Spatial Index"), wxOK | wxCANCEL | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret != wxID_OK) return; ret = sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto rollback; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (results[(i * columns) + 0]) retval = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (!retval) goto rollback; sql = wxT("DROP TABLE IF EXISTS "); name = wxT("idx_"); name += obj->GetName(); name += wxT("_"); name += obj->GetColumn(); strcpy(xname, name.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT("Spatial Index idx_") + obj->GetName() + wxT("_") + obj->GetColumn() + wxT(" was successfully removed"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); // appending a delayed event so to really update the Tree wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } return; rollback: ret = sqlite3_exec(sqlite, "ROLLBACK", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT ("An error occurred\n\na ROLLBACK was automatically performed"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } void MyTableTree::OnCmdMbrCache(wxCommandEvent & WXUNUSED(event)) { // // menu event - MBR cache creation-destruction // char *errMsg = NULL; int ret; wxString sql; wxString msg; int i; char **results; int rows; int columns; int retval = 0; wxString name; char xname[1024]; char xtable[1024]; char xcolumn[1024]; sqlite3 *sqlite = MainFrame->GetSqlite(); MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_GEOMETRY) { // creating the MBR cache ::wxBeginBusyCursor(); ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } strcpy(xtable, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xtable); strcpy(xcolumn, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xcolumn); sql = wxT("SELECT CreateMbrCache('"); sql += wxString::FromUTF8(xtable); sql += wxT("', '"); sql += wxString::FromUTF8(xcolumn); sql += wxT("')"); ret = sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto rollback; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (results[(i * columns) + 0]) retval = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (!retval) goto rollback; ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT("MBR cache cache_") + obj->GetName() + wxT("_") + obj->GetColumn() + wxT(" was successfully created"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); // appending a delayed event so to really update the Tree wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } else if (obj->GetType() == MY_GEOMETRY_CACHED) { // dropping the MBR cache ::wxBeginBusyCursor(); ret = sqlite3_exec(sqlite, "BEGIN", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } strcpy(xtable, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xtable); strcpy(xcolumn, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xcolumn); sql = wxT("SELECT DisableSpatialIndex('"); sql += wxString::FromUTF8(xtable); sql += wxT("', '"); sql += wxString::FromUTF8(xcolumn); sql += wxT("')"); msg = wxT("Do you really intend to delete the MBR cache\n"); msg += wxT("on column "); msg += obj->GetName(); msg += wxT("."); msg += obj->GetColumn(); msg += wxT(" ?"); wxMessageDialog confirm(this, msg, wxT("Confirming Delete MBR cache"), wxOK | wxCANCEL | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret != wxID_OK) return; ret = sqlite3_get_table(sqlite, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); goto rollback; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (results[(i * columns) + 0]) retval = atoi(results[(i * columns) + 0]); } } sqlite3_free_table(results); if (!retval) goto rollback; sql = wxT("DROP TABLE IF EXISTS "); name = wxT("cache_"); name += obj->GetName(); name += wxT("_"); name += obj->GetColumn(); strcpy(xname, name.ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); ret = sqlite3_exec(sqlite, sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ret = sqlite3_exec(sqlite, "COMMIT", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT("MBR cache cache_") + obj->GetName() + wxT("_") + obj->GetColumn() + wxT(" was successfully removed"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); // appending a delayed event so to really update the Tree wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } return; rollback: ret = sqlite3_exec(sqlite, "ROLLBACK", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT ("An error occurred\n\na ROLLBACK was automatically performed"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } void MyTableTree::OnCmdRebuildTriggers(wxCommandEvent & WXUNUSED(event)) { // // menu event - rebuilding Geometry Triggers // wxString sql; char xtable[1024]; char xcolumn[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED) { strcpy(xtable, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xtable); strcpy(xcolumn, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xcolumn); sql = wxT("SELECT RebuildGeometryTriggers('"); sql += wxString::FromUTF8(xtable); sql += wxT("', '"); sql += wxString::FromUTF8(xcolumn); sql += wxT("')"); MainFrame->SetSql(sql, true); } } void MyTableTree::OnCmdGisLayerAuth(wxCommandEvent & WXUNUSED(event)) { // // menu event - setting the GIS Layer auth // wxString sql; int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; char *value; bool readOnly = false; bool hidden = false; bool is_table = false; GisLayerAuthDialog dlg; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED) { sql = wxT("SELECT b.read_only, b.hidden FROM geometry_columns AS a "); sql += wxT("LEFT JOIN geometry_columns_auth AS b ON "); sql += wxT("(Lower(a.f_table_name) = Lower(b.f_table_name) AND "); sql += wxT("Lower(a.f_geometry_column) = Lower(b.f_geometry_column)) "); sql += wxT("WHERE Lower(a.f_table_name) = Lower('"); sql += obj->GetName(); sql += wxT("') AND Lower(a.f_geometry_column) = Lower('"); sql += obj->GetColumn(); sql += wxT("')"); is_table = true; } if (obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED || obj->GetType() == MY_VIEW_GEOMETRY) { sql = wxT("SELECT 1, b.hidden FROM views_geometry_columns AS a "); sql += wxT("LEFT JOIN views_geometry_columns_auth AS b ON "); sql += wxT("(Lower(a.view_name) = Lower(b.view_name) AND "); sql += wxT("Lower(a.view_geometry) = Lower(b.view_geometry)) "); sql += wxT("WHERE Lower(a.view_name) = Lower('"); sql += obj->GetName(); sql += wxT("') AND Lower(a.view_geometry) = Lower('"); sql += obj->GetColumn(); sql += wxT("')"); } if (obj->GetType() == MY_VIRTUAL_GEOMETRY) { sql = wxT("SELECT 1, b.hidden FROM virts_geometry_columns AS a "); sql += wxT("LEFT JOIN virts_geometry_columns_auth AS b ON "); sql += wxT("(Lower(a.virt_name) = Lower(b.virt_name) AND "); sql += wxT("Lower(a.virt_geometry) = Lower(b.virt_geometry)) "); sql += wxT("WHERE Lower(a.virt_name) = Lower('"); sql += obj->GetName(); sql += wxT("') AND Lower(a.virt_geometry) = Lower('"); sql += obj->GetColumn(); sql += wxT("')"); } if (sql.Len() == 0) return; ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; if (value) { if (atoi(value) == 0) readOnly = false; else readOnly = true; } value = results[(i * columns) + 1]; if (value) { if (atoi(value) == 0) hidden = false; else hidden = true; } } } sqlite3_free_table(results); dlg.Create(MainFrame, obj->GetName(), obj->GetColumn(), readOnly, hidden, is_table); ret = dlg.ShowModal(); if (ret == wxID_OK) { if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED) { // updating the GEOMETRY_COLUMNS_AUTH table sql = wxT("INSERT OR REPLACE INTO geometry_columns_auth "); sql += wxT("(f_table_name, f_geometry_column, read_only, hidden) "); sql += wxT("VALUES (Lower('"); sql += obj->GetName(); sql += wxT("'), Lower('"); sql += obj->GetColumn(); if (dlg.IsHidden() == true) sql += wxT("'), 0, 1)"); else if (dlg.IsReadOnly() == true) sql += wxT("'), 1, 0)"); else sql += wxT("'), 0, 0)"); } if (obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED || obj->GetType() == MY_VIEW_GEOMETRY) { // updating the VIEWS_GEOMETRY_COLUMNS_AUTH table sql = wxT("INSERT OR REPLACE INTO views_geometry_columns_auth "); sql += wxT("(view_name, view_geometry, hidden) "); sql += wxT("VALUES (Lower('"); sql += obj->GetName(); sql += wxT("'), Lower('"); sql += obj->GetColumn(); if (dlg.IsHidden() == true) sql += wxT("'), 1)"); else sql += wxT("'), 0)"); } if (obj->GetType() == MY_VIRTUAL_GEOMETRY) { // updating the VIRTS_GEOMETRY_COLUMNS_AUTH table sql = wxT("INSERT OR REPLACE INTO virts_geometry_columns_auth "); sql += wxT("(virt_name, virt_geometry, hidden) "); sql += wxT("VALUES (Lower('"); sql += obj->GetName(); sql += wxT("'), Lower('"); sql += obj->GetColumn(); if (dlg.IsHidden() == true) sql += wxT("'), 1)"); else sql += wxT("'), 0)"); } ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); } } } void MyTableTree::OnCmdCheckGeometry(wxCommandEvent & WXUNUSED(event)) { // // menu event - checking geometries // wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED) { sql = wxT("SELECT Count(*), GeometryType("); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("), Srid("); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("), CoordDimension("); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")\nFROM "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\nGROUP BY 2, 3, 4"); MainFrame->SetSql(sql, true); } } void MyTableTree::OnCmdExtent(wxCommandEvent & WXUNUSED(event)) { // // menu event - computing Extent // wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED || obj->GetType() == MY_VIRTUAL_COLUMN || obj->GetType() == MY_VIRTUAL_GEOMETRY) { sql = wxT("SELECT Min(MbrMinX("); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")), Min(MbrMinY("); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")), Max(MbrMaxX("); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")), Max(MbrMaxY("); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("))\nFROM "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); MainFrame->SetSql(sql, true); } } void MyTableTree::OnCmdUpdateLayerStatistics(wxCommandEvent & WXUNUSED(event)) { // // menu event - Updating Layer Statistics // wxString sql; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_COLUMN || obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED || obj->GetType() == MY_VIRTUAL_COLUMN || obj->GetType() == MY_VIRTUAL_GEOMETRY) { sql = wxT("SELECT UpdateLayerStatistics('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("', '"); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); MainFrame->SetSql(sql, true); } if (obj->GetType() == MY_VTABLE || obj->GetType() == MY_TABLE || obj->GetType() == MY_VIEW) { sql = wxT("SELECT UpdateLayerStatistics('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); MainFrame->SetSql(sql, true); } } void MyTableTree:: OnCmdUpdateLayerStatisticsAll(wxCommandEvent & WXUNUSED(event)) { // // menu event - Updating Layer Statistics [ALL] // wxString sql = wxT("SELECT UpdateLayerStatistics()"); MainFrame->SetSql(sql, true); } void MyTableTree::OnCmdUpdateRasterExtent(wxCommandEvent & WXUNUSED(event)) { // // menu event - Updating Raster Coverage Extent // wxString coverage = CurrentRasterCoverageName; int pos = CurrentRasterCoverageName.Find('[', true); if (pos != wxNOT_FOUND) coverage = CurrentRasterCoverageName.Left(pos - 1); char *xcov = new char[strlen(coverage.ToUTF8()) + 1]; strcpy(xcov, coverage.ToUTF8()); char *xsql = sqlite3_mprintf("SELECT SE_UpdateRasterCoverageExtent(%Q, 1)", xcov); delete[]xcov; wxString sql = wxString::FromUTF8(xsql); sqlite3_free(xsql); MainFrame->SetSql(sql, true); } void MyTableTree::OnCmdUpdateRasterExtentAll(wxCommandEvent & WXUNUSED(event)) { // // menu event - Updating Raster Coverage Extent [ALL] // wxString sql = wxT("SELECT SE_UpdateRasterCoverageExtent(1)"); MainFrame->SetSql(sql, true); } void MyTableTree::OnCmdUpdateVectorExtent(wxCommandEvent & WXUNUSED(event)) { // // menu event - Updating Vector Coverage Extent // wxString coverage = CurrentVectorCoverageName; int pos = CurrentVectorCoverageName.Find('[', true); if (pos != wxNOT_FOUND) coverage = CurrentVectorCoverageName.Left(pos - 1); char *xcov = new char[strlen(coverage.ToUTF8()) + 1]; strcpy(xcov, coverage.ToUTF8()); char *xsql = sqlite3_mprintf("SELECT SE_UpdateVectorCoverageExtent(%Q, 1)", xcov); delete[]xcov; wxString sql = wxString::FromUTF8(xsql); sqlite3_free(xsql); MainFrame->SetSql(sql, true); } void MyTableTree::OnCmdUpdateVectorExtentAll(wxCommandEvent & WXUNUSED(event)) { // // menu event - Updating Vector Coverage Extent [ALL] // wxString sql = wxT("SELECT SE_UpdateVectorCoverageExtent(1)"); MainFrame->SetSql(sql, true); } void MyTableTree::OnCmdElementaryGeometries(wxCommandEvent & WXUNUSED(event)) { // // menu event - creating a derived table (elementary geometries) // MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED || obj->GetType() == MY_VIRTUAL_GEOMETRY || obj->GetType() == MY_VIRTUAL_GPKG_GEOMETRY) { ElementaryGeomsDialog dlg; dlg.Create(MainFrame, obj->GetName(), obj->GetColumn()); if (dlg.ShowModal() == wxID_OK) { wxString outTable = dlg.GetOutTable(); wxString pKey = dlg.GetPrimaryKey(); wxString multiID = dlg.GetMultiID(); wxString type = dlg.GetType(); int srid = dlg.GetSrid(); wxString coordDims = dlg.GetCoordDims(); bool spIdx = dlg.IsSpatialIndex(); ::wxBeginBusyCursor(); bool ret = MainFrame->DoElementaryGeometries(obj->GetName(), obj->GetColumn(), outTable, pKey, multiID, type, srid, coordDims, spIdx); ::wxEndBusyCursor(); if (ret) { // appending a delayed event so to really update the Tree wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); AddPendingEvent(evt); } } } } void MyTableTree::OnCmdMalformedGeometries(wxCommandEvent & WXUNUSED(event)) { // // menu event - identifying malformed geometries // MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED || obj->GetType() == MY_VIRTUAL_GEOMETRY || obj->GetType() == MY_VIRTUAL_GPKG_GEOMETRY) { bool repair = true; if (obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED || obj->GetType() == MY_VIRTUAL_GEOMETRY) repair = false; MalformedGeomsList *list = MainFrame->FindMalformedGeoms(obj->GetName(), obj->GetColumn(), repair); if (list->GetFirst() == NULL) { delete list; wxString msg = wxT("Any geometry found in "); msg += obj->GetName(); msg += wxT("."); msg += obj->GetColumn(); msg += wxT(" is valid"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); return; } else { MalformedGeomsDialog dlg; dlg.Create(MainFrame, obj->GetName(), obj->GetColumn(), list); dlg.ShowModal(); } } } void MyTableTree::OnCmdRepairPolygons(wxCommandEvent & WXUNUSED(event)) { // // menu event - attempting to repair malformed polygons // MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED) { int count; ::wxBeginBusyCursor(); MainFrame->PreRepairPolygons(obj->GetName(), obj->GetColumn(), &count); if (count == 0) { wxString msg = wxT("No Polygon to be repaired found in "); msg += obj->GetName(); msg += wxT("."); msg += obj->GetColumn(); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); ::wxEndBusyCursor(); return; } MainFrame->RepairPolygons(obj->GetName(), obj->GetColumn(), &count); if (count > 0) { char str[256]; sprintf(str, "%d Geometries were successfully updated", count); wxMessageBox(wxString::FromUTF8(str), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); } } void MyTableTree::OnCmdSetSrid(wxCommandEvent & WXUNUSED(event)) { // // menu event - setting SRID for geometries // SetSridDialog dlg; wxString sql; int srid; int oldSrid; int ret; char dummy[128]; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_COLUMN) { dlg.Create(MainFrame, obj->GetName(), obj->GetColumn()); ret = dlg.ShowModal(); if (ret == wxID_OK) { srid = dlg.GetSrid(); oldSrid = dlg.GetOldSrid(); sql = wxT("UPDATE "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" SET "); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(" = SetSrid("); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sprintf(dummy, ", %d)", srid); sql += wxString::FromUTF8(dummy); sql += wxT("\nWHERE Srid("); strcpy(xname, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sprintf(dummy, ") = %d", oldSrid); sql += wxString::FromUTF8(dummy); MainFrame->SetSql(sql, true); } } } void MyTableTree::OnCmdDumpShp(wxCommandEvent & WXUNUSED(event)) { // // menu event - dumping as Shapefile // int ret; wxString path; wxString lastDir; bool isView = false; int metadata_type = MainFrame->GetMetaDataType(); MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED) isView = true; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || isView == true) { wxFileDialog fileDialog(this, wxT("Dump Shapefile"), wxT(""), wxT("shapefile.shp"), wxT ("Shapefile (*.shp)|*.shp|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { char x_path[1024]; char x_table[1024]; char x_column[1024]; char x_type[1024]; char x_charset[1024]; char err_msg[1024]; int rt; char **results; int rows; int columns; int i; char *errMsg = NULL; *x_type = '\0'; wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); lastDir = file.GetPath(); strcpy(x_path, path.ToUTF8()); strcpy(x_table, obj->GetName().ToUTF8()); strcpy(x_column, obj->GetColumn().ToUTF8()); if (isView == true) { wxString sql; if (metadata_type == METADATA_CURRENT) sql = wxT("SELECT geometry_type FROM views_geometry_columns AS a "); else if (metadata_type == METADATA_LEGACY) sql = wxT("SELECT type FROM views_geometry_columns AS a "); sql += wxT("JOIN geometry_columns AS b ON ("); sql += wxT("Lower(a.f_table_name) = Lower(b.f_table_name) AND "); sql += wxT ("Lower(a.f_geometry_column) = Lower(b.f_geometry_column)) "); sql += wxT("WHERE Lower(view_name) = Lower('"); sql += obj->GetName(); sql += wxT("') AND Lower(view_geometry) = Lower('"); sql += obj->GetColumn(); sql += wxT("')"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("dump shapefile error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (metadata_type == METADATA_LEGACY) strcpy(x_type, results[(i * columns) + 0]); else if (metadata_type == METADATA_CURRENT) { switch (atoi(results[(i * columns) + 0])) { case 0: case 1000: case 2000: case 3000: strcpy(x_type, "GEOMETRY"); break; case 1: case 1001: case 2001: case 3001: strcpy(x_type, "POINT"); break; case 2: case 1002: case 2002: case 3002: strcpy(x_type, "LINESTRING"); break; case 3: case 1003: case 2003: case 3003: strcpy(x_type, "POLYGON"); break; case 4: case 1004: case 2004: case 3004: strcpy(x_type, "MULTIPOINT"); break; case 5: case 1005: case 2005: case 3005: strcpy(x_type, "MULTILINESTRING"); break; case 6: case 1006: case 2006: case 3006: strcpy(x_type, "MULTIPOLYGON"); break; case 7: case 1007: case 2007: case 3007: strcpy(x_type, "GEOMETRYCOLLECTION"); break; }; } } } sqlite3_free_table(results); } else { wxString sql; if (metadata_type == METADATA_CURRENT) sql = wxT ("SELECT geometry_type FROM geometry_columns WHERE Lower(f_table_name) = Lower('"); else if (metadata_type == METADATA_LEGACY) sql = wxT ("SELECT type FROM geometry_columns WHERE Lower(f_table_name) = Lower('"); sql += obj->GetName(); sql += wxT("') AND Lower(f_geometry_column) = Lower('"); sql += obj->GetColumn(); sql += wxT("')"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("dump shapefile error:") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (metadata_type == METADATA_LEGACY) strcpy(x_type, results[(i * columns) + 0]); else if (metadata_type == METADATA_CURRENT) { switch (atoi(results[(i * columns) + 0])) { case 0: case 1000: case 2000: case 3000: strcpy(x_type, "GEOMETRY"); break; case 1: case 1001: case 2001: case 3001: strcpy(x_type, "POINT"); break; case 2: case 1002: case 2002: case 3002: strcpy(x_type, "LINESTRING"); break; case 3: case 1003: case 2003: case 3003: strcpy(x_type, "POLYGON"); break; case 4: case 1004: case 2004: case 3004: strcpy(x_type, "MULTIPOINT"); break; case 5: case 1005: case 2005: case 3005: strcpy(x_type, "MULTILINESTRING"); break; case 6: case 1006: case 2006: case 3006: strcpy(x_type, "MULTIPOLYGON"); break; case 7: case 1007: case 2007: case 3007: strcpy(x_type, "GEOMETRYCOLLECTION"); break; }; } } } sqlite3_free_table(results); } if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); strcpy(x_charset, MainFrame->GetDefaultCharset().ToUTF8()); rt = dump_shapefile(MainFrame->GetSqlite(), x_table, x_column, x_path, x_charset, x_type, 0, &rows, err_msg); ::wxEndBusyCursor(); if (rt) wxMessageBox(wxT("dump shp:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("dump shp error:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { // asking the charset to be used DumpShpDialog dlg; dlg.Create(MainFrame, path, obj->GetName(), obj->GetColumn(), MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); strcpy(x_charset, dlg.GetCharset().ToUTF8()); rt = dump_shapefile(MainFrame->GetSqlite(), x_table, x_column, x_path, x_charset, x_type, 0, &rows, err_msg); ::wxEndBusyCursor(); if (rt) wxMessageBox(wxT("dump shp:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("dump shp error:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } } } } void MyTableTree::OnCmdDumpKml(wxCommandEvent & WXUNUSED(event)) { // // menu event - dumping as KML // int ret; wxString path; wxString lastDir; bool isView = false; bool isVirtual = false; bool isNameConst = false; bool isDescConst = false; wxString Name; wxString Desc; int precision = -1; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_VIEW_GEOMETRY || obj->GetType() == MY_VIEW_GEOMETRY_INDEX || obj->GetType() == MY_VIEW_GEOMETRY_CACHED) isView = true; if (obj->GetType() == MY_VIRTUAL_GEOMETRY) isVirtual = true; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED || isView == true || isVirtual == true) { DumpKmlDialog dlg; dlg.Create(MainFrame, obj->GetName(), obj->GetColumn()); ret = dlg.ShowModal(); if (ret == wxID_OK) { isNameConst = dlg.IsNameConst(); Name = dlg.GetName(); isDescConst = dlg.IsDescConst(); Desc = dlg.GetDesc(); precision = dlg.GetPrecision(); } else return; wxFileDialog fileDialog(this, wxT("Dump KML"), wxT(""), wxT("export_file.kml"), wxT ("KML file (*.kml)|*.kml|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".kml"); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpKml(path, obj->GetName(), obj->GetColumn(), precision, Name, isNameConst, Desc, isDescConst); ::wxEndBusyCursor(); } } } void MyTableTree::OnCmdDumpTxtTab(wxCommandEvent & WXUNUSED(event)) { // // menu event - dumping as TxtTab // int ret; wxString path; wxString lastDir; wxString target; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; wxFileDialog fileDialog(this, wxT("Dump Txt/Tab file"), wxT(""), wxT("table.txt"), wxT("Txt/Tab file (*.txt)|*.txt|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".txt"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpTxtTab(path, obj->GetName(), MainFrame->GetDefaultCharset()); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("TXT / TAB"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpTxtTab(path, obj->GetName(), dlg.GetCharset()); ::wxEndBusyCursor(); } } } } void MyTableTree::OnCmdDumpCsv(wxCommandEvent & WXUNUSED(event)) { // // menu event - dumping as CSV // int ret; wxString path; wxString lastDir; wxString target; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; wxFileDialog fileDialog(this, wxT("Dump CSV file"), wxT(""), wxT("table.csv"), wxT("CSV file (*.csv)|*.csv|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".csv"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpCsv(path, obj->GetName(), MainFrame->GetDefaultCharset()); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("CSV"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpCsv(path, obj->GetName(), dlg.GetCharset()); ::wxEndBusyCursor(); } } } } void MyTableTree::OnCmdDumpHtml(wxCommandEvent & WXUNUSED(event)) { // // menu event - dumping as Html // int ret; wxString path; wxString lastDir; wxString target; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; wxFileDialog fileDialog(this, wxT("Dump HTML file"), wxT(""), wxT("table.html"), wxT ("HTML web page (*.html)|*.html|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".html"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpHtml(path, obj->GetName(), MainFrame->GetSqlitePath(), MainFrame->GetDefaultCharset()); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("HTML"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpHtml(path, obj->GetName(), MainFrame->GetSqlitePath(), dlg.GetCharset()); ::wxEndBusyCursor(); } } } } void MyTableTree::OnCmdDumpDif(wxCommandEvent & WXUNUSED(event)) { // // menu event - dumping as DIF // int ret; wxString path; wxString lastDir; wxString target; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; // asking Decimal Point / Date-Times params DumpSpreadsheetDialog sheet_dlg; char decimal_point; bool date_times; sheet_dlg.Create(MainFrame); ret = sheet_dlg.ShowModal(); if (ret == wxID_OK) { decimal_point = sheet_dlg.GetDecimalPoint(); date_times = sheet_dlg.IsDateTimes(); } else return; wxFileDialog fileDialog(this, wxT("Dump DIF file"), wxT(""), wxT("table.dif"), wxT ("DIF spreadsheet document (*.dif)|*.dif|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".dif"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpDif(path, obj->GetName(), MainFrame->GetDefaultCharset(), decimal_point, date_times); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("DIF spreadsheet"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpDif(path, obj->GetName(), dlg.GetCharset(), decimal_point, date_times); ::wxEndBusyCursor(); } } } } void MyTableTree::OnCmdDumpSylk(wxCommandEvent & WXUNUSED(event)) { // // menu event - dumping as SYLK // int ret; wxString path; wxString lastDir; wxString target; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; // asking Decimal Point / Date-Times params DumpSpreadsheetDialog sheet_dlg; bool date_times; sheet_dlg.Create(MainFrame); ret = sheet_dlg.ShowModal(); if (ret == wxID_OK) date_times = sheet_dlg.IsDateTimes(); else return; wxFileDialog fileDialog(this, wxT("Dump SYLK file"), wxT(""), wxT("table.slk"), wxT ("SYLK spreadsheet document (*.slk)|*.slk|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".slk"); lastDir = file.GetPath(); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpSylk(path, obj->GetName(), MainFrame->GetDefaultCharset(), date_times); ::wxEndBusyCursor(); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("SYLK spreadsheet"); dlg.Create(MainFrame, path, target, MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); MainFrame->DumpSylk(path, obj->GetName(), dlg.GetCharset(), date_times); ::wxEndBusyCursor(); } } } } void MyTableTree::OnCmdDumpDbf(wxCommandEvent & WXUNUSED(event)) { // // menu event - dumping as DBF // int ret; wxString path; wxString lastDir; wxString target; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; wxFileDialog fileDialog(this, wxT("Dump DBF file"), wxT(""), wxT("table.dbf"), wxT ("DBF archive (*.dbf)|*.dbf|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { char x_path[1024]; char x_table[1024]; char x_charset[1024]; char err_msg[1024]; int rt; wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".dbf"); lastDir = file.GetPath(); strcpy(x_path, path.ToUTF8()); strcpy(x_table, obj->GetName().ToUTF8()); if (MainFrame->IsSetAskCharset() == false) { // using the default output charset MainFrame->SetLastDirectory(lastDir); ::wxBeginBusyCursor(); strcpy(x_charset, MainFrame->GetDefaultCharset().ToUTF8()); rt = dump_dbf(MainFrame->GetSqlite(), x_table, x_path, x_charset, err_msg); ::wxEndBusyCursor(); if (rt) wxMessageBox(wxT("dump dbf:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("dump dbf error:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { // asking the charset to be used DumpTxtDialog dlg; target = wxT("DBF archive"); dlg.Create(MainFrame, path, obj->GetName(), MainFrame->GetDefaultCharset()); ret = dlg.ShowModal(); if (ret == wxID_OK) { MainFrame->SetLastDirectory(lastDir); strcpy(x_charset, dlg.GetCharset().ToUTF8()); ::wxBeginBusyCursor(); rt = dump_dbf(MainFrame->GetSqlite(), x_table, x_path, x_charset, err_msg); ::wxEndBusyCursor(); if (rt) wxMessageBox(wxT("dump dbf:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); else wxMessageBox(wxT("dump dbf error:") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } } } } void MyTableTree::OnCmdDumpPostGIS(wxCommandEvent & WXUNUSED(event)) { // // menu event - SQL dump for PostGIS // wxString sql; sqlite3_stmt *stmt; char xname[1024]; wxString lastDir; int ret; DumpPostGISDialog postgis_dlg; bool lowercase; bool create_table; bool spatial_index; wxString schema_name; wxString table_name; int rows = 0; int n_cols; int i; gaiaGeomCollPtr geom; PostGISHelper postgis; wxFileDialog fileDialog(this, wxT("SQL Dump for PostGIS"), wxT(""), wxT("postgis.sql"), wxT ("SQL dump (*.sql)|*.sql|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; // asking PostGIS options postgis_dlg.Create(MainFrame, obj->GetName()); ret = postgis_dlg.ShowModal(); if (ret == wxID_OK) { lowercase = postgis_dlg.IsLowercase(); create_table = postgis_dlg.IsCreateTable(); spatial_index = postgis_dlg.IsSpatialIndex(); schema_name = postgis_dlg.GetSchemaName(); table_name = postgis_dlg.GetTableName(); } else return; // // preparing SQL statement // sql = wxT("SELECT * FROM "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); // // compiling SQL prepared statement // ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql.ToUTF8(), sql.Len(), &stmt, NULL); if (ret != SQLITE_OK) goto sql_error; ::wxBeginBusyCursor(); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { n_cols = sqlite3_column_count(stmt); if (rows == 0) { // setting the column names postgis.Alloc(n_cols); for (i = 0; i < n_cols; i++) postgis.SetName(i, (const char *) sqlite3_column_name(stmt, i)); } rows++; for (i = 0; i < n_cols; i++) { if (sqlite3_column_type(stmt, i) == SQLITE_INTEGER) postgis.Eval(i, sqlite3_column_int64(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_FLOAT) postgis.Eval(i, sqlite3_column_double(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_TEXT) postgis.Eval(i, (const char *) sqlite3_column_text(stmt, i)); else if (sqlite3_column_type(stmt, i) == SQLITE_BLOB) { const void *blob_value = sqlite3_column_blob(stmt, i); int len = sqlite3_column_bytes(stmt, i); geom = gaiaFromSpatiaLiteBlobWkb((unsigned char *) blob_value, len); if (geom) { postgis.Eval(i, geom); gaiaFreeGeomColl(geom); } else postgis.EvalBlob(i); } else postgis.Eval(i); } } else { sqlite3_finalize(stmt); goto sql_error; } } postgis.GetKeys(MainFrame, obj->GetName()); postgis.Prepare(); ::wxEndBusyCursor(); // rewinding the result-set ret = sqlite3_reset(stmt); if (ret != SQLITE_OK) { sqlite3_finalize(stmt); goto sql_error; } lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { wxString path; wxFileName file(fileDialog.GetPath()); path = file.GetPath(); path += file.GetPathSeparator(); path += file.GetName(); path += wxT(".sql"); lastDir = file.GetPath(); char x_path[1024]; strcpy(x_path, path.ToUTF8()); FILE *out = fopen(x_path, "wb"); if (out == NULL) { wxMessageBox(wxT ("PostGIS SQL dump error: unable to create output file"), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); goto stop; } ::wxBeginBusyCursor(); fprintf(out, "--\n-- SQL dump automatically generated by \"spatialite_gui\" [GPLv3]\n"); wxDateTime now = wxDateTime::Now(); fprintf(out, "-- created on: %04d-%02d-%02d %02d:%02d:%02d\n--\n", now.GetYear(), now.GetMonth() + 1, now.GetDay(), now.GetHour(), now.GetMinute(), now.GetSecond()); strcpy(x_path, MainFrame->GetSqlitePath().ToUTF8()); fprintf(out, "-- DB-file origin: %s\n", x_path); fprintf(out, "-- Table origin: %s\n--\n", xname); fprintf(out, "-- intended target is: PostgreSQL + PostGIS\n--\n\n"); if (create_table) { fprintf(out, "CREATE TABLE "); if (schema_name.Len() > 0) { strcpy(xname, schema_name.ToUTF8()); MainFrame->DoubleQuotedSql(xname); fprintf(out, "%s.", xname); } strcpy(xname, table_name.ToUTF8()); MainFrame->DoubleQuotedSql(xname); fprintf(out, "%s (\n", xname); for (i = 0; i < postgis.GetCount(); i++) { if (postgis.IsGeometry(i) == true) { // skipping any Geometry column continue; } if (postgis.GetDataType(i) == postgis.DATA_TYPE_UNDEFINED) { // skipping any invalid column continue; } strcpy(xname, postgis.GetName(i, lowercase).ToUTF8()); MainFrame->DoubleQuotedSql(xname); char data_type[128]; postgis.GetDataType(i, data_type); if (i == 0) fprintf(out, "\t%s %s", xname, data_type); else fprintf(out, ",\n\t%s %s", xname, data_type); } // definining any Primary Key Constraint (if any) PostGISIndex *idx = postgis.GetFirstIndex(); while (idx) { if (idx->IsPrimaryKey() != true) { idx = idx->GetNext(); continue; } if (postgis.IsSingleFieldPrimaryKey() == true) { idx = idx->GetNext(); continue; } fprintf(out, "m\nCONSTRAINT "); strcpy(xname, idx->GetName().ToUTF8()); MyFrame::DoubleQuotedSql(xname); fprintf(out, "%s PRIMARY KEY (", xname); PostGISIndexField *idx_fld = idx->GetFirst(); while (idx_fld) { if (idx_fld == idx->GetFirst()) ; else fprintf(out, ", "); strcpy(xname, idx_fld->GetColumnRef()->GetName().ToUTF8()); MyFrame::DoubleQuotedSql(xname); fprintf(out, "%s", xname); idx_fld = idx_fld->GetNext(); } fprintf(out, ")"); idx = idx->GetNext(); } fprintf(out, ");\n\n"); for (i = 0; i < postgis.GetCount(); i++) { if (postgis.IsGeometry(i) != true) { // skipping any not-Geometry column continue; } fprintf(out, "SELECT AddGeometryColumn("); if (schema_name.Len() > 0) { strcpy(xname, schema_name.ToUTF8()); MyFrame::CleanSqlString(xname); fprintf(out, "'%s', ", xname); } strcpy(xname, table_name.ToUTF8()); MyFrame::CleanSqlString(xname); fprintf(out, "'%s', ", xname); strcpy(xname, postgis.GetName(i, lowercase).ToUTF8()); MyFrame::CleanSqlString(xname); fprintf(out, "'%s', %d, ", xname, postgis.GetSrid(i)); switch (postgis.GetDataType(i)) { case PostGISHelper::DATA_TYPE_POINT: fprintf(out, "'POINT"); break; case PostGISHelper::DATA_TYPE_MULTIPOINT: fprintf(out, "'MULTIPOINT"); break; case PostGISHelper::DATA_TYPE_LINESTRING: fprintf(out, "'LINESTRING"); break; case PostGISHelper::DATA_TYPE_MULTILINESTRING: fprintf(out, "'MULTILINESTRING"); break; case PostGISHelper::DATA_TYPE_POLYGON: fprintf(out, "'POLYGON"); break; case PostGISHelper::DATA_TYPE_MULTIPOLYGON: fprintf(out, "'MULTIPOLYGON"); break; case PostGISHelper::DATA_TYPE_GEOMETRYCOLLECTION: fprintf(out, "'GEOMETRYCOLLECTION"); break; default: fprintf(out, "'GEOMETRY"); break; }; switch (postgis.GetCoordDims(i)) { case GAIA_XY_Z_M: fprintf(out, "', 4"); break; case GAIA_XY_Z: fprintf(out, "', 3"); break; case GAIA_XY_M: fprintf(out, "M', 3"); break; default: fprintf(out, "', 2"); break; } fprintf(out, ");\n"); if (spatial_index) { fprintf(out, "CREATE INDEX "); wxString idx_name = wxT("idx_"); idx_name += table_name; idx_name += wxT("_"); idx_name += postgis.GetName(i, lowercase); strcpy(xname, idx_name.ToUTF8()); MainFrame->DoubleQuotedSql(xname); fprintf(out, "%s ON ", xname); if (schema_name.Len() > 0) { strcpy(xname, schema_name.ToUTF8()); MyFrame::DoubleQuotedSql(xname); fprintf(out, "%s.", xname); } strcpy(xname, table_name.ToUTF8()); MainFrame->DoubleQuotedSql(xname); fprintf(out, "%s USING GIST (", xname); strcpy(xname, postgis.GetName(i, lowercase).ToUTF8()); MainFrame->DoubleQuotedSql(xname); fprintf(out, "%s);\n", xname); } } idx = postgis.GetFirstIndex(); while (idx) { if (idx->IsPrimaryKey() == true) { idx = idx->GetNext(); continue; } if (idx->IsUnique() == true) fprintf(out, "CREATE UNIQUE INDEX "); else fprintf(out, "CREATE INDEX "); strcpy(xname, idx->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); fprintf(out, "%s ON ", xname); if (schema_name.Len() > 0) { strcpy(xname, schema_name.ToUTF8()); MainFrame->DoubleQuotedSql(xname); fprintf(out, "%s.", xname); } strcpy(xname, table_name.ToUTF8()); MainFrame->DoubleQuotedSql(xname); fprintf(out, "%s (", xname); PostGISIndexField *idx_fld = idx->GetFirst(); while (idx_fld) { if (idx_fld != idx->GetFirst()) fprintf(out, ", "); strcpy(xname, idx_fld->GetColumnRef()->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); fprintf(out, "%s", xname); idx_fld = idx_fld->GetNext(); } fprintf(out, ");\n"); idx = idx->GetNext(); } fprintf(out, "\n"); rows = 0; fprintf(out, "BEGIN;\n"); while (1) { ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { if (rows > 0) { if ((rows % 1000) == 0) { // COMMIT and then restarts a new Transaction fprintf(out, "COMMIT;\n\n"); fprintf(out, "-- %d rows\n\nBEGIN;\n", rows); } } rows++; fprintf(out, "INSERT INTO "); if (schema_name.Len() > 0) { strcpy(xname, schema_name.ToUTF8()); MyFrame::DoubleQuotedSql(xname); fprintf(out, "%s.", xname); } strcpy(xname, table_name.ToUTF8()); MyFrame::DoubleQuotedSql(xname); fprintf(out, "%s (", xname); for (i = 0; i < postgis.GetCount(); i++) { if (postgis.GetDataType(i) == postgis.DATA_TYPE_UNDEFINED) { // skipping any invalid column continue; } strcpy(xname, postgis.GetName(i, lowercase).ToUTF8()); MainFrame->DoubleQuotedSql(xname); if (i == 0) fprintf(out, "%s", xname); else fprintf(out, ", %s", xname); } fprintf(out, ") VALUES ("); for (i = 0; i < n_cols; i++) { if (i > 0) fprintf(out, ", "); int type = sqlite3_column_type(stmt, i); int data_type = postgis.GetDataType(i); switch (type) { case SQLITE_NULL: fprintf(out, "NULL"); break; case SQLITE_INTEGER: if (data_type == PostGISHelper::DATA_TYPE_BOOLEAN) postgis.OutputBooleanValue(out, sqlite3_column_int64 (stmt, i)); else postgis.OutputValue(out, sqlite3_column_int64(stmt, i)); break; case SQLITE_FLOAT: postgis.OutputValue(out, sqlite3_column_double(stmt, i)); break; case SQLITE_TEXT: postgis.OutputValue(out, (const char *) sqlite3_column_text(stmt, i)); break; case SQLITE_BLOB: if (postgis.IsGeometry(i)) { const void *blob_value; blob_value = sqlite3_column_blob(stmt, i); int len = sqlite3_column_bytes(stmt, i); geom = gaiaFromSpatiaLiteBlobWkb((unsigned char *) blob_value, len); if (geom == NULL) fprintf(out, "NULL"); else { postgis.OutputValue(out, geom); gaiaFreeGeomColl(geom); } } else { int len = sqlite3_column_bytes(stmt, i); postgis.OutputValue(out, (unsigned char *) sqlite3_column_blob(stmt, i), len); } break; }; } fprintf(out, ");\n"); } else { sqlite3_finalize(stmt); goto sql_error; } } fprintf(out, "COMMIT;\n"); } fprintf(out, "\n--\n-- end SQL dump\n"); fprintf(out, "--\n"); ::wxEndBusyCursor(); fclose(out); } stop: sqlite3_finalize(stmt); return; sql_error: // // some SQL error occurred // sqlite3_finalize(stmt); ::wxEndBusyCursor(); wxMessageBox(wxT("PostGIS SQL dump error:") + wxString::FromUTF8(sqlite3_errmsg(MainFrame->GetSqlite())), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } void MyTableTree::OnCmdMapPreview(wxCommandEvent & WXUNUSED(event)) { // // menu event - Map Preview // char table_name[1024]; char column_name[1024]; char sql[4192]; char sql2[2048]; int ret; char err_msg[2048]; sqlite3_stmt *stmt; double minx = DBL_MAX; double miny = DBL_MAX; double maxx = DBL_MAX; double maxy = DBL_MAX; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; ::wxBeginBusyCursor(); strcpy(table_name, obj->GetName().ToUTF8()); strcpy(column_name, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(table_name); MainFrame->DoubleQuotedSql(column_name); sprintf(sql, "SELECT Min(MbrMinX(%s)), Min(MbrMinY(%s)), ", column_name, column_name); sprintf(sql2, "Max(MbrMaxX(%s)), Max(MbrMaxY(%s)) ", column_name, column_name); strcat(sql, sql2); sprintf(sql2, "FROM %s", table_name); strcat(sql, sql2); ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } while (1) { // // fetching the result set rows // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // if (sqlite3_column_type(stmt, 0) == SQLITE_FLOAT) minx = sqlite3_column_double(stmt, 0); if (sqlite3_column_type(stmt, 1) == SQLITE_FLOAT) miny = sqlite3_column_double(stmt, 1); if (sqlite3_column_type(stmt, 2) == SQLITE_FLOAT) maxx = sqlite3_column_double(stmt, 2); if (sqlite3_column_type(stmt, 3) == SQLITE_FLOAT) maxy = sqlite3_column_double(stmt, 3); } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } } sqlite3_finalize(stmt); ::wxEndBusyCursor(); if (minx == DBL_MAX || miny == DBL_MAX || maxx == DBL_MAX || maxy == DBL_MAX) { wxMessageBox(wxT("This Column doesn't contains any Geometry: sorry ..."), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } MapPreviewDialog dlg; dlg.Create(MainFrame, obj->GetName(), obj->GetColumn(), minx, miny, maxx, maxy); dlg.ShowModal(); } void MyTableTree::OnCmdColumnStats(wxCommandEvent & WXUNUSED(event)) { // // menu event - column stats // char table_name[1024]; char column_name[1024]; char sql[4192]; char sql2[4192]; int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; const char *value; char err_msg[2048]; sqlite3_stmt *stmt; int count; int null_count = 0; int text_count = 0; int integer_count = 0; int real_count = 0; int blob_count = 0; double min; double max; double avg; double stddev_pop; double stddev_samp; double var_pop; double var_samp; int distinct_values = 0; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; ::wxBeginBusyCursor(); strcpy(table_name, obj->GetName().ToUTF8()); strcpy(column_name, obj->GetColumn().ToUTF8()); MainFrame->DoubleQuotedSql(table_name); MainFrame->DoubleQuotedSql(column_name); sprintf(sql, "SELECT Typeof(%s), Count(*) FROM %s GROUP BY Typeof(%s)", column_name, table_name, column_name); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 0]; count = atoi(results[(i * columns) + 1]); if (strcasecmp(value, "null") == 0) null_count += count; if (strcasecmp(value, "text") == 0) text_count += count; if (strcasecmp(value, "integer") == 0) integer_count += count; if (strcasecmp(value, "real") == 0) real_count += count; if (strcasecmp(value, "blob") == 0) blob_count += count; } } sqlite3_free_table(results); if ((real_count + integer_count) > 0) { // computing statistic analysis sprintf(sql, "SELECT Min(%s), Max(%s), Avg(%s), ", column_name, column_name, column_name); sprintf(sql2, "StdDev_pop(%s), StdDev_samp(%s), ", column_name, column_name); strcat(sql, sql2); sprintf(sql2, "Var_pop(%s), Var_samp(%s) FROM %s", column_name, column_name, table_name); strcat(sql, sql2); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql, &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { min = atof(results[(i * columns) + 0]); max = atof(results[(i * columns) + 1]); avg = atof(results[(i * columns) + 2]); stddev_pop = atof(results[(i * columns) + 3]); stddev_samp = atof(results[(i * columns) + 4]); var_pop = atof(results[(i * columns) + 5]); var_samp = atof(results[(i * columns) + 6]); } } sqlite3_free_table(results); } // computing DISTINCT values sprintf(sql, "SELECT DISTINCT %s FROM %s", column_name, table_name); ret = sqlite3_prepare_v2(MainFrame->GetSqlite(), sql, strlen(sql), &stmt, NULL); if (ret != SQLITE_OK) { sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } while (1) { // // fetching the result set rows // ret = sqlite3_step(stmt); if (ret == SQLITE_DONE) break; // end of result set if (ret == SQLITE_ROW) { // // fetching a row // distinct_values++; } else { sqlite3_finalize(stmt); sprintf(err_msg, "SQL error: %s", sqlite3_errmsg(MainFrame->GetSqlite())); wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(err_msg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); ::wxEndBusyCursor(); return; } } sqlite3_finalize(stmt); ::wxEndBusyCursor(); ColumnStatsDialog dlg; dlg.Create(MainFrame, obj->GetName(), obj->GetColumn(), null_count, text_count, integer_count, real_count, blob_count, min, max, avg, stddev_pop, stddev_samp, var_pop, var_samp, distinct_values); dlg.ShowModal(); } bool MyTableTree::DropRenameAux1(MyObject * obj, GeomColsList * Geometries, bool * autoincrement) { // // common tasks: drop/rename column auxiliaries // int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; wxString sql; bool check_autoincrement = false; wxString geomColumn; wxString geomType; wxString coordDims; int geomSrid; int indexType; wxString indexName; char xname[1024]; char *value; int metadata_type; // checking if the SQLITE_SEQUENCE table exists sql = wxT("PRAGMA table_info(sqlite_sequence)"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { check_autoincrement = true; } } sqlite3_free_table(results); if (check_autoincrement == true) { // checking if there is an AUTOINCREMENT Primary Key sql = wxT("SELECT name FROM sqlite_sequence WHERE Lower(name) = Lower('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { *autoincrement = true; } } sqlite3_free_table(results); } // checking if there is some Spatial Index already defined metadata_type = MainFrame->GetMetaDataType(); if (metadata_type == METADATA_LEGACY) sql = wxT ("SELECT f_geometry_column, type, coord_dimension, srid, spatial_index_enabled "); else if (metadata_type == METADATA_CURRENT) sql = wxT ("SELECT f_geometry_column, geometry_type, srid, spatial_index_enabled "); else return false; sql += wxT("FROM geometry_columns WHERE Lower(f_table_name) = Lower('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); sql += wxString::FromUTF8(xname); sql += wxT("')"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return false; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { if (metadata_type == METADATA_LEGACY) { /* legacy Spatial MetaData layout */ value = results[(i * columns) + 0]; geomColumn = wxString::FromUTF8(value); value = results[(i * columns) + 1]; geomType = wxString::FromUTF8(value); value = results[(i * columns) + 2]; coordDims = wxString::FromUTF8(value); value = results[(i * columns) + 3]; geomSrid = atoi(value); value = results[(i * columns) + 4]; indexType = atoi(value); } else { /* current Spatial MetaData layout */ value = results[(i * columns) + 0]; geomColumn = wxString::FromUTF8(value); switch (atoi(results[(i * columns) + 1])) { case 0: geomType = wxT("GEOMETRY"); coordDims = wxT("XY"); break; case 1000: geomType = wxT("GEOMETRY"); coordDims = wxT("XYZ"); break; case 2000: geomType = wxT("GEOMETRY"); coordDims = wxT("XYM"); break; case 3000: geomType = wxT("GEOMETRY"); coordDims = wxT("XYZM"); break; case 1: geomType = wxT("POINT"); coordDims = wxT("XY"); break; case 1001: geomType = wxT("POINT"); coordDims = wxT("XYZ"); break; case 2001: geomType = wxT("POINT"); coordDims = wxT("XYM"); break; case 3001: geomType = wxT("POINT"); coordDims = wxT("XYZM"); break; case 2: geomType = wxT("LINESTRING"); coordDims = wxT("XY"); break; case 1002: geomType = wxT("LINESTRING"); coordDims = wxT("XYZ"); break; case 2002: geomType = wxT("LINESTRING"); coordDims = wxT("XYM"); break; case 3002: geomType = wxT("LINESTRING"); coordDims = wxT("XYZM"); break; case 3: geomType = wxT("POLYGON"); coordDims = wxT("XY"); break; case 1003: geomType = wxT("POLYGON"); coordDims = wxT("XYZ"); break; case 2003: geomType = wxT("POLYGON"); coordDims = wxT("XYM"); break; case 3003: geomType = wxT("POLYGON"); coordDims = wxT("XYZM"); break; case 4: geomType = wxT("MULTIPOINT"); coordDims = wxT("XY"); break; case 1004: geomType = wxT("MULTIPOINT"); coordDims = wxT("XYZ"); break; case 2004: geomType = wxT("MULTIPOINT"); coordDims = wxT("XYM"); break; case 3004: geomType = wxT("MULTIPOINT"); coordDims = wxT("XYZM"); break; case 5: geomType = wxT("MULTILINESTRING"); coordDims = wxT("XY"); break; case 1005: geomType = wxT("MULTILINESTRING"); coordDims = wxT("XYZ"); break; case 2005: geomType = wxT("MULTILINESTRING"); coordDims = wxT("XYM"); break; case 3005: geomType = wxT("MULTILINESTRING"); coordDims = wxT("XYZM"); break; case 6: geomType = wxT("MULTIPOLYGON"); coordDims = wxT("XY"); break; case 1006: geomType = wxT("MULTIPOLYGON"); coordDims = wxT("XYZ"); break; case 2006: geomType = wxT("MULTIPOLYGON"); coordDims = wxT("XYM"); break; case 3006: geomType = wxT("MULTIPOLYGON"); coordDims = wxT("XYZM"); break; case 7: geomType = wxT("GEOMETRYCOLLECTION"); coordDims = wxT("XY"); break; case 1007: geomType = wxT("GEOMETRYCOLLECTION"); coordDims = wxT("XYZ"); break; case 2007: geomType = wxT("GEOMETRYCOLLECTION"); coordDims = wxT("XYM"); break; case 3007: geomType = wxT("GEOMETRYCOLLECTION"); coordDims = wxT("XYZM"); break; }; value = results[(i * columns) + 2]; geomSrid = atoi(value); value = results[(i * columns) + 3]; indexType = atoi(value); } Geometries->Add(geomColumn, geomType, coordDims, geomSrid, indexType); } } sqlite3_free_table(results); return true; } void MyTableTree::DropRenameAux2(MyObject * obj, GeomColsList * Geometries, wxString & aliasTable, wxString & new_column, wxString & renameSql, wxString & dropSql, wxString & disableSpatialIdxSql, wxString & dropSpatialIdxSql, wxString & createSpatialIdxSql, wxString & discardGeometrySql) { // // common tasks: drop/rename column auxiliaries // GeomColumn *pG; wxString name; char xname[1024]; char column[1024]; // creating the SQL fragments aliasTable = wxT("tmp_alias "); aliasTable += obj->GetName(); aliasTable += wxT(" tmp_alias"); strcpy(xname, aliasTable.ToUTF8()); MainFrame->DoubleQuotedSql(xname); aliasTable = wxString::FromUTF8(xname); renameSql = wxT("ALTER TABLE "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); renameSql += wxString::FromUTF8(xname); renameSql += wxT(" RENAME TO "); renameSql += aliasTable; renameSql += wxT(";\n"); dropSql = wxT("DROP TABLE "); dropSql += aliasTable; dropSql += wxT(";\n"); strcpy(column, obj->GetColumn().ToUTF8()); pG = Geometries->GetFirst(); while (pG) { if (pG->IsRTree() == true || pG->IsMbrCache() == true) { // disabling a Spatial Index disableSpatialIdxSql += wxT("SELECT DisableSpatialIndex('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); disableSpatialIdxSql += wxString::FromUTF8(xname); disableSpatialIdxSql += wxT("', '"); strcpy(xname, pG->GetGeometryName().ToUTF8()); MainFrame->CleanSqlString(xname); disableSpatialIdxSql += wxString::FromUTF8(xname); disableSpatialIdxSql += wxT("');\n"); dropSpatialIdxSql += wxT("DROP TABLE IF EXISTS "); name = wxT("idx_"); name += obj->GetName(); name += wxT("_"); name += pG->GetGeometryName(); strcpy(xname, name.ToUTF8()); MainFrame->DoubleQuotedSql(xname); dropSpatialIdxSql += wxString::FromUTF8(xname); dropSpatialIdxSql += wxT(";\n"); wxString name1 = pG->GetGeometryName(); wxString name2 = obj->GetColumn(); if (name1.CmpNoCase(name2) != 0) { if (pG->IsRTree() == true) { // creating an RTree Spatial Index createSpatialIdxSql += wxT("SELECT CreateSpatialIndex('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); createSpatialIdxSql += wxString::FromUTF8(xname); createSpatialIdxSql += wxT("', '"); strcpy(xname, pG->GetGeometryName().ToUTF8()); MainFrame->CleanSqlString(xname); createSpatialIdxSql += wxString::FromUTF8(xname); createSpatialIdxSql += wxT("');\n"); } else { // creating an MbrCache Spatial Index createSpatialIdxSql += wxT("SELECT CreateMbrCache('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); createSpatialIdxSql += wxString::FromUTF8(xname); createSpatialIdxSql += wxT("', '"); strcpy(xname, pG->GetGeometryName().ToUTF8()); MainFrame->CleanSqlString(xname); createSpatialIdxSql += wxString::FromUTF8(xname); createSpatialIdxSql += wxT("');\n"); } } else if (new_column.Len() > 0) { if (pG->IsRTree() == true) { // creating an RTree Spatial Index createSpatialIdxSql += wxT("SELECT CreateSpatialIndex('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); createSpatialIdxSql += wxString::FromUTF8(xname); createSpatialIdxSql += wxT("', '"); strcpy(xname, new_column.ToUTF8()); MainFrame->CleanSqlString(xname); createSpatialIdxSql += wxString::FromUTF8(xname); createSpatialIdxSql += wxT("');\n"); } else { // creating an MbrCache Spatial Index createSpatialIdxSql += wxT("SELECT CreateMbrCache('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); createSpatialIdxSql += wxString::FromUTF8(xname); createSpatialIdxSql += wxT("', '"); strcpy(xname, new_column.ToUTF8()); MainFrame->CleanSqlString(xname); createSpatialIdxSql += wxString::FromUTF8(xname); createSpatialIdxSql += wxT("');\n"); } } } // discarding a Geometry Column discardGeometrySql += wxT("SELECT DiscardGeometryColumn('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); discardGeometrySql += wxString::FromUTF8(xname); discardGeometrySql += wxT("', '"); strcpy(xname, pG->GetGeometryName().ToUTF8()); MainFrame->CleanSqlString(xname); discardGeometrySql += wxString::FromUTF8(xname); discardGeometrySql += wxT("');\n"); pG = pG->GetNext(); } } void MyTableTree::DropRenameAux3(MyObject * obj, wxString & new_column, GeomColsList * Geometries, TblIndexList * Index, wxString & addGeometrySql) { // // common tasks: drop/rename column auxiliaries // GeomColumn *pG; TblIndex *pI; char xname[1024]; char dummy[64]; int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; wxString sql; char *value; wxString indexName; bool uniqueIndex; pG = Geometries->GetFirst(); while (pG) { // adding a Geometry Column wxString name1 = pG->GetGeometryName(); wxString name2 = obj->GetColumn(); if (name1.CmpNoCase(name2) == 0) { if (new_column.Len() > 0) { addGeometrySql += wxT("SELECT AddGeometryColumn('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); addGeometrySql += wxString::FromUTF8(xname); addGeometrySql += wxT("', '"); strcpy(xname, new_column.ToUTF8()); MainFrame->CleanSqlString(xname); addGeometrySql += wxString::FromUTF8(xname); sprintf(dummy, "', %d", pG->GetSrid()); addGeometrySql += wxString::FromUTF8(dummy); addGeometrySql += wxT(", '"); addGeometrySql += pG->GetGeometryType(); if (pG->GetCoordDims() == wxT('2') || pG->GetCoordDims() == wxT('3')) { addGeometrySql += wxT("', "); addGeometrySql += pG->GetCoordDims(); } else { addGeometrySql += wxT("', '"); addGeometrySql += pG->GetCoordDims(); addGeometrySql += wxT("'"); } if (pG->IsNotNull() == false) addGeometrySql += wxT(");\n"); else addGeometrySql += wxT(", 1);\n"); } pG = pG->GetNext(); continue; } addGeometrySql += wxT("SELECT AddGeometryColumn('"); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->CleanSqlString(xname); addGeometrySql += wxString::FromUTF8(xname); addGeometrySql += wxT("', '"); strcpy(xname, pG->GetGeometryName().ToUTF8()); MainFrame->CleanSqlString(xname); addGeometrySql += wxString::FromUTF8(xname); sprintf(dummy, "', %d", pG->GetSrid()); addGeometrySql += wxString::FromUTF8(dummy); addGeometrySql += wxT(", '"); addGeometrySql += pG->GetGeometryType(); if (pG->GetCoordDims() == wxT('2') || pG->GetCoordDims() == wxT('3')) { addGeometrySql += wxT("', "); addGeometrySql += pG->GetCoordDims(); } else { addGeometrySql += wxT("', '"); addGeometrySql += pG->GetCoordDims(); addGeometrySql += wxT("'"); } if (pG->IsNotNull() == false) addGeometrySql += wxT(");\n"); else addGeometrySql += wxT(", 1);\n"); pG = pG->GetNext(); } // retrieving any related Index sql = wxT("PRAGMA index_list("); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 1]; if (strncmp(value, "sqlite_autoindex_", 17) == 0) { // sandro 2011-01-03: discarding any Primary Key Index continue; } indexName = wxString::FromUTF8(value); value = results[(i * columns) + 2]; if (atoi(value) == 0) uniqueIndex = false; else uniqueIndex = true; Index->Add(indexName, uniqueIndex); } } sqlite3_free_table(results); pI = Index->GetFirst(); while (pI) { // retrieving any Index Column sql = wxT("PRAGMA index_info("); strcpy(xname, pI->GetIndexName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { value = results[(i * columns) + 2]; indexName = wxString::FromUTF8(value); pI->Add(indexName); } } sqlite3_free_table(results); pI = pI->GetNext(); } } void MyTableTree::OnCmdDropColumn(wxCommandEvent & WXUNUSED(event)) { // // menu event - drop column // char column[1024]; int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; wxString new_column; wxString sql; wxString createSql; wxString insertSql; wxString insertFromSql; wxString renameSql; wxString dropSql; wxString dropIndexSql; wxString createIndexSql; wxString disableSpatialIdxSql; wxString dropSpatialIdxSql; wxString createSpatialIdxSql; wxString discardGeometrySql; wxString addGeometrySql; wxString geomColumn; bool comma = false; char *value; bool autoincrement = false; wxString aliasTable; bool isGeom; wxString msg; GeomColsList Geometries; GeomColumn *pG; TblIndexList Index; TblIndex *pI; IndexColumn *pC; wxString name; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); if (obj == NULL) return; strcpy(column, obj->GetColumn().ToUTF8()); if (DropRenameAux1(obj, &Geometries, &autoincrement) == false) return; DropRenameAux2(obj, &Geometries, aliasTable, new_column, renameSql, dropSql, disableSpatialIdxSql, dropSpatialIdxSql, createSpatialIdxSql, discardGeometrySql); // retrieving the Column names sql = wxT("PRAGMA table_info("); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { createSql = wxT("CREATE TABLE "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); createSql += wxString::FromUTF8(xname); createSql += wxT(" (\n"); insertSql = wxT("INSERT INTO "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); insertSql += wxString::FromUTF8(xname); insertSql += wxT(" ("); insertFromSql = wxT("SELECT "); for (i = 1; i <= rows; i++) { value = results[(i * columns) + 1]; if (strcasecmp(value, column) == 0) continue; isGeom = false; pG = Geometries.GetFirst(); while (pG) { char geom[1024]; strcpy(geom, pG->GetGeometryName().ToUTF8()); if (strcasecmp(geom, value) == 0) { isGeom = true; geomColumn = pG->GetGeometryName(); break; } pG = pG->GetNext(); } if (comma == true) { if (isGeom == false) createSql += wxT(",\n"); insertSql += wxT(", "); insertFromSql += wxT(", "); } if (isGeom == false) { strcpy(xname, value); MainFrame->DoubleQuotedSql(xname); createSql += wxString::FromUTF8(xname); createSql += wxT(" "); } strcpy(xname, value); MainFrame->DoubleQuotedSql(xname); insertSql += wxString::FromUTF8(xname); strcpy(xname, value); MainFrame->DoubleQuotedSql(xname); insertFromSql += wxString::FromUTF8(xname); value = results[(i * columns) + 2]; if (isGeom == false) createSql += wxString::FromUTF8(value); value = results[(i * columns) + 5]; if (value) { if (atoi(value) != 0) { if (isGeom == false) { createSql += wxT(" PRIMARY KEY"); if (autoincrement == true) createSql += wxT(" AUTOINCREMENT"); } } } value = results[(i * columns) + 3]; if (value) { if (atoi(value) != 0) { if (isGeom == true) Geometries.SetNotNull(geomColumn); else createSql += wxT(" NOT NULL"); } } value = results[(i * columns) + 4]; if (value && isGeom == false) { createSql += wxT(" DEFAULT "); createSql += wxString::FromUTF8(value); } comma = true; } createSql += wxT(");\n"); insertSql += wxT(")\n"); insertFromSql += wxT("\nFROM "); insertFromSql += aliasTable; insertFromSql += wxT(";\n"); insertSql += insertFromSql; } sqlite3_free_table(results); DropRenameAux3(obj, new_column, &Geometries, &Index, addGeometrySql); // setting up the Index SQL fragments Index.Invalidate(obj->GetColumn()); pI = Index.GetFirst(); while (pI) { dropIndexSql += wxT("DROP INDEX "); strcpy(xname, pI->GetIndexName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); dropIndexSql += wxString::FromUTF8(xname); dropIndexSql += wxT(";\n"); if (pI->IsValid() == true) { if (pI->GetFirst()) { if (pI->IsUnique() == true) createIndexSql += wxT("CREATE UNIQUE INDEX "); else createIndexSql += wxT("CREATE INDEX "); strcpy(xname, pI->GetIndexName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); createIndexSql += wxString::FromUTF8(xname); createIndexSql += wxT(" ON "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); createIndexSql += wxString::FromUTF8(xname); createIndexSql += wxT(" ("); } comma = false; pC = pI->GetFirst(); while (pC) { if (comma == true) createIndexSql += wxT(", "); strcpy(xname, pC->GetColumnName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); createIndexSql += wxString::FromUTF8(xname); comma = true; pC = pC->GetNext(); } if (pI->GetFirst()) createIndexSql += wxT(");\n"); } pI = pI->GetNext(); } // setting up the SQL complex statement sql = wxT("BEGIN;\n"); sql += disableSpatialIdxSql; sql += discardGeometrySql; sql += dropSpatialIdxSql; sql += dropIndexSql; sql += renameSql; sql += createSql; sql += addGeometrySql; sql += createSpatialIdxSql; sql += createIndexSql; sql += insertSql; sql += dropSql; sql += wxT("COMMIT;"); if (sql.Len() < 1) return; msg = wxT("Do you really intend to drop the Column "); msg += obj->GetColumn(); msg += wxT("\nfrom the Table "); msg += obj->GetName(); msg += wxT(" ?"); wxMessageDialog confirm(this, msg, wxT("Confirming DROP COLUMN"), wxOK | wxCANCEL | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret != wxID_OK) return; // executing ::wxBeginBusyCursor(); ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); goto rollback; } ::wxEndBusyCursor(); wxMessageBox(wxT("The column ") + obj->GetColumn() + wxT("\nwas successfully removed\nfrom the Table ") + obj->GetName(), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); // appending a delayed event so to really update the Tree AddPendingEvent(evt); return; rollback: ret = sqlite3_exec(MainFrame->GetSqlite(), "ROLLBACK", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT ("An error occurred\n\na ROLLBACK was automatically performed"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } void MyTableTree::OnCmdRenameColumn(wxCommandEvent & WXUNUSED(event)) { // // menu event - rename column // char column[1024]; int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; wxString sql; wxString createSql; wxString insertSql; wxString insertFromSql; wxString renameSql; wxString dropSql; wxString dropIndexSql; wxString createIndexSql; wxString disableSpatialIdxSql; wxString dropSpatialIdxSql; wxString createSpatialIdxSql; wxString discardGeometrySql; wxString addGeometrySql; wxString geomColumn; bool comma = false; char *value; bool autoincrement = false; wxString aliasTable; bool isGeom; wxString msg; GeomColsList Geometries; GeomColumn *pG; TblIndexList Index; TblIndex *pI; IndexColumn *pC; wxString name; char xname[1024]; MyObject *obj = (MyObject *) GetItemData(CurrentItem); wxCommandEvent evt = wxCommandEvent(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); if (obj == NULL) return; // asking the new column name wxString newColumn = wxGetTextFromUser(wxT("Please, insert the new Column Name"), wxT("Rename Column"), obj->GetColumn(), MainFrame, wxDefaultCoord, wxDefaultCoord, false); strcpy(column, obj->GetColumn().ToUTF8()); if (DropRenameAux1(obj, &Geometries, &autoincrement) == false) return; DropRenameAux2(obj, &Geometries, aliasTable, newColumn, renameSql, dropSql, disableSpatialIdxSql, dropSpatialIdxSql, createSpatialIdxSql, discardGeometrySql); // retrieving the Column names sql = wxT("PRAGMA table_info("); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { createSql = wxT("CREATE TABLE "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); createSql += wxString::FromUTF8(xname); createSql += wxT(" (\n"); insertSql = wxT("INSERT INTO "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); insertSql += wxString::FromUTF8(xname); insertSql += wxT(" ("); insertFromSql = wxT("SELECT "); for (i = 1; i <= rows; i++) { value = results[(i * columns) + 1]; isGeom = false; pG = Geometries.GetFirst(); while (pG) { char geom[1024]; strcpy(geom, pG->GetGeometryName().ToUTF8()); if (strcasecmp(geom, value) == 0) { isGeom = true; geomColumn = pG->GetGeometryName(); break; } pG = pG->GetNext(); } if (comma == true) { if (isGeom == false) createSql += wxT(",\n"); insertSql += wxT(", "); insertFromSql += wxT(", "); } if (isGeom == false) { if (strcasecmp(value, column) == 0) { strcpy(xname, newColumn.ToUTF8()); MainFrame->DoubleQuotedSql(xname); createSql += wxString::FromUTF8(xname); } else { strcpy(xname, value); MainFrame->DoubleQuotedSql(xname); createSql += wxString::FromUTF8(xname); } createSql += wxT(" "); } if (strcasecmp(value, column) == 0) { strcpy(xname, newColumn.ToUTF8()); MainFrame->DoubleQuotedSql(xname); insertSql += wxString::FromUTF8(xname); } else { strcpy(xname, value); MainFrame->DoubleQuotedSql(xname); insertSql += wxString::FromUTF8(xname); } strcpy(xname, value); MainFrame->DoubleQuotedSql(xname); insertFromSql += wxString::FromUTF8(xname); value = results[(i * columns) + 2]; if (isGeom == false) createSql += wxString::FromUTF8(value); value = results[(i * columns) + 5]; if (value) { if (atoi(value) != 0) { if (isGeom == false) { createSql += wxT(" PRIMARY KEY"); if (autoincrement == true) createSql += wxT(" AUTOINCREMENT"); } } } value = results[(i * columns) + 3]; if (value) { if (atoi(value) != 0) { if (isGeom == true) Geometries.SetNotNull(geomColumn); else createSql += wxT(" NOT NULL"); } } value = results[(i * columns) + 4]; if (value && isGeom == false) { createSql += wxT(" DEFAULT "); createSql += wxString::FromUTF8(value); } comma = true; } createSql += wxT(");\n"); insertSql += wxT(")\n"); insertFromSql += wxT("\nFROM "); insertFromSql += aliasTable; insertFromSql += wxT(";\n"); insertSql += insertFromSql; } sqlite3_free_table(results); DropRenameAux3(obj, newColumn, &Geometries, &Index, addGeometrySql); // setting up the Index SQL fragments pI = Index.GetFirst(); while (pI) { dropIndexSql += wxT("DROP INDEX "); strcpy(xname, pI->GetIndexName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); dropIndexSql += wxString::FromUTF8(xname); dropIndexSql += wxT(";\n"); if (pI->IsValid() == true) { if (pI->GetFirst()) { if (pI->IsUnique() == true) createIndexSql += wxT("CREATE UNIQUE INDEX "); else createIndexSql += wxT("CREATE INDEX "); strcpy(xname, pI->GetIndexName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); createIndexSql += wxString::FromUTF8(xname); createIndexSql += wxT(" ON "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); createIndexSql += wxString::FromUTF8(xname); createIndexSql += wxT(" ("); } comma = false; pC = pI->GetFirst(); while (pC) { char xvalue[1024]; strcpy(xvalue, pC->GetColumnName().ToUTF8()); if (comma == true) createIndexSql += wxT(", "); if (strcasecmp(xvalue, column) == 0) { strcpy(xname, newColumn.ToUTF8()); MainFrame->DoubleQuotedSql(xname); createIndexSql += wxString::FromUTF8(xname); } else { strcpy(xname, pC->GetColumnName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); createIndexSql += wxString::FromUTF8(xname); } comma = true; pC = pC->GetNext(); } if (pI->GetFirst()) createIndexSql += wxT(");\n"); } pI = pI->GetNext(); } // setting up the SQL complex statement sql = wxT("BEGIN;\n"); sql += disableSpatialIdxSql; sql += discardGeometrySql; sql += dropSpatialIdxSql; sql += dropIndexSql; sql += renameSql; sql += createSql; sql += addGeometrySql; sql += createSpatialIdxSql; sql += createIndexSql; sql += insertSql; sql += dropSql; sql += wxT("COMMIT;"); if (sql.Len() < 1) return; msg = wxT("Do you really intend to rename the Column "); msg += obj->GetColumn(); msg += wxT(" as "); msg += newColumn; msg += wxT("\ninto the Table "); msg += obj->GetName(); msg += wxT(" ?"); wxMessageDialog confirm(this, msg, wxT("Confirming RENAME COLUMN"), wxOK | wxCANCEL | wxICON_QUESTION); ret = confirm.ShowModal(); if (ret != wxID_OK) return; // executing ::wxBeginBusyCursor(); ret = sqlite3_exec(MainFrame->GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); goto rollback; } ::wxEndBusyCursor(); wxMessageBox(wxT("The column ") + obj->GetColumn() + wxT("\nwas successfully renamed as ") + newColumn + wxT("\ninto the Table ") + obj->GetName(), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); // appending a delayed event so to really update the Tree AddPendingEvent(evt); return; rollback: ret = sqlite3_exec(MainFrame->GetSqlite(), "ROLLBACK", NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT ("An error occurred\n\na ROLLBACK was automatically performed"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); } void MyTableTree::OnCmdEdit(wxCommandEvent & WXUNUSED(event)) { // // menu event - editing row values // char **results; int rows; int columns; int i; char *errMsg = NULL; wxString sql; char *column; char *type; int pk = 0; int pb = 0; int primaryKeys[1024]; int blobCols[1024]; char xname[1024]; for (i = 0; i < 1024; i++) { primaryKeys[i] = -1; blobCols[i] = -1; } primaryKeys[pk++] = 0; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; sql = wxT("PRAGMA table_info("); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { sql = wxT("SELECT ROWID"); for (i = 1; i <= rows; i++) { column = results[(i * columns) + 1]; sql += wxT(", "); strcpy(xname, column); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); type = results[(i * columns) + 2]; if (strcasecmp(type, "BLOB") == 0) blobCols[pb++] = i; if (atoi(results[(i * columns) + 5]) == 0) ; else primaryKeys[pk++] = i; } } sqlite3_free_table(results); if (sql.Len() < 1) return; sql += wxT("\nFROM "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\nORDER BY ROWID"); MainFrame->EditTable(sql, primaryKeys, blobCols, obj->GetName()); } void MyTableTree::OnCmdCheckDuplicates(wxCommandEvent & WXUNUSED(event)) { // // menu event - Checking for Duplicate rows // wxString sql; wxString col_list; bool first = true; char xname[1024]; int pk; int ret; char **results; int rows; int columns; int i; char *errMsg = NULL; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_TABLE) { // extracting the column names (excluding any Primary Key) sql = wxT("PRAGMA table_info("); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); ret = sqlite3_get_table(MainFrame->GetSqlite(), sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); return; } if (rows < 1) ; else { for (i = 1; i <= rows; i++) { strcpy(xname, results[(i * columns) + 1]); pk = atoi(results[(i * columns) + 5]); if (!pk) { if (first) first = false; else col_list += wxT(", "); MainFrame->DoubleQuotedSql(xname); col_list += wxString::FromUTF8(xname); } } } sqlite3_free_table(results); // preparing the SQL statement sql = wxT("SELECT Count(*) AS \"[dupl-count]\", "); sql += col_list; sql += wxT("\nFROM "); strcpy(xname, obj->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT("\nGROUP BY "); sql += col_list; sql += wxT("\nHAVING \"[dupl-count]\" > 1"); sql += wxT("\nORDER BY \"[dupl-count]\" DESC"); MainFrame->SetSql(sql, true); } } void MyTableTree::OnCmdRemoveDuplicates(wxCommandEvent & WXUNUSED(event)) { // // menu event - Removing Duplicate rows // MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_TABLE) { wxString msg; int count = 0; char *table = new char[obj->GetName().Len()]; strcpy(table, obj->GetName().ToUTF8()); ::wxBeginBusyCursor(); remove_duplicated_rows_ex2(MainFrame->GetSqlite(), table, &count, 1); delete[]table; ::wxEndBusyCursor(); if (!count) { msg = wxT("No duplicated rows have been identified on "); msg += obj->GetName(); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } else { char dummy[128]; sprintf(dummy, "%d duplicated rows deleted from ", count); msg = wxString::FromUTF8(dummy); msg += obj->GetName(); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } } } void MyTableTree::OnCmdCheckGeometries(wxCommandEvent & WXUNUSED(event)) { // // menu event - Checking a Geometry Column // int ret; wxString table; wxString geom; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED) { table = obj->GetName(); geom = obj->GetColumn(); } else return; CheckGeometryDialog dlg; dlg.Create(MainFrame, table, geom); ret = dlg.ShowModal(); if (ret != wxYES) return; char xtable[1024]; char xgeometry[1024]; char *err_msg = NULL; char report_path[1024]; wxString msg; strcpy(xtable, table.ToUTF8()); strcpy(xgeometry, geom.ToUTF8()); wxFileDialog fileDialog(this, wxT("Diagnostic Report"), wxT(""), wxT("report.html"), wxT ("HTML document (*.html)|*.html|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { strcpy(report_path, fileDialog.GetPath().ToUTF8()); ::wxBeginBusyCursor(); int n_invalids; ret = check_geometry_column_r(MainFrame->GetSpliteInternalCache(), MainFrame->GetSqlite(), xtable, xgeometry, report_path, NULL, &n_invalids, &err_msg); ::wxEndBusyCursor(); if (ret == 0) { // reporting some error condition msg = wxT("Some unexpected error occurred:\n\n"); if (err_msg != NULL) { msg += wxString::FromUTF8(err_msg); free(err_msg); } else msg += wxT("Sorry, no further details are available"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { int mode; if (n_invalids > 0) { msg = wxT ("ATTENTION: some invalid Geometries have been detected !!!\n\n"); mode = wxICON_WARNING; } else { msg = wxT ("No invalid Geometries have been detected; this layer is full valid\n\n"); mode = wxICON_INFORMATION; } msg += wxT("A full diagnostic report has been created.\n"); msg += wxT ("Please point your WEB Browser at the following HTML document containing the report:\n\n"); msg += fileDialog.GetPath(); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | mode, this); } } } void MyTableTree::OnCmdSanitizeGeometries(wxCommandEvent & WXUNUSED(event)) { // // menu event - Attempting to sanitize a Geometry Column // int ret; wxString table; wxString geom; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return; if (obj->GetType() == MY_GEOMETRY || obj->GetType() == MY_GEOMETRY_INDEX || obj->GetType() == MY_GEOMETRY_CACHED) { table = obj->GetName(); geom = obj->GetColumn(); } else return; SanitizeGeometryDialog dlg; dlg.Create(MainFrame, table, geom); ret = dlg.ShowModal(); if (ret != wxYES) return; char tmp_prefix[1024]; char xtable[1024]; char xgeometry[1024]; char *err_msg = NULL; char report_path[1024]; wxString msg; strcpy(tmp_prefix, dlg.GetTmpPrefix().ToUTF8()); strcpy(xtable, table.ToUTF8()); strcpy(xgeometry, geom.ToUTF8()); wxFileDialog fileDialog(this, wxT("Diagnostic Report"), wxT(""), wxT("report.html"), wxT ("HTML document (*.html)|*.html|All files (*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { strcpy(report_path, fileDialog.GetPath().ToUTF8()); ::wxBeginBusyCursor(); int n_failures; ret = sanitize_geometry_column_r(MainFrame->GetSpliteInternalCache(), MainFrame->GetSqlite(), xtable, xgeometry, tmp_prefix, report_path, NULL, NULL, NULL, &n_failures, &err_msg); ::wxEndBusyCursor(); if (ret == 0) { // reporting some error condition msg = wxT("Some unexpected error occurred:\n\n"); if (err_msg != NULL) { msg += wxString::FromUTF8(err_msg); free(err_msg); } else msg += wxT("Sorry, no further details are available"); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); } else { int mode; if (n_failures > 0) { msg = wxT ("ATTENTION: some invalid Geometries still remain invalid !!!\n\n"); mode = wxICON_WARNING; } else { msg = wxT ("All invalid Geometries have been saned; this layer is now full valid\n\n"); mode = wxICON_INFORMATION; } msg += wxT("A full diagnostic report has been created.\n"); msg += wxT ("Please point your WEB Browser at the following HTML document containing the report:\n\n"); msg += fileDialog.GetPath(); wxMessageBox(msg, wxT("spatialite_gui"), wxOK | mode, this); } } } void MyTableTree::OnCmdSldSeRasterStyles(wxCommandEvent & WXUNUSED(event)) { // // menu event - Handling Raster Coverage SLD/SE styles // RasterCoverageStylesDialog dlg; dlg.Create(MainFrame, CurrentRasterCoverageName); dlg.ShowModal(); } void MyTableTree::OnCmdImportRaster(wxCommandEvent & WXUNUSED(event)) { // // menu event - Importing one (or even more) external Raster file(s) // int ret; wxString lastDir; wxString path; ImportRasterDialog dlg; wxString suffixList = wxT("Raster files (*.tif;*.jpg;*.jp2;*.asc)|*.tif;*.jpg;*.jp2;*.asc|"); suffixList += wxT("TIFF or GeoTIFF image (*.tif)|*.tif|"); suffixList += wxT("JPEG image (*.jpg)|*.jpg|"); suffixList += wxT("JPEG2000 image (*.jp2)|*.jp2|"); suffixList += wxT("ASCII Grid (*.asc)|*.asc|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("Selecting Raster File(s) to be imported"), wxT(""), wxT(""), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { int count; wxArrayString paths; fileDialog.GetPaths(paths); count = paths.GetCount(); path = paths.Item(0); int more = count - 1; if (count >= 2) { path += wxT("\n") + paths.Item(1); more--; } wxFileName file(path); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); if (more > 0) { char dummy[128]; sprintf(dummy, "\n(and %d more %s)", more, (more > 1) ? "files" : "file"); path += wxString::FromUTF8(dummy); } wxString title; wxString abstract; wxString sample; wxString pixel; wxString compression; int srid; wxString coverage = CurrentRasterCoverageName; int pos = CurrentRasterCoverageName.Find('[', true); if (pos != wxNOT_FOUND) coverage = CurrentRasterCoverageName.Left(pos - 1); if (MainFrame->DoGetRasterCoverageInfos (coverage, title, abstract, sample, pixel, compression, &srid) == false) return; dlg.Create(MainFrame, coverage, paths, path, title, abstract, sample, pixel, compression, srid); dlg.ShowModal(); } } void MyTableTree::OnCmdPyramidize(wxCommandEvent & WXUNUSED(event)) { // // menu event - Pyramidize // PyramidizeDialog dlg; wxString title; wxString abstract; wxString sample; wxString pixel; wxString compression; int srid; wxString coverage = CurrentRasterCoverageName; int pos = CurrentRasterCoverageName.Find('[', true); if (pos != wxNOT_FOUND) coverage = CurrentRasterCoverageName.Left(pos - 1); if (MainFrame->DoGetRasterCoverageInfos (coverage, title, abstract, sample, pixel, compression, &srid) == false) return; dlg.Create(MainFrame, coverage, title, abstract, sample, pixel, compression); dlg.ShowModal(); } void MyTableTree::OnCmdPyramidizeMonolithic(wxCommandEvent & WXUNUSED(event)) { // // menu event - PyramidizeMonolithic // PyramidizeMonolithicDialog dlg; wxString title; wxString abstract; wxString sample; wxString pixel; wxString compression; int srid; wxString coverage = CurrentRasterCoverageName; int pos = CurrentRasterCoverageName.Find('[', true); if (pos != wxNOT_FOUND) coverage = CurrentRasterCoverageName.Left(pos - 1); if (MainFrame->DoGetRasterCoverageInfos (coverage, title, abstract, sample, pixel, compression, &srid) == false) return; dlg.Create(MainFrame, coverage, title, abstract, sample, pixel, compression); dlg.ShowModal(); } void MyTableTree::OnCmdDePyramidize(wxCommandEvent & WXUNUSED(event)) { // // menu event - DePyramidize // DePyramidizeDialog dlg; wxString title; wxString abstract; wxString sample; wxString pixel; wxString compression; int srid; wxString coverage = CurrentRasterCoverageName; int pos = CurrentRasterCoverageName.Find('[', true); if (pos != wxNOT_FOUND) coverage = CurrentRasterCoverageName.Left(pos - 1); if (MainFrame->DoGetRasterCoverageInfos (coverage, title, abstract, sample, pixel, compression, &srid) == false) return; dlg.Create(MainFrame, coverage, title, abstract, sample, pixel, compression); dlg.ShowModal(); } void MyTableTree::OnCmdRasterDrop(wxCommandEvent & WXUNUSED(event)) { // // menu event - Drop Raster Coverage // RasterDropDialog dlg; wxString title; wxString abstract; wxString sample; wxString pixel; wxString compression; int srid; wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); wxString coverage = CurrentRasterCoverageName; int pos = CurrentRasterCoverageName.Find('[', true); if (pos != wxNOT_FOUND) coverage = CurrentRasterCoverageName.Left(pos - 1); if (MainFrame->DoGetRasterCoverageInfos (coverage, title, abstract, sample, pixel, compression, &srid) == false) return; dlg.Create(MainFrame, coverage, title, abstract, sample, pixel, compression); dlg.ShowModal(); // appending a delayed event so to really update the Tree AddPendingEvent(evt); } void MyTableTree::OnRegisterVectorCoverage(wxCommandEvent & WXUNUSED(event)) { // // menu event - Register Vector Coverage // VectorRegisterDialog dlg; wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); dlg.Create(MainFrame); if (dlg.ShowModal() == wxID_OK) { wxString name = dlg.GetCoverageName(); wxString table = dlg.GetTableName(); wxString geometry = dlg.GetGeometryColumn(); wxString title = dlg.GetTitle(); wxString abstract = dlg.GetAbstract(); if (MainFrame->DoRegisterVectorCoverage(name, table, geometry, title, abstract) != true) { wxMessageBox(wxT("Sorry, some error fatal occurred."), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); return; } else { wxMessageBox(wxT("Vector Coverage \"") + name + wxT("\" successfully registered"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); } // appending a delayed event so to really update the Tree AddPendingEvent(evt); } } void MyTableTree::OnCmdVectorUnregister(wxCommandEvent & WXUNUSED(event)) { // // menu event - Unregister Vector Coverage // VectorUnregisterDialog dlg; wxString title; wxString abstract; wxString type; int srid; wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_RefreshDeferred); wxString coverage = CurrentVectorCoverageName; int pos = CurrentRasterCoverageName.Find('[', true); if (pos != wxNOT_FOUND) coverage = CurrentRasterCoverageName.Left(pos - 1); if (MainFrame->DoGetVectorCoverageInfos (coverage, title, abstract, type, &srid) == false) return; dlg.Create(MainFrame, coverage, title, abstract, type); dlg.ShowModal(); // appending a delayed event so to really update the Tree AddPendingEvent(evt); } void MyTableTree::OnCmdNewRasterStyle(wxCommandEvent & WXUNUSED(event)) { // // menu event - new Raster Style creation required // int ret; wxString lastDir; wxString path; LoadRasterStyleDialog dlg; wxString suffixList = wxT("XML Document (*.xml)|*.xml|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("Add New SLD/SE Raster Style(s)"), wxT(""), wxT("style.xml"), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { int count; wxArrayString paths; fileDialog.GetPaths(paths); count = paths.GetCount(); path = paths.Item(0); int more = count - 1; if (count >= 2) { path += wxT("\n") + paths.Item(1); more--; } wxFileName file(path); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); if (more > 0) { char dummy[128]; sprintf(dummy, "\n(and %d more %s)", more, (more > 1) ? "files" : "file"); path += wxString::FromUTF8(dummy); } dlg.Create(MainFrame, paths, path); dlg.ShowModal(); } } void MyTableTree::OnCmdReloadRasterStyle(wxCommandEvent & WXUNUSED(event)) { // // menu event - reloading a Raster Style was required // int ret; wxString lastDir; wxString path; ReloadRasterStyleDialog dlg; wxString suffixList = wxT("XML Document (*.xml)|*.xml|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT ("Reloading an already existing SLD/SE Raster Style"), wxT(""), wxT("style.xml"), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); wxFileName file(path); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); dlg.Create(MainFrame, path); dlg.ShowModal(); } } void MyTableTree::OnCmdUnregisterRasterStyle(wxCommandEvent & WXUNUSED(event)) { // // menu event - UnRegistering a Raster Style was required // UnregisterRasterStyleDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree::OnCmdRasterSRIDs(wxCommandEvent & WXUNUSED(event)) { // // menu event - Handling Raster Coverage alternative SRIDs // RasterSRIDsDialog dlg; dlg.Create(MainFrame, CurrentRasterCoverageName); dlg.ShowModal(); } void MyTableTree::OnCmdRasterKeywords(wxCommandEvent & WXUNUSED(event)) { // // menu event - Handling Raster Coverage Keywords // RasterKeywordsDialog dlg; dlg.Create(MainFrame, CurrentRasterCoverageName); dlg.ShowModal(); } void MyTableTree::OnCmdRegisterExternalGraphic(wxCommandEvent & WXUNUSED(event)) { // // menu event - new External Graphic creation required // int ret; wxString lastDir; wxString path; LoadExternalGraphicDialog dlg; wxString suffixList = wxT("Graphic resource (*.png;*.jpg;*.gif;*.svg)|*.png;*.jpg;*.gif;*.svg|"); suffixList += wxT("PNG image (*.png)|*.png|"); suffixList += wxT("JPEG image (*.jpg)|*.jpg|"); suffixList += wxT("GIF image (*.gif)|*.gif|"); suffixList += wxT("SVG symbol (*.svg)|*.svg|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("Add New External Graphic resource(s)"), wxT(""), wxT(""), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { int count; wxArrayString paths; fileDialog.GetPaths(paths); count = paths.GetCount(); path = paths.Item(0); int more = count - 1; if (count >= 2) { path += wxT("\n") + paths.Item(1); more--; } wxFileName file(path); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); if (more > 0) { char dummy[128]; sprintf(dummy, "\n(and %d more %s)", more, (more > 1) ? "files" : "file"); path += wxString::FromUTF8(dummy); } dlg.Create(MainFrame, paths, path); dlg.ShowModal(); } } void MyTableTree:: OnCmdUnregisterExternalGraphic(wxCommandEvent & WXUNUSED(event)) { // // menu event - UnRegistering an External Graphic was required // UnregisterExternalGraphicDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree::OnCmdRegisterTextFont(wxCommandEvent & WXUNUSED(event)) { // // menu event - new Text Font creation required // int ret; wxString lastDir; wxString path; LoadTextFontDialog dlg; wxString suffixList = wxT("Text Font (*.ttf)|*.ttf|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("Add New Text Font(s)"), wxT(""), wxT(""), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { int count; wxArrayString paths; fileDialog.GetPaths(paths); count = paths.GetCount(); path = paths.Item(0); int more = count - 1; if (count >= 2) { path += wxT("\n") + paths.Item(1); more--; } wxFileName file(path); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); if (more > 0) { char dummy[128]; sprintf(dummy, "\n(and %d more %s)", more, (more > 1) ? "files" : "file"); path += wxString::FromUTF8(dummy); } dlg.Create(MainFrame, paths, path); dlg.ShowModal(); } } void MyTableTree::OnCmdUnregisterTextFont(wxCommandEvent & WXUNUSED(event)) { // // menu event - UnRegistering a Text Font was required // MainFrame->DoCreateStylingTables(); UnregisterTextFontDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree::OnCmdNewVectorStyle(wxCommandEvent & WXUNUSED(event)) { // // menu event - new Vector Style creation required // int ret; wxString lastDir; wxString path; LoadVectorStyleDialog dlg; wxString suffixList = wxT("XML Document (*.xml)|*.xml|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT("Add New SLD/SE Vector Style(s)"), wxT(""), wxT("style.xml"), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { int count; wxArrayString paths; fileDialog.GetPaths(paths); count = paths.GetCount(); path = paths.Item(0); int more = count - 1; if (count >= 2) { path += wxT("\n") + paths.Item(1); more--; } wxFileName file(path); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); if (more > 0) { char dummy[128]; sprintf(dummy, "\n(and %d more %s)", more, (more > 1) ? "files" : "file"); path += wxString::FromUTF8(dummy); } dlg.Create(MainFrame, paths, path); dlg.ShowModal(); } } void MyTableTree::OnCmdReloadVectorStyle(wxCommandEvent & WXUNUSED(event)) { // // menu event - reloading a Vector Style was required // int ret; wxString lastDir; wxString path; ReloadVectorStyleDialog dlg; wxString suffixList = wxT("XML Document (*.xml)|*.xml|"); suffixList += wxT("All files (*.*)|*.*"); wxFileDialog fileDialog(this, wxT ("Reloading an already existing SLD/SE Vector Style"), wxT(""), wxT("style.xml"), suffixList, wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxDefaultPosition, wxDefaultSize, wxT("filedlg")); lastDir = MainFrame->GetLastDirectory(); if (lastDir.Len() >= 1) fileDialog.SetDirectory(lastDir); ret = fileDialog.ShowModal(); if (ret == wxID_OK) { path = fileDialog.GetPath(); wxFileName file(path); lastDir = file.GetPath(); MainFrame->SetLastDirectory(lastDir); dlg.Create(MainFrame, path); dlg.ShowModal(); } } void MyTableTree::OnCmdUnregisterVectorStyle(wxCommandEvent & WXUNUSED(event)) { // // menu event - UnRegistering a Vector Style was required // UnregisterVectorStyleDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree:: OnCmdRasterSymbolizerContrast(wxCommandEvent & WXUNUSED(event)) { // // menu event - the RasterSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); RasterSymbolizerContrastDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree:: OnCmdRasterSymbolizerChannelRgb(wxCommandEvent & WXUNUSED(event)) { // // menu event - the RasterSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); RasterSymbolizerChannelRgbDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree:: OnCmdRasterSymbolizerChannelGray(wxCommandEvent & WXUNUSED(event)) { // // menu event - the RasterSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); RasterSymbolizerChannelGrayDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree:: OnCmdRasterSymbolizerCategorize(wxCommandEvent & WXUNUSED(event)) { // // menu event - the RasterSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); RasterSymbolizerCategorizeDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree:: OnCmdRasterSymbolizerInterpolate(wxCommandEvent & WXUNUSED(event)) { // // menu event - the RasterSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); RasterSymbolizerInterpolateDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree:: OnCmdRasterSymbolizerShadedRelief(wxCommandEvent & WXUNUSED(event)) { // // menu event - the RasterSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); RasterSymbolizerShadedReliefDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree:: OnCmdRasterSymbolizerMonochrome(wxCommandEvent & WXUNUSED(event)) { // // menu event - the RasterSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); RasterSymbolizerMonochromeDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree::OnCmdSimpleLineSymbolizer(wxCommandEvent & WXUNUSED(event)) { // // menu event - the LineSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); SimpleLineSymbolizerDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree::OnCmdSimplePolygonSymbolizer(wxCommandEvent & WXUNUSED(event)) { // // menu event - the PolygonSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); SimplePolygonSymbolizerDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree::OnCmdSimplePointSymbolizer(wxCommandEvent & WXUNUSED(event)) { // // menu event - the PointSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); SimplePointSymbolizerDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } void MyTableTree::OnCmdSimpleTextSymbolizer(wxCommandEvent & WXUNUSED(event)) { // // menu event - the TextSymbolizer tool was invoked // MainFrame->DoCreateStylingTables(); SimpleTextSymbolizerDialog dlg; dlg.Create(MainFrame); dlg.ShowModal(); } bool MyTableTree::GetCurrentlySelectedTable(wxString & table_name) { // attempting to retrieve the currenlty selected Table Name if (CurrentItem.IsOk() != true) return false; MyObject *obj = (MyObject *) GetItemData(CurrentItem); if (obj == NULL) return false; if (obj->GetType() == MY_TABLE && obj->IsAttached() != true) { table_name = obj->GetName(); return true; } return false; } void MyTableTree::OnCmdSldSeVectorStyles(wxCommandEvent & WXUNUSED(event)) { // // menu event - Handling Vector Coverage SLD/SE styles // VectorCoverageStylesDialog dlg; dlg.Create(MainFrame, CurrentVectorCoverageName); dlg.ShowModal(); } void MyTableTree::OnCmdVectorSRIDs(wxCommandEvent & WXUNUSED(event)) { // // menu event - Handling Vector Coverage alternative SRIDs // VectorSRIDsDialog dlg; dlg.Create(MainFrame, CurrentVectorCoverageName); dlg.ShowModal(); } void MyTableTree::OnCmdVectorKeywords(wxCommandEvent & WXUNUSED(event)) { // // menu event - Handling Vector Coverage Keywords // VectorKeywordsDialog dlg; dlg.Create(MainFrame, CurrentVectorCoverageName); dlg.ShowModal(); } void MyTableTree::OnCreateRasterCoverage(wxCommandEvent & WXUNUSED(event)) { // // creating a Raster Coverage // int ret; CreateRasterCoverageDialog dlg; dlg.Create(MainFrame); ret = dlg.ShowModal(); if (ret == wxID_OK) { wxString CoverageName = dlg.GetCoverageName(); wxString Title = dlg.GetTitle(); wxString Abstract = dlg.GetAbstract(); int SampleType = dlg.GetSampleType(); int PixelType = dlg.GetPixelType(); int NumBands = dlg.GetNumBands(); int Compression = dlg.GetCompression(); int Quality = dlg.GetQuality(); int TileWidth = dlg.GetTileWidth(); int TileHeight = dlg.GetTileHeight(); bool NotGeoreferenced = dlg.IsNotGeoreferenced(); int Srid = dlg.GetSrid(); double HorzResolution = dlg.GetHorzResolution(); double VertResolution = dlg.GetVertResolution(); wxString NoData = dlg.GetNoData(); bool StrictResolution = dlg.IsStrictResolution(); bool MixedResolutions = dlg.IsMixedResolutions(); bool InputPaths = dlg.IsInputPaths(); bool MD5 = dlg.IsMD5(); bool Summary = dlg.IsSummary(); int RedBand = dlg.GetRedBand(); int GreenBand = dlg.GetGreenBand(); int BlueBand = dlg.GetBlueBand(); int NIRband = dlg.GetNIRband(); bool AutoNDVI = dlg.IsAutoNDVI(); if (MainFrame->CreateRasterCoverage (CoverageName, Title, Abstract, SampleType, PixelType, NumBands, Compression, Quality, TileWidth, TileHeight, NotGeoreferenced, Srid, HorzResolution, VertResolution, NoData, StrictResolution, MixedResolutions, InputPaths, MD5, Summary, RedBand, GreenBand, BlueBand, NIRband, AutoNDVI) == true) { wxMessageBox(wxT("Raster Coverage ") + CoverageName + wxT(" successfully created"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, Tree_Refresh); OnCmdRefresh(evt); } } } spatialite_gui-2.0.0-devel/compile0000775000175000017500000001624512543275035014130 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: spatialite_gui-2.0.0-devel/COPYING0000664000175000017500000010451312543275035013601 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . spatialite_gui-2.0.0-devel/QueryViewComposer.cpp0000664000175000017500000057527612544026240016735 00000000000000/* / QueryViewComposer.cpp / Query/View Composer / / version 1.7, 2013 May 8 / / Author: Sandro Furieri a-furieri@lqt.it / / Copyright (C) 2009-2013 Alessandro Furieri / / This program is free software: you can redistribute it and/or modify / it under the terms of the GNU General Public License as published by / the Free Software Foundation, either version 3 of the License, or / (at your option) any later version. / / This program is distributed in the hope that it will be useful, / but WITHOUT ANY WARRANTY; without even the implied warranty of / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the / GNU General Public License for more details. / / You should have received a copy of the GNU General Public License / along with this program. If not, see . / */ #include "Classdef.h" void MyFrame::QueryViewComposer() { // // query/view composer invoked // int ret; char *errMsg = NULL; ComposerDialog dlg; dlg.Create(this); int metadataType = GetMetaDataType(); if (dlg.ShowModal() == wxID_OK) { if (dlg.IsSpatialView() == true) { // creating a Spatial View ::wxBeginBusyCursor(); ret = sqlite3_exec(GetSqlite(), dlg.GetSqlSample().ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } if (dlg.IsWritable1() == true) { // creating Triggers supporting RW operations on the Main Table ret = sqlite3_exec(GetSqlite(), dlg.GetSqlTriggerInsert().ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ret = sqlite3_exec(GetSqlite(), dlg.GetSqlTriggerUpdate().ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ret = sqlite3_exec(GetSqlite(), dlg.GetSqlTriggerDelete().ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } } wxString sql = wxT("INSERT INTO views_geometry_columns "); if (metadataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 sql += wxT ("(view_name, view_geometry, view_rowid, f_table_name, f_geometry_column, read_only)"); } else { // legacy metadata style <= v.3.1.0 sql += wxT ("(view_name, view_geometry, view_rowid, f_table_name, f_geometry_column)"); } sql += wxT(" VALUES ("); if (metadataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 sql += wxT("Lower('"); sql += dlg.GetViewName(); sql += wxT("'), Lower('"); sql += dlg.GetGeometryColumnAlias(); sql += wxT("'), Lower('"); sql += dlg.GetGeometryRowidAlias(); sql += wxT("'), Lower('"); if (dlg.IsViewGeomTable2() == true) sql += dlg.GetTableName2(); else sql += dlg.GetTableName1(); sql += wxT("'), Lower('"); sql += dlg.GetGeometryColumn(); if (metadataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 if (dlg.IsWritable1() == true) sql += wxT("'), 0)"); else sql += wxT("'), 1)"); } } else { // legacy metadata style <= v.3.1.0 sql += wxT("'"); sql += dlg.GetViewName(); sql += wxT("', '"); sql += dlg.GetGeometryColumnAlias(); sql += wxT("', '"); sql += dlg.GetGeometryRowidAlias(); sql += wxT("', '"); if (dlg.IsViewGeomTable2() == true) sql += dlg.GetTableName2(); else sql += dlg.GetTableName1(); sql += wxT("', '"); sql += dlg.GetGeometryColumn(); sql += wxT("')"); } ret = sqlite3_exec(GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } if (metadataType == METADATA_CURRENT) { // current metadata style >= v.4.0.0 // creating the Spatial View Auth row sql = wxT("INSERT INTO views_geometry_columns_auth "); sql += wxT("(view_name, view_geometry, hidden)"); sql += wxT(" VALUES (Lower('"); sql += dlg.GetViewName(); sql += wxT("'), Lower('"); sql += dlg.GetGeometryColumnAlias(); sql += wxT("'), 0)"); ret = sqlite3_exec(GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } // creating the Spatial View Statistics row sql = wxT("INSERT INTO views_geometry_columns_statistics "); sql += wxT("(view_name, view_geometry)"); sql += wxT(" VALUES (Lower('"); sql += dlg.GetViewName(); sql += wxT("'), Lower('"); sql += dlg.GetGeometryColumnAlias(); sql += wxT("'))"); ret = sqlite3_exec(GetSqlite(), sql.ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } } ::wxEndBusyCursor(); wxMessageBox(wxT("The Spatial View ") + dlg.GetViewName() + wxT("\nwas successfully created"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); return; } else if (dlg.IsPlainView() == true) { // creating an ordinary View ::wxBeginBusyCursor(); ret = sqlite3_exec(GetSqlite(), dlg.GetSqlSample().ToUTF8(), NULL, NULL, &errMsg); if (ret != SQLITE_OK) { wxMessageBox(wxT("SQLite SQL error: ") + wxString::FromUTF8(errMsg), wxT("spatialite_gui"), wxOK | wxICON_ERROR, this); sqlite3_free(errMsg); ::wxEndBusyCursor(); return; } ::wxEndBusyCursor(); wxMessageBox(wxT("The View ") + dlg.GetViewName() + wxT("\nwas successfully created"), wxT("spatialite_gui"), wxOK | wxICON_INFORMATION, this); InitTableTree(); return; } else { // executing the SQL statement SetSql(dlg.GetSqlSample(), true); } } } bool ComposerDialog::Create(MyFrame * parent) { // // creating the dialog // MainFrame = parent; IncompleteSql = true; Table2Enabled = false; TableAlias1 = wxT("a"); TableAlias2 = wxT("b"); LeftJoin = false; Match2Enabled = false; Match3Enabled = false; Where1Enabled = false; Where2Enabled = false; Where3Enabled = false; Where1Table2 = false; Where2Table2 = false; Where3Table2 = false; AndOr12 = true; AndOr23 = true; Order1Enabled = false; Order2Enabled = false; Order3Enabled = false; Order4Enabled = false; Order1Table2 = false; Order2Table2 = false; Order3Table2 = false; Order4Table2 = false; Order1Desc = false; Order2Desc = false; Order3Desc = false; Order4Desc = false; ViewGeomTable2 = false; PlainView = false; SpatialView = false; Writable1 = false; Writable2 = false; if (wxDialog::Create(parent, wxID_ANY, wxT("Query / View Composer")) == false) return false; // populates individual controls TableList.Populate(MainFrame->GetSqlite()); CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); UpdateSqlSample(); return true; } void ComposerDialog::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the SQL sample row wxBoxSizer *sqlBoxSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(sqlBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticBox *sqlBox = new wxStaticBox(this, wxID_STATIC, wxT("SQL statement"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *sqlSizer = new wxStaticBoxSizer(sqlBox, wxVERTICAL); sqlBoxSizer->Add(sqlSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); SqlCtrl = new wxTextCtrl(this, ID_QVC_SQL, wxT(""), wxDefaultPosition, wxSize(600, 150), wxTE_READONLY | wxTE_MULTILINE | wxHSCROLL | wxTE_RICH); sqlSizer->Add(SqlCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the tab control TabCtrl = new wxNotebook(this, ID_QVC_TAB, wxDefaultPosition, wxDefaultSize, wxNB_TOP); boxSizer->Add(TabCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // tab - Page #1 Page1 = new ComposerMainPage(); Page1->Create(this); TabCtrl->AddPage(Page1, wxT("Main"), true); // tab - Page #2 Page2 = new ComposerFilterPage(); Page2->Create(this); TabCtrl->AddPage(Page2, wxT("Filter"), true); // tab - Page #3 Page3 = new ComposerOrderPage(); Page3->Create(this); TabCtrl->AddPage(Page3, wxT("Order"), true); // tab - Page #4 Page4 = new ComposerViewPage(); Page4->Create(this); TabCtrl->AddPage(Page4, wxT("View"), true); TabCtrl->ChangeSelection(0); // appending the OK / CANCEL buttons wxBoxSizer *btnSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(btnSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxButton *okBtn = new wxButton(this, wxID_OK, wxT("&Ok")); btnSizer->Add(okBtn, 0, wxALIGN_LEFT | wxALL, 5); wxButton *cancelBtn = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); btnSizer->Add(cancelBtn, 0, wxALIGN_LEFT | wxALL, 5); // appending the event handlers Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) & ComposerDialog::OnOk); } void ComposerDialog::OnOk(wxCommandEvent & WXUNUSED(event)) { // // all done: // if (IncompleteSql == true) { wxMessageBox(wxT ("Your SQL statement isn't yet completed ...\n\nplease, check better and then retry"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } if (SpatialView == true && GeometryColumn.Len() == 0) { wxMessageBox(wxT ("You MUST specify a Geometry Column to create a Spatial View ...\n\nplease, check better and then retry"), wxT("spatialite_gui"), wxOK | wxICON_WARNING, this); return; } PrepareSqlTriggers(); wxDialog::EndModal(wxID_OK); } void ComposerDialog::Table1Status(bool ok) { // // enabling/disabling dependent fields in following pages // Page2->Table1Status(ok); Page3->Table1Status(ok); Page4->Table1Status(ok); UpdateSqlSample(); } void ComposerDialog::Table2Status(bool ok) { // // enabling/disabling dependent fields in following pages // Page2->Table2Status(ok); Page3->Table2Status(ok); Page4->Table2Status(ok); UpdateSqlSample(); } void ComposerDialog::SelectGeometryColumn() { // // forcing the SpatialView Geometry Column to be selected anyway // wxString rowid = wxT("ROWID"); if (GeometryColumn.Len() > 0) { if (ViewGeomTable2 == true) { Column2List.SetState(GeometryColumn); Page1->SelectGeometryColumn(GeometryColumn, true); Column2List.SetState(rowid); Page1->SelectGeometryColumn(rowid, true); } else { Column1List.SetState(GeometryColumn); Page1->SelectGeometryColumn(GeometryColumn, false); Column1List.SetState(rowid); Page1->SelectGeometryColumn(rowid, false); } } } bool ComposerDialog::IsDuplicateAlias(wxString & alias) { // // checkink an alias name to be unique // AuxColumn *pC; pC = Column1List.GetFirst(); while (pC) { if (pC->GetAliasName().CmpNoCase(alias) == 0) return true; pC = pC->GetNext(); } pC = Column2List.GetFirst(); while (pC) { if (pC->GetAliasName().CmpNoCase(alias) == 0) return true; pC = pC->GetNext(); } return false; } void ComposerDialog::SetAliases() { // // setting up column alias names // AuxColumn *pC; wxString alias; int antiAlias; char dummy[64]; // cleaning up the old alias names pC = Column1List.GetFirst(); while (pC) { pC->SetAliasName(alias); pC = pC->GetNext(); } pC = Column2List.GetFirst(); while (pC) { pC->SetAliasName(alias); pC = pC->GetNext(); } // setting up the current alias names pC = Column1List.GetFirst(); while (pC) { if (pC->IsSelected() == false) { pC = pC->GetNext(); continue; } alias = pC->GetName(); if (IsDuplicateAlias(alias) == true) { antiAlias = 1; while (1) { sprintf(dummy, "_%d", antiAlias++); alias = pC->GetName() + wxString::FromUTF8(dummy); if (IsDuplicateAlias(alias) == false) break; } } pC->SetAliasName(alias); if (ViewGeomTable2 == false) { if (pC->GetName().CmpNoCase(GeometryColumn) == 0) GeometryColumnAlias = pC->GetAliasName(); if (pC->GetName() == wxString::FromUTF8("ROWID")) GeometryRowidAlias = pC->GetAliasName(); } pC = pC->GetNext(); } pC = Column2List.GetFirst(); while (pC) { if (pC->IsSelected() == false) { pC = pC->GetNext(); continue; } alias = pC->GetName(); if (IsDuplicateAlias(alias) == true) { antiAlias = 1; while (1) { sprintf(dummy, "_%d", antiAlias++); alias = pC->GetName() + wxString::FromUTF8(dummy); if (IsDuplicateAlias(alias) == false) break; } } pC->SetAliasName(alias); if (ViewGeomTable2 == true) { if (pC->GetName().CmpNoCase(GeometryColumn) == 0) GeometryColumnAlias = pC->GetAliasName(); if (pC->GetName() == wxString::FromUTF8("ROWID")) GeometryRowidAlias = pC->GetAliasName(); } pC = pC->GetNext(); } } void ComposerDialog::UpdateSqlSample() { // // composing the SQL statement // AuxColumn *pCol; bool comma; int markStart[4192]; int markStop[4192]; int markStyle[4192]; int nextMark = 0; int base; char xname[1024]; wxString undefined = wxT("~???~"); wxString selectedColumns; IncompleteSql = false; SetAliases(); SqlSample = wxT(""); if (PlainView == true || SpatialView == true) { // CREATE VIEW ... AS markStyle[nextMark] = 2; markStart[nextMark] = 0; SqlSample += wxT("CREATE VIEW"); markStop[nextMark++] = SqlSample.Len(); if (ViewName.Len() == 0) { SqlSample += wxT(" "); markStyle[nextMark] = 1; markStart[nextMark] = SqlSample.Len(); SqlSample += undefined; IncompleteSql = true; markStop[nextMark++] = SqlSample.Len(); SqlSample += wxT(" "); } else { SqlSample += wxT(" "); strcpy(xname, ViewName.ToUTF8()); MainFrame->DoubleQuotedSql(xname); SqlSample += wxString::FromUTF8(xname); SqlSample += wxT(" "); } markStyle[nextMark] = 2; markStart[nextMark] = SqlSample.Len(); SqlSample += wxT("AS"); markStop[nextMark++] = SqlSample.Len(); SqlSample += wxT("\n"); } markStyle[nextMark] = 2; markStart[nextMark] = SqlSample.Len(); int startSelect = SqlSample.Len(); SqlSample += wxT("SELECT"); markStop[nextMark++] = SqlSample.Len(); SqlSample += wxT(" "); base = SqlSample.Len(); // SELECT a,b,c [from the main table] int selectCount = SqlSample.Len() - startSelect; comma = false; pCol = Column1List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (comma) { markStyle[nextMark] = 2; markStart[nextMark] = base + selectedColumns.Len(); selectedColumns += wxT(","); markStop[nextMark++] = base + selectedColumns.Len(); if (selectCount > 50) { selectedColumns += wxT("\n "); selectCount = 4; } else { selectedColumns += wxT(" "); selectCount += 2; } } wxString col; int baseCol = base + selectedColumns.Len(); if (Table2Enabled == false) ; else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); col += wxString::FromUTF8(xname); col += wxT("."); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); col += wxString::FromUTF8(xname); col += wxT("."); } } strcpy(xname, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); col += wxString::FromUTF8(xname); col += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = baseCol + col.Len(); col += wxT("AS"); markStop[nextMark++] = baseCol + col.Len(); col += wxT(" "); strcpy(xname, pCol->GetAliasName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); col += wxString::FromUTF8(xname); selectCount += col.Len(); selectedColumns += col; comma = true; } pCol = pCol->GetNext(); } if (Table2Enabled == true && Column2List.HasSelectedColumns() == true) { // SELECT a,b,c [from Table#2] pCol = Column2List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (comma) { markStyle[nextMark] = 2; markStart[nextMark] = base + selectedColumns.Len(); selectedColumns += wxT(","); markStop[nextMark++] = base + selectedColumns.Len(); } wxString col; int baseCol = base + selectedColumns.Len(); if (selectCount > 50) { col += wxT("\n "); selectCount = 0; } else { col += wxT(" "); selectCount += 2; } if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); col += wxString::FromUTF8(xname); col += wxT("."); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); col += wxString::FromUTF8(xname); col += wxT("."); } strcpy(xname, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); col += wxString::FromUTF8(xname); col += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = baseCol + col.Len(); col += wxT("AS"); markStop[nextMark++] = baseCol + col.Len(); col += wxT(" "); strcpy(xname, pCol->GetAliasName().ToUTF8()); MainFrame->DoubleQuotedSql(xname); col += wxString::FromUTF8(xname); selectCount += col.Len(); selectedColumns += col; comma = true; } pCol = pCol->GetNext(); } } if (selectedColumns.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = SqlSample.Len(); SqlSample += undefined; IncompleteSql = true; markStop[nextMark++] = SqlSample.Len(); } else SqlSample += selectedColumns; // the FROM clause SqlSample += wxT("\n"); markStyle[nextMark] = 2; markStart[nextMark] = SqlSample.Len(); SqlSample += wxT("FROM"); markStop[nextMark++] = SqlSample.Len(); SqlSample += wxT(" "); if (TableName1.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = SqlSample.Len(); SqlSample += undefined; IncompleteSql = true; markStop[nextMark++] = SqlSample.Len(); } else { base = SqlSample.Len(); strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); wxString from = wxString::FromUTF8(xname); if (Table2Enabled == false) ; else { if (TableAlias1.Len() == 0) ; else { from += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = base + from.Len(); from += wxT("AS"); markStop[nextMark++] = base + from.Len(); from += wxT(" "); strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); from += wxString::FromUTF8(xname); } } SqlSample += from; } if (Table2Enabled == true) { SqlSample += wxT("\n"); int onIniJoin = SqlSample.Len(); if (LeftJoin == true) { markStyle[nextMark] = 2; markStart[nextMark] = SqlSample.Len(); SqlSample += wxT("LEFT JOIN"); markStop[nextMark++] = SqlSample.Len(); } else { markStyle[nextMark] = 2; markStart[nextMark] = SqlSample.Len(); SqlSample += wxT("JOIN"); markStop[nextMark++] = SqlSample.Len(); } SqlSample += wxT(" "); if (TableName2.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = SqlSample.Len(); SqlSample += undefined; IncompleteSql = true; markStop[nextMark++] = SqlSample.Len(); } else { base = SqlSample.Len(); strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); wxString join = wxString::FromUTF8(xname); if (TableAlias2.Len() == 0) ; else { join += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = base + join.Len(); join += wxT("AS"); markStop[nextMark++] = base + join.Len(); join += wxT(" "); strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); join += wxString::FromUTF8(xname); } int onCount = SqlSample.Len() - onIniJoin; int baseMatch = join.Len(); wxString match; bool isUsing = false; if (Match2Enabled == false && Match3Enabled == false && Match1Table1 == Match1Table2) isUsing = true; if (Match2Enabled == true && Match3Enabled == false && Match1Table1 == Match1Table2 && Match2Table1 == Match2Table2) isUsing = true; if (Match2Enabled == false && Match3Enabled == true && Match1Table1 == Match1Table2 && Match3Table1 == Match3Table2) isUsing = true; if (Match2Enabled == true && Match3Enabled == true && Match1Table1 == Match1Table2 && Match2Table1 == Match2Table2 && Match3Table1 == Match3Table2) isUsing = true; if (isUsing == true) { match = wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = base + baseMatch + match.Len(); match += wxT("USING ("); markStop[nextMark++] = base + baseMatch + match.Len(); if (Match1Table1.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + baseMatch + match.Len(); match += undefined; IncompleteSql = true; markStop[nextMark++] = base + baseMatch + match.Len(); } else { strcpy(xname, Match1Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); match += wxString::FromUTF8(xname); } if (Match2Enabled == true) { markStyle[nextMark] = 2; markStart[nextMark] = base + baseMatch + match.Len(); match += wxT(", "); markStop[nextMark++] = base + baseMatch + match.Len(); if (Match2Table1.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + baseMatch + match.Len(); match += undefined; IncompleteSql = true; markStop[nextMark++] = base + baseMatch + match.Len(); } else { strcpy(xname, Match2Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); match += wxString::FromUTF8(xname); } } if (Match3Enabled == true) { markStyle[nextMark] = 2; markStart[nextMark] = base + baseMatch + match.Len(); match += wxT(", "); markStop[nextMark++] = base + baseMatch + match.Len(); if (Match3Table1.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + baseMatch + match.Len(); match += undefined; IncompleteSql = true; markStop[nextMark++] = base + baseMatch + match.Len(); } else { strcpy(xname, Match3Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); match += wxString::FromUTF8(xname); } } markStyle[nextMark] = 2; markStart[nextMark] = base + baseMatch + match.Len(); match += wxT(")"); markStop[nextMark++] = base + baseMatch + match.Len(); } else { match = wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = base + baseMatch + match.Len(); match += wxT("ON ("); markStop[nextMark++] = base + baseMatch + match.Len(); int baseCondition = match.Len(); wxString condition; if (Match1Table1.Len() > 0 || Match1Table2.Len() > 0) { if (Match1Table1.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + baseMatch + baseCondition + condition.Len(); condition += undefined; IncompleteSql = true; markStop[nextMark++] = base + baseMatch + baseCondition + condition.Len(); } else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } condition += wxT("."); strcpy(xname, Match1Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } condition += wxT(" = "); if (Match1Table2.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + baseMatch + baseCondition + condition.Len(); condition += undefined; IncompleteSql = true; markStop[nextMark++] = base + baseMatch + baseCondition + condition.Len(); } else { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } condition += wxT("."); strcpy(xname, Match1Table2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } onCount += condition.Len(); } if (Match2Enabled && (Match2Table1.Len() > 0 || Match2Table2.Len() > 0)) { if (onCount > 30) { condition += wxT("\n "); onCount = 4; } else condition += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = base + baseMatch + baseCondition + condition.Len(); condition += wxT("AND"); markStop[nextMark++] = base + baseMatch + baseCondition + condition.Len(); condition += wxT(" "); if (Match2Table1.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + baseMatch + baseCondition + condition.Len(); condition += undefined; IncompleteSql = true; markStop[nextMark++] = base + baseMatch + baseCondition + condition.Len(); } else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } condition += wxT("."); strcpy(xname, Match2Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } condition += wxT(" = "); if (Match2Table2.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + baseMatch + baseCondition + condition.Len(); condition += undefined; IncompleteSql = true; markStop[nextMark++] = base + baseMatch + baseCondition + condition.Len(); } else { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } condition += wxT("."); strcpy(xname, Match2Table2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } onCount += condition.Len(); } if (Match3Enabled && (Match3Table1.Len() > 0 || Match3Table2.Len() > 0)) { if (onCount > 30) { condition += wxT("\n "); onCount = 4; } else condition += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = base + baseMatch + baseCondition + condition.Len(); condition += wxT("AND"); markStop[nextMark++] = base + baseMatch + baseCondition + condition.Len(); condition += wxT(" "); if (Match3Table1.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + baseMatch + baseCondition + condition.Len(); condition += undefined; IncompleteSql = true; markStop[nextMark++] = base + baseMatch + baseCondition + condition.Len(); } else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } condition += wxT("."); strcpy(xname, Match3Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } condition += wxT(" = "); if (Match3Table2.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + baseMatch + baseCondition + condition.Len(); condition += undefined; IncompleteSql = true; markStop[nextMark++] = base + baseMatch + baseCondition + condition.Len(); } else { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } condition += wxT("."); strcpy(xname, Match3Table2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); condition += wxString::FromUTF8(xname); } } if (condition.Len() == 0) { match += undefined; IncompleteSql = true; } else match += condition; markStyle[nextMark] = 2; markStart[nextMark] = base + baseMatch + match.Len(); match += wxT(")"); markStop[nextMark++] = base + baseMatch + match.Len(); } if (match.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = base + join.Len(); join += undefined; IncompleteSql = true; markStop[nextMark++] = base + join.Len(); } else join += match; SqlSample += join; } } if (Where1Enabled == true || Where2Enabled == true || Where3Enabled == true) { // the WHERE clause bool openBraket1 = false; bool openBraket2 = false; bool closeBraket3 = false; bool closeBraket4 = false; SqlSample += wxT("\n"); int whereStart = SqlSample.Len(); markStyle[nextMark] = 2; markStart[nextMark] = SqlSample.Len(); SqlSample += wxT("WHERE"); markStop[nextMark++] = SqlSample.Len(); SqlSample += wxT(" "); int whereCount = SqlSample.Len() - whereStart; if (Where1Enabled == true && Where2Enabled == true && Where3Enabled == true) { if (AndOr12 == false && AndOr23 == true) { openBraket1 = true; closeBraket3 = true; } if (AndOr12 == true && AndOr23 == false) { openBraket2 = true; closeBraket4 = true; } } if (Where1Enabled == true) { int clauseBase = SqlSample.Len(); wxString clause; if (openBraket1 == true) { markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); clause += wxT("("); markStop[nextMark++] = clauseBase + clause.Len(); } if (Where1Column.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = clauseBase + clause.Len(); clause += undefined; IncompleteSql = true; markStop[nextMark++] = clauseBase + clause.Len(); } else { if (Table2Enabled == false) { strcpy(xname, Where1Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { if (Where1Table2 == true) { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } clause += wxT("."); clause += Where1Column; } else { if (TableAlias1.Len() == 0) clause += TableName1; else clause += TableAlias1; clause += wxT("."); clause += Where1Column; } } } clause += wxT(" "); if (Where1Operator.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = clauseBase + clause.Len(); clause += undefined; IncompleteSql = true; markStop[nextMark++] = clauseBase + clause.Len(); } else { markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); clause += Where1Operator; markStop[nextMark++] = clauseBase + clause.Len(); } if (Where1Operator == wxT("IS NULL") || Where1Operator == wxT("IS NOT NULL")) ; else if (Where1Operator == wxT("IN")) { clause += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); clause += wxT("("); markStop[nextMark++] = clauseBase + clause.Len(); int listBase = clauseBase + clause.Len(); wxString cleanList; SqlCleanList(Where1Value, cleanList, markStyle, markStart, markStop, &nextMark, listBase); clause += cleanList; markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); clause += wxT(")"); markStop[nextMark++] = clauseBase + clause.Len(); } else { clause += wxT(" "); bool isNumber = false; long lngTest; double dblTest; if (Where1Value.ToLong(&lngTest) == true) isNumber = true; if (Where1Value.ToDouble(&dblTest) == true) isNumber = true; bool noQuote; wxString cleanSql; if (isNumber == false) noQuote = SqlCleanString(Where1Value, cleanSql); else { noQuote = true; cleanSql = Where1Value; } if (noQuote == false) clause += wxT("'"); clause += cleanSql; if (noQuote == false) clause += wxT("'"); } whereCount += clause.Len(); SqlSample += clause; } if (Where2Enabled == true) { int clauseBase = SqlSample.Len(); wxString clause; if (whereCount > 30) { clause = wxT("\n "); whereCount = 4; } else clause = wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); if (AndOr12 == true) clause += wxT("AND"); else clause += wxT("OR"); markStop[nextMark++] = clauseBase + clause.Len(); clause += wxT(" "); if (openBraket2 == true) { markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); clause += wxT("("); markStop[nextMark++] = clauseBase + clause.Len(); } if (Where2Column.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = clauseBase + clause.Len(); clause += undefined; IncompleteSql = true; markStop[nextMark++] = clauseBase + clause.Len(); } else { if (Table2Enabled == false) { strcpy(xname, Where2Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { if (Where2Table2 == true) { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } clause += wxT("."); strcpy(xname, Where2Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } clause += wxT("."); strcpy(xname, Where2Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } } } clause += wxT(" "); if (Where2Operator.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = clauseBase + clause.Len(); clause += undefined; IncompleteSql = true; markStop[nextMark++] = clauseBase + clause.Len(); } else { markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); clause += Where2Operator; markStop[nextMark++] = clauseBase + clause.Len(); } if (Where2Operator == wxT("IS NULL") || Where2Operator == wxT("IS NOT NULL")) ; else { clause += wxT(" "); bool isNumber = false; long lngTest; double dblTest; if (Where2Value.ToLong(&lngTest) == true) isNumber = true; if (Where2Value.ToDouble(&dblTest) == true) isNumber = true; bool noQuote; wxString cleanSql; if (isNumber == false) noQuote = SqlCleanString(Where2Value, cleanSql); else { noQuote = true; cleanSql = Where2Value; } if (noQuote == false) clause += wxT("'"); clause += cleanSql; if (noQuote == false) clause += wxT("'"); } if (closeBraket3 == true) { markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); clause += wxT(")"); markStop[nextMark++] = clauseBase + clause.Len(); } whereCount += clause.Len(); SqlSample += clause; } if (Where3Enabled == true) { int clauseBase = SqlSample.Len(); wxString clause; if (whereCount > 30) { clause = wxT("\n "); whereCount = 4; } else clause = wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); if (AndOr23 == true) clause += wxT("AND"); else clause += wxT("OR"); markStop[nextMark++] = clauseBase + clause.Len(); clause += wxT(" "); if (Where3Column.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = clauseBase + clause.Len(); clause += undefined; IncompleteSql = true; markStop[nextMark++] = clauseBase + clause.Len(); } else { if (Table2Enabled == false) { strcpy(xname, Where3Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { if (Where3Table2 == true) { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } clause += wxT("."); strcpy(xname, Where3Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } clause += wxT("."); strcpy(xname, Where3Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); clause += wxString::FromUTF8(xname); } } } clause += wxT(" "); if (Where3Operator.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = clauseBase + clause.Len(); clause += undefined; IncompleteSql = true; markStop[nextMark++] = clauseBase + clause.Len(); } else { markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); clause += Where3Operator; markStop[nextMark++] = clauseBase + clause.Len(); } if (Where3Operator == wxT("IS NULL") || Where3Operator == wxT("IS NOT NULL")) ; else { clause += wxT(" "); bool isNumber = false; long lngTest; double dblTest; if (Where3Value.ToLong(&lngTest) == true) isNumber = true; if (Where3Value.ToDouble(&dblTest) == true) isNumber = true; bool noQuote; wxString cleanSql; if (isNumber == false) noQuote = SqlCleanString(Where3Value, cleanSql); else { noQuote = true; cleanSql = Where3Value; } if (noQuote == false) clause += wxT("'"); clause += cleanSql; if (noQuote == false) clause += wxT("'"); } if (closeBraket4 == true) { markStyle[nextMark] = 2; markStart[nextMark] = clauseBase + clause.Len(); clause += wxT(")"); markStop[nextMark++] = clauseBase + clause.Len(); } SqlSample += clause; } } if (Order1Enabled == true || Order2Enabled == true || Order3Enabled == true || Order4Enabled == true) { // the ORDER BY clause bool comma = false; SqlSample += wxT("\n"); int orderStart = SqlSample.Len(); markStyle[nextMark] = 2; markStart[nextMark] = SqlSample.Len(); SqlSample += wxT("ORDER BY"); markStop[nextMark++] = SqlSample.Len(); SqlSample += wxT(" "); int orderCount = SqlSample.Len() - orderStart; if (Order1Enabled == true) { int orderBase = SqlSample.Len(); wxString order; if (Order1Column.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = orderBase + order.Len(); order += undefined; IncompleteSql = true; markStop[nextMark++] = orderBase + order.Len(); } else { if (Table2Enabled == false) { strcpy(xname, Order1Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { if (Order1Table2 == true) { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } order += wxT("."); strcpy(xname, Order1Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } order += wxT("."); strcpy(xname, Order1Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } } } if (Order1Desc == true) { order += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = orderBase + order.Len(); order += wxT("DESC"); markStop[nextMark++] = orderBase + order.Len(); } orderCount += order.Len(); SqlSample += order; comma = true; } if (Order2Enabled == true) { int orderBase = SqlSample.Len(); wxString order; if (comma == true) { markStyle[nextMark] = 2; markStart[nextMark] = orderBase + order.Len(); order += wxT(","); markStop[nextMark++] = orderBase + order.Len(); } if (orderCount > 40) { order += wxT("\n "); orderCount = 4; } else order += wxT(" "); if (Order2Column.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = orderBase + order.Len(); order += undefined; IncompleteSql = true; markStop[nextMark++] = orderBase + order.Len(); } else { if (Table2Enabled == false) { strcpy(xname, Order2Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { if (Order2Table2 == true) { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } order += wxT("."); strcpy(xname, Order2Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } order += wxT("."); strcpy(xname, Order2Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } } } if (Order2Desc == true) { order += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = orderBase + order.Len(); order += wxT("DESC"); markStop[nextMark++] = orderBase + order.Len(); } orderCount += order.Len(); SqlSample += order; comma = true; } if (Order3Enabled == true) { int orderBase = SqlSample.Len(); wxString order; if (comma == true) { markStyle[nextMark] = 2; markStart[nextMark] = orderBase + order.Len(); order += wxT(","); markStop[nextMark++] = orderBase + order.Len(); } if (orderCount > 40) { order += wxT("\n "); orderCount = 4; } else order += wxT(" "); if (Order3Column.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = orderBase + order.Len(); order += undefined; IncompleteSql = true; markStop[nextMark++] = orderBase + order.Len(); } else { if (Table2Enabled == false) { strcpy(xname, Order1Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { if (Order3Table2 == true) { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } order += wxT("."); strcpy(xname, Order3Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } order += wxT("."); strcpy(xname, Order3Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } } } if (Order3Desc == true) { order += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = orderBase + order.Len(); order += wxT("DESC"); markStop[nextMark++] = orderBase + order.Len(); } orderCount += order.Len(); SqlSample += order; comma = true; } if (Order4Enabled == true) { int orderBase = SqlSample.Len(); wxString order; if (comma == true) { markStyle[nextMark] = 2; markStart[nextMark] = orderBase + order.Len(); order += wxT(","); markStop[nextMark++] = orderBase + order.Len(); } if (orderCount > 40) { order += wxT("\n "); orderCount = 4; } else order += wxT(" "); if (Order4Column.Len() == 0) { markStyle[nextMark] = 1; markStart[nextMark] = orderBase + order.Len(); order += undefined; IncompleteSql = true; markStop[nextMark++] = orderBase + order.Len(); } else { if (Table2Enabled == false) { strcpy(xname, Order1Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { if (Order4Table2 == true) { if (TableAlias2.Len() == 0) { strcpy(xname, TableName2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias2.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } order += wxT("."); strcpy(xname, Order4Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { if (TableAlias1.Len() == 0) { strcpy(xname, TableName1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } else { strcpy(xname, TableAlias1.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } order += wxT("."); strcpy(xname, Order4Column.ToUTF8()); MainFrame->DoubleQuotedSql(xname); order += wxString::FromUTF8(xname); } } } if (Order4Desc == true) { order += wxT(" "); markStyle[nextMark] = 2; markStart[nextMark] = orderBase + order.Len(); order += wxT("DESC"); markStop[nextMark++] = orderBase + order.Len(); } SqlSample += order; } } SqlCtrl->Hide(); SqlCtrl->SetValue(SqlSample); wxColour bgColor(255, 255, 255); if (IncompleteSql == true || (SpatialView == true && GeometryColumn.Len() == 0)) bgColor = wxColor(255, 255, 0); wxTextAttr style(wxColour(192, 0, 192), bgColor, wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); wxTextAttr style2(wxColour(128, 0, 255), wxColour(255, 192, 0), wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL)); wxTextAttr style3(wxColour(0, 0, 255), bgColor, wxFont(10, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD)); SqlCtrl->SetStyle(0, SqlSample.Len(), style); int i; for (i = 0; i < nextMark; i++) { if (markStyle[i] == 2) SqlCtrl->SetStyle(markStart[i], markStop[i], style3); else SqlCtrl->SetStyle(markStart[i], markStop[i], style2); } SqlCtrl->Show(); } void ComposerDialog::PrepareSqlTriggers() { // // preparing the SQL Triggers enabling a Writable View // AuxColumn *pCol; char dummy[8192]; char xname[1024]; char xname2[1024]; char xview[1024]; char xcol[1024]; bool comma; SqlTriggerInsert = wxT(""); SqlTriggerUpdate = wxT(""); SqlTriggerDelete = wxT(""); if (Writable1 == false) return; // composing the INSERT trigger SqlTriggerInsert = wxT("CREATE TRIGGER "); strcpy(xview, ViewName.ToUTF8()); sprintf(dummy, "vw_ins_%s", xview); MyFrame::DoubleQuotedSql(dummy); SqlTriggerInsert += wxString::FromUTF8(dummy); SqlTriggerInsert += wxT(" INSTEAD OF INSERT ON "); MyFrame::DoubleQuotedSql(xview); SqlTriggerInsert += wxString::FromUTF8(xview); SqlTriggerInsert += wxT("\nBEGIN\nINSERT OR REPLACE INTO "); if (Writable2 == true && Table2Enabled == true) { // supporting table #2 strcpy(xname2, TableName2.ToUTF8()); MyFrame::DoubleQuotedSql(xname2); SqlTriggerInsert += wxString::FromUTF8(xname2); SqlTriggerInsert += wxT(" ("); comma = false; strcpy(xcol, Match1Table2.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxString::FromUTF8(xcol); comma = true; if (Match2Enabled == true) { if (comma) SqlTriggerInsert += wxT(", "); strcpy(xcol, Match2Table2.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxString::FromUTF8(xcol); } if (Match3Enabled == true) { if (comma) SqlTriggerInsert += wxT(", "); strcpy(xcol, Match3Table2.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxString::FromUTF8(xcol); } pCol = Column2List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (pCol->GetName() == wxT("ROWID")) { pCol = pCol->GetNext(); continue; } if (pCol->GetName() == Match1Table2) { pCol = pCol->GetNext(); continue; } if (Match2Enabled == true) { if (pCol->GetName() == Match2Table2) { pCol = pCol->GetNext(); continue; } } if (Match3Enabled == true) { if (pCol->GetName() == Match3Table2) { pCol = pCol->GetNext(); continue; } } if (comma) SqlTriggerInsert += wxT(", "); strcpy(xcol, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxString::FromUTF8(xcol); comma = true; } pCol = pCol->GetNext(); } SqlTriggerInsert += wxT(")\n VALUES ("); comma = false; strcpy(xcol, Match1Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxT("NEW.") + wxString::FromUTF8(xcol); comma = true; if (Match2Enabled == true) { if (comma) SqlTriggerInsert += wxT(", "); strcpy(xcol, Match2Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxT("NEW.") + wxString::FromUTF8(xcol); } if (Match3Enabled == true) { if (comma) SqlTriggerInsert += wxT(", "); strcpy(xcol, Match3Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxT("NEW.") + wxString::FromUTF8(xcol); } pCol = Column2List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (pCol->GetName() == wxT("ROWID")) { pCol = pCol->GetNext(); continue; } if (pCol->GetName() == Match1Table2) { pCol = pCol->GetNext(); continue; } if (Match2Enabled == true) { if (pCol->GetName() == Match2Table2) { pCol = pCol->GetNext(); continue; } } if (Match3Enabled == true) { if (pCol->GetName() == Match3Table2) { pCol = pCol->GetNext(); continue; } } if (comma) SqlTriggerInsert += wxT(", "); strcpy(xcol, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxT("NEW.") + wxString::FromUTF8(xcol); comma = true; } pCol = pCol->GetNext(); } SqlTriggerInsert += wxT(");\nINSERT INTO "); } strcpy(xname, TableName1.ToUTF8()); MyFrame::DoubleQuotedSql(xname); SqlTriggerInsert += wxString::FromUTF8(xname); SqlTriggerInsert += wxT(" ("); comma = false; pCol = Column1List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (pCol->GetName() == wxT("ROWID")) { pCol = pCol->GetNext(); continue; } if (comma) SqlTriggerInsert += wxT(", "); strcpy(xcol, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxString::FromUTF8(xcol); comma = true; } pCol = pCol->GetNext(); } SqlTriggerInsert += wxT(")\n VALUES ("); comma = false; pCol = Column1List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (pCol->GetName() == wxT("ROWID")) { pCol = pCol->GetNext(); continue; } if (comma) SqlTriggerInsert += wxT(", "); strcpy(xcol, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerInsert += wxT("NEW.") + wxString::FromUTF8(xcol); comma = true; } pCol = pCol->GetNext(); } SqlTriggerInsert += wxT(");\nEND"); // composing the UPDATE trigger SqlTriggerUpdate = wxT("CREATE TRIGGER "); strcpy(xview, ViewName.ToUTF8()); sprintf(dummy, "vw_upd_%s", xview); MyFrame::DoubleQuotedSql(dummy); SqlTriggerUpdate += wxString::FromUTF8(dummy); SqlTriggerUpdate += wxT(" INSTEAD OF UPDATE OF\n "); comma = false; pCol = Column1List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (pCol->GetName() == wxT("ROWID")) { pCol = pCol->GetNext(); continue; } if (comma) SqlTriggerUpdate += wxT(", "); strcpy(xcol, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxString::FromUTF8(xcol); comma = true; } pCol = pCol->GetNext(); } if (Writable2 == true && Table2Enabled == true) { // supporting table #2 pCol = Column2List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (pCol->GetName() == wxT("ROWID")) { pCol = pCol->GetNext(); continue; } if (comma) SqlTriggerUpdate += wxT(", "); strcpy(xcol, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxString::FromUTF8(xcol); comma = true; } pCol = pCol->GetNext(); } } SqlTriggerUpdate += wxT("\n ON "); MyFrame::DoubleQuotedSql(xview); SqlTriggerUpdate += wxString::FromUTF8(xview); SqlTriggerUpdate += wxT("\nBEGIN\nUPDATE "); if (Writable2 == true && Table2Enabled == true) { // supporting table #2 strcpy(xname, TableName2.ToUTF8()); MyFrame::DoubleQuotedSql(xname); SqlTriggerUpdate += wxString::FromUTF8(xname); SqlTriggerUpdate += wxT(" SET "); comma = false; pCol = Column2List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (pCol->GetName() == wxT("ROWID")) { pCol = pCol->GetNext(); continue; } if (pCol->GetName() == Match1Table2) { pCol = pCol->GetNext(); continue; } if (Match2Enabled == true) { if (pCol->GetName() == Match2Table2) { pCol = pCol->GetNext(); continue; } } if (Match3Enabled == true) { if (pCol->GetName() == Match3Table2) { pCol = pCol->GetNext(); continue; } } if (comma) SqlTriggerUpdate += wxT(", "); strcpy(xcol, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxString::FromUTF8(xcol) + wxT(" = NEW.") + wxString::FromUTF8(xcol); comma = true; } pCol = pCol->GetNext(); } SqlTriggerUpdate += wxT("\nWHERE "); strcpy(xcol, Match1Table2.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxString::FromUTF8(xcol); strcpy(xcol, Match1Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxT(" = NEW.") + wxString::FromUTF8(xcol); if (Match2Enabled == true) { if (AndOr12 == true) SqlTriggerUpdate += wxT(" AND "); else SqlTriggerUpdate += wxT(" OR "); strcpy(xcol, Match2Table2.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxT(" = NEW.") + wxString::FromUTF8(xcol); strcpy(xcol, Match2Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxT("NEW.") + wxString::FromUTF8(xcol); } if (Match3Enabled == true) { if (AndOr23 == true) SqlTriggerUpdate += wxT(" AND "); else SqlTriggerUpdate += wxT(" OR "); strcpy(xcol, Match3Table2.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxT(" = NEW.") + wxString::FromUTF8(xcol); strcpy(xcol, Match3Table1.ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxT("NEW.") + wxString::FromUTF8(xcol); } SqlTriggerUpdate += wxT(";\nUPDATE"); } strcpy(xname, TableName1.ToUTF8()); MyFrame::DoubleQuotedSql(xname); SqlTriggerUpdate += wxString::FromUTF8(xname); SqlTriggerUpdate += wxT(" SET "); comma = false; pCol = Column1List.GetFirst(); while (pCol) { if (pCol->IsSelected() == true) { if (pCol->GetName() == wxT("ROWID")) { pCol = pCol->GetNext(); continue; } if (comma) SqlTriggerUpdate += wxT(", "); strcpy(xcol, pCol->GetName().ToUTF8()); MainFrame->DoubleQuotedSql(xcol); SqlTriggerUpdate += wxString::FromUTF8(xcol) + wxT(" = NEW.") + wxString::FromUTF8(xcol); comma = true; } pCol = pCol->GetNext(); } SqlTriggerUpdate += wxT("\nWHERE ROWID = OLD.ROWID;\nEND"); // composing the DELETE trigger SqlTriggerDelete = wxT("CREATE TRIGGER "); strcpy(xview, ViewName.ToUTF8()); sprintf(dummy, "vw_del_%s", xview); MyFrame::DoubleQuotedSql(dummy); SqlTriggerDelete += wxString::FromUTF8(dummy); SqlTriggerDelete += wxT(" INSTEAD OF DELETE ON "); MyFrame::DoubleQuotedSql(xview); SqlTriggerDelete += wxString::FromUTF8(xview); SqlTriggerDelete += wxT("\nBEGIN\nDELETE FROM "); strcpy(xname, TableName1.ToUTF8()); MyFrame::DoubleQuotedSql(xname); SqlTriggerDelete += wxString::FromUTF8(xname); SqlTriggerDelete += wxT(" WHERE ROWID = OLD.ROWID;\nEND"); } bool ComposerDialog::SqlCleanString(wxString & dirty, wxString & clean) { // well-formatting a string to be used as an SQL string char org[8192]; char dst[8192]; int len; char *in = org; char *out = dst; bool ret = false; strcpy(org, dirty.ToUTF8()); len = strlen(org); if (len > 2 && *org == '\'' && *(org + (len - 1)) == '\'') { strcpy(dst, org); ret = true; } else { while (*in != '\0') { if (*in == '\'') *out++ = '\''; *out++ = *in++; } *out = '\0'; } clean = wxString::FromUTF8(dst); return ret; } void ComposerDialog::SqlCleanList(wxString & dirty, wxString & clean, int *style, int *start, int *stop, int *next, int base) { // well-formatting a string to be used as an SQL values list [IN] wxString token[256]; int nextToken = 0; int i; bool quotedList; char org[8192]; char dst[8192]; char *in = org; char *out = dst; strcpy(org, dirty.ToUTF8()); while (1) { if (*in == '\0') { *out = '\0'; token[nextToken++] = wxString::FromUTF8(dst); break; } if (*in == ',') { *out = '\0'; token[nextToken++] = wxString::FromUTF8(dst); in++; out = dst; continue; } *out++ = *in++; } for (i = 0; i < nextToken; i++) { wxString str = token[i].Trim(false); token[i] = str.Trim(true); } quotedList = false; for (i = 0; i < nextToken; i++) { bool isNumber = false; long lngTest; double dblTest; if (token[i].Len() == 0) continue; if (token[i].ToLong(&lngTest) == true) isNumber = true; if (token[i].ToDouble(&dblTest) == true) isNumber = true; if (isNumber == false) quotedList = true; } if (quotedList == true) { for (i = 0; i < nextToken; i++) { if (token[i].Len() == 0) continue; wxString str; SqlCleanString(token[i], str); token[i] = str; } } clean = wxT(""); bool comma = false; for (i = 0; i < nextToken; i++) { if (token[i].Len() == 0) continue; if (comma == true) { style[*next] = 2; start[*next] = base + clean.Len(); clean += wxT(", "); stop[(*next)++] = base + clean.Len(); } if (quotedList == true) clean += wxT("'"); clean += token[i]; if (quotedList == true) clean += wxT("'"); comma = true; } } bool ComposerMainPage::Create(ComposerDialog * parent) { // // creating the dialog // Parent = parent; if (wxPanel::Create(Parent->GetTabCtrl()) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ComposerMainPage::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the TABLES row wxBoxSizer *tablesSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(tablesSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the MAIN TABLE pane wxBoxSizer *mainTblBoxSizer = new wxBoxSizer(wxVERTICAL); tablesSizer->Add(mainTblBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *mainTblBox = new wxStaticBox(this, wxID_STATIC, wxT("Main Table"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *mainTblSizer = new wxStaticBoxSizer(mainTblBox, wxVERTICAL); mainTblBoxSizer->Add(mainTblSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); int count = Parent->GetTableList()->GetCount(); wxString *tables = new wxString[count]; int i = 0; AuxTable *pTable = Parent->GetTableList()->GetFirst(); while (pTable) { tables[i] = pTable->GetTableName(); i++; pTable = pTable->GetNext(); } Table1NameCtrl = new wxComboBox(this, ID_QVC_TABLE_NAME_1, wxT(""), wxDefaultPosition, wxSize(130, 21), count, tables, wxCB_DROPDOWN | wxCB_READONLY); mainTblSizer->Add(Table1NameCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxString table; if (Parent->GetCurrentlySelectedTable(table) == true) { // automatically selecting the current table int sel = Table1NameCtrl->FindString(table); if (sel != wxNOT_FOUND) Table1NameCtrl->SetSelection(sel); } wxBoxSizer *alias1Sizer = new wxBoxSizer(wxHORIZONTAL); mainTblSizer->Add(alias1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticText *aliasTbl1 = new wxStaticText(this, wxID_STATIC, wxT("&Alias:")); alias1Sizer->Add(aliasTbl1, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); Table1AliasCtrl = new wxTextCtrl(this, ID_QVC_TABLE_ALIAS_1, Parent->GetTableAlias1(), wxDefaultPosition, wxDefaultSize); alias1Sizer->Add(Table1AliasCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); Table1ColumnsCtrl = new wxListBox(this, ID_QVC_COLUMNS_1, wxDefaultPosition, wxSize(130, 165), 0, NULL, wxLB_HSCROLL | wxLB_NEEDED_SB | wxLB_EXTENDED); mainTblSizer->Add(Table1ColumnsCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // the TABLE#2 pane wxBoxSizer *tbl2BoxSizer = new wxBoxSizer(wxVERTICAL); tablesSizer->Add(tbl2BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *tbl2Box = new wxStaticBox(this, wxID_STATIC, wxT("Table #2"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *tbl2Sizer = new wxStaticBoxSizer(tbl2Box, wxVERTICAL); tbl2BoxSizer->Add(tbl2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); Table2Ctrl = new wxCheckBox(this, ID_QVC_TABLE_2, wxT("Enable")); Table2Ctrl->SetValue(false); tbl2Sizer->Add(Table2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3); count = Parent->GetTableList()->GetCount(); wxString *tables2 = new wxString[count]; i = 0; pTable = Parent->GetTableList()->GetFirst(); while (pTable) { tables2[i] = pTable->GetTableName(); i++; pTable = pTable->GetNext(); } Table2NameCtrl = new wxComboBox(this, ID_QVC_TABLE_NAME_2, wxT(""), wxDefaultPosition, wxSize(130, 21), count, tables2, wxCB_DROPDOWN | wxCB_READONLY); Table2NameCtrl->Enable(false); tbl2Sizer->Add(Table2NameCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxBoxSizer *alias2Sizer = new wxBoxSizer(wxHORIZONTAL); tbl2Sizer->Add(alias2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticText *aliasTbl2 = new wxStaticText(this, wxID_STATIC, wxT("&Alias:")); alias2Sizer->Add(aliasTbl2, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); Table2AliasCtrl = new wxTextCtrl(this, ID_QVC_TABLE_ALIAS_2, Parent->GetTableAlias2(), wxDefaultPosition, wxDefaultSize); Table2AliasCtrl->Enable(false); alias2Sizer->Add(Table2AliasCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); Table2ColumnsCtrl = new wxListBox(this, ID_QVC_COLUMNS_2, wxDefaultPosition, wxSize(130, 80), 0, NULL, wxLB_HSCROLL | wxLB_NEEDED_SB | wxLB_EXTENDED); Table2ColumnsCtrl->Enable(false); tbl2Sizer->Add(Table2ColumnsCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxString join1Modes[2]; join1Modes[0] = wxT("[&Inner] Join"); join1Modes[1] = wxT("&Left [Outer] Join"); JoinModeCtrl = new wxRadioBox(this, ID_QVC_JOIN_MODE, wxT("Join mode"), wxDefaultPosition, wxDefaultSize, 2, join1Modes, 1, wxRA_SPECIFY_COLS); JoinModeCtrl->SetSelection(0); JoinModeCtrl->Enable(false); tbl2Sizer->Add(JoinModeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // the JOIN condition pane wxBoxSizer *joinSizer = new wxBoxSizer(wxVERTICAL); tablesSizer->Add(joinSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // JOIN match #1 wxStaticBox *match1Box = new wxStaticBox(this, wxID_STATIC, wxT("Join match #1"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *match1Sizer = new wxStaticBoxSizer(match1Box, wxHORIZONTAL); joinSizer->Add(match1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticBox *match1tbl1Box = new wxStaticBox(this, wxID_STATIC, wxT("Main Table column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *match1tbl1Sizer = new wxStaticBoxSizer(match1tbl1Box, wxVERTICAL); match1Sizer->Add(match1tbl1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Match1Table1Ctrl = new wxComboBox(this, ID_QVC_MATCH_1_T1, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Match1Table1Ctrl->Enable(false); match1tbl1Sizer->Add(Match1Table1Ctrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *match1tbl2Box = new wxStaticBox(this, wxID_STATIC, wxT("Table #2 column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *match1tbl2Sizer = new wxStaticBoxSizer(match1tbl2Box, wxVERTICAL); match1Sizer->Add(match1tbl2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Match1Table2Ctrl = new wxComboBox(this, ID_QVC_MATCH_1_T2, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Match1Table2Ctrl->Enable(false); match1tbl2Sizer->Add(Match1Table2Ctrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // JOIN match #2 wxStaticBox *match2Box = new wxStaticBox(this, wxID_STATIC, wxT("Join match #2"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *match20Sizer = new wxStaticBoxSizer(match2Box, wxVERTICAL); joinSizer->Add(match20Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); Match2Ctrl = new wxCheckBox(this, ID_QVC_MATCH_2_ENABLE, wxT("Enable")); Match2Ctrl->SetValue(false); Match2Ctrl->Enable(false); match20Sizer->Add(Match2Ctrl, 0, wxALIGN_LEFT | wxALL, 1); wxBoxSizer *match2Sizer = new wxBoxSizer(wxHORIZONTAL); match20Sizer->Add(match2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *match2tbl1Box = new wxStaticBox(this, wxID_STATIC, wxT("Main Table column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *match2tbl1Sizer = new wxStaticBoxSizer(match2tbl1Box, wxVERTICAL); match2Sizer->Add(match2tbl1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Match2Table1Ctrl = new wxComboBox(this, ID_QVC_MATCH_2_T1, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Match2Table1Ctrl->Enable(false); match2tbl1Sizer->Add(Match2Table1Ctrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *match2tbl2Box = new wxStaticBox(this, wxID_STATIC, wxT("Table #2 column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *match2tbl2Sizer = new wxStaticBoxSizer(match2tbl2Box, wxVERTICAL); match2Sizer->Add(match2tbl2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Match2Table2Ctrl = new wxComboBox(this, ID_QVC_MATCH_2_T2, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Match2Table2Ctrl->Enable(false); match2tbl2Sizer->Add(Match2Table2Ctrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // JOIN match #3 wxStaticBox *match3Box = new wxStaticBox(this, wxID_STATIC, wxT("Join match #3"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *match30Sizer = new wxStaticBoxSizer(match3Box, wxVERTICAL); joinSizer->Add(match30Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); Match3Ctrl = new wxCheckBox(this, ID_QVC_MATCH_3_ENABLE, wxT("Enable")); Match3Ctrl->SetValue(false); Match3Ctrl->Enable(false); match30Sizer->Add(Match3Ctrl, 0, wxALIGN_LEFT | wxALL, 1); wxBoxSizer *match3Sizer = new wxBoxSizer(wxHORIZONTAL); match30Sizer->Add(match3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *match3tbl1Box = new wxStaticBox(this, wxID_STATIC, wxT("Main Table column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *match3tbl1Sizer = new wxStaticBoxSizer(match3tbl1Box, wxVERTICAL); match3Sizer->Add(match3tbl1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Match3Table1Ctrl = new wxComboBox(this, ID_QVC_MATCH_3_T1, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Match3Table1Ctrl->Enable(false); match3tbl1Sizer->Add(Match3Table1Ctrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *match3tbl2Box = new wxStaticBox(this, wxID_STATIC, wxT("Table #2 column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *match3tbl2Sizer = new wxStaticBoxSizer(match3tbl2Box, wxVERTICAL); match3Sizer->Add(match3tbl2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Match3Table2Ctrl = new wxComboBox(this, ID_QVC_MATCH_3_T2, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Match3Table2Ctrl->Enable(false); match3tbl2Sizer->Add(Match3Table2Ctrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // adding the event handlers Connect(ID_QVC_TABLE_2, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerMainPage::OnTable2Enabled); Connect(ID_QVC_TABLE_NAME_1, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnTable1Selected); Connect(ID_QVC_TABLE_NAME_2, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnTable2Selected); Connect(ID_QVC_TABLE_ALIAS_1, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & ComposerMainPage::OnTable1AliasChanged); Connect(ID_QVC_TABLE_ALIAS_2, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & ComposerMainPage::OnTable2AliasChanged); Connect(ID_QVC_COLUMNS_1, wxEVT_COMMAND_LISTBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnColumns1Selected); Connect(ID_QVC_COLUMNS_2, wxEVT_COMMAND_LISTBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnColumns2Selected); Connect(ID_QVC_JOIN_MODE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnJoinModeChanged); Connect(ID_QVC_MATCH_2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerMainPage::OnMatch2Enabled); Connect(ID_QVC_MATCH_3_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerMainPage::OnMatch3Enabled); Connect(ID_QVC_MATCH_1_T1, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnMatch1Table1Selected); Connect(ID_QVC_MATCH_1_T2, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnMatch1Table2Selected); Connect(ID_QVC_MATCH_2_T1, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnMatch2Table1Selected); Connect(ID_QVC_MATCH_2_T2, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnMatch2Table2Selected); Connect(ID_QVC_MATCH_3_T1, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnMatch3Table1Selected); Connect(ID_QVC_MATCH_3_T2, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerMainPage::OnMatch3Table2Selected); } void ComposerMainPage::SelectGeometryColumn(wxString & column, bool table2) { // selecting the geometry column wxListBox *lb = Table1ColumnsCtrl; if (table2 == true) lb = Table2ColumnsCtrl; int sel = lb->FindString(column); if (sel != wxNOT_FOUND) lb->Select(sel); } void ComposerMainPage::InitializeComboColumns(wxComboBox * ctrl, bool table2) { // // initializing a column list ComboBox // ctrl->Clear(); AuxColumn *pColumn; if (table2 == false) pColumn = Parent->GetColumn1List()->GetFirst(); else pColumn = Parent->GetColumn2List()->GetFirst(); while (pColumn) { wxString col = pColumn->GetName(); ctrl->Append(col); pColumn = pColumn->GetNext(); } } void ComposerMainPage::InitializeListColumns(wxListBox * ctrl, bool table2) { // // initializing a column list ListBox // ctrl->Clear(); AuxColumn *pColumn; if (table2 == false) pColumn = Parent->GetColumn1List()->GetFirst(); else pColumn = Parent->GetColumn2List()->GetFirst(); while (pColumn) { wxString col = pColumn->GetName(); ctrl->Append(col); pColumn = pColumn->GetNext(); } } void ComposerMainPage::OnTable2Enabled(wxCommandEvent & WXUNUSED(event)) { // // Table#2 enabled/disabled // Parent->SetTable2Enabled(Table2Ctrl->GetValue()); if (Parent->IsTable2Enabled() == true) { Table2NameCtrl->Enable(true); Table2AliasCtrl->Enable(true); Table2ColumnsCtrl->Enable(true); JoinModeCtrl->Enable(true); if (Parent->IsLeftJoin() == false) JoinModeCtrl->SetSelection(0); else JoinModeCtrl->SetSelection(1); Match2Ctrl->Enable(true); Match3Ctrl->Enable(true); InitializeComboColumns(Match1Table1Ctrl, false); Match1Table1Ctrl->Enable(true); Match1Table2Ctrl->Enable(true); if (Parent->IsMatch2Enabled() == true) { Match2Table1Ctrl->Enable(true); Match2Table2Ctrl->Enable(true); InitializeComboColumns(Match2Table1Ctrl, false); } else { Match2Table1Ctrl->Enable(false); Match2Table2Ctrl->Enable(false); } if (Parent->IsMatch3Enabled() == true) { Match3Table1Ctrl->Enable(true); Match3Table2Ctrl->Enable(true); InitializeComboColumns(Match3Table1Ctrl, false); } else { Match3Table1Ctrl->Enable(false); Match3Table2Ctrl->Enable(false); } } else { Table2NameCtrl->Enable(false); Parent->SetTableName2(wxT("")); Table2NameCtrl->SetSelection(wxNOT_FOUND); Table2AliasCtrl->Enable(false); Table2ColumnsCtrl->Enable(false); Parent->GetColumn2List()->Flush(); Table2ColumnsCtrl->Clear(); Parent->SetMatch2Enabled(false); Parent->SetMatch3Enabled(false); Match2Ctrl->SetValue(Parent->IsMatch2Enabled()); Match3Ctrl->SetValue(Parent->IsMatch3Enabled()); Match2Ctrl->Enable(false); Match3Ctrl->Enable(false); JoinModeCtrl->Enable(false); Match1Table1Ctrl->Enable(false); Match1Table2Ctrl->Enable(false); Match2Table1Ctrl->Enable(false); Match2Table2Ctrl->Enable(false); Match3Table1Ctrl->Enable(false); Match3Table2Ctrl->Enable(false); Match1Table1Ctrl->Clear(); Match1Table2Ctrl->Clear(); Match2Table1Ctrl->Clear(); Match2Table2Ctrl->Clear(); Match3Table1Ctrl->Clear(); Match3Table2Ctrl->Clear(); Parent->SetMatch1Table1(wxT("")); Parent->SetMatch2Table1(wxT("")); Parent->SetMatch3Table1(wxT("")); Parent->SetMatch1Table2(wxT("")); Parent->SetMatch2Table2(wxT("")); Parent->SetMatch3Table2(wxT("")); Parent->Table2Status(false); } Parent->UpdateSqlSample(); } void ComposerMainPage::OnMatch2Enabled(wxCommandEvent & WXUNUSED(event)) { // // Match#2 enabled/disabled // Parent->SetMatch2Enabled(Match2Ctrl->GetValue()); if (Parent->IsMatch2Enabled() == true) { Match2Table1Ctrl->Enable(true); Match2Table2Ctrl->Enable(true); InitializeComboColumns(Match2Table1Ctrl, false); InitializeComboColumns(Match2Table2Ctrl, true); } else { Match2Table1Ctrl->Enable(false); Match2Table2Ctrl->Enable(false); Parent->SetMatch2Table1(wxT("")); Parent->SetMatch2Table2(wxT("")); Match2Table1Ctrl->Clear(); Match2Table2Ctrl->Clear(); } Parent->UpdateSqlSample(); } void ComposerMainPage::OnMatch3Enabled(wxCommandEvent & WXUNUSED(event)) { // // Match#3 enabled/disabled // Parent->SetMatch3Enabled(Match3Ctrl->GetValue()); if (Parent->IsMatch3Enabled() == true) { Match3Table1Ctrl->Enable(true); Match3Table2Ctrl->Enable(true); InitializeComboColumns(Match3Table1Ctrl, false); InitializeComboColumns(Match3Table2Ctrl, true); } else { Match3Table1Ctrl->Enable(false); Match3Table2Ctrl->Enable(false); Parent->SetMatch3Table1(wxT("")); Parent->SetMatch3Table2(wxT("")); Match3Table1Ctrl->Clear(); Match3Table2Ctrl->Clear(); } Parent->UpdateSqlSample(); } void ComposerMainPage::OnTable1AliasChanged(wxCommandEvent & WXUNUSED(event)) { // // Table#1 alias-name changed // Parent->SetTableAlias1(Table1AliasCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerMainPage::OnTable2AliasChanged(wxCommandEvent & WXUNUSED(event)) { // // Table#2 alias-name changed // Parent->SetTableAlias2(Table2AliasCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerMainPage::OnJoinModeChanged(wxCommandEvent & WXUNUSED(event)) { // // Join mode changed // if (JoinModeCtrl->GetSelection() == 1) Parent->SetLeftJoin(true); else Parent->SetLeftJoin(false); Parent->UpdateSqlSample(); } void ComposerMainPage::OnTable1Selected(wxCommandEvent & WXUNUSED(event)) { // // Table#1 selection changed // bool changed = true; if (Table1NameCtrl->GetValue() == Parent->GetTableName1()) changed = false; Parent->SetTableName1(Table1NameCtrl->GetValue()); Parent->PopulateColumnList1(); InitializeListColumns(Table1ColumnsCtrl, false); InitializeComboColumns(Match1Table1Ctrl, false); InitializeComboColumns(Match2Table1Ctrl, false); InitializeComboColumns(Match3Table1Ctrl, false); Parent->SetMatch1Table1(wxT("")); Parent->SetMatch2Table1(wxT("")); Parent->SetMatch3Table1(wxT("")); if (Parent->GetTableName1().Len() == 0) Parent->Table1Status(false); else { if (changed == true) Parent->Table1Status(false); Parent->Table1Status(true); } Parent->UpdateSqlSample(); } void ComposerMainPage::OnTable2Selected(wxCommandEvent & WXUNUSED(event)) { // // Table#2 selection changed // bool changed = true; if (Table2NameCtrl->GetValue() == Parent->GetTableName2()) changed = false; Parent->SetTableName2(Table2NameCtrl->GetValue()); Parent->PopulateColumnList2(); Table2ColumnsCtrl->Clear(); InitializeListColumns(Table2ColumnsCtrl, true); InitializeComboColumns(Match1Table2Ctrl, true); InitializeComboColumns(Match2Table2Ctrl, true); InitializeComboColumns(Match3Table2Ctrl, true); Parent->SetMatch1Table2(wxT("")); Parent->SetMatch2Table2(wxT("")); Parent->SetMatch3Table2(wxT("")); if (Parent->GetTableName2().Len() == 0) Parent->Table2Status(false); else { if (changed == true) Parent->Table2Status(false); Parent->Table2Status(true); } Parent->UpdateSqlSample(); } void ComposerMainPage::OnColumns1Selected(wxCommandEvent & WXUNUSED(event)) { // // Table#1 columns selection changed // int i; int count = Table1ColumnsCtrl->GetCount(); for (i = 0; i < count; i++) { // marking the selected columns if (Table1ColumnsCtrl->IsSelected(i) == true) Parent->GetColumn1List()->SetState(i, true); else Parent->GetColumn1List()->SetState(i, false); } Parent->SelectGeometryColumn(); Parent->UpdateSqlSample(); } void ComposerMainPage::OnColumns2Selected(wxCommandEvent & WXUNUSED(event)) { // // Table#2 columns selection changed // int i; int count = Table2ColumnsCtrl->GetCount(); for (i = 0; i < count; i++) { // marking the selected columns if (Table2ColumnsCtrl->IsSelected(i) == true) Parent->GetColumn2List()->SetState(i, true); else Parent->GetColumn2List()->SetState(i, false); } Parent->SelectGeometryColumn(); Parent->UpdateSqlSample(); } void ComposerMainPage::OnMatch1Table1Selected(wxCommandEvent & WXUNUSED(event)) { // // Match #1 table #1 selection changed // Parent->SetMatch1Table1(Match1Table1Ctrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerMainPage::OnMatch1Table2Selected(wxCommandEvent & WXUNUSED(event)) { // // Match #1 table #2 selection changed // Parent->SetMatch1Table2(Match1Table2Ctrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerMainPage::OnMatch2Table1Selected(wxCommandEvent & WXUNUSED(event)) { // // Match #2 table #1 selection changed // Parent->SetMatch2Table1(Match2Table1Ctrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerMainPage::OnMatch2Table2Selected(wxCommandEvent & WXUNUSED(event)) { // // Match #2 table #2 selection changed // Parent->SetMatch2Table2(Match2Table2Ctrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerMainPage::OnMatch3Table1Selected(wxCommandEvent & WXUNUSED(event)) { // // Match #3 table #1 selection changed // Parent->SetMatch3Table1(Match3Table1Ctrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerMainPage::OnMatch3Table2Selected(wxCommandEvent & WXUNUSED(event)) { // // Match #3 table #2 selection changed // Parent->SetMatch3Table2(Match3Table2Ctrl->GetValue()); Parent->UpdateSqlSample(); } bool ComposerFilterPage::Create(ComposerDialog * parent) { // // creating the dialog // Parent = parent; if (wxPanel::Create(Parent->GetTabCtrl()) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ComposerFilterPage::CreateControls() { // // creating individual control and setting initial values // wxSize size; wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the WHERE clauses row wxBoxSizer *whereSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(whereSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the WHERE clause #1 pane wxBoxSizer *where1BoxSizer = new wxBoxSizer(wxVERTICAL); whereSizer->Add(where1BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *where1Box = new wxStaticBox(this, wxID_STATIC, wxT("Filter #1"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *where1Sizer = new wxStaticBoxSizer(where1Box, wxVERTICAL); where1BoxSizer->Add(where1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where1EnabledCtrl = new wxCheckBox(this, ID_QVC_WHERE_1_ENABLE, wxT("Enable")); Where1EnabledCtrl->SetValue(false); if (Parent->GetTableName1().Len() == 0 && Parent->GetTableName2().Len() == 0) Where1EnabledCtrl->Enable(false); where1Sizer->Add(Where1EnabledCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxString where1Tables[2]; where1Tables[0] = wxT("&Main table columns"); where1Tables[1] = wxT("&Table #2 columns"); Where1TableCtrl = new wxRadioBox(this, ID_QVC_WHERE_1_TABLE, wxT(""), wxDefaultPosition, wxDefaultSize, 2, where1Tables, 1, wxRA_SPECIFY_COLS); Where1TableCtrl->SetSelection(0); Where1TableCtrl->Enable(false); where1Sizer->Add(Where1TableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxStaticBox *cols1Box = new wxStaticBox(this, wxID_STATIC, wxT("Column to be filtered"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *cols1Sizer = new wxStaticBoxSizer(cols1Box, wxVERTICAL); where1Sizer->Add(cols1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where1ColumnCtrl = new wxComboBox(this, ID_QVC_WHERE_1_COLUMN, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Where1ColumnCtrl->Enable(false); cols1Sizer->Add(Where1ColumnCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *oper1Box = new wxStaticBox(this, wxID_STATIC, wxT("Comparison operator"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *oper1Sizer = new wxStaticBoxSizer(oper1Box, wxVERTICAL); where1Sizer->Add(oper1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where1OperatorCtrl = new wxComboBox(this, ID_QVC_WHERE_1_OPERATOR, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Where1OperatorCtrl->Enable(false); oper1Sizer->Add(Where1OperatorCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); size = Where1OperatorCtrl->GetSize(); wxStaticBox *value1Box = new wxStaticBox(this, wxID_STATIC, wxT("Value"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *value1Sizer = new wxStaticBoxSizer(value1Box, wxVERTICAL); where1Sizer->Add(value1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where1ValueCtrl = new wxTextCtrl(this, ID_QVC_WHERE_1_VALUE, wxT(""), wxDefaultPosition, size); Where1ValueCtrl->Enable(false); value1Sizer->Add(Where1ValueCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // the CONNECTOR 1-2 pane wxString bool12[2]; bool12[0] = wxT("&AND"); bool12[1] = wxT("&OR"); Connector12Ctrl = new wxRadioBox(this, ID_QVC_CONNECTOR_12, wxT(""), wxDefaultPosition, wxDefaultSize, 2, bool12, 1, wxRA_SPECIFY_COLS); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(false); whereSizer->Add(Connector12Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); // the WHERE clause #2 pane wxBoxSizer *where2BoxSizer = new wxBoxSizer(wxVERTICAL); whereSizer->Add(where2BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *where2Box = new wxStaticBox(this, wxID_STATIC, wxT("Filter #2"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *where2Sizer = new wxStaticBoxSizer(where2Box, wxVERTICAL); where2BoxSizer->Add(where2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where2EnabledCtrl = new wxCheckBox(this, ID_QVC_WHERE_2_ENABLE, wxT("Enable")); Where2EnabledCtrl->SetValue(false); if (Parent->GetTableName1().Len() == 0 && Parent->GetTableName2().Len() == 0) Where2EnabledCtrl->Enable(false); where2Sizer->Add(Where2EnabledCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxString where2Tables[2]; where2Tables[0] = wxT("&Main table columns"); where2Tables[1] = wxT("&Table #2 columns"); Where2TableCtrl = new wxRadioBox(this, ID_QVC_WHERE_2_TABLE, wxT(""), wxDefaultPosition, wxDefaultSize, 2, where2Tables, 1, wxRA_SPECIFY_COLS); Where2TableCtrl->SetSelection(0); Where2TableCtrl->Enable(false); where2Sizer->Add(Where2TableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxStaticBox *cols2Box = new wxStaticBox(this, wxID_STATIC, wxT("Column to be filtered"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *cols2Sizer = new wxStaticBoxSizer(cols2Box, wxVERTICAL); where2Sizer->Add(cols2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where2ColumnCtrl = new wxComboBox(this, ID_QVC_WHERE_2_COLUMN, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Where2ColumnCtrl->Enable(false); cols2Sizer->Add(Where2ColumnCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *oper2Box = new wxStaticBox(this, wxID_STATIC, wxT("Comparison operator"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *oper2Sizer = new wxStaticBoxSizer(oper2Box, wxVERTICAL); where2Sizer->Add(oper2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where2OperatorCtrl = new wxComboBox(this, ID_QVC_WHERE_2_OPERATOR, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Where2OperatorCtrl->Enable(false); oper2Sizer->Add(Where2OperatorCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); size = Where2OperatorCtrl->GetSize(); wxStaticBox *value2Box = new wxStaticBox(this, wxID_STATIC, wxT("Value"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *value2Sizer = new wxStaticBoxSizer(value2Box, wxVERTICAL); where2Sizer->Add(value2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where2ValueCtrl = new wxTextCtrl(this, ID_QVC_WHERE_2_VALUE, wxT(""), wxDefaultPosition, size); Where2ValueCtrl->Enable(false); value2Sizer->Add(Where2ValueCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // the CONNECTOR 2-3 pane wxString bool23[2]; bool23[0] = wxT("&AND"); bool23[1] = wxT("&OR"); Connector23Ctrl = new wxRadioBox(this, ID_QVC_CONNECTOR_23, wxT(""), wxDefaultPosition, wxDefaultSize, 2, bool12, 1, wxRA_SPECIFY_COLS); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(false); whereSizer->Add(Connector23Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); // the WHERE clause #3 pane wxBoxSizer *where3BoxSizer = new wxBoxSizer(wxVERTICAL); whereSizer->Add(where3BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *where3Box = new wxStaticBox(this, wxID_STATIC, wxT("Filter #3"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *where3Sizer = new wxStaticBoxSizer(where3Box, wxVERTICAL); where3BoxSizer->Add(where3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where3EnabledCtrl = new wxCheckBox(this, ID_QVC_WHERE_3_ENABLE, wxT("Enable")); Where3EnabledCtrl->SetValue(false); if (Parent->GetTableName1().Len() == 0 && Parent->GetTableName2().Len() == 0) Where3EnabledCtrl->Enable(false); where3Sizer->Add(Where3EnabledCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxString where3Tables[2]; where3Tables[0] = wxT("&Main table columns"); where3Tables[1] = wxT("&Table #2 columns"); Where3TableCtrl = new wxRadioBox(this, ID_QVC_WHERE_3_TABLE, wxT(""), wxDefaultPosition, wxDefaultSize, 2, where2Tables, 1, wxRA_SPECIFY_COLS); Where3TableCtrl->SetSelection(0); Where3TableCtrl->Enable(false); where3Sizer->Add(Where3TableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxStaticBox *cols3Box = new wxStaticBox(this, wxID_STATIC, wxT("Column to be filtered"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *cols3Sizer = new wxStaticBoxSizer(cols3Box, wxVERTICAL); where3Sizer->Add(cols3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where3ColumnCtrl = new wxComboBox(this, ID_QVC_WHERE_3_COLUMN, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Where3ColumnCtrl->Enable(false); cols3Sizer->Add(Where3ColumnCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *oper3Box = new wxStaticBox(this, wxID_STATIC, wxT("Comparison operator"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *oper3Sizer = new wxStaticBoxSizer(oper3Box, wxVERTICAL); where3Sizer->Add(oper3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where3OperatorCtrl = new wxComboBox(this, ID_QVC_WHERE_3_OPERATOR, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Where3OperatorCtrl->Enable(false); oper3Sizer->Add(Where3OperatorCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); size = Where3OperatorCtrl->GetSize(); wxStaticBox *value3Box = new wxStaticBox(this, wxID_STATIC, wxT("Value"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *value3Sizer = new wxStaticBoxSizer(value3Box, wxVERTICAL); where3Sizer->Add(value3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Where3ValueCtrl = new wxTextCtrl(this, ID_QVC_WHERE_3_VALUE, wxT(""), wxDefaultPosition, size); Where3ValueCtrl->Enable(false); value3Sizer->Add(Where3ValueCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); // adding the event handlers Connect(ID_QVC_WHERE_1_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere1Enabled); Connect(ID_QVC_WHERE_2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere2Enabled); Connect(ID_QVC_WHERE_3_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere3Enabled); Connect(ID_QVC_WHERE_1_TABLE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere1TableChanged); Connect(ID_QVC_WHERE_2_TABLE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere2TableChanged); Connect(ID_QVC_WHERE_3_TABLE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere3TableChanged); Connect(ID_QVC_CONNECTOR_12, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnConnector12Changed); Connect(ID_QVC_CONNECTOR_23, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnConnector23Changed); Connect(ID_QVC_WHERE_1_COLUMN, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere1ColumnSelected); Connect(ID_QVC_WHERE_2_COLUMN, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere2ColumnSelected); Connect(ID_QVC_WHERE_3_COLUMN, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere3ColumnSelected); Connect(ID_QVC_WHERE_1_OPERATOR, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere1OperatorSelected); Connect(ID_QVC_WHERE_2_OPERATOR, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere2OperatorSelected); Connect(ID_QVC_WHERE_3_OPERATOR, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere3OperatorSelected); Connect(ID_QVC_WHERE_1_VALUE, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere1ValueChanged); Connect(ID_QVC_WHERE_2_VALUE, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere2ValueChanged); Connect(ID_QVC_WHERE_3_VALUE, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & ComposerFilterPage::OnWhere3ValueChanged); } void ComposerFilterPage::Table1Status(bool ok) { // // enabling/disabling Table#1 dependent fields // if (ok == false) { if (Parent->GetTableName2().Len() == 0) { Where1EnabledCtrl->SetValue(false); Parent->SetWhere1Enabled(false); Where1EnabledCtrl->Enable(false); Where2EnabledCtrl->SetValue(false); Parent->SetWhere2Enabled(false); Where2EnabledCtrl->Enable(false); Where3EnabledCtrl->SetValue(false); Parent->SetWhere3Enabled(false); Where3EnabledCtrl->Enable(false); Where1TableCtrl->SetSelection(0); Parent->SetWhere1Table2(false); Where1TableCtrl->Enable(false); Parent->SetWhere1Column(wxT("")); Where1ColumnCtrl->Clear(); Where1ColumnCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1OperatorCtrl->Clear(); Where1OperatorCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1ValueCtrl->SetValue(wxT("")); Where1ValueCtrl->Enable(false); Where2TableCtrl->SetSelection(0); Parent->SetWhere2Table2(false); Where2TableCtrl->Enable(false); Parent->SetWhere2Column(wxT("")); Where2ColumnCtrl->Clear(); Where2ColumnCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2OperatorCtrl->Clear(); Where2OperatorCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2ValueCtrl->SetValue(wxT("")); Where2ValueCtrl->Enable(false); Where3TableCtrl->SetSelection(0); Parent->SetWhere3Table2(false); Where3TableCtrl->Enable(false); Parent->SetWhere3Column(wxT("")); Where3ColumnCtrl->Clear(); Where3ColumnCtrl->Enable(false); Parent->SetWhere3Operator(wxT("")); Where3OperatorCtrl->Clear(); Where3OperatorCtrl->Enable(false); Parent->SetWhere3Operator(wxT("")); Where3ValueCtrl->SetValue(wxT("")); Where3ValueCtrl->Enable(false); Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(false); Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(false); } else { if (Parent->IsWhere1Table2() == false) { Where1EnabledCtrl->SetValue(false); Parent->SetWhere1Enabled(false); Where1TableCtrl->SetSelection(0); Parent->SetWhere1Table2(false); Where1TableCtrl->Enable(false); Parent->SetWhere1Column(wxT("")); Where1ColumnCtrl->Clear(); Where1ColumnCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1OperatorCtrl->Clear(); Where1OperatorCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1ValueCtrl->SetValue(wxT("")); Where1ValueCtrl->Enable(false); Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(false); } if (Parent->IsWhere3Table2() == false) { Where3EnabledCtrl->SetValue(false); Parent->SetWhere3Enabled(false); Where3TableCtrl->SetSelection(0); Parent->SetWhere3Table2(false); Where3TableCtrl->Enable(false); Parent->SetWhere3Column(wxT("")); Where3ColumnCtrl->Clear(); Where3ColumnCtrl->Enable(false); Parent->SetWhere3Operator(wxT("")); Where3OperatorCtrl->Clear(); Where3OperatorCtrl->Enable(false); Where3ValueCtrl->SetValue(wxT("")); Where3ValueCtrl->Enable(false); Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(false); } if (Parent->IsWhere2Table2() == false) { Where2EnabledCtrl->SetValue(false); Parent->SetWhere2Enabled(false); Where2TableCtrl->SetSelection(0); Parent->SetWhere2Table2(false); Where2TableCtrl->Enable(false); Parent->SetWhere2Column(wxT("")); Where2ColumnCtrl->Clear(); Where2ColumnCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2OperatorCtrl->Clear(); Where2OperatorCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2ValueCtrl->SetValue(wxT("")); Where2ValueCtrl->Enable(false); Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(false); if (Parent->IsWhere3Enabled() == true && Parent->IsWhere1Enabled() == true) ; else { Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(false); } } } } else { Where1EnabledCtrl->Enable(true); Where2EnabledCtrl->Enable(true); Where3EnabledCtrl->Enable(true); } } void ComposerFilterPage::Table2Status(bool ok) { // // enabling/disabling Table#2 dependent fields // if (ok == false) { if (Parent->GetTableName1().Len() == 0) { Where1EnabledCtrl->SetValue(false); Parent->SetWhere1Enabled(false); Where1EnabledCtrl->Enable(false); Where2EnabledCtrl->SetValue(false); Parent->SetWhere2Enabled(false); Where2EnabledCtrl->Enable(false); Where3EnabledCtrl->SetValue(false); Parent->SetWhere3Enabled(false); Where3EnabledCtrl->Enable(false); Where1TableCtrl->SetSelection(0); Parent->SetWhere1Table2(false); Where1TableCtrl->Enable(false); Parent->SetWhere1Column(wxT("")); Where1ColumnCtrl->Clear(); Where1ColumnCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1OperatorCtrl->Clear(); Where1OperatorCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1ValueCtrl->SetValue(wxT("")); Where1ValueCtrl->Enable(false); Where2TableCtrl->SetSelection(0); Parent->SetWhere2Table2(false); Where2TableCtrl->Enable(false); Parent->SetWhere2Column(wxT("")); Where2ColumnCtrl->Clear(); Where2ColumnCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2OperatorCtrl->Clear(); Where2OperatorCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2ValueCtrl->SetValue(wxT("")); Where2ValueCtrl->Enable(false); Where3TableCtrl->SetSelection(0); Parent->SetWhere3Table2(false); Where3TableCtrl->Enable(false); Parent->SetWhere3Column(wxT("")); Where3ColumnCtrl->Clear(); Where3ColumnCtrl->Enable(false); Parent->SetWhere3Operator(wxT("")); Where3OperatorCtrl->Clear(); Where3OperatorCtrl->Enable(false); Parent->SetWhere3Operator(wxT("")); Where3ValueCtrl->SetValue(wxT("")); Where3ValueCtrl->Enable(false); Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(false); Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(false); } else { if (Parent->IsWhere1Table2() == true) { Where1EnabledCtrl->SetValue(false); Parent->SetWhere1Enabled(false); Where1TableCtrl->SetSelection(0); Parent->SetWhere1Table2(false); Where1TableCtrl->Enable(false); Parent->SetWhere1Column(wxT("")); Where1ColumnCtrl->Clear(); Where1ColumnCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1OperatorCtrl->Clear(); Where1OperatorCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1ValueCtrl->SetValue(wxT("")); Where1ValueCtrl->Enable(false); Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(false); } if (Parent->IsWhere3Table2() == true) { Where3EnabledCtrl->SetValue(false); Parent->SetWhere3Enabled(false); Where3TableCtrl->SetSelection(0); Parent->SetWhere3Table2(false); Where3TableCtrl->Enable(false); Parent->SetWhere3Column(wxT("")); Where3ColumnCtrl->Clear(); Where3ColumnCtrl->Enable(false); Parent->SetWhere3Operator(wxT("")); Where3OperatorCtrl->Clear(); Where3OperatorCtrl->Enable(false); Where3ValueCtrl->SetValue(wxT("")); Where3ValueCtrl->Enable(false); Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(false); } if (Parent->IsWhere2Table2() == true) { Where2EnabledCtrl->SetValue(false); Parent->SetWhere2Enabled(false); Where2TableCtrl->SetSelection(0); Parent->SetWhere2Table2(false); Where2TableCtrl->Enable(false); Parent->SetWhere2Column(wxT("")); Where2ColumnCtrl->Clear(); Where2ColumnCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2OperatorCtrl->Clear(); Where2OperatorCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2ValueCtrl->SetValue(wxT("")); Where2ValueCtrl->Enable(false); Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(false); if (Parent->IsWhere3Enabled() == true && Parent->IsWhere1Enabled() == true) ; else { Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(false); } } } } else { Where1EnabledCtrl->Enable(true); Where2EnabledCtrl->Enable(true); Where3EnabledCtrl->Enable(true); } } void ComposerFilterPage::InitializeOperators(wxComboBox * ctrl) { // initializing a list of boolean operators ComboBox ctrl->Clear(); ctrl->Append(wxT("= {equal to}")); ctrl->Append(wxT("<> {not equal}")); ctrl->Append(wxT("< {lesser than}")); ctrl->Append(wxT("<= {lesser / equal}")); ctrl->Append(wxT("> {greather than}")); ctrl->Append(wxT(">= {greather / equal}")); ctrl->Append(wxT("LIKE {text search}")); ctrl->Append(wxT("IN {val1, val2, ...}")); ctrl->Append(wxT("IS NULL")); ctrl->Append(wxT("IS NOT NULL")); } void ComposerFilterPage::InitializeColumns(wxComboBox * ctrl, bool table2) { // initializing a columns list ComboBox ctrl->Clear(); AuxColumn *pColumn; if (table2 == false) pColumn = Parent->GetColumn1List()->GetFirst(); else pColumn = Parent->GetColumn2List()->GetFirst(); while (pColumn) { wxString col = pColumn->GetName(); ctrl->Append(col); pColumn = pColumn->GetNext(); } } void ComposerFilterPage::OnWhere1Enabled(wxCommandEvent & WXUNUSED(event)) { // // Where #1 clause enabled/disabled // Parent->SetWhere1Enabled(Where1EnabledCtrl->GetValue()); if (Parent->IsWhere1Enabled() == true) { if (Parent->IsTable2Enabled() == true) { if (Parent->IsWhere1Table2() == false) Where1TableCtrl->SetSelection(0); else Where1TableCtrl->SetSelection(1); Where1TableCtrl->Enable(true); } else { Parent->SetWhere1Table2(false); Where1TableCtrl->SetSelection(0); Where1TableCtrl->Enable(false); Parent->SetWhere1Column(wxT("")); Where1ColumnCtrl->Clear(); } Parent->SetWhere1Column(wxT("")); InitializeColumns(Where1ColumnCtrl, Parent->IsWhere1Table2()); Where1ColumnCtrl->Enable(true); Parent->SetWhere1Operator(wxT("")); InitializeOperators(Where1OperatorCtrl); Where1OperatorCtrl->Enable(true); Where1ValueCtrl->SetValue(wxT("")); Where1ValueCtrl->Enable(true); if (Parent->IsWhere2Enabled() == true) { Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(true); } else if (Parent->IsWhere3Enabled() == true) { Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(true); } } else { Where1TableCtrl->SetSelection(0); Parent->SetWhere1Table2(false); Where1TableCtrl->Enable(false); Parent->SetWhere1Column(wxT("")); Where1ColumnCtrl->Clear(); Where1ColumnCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1OperatorCtrl->Clear(); Where1OperatorCtrl->Enable(false); Parent->SetWhere1Operator(wxT("")); Where1ValueCtrl->SetValue(wxT("")); Where1ValueCtrl->Enable(false); Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(false); } Parent->UpdateSqlSample(); } void ComposerFilterPage::OnWhere2Enabled(wxCommandEvent & WXUNUSED(event)) { // // Where #2 clause enabled/disabled // Parent->SetWhere2Enabled(Where2EnabledCtrl->GetValue()); if (Parent->IsWhere2Enabled() == true) { if (Parent->IsTable2Enabled() == true) { if (Parent->IsWhere2Table2() == false) Where2TableCtrl->SetSelection(0); else Where2TableCtrl->SetSelection(1); Where2TableCtrl->Enable(true); } else { Parent->SetWhere2Table2(false); Where2TableCtrl->SetSelection(0); Where2TableCtrl->Enable(false); Parent->SetWhere2Column(wxT("")); Where2ColumnCtrl->Clear(); } Parent->SetWhere2Column(wxT("")); InitializeColumns(Where2ColumnCtrl, Parent->IsWhere2Table2()); Where2ColumnCtrl->Enable(true); Parent->SetWhere2Operator(wxT("")); InitializeOperators(Where2OperatorCtrl); Where2OperatorCtrl->Enable(true); Where2ValueCtrl->SetValue(wxT("")); Where2ValueCtrl->Enable(true); if (Parent->IsWhere1Enabled() == true) { Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(true); } if (Parent->IsWhere3Enabled() == true) { Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(true); } } else { Where2TableCtrl->SetSelection(0); Parent->SetWhere2Table2(false); Where2TableCtrl->Enable(false); Parent->SetWhere2Column(wxT("")); Where2ColumnCtrl->Clear(); Where2ColumnCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2OperatorCtrl->Clear(); Where2OperatorCtrl->Enable(false); Parent->SetWhere2Operator(wxT("")); Where2ValueCtrl->SetValue(wxT("")); Where2ValueCtrl->Enable(false); Parent->SetAndOr12(true); Connector12Ctrl->SetSelection(0); Connector12Ctrl->Enable(false); if (Parent->IsWhere3Enabled() == true && Parent->IsWhere1Enabled() == true) ; else { Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(false); } } Parent->UpdateSqlSample(); } void ComposerFilterPage::OnWhere3Enabled(wxCommandEvent & WXUNUSED(event)) { // // Where #3 clause enabled/disabled // Parent->SetWhere3Enabled(Where3EnabledCtrl->GetValue()); if (Parent->IsWhere3Enabled() == true) { if (Parent->IsTable2Enabled() == true) { if (Parent->IsWhere3Table2() == false) Where3TableCtrl->SetSelection(0); else Where3TableCtrl->SetSelection(1); Where3TableCtrl->Enable(true); } else { Parent->SetWhere3Table2(false); Where3TableCtrl->SetSelection(0); Where3TableCtrl->Enable(false); Parent->SetWhere3Column(wxT("")); Where3ColumnCtrl->Clear(); } Parent->SetWhere3Column(wxT("")); InitializeColumns(Where3ColumnCtrl, Parent->IsWhere3Table2()); Where3ColumnCtrl->Enable(true); Parent->SetWhere3Operator(wxT("")); InitializeOperators(Where3OperatorCtrl); Where3OperatorCtrl->Enable(true); Where3ValueCtrl->SetValue(wxT("")); Where3ValueCtrl->Enable(true); if (Parent->IsWhere2Enabled() == true || Parent->IsWhere1Enabled() == true) { Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(true); } } else { Where3TableCtrl->SetSelection(0); Parent->SetWhere3Table2(false); Where3TableCtrl->Enable(false); Parent->SetWhere3Column(wxT("")); Where3ColumnCtrl->Clear(); Where3ColumnCtrl->Enable(false); Parent->SetWhere3Operator(wxT("")); Where3OperatorCtrl->Clear(); Where3OperatorCtrl->Enable(false); Where3ValueCtrl->SetValue(wxT("")); Where3ValueCtrl->Enable(false); Parent->SetAndOr23(true); Connector23Ctrl->SetSelection(0); Connector23Ctrl->Enable(false); } Parent->UpdateSqlSample(); } void ComposerFilterPage::OnWhere1TableChanged(wxCommandEvent & WXUNUSED(event)) { // // Where #1 table changed // if (Where1TableCtrl->GetSelection() == 1) Parent->SetWhere1Table2(true); else Parent->SetWhere1Table2(false); InitializeColumns(Where1ColumnCtrl, Parent->IsWhere1Table2()); } void ComposerFilterPage::OnWhere2TableChanged(wxCommandEvent & WXUNUSED(event)) { // // Where #2 table changed // if (Where2TableCtrl->GetSelection() == 1) Parent->SetWhere2Table2(true); else Parent->SetWhere2Table2(false); InitializeColumns(Where2ColumnCtrl, Parent->IsWhere2Table2()); } void ComposerFilterPage::OnWhere3TableChanged(wxCommandEvent & WXUNUSED(event)) { // // Where #3 table changed // if (Where3TableCtrl->GetSelection() == 1) Parent->SetWhere3Table2(true); else Parent->SetWhere3Table2(false); InitializeColumns(Where3ColumnCtrl, Parent->IsWhere3Table2()); } void ComposerFilterPage::OnConnector12Changed(wxCommandEvent & WXUNUSED(event)) { // // Connector 1-2 changed // if (Connector12Ctrl->GetSelection() == 0) Parent->SetAndOr12(true); else Parent->SetAndOr12(false); Parent->UpdateSqlSample(); } void ComposerFilterPage::OnConnector23Changed(wxCommandEvent & WXUNUSED(event)) { // // Connector 2-3 changed // if (Connector23Ctrl->GetSelection() == 0) Parent->SetAndOr23(true); else Parent->SetAndOr23(false); Parent->UpdateSqlSample(); } void ComposerFilterPage:: OnWhere1ColumnSelected(wxCommandEvent & WXUNUSED(event)) { // // Where #1 column changed // Parent->SetWhere1Column(Where1ColumnCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerFilterPage:: OnWhere2ColumnSelected(wxCommandEvent & WXUNUSED(event)) { // // Where #2 column changed // Parent->SetWhere2Column(Where2ColumnCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerFilterPage:: OnWhere3ColumnSelected(wxCommandEvent & WXUNUSED(event)) { // // Where #3 column changed // Parent->SetWhere3Column(Where3ColumnCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerFilterPage:: OnWhere1OperatorSelected(wxCommandEvent & WXUNUSED(event)) { // // Where #1 operator changed // wxString str = Where1OperatorCtrl->GetValue(); wxString clean = wxT(""); if (str == wxT("= {equal to}")) clean = wxT("="); if (str == wxT("<> {not equal}")) clean = wxT("<>"); if (str == wxT("< {lesser than}")) clean = wxT("<"); if (str == wxT("<= {lesser / equal}")) clean = wxT("<="); if (str == wxT("> {greather than}")) clean = wxT(">"); if (str == wxT(">= {greather / equal}")) clean = wxT(">="); if (str == wxT("LIKE {text search}")) clean = wxT("LIKE"); if (str == wxT("IN {val1, val2, ...}")) clean = wxT("IN"); if (str == wxT("IS NULL")) clean = wxT("IS NULL"); if (str == wxT("IS NOT NULL")) clean = wxT("IS NOT NULL"); Parent->SetWhere1Operator(clean); if (Parent->GetWhere1Operator() == wxT("IS NULL") || Parent->GetWhere1Operator() == wxT("IS NOT NULL")) { Where1ValueCtrl->SetValue(wxT("")); Parent->SetWhere1Value(wxT("")); Where1ValueCtrl->Enable(false); } else { Where1ValueCtrl->SetValue(Parent->GetWhere1Value()); Where1ValueCtrl->Enable(true); } Parent->UpdateSqlSample(); } void ComposerFilterPage:: OnWhere2OperatorSelected(wxCommandEvent & WXUNUSED(event)) { // // Where #2 operator changed // wxString str = Where2OperatorCtrl->GetValue(); wxString clean = wxT(""); if (str == wxT("= {equal to}")) clean = wxT("="); if (str == wxT("<> {not equal}")) clean = wxT("<>"); if (str == wxT("< {lesser than}")) clean = wxT("<"); if (str == wxT("<= {lesser / equal}")) clean = wxT("<="); if (str == wxT("> {greather than}")) clean = wxT(">"); if (str == wxT(">= {greather / equal}")) clean = wxT(">="); if (str == wxT("LIKE {text search}")) clean = wxT("LIKE"); if (str == wxT("IN {val1, val2, ...}")) clean = wxT("IN"); if (str == wxT("IS NULL")) clean = wxT("IS NULL"); if (str == wxT("IS NOT NULL")) clean = wxT("IS NOT NULL"); Parent->SetWhere2Operator(clean); if (Parent->GetWhere2Operator() == wxT("IS NULL") || Parent->GetWhere2Operator() == wxT("IS NOT NULL")) { Where2ValueCtrl->SetValue(wxT("")); Parent->SetWhere2Value(wxT("")); Where2ValueCtrl->Enable(false); } else { Where2ValueCtrl->SetValue(Parent->GetWhere2Value()); Where2ValueCtrl->Enable(true); } Parent->UpdateSqlSample(); } void ComposerFilterPage:: OnWhere3OperatorSelected(wxCommandEvent & WXUNUSED(event)) { // // Where #3 operator changed // wxString str = Where3OperatorCtrl->GetValue(); wxString clean = wxT(""); if (str == wxT("= {equal to}")) clean = wxT("="); if (str == wxT("<> {not equal}")) clean = wxT("<>"); if (str == wxT("< {lesser than}")) clean = wxT("<"); if (str == wxT("<= {lesser / equal}")) clean = wxT("<="); if (str == wxT("> {greather than}")) clean = wxT(">"); if (str == wxT(">= {greather / equal}")) clean = wxT(">="); if (str == wxT("LIKE {text search}")) clean = wxT("LIKE"); if (str == wxT("IN {val1, val2, ...}")) clean = wxT("IN"); if (str == wxT("IS NULL")) clean = wxT("IS NULL"); if (str == wxT("IS NOT NULL")) clean = wxT("IS NOT NULL"); Parent->SetWhere3Operator(clean); if (Parent->GetWhere3Operator() == wxT("IS NULL") || Parent->GetWhere3Operator() == wxT("IS NOT NULL")) { Where3ValueCtrl->SetValue(wxT("")); Parent->SetWhere3Value(wxT("")); Where3ValueCtrl->Enable(false); } else { Where3ValueCtrl->SetValue(Parent->GetWhere3Value()); Where3ValueCtrl->Enable(true); } Parent->UpdateSqlSample(); } void ComposerFilterPage::OnWhere1ValueChanged(wxCommandEvent & WXUNUSED(event)) { // // Where #1 value changed // Parent->SetWhere1Value(Where1ValueCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerFilterPage::OnWhere2ValueChanged(wxCommandEvent & WXUNUSED(event)) { // // Where #2 value changed // Parent->SetWhere2Value(Where2ValueCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerFilterPage::OnWhere3ValueChanged(wxCommandEvent & WXUNUSED(event)) { // // Where #3 value changed // Parent->SetWhere3Value(Where3ValueCtrl->GetValue()); Parent->UpdateSqlSample(); } bool ComposerOrderPage::Create(ComposerDialog * parent) { // // creating the dialog // Parent = parent; if (wxPanel::Create(Parent->GetTabCtrl()) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ComposerOrderPage::CreateControls() { // // creating individual control and setting initial values // wxSize size; wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the ORDER BY clauses row wxBoxSizer *OrderSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(OrderSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the Order clause #1 pane wxBoxSizer *Order1BoxSizer = new wxBoxSizer(wxVERTICAL); OrderSizer->Add(Order1BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *Order1Box = new wxStaticBox(this, wxID_STATIC, wxT("Order by #1"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *Order1Sizer = new wxStaticBoxSizer(Order1Box, wxVERTICAL); Order1BoxSizer->Add(Order1Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Order1EnabledCtrl = new wxCheckBox(this, ID_QVC_ORDER_1_ENABLE, wxT("Enable")); Order1EnabledCtrl->SetValue(false); if (Parent->GetTableName1().Len() == 0 && Parent->GetTableName2().Len() == 0) Order1EnabledCtrl->Enable(false); Order1Sizer->Add(Order1EnabledCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxString Order1Tables[2]; Order1Tables[0] = wxT("&Main table columns"); Order1Tables[1] = wxT("&Table #2 columns"); Order1TableCtrl = new wxRadioBox(this, ID_QVC_ORDER_1_TABLE, wxT(""), wxDefaultPosition, wxDefaultSize, 2, Order1Tables, 1, wxRA_SPECIFY_COLS); Order1TableCtrl->SetSelection(0); Order1TableCtrl->Enable(false); Order1Sizer->Add(Order1TableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Order1ColumnCtrl = new wxComboBox(this, ID_QVC_ORDER_1_COLUMN, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Order1ColumnCtrl->Enable(false); Order1Sizer->Add(Order1ColumnCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxString desc1[2]; desc1[0] = wxT("&Descending [Z-A]"); desc1[1] = wxT("&Ascending [A-Z]"); Order1DescCtrl = new wxRadioBox(this, ID_QVC_ORDER_1_DESC, wxT("Direction"), wxDefaultPosition, wxDefaultSize, 2, desc1, 1, wxRA_SPECIFY_COLS); Order1DescCtrl->SetSelection(1); Order1DescCtrl->Enable(false); Order1Sizer->Add(Order1DescCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // the Order clause #2 pane wxBoxSizer *Order2BoxSizer = new wxBoxSizer(wxVERTICAL); OrderSizer->Add(Order2BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *Order2Box = new wxStaticBox(this, wxID_STATIC, wxT("Order by #2"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *Order2Sizer = new wxStaticBoxSizer(Order2Box, wxVERTICAL); Order2BoxSizer->Add(Order2Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Order2EnabledCtrl = new wxCheckBox(this, ID_QVC_ORDER_2_ENABLE, wxT("Enable")); Order2EnabledCtrl->SetValue(false); if (Parent->GetTableName1().Len() == 0 && Parent->GetTableName2().Len() == 0) Order2EnabledCtrl->Enable(false); Order2Sizer->Add(Order2EnabledCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxString Order2Tables[2]; Order2Tables[0] = wxT("&Main table columns"); Order2Tables[1] = wxT("&Table #2 columns"); Order2TableCtrl = new wxRadioBox(this, ID_QVC_ORDER_2_TABLE, wxT(""), wxDefaultPosition, wxDefaultSize, 2, Order2Tables, 1, wxRA_SPECIFY_COLS); Order2TableCtrl->SetSelection(0); Order2TableCtrl->Enable(false); Order2Sizer->Add(Order2TableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Order2ColumnCtrl = new wxComboBox(this, ID_QVC_ORDER_2_COLUMN, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Order2ColumnCtrl->Enable(false); Order2Sizer->Add(Order2ColumnCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxString desc2[2]; desc2[0] = wxT("&Descending [Z-A]"); desc2[1] = wxT("&Ascending [A-Z]"); Order2DescCtrl = new wxRadioBox(this, ID_QVC_ORDER_2_DESC, wxT("Direction"), wxDefaultPosition, wxDefaultSize, 2, desc2, 1, wxRA_SPECIFY_COLS); Order2DescCtrl->SetSelection(1); Order2DescCtrl->Enable(false); Order2Sizer->Add(Order2DescCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // the Order clause #3 pane wxBoxSizer *Order3BoxSizer = new wxBoxSizer(wxVERTICAL); OrderSizer->Add(Order3BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *Order3Box = new wxStaticBox(this, wxID_STATIC, wxT("Order by #3"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *Order3Sizer = new wxStaticBoxSizer(Order3Box, wxVERTICAL); Order3BoxSizer->Add(Order3Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Order3EnabledCtrl = new wxCheckBox(this, ID_QVC_ORDER_3_ENABLE, wxT("Enable")); Order3EnabledCtrl->SetValue(false); if (Parent->GetTableName1().Len() == 0 && Parent->GetTableName2().Len() == 0) Order3EnabledCtrl->Enable(false); Order3Sizer->Add(Order3EnabledCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxString Order3Tables[2]; Order3Tables[0] = wxT("&Main table columns"); Order3Tables[1] = wxT("&Table #2 columns"); Order3TableCtrl = new wxRadioBox(this, ID_QVC_ORDER_3_TABLE, wxT(""), wxDefaultPosition, wxDefaultSize, 2, Order2Tables, 1, wxRA_SPECIFY_COLS); Order3TableCtrl->SetSelection(0); Order3TableCtrl->Enable(false); Order3Sizer->Add(Order3TableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Order3ColumnCtrl = new wxComboBox(this, ID_QVC_ORDER_3_COLUMN, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Order3ColumnCtrl->Enable(false); Order3Sizer->Add(Order3ColumnCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxString desc3[2]; desc3[0] = wxT("&Descending [Z-A]"); desc3[1] = wxT("&Ascending [A-Z]"); Order3DescCtrl = new wxRadioBox(this, ID_QVC_ORDER_3_DESC, wxT("Direction"), wxDefaultPosition, wxDefaultSize, 2, desc3, 1, wxRA_SPECIFY_COLS); Order3DescCtrl->SetSelection(1); Order3DescCtrl->Enable(false); Order3Sizer->Add(Order3DescCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // the Order clause #4 pane wxBoxSizer *Order4BoxSizer = new wxBoxSizer(wxVERTICAL); OrderSizer->Add(Order4BoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 0); wxStaticBox *Order4Box = new wxStaticBox(this, wxID_STATIC, wxT("Order by #4"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *Order4Sizer = new wxStaticBoxSizer(Order4Box, wxVERTICAL); Order4BoxSizer->Add(Order4Sizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Order4EnabledCtrl = new wxCheckBox(this, ID_QVC_ORDER_4_ENABLE, wxT("Enable")); Order4EnabledCtrl->SetValue(false); if (Parent->GetTableName1().Len() == 0 && Parent->GetTableName2().Len() == 0) Order4EnabledCtrl->Enable(false); Order4Sizer->Add(Order4EnabledCtrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 1); wxString Order4Tables[2]; Order4Tables[0] = wxT("&Main table columns"); Order4Tables[1] = wxT("&Table #2 columns"); Order4TableCtrl = new wxRadioBox(this, ID_QVC_ORDER_4_TABLE, wxT(""), wxDefaultPosition, wxDefaultSize, 2, Order2Tables, 1, wxRA_SPECIFY_COLS); Order4TableCtrl->SetSelection(0); Order4TableCtrl->Enable(false); Order4Sizer->Add(Order4TableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); Order4ColumnCtrl = new wxComboBox(this, ID_QVC_ORDER_4_COLUMN, wxT(""), wxDefaultPosition, wxSize(130, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); Order4ColumnCtrl->Enable(false); Order4Sizer->Add(Order4ColumnCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxString desc4[2]; desc4[0] = wxT("&Descending [Z-A]"); desc4[1] = wxT("&Ascending [A-Z]"); Order4DescCtrl = new wxRadioBox(this, ID_QVC_ORDER_4_DESC, wxT("Direction"), wxDefaultPosition, wxDefaultSize, 2, desc4, 1, wxRA_SPECIFY_COLS); Order4DescCtrl->SetSelection(1); Order4DescCtrl->Enable(false); Order4Sizer->Add(Order4DescCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); // adding the event handlers Connect(ID_QVC_ORDER_1_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder1Enabled); Connect(ID_QVC_ORDER_2_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder2Enabled); Connect(ID_QVC_ORDER_3_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder3Enabled); Connect(ID_QVC_ORDER_4_ENABLE, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder4Enabled); Connect(ID_QVC_ORDER_1_TABLE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder1TableChanged); Connect(ID_QVC_ORDER_2_TABLE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder2TableChanged); Connect(ID_QVC_ORDER_3_TABLE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder3TableChanged); Connect(ID_QVC_ORDER_4_TABLE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder4TableChanged); Connect(ID_QVC_ORDER_1_COLUMN, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder1ColumnSelected); Connect(ID_QVC_ORDER_2_COLUMN, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder2ColumnSelected); Connect(ID_QVC_ORDER_3_COLUMN, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder3ColumnSelected); Connect(ID_QVC_ORDER_4_COLUMN, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder4ColumnSelected); Connect(ID_QVC_ORDER_1_DESC, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder1DescChanged); Connect(ID_QVC_ORDER_2_DESC, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder2DescChanged); Connect(ID_QVC_ORDER_3_DESC, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder3DescChanged); Connect(ID_QVC_ORDER_4_DESC, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerOrderPage::OnOrder4DescChanged); } void ComposerOrderPage::Table1Status(bool ok) { // // enabling/disabling Table#1 dependent fields // if (ok == false) { if (Parent->GetTableName2().Len() == 0) { Order1EnabledCtrl->SetValue(false); Parent->SetOrder1Enabled(false); Order1EnabledCtrl->Enable(false); Order2EnabledCtrl->SetValue(false); Parent->SetOrder2Enabled(false); Order2EnabledCtrl->Enable(false); Order3EnabledCtrl->SetValue(false); Parent->SetOrder3Enabled(false); Order3EnabledCtrl->Enable(false); Order4EnabledCtrl->SetValue(false); Parent->SetOrder4Enabled(false); Order4EnabledCtrl->Enable(false); Order1TableCtrl->SetSelection(0); Parent->SetOrder1Table2(false); Order1TableCtrl->Enable(false); Parent->SetOrder1Column(wxT("")); Order1ColumnCtrl->Clear(); Order1ColumnCtrl->Enable(false); Order1DescCtrl->SetSelection(1); Parent->SetOrder1Desc(false); Order1DescCtrl->Enable(false); Order2TableCtrl->SetSelection(0); Parent->SetOrder2Table2(false); Order2TableCtrl->Enable(false); Parent->SetOrder2Column(wxT("")); Order2ColumnCtrl->Clear(); Order2ColumnCtrl->Enable(false); Order2DescCtrl->SetSelection(1); Parent->SetOrder2Desc(false); Order2DescCtrl->Enable(false); Order3TableCtrl->SetSelection(0); Parent->SetOrder3Table2(false); Order3TableCtrl->Enable(false); Parent->SetOrder3Column(wxT("")); Order3ColumnCtrl->Clear(); Order3ColumnCtrl->Enable(false); Order3DescCtrl->SetSelection(1); Parent->SetOrder3Desc(false); Order3DescCtrl->Enable(false); Order4TableCtrl->SetSelection(0); Parent->SetOrder4Table2(false); Order4TableCtrl->Enable(false); Parent->SetOrder4Column(wxT("")); Order4ColumnCtrl->Clear(); Order4ColumnCtrl->Enable(false); Order4DescCtrl->SetSelection(1); Parent->SetOrder4Desc(false); Order4DescCtrl->Enable(false); } else { if (Parent->IsOrder1Table2() == false) { Order1EnabledCtrl->SetValue(false); Parent->SetOrder1Enabled(false); Order1TableCtrl->SetSelection(0); Parent->SetOrder1Table2(false); Order1TableCtrl->Enable(false); Parent->SetOrder1Column(wxT("")); Order1ColumnCtrl->Clear(); Order1ColumnCtrl->Enable(false); Order1DescCtrl->SetSelection(1); Parent->SetOrder1Desc(false); Order1DescCtrl->Enable(false); } if (Parent->IsOrder2Table2() == false) { Order2EnabledCtrl->SetValue(false); Parent->SetOrder2Enabled(false); Order2TableCtrl->SetSelection(0); Parent->SetOrder2Table2(false); Order2TableCtrl->Enable(false); Parent->SetOrder2Column(wxT("")); Order2ColumnCtrl->Clear(); Order2ColumnCtrl->Enable(false); Order2DescCtrl->SetSelection(1); Parent->SetOrder2Desc(false); Order2DescCtrl->Enable(false); } if (Parent->IsOrder3Table2() == false) { Order3EnabledCtrl->SetValue(false); Parent->SetOrder3Enabled(false); Order3TableCtrl->SetSelection(0); Parent->SetOrder3Table2(false); Order3TableCtrl->Enable(false); Parent->SetOrder3Column(wxT("")); Order3ColumnCtrl->Clear(); Order3ColumnCtrl->Enable(false); Order3DescCtrl->SetSelection(1); Parent->SetOrder3Desc(false); Order3DescCtrl->Enable(false); } if (Parent->IsOrder4Table2() == false) { Order4EnabledCtrl->SetValue(false); Parent->SetOrder4Enabled(false); Order4TableCtrl->SetSelection(0); Parent->SetOrder4Table2(false); Order4TableCtrl->Enable(false); Parent->SetOrder4Column(wxT("")); Order4ColumnCtrl->Clear(); Order4ColumnCtrl->Enable(false); Order4DescCtrl->SetSelection(1); Parent->SetOrder4Desc(false); Order4DescCtrl->Enable(false); } } } else { Order1EnabledCtrl->Enable(true); Order2EnabledCtrl->Enable(true); Order3EnabledCtrl->Enable(true); Order4EnabledCtrl->Enable(true); } } void ComposerOrderPage::Table2Status(bool ok) { // // enabling/disabling Table#2 dependent fields // if (ok == false) { if (Parent->GetTableName1().Len() == 0) { Order1EnabledCtrl->SetValue(false); Parent->SetOrder1Enabled(false); Order1EnabledCtrl->Enable(false); Order2EnabledCtrl->SetValue(false); Parent->SetOrder2Enabled(false); Order2EnabledCtrl->Enable(false); Order3EnabledCtrl->SetValue(false); Parent->SetOrder3Enabled(false); Order3EnabledCtrl->Enable(false); Order4EnabledCtrl->SetValue(false); Parent->SetOrder4Enabled(false); Order4EnabledCtrl->Enable(false); Order1TableCtrl->SetSelection(0); Parent->SetOrder1Table2(false); Order1TableCtrl->Enable(false); Parent->SetOrder1Column(wxT("")); Order1ColumnCtrl->Clear(); Order1ColumnCtrl->Enable(false); Order1DescCtrl->SetSelection(1); Parent->SetOrder1Desc(false); Order1DescCtrl->Enable(false); Parent->SetOrder2Table2(false); Order2TableCtrl->Enable(false); Parent->SetOrder2Column(wxT("")); Order2ColumnCtrl->Clear(); Order2ColumnCtrl->Enable(false); Order2DescCtrl->SetSelection(1); Parent->SetOrder2Desc(false); Order2DescCtrl->Enable(false); Order3TableCtrl->SetSelection(0); Parent->SetOrder3Table2(false); Order3TableCtrl->Enable(false); Parent->SetOrder3Column(wxT("")); Order3ColumnCtrl->Clear(); Order3ColumnCtrl->Enable(false); Order3DescCtrl->SetSelection(1); Parent->SetOrder3Desc(false); Order3DescCtrl->Enable(false); Order4TableCtrl->SetSelection(0); Parent->SetOrder4Table2(false); Order4TableCtrl->Enable(false); Parent->SetOrder4Column(wxT("")); Order4ColumnCtrl->Clear(); Order4ColumnCtrl->Enable(false); Order4DescCtrl->SetSelection(1); Parent->SetOrder4Desc(false); Order4DescCtrl->Enable(false); } else { if (Parent->IsOrder1Table2() == true) { Order1EnabledCtrl->SetValue(false); Parent->SetOrder1Enabled(false); Order1TableCtrl->SetSelection(0); Parent->SetOrder1Table2(false); Order1TableCtrl->Enable(false); Parent->SetOrder1Column(wxT("")); Order1ColumnCtrl->Clear(); Order1ColumnCtrl->Enable(false); Order1DescCtrl->SetSelection(1); Parent->SetOrder1Desc(false); Order1DescCtrl->Enable(false); } if (Parent->IsOrder2Table2() == true) { Order2EnabledCtrl->SetValue(false); Parent->SetOrder2Enabled(false); Order2TableCtrl->SetSelection(0); Parent->SetOrder2Table2(false); Order2TableCtrl->Enable(false); Parent->SetOrder2Column(wxT("")); Order2ColumnCtrl->Clear(); Order2ColumnCtrl->Enable(false); Order2DescCtrl->SetSelection(1); Parent->SetOrder2Desc(false); Order2DescCtrl->Enable(false); } if (Parent->IsOrder3Table2() == true) { Order3EnabledCtrl->SetValue(false); Parent->SetOrder3Enabled(false); Order3TableCtrl->SetSelection(0); Parent->SetOrder3Table2(false); Order3TableCtrl->Enable(false); Parent->SetOrder3Column(wxT("")); Order3ColumnCtrl->Clear(); Order3ColumnCtrl->Enable(false); Order3DescCtrl->SetSelection(1); Parent->SetOrder3Desc(false); Order3DescCtrl->Enable(false); } if (Parent->IsOrder4Table2() == true) { Order4EnabledCtrl->SetValue(false); Parent->SetOrder4Enabled(false); Order4TableCtrl->SetSelection(0); Parent->SetOrder4Table2(false); Order4TableCtrl->Enable(false); Parent->SetOrder4Column(wxT("")); Order4ColumnCtrl->Clear(); Order4ColumnCtrl->Enable(false); Order4DescCtrl->SetSelection(1); Parent->SetOrder4Desc(false); Order4DescCtrl->Enable(false); } } } else { Order1EnabledCtrl->Enable(true); Order2EnabledCtrl->Enable(true); Order3EnabledCtrl->Enable(true); Order4EnabledCtrl->Enable(true); } } void ComposerOrderPage::OnOrder1Enabled(wxCommandEvent & WXUNUSED(event)) { // // Order #1 clause enabled/disabled // Parent->SetOrder1Enabled(Order1EnabledCtrl->GetValue()); if (Parent->IsOrder1Enabled() == true) { if (Parent->IsTable2Enabled() == true) { if (Parent->IsOrder1Table2() == false) Order1TableCtrl->SetSelection(0); else Order1TableCtrl->SetSelection(1); Order1TableCtrl->Enable(true); } else { Parent->SetOrder1Table2(false); Order1TableCtrl->SetSelection(0); Order1TableCtrl->Enable(false); Parent->SetOrder1Column(wxT("")); Order1ColumnCtrl->Clear(); } Parent->SetOrder1Column(wxT("")); InitializeColumns(Order1ColumnCtrl, Parent->IsOrder1Table2()); Order1ColumnCtrl->Enable(true); if (Parent->IsOrder1Desc() == true) Order1DescCtrl->SetSelection(0); else Order1DescCtrl->SetSelection(1); Order1DescCtrl->Enable(true); } else { Order1TableCtrl->SetSelection(0); Parent->SetOrder1Table2(false); Order1TableCtrl->Enable(false); Parent->SetOrder1Column(wxT("")); Order1ColumnCtrl->Clear(); Order1ColumnCtrl->Enable(false); Parent->SetOrder1Desc(false); Order1DescCtrl->SetSelection(1); Order1DescCtrl->Enable(false); } Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder2Enabled(wxCommandEvent & WXUNUSED(event)) { // // Order #2 clause enabled/disabled // Parent->SetOrder2Enabled(Order2EnabledCtrl->GetValue()); if (Parent->IsOrder2Enabled() == true) { if (Parent->IsTable2Enabled() == true) { if (Parent->IsOrder2Table2() == false) Order2TableCtrl->SetSelection(0); else Order2TableCtrl->SetSelection(1); Order2TableCtrl->Enable(true); } else { Parent->SetOrder2Table2(false); Order2TableCtrl->SetSelection(0); Order2TableCtrl->Enable(false); Parent->SetOrder2Column(wxT("")); Order2ColumnCtrl->Clear(); } Parent->SetOrder2Column(wxT("")); InitializeColumns(Order2ColumnCtrl, Parent->IsOrder2Table2()); Order2ColumnCtrl->Enable(true); if (Parent->IsOrder2Desc() == true) Order2DescCtrl->SetSelection(0); else Order2DescCtrl->SetSelection(1); Order2DescCtrl->Enable(true); } else { Order2TableCtrl->SetSelection(0); Parent->SetOrder2Table2(false); Order2TableCtrl->Enable(false); Parent->SetOrder2Column(wxT("")); Order2ColumnCtrl->Clear(); Order2ColumnCtrl->Enable(false); Parent->SetOrder2Desc(false); Order2DescCtrl->SetSelection(1); Order2DescCtrl->Enable(false); } Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder3Enabled(wxCommandEvent & WXUNUSED(event)) { // // Order #3 clause enabled/disabled // Parent->SetOrder3Enabled(Order3EnabledCtrl->GetValue()); if (Parent->IsOrder3Enabled() == true) { if (Parent->IsTable2Enabled() == true) { if (Parent->IsOrder3Table2() == false) Order3TableCtrl->SetSelection(0); else Order3TableCtrl->SetSelection(1); Order3TableCtrl->Enable(true); } else { Parent->SetOrder3Table2(false); Order3TableCtrl->SetSelection(0); Order3TableCtrl->Enable(false); Parent->SetOrder3Column(wxT("")); Order3ColumnCtrl->Clear(); } Parent->SetOrder3Column(wxT("")); InitializeColumns(Order3ColumnCtrl, Parent->IsOrder3Table2()); Order3ColumnCtrl->Enable(true); if (Parent->IsOrder3Desc() == true) Order3DescCtrl->SetSelection(0); else Order3DescCtrl->SetSelection(1); Order3DescCtrl->Enable(true); } else { Order3TableCtrl->SetSelection(0); Parent->SetOrder3Table2(false); Order3TableCtrl->Enable(false); Parent->SetOrder3Column(wxT("")); Order3ColumnCtrl->Clear(); Order3ColumnCtrl->Enable(false); Parent->SetOrder3Desc(false); Order3DescCtrl->SetSelection(1); Order3DescCtrl->Enable(false); } Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder4Enabled(wxCommandEvent & WXUNUSED(event)) { // // Order #4 clause enabled/disabled // Parent->SetOrder4Enabled(Order4EnabledCtrl->GetValue()); if (Parent->IsOrder4Enabled() == true) { if (Parent->IsTable2Enabled() == true) { if (Parent->IsOrder4Table2() == false) Order4TableCtrl->SetSelection(0); else Order4TableCtrl->SetSelection(1); Order4TableCtrl->Enable(true); } else { Parent->SetOrder4Table2(false); Order4TableCtrl->SetSelection(0); Order4TableCtrl->Enable(false); Parent->SetOrder4Column(wxT("")); Order4ColumnCtrl->Clear(); } Parent->SetOrder4Column(wxT("")); InitializeColumns(Order4ColumnCtrl, Parent->IsOrder4Table2()); Order4ColumnCtrl->Enable(true); if (Parent->IsOrder4Desc() == true) Order4DescCtrl->SetSelection(0); else Order4DescCtrl->SetSelection(1); Order4DescCtrl->Enable(true); } else { Order4TableCtrl->SetSelection(0); Parent->SetOrder4Table2(false); Order4TableCtrl->Enable(false); Parent->SetOrder4Column(wxT("")); Order4ColumnCtrl->Clear(); Order4ColumnCtrl->Enable(false); Parent->SetOrder4Desc(false); Order4DescCtrl->SetSelection(1); Order4DescCtrl->Enable(false); } Parent->UpdateSqlSample(); } void ComposerOrderPage::InitializeColumns(wxComboBox * ctrl, bool table2) { // initializing a columns list ComboBox ctrl->Clear(); AuxColumn *pColumn; if (table2 == false) pColumn = Parent->GetColumn1List()->GetFirst(); else pColumn = Parent->GetColumn2List()->GetFirst(); while (pColumn) { wxString col = pColumn->GetName(); ctrl->Append(col); pColumn = pColumn->GetNext(); } } void ComposerOrderPage::OnOrder1TableChanged(wxCommandEvent & WXUNUSED(event)) { // // Order #1 table changed // if (Order1TableCtrl->GetSelection() == 1) Parent->SetOrder1Table2(true); else Parent->SetOrder1Table2(false); InitializeColumns(Order1ColumnCtrl, Parent->IsOrder1Table2()); } void ComposerOrderPage::OnOrder2TableChanged(wxCommandEvent & WXUNUSED(event)) { // // Order #2 table changed // if (Order2TableCtrl->GetSelection() == 1) Parent->SetOrder2Table2(true); else Parent->SetOrder2Table2(false); InitializeColumns(Order2ColumnCtrl, Parent->IsOrder2Table2()); } void ComposerOrderPage::OnOrder3TableChanged(wxCommandEvent & WXUNUSED(event)) { // // Order #3 table changed // if (Order3TableCtrl->GetSelection() == 1) Parent->SetOrder3Table2(true); else Parent->SetOrder3Table2(false); InitializeColumns(Order3ColumnCtrl, Parent->IsOrder3Table2()); } void ComposerOrderPage::OnOrder4TableChanged(wxCommandEvent & WXUNUSED(event)) { // // Order #4 table changed // if (Order4TableCtrl->GetSelection() == 1) Parent->SetOrder4Table2(true); else Parent->SetOrder4Table2(false); InitializeColumns(Order4ColumnCtrl, Parent->IsOrder4Table2()); } void ComposerOrderPage::OnOrder1ColumnSelected(wxCommandEvent & WXUNUSED(event)) { // // Order #1 column changed // Parent->SetOrder1Column(Order1ColumnCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder2ColumnSelected(wxCommandEvent & WXUNUSED(event)) { // // Order #2 column changed // Parent->SetOrder2Column(Order2ColumnCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder3ColumnSelected(wxCommandEvent & WXUNUSED(event)) { // // Order #3 column changed // Parent->SetOrder3Column(Order3ColumnCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder4ColumnSelected(wxCommandEvent & WXUNUSED(event)) { // // Order #4 column changed // Parent->SetOrder4Column(Order4ColumnCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder1DescChanged(wxCommandEvent & WXUNUSED(event)) { // // Order #1 Asc/Desc changed // if (Order1DescCtrl->GetSelection() == 0) Parent->SetOrder1Desc(true); else Parent->SetOrder1Desc(false); Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder2DescChanged(wxCommandEvent & WXUNUSED(event)) { // // Order #2 Asc/Desc changed // if (Order2DescCtrl->GetSelection() == 0) Parent->SetOrder2Desc(true); else Parent->SetOrder2Desc(false); Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder3DescChanged(wxCommandEvent & WXUNUSED(event)) { // // Order #3 Asc/Desc changed // if (Order3DescCtrl->GetSelection() == 0) Parent->SetOrder3Desc(true); else Parent->SetOrder3Desc(false); Parent->UpdateSqlSample(); } void ComposerOrderPage::OnOrder4DescChanged(wxCommandEvent & WXUNUSED(event)) { // // Order #4 Asc/Desc changed // if (Order4DescCtrl->GetSelection() == 0) Parent->SetOrder4Desc(true); else Parent->SetOrder4Desc(false); Parent->UpdateSqlSample(); } bool ComposerViewPage::Create(ComposerDialog * parent) { // // creating the dialog // Parent = parent; if (wxPanel::Create(Parent->GetTabCtrl()) == false) return false; // populates individual controls CreateControls(); // sets dialog sizer GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); // centers the dialog window Centre(); return true; } void ComposerViewPage::CreateControls() { // // creating individual control and setting initial values // wxBoxSizer *topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); wxBoxSizer *boxSizer = new wxBoxSizer(wxVERTICAL); topSizer->Add(boxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the VIEw row wxBoxSizer *viewMainSizer = new wxBoxSizer(wxHORIZONTAL); boxSizer->Add(viewMainSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // the VIEW pane wxBoxSizer *viewBoxSizer = new wxBoxSizer(wxHORIZONTAL); viewMainSizer->Add(viewBoxSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxStaticBox *viewBox = new wxStaticBox(this, wxID_STATIC, wxT("Create View options"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *viewSizer = new wxStaticBoxSizer(viewBox, wxVERTICAL); viewBoxSizer->Add(viewSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); wxString viewModes[3]; viewModes[0] = wxT("&No View [execute SELECT query]"); viewModes[1] = wxT("&Create View [ordinary SQL view]"); viewModes[2] = wxT("&Create Spatial View [could be used as a GIS Layer]"); ViewTypeCtrl = new wxRadioBox(this, ID_QVC_VIEW_TYPE, wxT("View type"), wxDefaultPosition, wxDefaultSize, 3, viewModes, 1, wxRA_SPECIFY_COLS); ViewTypeCtrl->SetSelection(0); viewSizer->Add(ViewTypeCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); wxSize size = ViewTypeCtrl->GetSize(); wxStaticBox *viewNmBox = new wxStaticBox(this, wxID_STATIC, wxT("View name"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *viewNmSizer = new wxStaticBoxSizer(viewNmBox, wxVERTICAL); viewSizer->Add(viewNmSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); ViewNameCtrl = new wxTextCtrl(this, ID_QVC_VIEW_NAME, Parent->GetViewName(), wxDefaultPosition, wxSize(size.GetWidth() - 10, 21)); ViewNameCtrl->Enable(false); viewNmSizer->Add(ViewNameCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); // the GEOMETRY pane wxStaticBox *geomBox = new wxStaticBox(this, wxID_STATIC, wxT("Geometry Column"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *geomSizer = new wxStaticBoxSizer(geomBox, wxVERTICAL); viewBoxSizer->Add(geomSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2); wxString geomTables[2]; geomTables[0] = wxT("&Main table geometries"); geomTables[1] = wxT("&Table #2 geometries"); GeomTableCtrl = new wxRadioBox(this, ID_QVC_VIEW_GEOTABLE, wxT(""), wxDefaultPosition, wxDefaultSize, 2, geomTables, 1, wxRA_SPECIFY_COLS); GeomTableCtrl->SetSelection(0); GeomTableCtrl->Enable(false); geomSizer->Add(GeomTableCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 1); size = GeomTableCtrl->GetSize(); GeometryColumnCtrl = new wxComboBox(this, ID_QVC_VIEW_GEOMETRY, wxT(""), wxDefaultPosition, wxSize(size.GetWidth() - 5, 21), 0, NULL, wxCB_DROPDOWN | wxCB_READONLY); GeometryColumnCtrl->Enable(false); geomSizer->Add(GeometryColumnCtrl, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5); // Writable View wxStaticBox *writeBox = new wxStaticBox(this, wxID_STATIC, wxT("Read/Write View"), wxDefaultPosition, wxDefaultSize); wxBoxSizer *writeSizer = new wxStaticBoxSizer(writeBox, wxHORIZONTAL); boxSizer->Add(writeSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2); Writable1Ctrl = new wxCheckBox(this, ID_QVC_WRITABLE_1, wxT("RW Enabled Main Table")); Writable1Ctrl->SetValue(false); Writable1Ctrl->Enable(false); writeSizer->Add(Writable1Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3); Writable2Ctrl = new wxCheckBox(this, ID_QVC_WRITABLE_2, wxT("RW Enabled Table #2")); Writable2Ctrl->SetValue(false); Writable2Ctrl->Enable(false); writeSizer->Add(Writable2Ctrl, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3); // adding the event handlers Connect(ID_QVC_VIEW_TYPE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerViewPage::OnViewTypeChanged); Connect(ID_QVC_VIEW_NAME, wxEVT_COMMAND_TEXT_UPDATED, (wxObjectEventFunction) & ComposerViewPage::OnViewNameChanged); Connect(ID_QVC_VIEW_GEOTABLE, wxEVT_COMMAND_RADIOBOX_SELECTED, (wxObjectEventFunction) & ComposerViewPage::OnGeomTableChanged); Connect(ID_QVC_VIEW_GEOMETRY, wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) & ComposerViewPage::OnGeometryColumnSelected); Connect(ID_QVC_WRITABLE_1, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerViewPage::OnWritable1Changed); Connect(ID_QVC_WRITABLE_2, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) & ComposerViewPage::OnWritable2Changed); } void ComposerViewPage::Table1Status(bool ok) { // // enabling/disabling Table#1 dependent fields // if (ok == false) { if (Parent->GetTableName2().Len() == 0) { GeomTableCtrl->SetSelection(0); Parent->SetViewGeomTable2(false); GeometryColumnCtrl->Clear(); Parent->SetGeometryColumn(wxT("")); } else { if (Parent->IsViewGeomTable2() == false) { GeomTableCtrl->SetSelection(0); Parent->SetViewGeomTable2(false); GeometryColumnCtrl->Clear(); Parent->SetGeometryColumn(wxT("")); } } } else { if (Parent->IsTable2Enabled() == false) { GeomTableCtrl->SetSelection(0); Parent->SetViewGeomTable2(false); GeomTableCtrl->Enable(false); } else { if (Parent->IsSpatialView() == true) { if (Parent->IsViewGeomTable2() == true) GeomTableCtrl->SetSelection(1); else GeomTableCtrl->SetSelection(0); GeomTableCtrl->Enable(true); GeometryColumnCtrl->Enable(true); InitializeGeometries(Parent->IsViewGeomTable2()); } else { GeomTableCtrl->SetSelection(0); Parent->SetViewGeomTable2(false); GeomTableCtrl->Enable(false); } } } } void ComposerViewPage::Table2Status(bool ok) { // // enabling/disabling Table#2 dependent fields // if (ok == false) { if (Parent->GetTableName1().Len() == 0) { GeomTableCtrl->SetSelection(0); Parent->SetViewGeomTable2(false); GeometryColumnCtrl->Clear(); Parent->SetGeometryColumn(wxT("")); } else { if (Parent->IsOrder1Table2() == true) { GeomTableCtrl->SetSelection(0); Parent->SetViewGeomTable2(false); GeometryColumnCtrl->Clear(); Parent->SetGeometryColumn(wxT("")); } } } else { if (Parent->IsSpatialView() == true) { if (Parent->IsViewGeomTable2() == true) GeomTableCtrl->SetSelection(1); else GeomTableCtrl->SetSelection(0); GeomTableCtrl->Enable(true); GeometryColumnCtrl->Enable(true); InitializeGeometries(Parent->IsViewGeomTable2()); } else { GeomTableCtrl->SetSelection(0); Parent->SetViewGeomTable2(false); GeomTableCtrl->Enable(false); } } } void ComposerViewPage::InitializeGeometries(bool table2) { // initializing the Geometry columns list ComboBox GeometryColumnCtrl->Clear(); AuxTable *pTbl = NULL; AuxTable *pTable; wxString tbl = Parent->GetTableName1(); if (table2 == true) tbl = Parent->GetTableName2(); pTable = Parent->GetTableList()->GetFirst(); while (pTable) { if (pTable->GetTableName() == tbl) { pTbl = pTable; break; } pTable = pTable->GetNext(); } if (pTbl) { // initializing Geometry columns int i; for (i = 0; i < pTable->GetGeometriesCount(); i++) GeometryColumnCtrl->Append(pTable->GetGeometryColumn(i)); } } void ComposerViewPage::OnViewTypeChanged(wxCommandEvent & WXUNUSED(event)) { // // View type changed // Parent->SetPlainView(false); Parent->SetSpatialView(false); if (ViewTypeCtrl->GetSelection() == 1) Parent->SetPlainView(true); if (ViewTypeCtrl->GetSelection() == 2) Parent->SetSpatialView(true); if (Parent->IsPlainView() == true || Parent->IsSpatialView() == true) { ViewNameCtrl->Enable(true); } else { ViewNameCtrl->Enable(false); ViewNameCtrl->SetValue(wxT("")); Parent->SetViewName(wxT("")); } if (Parent->IsSpatialView() == true) { InitializeGeometries(Parent->IsViewGeomTable2()); if (Parent->IsTable2Enabled() == true) GeomTableCtrl->Enable(true); GeometryColumnCtrl->Enable(true); Writable1Ctrl->Enable(true); if (Parent->IsTable2Enabled() == true) { Writable2Ctrl->Enable(true); Writable2Ctrl->SetValue(false); Parent->SetWritable2(false); } } else { GeomTableCtrl->Enable(false); GeomTableCtrl->SetSelection(0); Parent->SetViewGeomTable2(false); GeometryColumnCtrl->Enable(false); GeometryColumnCtrl->Clear(); Parent->SetGeometryColumn(wxT("")); Writable1Ctrl->Enable(false); Writable2Ctrl->Enable(false); Writable1Ctrl->SetValue(false); Writable2Ctrl->SetValue(false); Parent->SetWritable1(false); Parent->SetWritable2(false); } Parent->UpdateSqlSample(); } void ComposerViewPage::OnViewNameChanged(wxCommandEvent & WXUNUSED(event)) { // // View name changed // Parent->SetViewName(ViewNameCtrl->GetValue()); Parent->UpdateSqlSample(); } void ComposerViewPage::OnGeomTableChanged(wxCommandEvent & WXUNUSED(event)) { // // View Geom table changed // if (GeomTableCtrl->GetSelection() == 1) Parent->SetViewGeomTable2(true); else Parent->SetViewGeomTable2(false); InitializeGeometries(Parent->IsViewGeomTable2()); } void ComposerViewPage:: OnGeometryColumnSelected(wxCommandEvent & WXUNUSED(event)) { // // Geometry column selection changed // Parent->SetGeometryColumn(GeometryColumnCtrl->GetValue()); Parent->SelectGeometryColumn(); Parent->UpdateSqlSample(); } void ComposerViewPage::OnWritable1Changed(wxCommandEvent & WXUNUSED(event)) { // // Main Table Read/Write enabled/disabled // Parent->SetWritable1(Writable1Ctrl->GetValue()); if (Parent->IsWritable1() == false) { Parent->SetWritable2(false); Writable2Ctrl->SetValue(false); } } void ComposerViewPage::OnWritable2Changed(wxCommandEvent & WXUNUSED(event)) { // // Table#2 Read/Write enabled/disabled // Parent->SetWritable2(Writable2Ctrl->GetValue()); if (Parent->IsWritable2() == true) { Parent->SetWritable1(true); Writable1Ctrl->SetValue(true); } } AuxTable::AuxTable(wxString & table) { // constructor - table item TableName = table; MaxGeometryIndex = 0; Next = NULL; } void AuxTable::AddGeometryColumn(wxString & geom) { // adding a Geometry column if (MaxGeometryIndex < 128) Geometries[MaxGeometryIndex++] = geom; } wxString & AuxTable::GetGeometryColumn(int ind) { // returns a Geometry column return Geometries[ind]; } AuxTableList::AuxTableList() { // constructor - table list First = NULL; Last = NULL; Count = 0; } AuxTableList::~AuxTableList() { // destructor - table list Flush(); } void AuxTableList::Flush() { // cleanup AuxTable *pT; AuxTable *pTn; pT = First; while (pT) { pTn = pT->GetNext(); delete pT; pT = pTn; } First = NULL; Last = NULL; Count = 0; } void AuxTableList::Populate(sqlite3 * handle) { // populating a table list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; char *geom; wxString tblName; wxString geomCol; wxString sql; AuxTable *pTable; // retrieving the Table Names sql = wxT ("SELECT name FROM sqlite_master WHERE (type = 'table' OR type = 'view') ORDER BY name"); int ret = sqlite3_get_table(handle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) return; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; tblName = wxString::FromUTF8(name); pTable = new AuxTable(tblName); if (!First) First = pTable; if (Last) Last->SetNext(pTable); Last = pTable; Count++; } } sqlite3_free_table(results); // retrieving the Geometry Columns sql = wxT("SELECT f_table_name, f_geometry_column FROM geometry_columns"); ret = sqlite3_get_table(handle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) return; if (rows < 1) ; else { for (i = 1; i <= rows; i++) { name = results[(i * columns) + 0]; geom = results[(i * columns) + 1]; tblName = wxString::FromUTF8(name); geomCol = wxString::FromUTF8(geom); pTable = First; while (pTable) { char tbl[1024]; strcpy(tbl, pTable->GetTableName().ToUTF8()); if (strcasecmp(tbl, name) == 0) { pTable->AddGeometryColumn(geomCol); break; } pTable = pTable->GetNext(); } } } sqlite3_free_table(results); } AuxColumn::AuxColumn(wxString & name) { // constructor - column item Name = name; Selected = false; Next = NULL; } AuxColumnList::AuxColumnList() { // constructor - column list First = NULL; Last = NULL; Count = 0; } AuxColumnList::~AuxColumnList() { // destructor - column list Flush(); } void AuxColumnList::Flush() { // cleanup AuxColumn *pC; AuxColumn *pCn; pC = First; while (pC) { pCn = pC->GetNext(); delete pC; pC = pCn; } First = NULL; Last = NULL; Count = 0; } void AuxColumnList::SetState(int ind, bool mode) { // setting the selection state for some column identified by its position AuxColumn *pC; int cnt = 0; pC = First; while (pC) { if (cnt == ind) { pC->SetState(mode); return; } cnt++; pC = pC->GetNext(); } } void AuxColumnList::SetState(wxString & column) { // forcing the selection state for some column identified by its name AuxColumn *pC; pC = First; while (pC) { if (pC->GetName() == column) { pC->SetState(true); return; } pC = pC->GetNext(); } } bool AuxColumnList::HasSelectedColumns() { // setting the selection state for some column identified by its position AuxColumn *pC; int cnt = 0; pC = First; while (pC) { cnt++; pC = pC->GetNext(); } if (cnt) return true; return false; } void AuxColumnList::Populate(sqlite3 * handle, wxString & table) { // populating a column list int i; char **results; int rows; int columns; char *errMsg = NULL; char *name; wxString colName; wxString sql; AuxColumn *pCol; char xname[1024]; Flush(); sql = wxT("PRAGMA table_info("); strcpy(xname, table.ToUTF8()); MyFrame::DoubleQuotedSql(xname); sql += wxString::FromUTF8(xname); sql += wxT(")"); int ret = sqlite3_get_table(handle, sql.ToUTF8(), &results, &rows, &columns, &errMsg); if (ret != SQLITE_OK) return; if (rows < 1) ; else { // inserting the ROWID colName = wxT("ROWID"); pCol = new AuxColumn(colName); if (!First) First = pCol; if (Last) Last->SetNext(pCol); Last = pCol; Count++; for (i = 1; i <= rows; i++) { name = results[(i * columns) + 1]; if (strcasecmp(name, "ROWID") == 0) continue; colName = wxString::FromUTF8(name); pCol = new AuxColumn(colName); if (!First) First = pCol; if (Last) Last->SetNext(pCol); Last = pCol; Count++; } } sqlite3_free_table(results); }