aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpreviewgesture.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llpreviewgesture.h
parentREADME.txt (diff)
downloadmeta-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 '')
-rw-r--r--linden/indra/newview/llpreviewgesture.h168
1 files changed, 168 insertions, 0 deletions
diff --git a/linden/indra/newview/llpreviewgesture.h b/linden/indra/newview/llpreviewgesture.h
new file mode 100644
index 0000000..c03fd3e
--- /dev/null
+++ b/linden/indra/newview/llpreviewgesture.h
@@ -0,0 +1,168 @@
1/**
2 * @file llpreviewgesture.h
3 * @brief Editing UI for inventory-based gestures.
4 *
5 * Copyright (c) 2004-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#ifndef LL_LLPREVIEWGESTURE_H
29#define LL_LLPREVIEWGESTURE_H
30
31#include "llpreview.h"
32
33class LLMultiGesture;
34class LLLineEditor;
35class LLTextBox;
36class LLCheckBoxCtrl;
37class LLComboBox;
38class LLScrollListCtrl;
39class LLScrollListItem;
40class LLButton;
41class LLGestureStep;
42class LLRadioGroup;
43
44class LLPreviewGesture : public LLPreview
45{
46public:
47 // Pass an object_id if this gesture is inside an object in the world,
48 // otherwise use LLUUID::null.
49 static LLPreviewGesture* show(const std::string& title, const LLUUID& item_id, const LLUUID& object_id, BOOL take_focus = TRUE);
50
51 // LLView
52 virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
53 virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
54 EDragAndDropType cargo_type,
55 void* cargo_data,
56 EAcceptance* accept,
57 LLString& tooltip_msg);
58
59 // LLPanel
60 virtual BOOL postBuild();
61
62 // LLFloater
63 virtual BOOL canClose();
64 virtual void setMinimized(BOOL minimize);
65 virtual void onClose(bool app_quitting);
66
67
68protected:
69 LLPreviewGesture();
70 virtual ~LLPreviewGesture();
71
72 void init(const LLUUID& item_id, const LLUUID& object_id);
73
74 // Populate various comboboxes
75 void addModifiers();
76 void addKeys();
77 void addAnimations();
78 void addSounds();
79
80 void refresh();
81
82 void initDefaultGesture();
83
84 void loadAsset();
85
86 static void onLoadComplete(LLVFS *vfs,
87 const LLUUID& asset_uuid,
88 LLAssetType::EType type,
89 void* user_data, S32 status);
90
91 void loadUIFromGesture(LLMultiGesture* gesture);
92
93 void saveIfNeeded();
94
95 static void onSaveComplete(const LLUUID& asset_uuid,
96 void* user_data,
97 S32 status);
98
99 static void handleSaveChangesDialog(S32 option, void* userdata);
100
101 // Write UI back into gesture
102 LLMultiGesture* createGesture();
103
104 // Add a step. Pass the name of the step, like "Animation",
105 // "Sound", "Chat", or "Wait"
106 LLScrollListItem* addStep(const std::string& step_name);
107
108 static void updateLabel(LLScrollListItem* item);
109
110 static void onCommitSetDirty(LLUICtrl* ctrl, void* data);
111 static void onCommitLibrary(LLUICtrl* ctrl, void* data);
112 static void onCommitStep(LLUICtrl* ctrl, void* data);
113 static void onCommitAnimation(LLUICtrl* ctrl, void* data);
114 static void onCommitSound(LLUICtrl* ctrl, void* data);
115 static void onCommitChat(LLUICtrl* ctrl, void* data);
116 static void onCommitWait(LLUICtrl* ctrl, void* data);
117 static void onCommitWaitTime(LLUICtrl* ctrl, void* data);
118
119 static void onCommitAnimationTrigger(LLUICtrl* ctrl, void *data);
120
121 // Handy function to commit each keystroke
122 static void onKeystrokeCommit(LLLineEditor* caller, void* data);
123
124 static void onClickAdd(void* data);
125 static void onClickUp(void* data);
126 static void onClickDown(void* data);
127 static void onClickDelete(void* data);
128
129 static void onCommitActive(LLUICtrl* ctrl, void* data);
130 static void onClickSave(void* data);
131 static void onClickPreview(void* data);
132
133 static void onDonePreview(LLMultiGesture* gesture, void* data);
134
135protected:
136 // LLPreview contains mDescEditor
137 LLLineEditor* mTriggerEditor;
138 LLTextBox* mReplaceText;
139 LLLineEditor* mReplaceEditor;
140 LLComboBox* mModifierCombo;
141 LLComboBox* mKeyCombo;
142
143 LLScrollListCtrl* mLibraryList;
144 LLButton* mAddBtn;
145 LLButton* mUpBtn;
146 LLButton* mDownBtn;
147 LLButton* mDeleteBtn;
148 LLScrollListCtrl* mStepList;
149
150 // Options panels for items in gesture list
151 LLTextBox* mOptionsText;
152 LLRadioGroup* mAnimationRadio;
153 LLComboBox* mAnimationCombo;
154 LLComboBox* mSoundCombo;
155 LLLineEditor* mChatEditor;
156 LLCheckBoxCtrl* mWaitAnimCheck;
157 LLCheckBoxCtrl* mWaitTimeCheck;
158 LLLineEditor* mWaitTimeEditor;
159
160 LLCheckBoxCtrl* mActiveCheck;
161 LLButton* mSaveBtn;
162 LLButton* mPreviewBtn;
163
164 LLMultiGesture* mPreviewGesture;
165 BOOL mDirty;
166};
167
168#endif