Debian Codegraph @

code/global/Utils.h

raw
1 /*
2 Copyright (C) 2013 wxLauncher Team
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19 #ifndef UTILS_H
20 #define UTILS_H
21
22 #include <wx/wx.h>
23 #include <wx/tokenzr.h>
24
25 namespace TextUtils {
26
27 struct Words {
28 wxString word;
29 wxSize size;
30 };
31
32 WX_DECLARE_OBJARRAY(Words, ArrayOfWords);
33
34 /* Fills an array of words from a token stream. */
35 void FillArrayOfWordsFromTokens(wxStringTokenizer &tokens,
36 wxDC &dc,
37 wxFont* testFont,
38 ArrayOfWords& words,
39 bool useAppleDebugFilter = false);
40 }
41
42 #if _WIN32
43 #define SZT wxT("%Iu")
44 #else
45 #define SZT wxT("%zu")
46 #endif
47
48 #endif