Author Topic: Exploring Iup Library version 3.14  (Read 7269 times)

0 Members and 1 Guest are viewing this topic.

Arnold

  • Guest
Exploring Iup Library version 3.14
« on: May 15, 2015, 09:03:16 AM »
Hello,

I have started to explore the Iup toolkit version 3.14 with OxygenBasic. As using the header files alone did not work as expected - probably because of my lack of experience with the C language - I used the syntax of OxygenBasic. Although I am far away from being finished with anything the results so far look very promising. Not all the functions of the library seem to work with Oxygenbasic (I suppose because o2h is a JIT compiler). While this must be checked I think not every function is necessary or there is an alternative way, or my declarations are wrong.

For testing I used some dlls of the dynamic 32bit libraries of Mingw and VC10 (Iup-3.14 and cd-5.8.2) which are attached and which can be downloaded at Sourceforge.net. The dlls for VC10 are dependent on MSVCR100.DLL, which I found in \system32 of my Windows Vista. The dlls of Mingw should work with all versions of Windows.

To run the demos the dlls must be copied to the path of Oxygenbasic (where Oxygen.dll is located), or the path of the dlls must be added to the path environment.

This project will keep me busy for the near future.

Roland

Edit:

I have splitted the files and separated the dlls and the code of the examples. The complete packages (iup-3.14_Win32_dllw4_lib.zip + cd-5.8.2_Win32_dllw4_lib.zip for Mingw dlls respectively up-3.14_Win32_dll10_lib.zip + cd-5.8.2_Win32_dll1_lib.zip for VC 10) can be downloaded at Sourceforge.net.

Included with the source code is a batch file to run the demos and examples.

.
« Last Edit: May 30, 2015, 08:38:41 AM by Arnold »

Arnold

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #1 on: May 15, 2015, 09:05:00 AM »
Hi Charles,

it seems that I cannot use in Iup.inc neither:

librarypath "../dll/"
extern lib "iup.dll" cdecl

nor:

librarypath "c:\Iup_3.14/dll/"
extern lib "iup.dll" cdecl


Is something wrong with this notation? There is a dependence between iupcontrols.dll and the other dlls. In order to open these files I have to copy them into \Oxygenbasic\ or add the directory of the dlls to the path environment. I can live with this, but if one of the above options would be possible this would be more elegant. I only had to rename dll32_mingw or dll32_VC10 in iup.inc to compare the libraries.


Roland

JRS

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #2 on: May 15, 2015, 09:18:26 AM »
Hi Arnold,

Here is an IUP example running in Script BASIC. Charles has spent time with IUP getting it to work in a threaded mode with DLLC. I think it's one of the best portable / cross platform user interfaces out there.

John



Arnold

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #3 on: May 15, 2015, 11:29:51 AM »
Hi John,

is the code for creating the form available? I would like to see if it works with Oxygenbasic too.

BTW I noticed that you also published the code for a cbox test.
This is the link

Does expanding the tree work with you? With me it does not so I have not included this example with the zip file. This is the code of cbox.o2bas at the moment assuming the same location as sample.o2bas:

Code: OxygenBasic
  1. include "include\iup.inc"
  2. include "include\iupcontrols.inc"
  3.  
  4. cr=chr(13,10)
  5.  
  6. byte img_bits1[] =>
  7. {
  8.  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1
  9. ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1
  10. ,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1
  11. ,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1
  12. ,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1
  13. ,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1
  14. ,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1
  15. ,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1
  16. ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  17. ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,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,0,0,0,3,3,3,3,3,3,3,3,3
  66. ,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
  67. ,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
  68. ,2,2,2,2,2,2,2,3,3,3,3,3,3,3,1,1,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2
  69. ,2,2,2,2,2,2,3,3,3,3,3,3,3,3,1,1,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2
  70. ,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2
  71. ,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  72. ,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  73. ,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  74. ,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  75. ,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  76. };
  77.  
  78.  
  79. function create_mat() as sys
  80.  
  81.   sys mat = IupMatrix(NULL);
  82.  
  83.   IupSetStrAttribute(mat, "NUMCOL", "1");
  84.   IupSetStrAttribute(mat, "NUMLIN", "3");
  85.   IupSetStrAttribute(mat, "NUMCOL_VISIBLE", "1");
  86.   IupSetStrAttribute(mat, "NUMLIN_VISIBLE", "3");
  87.   IupSetStrAttribute(mat, "EXPAND", "NO");
  88.   IupSetStrAttribute(mat, "SCROLLBAR", "NO");
  89.  
  90.   IupSetStrAttribute(mat, "0:0", "Inflation");
  91.   IupSetStrAttribute(mat, "1:0", "Medicine ");
  92.   IupSetStrAttribute(mat, "2:0", "Food");
  93.   IupSetStrAttribute(mat, "3:0", "Energy");
  94.   IupSetStrAttribute(mat, "0:1", "January 2000");
  95.   IupSetStrAttribute(mat, "1:1", "5.6");
  96.   IupSetStrAttribute(mat, "2:1", "2.2");
  97.   IupSetStrAttribute(mat, "3:1", "7.2");
  98.  
  99.   IupSetStrAttribute(mat,"BGCOLOR","255 255 255");
  100.   IupSetStrAttribute(mat,"BGCOLOR1:0","255 128 0");
  101.   IupSetStrAttribute(mat,"BGCOLOR2:1","255 128 0");
  102.   IupSetStrAttribute(mat,"FGCOLOR2:0","255 0 128");
  103.   IupSetStrAttribute(mat,"FGCOLOR1:1","255 0 128");
  104.  
  105.   IupSetStrAttribute(mat,"CX","600");
  106.   IupSetStrAttribute(mat,"CY","250");
  107.  
  108.   return mat;
  109. end function
  110.  
  111. function createtree() as sys
  112.  
  113.   sys tree = IupTree();
  114. /*  IupSetAttributes(tree, "FONT=COURIER_NORMAL_10, \
  115.                           NAME=Figures, \
  116.                           ADDBRANCH=3D, \
  117.                           ADDBRANCH=2D, \
  118.                           ADDLEAF1=trapeze, \
  119.                           ADDBRANCH1=parallelogram, \
  120.                           ADDLEAF2=diamond, \
  121.                           ADDLEAF2=square, \
  122.                           ADDBRANCH4=triangle, \
  123.                           ADDLEAF5=scalenus, \
  124.                           ADDLEAF5=isosceles, \
  125.                           ADDLEAF5=equilateral, \
  126.                           RASTERSIZE=180x180, \
  127.                           VALUE=6, \
  128.                           CTRL=ON, \
  129.                           SHIFT=ON, \
  130.                           CX=600, \
  131.                           CY=10, \
  132.                           ADDEXPANDED=NO");
  133. */
  134.  
  135. IupSetStrAttribute(tree, "FONT", "COURIER_NORMAL_12")
  136. IupSetStrAttribute(tree, "NAME", "Figures")
  137. IupSetStrAttribute(tree, "ADDBRANCH", "3D")
  138. IupSetStrAttribute(tree, "ADDBRANCH", "2D")
  139. IupSetStrAttribute(tree, "ADDLEAF1", "trapeze")
  140. IupSetStrAttribute(tree, "ADDBRANCH1", "parallelogram")
  141. IupSetStrAttribute(tree, "ADDLEAF2", "diamond")
  142. IupSetStrAttribute(tree, "ADDLEAF2", "square")
  143. IupSetStrAttribute(tree, "ADDBRANCH4", "triangle")
  144. IupSetStrAttribute(tree, "ADDLEAF5", "scalenus")
  145. IupSetStrAttribute(tree, "ADDLEAF5", "isosceles")
  146. IupSetStrAttribute(tree, "ADDLEAF5", "equilateral")
  147. IupSetStrAttribute(tree, "RASTERSIZE", "180x180")
  148. IupSetStrAttribute(tree, "VALUE", "6")
  149. IupSetStrAttribute(tree, "CTRL", "ON")
  150. IupSetStrAttribute(tree, "SHIFT", "ON")
  151. IupSetStrAttribute(tree, "CX", "600")
  152. IupSetStrAttribute(tree, "CY", "10")
  153. IupSetStrAttribute(tree, "ADDEXPANDED", "YES")
  154.    
  155.   return tree;
  156. end function
  157.  
  158. sub func_1 ()
  159.  
  160.   sys _cbox, _cnv_1, dlg, img,
  161.     _frm_1, _frm_2, _frm_3, hbox, _ctrl_1,
  162.     _list_1, _list_2, _list_3, _text_1, _ml_1;
  163.  
  164.   img = IupImage(32,32, @img_bits1);
  165.   IupSetHandle ("img1", img);
  166.   IupSetStrAttribute (img, "0", "0 0 0");
  167.   IupSetStrAttribute (img, "1", "BGCOLOR");
  168.   IupSetStrAttribute (img, "2", "255 0 0");
  169.  
  170.   img = IupImage(32,32, @img_bits2);
  171.   IupSetHandle ("img2", img);
  172.   IupSetStrAttribute (img, "0", "0 0 0");
  173.   IupSetStrAttribute (img, "1", "0 255 0");
  174.   IupSetStrAttribute (img, "2", "BGCOLOR");
  175.   IupSetStrAttribute (img, "3", "255 0 0");
  176.  
  177.   _frm_1 = IupFrame(
  178.     IupVbox(
  179.       IupSetAttributes(IupButton("Button Text", NULL), "CINDEX=1"),
  180.       IupSetAttributes(IupButton("", NULL), "IMAGE=img1,CINDEX=2"),
  181.       IupSetAttributes(IupButton("", NULL), "IMAGE=img1,IMPRESS=img2,CINDEX=3"),
  182.       NULL));
  183.   IupSetStrAttribute(_frm_1,"TITLE","IupButton");
  184.   IupSetStrAttribute(_frm_1,"CX","10");
  185.   IupSetStrAttribute(_frm_1,"CY","180");
  186.  
  187.   _frm_2 = IupFrame(
  188.     IupVbox(
  189.       IupSetAttributes(IupLabel("Label Text"), "CINDEX=1"),
  190.       IupSetAttributes(IupLabel(""), "SEPARATOR=HORIZONTAL,CINDEX=2"),
  191.       IupSetAttributes(IupLabel(""), "IMAGE=img1,CINDEX=3"),
  192.       NULL));
  193.   IupSetStrAttribute(_frm_2,"TITLE","IupLabel");
  194.   IupSetStrAttribute(_frm_2,"CX","200");
  195.   IupSetStrAttribute(_frm_2,"CY","250");
  196.  
  197.   _frm_3 = IupFrame(
  198.     IupVbox(
  199.       IupSetAttributes(IupToggle("Toggle Text", NULL), "VALUE=ON,CINDEX=1"),
  200.       IupSetAttributes(IupToggle("", NULL), "IMAGE=img1,IMPRESS=img2,CINDEX=2"),
  201.       IupSetAttributes(IupFrame(IupRadio(IupVbox(
  202.         IupSetAttributes(IupToggle("Toggle Text", NULL), "CINDEX=3"),
  203.         IupSetAttributes(IupToggle("Toggle Text", NULL), "CINDEX=4"),
  204.         NULL))), "TITLE=IupRadio"),
  205.       NULL));
  206.   IupSetStrAttribute(_frm_3,"TITLE","IupToggle");
  207.   IupSetStrAttribute(_frm_3,"CX","400");
  208.   IupSetStrAttribute(_frm_3,"CY","250");
  209.  
  210.   _text_1 = IupText( NULL);
  211.   IupSetStrAttribute(_text_1,"VALUE","IupText Text");
  212.   IupSetStrAttribute(_text_1,"SIZE","80x");
  213.   IupSetStrAttribute(_text_1,"CINDEX","1");
  214.   IupSetStrAttribute(_text_1,"CX","10");
  215.   IupSetStrAttribute(_text_1,"CY","100");
  216.  
  217.   _ml_1 = IupMultiLine( NULL);
  218.   IupSetStrAttribute(_ml_1,"VALUE","IupMultiline Text" & cr & "Second Line" & cr & "Third Line" & cr);
  219.   IupSetStrAttribute(_ml_1,"SIZE","80x60");
  220.   IupSetStrAttribute(_ml_1,"CINDEX","1");
  221.   IupSetStrAttribute(_ml_1,"CX","200");
  222.   IupSetStrAttribute(_ml_1,"CY","100");
  223.  
  224.   _list_1 = IupList( NULL);
  225.   IupSetStrAttribute(_list_1,"VALUE","1");
  226.   IupSetStrAttribute(_list_1,"1","Item 1 Text");
  227.   IupSetStrAttribute(_list_1,"2","Item 2 Text");
  228.   IupSetStrAttribute(_list_1,"3","Item 3 Text");
  229.   IupSetStrAttribute(_list_1,"CINDEX","1");
  230.   IupSetStrAttribute(_list_1,"CX","10");
  231.   IupSetStrAttribute(_list_1,"CY","10");
  232.  
  233.   _list_2 = IupList( NULL);
  234.   IupSetStrAttribute(_list_2,"DROPDOWN","YES");
  235.   IupSetStrAttribute(_list_2,"VALUE","2");
  236.   IupSetStrAttribute(_list_2,"1","Item 1 Text");
  237.   IupSetStrAttribute(_list_2,"2","Item 2 Text");
  238.   IupSetStrAttribute(_list_2,"3","Item 3 Text");
  239.   IupSetStrAttribute(_list_2,"CINDEX","2");
  240.   IupSetStrAttribute(_list_2,"CX","200");
  241.   IupSetStrAttribute(_list_2,"CY","10");
  242.  
  243.   _list_3 = IupList( NULL);
  244.   IupSetStrAttribute(_list_3,"EDITBOX","YES");
  245.   IupSetStrAttribute(_list_3,"VALUE","3");
  246.   IupSetStrAttribute(_list_3,"1","Item 1 Text");
  247.   IupSetStrAttribute(_list_3,"2","Item 2 Text");
  248.   IupSetStrAttribute(_list_3,"3","Item 3 Text");
  249.   IupSetStrAttribute(_list_3,"CINDEX","3");
  250.   IupSetStrAttribute(_list_3,"CX","400");
  251.   IupSetStrAttribute(_list_3,"CY","10");
  252.  
  253.   _cnv_1 = IupCanvas( NULL);
  254.   IupSetStrAttribute(_cnv_1,"RASTERSIZE","100x100");
  255.   IupSetStrAttribute(_cnv_1,"POSX","0");
  256.   IupSetStrAttribute(_cnv_1,"POSY","0");
  257.   IupSetStrAttribute(_cnv_1,"BGCOLOR","128 255 0");
  258.   IupSetStrAttribute(_cnv_1,"CX","400");
  259.   IupSetStrAttribute(_cnv_1,"CY","150");
  260.  
  261.   _ctrl_1 = IupVal(NULL);
  262.   IupSetStrAttribute(_ctrl_1,"CX","600");
  263.   IupSetStrAttribute(_ctrl_1,"CY","200");
  264.  
  265.   _cbox = IupCbox(
  266.     _text_1,
  267.     _ml_1,
  268.     _list_1,
  269.     _list_2,
  270.     _list_3,
  271.     _cnv_1,
  272.     _ctrl_1,
  273.     createtree(),
  274.     create_mat(),
  275.     _frm_1,
  276.     _frm_2,
  277.     _frm_3,
  278.     NULL);
  279.   IupSetStrAttribute(_cbox,"SIZE","480x200");
  280.  
  281.   hbox = IupSetAttributes(IupHbox(_cbox, NULL), "MARGIN=10x10");
  282.  
  283.   dlg = IupDialog(hbox);
  284.   IupSetHandle("dlg",dlg);
  285.   IupSetStrAttribute(dlg,"TITLE","Cbox Test");
  286. end sub
  287.  
  288. sub main()
  289.  
  290.   IupOpen(0,0)      
  291.   IupControlsOpen();      
  292.   func_1();
  293.   IupShowXY(IupGetHandle("dlg"),IUP_CENTER,IUP_CENTER);
  294.   IupMainLoop();
  295.   IupClose();  
  296.  
  297. end sub
  298.  
  299.  
  300. main()
  301.  

I do not know if something is wrong with IupTree. But the form looks like yours.


Roland

JRS

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #4 on: May 15, 2015, 11:46:17 AM »
The tree control requires a callback that isn't part of the demo is my guess. (missing undone code) I encourage you to continue with your IUP and O2 aspirations and will assist the best I can.

Charles Pegge

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #5 on: May 15, 2015, 08:16:26 PM »
Hi Roland,

Your notation is correct, and I tried various librarypath locations using one of the demos, which only require iup.dll. I also tried a dotted pathname: librarypath "IUP_A.1/dll/". No problems encountered.

So it might be caused by dlls loading dlls, whereby the location is assumed to be at the execution path.

JRS

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #6 on: May 15, 2015, 08:45:25 PM »
Arnold,

In the IUP tools download there are Windows resources that will give you theme support so the forms don't look they are running on Windows 2000.


Arnold

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #7 on: May 16, 2015, 01:34:46 AM »
Hi John,

you found one of my many weak points. Although I noticed this term all the time I did not pay attention to Windows themes. Is there a link anywhere with some information about the purpose of themes and how to create them?

Roland

Arnold

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #8 on: May 16, 2015, 01:36:51 AM »
Hi Charles,

maybe this is OS-specific. I use other applications where I have to add the directory in the path environment too in order to get them work or they do some changes in the registry. So I do not consider this as a real problem, I only wanted to ask. Using libraypath with a single independent dll works in any case.

Roland

Charles Pegge

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #9 on: May 16, 2015, 02:56:16 AM »
Librarypath is rarely used but it works in a similar way to includepath

JRS

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #10 on: May 16, 2015, 09:34:13 AM »
FWIW: I have always but my IUP DLL's (excluding Lua) in the Windows system32 default directory (on XP) and everything just seems to work. Under Linux, there are install scripts for both runtime and development.

Arnold

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #11 on: May 16, 2015, 04:01:19 PM »
Hi John,

the first time I did this too. But as I want to compare the dlls of mingw and VC10 - the files I will need are included in the zip file above - I now add / change the path of the dlls in the Control Panel / User account in Windows and keep system32 untouched. It would also suffice to copy the dlls into the folder of Oxygenbasic.

At the moment I am trying some more tests and examples of the Iup library to run with Oxygenbasic. It is amazing how much already works with only minor changes. Although I am in the early stages I am quite confident about the further development.

Roland

JRS

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #12 on: May 16, 2015, 04:08:57 PM »
Thanks for the update and great to hear you are enjoying IUP. It didn't take long for me to get hooked.  :)

Arnold

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #13 on: May 30, 2015, 08:42:21 AM »
Hello,

I have updated and splitted the zip files for IUP 3.14 in my first message. As I do not know if MSVCR100.DLL is provided with all Windows OS. I also added the dlls build with Mingw. Also added a batch file for running the demos. In the folder Oxygendemos I inserted the demos of \projectsB\Iup.

It is already possible to use some nice features of IUP 3.14 with OxygenBasic. Some more features are expected to come. The main purpose would be to add some more powerful helper functions like "create" and "addChild". The most interesting part will then be to adapt the demos to use the C header files directly.

Roland


.

JRS

  • Guest
Re: Exploring Iup Library version 3.14
« Reply #14 on: May 30, 2015, 10:58:20 AM »
FYI: I think I found a bug in the IUP coordinate initialization on creation of containers/windows. When threading IUP the problem became more apparent and would cause core dumps and seg faults randomly on consecutive runs. Antonio is looking into it. I just wanted to mention if your dialogs aren't being sized correctly on startup, it's not you.

BTW: Addition dialogs created after the first don't seem to be affected. Once IUP hits its event que, the problem seems to be masked.

All theory and just a guess at this point. Here is my evidence. Creating a Gtk dialog with BaCon / HUG didn't have the same problem which means my Gtk 3 install is still good.

.