forked from lixun910/geoda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GeneralWxUtils.h
56 lines (52 loc) · 1.95 KB
/
GeneralWxUtils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* GeoDa TM, Copyright (C) 2011-2015 by Luc Anselin - all rights reserved
*
* This file is part of GeoDa.
*
* GeoDa 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.
*
* GeoDa 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 <http://www.gnu.org/licenses/>.
*/
#ifndef __GEODA_CENTER_GENERAL_WX_UTILS_H__
#define __GEODA_CENTER_GENERAL_WX_UTILS_H__
#include <wx/menu.h>
#include <wx/string.h>
class GeneralWxUtils {
public:
static wxOperatingSystemId GetOsId();
static wxString LogOsId();
static bool isMac();
static bool isMac106();
static bool isWindows();
static bool isUnix();
static bool isXP();
static bool isVista();
static bool isX86();
static bool isX64();
static bool isDebug();
static bool isBigEndian();
static bool isLittleEndian();
static bool ReplaceMenu(wxMenuBar* mb, const wxString& title,
wxMenu* newMenu);
static bool EnableMenuAll(wxMenuBar* mb, const wxString& title,
bool enable);
static void EnableMenuRecursive(wxMenu* menu, bool enable);
static bool EnableMenuItem(wxMenuBar* mb, const wxString& menuTitle,
int id, bool enable);
static bool EnableMenuItem(wxMenuBar* m, int id, bool enable);
static bool EnableMenuItem(wxMenu* m, int id, bool enable);
static bool CheckMenuItem(wxMenuBar* m, int id, bool check);
static bool CheckMenuItem(wxMenu* menu, int id, bool check);
static bool SetMenuItemText(wxMenu* menu, int id, const wxString& text);
static wxMenu* FindMenu(wxMenuBar* mb, const wxString& menuTitle);
};
#endif