diff options
Diffstat (limited to 'linden/indra/newview/llfloaterwindlight.h')
-rw-r--r-- | linden/indra/newview/llfloaterwindlight.h | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterwindlight.h b/linden/indra/newview/llfloaterwindlight.h new file mode 100644 index 0000000..2dbabdb --- /dev/null +++ b/linden/indra/newview/llfloaterwindlight.h | |||
@@ -0,0 +1,142 @@ | |||
1 | /** | ||
2 | * @file llfloaterwindlight.h | ||
3 | * @brief LLFloaterWindLight class definition | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2007&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2007-2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | /* | ||
33 | * Menu for adjusting the atmospheric settings of the world | ||
34 | */ | ||
35 | |||
36 | #ifndef LL_LLFLOATERWINDLIGHT_H | ||
37 | #define LL_LLFLOATERWINDLIGHT_H | ||
38 | |||
39 | #include "llfloater.h" | ||
40 | |||
41 | #include <vector> | ||
42 | #include "llwlparamset.h" | ||
43 | |||
44 | struct WLColorControl; | ||
45 | struct WLFloatControl; | ||
46 | |||
47 | |||
48 | /// Menuing system for all of windlight's functionality | ||
49 | class LLFloaterWindLight : public LLFloater | ||
50 | { | ||
51 | public: | ||
52 | |||
53 | LLFloaterWindLight(); | ||
54 | virtual ~LLFloaterWindLight(); | ||
55 | |||
56 | /// initialize all | ||
57 | void initCallbacks(void); | ||
58 | |||
59 | /// one and one instance only | ||
60 | static LLFloaterWindLight* instance(); | ||
61 | |||
62 | // help button stuff | ||
63 | static void onClickHelp(void* data); | ||
64 | void initHelpBtn(const char* name, const char* xml_alert); | ||
65 | |||
66 | static void newPromptCallback(S32 option, const LLString& text, void* userData); | ||
67 | |||
68 | /// general purpose callbacks for dealing with color controllers | ||
69 | static void onColorControlRMoved(LLUICtrl* ctrl, void* userData); | ||
70 | static void onColorControlGMoved(LLUICtrl* ctrl, void* userData); | ||
71 | static void onColorControlBMoved(LLUICtrl* ctrl, void* userData); | ||
72 | static void onColorControlIMoved(LLUICtrl* ctrl, void* userData); | ||
73 | static void onFloatControlMoved(LLUICtrl* ctrl, void* userData); | ||
74 | static void onBoolToggle(LLUICtrl* ctrl, void* userData); | ||
75 | |||
76 | /// lighting callbacks for glow | ||
77 | static void onGlowRMoved(LLUICtrl* ctrl, void* userData); | ||
78 | //static void onGlowGMoved(LLUICtrl* ctrl, void* userData); | ||
79 | static void onGlowBMoved(LLUICtrl* ctrl, void* userData); | ||
80 | |||
81 | /// lighting callbacks for sun | ||
82 | static void onSunMoved(LLUICtrl* ctrl, void* userData); | ||
83 | |||
84 | /// handle if float is changed | ||
85 | static void onFloatTweakMoved(LLUICtrl* ctrl, void* userData); | ||
86 | |||
87 | /// for handling when the star slider is moved to adjust the alpha | ||
88 | static void onStarAlphaMoved(LLUICtrl* ctrl, void* userData); | ||
89 | |||
90 | /// when user hits the load preset button | ||
91 | static void onNewPreset(void* userData); | ||
92 | |||
93 | /// when user hits the save preset button | ||
94 | static void onSavePreset(void* userData); | ||
95 | |||
96 | /// prompts a user when overwriting a preset | ||
97 | static void saveAlertCallback(S32 option, void* userdata); | ||
98 | |||
99 | /// when user hits the save preset button | ||
100 | static void onDeletePreset(void* userData); | ||
101 | |||
102 | /// prompts a user when overwriting a preset | ||
103 | static void deleteAlertCallback(S32 option, void* userdata); | ||
104 | |||
105 | /// what to do when you change the preset name | ||
106 | static void onChangePresetName(LLUICtrl* ctrl, void* userData); | ||
107 | |||
108 | /// when user hits the save preset button | ||
109 | static void onOpenDayCycle(void* userData); | ||
110 | |||
111 | /// handle cloud scrolling | ||
112 | static void onCloudScrollXMoved(LLUICtrl* ctrl, void* userData); | ||
113 | static void onCloudScrollYMoved(LLUICtrl* ctrl, void* userData); | ||
114 | static void onCloudScrollXToggled(LLUICtrl* ctrl, void* userData); | ||
115 | static void onCloudScrollYToggled(LLUICtrl* ctrl, void* userData); | ||
116 | |||
117 | //// menu management | ||
118 | |||
119 | /// show off our menu | ||
120 | static void show(); | ||
121 | |||
122 | /// return if the menu exists or not | ||
123 | static bool isOpen(); | ||
124 | |||
125 | /// stuff to do on exit | ||
126 | virtual void onClose(bool app_quitting); | ||
127 | |||
128 | /// sync up sliders with parameters | ||
129 | void syncMenu(); | ||
130 | |||
131 | /// turn off animated skies | ||
132 | static void deactivateAnimator(); | ||
133 | |||
134 | private: | ||
135 | // one instance on the inside | ||
136 | static LLFloaterWindLight* sWindLight; | ||
137 | |||
138 | static std::set<std::string> sDefaultPresets; | ||
139 | }; | ||
140 | |||
141 | |||
142 | #endif | ||