diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/llui/llresmgr.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/llui/llresmgr.h')
-rw-r--r-- | linden/indra/llui/llresmgr.h | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/linden/indra/llui/llresmgr.h b/linden/indra/llui/llresmgr.h new file mode 100644 index 0000000..0bb4e0d --- /dev/null +++ b/linden/indra/llui/llresmgr.h | |||
@@ -0,0 +1,166 @@ | |||
1 | /** | ||
2 | * @file llresmgr.h | ||
3 | * @brief Localized resource manager | ||
4 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | // NOTE: this is a MINIMAL implementation. The interface will remain, but the implementation will | ||
29 | // (when the time is right) become dynamic and probably use external files. | ||
30 | |||
31 | #ifndef LL_LLRESMGR_H | ||
32 | #define LL_LLRESMGR_H | ||
33 | |||
34 | #include "locale.h" | ||
35 | #include "stdtypes.h" | ||
36 | #include "llstring.h" | ||
37 | |||
38 | enum LLLOCALE_ID | ||
39 | { | ||
40 | LLLOCALE_USA, | ||
41 | LLLOCALE_UK, | ||
42 | LLLOCALE_COUNT // Number of values in this enum. Keep at end. | ||
43 | }; | ||
44 | |||
45 | /* | ||
46 | enum LLSTR_ID | ||
47 | { | ||
48 | LLSTR_HELLO, | ||
49 | LLSTR_GOODBYE, | ||
50 | LLSTR_CHAT_LABEL, | ||
51 | LLSTR_STATUS_LABEL, | ||
52 | LLSTR_X, | ||
53 | LLSTR_Y, | ||
54 | LLSTR_Z, | ||
55 | LLSTR_POSITION, | ||
56 | LLSTR_SCALE, | ||
57 | LLSTR_ROTATION, | ||
58 | LLSTR_HAS_PHYSICS, | ||
59 | LLSTR_SCRIPT, | ||
60 | LLSTR_HELP, | ||
61 | LLSTR_REMOVE, | ||
62 | LLSTR_CLEAR, | ||
63 | LLSTR_APPLY, | ||
64 | LLSTR_CANCEL, | ||
65 | LLSTR_MATERIAL, | ||
66 | LLSTR_FACE, | ||
67 | LLSTR_TEXTURE, | ||
68 | LLSTR_TEXTURE_SIZE, | ||
69 | LLSTR_TEXTURE_OFFSET, | ||
70 | LLSTR_TEXTURE_ROTATION, | ||
71 | LLSTR_U, | ||
72 | LLSTR_V, | ||
73 | LLSTR_OWNERSHIP, | ||
74 | LLSTR_PUBLIC, | ||
75 | LLSTR_PRIVATE, | ||
76 | LLSTR_REVERT, | ||
77 | LLSTR_INSERT_SAMPLE, | ||
78 | LLSTR_SET_TEXTURE, | ||
79 | LLSTR_EDIT_SCRIPT, | ||
80 | LLSTR_MOUSELOOK_INSTRUCTIONS, | ||
81 | LLSTR_EDIT_FACE_INSTRUCTIONS, | ||
82 | LLSTR_CLOSE, | ||
83 | LLSTR_MOVE, | ||
84 | LLSTR_ROTATE, | ||
85 | LLSTR_RESIZE, | ||
86 | LLSTR_PLACE_BOX, | ||
87 | LLSTR_PLACE_PRISM, | ||
88 | LLSTR_PLACE_PYRAMID, | ||
89 | LLSTR_PLACE_TETRAHEDRON, | ||
90 | LLSTR_PLACE_CYLINDER, | ||
91 | LLSTR_PLACE_HALF_CYLINDER, | ||
92 | LLSTR_PLACE_CONE, | ||
93 | LLSTR_PLACE_HALF_CONE, | ||
94 | LLSTR_PLACE_SPHERE, | ||
95 | LLSTR_PLACE_HALF_SPHERE, | ||
96 | LLSTR_PLACE_BIRD, | ||
97 | LLSTR_PLACE_SNAKE, | ||
98 | LLSTR_PLACE_ROCK, | ||
99 | LLSTR_PLACE_TREE, | ||
100 | LLSTR_PLACE_GRASS, | ||
101 | LLSTR_MODIFY_LAND, | ||
102 | LLSTR_COUNT // Number of values in this enum. Keep at end. | ||
103 | }; | ||
104 | */ | ||
105 | |||
106 | enum LLFONT_ID | ||
107 | { | ||
108 | LLFONT_OCRA, | ||
109 | LLFONT_SANSSERIF, | ||
110 | LLFONT_SANSSERIF_SMALL, | ||
111 | LLFONT_SANSSERIF_BIG, | ||
112 | LLFONT_SMALL, | ||
113 | LLFONT_COUNT // Number of values in this enum. Keep at end. | ||
114 | }; | ||
115 | |||
116 | class LLFontGL; | ||
117 | |||
118 | class LLResMgr | ||
119 | { | ||
120 | public: | ||
121 | LLResMgr(); | ||
122 | |||
123 | void setLocale( LLLOCALE_ID locale_id ); | ||
124 | LLLOCALE_ID getLocale() const { return mLocale; } | ||
125 | |||
126 | char getDecimalPoint() const; | ||
127 | char getThousandsSeparator() const; | ||
128 | |||
129 | char getMonetaryDecimalPoint() const; | ||
130 | char getMonetaryThousandsSeparator() const; | ||
131 | void getMonetaryString( LLString& output, S32 input ) const; | ||
132 | void getIntegerString( LLString& output, S32 input ) const; | ||
133 | |||
134 | // const char* getRes( LLSTR_ID string_id ) const { return mStrings[ string_id ]; } | ||
135 | const LLFontGL* getRes( LLFONT_ID font_id ) const { return mFonts[ font_id ]; } | ||
136 | const LLFontGL* getRes( LLString font_id ) const; | ||
137 | |||
138 | private: | ||
139 | LLLOCALE_ID mLocale; | ||
140 | // const char** mStrings; | ||
141 | const LLFontGL** mFonts; | ||
142 | |||
143 | // const char* mUSAStrings[LLSTR_COUNT]; | ||
144 | const LLFontGL* mUSAFonts[LLFONT_COUNT]; | ||
145 | |||
146 | // const char* mUKStrings[LLSTR_COUNT]; | ||
147 | const LLFontGL* mUKFonts[LLFONT_COUNT]; | ||
148 | }; | ||
149 | |||
150 | class LLLocale | ||
151 | { | ||
152 | public: | ||
153 | LLLocale(const LLString& locale_string); | ||
154 | virtual ~LLLocale(); | ||
155 | |||
156 | public: | ||
157 | static const LLString USER_LOCALE; | ||
158 | static const LLString SYSTEM_LOCALE; | ||
159 | |||
160 | protected: | ||
161 | LLString mPrevLocaleString; | ||
162 | }; | ||
163 | |||
164 | extern LLResMgr* gResMgr; | ||
165 | |||
166 | #endif // LL_RESMGR_ | ||