diff options
author | Denis Serdjuk <dserduk@productengine.com> | 2009-12-28 17:44:54 +0200 |
---|---|---|
committer | Denis Serdjuk <dserduk@productengine.com> | 2009-12-28 17:44:54 +0200 |
commit | d89793616e32cace99b5b76e47d51d141b20c7f2 (patch) | |
tree | f03c883f185d77951699d71c06b52c9103649f4e /indra/newview/llfloateravatarpicker.h | |
parent | 79fba14bd4ba88dfe71546f5f679ed79fdeff66a (diff) |
implemented minor task EXT-3454 Code improvements: Replace old-style calback with boost::function in the LLFloaterAvatarPicker
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llfloateravatarpicker.h')
-rw-r--r-- | indra/newview/llfloateravatarpicker.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index 13e491834e..e35466cec8 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -43,11 +43,10 @@ public: typedef boost::signals2::signal<bool(const std::vector<LLUUID>&), boost_boolean_combiner> validate_signal_t; typedef validate_signal_t::slot_type validate_callback_t; - // Call this to select an avatar. // The callback function will be called with an avatar name and UUID. - typedef void(*callback_t)(const std::vector<std::string>&, const std::vector<LLUUID>&, void*); - static LLFloaterAvatarPicker* show(callback_t callback, - void* userdata, + typedef boost::function<void (const std::vector<std::string>&, const std::vector<LLUUID>&)> select_callback_t; + // Call this to select an avatar. + static LLFloaterAvatarPicker* show(select_callback_t callback, BOOL allow_multiple = FALSE, BOOL closeOnSelect = FALSE); @@ -61,16 +60,16 @@ public: static void processAvatarPickerReply(class LLMessageSystem* msg, void**); private: - static void editKeystroke(class LLLineEditor* caller, void* user_data); + void editKeystroke(class LLLineEditor* caller, void* user_data); - static void onBtnFind(void* userdata); - static void onBtnSelect(void* userdata); - static void onBtnRefresh(void* userdata); - static void onRangeAdjust(LLUICtrl* source, void* data); - static void onBtnClose(void* userdata); - static void onList(class LLUICtrl* ctrl, void* userdata); - void onTabChanged(); - bool isSelectBtnEnabled(); + void onBtnFind(); + void onBtnSelect(); + void onBtnRefresh(); + void onRangeAdjust(); + void onBtnClose(); + void onList(); + void onTabChanged(); + bool isSelectBtnEnabled(); void populateNearMe(); void populateFriend(); @@ -87,9 +86,8 @@ private: BOOL mNearMeListComplete; BOOL mCloseOnSelect; - void (*mCallback)(const std::vector<std::string>& name, const std::vector<LLUUID>& id, void* userdata); - void* mCallbackUserdata; validate_signal_t mOkButtonValidateSignal; + select_callback_t mSelectionCallback; }; #endif |