• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IupGetHandle函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IupGetHandle函数的典型用法代码示例。如果您正苦于以下问题:C++ IupGetHandle函数的具体用法?C++ IupGetHandle怎么用?C++ IupGetHandle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IupGetHandle函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: iupSpinNewClass

Iclass* iupSpinNewClass(void)
{
  Iclass* ic = iupClassNew(iupRegisterFindClass("vbox"));

  ic->name = "spin";
  ic->format = NULL;  /* no parameters */
  ic->nativetype = IUP_TYPEVOID;
  ic->childtype = IUP_CHILDNONE;
  ic->is_interactive = 0;

  /* Class functions */
  ic->New = iupSpinNewClass;
  ic->Create = iSpinCreateMethod;

  iupClassRegisterCallback(ic, "SPIN_CB", "i");

  if (!IupGetHandle("IupSpinUpImage") || !IupGetHandle("IupSpinDownImage"))
  {
    Ihandle* spin_timer = IupTimer();
    IupSetCallback(spin_timer, "ACTION_CB", (Icallback) iSpinTimerCB);
    IupSetHandle("IupSpinTimer", spin_timer);

    iSpinLoadImages();
  }

  return ic;
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:27,代码来源:iup_spin.c


示例2: downloaderGui_download

//Downloads und installs the latest supported nw.js version for the specified application.
int downloaderGui_download(){
	downloaderGui = IupGetHandle("downloaderDlg");
	pb = IupGetHandle("pb");
	status = IupGetHandle("status");
	IupSetCallback(IupGetHandle("cancel"), "ACTION", (Icallback)cancelCb);
	IupSetCallback(downloaderGui, "CLOSE_CB", (Icallback)cancelCb);
	IupSetFunction("IDLE_ACTION", downloadCb);
	IupPopup(downloaderGui, IUP_CENTERPARENT, IUP_CENTERPARENT);
	return globalResult;
}
开发者ID:gianluca-nitti,项目名称:nw.js-global-install,代码行数:11,代码来源:downloaderGui.c


示例3: init_dlg

/* Initializes the dialog */
void init_dlg(void)
{
  Ihandle* tree1 = IupGetHandle("tree1");
  Ihandle* tree2 = IupGetHandle("tree2");
  Ihandle* box = IupVbox(IupHbox(tree1, tree2, NULL), NULL);
  Ihandle* dlg = IupDialog(box);
  IupSetAttribute(dlg, "TITLE", "IupTree Example");
  IupSetAttribute(box, "MARGIN", "20x20");
  IupSetHandle("dlg", dlg);
}
开发者ID:defdef,项目名称:iup,代码行数:11,代码来源:treednd.c


示例4: btn_detach_cb

static int btn_detach_cb(Ihandle *bt)
{
  Ihandle *dbox = IupGetHandle("dbox");

  IupSetAttribute(dbox, "DETACH", NULL);

  IupSetAttribute(bt, "ACTIVE", "NO");
  IupSetAttribute(IupGetHandle("restore"), "ACTIVE", "Yes");

  return IUP_DEFAULT;
}
开发者ID:sanikoyes,项目名称:iup,代码行数:11,代码来源:detachbox.c


示例5: cb_btnClearMorse

static int cb_btnClearMorse(Ihandle *btn) {

	Ihandle *txtMorse, *lblMorse;

	txtMorse = IupGetHandle (TXTMORSE_4);
	lblMorse = IupGetHandle (LBLMORSELEN_4);

	IupSetAttribute(txtMorse, "VALUE", 0);
	IupSetfAttribute(lblMorse, "TITLE", FRMT_MORSELEN_4, 0);

	return IUP_DEFAULT;
}
开发者ID:AKD92,项目名称:Morse-Tool-GUI-Application,代码行数:12,代码来源:panel_textToMorse.c


示例6: cb_btnClearAscii

static int cb_btnClearAscii(Ihandle *btn) {

	Ihandle *txtAscii, *lblAscii;

	txtAscii = IupGetHandle (TXTASCII_2);
	lblAscii = IupGetHandle (LBLASCIILEN_2);

	IupSetAttribute(txtAscii, "VALUE", 0);
	IupSetfAttribute(lblAscii, "TITLE", FRMT_ASCIILEN_2, 0);

	return IUP_DEFAULT;
}
开发者ID:AKD92,项目名称:Morse-Tool-GUI-Application,代码行数:12,代码来源:panel_textToMorse.c


示例7: main

int main(int argc, char **argv){
	IupOpen(&argc, &argv);
	led_load(); //Loads the GUI compiled from LED files.
	mainDlg = IupGetHandle("mainDlg"); //Get the window named "mainDlg"
	IupShowXY(mainDlg, IUP_CENTER, IUP_CENTER); //Shows the main window

	aboutDlg = about_init(); //Get the window named "aboutDlg"
	IupSetCallback(IupGetHandle("about"), "ACTION", (Icallback)main_about); //Callback: Associates the click action of the button "about" with the "about" function.

 	IupMainLoop();
 	IupClose();
	return EXIT_SUCCESS;
}
开发者ID:gianluca-nitti,项目名称:iup-cp-boilerplate,代码行数:13,代码来源:main.c


示例8: detached_cb

static int detached_cb(Ihandle *ih, Ihandle* new_parent, int x, int y)
{
  IupSetAttribute(new_parent, "TITLE", "New Dialog");

  IupSetAttribute(IupGetHandle("restore"), "ACTIVE", "YES");
  IupSetAttribute(IupGetHandle("detach"), "ACTIVE", "NO");
  printf("Detached!\n");

  (void)ih;
  (void)x;
  (void)y;
  return IUP_DEFAULT;
}
开发者ID:sanikoyes,项目名称:iup,代码行数:13,代码来源:detachbox.c


示例9: enter

static int enter(Ihandle *self, int lin, int col)
{
  printf("enteritem_cb(%d, %d)\n", lin, col);
  if(lin == 2 && col == 2)
  {
    IupSetAttribute(IupGetHandle("mat1"), "REDRAW", "ALL");
    IupSetAttribute(IupGetHandle("mat2"), "REDRAW", "ALL");
    //IupSetAttribute(IupGetHandle("mat3"), "REDRAW", "ALL");
    //IupSetAttribute(IupGetHandle("mat4"), "REDRAW", "ALL");
    //IupSetAttribute(IupGetHandle("mat5"), "REDRAW", "ALL");
    //IupSetAttribute(IupGetHandle("mat6"), "REDRAW", "ALL");
  }
  return IUP_DEFAULT;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:14,代码来源:matrix_cbs.c


示例10: main

int main(int argc, char **argv)
{
  IupOpen(&argc, &argv);      
  IupControlsOpen();      
  func_1();
  IupShowXY(IupGetHandle("dlg"),IUP_CENTER,IUP_CENTER);
  IupMainLoop();
  IupDestroy(IupGetHandle("img1"));
  IupDestroy(IupGetHandle("img2"));
  IupDestroy(IupGetHandle("dlg"));
  IupControlsClose();      
  IupClose();  
  return 0;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:14,代码来源:cbox.c


示例11: iDialogSetMenuAttrib

static int iDialogSetMenuAttrib(Ihandle* ih, const char* value)
{
  if (!ih->handle)
  {
    Ihandle* menu = IupGetHandle(value);
    ih->data->menu = menu;
    return 1;
  }

  if (!value)
  {
    if (ih->data->menu && ih->data->menu->handle)
    {
      ih->data->ignore_resize = 1;
      IupUnmap(ih->data->menu);  /* this will remove the menu from the dialog */
      ih->data->ignore_resize = 0;

      ih->data->menu = NULL;
    }
  }
  else
  {
    Ihandle* menu = IupGetHandle(value);
    if (!menu || menu->iclass->nativetype != IUP_TYPEMENU || menu->parent)
      return 0;

    /* already the current menu and it is mapped */
    if (ih->data->menu && ih->data->menu==menu && menu->handle)
      return 1;

    /* the current menu is mapped, so unmap it */
    if (ih->data->menu && ih->data->menu->handle && ih->data->menu!=menu)
    {
      ih->data->ignore_resize = 1;
      IupUnmap(ih->data->menu);   /* this will remove the menu from the dialog */
      ih->data->ignore_resize = 0;
    }

    ih->data->menu = menu;

    menu->parent = ih;    /* use this to create a menu bar instead of a popup menu */

    ih->data->ignore_resize = 1;
    IupMap(menu);     /* this will automatically add the menu to the dialog */
    ih->data->ignore_resize = 0;
  }
  return 1;
}
开发者ID:friends-of-iup,项目名称:iup,代码行数:48,代码来源:iup_dialog.c


示例12: nodeinfo

static int nodeinfo(Ihandle* ih)
{
  char attr[50], *kind;
  Ihandle* tree = IupGetHandle("tree");
  int branch = 0, id = IupGetInt(tree, "VALUE");
  printf("\nTree Info:\n");
  printf("  TOTALCOUNT=%s\n", IupGetAttribute(tree, "COUNT"));
  printf("Node Info:\n");
  printf("  ID=%d\n", id);
  printf("  TITLE=%s\n", IupGetAttribute(tree, "TITLE"));
  printf("  DEPTH=%s\n", IupGetAttribute(tree, "DEPTH"));
  sprintf(attr, "KIND%d", id);
  kind = IupGetAttribute(tree, "KIND");
  printf("  KIND=%s\n", kind);
  if (strcmp(kind, "BRANCH")==0) branch = 1;
  if (branch)
    printf("  STATE=%s\n", IupGetAttribute(tree, "STATE"));
  printf("  IMAGE=%s\n", IupGetAttribute(tree, "IMAGE"));
  if (branch)
    printf("  IMAGEBRANCHEXPANDED=%s\n", IupGetAttribute(tree, "IMAGEBRANCHEXPANDED"));
  printf("  MARKED=%s\n", IupGetAttribute(tree, "MARKED"));
  printf("  COLOR=%s\n", IupGetAttribute(tree, "COLOR"));
  printf("  PARENT=%s\n", IupGetAttribute(tree, "PARENT"));
  printf("  COUNT=%s\n", IupGetAttribute(tree, "CHILDCOUNT"));
  printf("  USERDATA=%p\n", IupGetAttribute(tree, "USERDATA"));
  return IUP_DEFAULT;
}
开发者ID:Airr,项目名称:iup_mac,代码行数:27,代码来源:tree.c


示例13: btn_image_button_cb

/******************************************************************************
 * Function:                                                                  *
 * Button with image button callback                                          *
 *                                                                            *
 * Description:                                                               *
 * Callback called when the exit button is pressed or released. Shows a       *
 * message saying if the button was pressed or released                       *
 *                                                                            *
 * Parameters received:                                                       *
 * self - identifies the canvas that activated the function’s execution.      *
 * b    - identifies the activated mouse button:                              *
 *                                                                            *
 * IUP_BUTTON1 left mouse button (button 1)                                   *
 * IUP_BUTTON2 middle mouse button (button 2)                                 *
 * IUP_BUTTON3 right mouse button (button 3)                                  *
 *                                                                            *
 * e     - indicates the state of the button:                                 *
 *                                                                            *
 * 0 mouse button was released                                                *
 * 1 mouse button was pressed                                                 *
 *                                                                            *
 * Value returned:                                                            *
 * IUP_DEFAULT                                                                *
 ******************************************************************************/
int btn_image_button_cb( Ihandle *self,int b, int e )
{
  /* If the left button changed its state... */
  if( b == IUP_BUTTON1 )
  {
    /* IUP handles */
    Ihandle* text;
    
    /* Recovers "text" handle */
    text = IupGetHandle( "text" );
    
    /* If the button was pressed... */
    if(e == 1) 
    {
      /* Sets text's value */ 
      IupSetAttribute( text, "VALUE", "Red button pressed" );
    }
    /* else the button was released */
    else       
    {
      /* Sets text's value */ 
      IupSetAttribute( text, "VALUE", "Red button released" );
    }
  }
  
  /* Executed function successfully */
  return IUP_DEFAULT;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:52,代码来源:button.c


示例14: addleaf

static int addleaf(void)
{
  Ihandle* tree = IupGetHandle("tree");
  int id = IupGetInt(tree, "VALUE");
  IupTreeSetAttribute(tree, "ADDLEAF", id, "");
  return IUP_DEFAULT;
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:7,代码来源:tree.c


示例15: iDetachBoxSetRestoreAttrib

static int iDetachBoxSetRestoreAttrib(Ihandle* ih, const char* value)
{
  Ihandle *dlg = IupGetDialog(ih);
  Ihandle* new_parent = IupGetHandle(value);
  Ihandle* new_brother = NULL;

  if (!new_parent)
  {
    new_parent = ih->data->old_parent;
    new_brother = ih->data->old_brother;

    if (IupGetChildPos(new_parent, new_brother) == -1)  /* not a child of new_parent */
      new_brother = NULL;
  }

  /* Sets the new parent */
  IupReparent(ih, new_parent, new_brother);

  /* Show handler */
  if (ih->data->barsize)
    IupSetAttribute(ih->firstchild, "VISIBLE", "Yes");

  /* Updates/redraws the layout of the dialog */
  IupRefresh(new_parent);

  /* Reset previous parent and brother */
  ih->data->old_parent = NULL;
  ih->data->old_brother = NULL;

  IupDestroy(dlg);
  return 0;
}
开发者ID:sanikoyes,项目名称:iup,代码行数:32,代码来源:iup_detachbox.c


示例16: iupImageGetCursor

void* iupImageGetCursor(const char* name)
{
  void* cursor;
  Ihandle *ih;

  if (!name)
    return NULL;

  /* Check first in the system resources. */
  cursor = iupdrvImageLoad(name, IUPIMAGE_CURSOR);
  if (cursor) 
    return cursor;

  /* get handle from name */
  ih = IupGetHandle(name);
  if (!ih)
    return NULL;
  
  /* Check for an already created cursor */
  cursor = iupAttribGetStr(ih, "_IUPIMAGE_CURSOR");
  if (cursor)
    return cursor;

  /* Not created, tries to create the cursor */
  cursor = iupdrvImageCreateCursor(ih);

  /* save the pixbuf */
  iupAttribSetStr(ih, "_IUPIMAGE_CURSOR", (char*)cursor);

  return cursor;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:31,代码来源:iup_image.c


示例17: iupImageGetIcon

void* iupImageGetIcon(const char* name)
{
  void* icon;
  Ihandle *ih;

  if (!name)
    return NULL;

  /* Check first in the system resources. */
  icon = iupdrvImageLoad(name, IUPIMAGE_ICON);
  if (icon) 
    return icon;

  /* get handle from name */
  ih = IupGetHandle(name);
  if (!ih)
    return NULL;
  
  /* Check for an already created icon */
  icon = iupAttribGetStr(ih, "_IUPIMAGE_ICON");
  if (icon)
    return icon;

  /* Not created, tries to create the icon */
  icon = iupdrvImageCreateIcon(ih);

  /* save the pixbuf */
  iupAttribSetStr(ih, "_IUPIMAGE_ICON", (char*)icon);

  return icon;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:31,代码来源:iup_image.c


示例18: insertbranch

static int insertbranch(void)
{
  Ihandle* tree = IupGetHandle("tree");
  int id = IupGetInt(tree, "VALUE");
  IupTreeSetAttribute(tree, "INSERTBRANCH", id, "");
  return IUP_DEFAULT;
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:7,代码来源:tree.c


示例19: next

static int next(Ihandle *ih)
{
  Ihandle* tree = IupGetHandle("tree");
  IupSetAttribute(tree, "VALUE",  "NEXT");
  //IupSetAttribute(tree, "TOPITEM",  "8");
  return IUP_DEFAULT;
}
开发者ID:Airr,项目名称:iup_mac,代码行数:7,代码来源:tree.c


示例20: tabs_get_index

int tabs_get_index(void)
{
  Ihandle *curr_tab = IupGetHandle(IupGetAttribute(tabs, "VALUE"));
  char *ss = IupGetAttribute(curr_tab, "TABTITLE");
  ss += 5; // Skip "Plot "
  return atoi(ss);
}
开发者ID:EduardoPataki,项目名称:iup-examples,代码行数:7,代码来源:pplot.cpp



注:本文中的IupGetHandle函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IupGetInt函数代码示例发布时间:2022-05-30
下一篇:
C++ IupGetGlobal函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap