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