nim_duilib/examples/multi_browser/control/browser_tab_item.h

78 lines
1.7 KiB
C
Raw Normal View History

2019-04-19 17:19:57 +08:00
#pragma once
/** @class BrowserTabItem
* @brief
* @copyright (c) 2016, NetEase Inc. All rights reserved
* @author Redrain
* @date 2019/3/20
*/
class BrowserTabItem : public ui::ListContainerElement
{
public:
BrowserTabItem();
/**
*
* @param[in] browser_id id
* @return void
*/
void InitControl(std::string browser_id);
/**
*
* @param[in] name
* @return void
*/
void SetTitle(std::wstring name);
/**
*
* @param[in] icon
* @return void
*/
void SetIcon(std::wstring icon);
private:
/**
*
* @param[in] msg
* @return bool true false
*/
bool OnMouseEnter(ui::EventArgs* msg);
/**
*
* @param[in] msg
* @return bool true false
*/
bool OnMouseLeave(ui::EventArgs* msg);
/**
*
* @param[in] msg
* @return bool true false
*/
bool OnItemMenu(ui::EventArgs* msg);
/**
*
* @param[in] point
* @return void
*/
void PopupItemMenu(POINT point);
/**
*
* @param[in] msg
* @return bool true false
*/
bool MergeItemMenuItemClick(ui::EventArgs* msg);
private:
ui::Control *icon_;
ui::Label *name_;
ui::Button *button_close_;
std::wstring session_id_;
};