Version: 0.6.0
cartoui.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: wxGISCartoUI main header.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009,2014 Dmitry Baryshnikov
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 
22 #pragma once
23 
24 #include "wxgis/carto/carto.h"
25 
26 #ifndef wxGIS_USE_CAIRO
27 #error Cairo required
28 #endif
29 
34 enum wxGISEnumMapToolState
35 {
36  enumGISMapNone = 0,
37  enumGISMapPanning,
38  enumGISMapZooming,
39  enumGISMapRotating,
40  enumGISMapDrawing,
41  enumGISMapWheeling,
42  enumGISMapWheelingStop,
43  enumGISMapFlashing,
44  enumGISMapRedraw
45 };
46 
51 enum wxGISEnumFlashStyle
52 {
53  enumGISMapFlashNone = 0,
54  enumGISMapFlashNewColor,
55  enumGISMapFlashWaves
56 };
57 
58 inline bool IsURL(const wxString &sText)
59 {
60  return sText.StartsWith(wxT("http:")) || sText.StartsWith(wxT("www.")) || sText.StartsWith(wxT("https:")) || sText.StartsWith(wxT("ftp:")) || sText.StartsWith(wxT("ftp.")) || sText.StartsWith(wxT("www2."));
61 
62 }
63 
64 inline bool IsLocalURL(const wxString &sText)
65 {
66  return sText.StartsWith(wxT("file:"));
67 }