aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llmenucommands.cpp
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/llmenucommands.cpp
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/llmenucommands.cpp154
1 files changed, 154 insertions, 0 deletions
diff --git a/linden/indra/newview/llmenucommands.cpp b/linden/indra/newview/llmenucommands.cpp
new file mode 100644
index 0000000..425786e
--- /dev/null
+++ b/linden/indra/newview/llmenucommands.cpp
@@ -0,0 +1,154 @@
1/**
2 * @file llmenucommands.cpp
3 * @brief Implementations of menu commands.
4 *
5 * Copyright (c) 2003-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#include "llviewerprecompiledheaders.h"
29
30#include "llmenucommands.h"
31
32#include "imageids.h"
33#include "llfontgl.h"
34#include "llrect.h"
35#include "llerror.h"
36#include "llstring.h"
37#include "message.h"
38
39#include "llagent.h"
40#include "llcallbacklist.h"
41#include "llcallingcard.h"
42#include "llchatbar.h"
43#include "llviewercontrol.h"
44#include "llfirstuse.h"
45#include "llfloaterchat.h"
46#include "llfloaterclothing.h"
47#include "llfloaterdirectory.h"
48#include "llfloatermap.h"
49#include "llfloaterworldmap.h"
50#include "llgivemoney.h"
51#include "llinventoryview.h"
52#include "llnotify.h"
53#include "llstatusbar.h"
54#include "llimview.h"
55#include "lltextbox.h"
56#include "llui.h"
57#include "llviewergesture.h" // for triggering gestures
58#include "llviewermessage.h"
59#include "llviewerparceloverlay.h"
60#include "llviewerregion.h"
61#include "llviewerstats.h"
62#include "llvieweruictrlfactory.h"
63#include "llviewerwindow.h"
64#include "llworld.h"
65#include "llworldmap.h"
66#include "viewer.h"
67#include "llfocusmgr.h"
68
69void handle_track_avatar(const LLUUID& agent_id, const std::string& name)
70{
71 LLAvatarTracker::instance().track(agent_id, name);
72
73 LLFloaterDirectory::hide(NULL);
74 LLFloaterWorldMap::show(NULL, TRUE);
75}
76
77void handle_pay_by_id(const LLUUID& agent_id)
78{
79 const BOOL is_group = FALSE;
80 LLFloaterPay::payDirectly(&give_money, agent_id, is_group);
81}
82
83void handle_mouselook(void*)
84{
85 gAgent.changeCameraToMouselook();
86}
87
88
89void handle_map(void*)
90{
91 LLFloaterWorldMap::toggle(NULL);
92}
93
94void handle_mini_map(void*)
95{
96 LLFloaterMap::toggle(NULL);
97}
98
99
100void handle_find(void*)
101{
102 LLFloaterDirectory::toggleFind(NULL);
103}
104
105
106void handle_events(void*)
107{
108 LLFloaterDirectory::toggleEvents(NULL);
109}
110
111
112void handle_inventory(void*)
113{
114 // We're using the inventory, possibly for the
115 // first time.
116 LLFirstUse::useInventory();
117
118 LLInventoryView::toggleVisibility(NULL);
119}
120
121
122void handle_clothing(void*)
123{
124 LLFloaterClothing::toggleVisibility();
125}
126
127
128void handle_chat(void*)
129{
130 // give focus to chatbar if it's open but not focused
131 if (gSavedSettings.getBOOL("ChatVisible") && gFocusMgr.childHasKeyboardFocus(gChatBar))
132 {
133 LLChatBar::stopChat();
134 }
135 else
136 {
137 LLChatBar::startChat(NULL);
138 }
139}
140
141void handle_slash_key(void*)
142{
143 // LLChatBar::startChat("/");
144 //
145 // Don't do this, it results in a double-slash in the input field.
146 // Another "/" will be automatically typed for us, because the WM_KEYDOWN event
147 // that generated the menu accelerator call (and hence puts focus in
148 // the chat edtior) will be followed by a "/" WM_CHAR character message,
149 // which will type the slash. Yes, it's weird. It only matters for
150 // menu accelerators that put input focus into a field. And Mac works
151 // the same way. JC
152
153 LLChatBar::startChat(NULL);
154}