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

C++ IupSetHandle函数代码示例

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

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



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

示例1: createMenu

static void createMenu(void)
{
  Ihandle* winmenu;
  Ihandle* mnu = IupMenu(
  IupSubmenu("MDI",IupMenu(
      IupItem("New", "mdi_new"), 
      NULL)),
  IupSubmenu("Window", winmenu = IupMenu(
      IupItem("Tile Horizontal", "mdi_tilehoriz"), 
      IupItem("Tile Vertical", "mdi_tilevert"), 
      IupItem("Cascade", "mdi_cascade"), 
      IupItem("Icon Arrange", "mdi_icon"), 
      IupItem("Close All", "mdi_closeall"), 
      IupSeparator(),
      IupItem("Next", "mdi_next"), 
      IupItem("Previous", "mdi_previous"), 
      NULL)),
    NULL);
  IupSetHandle("mnu",mnu);
  IupSetHandle("mdiMenu",winmenu);

  IupSetFunction("mdi_new", (Icallback)mdi_new);
  IupSetFunction("mdi_tilehoriz", (Icallback)mdi_tilehoriz);
  IupSetFunction("mdi_tilevert", (Icallback)mdi_tilevert);
  IupSetFunction("mdi_cascade", (Icallback)mdi_cascade);
  IupSetFunction("mdi_icon", (Icallback)mdi_icon);
  IupSetFunction("mdi_next", (Icallback)mdi_next);
  IupSetFunction("mdi_previous", (Icallback)mdi_previous);
  IupSetFunction("mdi_closeall", (Icallback)mdi_closeall);
}
开发者ID:Airr,项目名称:iup_mac,代码行数:30,代码来源:mdi.c


示例2: SetHandle

static void SetHandle(void)
{
  if (lua_isnil(lua_getparam(2)))
    IupSetHandle(luaL_check_string(1), NULL);
  else
    IupSetHandle(luaL_check_string(1), iuplua_checkihandle(2));
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:7,代码来源:iuplua_api.c


示例3: iSpinLoadImages

static void iSpinLoadImages(void)
{
  Ihandle* img;

  /* Spin UP image */
  unsigned char iupspin_up_img[] = {
    1, 1, 1, 1, 1, 1, 1, 1, 1, 
    1, 1, 1, 1, 0, 1, 1, 1, 1,
    1, 1, 1, 0, 0, 0, 1, 1, 1,
    1, 1, 0, 0, 0, 0, 0, 1, 1,
    1, 0, 0, 0, 0, 0, 0, 0, 1,
    0, 0, 0, 0, 0, 0, 0, 0, 0
  };

  /* Spin DOWN image */
  unsigned char iupspin_down_img[] = {
    0, 0, 0, 0, 0, 0, 0, 0, 0,
    1, 0, 0, 0, 0, 0, 0, 0, 1,
    1, 1, 0, 0, 0, 0, 0, 1, 1,
    1, 1, 1, 0, 0, 0, 1, 1, 1,
    1, 1, 1, 1, 0, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1
  };

  img = IupImage(9, 6, iupspin_up_img);
  IupSetAttribute(img, "0", "0 0 0"); 
  IupSetAttribute(img, "1", "BGCOLOR"); 
  IupSetHandle("IupSpinUpImage", img); 

  img = IupImage(9, 6, iupspin_down_img);
  IupSetAttribute(img, "0", "0 0 0"); 
  IupSetAttribute(img, "1", "BGCOLOR"); 
  IupSetHandle("IupSpinDownImage", img); 
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:34,代码来源:iup_spin.c


示例4: iMatrixCreateCursor

static void iMatrixCreateCursor(void)
{
  Ihandle *imgcursor;
  unsigned char matrx_img_cur_excel[15*15] = 
  {
    0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,
    0,0,0,0,1,2,2,2,2,1,1,0,0,0,0,
    0,0,0,0,1,2,2,2,2,1,1,0,0,0,0,
    0,0,0,0,1,2,2,2,2,1,1,0,0,0,0,
    1,1,1,1,1,2,2,2,2,1,1,1,1,1,0,
    1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,
    1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,
    1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,
    1,1,1,1,1,2,2,2,2,1,1,1,1,1,1,
    0,1,1,1,1,2,2,2,2,1,1,1,1,1,1,
    0,0,0,0,1,2,2,2,2,1,1,0,0,0,0,
    0,0,0,0,1,2,2,2,2,1,1,0,0,0,0,
    0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,
    0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  };

  imgcursor = IupImage(15, 15, matrx_img_cur_excel);
  IupSetAttribute(imgcursor, "0", "BGCOLOR"); 
  IupSetAttribute(imgcursor, "1", "0 0 0"); 
  IupSetAttribute(imgcursor, "2", "255 255 255"); 
  IupSetAttribute(imgcursor, "HOTSPOT", "7:7");     /* Centered Hotspot           */
  IupSetHandle("IupMatrixCrossCursor", imgcursor); 
  IupSetHandle("matrx_img_cur_excel",  imgcursor);  /* for backward compatibility */
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:30,代码来源:iupmatrix.c


示例5: IupGLCanvas

void TransferFunctionsViewer::BuildInterface ()
{
  m_iup_canvas = IupGLCanvas ("tfviewer_canvas");
  IupSetCallback (m_iup_canvas, "ACTION", (Icallback)TransferFunctionsViewer::Action);
  IupSetCallback (m_iup_canvas, "BUTTON_CB", (Icallback)TransferFunctionsViewer::Button_CB);
  IupSetCallback (m_iup_canvas, "MOTION_CB", (Icallback)TransferFunctionsViewer::Motion_CB);
  IupSetAttribute (m_iup_canvas, IUP_BUFFER, IUP_DOUBLE);
  IupSetAttribute (m_iup_canvas, IUP_RASTERSIZE, "258x50");
  IupSetAttribute (m_iup_canvas, IUP_RESIZE, IUP_NO);
  IupSetHandle ("tfviewer_canvas", m_iup_canvas);

  m_iup_sub_menu_file = IupSubmenu ("Arquivo", IupMenu(NULL));

  m_iup_menu = IupMenu (m_iup_sub_menu_file, NULL);
  IupSetHandle ("TransferFunctionMenu", m_iup_menu);

  m_iup_main_dialog = IupDialog (m_iup_canvas);
  //IupSetAttribute (m_iup_main_dialog, "MENU", "TransferFunctionMenu");
  IupSetAttribute (m_iup_main_dialog, "TITLE", "Transfer Function Visualization");
  IupSetAttribute (m_iup_main_dialog, "BORDER", "NO");
  IupSetAttribute (m_iup_main_dialog, "RESIZE", "NO");
  
  IupMap (m_iup_main_dialog);
  IupRefresh (m_iup_main_dialog);

  if (!m_pixels)
    m_pixels = new float[258 * 50 * 4];

  Redraw ();
}
开发者ID:rustanitu,项目名称:TFG,代码行数:30,代码来源:TransferFunctionsViewer.cpp


示例6: createimg_s

void createimg_s (void)
{ 
  Ihandle *img_restart, *img_play, *img_forward, *img_rewind, *img_pause;
  
  img_restart = IupImage(22,22, pixmap_restart);
  img_play    = IupImage(22,22, pixmap_play);
  img_forward = IupImage(22,22, pixmap_forward);
  img_rewind  = IupImage(22,22, pixmap_rewind);
  img_pause   = IupImage(22,22, pixmap_pause);
  
  IupSetHandle ("img_restart", img_restart); 
  IupSetHandle ("img_play", img_play);
  IupSetHandle ("img_forward", img_forward); 
  IupSetHandle ("img_rewind", img_rewind);
  IupSetHandle ("img_pause", img_pause);
  
  IupSetAttribute (img_restart, "1", "0 0 0"); 
  IupSetAttribute (img_restart, "2", "BGCOLOR");
  IupSetAttribute (img_play, "1", "0 0 0"); 
  IupSetAttribute (img_play, "2", "BGCOLOR"); 
  IupSetAttribute (img_forward, "1", "0 0 0"); 
  IupSetAttribute (img_forward, "2", "BGCOLOR");
  IupSetAttribute (img_rewind, "1", "0 0 0"); 
  IupSetAttribute (img_rewind, "2", "BGCOLOR"); 
  IupSetAttribute (img_pause, "1", "0 0 0"); 
  IupSetAttribute (img_pause, "2", "BGCOLOR");
}
开发者ID:defdef,项目名称:iup,代码行数:27,代码来源:progressbar.c


示例7: IupGetText

int IupGetText(const char* title, char* text)
{
  Ihandle *ok, *cancel, *multi_text, *button_box, *dlg_box, *dialog;
  int bt;

  multi_text = IupMultiLine("do_nothing");
  IupSetAttribute(multi_text,IUP_EXPAND, IUP_YES);
  IupSetAttribute(multi_text, IUP_SIZE, "200x80");
  IupSetAttribute(multi_text,IUP_VALUE, text);
  IupSetAttribute(multi_text,IUP_FONT, IUP_COURIER_NORMAL_12);

  ok   = IupButton(strok, NULL);
  IupSetAttribute (ok   ,IUP_SIZE ,"50x");
  IupSetCallback(ok, "ACTION", (Icallback)CB_button_OK);
  IupSetHandle( "IupGetTextOkButton", ok );

  cancel  = IupButton(strcancel, NULL);
  IupSetAttribute (cancel,IUP_SIZE ,"50x");
  IupSetCallback(cancel, "ACTION", (Icallback)CB_button_CANCEL);
  IupSetHandle( "IupGetTextCancelButton", cancel );

  button_box = IupHbox(
    IupSetAttributes(IupFill(), "EXPAND=HORIZONTAL"),
    ok,
    IupSetAttributes(IupFill(), "SIZE=1x"),
    cancel,
    NULL);
  IupSetAttribute(button_box,IUP_MARGIN,"0x0");

  dlg_box = IupVbox(
    multi_text,
    IupSetAttributes(IupFill(), "SIZE=1x"),
    button_box,
    NULL);

  IupSetAttribute(dlg_box,IUP_MARGIN,"10x10");
  IupSetAttribute(dlg_box,IUP_GAP,"5");

  dialog = IupDialog (dlg_box);

  IupSetAttribute (dialog,IUP_TITLE,title);
  IupSetAttribute (dialog,IUP_MINBOX,IUP_NO);
  IupSetAttribute (dialog,IUP_MAXBOX,IUP_NO);
  IupSetAttribute (dialog,IUP_DEFAULTENTER,"IupGetTextOkButton");
  IupSetAttribute (dialog,IUP_DEFAULTESC,"IupGetTextCancelButton");
  IupSetAttribute (dialog,IUP_PARENTDIALOG, IupGetGlobal(IUP_PARENTDIALOG));
  IupSetAttribute (dialog, IUP_ICON, IupGetGlobal(IUP_ICON));

  IupPopup(dialog, IUP_CENTER, IUP_CENTER);

  bt = IupGetInt(dialog, IUP_STATUS);
  if (bt==1)
    strcpy(text, IupGetAttribute(multi_text, IUP_VALUE));
  else
    bt = 0;  /* return 0 instead of -1 */

  IupDestroy(dialog);
  return bt;
}
开发者ID:svn2github,项目名称:iup-iup,代码行数:59,代码来源:ipredial.c


示例8: createMainWindow

Ihandle * createMainWindow(void) {

	Ihandle *bottomHbox, *mainVbox;
	Ihandle *lblTitle, *glCanvas;
	Ihandle *btnRandomLine, *btnClearLines, *btnClose;
	Ihandle *dialog;

	lblTitle = IupLabel(labTitle);
	IupSetAttribute(lblTitle, "EXPAND", "HORIZONTAL");
	IupSetAttribute(lblTitle, "ALIGNMENT", "ALEFT:ACENTER");
	IupSetAttribute(lblTitle, "FONTSIZE", "10");

	glCanvas = IupGLCanvas(0);
	IupSetAttribute(glCanvas, "EXPAND", "YES");
	IupSetAttribute(glCanvas, "BORDER", "NO");
	IupSetAttribute(glCanvas, "CANFOCUS", "NO");
	IupSetCallback(glCanvas, "ACTION", (Icallback) repaint_cb);

	btnRandomLine = IupButton("Generate Random Lines", 0);
	IupSetAttribute(btnRandomLine, "RASTERSIZE", "150x33");
	IupSetCallback(btnRandomLine, "ACTION", (Icallback) btnRandLine_cb);
	
	btnClearLines = IupButton("Clear All Lines", 0);
	IupSetAttribute(btnClearLines, "RASTERSIZE", "100x33");
	IupSetCallback(btnClearLines, "ACTION", (Icallback) btnClearLines_cb);
	
	btnClose = IupButton("Close", 0);
	IupSetAttribute(btnClose, "RASTERSIZE", "80x33");
	IupSetCallback(btnClose, "ACTION", (Icallback) exit_cb);

	bottomHbox = IupHbox(btnRandomLine, btnClearLines, IupFill(), btnClose, 0);
	IupSetAttribute(bottomHbox, "EXPAND", "HORIZONTAL");
	IupSetAttribute(bottomHbox, "NGAP", "5");
	IupSetAttribute(bottomHbox, "NMARGIN", "0x5");

	mainVbox = IupVbox(lblTitle, glCanvas, bottomHbox, 0);
	IupSetAttribute(mainVbox, "NMARGIN", "10x10");
	IupSetAttribute(mainVbox, "NGAP", "10");
	
	IupSetHandle(BTN_CLOSE, btnClose);
	IupSetHandle(GL_CANVAS, glCanvas);

	dialog = IupDialog(mainVbox);
	IupSetAttribute(dialog, "TITLE", "GL Labwork");
	IupSetAttribute(dialog, "RASTERSIZE", "425x550");
	IupSetAttribute(dialog, "SHRINK", "YES");
	IupSetAttribute(dialog, "DEFAULTESC", BTN_CLOSE);
	
	IupSetHandle(MAIN_WINDOW, dialog);

	return dialog;
}
开发者ID:AKD92,项目名称:OpenGL-Graphics-Programmatic-LineClip-Analyzer,代码行数:52,代码来源:driver_lineclip_analyzer.c


示例9: main

int main(int argc, char **argv)
{
  Ihandle *dlg;
  Ihandle *text;
  Ihandle *menu, *menu_file;
  Ihandle *submenu_file;
  Ihandle *item_save, *item_autosave, *item_exit;

  IupOpen(&argc, &argv);
 
  text = IupText(NULL);

  IupSetAttribute(text, "VALUE", "This is an empty text");

  item_save = IupItem("Save\tCtrl+S", NULL);  /* this is NOT related with the Ctrl+S key callback, it will just align the text at right */
  item_autosave = IupItem("&Auto Save", NULL);
  item_exit = IupItem("Exit", "item_exit_act");

  IupSetAttribute(item_exit, "KEY", "x");   /* this is NOT related with the K_X key callback, it will just underline the letter */

  IupSetCallback(item_exit, "ACTION", (Icallback) item_exit_cb);
  IupSetCallback(item_autosave, "ACTION", (Icallback) item_autosave_cb);

  IupSetAttribute(item_autosave, "VALUE", "ON");
  IupSetHandle("item_autosave", item_autosave); /* giving a name to a iup handle */

  menu_file = IupMenu(item_save, item_autosave, item_exit, NULL);
  
  submenu_file = IupSubmenu("File", menu_file);
  
  menu = IupMenu(submenu_file, NULL);
 
  IupSetHandle("menu", menu);
                                
  dlg = IupDialog(IupVbox(text, IupButton("Test", NULL), NULL));

  IupSetAttribute(dlg, "MARGIN", "10x10");
  IupSetAttribute(dlg, "GAP", "10");
  IupSetAttribute(dlg, "TITLE", "IupItem");
  IupSetAttribute(dlg, "MENU", "menu");
  IupSetCallback(dlg, "K_cX", (Icallback) item_exit_cb);   /* this will also affect the IupText if at focus, since it is used for clipboard cut */
  IupSetCallback(dlg, "K_cA", (Icallback) item_autosave_cb);  /* this will also affect the IupText if at focus, since it is used for select all */
  IupSetCallback(dlg, "K_cS", (Icallback) item_save_cb);

  IupShowXY(dlg, IUP_CENTER, IUP_CENTER);
  IupMainLoop();
  IupClose();

  return EXIT_SUCCESS;

}
开发者ID:defdef,项目名称:iup,代码行数:51,代码来源:item.c


示例10: main

int main(int argc, char **argv)
{
  Ihandle *male, *female, *exclusive, *frame, *dialog;

  IupOpen(&argc, &argv);

  male  = IupToggle ("Male", "");
  female = IupToggle ("Female", "");

  exclusive = IupRadio
  (
    IupVbox
    (
      male,
      female,
      NULL
    )
  );
  IupSetHandle("male", male);
  IupSetHandle("female", female);
  IupSetAttribute(exclusive, IUP_VALUE, "female");
  IupSetAttribute(exclusive, IUP_TIP, "Two state button - Exclusive - RADIO");

  frame = IupFrame
  (
    exclusive
  );
  IupSetAttribute (frame, IUP_TITLE, "Gender");

  dialog = IupDialog
  (
    IupHbox
    (
      IupFill(),
      frame,
      IupFill(),
      NULL
    )
  );

  IupSetAttributes(dialog, "SIZE=140, TITLE=IupRadio, RESIZE=NO, MINBOX=NO, MAXBOX=NO");

  IupShow(dialog);
  IupMainLoop();
  IupDestroy(dialog);
  IupClose();

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


示例11: main

int main(int argc, char **argv)
{
  Ihandle *dlg, *bt, *dbox, *lbl, *ml, *hbox, *bt2, *txt;
  IupOpen(&argc, &argv);

  bt = IupButton("Detache Me!", NULL);
  IupSetCallback(bt, "ACTION", (Icallback)btn_detach_cb);
  IupSetHandle("detach", bt);

  ml = IupMultiLine(NULL);
  IupSetAttribute(ml, "EXPAND", "YES");
  IupSetAttribute(ml, "VISIBLELINES", "5");

  hbox = IupHbox(bt, ml, NULL);
  IupSetAttribute(hbox, "MARGIN", "10x0");

  dbox = IupDetachBox(hbox);
  IupSetAttribute(dbox, "ORIENTATION", "VERTICAL");
  //IupSetAttribute(dbox, "SHOWGRIP", "NO");
  //IupSetAttribute(dbox, "BARSIZE", "0");
  //IupSetAttribute(dbox, "COLOR", "255 0 0");
  IupSetCallback(dbox, "DETACHED_CB", (Icallback)detached_cb);
  IupSetHandle("dbox", dbox);

  lbl = IupLabel("Label");
  IupSetAttribute(lbl, "EXPAND", "VERTICAL");

  bt2 = IupButton("Restore me!", NULL);
  IupSetAttribute(bt2, "EXPAND", "YES");
  IupSetAttribute(bt2, "ACTIVE", "NO");
  IupSetCallback(bt2, "ACTION", (Icallback)btn_restore_cb);
  IupSetHandle("restore", bt2);

  txt = IupText(NULL);
  IupSetAttribute(txt, "EXPAND", "HORIZONTAL");

  dlg = IupDialog(IupVbox(dbox, lbl, bt2, txt, NULL));
  IupSetAttribute(dlg, "TITLE", "IupDetachBox Example");
  IupSetAttribute(dlg, "MARGIN", "10x10");
  IupSetAttribute(dlg, "GAP", "10");
  IupSetAttribute(dlg, "RASTERSIZE", "300x300");

  IupShow(dlg);

  IupMainLoop();
  IupClose();
  return EXIT_SUCCESS;
}
开发者ID:sanikoyes,项目名称:iup,代码行数:48,代码来源:detachbox.c


示例12: load_image_LogoTecgraf

static Ihandle* load_image_LogoTecgraf(void)
{
  Ihandle* image = IupGetHandle("LogoTecgraf");
  if (!image)
  {
    unsigned char imgdata[] = {
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 120, 143, 125, 132, 148, 178, 173, 133, 149, 178, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 110, 130, 48, 130, 147, 177, 254, 124, 139, 167, 254, 131, 147, 176, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 128, 153, 134, 142, 159, 191, 194, 47, 52, 61, 110, 114, 128, 154, 222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 143, 172, 192, 140, 156, 188, 99, 65, 69, 76, 16, 97, 109, 131, 251, 129, 144, 172, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 147, 175, 232, 140, 157, 188, 43, 0, 0, 0, 0, 100, 112, 134, 211, 126, 141, 169, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 78, 88, 26, 48, 52, 57, 60, 135, 150, 178, 254, 108, 121, 145, 83, 105, 118, 142, 76, 106, 119, 143, 201, 118, 133, 159, 122, 117, 129, 152, 25, 168, 176, 190, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      118, 128, 145, 3, 104, 117, 140, 92, 114, 127, 152, 180, 131, 147, 177, 237, 133, 149, 178, 249, 38, 42, 50, 222, 137, 152, 180, 249, 126, 142, 170, 182, 114, 128, 154, 182, 104, 117, 140, 227, 95, 107, 128, 238, 83, 93, 112, 248, 84, 95, 113, 239, 104, 117, 141, 180, 115, 129, 155, 93, 127, 140, 165, 4,
      98, 109, 130, 153, 109, 123, 147, 254, 145, 163, 195, 153, 138, 154, 182, 56, 115, 123, 138, 5, 92, 99, 109, 35, 134, 149, 177, 230, 0, 0, 0, 0, 0, 0, 0, 0, 120, 133, 159, 143, 135, 151, 181, 115, 86, 89, 93, 5, 41, 45, 51, 54, 40, 45, 53, 150, 107, 120, 144, 254, 122, 137, 164, 154,
      51, 57, 66, 147, 83, 93, 112, 255, 108, 121, 145, 159, 113, 126, 151, 62, 123, 136, 159, 8, 87, 93, 103, 35, 125, 141, 169, 230, 0, 0, 0, 0, 0, 0, 0, 0, 129, 143, 169, 143, 140, 156, 184, 115, 134, 147, 172, 8, 124, 138, 165, 60, 124, 139, 167, 155, 131, 147, 177, 255, 131, 147, 176, 153,
      64, 68, 73, 2, 36, 39, 45, 86, 41, 46, 54, 173, 60, 67, 80, 232, 75, 84, 101, 251, 89, 100, 120, 228, 105, 118, 142, 250, 110, 123, 148, 187, 118, 132, 158, 187, 126, 141, 169, 229, 134, 149, 177, 239, 136, 152, 179, 250, 136, 152, 181, 234, 139, 156, 186, 175, 130, 145, 173, 90, 124, 134, 151, 3,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 74, 79, 19, 60, 64, 73, 50, 92, 103, 124, 254, 86, 95, 111, 84, 90, 100, 117, 76, 126, 141, 168, 201, 113, 126, 150, 119, 99, 105, 117, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 105, 125, 231, 135, 151, 181, 46, 0, 0, 0, 0, 137, 154, 184, 212, 123, 137, 164, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 83, 98, 191, 133, 149, 179, 102, 111, 121, 139, 17, 134, 150, 180, 252, 126, 140, 166, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 48, 57, 132, 121, 136, 164, 197, 121, 135, 161, 115, 130, 146, 175, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 47, 52, 46, 87, 98, 118, 254, 126, 142, 170, 254, 124, 139, 166, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 57, 67, 118, 115, 128, 152, 170, 127, 140, 164, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

    image = IupImageRGBA(16, 16, imgdata);
    IupSetHandle("LogoTecgraf", image);
  }

  return image;
}
开发者ID:ivanceras,项目名称:iup-mirror,代码行数:29,代码来源:list2.c


示例13: TrayTest

void TrayTest(void)
{
  Ihandle *dlg, *img;

  img = IupImage(16, 16, pixmap);
  IupSetAttribute(img, "0", "BGCOLOR");
  IupSetAttribute(img, "1", "255 255 0");
  IupSetAttribute(img, "2", "255 0 0"); 
  IupSetAttribute(img, "3", "255 255 0");
  IupSetHandle ("img", img);

  dlg = IupDialog(NULL);

  IupSetAttribute(dlg, "TITLE", "Tray Test");
  IupSetAttribute(dlg, "TRAY", "YES");
  IupSetAttribute(dlg, "TRAYTIP", "Tip at Tray");
  IupSetAttribute(dlg, "TRAYIMAGE", "img");
  IupSetAttribute(dlg, "SIZE", "100x100");
  IupSetCallback(dlg, "TRAYCLICK_CB", (Icallback)trayclick);
  IupSetCallback(dlg, "CLOSE_CB", (Icallback)close_cb);
  IupSetCallback(dlg, "K_ESC", (Icallback)k_esc);

  IupShowXY(dlg, IUP_CENTER, IUP_CENTER);

  /* start only the task bar icon */
  IupSetAttribute(dlg, "HIDETASKBAR", "YES");  
}
开发者ID:Airr,项目名称:iup_mac,代码行数:27,代码来源:tray.c


示例14: 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


示例15: iDetachBoxCreateCursor

static void iDetachBoxCreateCursor(void)
{
  Ihandle *imgcursor;
  unsigned char detach_img_cur[16*16] = 
  {
    0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
    0,0,1,4,4,4,4,4,4,4,4,4,4,4,4,1,
    0,0,1,4,4,4,4,4,4,4,4,4,4,4,4,1,
    0,0,1,3,3,3,3,3,3,3,3,3,3,3,3,1,
    0,0,1,3,3,3,2,2,2,3,3,3,3,3,3,1,
    1,1,1,1,1,1,2,2,2,1,1,1,1,1,3,1,
    1,4,4,4,4,4,2,2,2,4,4,4,4,1,3,1,
    1,4,4,4,4,4,2,2,2,4,4,4,4,1,1,1,
    1,3,3,3,3,3,2,2,2,3,3,3,3,1,0,0,
    1,3,3,3,2,2,2,2,2,2,2,3,3,1,0,0,
    1,3,3,3,3,2,2,2,2,2,3,3,3,1,0,0,
    1,3,3,3,3,3,2,2,2,3,3,3,3,1,0,0,
    1,3,3,3,3,3,3,2,3,3,3,3,3,1,0,0,
    1,3,3,3,3,3,3,3,3,3,3,3,3,1,0,0,
    1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0
  };

  imgcursor = IupImage(16, 16, detach_img_cur);
  IupSetAttribute(imgcursor, "0", "BGCOLOR"); 
  IupSetAttribute(imgcursor, "1", "0 0 0"); 
  IupSetAttribute(imgcursor, "2", "110 150 255"); 
  IupSetAttribute(imgcursor, "3", "255 255 255"); 
  IupSetAttribute(imgcursor, "4", "64 92 255"); 
  IupSetHandle("IupDetachBoxCursor", imgcursor); 
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:30,代码来源:iup_detachbox.c


示例16: init_tree

/* Initializes IupTree and registers callbacks */
static void init_tree(void)
{
  Ihandle* tree = IupTree(); 

  IupSetCallback(tree, "EXECUTELEAF_CB", (Icallback) executeleaf_cb);
  IupSetCallback(tree, "RENAME_CB",      (Icallback) rename_cb);
  IupSetCallback(tree, "BRANCHCLOSE_CB", (Icallback) branchclose_cb);
  IupSetCallback(tree, "BRANCHOPEN_CB",  (Icallback) branchopen_cb);
  IupSetCallback(tree, "DRAGDROP_CB",    (Icallback) dragdrop_cb);
  IupSetCallback(tree, "RIGHTCLICK_CB",  (Icallback) rightclick_cb);
  IupSetCallback(tree, "K_ANY",          (Icallback) k_any_cb);
  IupSetCallback(tree, "SHOWRENAME_CB", (Icallback) showrename_cb);
  IupSetCallback(tree, "SELECTION_CB", (Icallback) selection_cb);
//  IupSetCallback(tree, "MULTISELECTION_CB", (Icallback) multiselection_cb);
//  IupSetCallback(tree, "MULTIUNSELECTION_CB", (Icallback) multiunselection_cb);
  IupSetCallback(tree, "GETFOCUS_CB", (Icallback) getfocus_cb);
  IupSetCallback(tree, "KILLFOCUS_CB", (Icallback) killfocus_cb);
  //IupSetCallback(tree, "ENTERWINDOW_CB", (Icallback) enterwindow_cb);
  //IupSetCallback(tree, "LEAVEWINDOW_CB", (Icallback)leavewindow_cb);
  //IupSetCallback(tree, "BUTTON_CB",    (Icallback)button_cb);
  //IupSetCallback(tree, "MOTION_CB",    (Icallback)motion_cb);
  IupSetCallback(tree, "NODEREMOVED_CB", (Icallback)noderemoved_cb);
  IupSetCallback(tree, "TOGGLEVALUE_CB", (Icallback)togglevalue_cb);
  IupSetCallback(tree, "TIPS_CB", (Icallback)tips_cb);

  IupSetCallback(tree, "HELP_CB", (Icallback)help_cb);

//  IupSetAttribute(tree, "FONT", "COURIER_NORMAL_14");
//  IupSetAttribute(tree, "FONTSIZE", "36");
  //  IupSetAttribute(tree, "FGCOLOR", "255 0 0");
//  IupSetAttribute(tree, "SPACING",   "10");
//  IupSetAttribute(tree, "BGCOLOR", "255 255 255");
//  IupSetAttribute(tree, "BGCOLOR", "128 0 255");

//  IupSetAttribute(tree, "MARKMODE",     "MULTIPLE");
//  IupSetAttribute(tree, "SHOWRENAME",   "YES");
  IupSetAttribute(tree, "SHOWDRAGDROP", "YES");
  IupSetAttribute(tree, "SHOWTOGGLE",   "YES");
//  IupSetAttribute(tree, "SHOWTOGGLE",   "3STATE");
//  IupSetAttribute(tree, "DROPEQUALDRAG", "YES");

  IupSetAttribute(tree, "ADDEXPANDED",  "YES");
//  IupSetAttribute(tree, "HIDELINES",    "YES");
//  IupSetAttribute(tree, "HIDEBUTTONS",    "YES");
//  IupSetAttribute(tree, "INDENTATION",   "40");
//  IupSetAttribute(tree, "CANFOCUS", "NO");
  IupSetAttribute(tree, "TIP", "Tree Tip");
//  IupSetAttribute(tree, "INFOTIP", "No");
  //  IupSetAttribute(tree, "TIPBGCOLOR", "255 128 128");
//  IupSetAttribute(tree, "TIPFGCOLOR", "0 92 255");

  // Windows Only  
//  IupSetAttribute(tree, "TIPBALLOON", "YES");
//  IupSetAttribute(tree, "TIPBALLOONTITLE", "Tip Title");
//  IupSetAttribute(tree, "TIPBALLOONTITLEICON", "2");

//  IupSetAttribute(tree, "ADDROOT", "NO");

  IupSetHandle("tree", tree);
}
开发者ID:DavidPhillipOster,项目名称:IupCocoa,代码行数:61,代码来源:tree.c


示例17: main

/* Main program */
int main(int argc, char **argv)
{
  Ihandle* dlg;
  Ihandle *tree1, *tree2;
  
  IupOpen(&argc, &argv);                  /* IUP initialization */

  IupSetGlobal("UTF8MODE", "Yes");

  tree1 = IupTree();
  IupSetHandle("tree1", tree1);
  
  tree2 = IupTree();
  IupSetHandle("tree2", tree2);

  //Generic DND
  //IupSetAttribute(tree1, "SHOWDRAGDROP", "YES");
  //IupSetAttribute(tree1, "DRAGTYPES", "TEXT,STRING");
  //Tree2Tree DND
  IupSetAttribute(tree1, "DRAGDROPTREE", "YES");
  //Common DND Attrib
  IupSetAttribute(tree1, "DRAGSOURCE", "YES");
  IupSetAttribute(tree1, "DRAGSOURCEMOVE", "YES");
  IupSetAttribute(tree1, "DRAGTYPES", "TREEBRANCH");

  //Generic DND
  //IupSetAttribute(tree2, "SHOWDRAGDROP", "YES");
  //IupSetAttribute(tree2, "DROPTYPES", "TEXT,STRING");  
  //Tree2Tree DND
  IupSetAttribute(tree2, "DRAGDROPTREE", "YES");
  //Common DND Attrib
  IupSetAttribute(tree2, "DROPTARGET", "YES");
  IupSetAttribute(tree2, "DROPTYPES", "TREEBRANCH");  
  
  init_dlg();                             /* Initializes the dialog */
  dlg = IupGetHandle("dlg");              /* Retrieves the dialog handle */
  IupShowXY(dlg, IUP_CENTER, IUP_CENTER); /* Displays the dialog */

  init_tree1_atributes();                 /* Initializes attributes, can be done here or anywhere */
  init_tree2_atributes();                 /* Initializes attributes, can be done here or anywhere */

  IupMainLoop();                          /* Main loop */
  IupClose();                             /* Ends IUP */

  return EXIT_SUCCESS;

}
开发者ID:defdef,项目名称:iup,代码行数:48,代码来源:treednd.c


示例18: SetHandle

static int SetHandle(lua_State *L)
{
  const char *name = luaL_checkstring(L,1);
  Ihandle *ih = iuplua_checkihandle(L,2);
  Ihandle *last = IupSetHandle(name, ih);
  iuplua_pushihandle(L, last);
  return 1;
}
开发者ID:LuaDist,项目名称:iup,代码行数:8,代码来源:iuplua_api.c


示例19: create_images

static void create_images(void)
{
  Ihandle *image; 

  image = IupImage(11, 11, pixmap_x);
  IupSetAttribute(image, "0", "BGCOLOR");
  IupSetAttribute(image, "1", "0 1 0");
  IupSetAttribute(image, "2", "255 0 0"); 
  IupSetAttribute(image, "3", "255 255 0");
  IupSetHandle("DLG_ICON", image);

  image = IupImage(32, 32, pixmap_cursor);
  IupSetAttribute(image, "0", "BGCOLOR");  /* always for cursor */
  IupSetAttribute(image, "1", "255 0 0"); 
  IupSetAttribute(image, "2", "128 0 0"); 
  IupSetAttribute(image, "HOTSPOT", "21:10");
  IupSetHandle("DLG_CURSOR", image);
}
开发者ID:Airr,项目名称:iup_mac,代码行数:18,代码来源:dialog.c


示例20: main

/* Main program */
int main(int argc, char **argv)
{
    /* IUP identifiers */
    Ihandle *dlg;
    Ihandle *img_star;
    Ihandle *lbl, *lbl_explain, *lbl_star;

    /* Initializes IUP */
    IupOpen(&argc, &argv);

    /* Program begin */

    /* Creates the star image */
    img_star = IupImage ( 13, 13, pixmap_star );

    /* Sets star image colors */
    IupSetAttribute ( img_star, "1", "0 0 0");
    IupSetAttribute ( img_star, "2", "0 198 0");

    /* Associates "img_star" to image img_star */
    IupSetHandle ( "img_star", img_star );


    /* Creates a label */
    lbl = IupLabel ( "This label has the following attributes set:\nBGCOLOR = 255 255 0\nFGCOLOR = 0 0 255\nFONT = COURIER_NORMAL_14\nTITLE = All text contained here\nALIGNMENT = ACENTER" );

    /* Sets all the attributes of label lbl, except for IMAGE */
    IupSetAttributes ( lbl, "BGCOLOR = \"255 255 0\", FGCOLOR = \"0 0 255\", FONT = COURIER_NORMAL_14, ALIGNMENT = ACENTER");

    /* Creates a label to explain that the label on the right has an image */
    lbl_explain = IupLabel ( "The label on the right has the image of a star" );

    /* Creates a label whose title is not important, cause it will have an image */
    lbl_star = IupLabel (NULL);

    /* Associates image "img_star" with label lbl_star */
    IupSetAttribute ( lbl_star, "IMAGE", "img_star" );

    /* Creates dialog with the label */
    dlg = IupDialog ( IupVbox ( lbl, IupHbox ( lbl_explain, lbl_star, NULL ), NULL ) );

    /* Sets title of the dialog */
    IupSetAttribute ( dlg, "TITLE", "IupLabel Example" );

    /* Shows dialog in the center of the screen */
    IupShowXY ( dlg, IUP_CENTER, IUP_CENTER );

    /* Initializes IUP main loop */
    IupMainLoop();

    /* Finishes IUP */
    IupClose();

    /* Program finished successfully */
    return EXIT_SUCCESS;

}
开发者ID:sanikoyes,项目名称:iup,代码行数:58,代码来源:label.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ IupSetfAttribute函数代码示例发布时间:2022-05-30
下一篇:
C++ IupSetCallback函数代码示例发布时间: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