本文整理汇总了C++中XttTbl::message方法的典型用法代码示例。如果您正苦于以下问题:C++ XttTbl::message方法的具体用法?C++ XttTbl::message怎么用?C++ XttTbl::message使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XttTbl
的用法示例。
在下文中一共展示了XttTbl::message方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: xtttbl_login_success_bc
static void xtttbl_login_success_bc( void *ctx)
{
XttTbl *xtttbl = (XttTbl *)ctx;
char msg[80];
CoLogin::get_login_info( 0, 0, xtttbl->user, (unsigned long *)&xtttbl->priv, 0);
sprintf( msg, "User %s logged in", xtttbl->user);
xtttbl->cologin = 0;
xtttbl->message('I', msg);
}
示例2: sprintf
static int xtttbl_logout_func( void *client_data,
void *client_flag)
{
XttTbl *xtttbl = (XttTbl *)client_data;
char msg[80];
if ( strcmp( xtttbl->base_user, "") == 0)
{
sprintf( msg, "User %s logged out", xtttbl->user);
xtttbl->message('I', msg);
}
else
{
sprintf( msg, "Returned to user %s", xtttbl->base_user);
xtttbl->message('I', msg);
}
strcpy( xtttbl->user, xtttbl->base_user);
xtttbl->priv = xtttbl->base_priv;
return 1;
}
示例3: sizeof
static int xtttbl_open_func( void *client_data,
void *client_flag)
{
XttTbl *xtttbl = (XttTbl *)client_data;
char arg1_str[80];
int arg1_sts;
arg1_sts = dcli_get_qualifier( "dcli_arg1", arg1_str, sizeof(arg1_str));
if ( strncmp( arg1_str, "GRAPH", strlen( arg1_str)) == 0)
{
}
else
xtttbl->message('E',"Syntax error");
return XTTTBL__SUCCESS;
}
示例4: 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;
}
示例5: if
static int xtttbl_help_func( void *client_data,
void *client_flag)
{
XttTbl *xtttbl = (XttTbl *)client_data;
int sts;
char arg_str[80];
char file_str[80];
char bookmark_str[80];
char key[80];
char return_str[80];
int pop;
int width, height;
int nr;
if ( ODD( dcli_get_qualifier( "/INDEX", file_str, sizeof(file_str))))
{
if ( ODD( dcli_get_qualifier( "/HELPFILE", file_str, sizeof(file_str))))
{
sts = CoXHelp::dhelp_index( navh_eHelpFile_Other, file_str);
if ( EVEN(sts))
xtttbl->message('E', "Unable to find file");
}
else
{
if ( ODD( dcli_get_qualifier( "/BASE", 0, 0)))
sts = CoXHelp::dhelp_index( navh_eHelpFile_Base, NULL);
else
sts = CoXHelp::dhelp_index( navh_eHelpFile_Project, NULL);
}
return 1;
}
if ( ODD( dcli_get_qualifier( "/VERSION", 0, 0))) {
sts = CoXHelp::dhelp( "version", "", navh_eHelpFile_Other, "$pwr_exe/xtt_version_help.dat", 0);
if ( EVEN(sts))
xtttbl->message('E', "No help on this subject");
return sts;
}
int strict = 0;
if ( EVEN( dcli_get_qualifier( "dcli_arg1", arg_str, sizeof(arg_str))))
{
sts = CoXHelp::dhelp( "help command", "", navh_eHelpFile_Base, NULL, strict);
return 1;
}
if ( EVEN( dcli_get_qualifier( "/BOOKMARK", bookmark_str, sizeof(bookmark_str))))
strcpy( bookmark_str, "");
strcpy( key, arg_str);
if ( ODD( dcli_get_qualifier( "dcli_arg2", arg_str, sizeof(arg_str))))
{
strcat( key, " ");
strcat( key, arg_str);
if ( ODD( dcli_get_qualifier( "dcli_arg3", arg_str, sizeof(arg_str))))
{
strcat( key, " ");
strcat( key, arg_str);
if ( ODD( dcli_get_qualifier( "dcli_arg3", arg_str, sizeof(arg_str))))
{
strcat( key, " ");
strcat( key, arg_str);
if ( ODD( dcli_get_qualifier( "dcli_arg4", arg_str, sizeof(arg_str))))
{
strcat( key, " ");
strcat( key, arg_str);
}
}
}
}
if ( ! ODD( dcli_get_qualifier( "/RETURNCOMMAND", return_str, sizeof(return_str))))
strcpy( return_str, "");
if ( ODD( dcli_get_qualifier( "/WIDTH", arg_str, sizeof(arg_str))))
{
// convert to integer
nr = sscanf( arg_str, "%d", &width);
if ( nr != 1)
{
xtttbl->message('E', "Width syntax error");
return XTTTBL__HOLDCOMMAND;
}
}
else
width = 0;
if ( ODD( dcli_get_qualifier( "/HEIGHT", arg_str, sizeof(arg_str))))
{
// convert to integer
nr = sscanf( arg_str, "%d", &height);
if ( nr != 1)
{
xtttbl->message('E', "Height syntax error");
return XTTTBL__HOLDCOMMAND;
}
}
else
height = 0;
pop = ODD( dcli_get_qualifier( "/POPNAVIGATOR", 0, 0));
//.........这里部分代码省略.........