diff options
Diffstat (limited to 'indra/newview/llconversationview.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llconversationview.cpp | 102 |
1 files changed, 100 insertions, 2 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 9f3df93aba..1d1c774874 100644..100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -32,10 +32,16 @@ #include "llimconversation.h" #include "llimfloatercontainer.h" + +#include "lluictrlfactory.h" +#include "llavatariconctrl.h" + // // Implementation of conversations list session widgets // + + LLConversationViewSession::Params::Params() : container() {} @@ -113,14 +119,41 @@ void LLConversationViewSession::refresh() // Implementation of conversations list participant (avatar) widgets // +static LLDefaultChildRegistry::Register<LLConversationViewParticipant> r("conversation_view_participant"); + LLConversationViewParticipant::Params::Params() : - participant_id() +container(), +participant_id(), +info_button("info_button"), +output_monitor("output_monitor") {} LLConversationViewParticipant::LLConversationViewParticipant( const LLConversationViewParticipant::Params& p ): LLFolderViewItem(p), - mUUID(p.participant_id) + mUUID(p.participant_id) { + +} + +void LLConversationViewParticipant::initFromParams(const LLConversationViewParticipant::Params& params) +{ + LLButton::Params info_button_params(params.info_button()); + LLButton * button = LLUICtrlFactory::create<LLButton>(info_button_params); + addChild(button); + + LLOutputMonitorCtrl::Params output_monitor_params(params.output_monitor()); + LLOutputMonitorCtrl * outputMonitor = LLUICtrlFactory::create<LLOutputMonitorCtrl>(output_monitor_params); + addChild(outputMonitor); +} + +BOOL LLConversationViewParticipant::postBuild() +{ + mInfoBtn = getChild<LLButton>("info_btn"); + mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this)); + + + LLFolderViewItem::postBuild(); + return TRUE; } void LLConversationViewParticipant::refresh() @@ -135,4 +168,69 @@ void LLConversationViewParticipant::refresh() LLFolderViewItem::refresh(); } +void LLConversationViewParticipant::onInfoBtnClick() +{ + + +} + +LLButton* LLConversationViewParticipant::createProfileButton() +{ + + LLButton::Params params; + + + //<button + params.follows.flags(FOLLOWS_RIGHT); + //params.height="20"; + LLUIImage * someImage = LLUI::getUIImage("Web_Profile_Off"); + params.image_overlay = someImage; + params.layout="topleft"; + params.left_pad=5; + //params.right="-28"; + params.name="profile_btn"; + params.tab_stop="false"; + params.tool_tip="View profile"; + params.top_delta=-2; + //params.width="20"; + ///> + + + /* + LLConversationViewParticipant::Params params; + + params.name = item->getDisplayName(); + //params.icon = bridge->getIcon(); + //params.icon_open = bridge->getOpenIcon(); + //params.creation_date = bridge->getCreationDate(); + params.root = mConversationsRoot; + params.listener = item; + params.rect = LLRect (0, 0, 0, 0); + params.tool_tip = params.name; + params.container = this; + */ + + LLButton * button = LLUICtrlFactory::create<LLButton>(params); + LLRect someRect; + someRect.setOriginAndSize(30, 0, 20, 20); + button->setShape(someRect); + + //button->follows= "right"; + //button->height = 20; + //button->image_overlay="Web_Profile_Off"; + //button->right = -28; + //button->width = 20; + + + + return button; +} + + +void LLConversationViewParticipant::draw() +{ + LLFolderViewItem::draw(); +} + // EOF + |