本文整理汇总了C++中XAP_Frame::getTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ XAP_Frame::getTitle方法的具体用法?C++ XAP_Frame::getTitle怎么用?C++ XAP_Frame::getTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XAP_Frame
的用法示例。
在下文中一共展示了XAP_Frame::getTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _populateWindowData
void XAP_UnixDialog_WindowMore::_populateWindowData(void)
{
GtkListStore *model;
GtkTreeIter iter;
model = gtk_list_store_new (2,
G_TYPE_STRING,
G_TYPE_INT);
for (UT_sint32 i = 0; i < m_pApp->getFrameCount(); i++)
{
XAP_Frame * f = m_pApp->getFrame(i);
UT_return_if_fail(f);
// Add a new row to the model
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter,
0, f->getTitle().utf8_str(),
1, i,
-1);
}
gtk_tree_view_set_model(GTK_TREE_VIEW(m_listWindows), reinterpret_cast<GtkTreeModel *>(model));
g_object_unref (model);
// now select first item in box
gtk_widget_grab_focus (m_listWindows);
GtkTreePath* path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, m_ndxSelFrame);
gtk_tree_view_set_cursor(GTK_TREE_VIEW(m_listWindows),
path,
gtk_tree_view_get_column (GTK_TREE_VIEW(m_listWindows), 0),
FALSE);
gtk_tree_path_free (path);
}
示例2: addItemToList
BOOL XAP_Win32Dialog_WindowMore::_onInitDialog(HWND /*hWnd*/, WPARAM /*wParam*/, LPARAM /*lParam*/)
{
// localize controls
localizeDialogTitle(XAP_STRING_ID_DLG_MW_MoreWindows);
localizeControlText(XAP_RID_DIALOG_WINDOWMORE_TEXT_ACTIVATE, XAP_STRING_ID_DLG_MW_Activate);
localizeControlText(XAP_RID_DIALOG_WINDOWMORE_BTN_OK, XAP_STRING_ID_DLG_OK);
localizeControlText(XAP_RID_DIALOG_WINDOWMORE_BTN_CANCEL, XAP_STRING_ID_DLG_Cancel);
// load each frame name into the list
for (UT_sint32 i=0; i<m_pApp->getFrameCount(); i++)
{
XAP_Frame * f = m_pApp->getFrame(i);
UT_continue_if_fail(f);
int nIndex = addItemToList(XAP_RID_DIALOG_WINDOWMORE_LIST, f->getTitle().utf8_str());
setListDataItem(XAP_RID_DIALOG_WINDOWMORE_LIST, nIndex, (DWORD) i);
}
// select the one we're in
selectListItem(XAP_RID_DIALOG_WINDOWMORE_LIST, m_ndxSelFrame);
return 1; // 1 == we did not call SetFocus()
}