本文整理汇总了C++中ChatPanel::FocusInputBox方法的典型用法代码示例。如果您正苦于以下问题:C++ ChatPanel::FocusInputBox方法的具体用法?C++ ChatPanel::FocusInputBox怎么用?C++ ChatPanel::FocusInputBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChatPanel
的用法示例。
在下文中一共展示了ChatPanel::FocusInputBox方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OpenPrivateChat
//! @brief Open a new chat tab with a private chat
//!
//! @param nick The user to whom the chatwindow should be opened to
void MainWindow::OpenPrivateChat(const User& user, bool doFocus)
{
ASSERT_LOGIC(m_chat_tab != 0, "m_chat_tab");
m_func_tabs->SetSelection(PAGE_CHAT);
ChatPanel* cp = m_chat_tab->AddChatPanel(user);
if (doFocus)
cp->FocusInputBox();
}
示例2: ShowTab
void MainWindow::ShowTab(const unsigned int idx)
{
if (idx < m_tab_names.GetCount()) {
m_func_tabs->SetSelection(idx);
switch (idx) {
case PAGE_JOIN: {
GetJoinTab().SetFocus();
ChatPanel* p = GetJoinTab().GetActiveChatPanel();
if (p != NULL) {
p->FocusInputBox();
}
return;
}
default:
break;
};
} else
wxLogError(_T("tab selection oob: %d"), idx);
}
示例3: AddChatPanel
ChatPanel* MainChatTab::AddChatPanel( Channel& channel, bool doFocus )
{
for ( unsigned int i = 0; i < m_chat_tabs->GetPageCount(); i++ ) {
if ( m_chat_tabs->GetPageText( i ) == channel.GetName() ) {
ChatPanel* tmp = ( ChatPanel* )m_chat_tabs->GetPage( i );
if ( tmp->GetPanelType() == CPT_Channel ) {
if ( doFocus )
m_chat_tabs->SetSelection( i );
tmp->SetChannel( &channel );
return tmp;
}
}
}
ChatPanel* chat = new ChatPanel( m_chat_tabs, channel, m_imagelist );
m_chat_tabs->InsertPage( m_chat_tabs->GetPageCount() - 1, chat, channel.GetName(), doFocus, wxBitmap( channel_xpm ) );
if ( doFocus )
chat->FocusInputBox();
return chat;
}