本文整理汇总了C++中XttTbl::set_prompt方法的典型用法代码示例。如果您正苦于以下问题:C++ XttTbl::set_prompt方法的具体用法?C++ XttTbl::set_prompt怎么用?C++ XttTbl::set_prompt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XttTbl
的用法示例。
在下文中一共展示了XttTbl::set_prompt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: activate_command
void XttTblGtk::activate_command(GtkWidget* w, gpointer data)
{
XttTbl* xtt = (XttTbl*)data;
if (!xtt->is_authorized())
return;
if (xtt->command_open) {
g_object_set(((XttTblGtk*)xtt)->cmd_input, "visible", FALSE, NULL);
xtt->set_prompt("");
xtt->command_open = 0;
return;
}
gtk_editable_delete_text(GTK_EDITABLE(((XttTblGtk*)xtt)->cmd_input), 0, -1);
g_object_set(((XttTblGtk*)xtt)->cmd_input, "visible", TRUE, NULL);
xtt->message(' ', "");
gtk_widget_grab_focus(((XttTblGtk*)xtt)->cmd_input);
xtt->set_prompt("xtt >");
xtt->command_open = 1;
}
示例2: valchanged_cmd_input
void XttTblGtk::valchanged_cmd_input(GtkWidget* w, gpointer data)
{
XttTbl* xtt = (XttTbl*)data;
int sts;
char *text, *textutf8;
textutf8 = gtk_editable_get_chars(GTK_EDITABLE(w), 0, -1);
text = g_convert(textutf8, -1, "ISO8859-1", "UTF-8", NULL, NULL, NULL);
g_free(textutf8);
sts = xtt->command(text);
g_object_set(w, "visible", FALSE, NULL);
xtt->set_prompt("");
xtt->command_open = 0;
xtt->tblnav->set_inputfocus();
}