00001 00032 #include "llviewerprecompiledheaders.h" 00033 00034 #include "llmenucommands.h" 00035 00036 #include "imageids.h" 00037 #include "llfontgl.h" 00038 #include "llrect.h" 00039 #include "llerror.h" 00040 #include "llstring.h" 00041 #include "message.h" 00042 00043 #include "llagent.h" 00044 #include "llcallbacklist.h" 00045 #include "llcallingcard.h" 00046 #include "llchatbar.h" 00047 #include "llviewercontrol.h" 00048 #include "llfirstuse.h" 00049 #include "llfloaterchat.h" 00050 #include "llfloaterclothing.h" 00051 #include "llfloaterdirectory.h" 00052 #include "llfloatermap.h" 00053 #include "llfloaterworldmap.h" 00054 #include "llgivemoney.h" 00055 #include "llinventoryview.h" 00056 #include "llnotify.h" 00057 #include "llstatusbar.h" 00058 #include "llimview.h" 00059 #include "lltextbox.h" 00060 #include "llui.h" 00061 #include "llviewergesture.h" // for triggering gestures 00062 #include "llviewermessage.h" 00063 #include "llviewerparceloverlay.h" 00064 #include "llviewerregion.h" 00065 #include "llviewerstats.h" 00066 #include "llvieweruictrlfactory.h" 00067 #include "llviewerwindow.h" 00068 #include "llworld.h" 00069 #include "llworldmap.h" 00070 #include "viewer.h" 00071 #include "llfocusmgr.h" 00072 00073 void handle_track_avatar(const LLUUID& agent_id, const std::string& name) 00074 { 00075 LLAvatarTracker::instance().track(agent_id, name); 00076 00077 LLFloaterDirectory::hide(NULL); 00078 LLFloaterWorldMap::show(NULL, TRUE); 00079 } 00080 00081 void handle_pay_by_id(const LLUUID& agent_id) 00082 { 00083 const BOOL is_group = FALSE; 00084 LLFloaterPay::payDirectly(&give_money, agent_id, is_group); 00085 } 00086 00087 void handle_mouselook(void*) 00088 { 00089 gAgent.changeCameraToMouselook(); 00090 } 00091 00092 00093 void handle_map(void*) 00094 { 00095 LLFloaterWorldMap::toggle(NULL); 00096 } 00097 00098 void handle_mini_map(void*) 00099 { 00100 LLFloaterMap::toggle(NULL); 00101 } 00102 00103 00104 void handle_find(void*) 00105 { 00106 LLFloaterDirectory::toggleFind(NULL); 00107 } 00108 00109 00110 void handle_events(void*) 00111 { 00112 LLFloaterDirectory::toggleEvents(NULL); 00113 } 00114 00115 00116 void handle_inventory(void*) 00117 { 00118 // We're using the inventory, possibly for the 00119 // first time. 00120 LLFirstUse::useInventory(); 00121 00122 LLInventoryView::toggleVisibility(NULL); 00123 } 00124 00125 00126 void handle_clothing(void*) 00127 { 00128 LLFloaterClothing::toggleVisibility(); 00129 } 00130 00131 00132 void handle_chat(void*) 00133 { 00134 // give focus to chatbar if it's open but not focused 00135 if (gSavedSettings.getBOOL("ChatVisible") && gFocusMgr.childHasKeyboardFocus(gChatBar)) 00136 { 00137 LLChatBar::stopChat(); 00138 } 00139 else 00140 { 00141 LLChatBar::startChat(NULL); 00142 } 00143 } 00144 00145 void handle_slash_key(void*) 00146 { 00147 // LLChatBar::startChat("/"); 00148 // 00149 // Don't do this, it results in a double-slash in the input field. 00150 // Another "/" will be automatically typed for us, because the WM_KEYDOWN event 00151 // that generated the menu accelerator call (and hence puts focus in 00152 // the chat edtior) will be followed by a "/" WM_CHAR character message, 00153 // which will type the slash. Yes, it's weird. It only matters for 00154 // menu accelerators that put input focus into a field. And Mac works 00155 // the same way. JC 00156 00157 LLChatBar::startChat(NULL); 00158 }