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 00097 void exchange_callingcard(const LLUUID& dest_id); 00098 00099 void handle_gestures(void*); 00100 void handle_sit_down(void*); 00101 bool toggle_build_mode(); 00102 void handle_object_build(void*); 00103 void handle_save_snapshot(void *); 00104 00105 bool handle_sit_or_stand(); 00106 bool handle_give_money_dialog(); 00107 bool handle_object_open(); 00108 bool handle_go_to(); 00109 00110 // Export to XML or Collada 00111 void handle_export_selected( void * ); 00112 00113 //Retrieve a list of valid extensions for a given file "type" 00114 const char* build_extensions_string(LLFilePicker::ELoadFilter filter); 00115 00116 // Pass in an empty string and this function will build a string that 00117 // describes buyer permissions. 00118 class LLSaleInfo; 00119 class LLPermissions; 00120 00121 class LLViewerMenuHolderGL : public LLMenuHolderGL 00122 { 00123 public: 00124 LLViewerMenuHolderGL(); 00125 00126 virtual BOOL hideMenus(); 00127 00128 void setParcelSelection(LLHandle<LLParcelSelection> selection); 00129 void setObjectSelection(LLHandle<LLObjectSelection> selection); 00130 00131 virtual const LLRect getMenuRect() const; 00132 00133 protected: 00134 LLHandle<LLParcelSelection> mParcelSelection; 00135 LLHandle<LLObjectSelection> mObjectSelection; 00136 }; 00137 00138 extern const LLString SAVE_INTO_INVENTORY; 00139 00140 extern LLMenuBarGL* gMenuBarView; 00141 //extern LLView* gMenuBarHolder; 00142 extern LLMenuGL* gPopupMenuView; 00143 extern LLViewerMenuHolderGL* gMenuHolder; 00144 00145 // Pie menus 00146 extern LLPieMenu *gPieSelf; 00147 extern LLPieMenu *gPieAvatar; 00148 extern LLPieMenu *gPieObject; 00149 extern LLPieMenu *gPieAttachment; 00150 extern LLPieMenu *gPieLand; 00151 extern LLPieMenu* gPieRate; 00152 00153 // Pie menus 00154 extern LLPieMenu *gPieSelfSimple; 00155 extern LLPieMenu *gPieAvatarSimple; 00156 extern LLPieMenu *gPieObjectSimple; 00157 extern LLPieMenu *gPieAttachmentSimple; 00158 extern LLPieMenu *gPieLandSimple; 00159 00160 // Needed to build menus when attachment site list available 00161 extern LLMenuGL* gAttachSubMenu; 00162 extern LLMenuGL* gDetachSubMenu; 00163 extern LLMenuGL* gTakeOffClothes; 00164 extern LLPieMenu* gAttachScreenPieMenu; 00165 extern LLPieMenu* gDetachScreenPieMenu; 00166 extern LLPieMenu* gAttachPieMenu; 00167 extern LLPieMenu* gDetachPieMenu; 00168 extern LLPieMenu* gAttachBodyPartPieMenus[8]; 00169 extern LLPieMenu* gDetachBodyPartPieMenus[8]; 00170 00171 extern LLMenuItemCallGL* gAFKMenu; 00172 extern LLMenuItemCallGL* gBusyMenu; 00173 extern LLMenuItemCallGL* gMutePieMenu; 00174 extern LLMenuItemCallGL* gMuteObjectPieMenu; 00175 extern LLMenuItemCallGL* gBuyPassPieMenu; 00176 00177 #endif