本文整理汇总了C++中XttTbl类的典型用法代码示例。如果您正苦于以下问题:C++ XttTbl类的具体用法?C++ XttTbl怎么用?C++ XttTbl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了XttTbl类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: xtttbl_show_func
static int xtttbl_show_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, "USER", strlen( arg1_str)) == 0) {
char msg[120];
char priv_str[80];
if ( strcmp( xtttbl->user, "") == 0) {
user_RtPrivToString( xtttbl->priv, priv_str, sizeof(priv_str));
sprintf( msg, "Not logged in (%s)", priv_str);
xtttbl->message('I', msg);
}
else {
user_RtPrivToString( xtttbl->priv, priv_str, sizeof(priv_str));
sprintf( msg, "User %s (%s)", xtttbl->user, priv_str);
xtttbl->message('I', msg);
}
}
else
xtttbl->message('E',"Syntax error");
return 1;
}
开发者ID:hfuhuang,项目名称:proview,代码行数:30,代码来源:xtt_tbl_command.cpp
示例2: sevhist_get_select_cb
int XttTbl::sevhist_get_select_cb(
void* ctx, pwr_tOid* oid, char* aname, char* oname)
{
XttTbl* xtttbl = (XttTbl*)ctx;
ItemBase* item;
if (!xtttbl->tblnav->get_select(&item)) {
xtttbl->message('E', "Select an storage item");
return 0;
}
switch (item->type) {
case tblnav_eItemType_Local:
case tblnav_eItemType_TreeLocal: {
TblNav_sevhistobject* hi = &((ItemLocal*)item)->item;
if (hi->attrnum > 1)
return 0;
*oid = hi->oid;
strcpy(aname, hi->objectattrlist[0].aname);
strcpy(oname, hi->oname);
break;
}
default:
return 0;
}
return 1;
}
开发者ID:siamect,项目名称:proview,代码行数:28,代码来源:xtt_tbl.cpp
示例3: activate_print
void XttTblGtk::activate_print(GtkWidget* w, gpointer data)
{
XttTbl* xtt = (XttTbl*)data;
if (!xtt->is_authorized())
return;
xtt->activate_print();
}
开发者ID:siamect,项目名称:proview,代码行数:9,代码来源:xtt_tbl_gtk.cpp
示例4: activate_list_layout
void XttTblGtk::activate_list_layout(GtkWidget* w, gpointer data)
{
XttTbl* xtt = (XttTbl*)data;
if (!xtt->is_authorized())
return;
xtt->tblnav->show_list();
}
开发者ID:siamect,项目名称:proview,代码行数:9,代码来源:xtt_tbl_gtk.cpp
示例5: activate_delete_item
void XttTblGtk::activate_delete_item(GtkWidget* w, gpointer data)
{
XttTbl* xtt = (XttTbl*)data;
if (!xtt->is_authorized(pwr_mPrv_SevAdmin))
return;
xtt->activate_delete_item();
}
开发者ID:siamect,项目名称:proview,代码行数:9,代码来源:xtt_tbl_gtk.cpp
示例6: 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);
}
开发者ID:hfuhuang,项目名称:proview,代码行数:10,代码来源:xtt_tbl_command.cpp
示例7: xtttbl_ccm_errormessage_func
static int xtttbl_ccm_errormessage_func( char *msg, int severity, void *client_data)
{
XttTbl *xtttbl = (XttTbl *) client_data;
if ( EVEN(severity))
xtttbl->message( 'I', msg);
else
xtttbl->message( 'E', msg);
return 1;
}
开发者ID:hfuhuang,项目名称:proview,代码行数:10,代码来源:xtt_tbl_command.cpp
示例8: 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();
}
开发者ID:siamect,项目名称:proview,代码行数:16,代码来源:xtt_tbl_gtk.cpp
示例9: delete_item_yes
void XttTbl::delete_item_yes(void* ctx, void* data)
{
XttTbl* tbl = (XttTbl*)ctx;
// sevcli_sHistItem *hi = (sevcli_sHistItem *)data;
TblNav_sevhistobject* hi = (TblNav_sevhistobject*)data;
pwr_tStatus sts;
printf("Deleting %s\n", hi->oname);
sevcli_delete_item(&sts, tbl->sevcli, hi->oid, hi->objectattrlist[0].aname);
if (EVEN(sts)) {
tbl->message('E', "Delete error");
return;
}
tbl->tblnav->delete_item(hi);
tbl->message('I', "Item deleted");
}
开发者ID:siamect,项目名称:proview,代码行数:17,代码来源:xtt_tbl.cpp
示例10: xtttbl_open_func
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;
}
开发者ID:hfuhuang,项目名称:proview,代码行数:18,代码来源:xtt_tbl_command.cpp
示例11: xtttbl_logout_func
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;
}
开发者ID:hfuhuang,项目名称:proview,代码行数:20,代码来源:xtt_tbl_command.cpp
示例12: g_object_set
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;
}
开发者ID:siamect,项目名称:proview,代码行数:23,代码来源:xtt_tbl_gtk.cpp
示例13: xtttbl_login_func
static int xtttbl_login_func( void *client_data,
void *client_flag)
{
XttTbl *xtttbl = (XttTbl *)client_data;
int sts;
char arg1_str[80];
char arg2_str[80];
char systemgroup[80];
unsigned int priv;
char msg[80];
// sts = gdh_GetObjectInfo ( "pwrNode-System.SystemGroup", &systemgroup,
// sizeof(systemgroup));
// if ( EVEN(sts)) return sts;
sts = xtttbl->read_bootfile( 0, systemgroup);
if ( EVEN( dcli_get_qualifier( "dcli_arg1", arg1_str, sizeof(arg1_str))))
{
xtttbl->cologin = xtttbl->login_new( "PwR Login", systemgroup, xtttbl_login_success_bc,
xtttbl_login_cancel_bc, &sts);
return 1;
}
if ( EVEN( dcli_get_qualifier( "dcli_arg2", arg2_str, sizeof(arg2_str))))
{
xtttbl->message('E',"Syntax error");
return 1;
}
cdh_ToLower( arg1_str, arg1_str);
cdh_ToLower( arg2_str, arg2_str);
sts = user_CheckUser( systemgroup, arg1_str, UserList::pwcrypt(arg2_str), &priv);
if ( EVEN(sts))
xtttbl->message('E',"Login failure");
else
{
strcpy( xtttbl->user, arg1_str);
xtttbl->priv = priv;
sprintf( msg, "User %s logged in", arg1_str);
xtttbl->message('I', msg);
}
return sts;
}
开发者ID:hfuhuang,项目名称:proview,代码行数:43,代码来源:xtt_tbl_command.cpp
示例14: activate_login
void XttTblGtk::activate_login(GtkWidget* w, gpointer data)
{
XttTbl* xtt = (XttTbl*)data;
xtt->open_login();
}
开发者ID:siamect,项目名称:proview,代码行数:6,代码来源:xtt_tbl_gtk.cpp
示例15: activate_logout
void XttTblGtk::activate_logout(GtkWidget* w, gpointer data)
{
XttTbl* xtt = (XttTbl*)data;
xtt->logout();
}
开发者ID:siamect,项目名称:proview,代码行数:6,代码来源:xtt_tbl_gtk.cpp
示例16: xtttbl_externcmd_func
int xtttbl_externcmd_func( char *cmd, void *client_data)
{
XttTbl *xtttbl = (XttTbl *) client_data;
return xtttbl->command( cmd);
}
开发者ID:hfuhuang,项目名称:proview,代码行数:6,代码来源:xtt_tbl_command.cpp
示例17: activate_zoom_reset
void XttTblGtk::activate_zoom_reset(GtkWidget* w, gpointer data)
{
XttTbl* xtt = (XttTbl*)data;
xtt->activate_zoom_reset();
}
开发者ID:siamect,项目名称:proview,代码行数:6,代码来源:xtt_tbl_gtk.cpp
示例18: xtttbl_help_func
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));
//.........这里部分代码省略.........
开发者ID:hfuhuang,项目名称:proview,代码行数:101,代码来源:xtt_tbl_command.cpp
注:本文中的XttTbl类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论