00001 00032 #ifndef LL_LLVIEWERMENU_H 00033 #define LL_LLVIEWERMENU_H 00034 00035 #include "llmenugl.h" 00036 00037 //newview includes 00038 #include "llfilepicker.h" 00039 00040 class LLUICtrl; 00041 class LLView; 00042 class LLParcelSelection; 00043 class LLObjectSelection; 00044 00045 00046 void pre_init_menus(); 00047 void init_menus(); 00048 void cleanup_menus(); 00049 00050 void show_debug_menus(); // checks for if menus should be shown first. 00051 void show_context_menu( S32 x, S32 y, MASK mask ); 00052 void show_build_mode_context_menu(S32 x, S32 y, MASK mask); 00053 void load_url_local_file(const char *file_name); 00054 BOOL enable_save_into_inventory(void*); 00055 void handle_reset_view(); 00056 void handle_cut(void*); 00057 void handle_copy(void*); 00058 void handle_paste(void*); 00059 void handle_delete(void*); 00060 void handle_redo(void*); 00061 void handle_undo(void*); 00062 void handle_select_all(void*); 00063 void handle_deselect(void*); 00064 void handle_delete_object(); 00065 void handle_duplicate(void*); 00066 void handle_duplicate_in_place(void*); 00067 BOOL enable_not_have_card(void *userdata); 00068 void process_grant_godlike_powers(LLMessageSystem* msg, void**); 00069 00070 BOOL enable_cut(void*); 00071 BOOL enable_copy(void*); 00072 BOOL enable_paste(void*); 00073 BOOL enable_select_all(void*); 00074 BOOL enable_deselect(void*); 00075 BOOL enable_undo(void*); 00076 BOOL enable_redo(void*); 00077 00078 // returns TRUE if we have a friend relationship with agent_id 00079 BOOL is_agent_friend(const LLUUID& agent_id); 00080 BOOL is_agent_mappable(const LLUUID& agent_id); 00081 00082 void menu_toggle_control( void* user_data ); 00083 void check_toggle_control( LLUICtrl *, void* user_data ); 00084 void confirm_replace_attachment(S32 option, void* user_data); 00085 void handle_detach_from_avatar(void* user_data); 00086 void attach_label(LLString& label, void* user_data); 00087 void detach_label(LLString& label, void* user_data); 00088 BOOL object_selected_and_point_valid(void* user_data); 00089 BOOL object_attached(void* user_data); 00090 void handle_detach(void*); 00091 BOOL enable_god_full(void* user_data); 00092 BOOL enable_god_liaison(void* user_data); 00093 BOOL enable_god_customer_service(void* user_data); 00094 BOOL enable_god_basic(void* user_data); 00095 void handle_show_newest_map(void*); 00096 void set_underclothes_menu_options(); 00097 00098 void exchange_callingcard(const LLUUID& dest_id); 00099 00100 void handle_gestures(void*); 00101 void handle_sit_down(void*); 00102 bool toggle_build_mode(); 00103 void handle_object_build(void*); 00104 void handle_save_snapshot(void *); 00105 void handle_toggle_flycam(); 00106 00107 bool handle_sit_or_stand(); 00108 bool handle_give_money_dialog(); 00109 bool handle_object_open(); 00110 bool handle_go_to(); 00111 00112 // Export to XML or Collada 00113 void handle_export_selected( void * ); 00114 00115 //Retrieve a list of valid extensions for a given file "type" 00116 const char* build_extensions_string(LLFilePicker::ELoadFilter filter); 00117 00118 // Pass in an empty string and this function will build a string that 00119 // describes buyer permissions. 00120 class LLSaleInfo; 00121 class LLPermissions; 00122 00123 class LLViewerMenuHolderGL : public LLMenuHolderGL 00124 { 00125 public: 00126 LLViewerMenuHolderGL(); 00127 00128 virtual BOOL hideMenus(); 00129 00130 void setParcelSelection(LLSafeHandle<LLParcelSelection> selection); 00131 void setObjectSelection(LLSafeHandle<LLObjectSelection> selection); 00132 00133 virtual const LLRect getMenuRect() const; 00134 00135 protected: 00136 LLSafeHandle<LLParcelSelection> mParcelSelection; 00137 LLSafeHandle<LLObjectSelection> mObjectSelection; 00138 }; 00139 00140 extern const LLString SAVE_INTO_INVENTORY; 00141 00142 extern LLMenuBarGL* gMenuBarView; 00143 //extern LLView* gMenuBarHolder; 00144 extern LLMenuGL* gPopupMenuView; 00145 extern LLViewerMenuHolderGL* gMenuHolder; 00146 extern LLMenuBarGL* gLoginMenuBarView; 00147 00148 // Pie menus 00149 extern LLPieMenu *gPieSelf; 00150 extern LLPieMenu *gPieAvatar; 00151 extern LLPieMenu *gPieObject; 00152 extern LLPieMenu *gPieAttachment; 00153 extern LLPieMenu *gPieLand; 00154 extern LLPieMenu* gPieRate; 00155 00156 // Pie menus 00157 extern LLPieMenu *gPieSelfSimple; 00158 extern LLPieMenu *gPieAvatarSimple; 00159 extern LLPieMenu *gPieObjectSimple; 00160 extern LLPieMenu *gPieAttachmentSimple; 00161 extern LLPieMenu *gPieLandSimple; 00162 00163 // Needed to build menus when attachment site list available 00164 extern LLMenuGL* gAttachSubMenu; 00165 extern LLMenuGL* gDetachSubMenu; 00166 extern LLMenuGL* gTakeOffClothes; 00167 extern LLPieMenu* gAttachScreenPieMenu; 00168 extern LLPieMenu* gDetachScreenPieMenu; 00169 extern LLPieMenu* gAttachPieMenu; 00170 extern LLPieMenu* gDetachPieMenu; 00171 extern LLPieMenu* gAttachBodyPartPieMenus[8]; 00172 extern LLPieMenu* gDetachBodyPartPieMenus[8]; 00173 00174 extern LLMenuItemCallGL* gAFKMenu; 00175 extern LLMenuItemCallGL* gBusyMenu; 00176 extern LLMenuItemCallGL* gMutePieMenu; 00177 extern LLMenuItemCallGL* gMuteObjectPieMenu; 00178 extern LLMenuItemCallGL* gBuyPassPieMenu; 00179 00180 #endif