[Iup-users] Minor problem with IupPlotInsert/AXS_YMAX/AXS_YAUTOMAX after empty dataset.

2017-08-08 Thread Pete Lomax via Iup-users
Adding values via IupPlotInsert does not update AXS_YMAX under AXS_YAUTOMAX 
properly, in one case.
I have four tabs, each with a plot of 7 datasets on it, updated dynamically (it 
looks for the previously quickest and extends that set).
The AXS_YAUTOMAX works fine on tabs 2..4, just not on the first tab. In that 
case I'm not adding anything to dataset 4, which I have
realised is causing the problem, and have fixed things by invoking 
IupPlotInsert on tab1/set4 with the equivalent of {0,0} in setup.

My question is, should IupPlotInsert for datasets 5..7 set AXS_YMAX when 
dataset 4 is empty?

Since I have a workaround, I'm perfectly happy - just thought you should know 
about this.

Pete

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] Silence Alt-keys

2017-11-30 Thread Pete Lomax via Iup-users
Does anyone know how to silence Alt keys? I have tried returning IUP_IGNORE 
from K_ANY, KEYPRESS_CB, GLOBALKEYPRESS_CB, and K_mC but it still sounds the 
bell, unless there is a matching accelerator key on a menu, mind you I also 
want to be able to process keys such as Alt + ',' (and I have tried K_mComma 
too).

Pete

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] Possible bug in IupReparent or IupLayoutDialog

2017-11-25 Thread Pete Lomax via Iup-users
For information only. I am still using 3.21, apologies if this is already fixed.

I am writing something not dissimilar to IupLayoutDialog, though in my version 
the hidden
IupBackgroundBox of an IupExpander is genuinely hidden, and I fixed this 
problem by quietly
fetching that and dropping as a sibling.

In sample.c, add an IupExpander to the content of _frm_3, and an 
IupLayoutDialog, then
drag the IupVbox out of _frm_3 into the IupVbox of _frm_2. Now, if you drag it 
back to be a
sibling of the IupBackgroundBox it works fine, but IupReparent crashed if I 
dragged it onto
the IupExpander itself. Personally I think that IupReparent should just quietly 
refuse, but you
may prefer to add code to IupLayoutDialog (as I kinda did). I didn't 
investigate any further.

Pete

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] 7GUIs GUI comparison

2017-11-20 Thread Pete Lomax via Iup-users
All seven Phix/pGUI samples can now be found in demo\rosetta\7guis at 
https://bitbucket.org/petelomax/phix/src or try this direct link:
 
https://bitbucket.org/petelomax/phix/src/51b43e4434275f263306583ccaebc837bbf78104/demo/rosetta/7guis/?at=default

Permission granted to copy/reuse/whatever, they're all in the public domain.

Feedback welcome, especially regarding the "separation of concerns" aspect - as 
in how might one reorganise to best emulate it?

Pete

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] 7GUIs GUI comparison

2017-11-18 Thread Pete Lomax via Iup-users
Challenge accepted, I am going to do Phix/pGUI.


On Fri, 17/11/17, Eric Wing  wrote:

 Subject: [Iup-users] 7GUIs GUI comparison
 To: "IUP discussion list." 
 Date: Friday, 17 November, 2017, 1:19
 
 I saw this on HackerNews or Reddit
 yesterday.
 https://github.com/eugenkiss/7guis/wiki
 
 Its origins are from a research paper
 that compares the objected
 oriented and functional programming for
 GUI design.
 http://www.eugenkiss.com/projects/thesis.pdf
 
 While that falls outside the scope of
 what IUP cares about, I did
 think the 7 GUI "benchmark" was an
 interesting and potentially useful
 idea. To help spread the word about
 IUP, I think it could be useful to
 people to see a comparison of common
 basic GUI patterns written in
 different libraries.
 
 Such a list would allow:
 - People to learn about libraries they
 may have not heard of before
 (IUP is relatively unknown compared to,
 say, Qt.)
 - See examples of code/how it is done.
 - Help those thinking about migrating
 from one library they currently
 know to a new one.
 
 
 Anyway, I thought I would mention it in
 case anybody here would like
 to pick up the challenge and try
 writing an IUP version for those 7.
 Presumably and optionally, that page
 and examples could be forked to
 become a simple comparison page instead
 of focusing on the OO vs.
 functional thing.
 
 Thanks,
 Eric
 
 --
 Check out the vibrant tech community on
 one of the world's most
 engaging tech sites, Slashdot.org! http://sdm.link/slashdot
 ___
 Iup-users mailing list
 Iup-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/iup-users
 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] Fw: Re: Silence Alt-keys

2017-12-01 Thread Pete Lomax via Iup-users
Well, if nothing at all handles a specific keystroke, that is correct. However, 
I **did** handle it, just can't figure out how to say that I have.
 
Pete
> 
> On Fri, 1/12/17, Antonio Scuri <antonio.sc...@gmail.com>
> wrote:
> 
>  Subject: Re: [Iup-users] Silence
> Alt-keys
>  To: "Pete Lomax" <petelo...@ymail.com>,
> "IUP discussion list." <iup-users@lists.sourceforge.net>
>  Date: Friday, 1 December, 2017, 16:29
>  
>   
>  That's the default behavior in any
> application. The
>  system rings a bell exactly to notify
> the user that it is a
>  hot key that does nothing.
>    You can try that in Word, Excel,
>  Notepad, etc...
>  Best,Scuri
>  
>  2017-11-30 22:20 GMT-02:00
>  Pete Lomax via Iup-users <iup-users@lists.sourceforge.net>:
>  Does
>  anyone know how to silence Alt keys? I
> have tried returning
>  IUP_IGNORE from K_ANY, KEYPRESS_CB,
> GLOBALKEYPRESS_CB, and
>  K_mC but it still sounds the bell,
> unless there is a
>  matching accelerator key on a menu,
> mind you I also want to
>  be able to process keys such as Alt +
> ',' (and I
>  have tried K_mComma too).
>  
>  
>  
>  Pete
>  
>  
>  
>  --
>  --
> --
>  
>  Check out the vibrant tech community
> on one of the
>  world's most
>  
>  engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>  
>  __
> _
>  
>  Iup-users mailing list
>  
>  Iup-users@lists.sourceforge.
>  net
>  
>  https://lists.sourceforge.net/
>  lists/listinfo/iup-users
>  
>  
>  

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] Fw: Re: Silence Alt-keys

2017-12-01 Thread Pete Lomax via Iup-users
Hi,
There is no problem with Alt-F1, or Alt-Home/End/Left/Right etc, but for Alt-X 
and Alt-, both IUP_DEFAULT and IUP_IGNORE sound the bell.

I should perhaps say this is probably a Windows-only problem. The code I am 
translating, from a win32-only gui, apparently solves the problem by 
(explicitly) returning 0 to WM_SYSCHAR, and not calling DefWindowProc(), and in 
fact I just changed it to (explicitly) carry on and invoke DefWindowProc() and 
lo and behold the bell came right back, just like it is on IUP.  Looking at the 
source code of IUP, in iupwinKeyEvent I see if (result == IUP_IGNORE) return 0; 
but I'm guessing that somehow fails to avoid carrying on into a DefWindowProc() 
somewhere?
 
Pete

> 
> On Fri, 1/12/17, Ranier VF <ranier_...@hotmail.com>
> wrote:
> 
>  Subject: Re: [Iup-users] Silence
> Alt-keys
>  To: "Pete Lomax" <petelo...@ymail.com>,
> "IUP discussion list." <iup-users@lists.sourceforge.net>
>  Date: Friday, 1 December, 2017, 12:33
>  
>  Hi,
>  Can you
>  try:
>  case K_mF1:
>         
>   return IUP_DEFAULT;
>           break;
>  
>  According with IUP online
>  help:
>  If returns IUP_DEFAULT the key is
>  processed but it is not propagated. 
>  
>  If key is processed, maybe solve your
> case.
>  
>  Best,
>  
>  Ranier Vilela
> 
> 
>  De: Pete Lomax via Iup-users <iup-users@lists.sourceforge.net>
>  Enviado: sexta-feira, 1 de dezembro de
> 2017
>  00:20
>  Para: iup-users@lists.sourceforge.net
>  Cc:
>  Pete Lomax
>  Assunto: [Iup-users] Silence
>  Alt-keys
>  
>  Does anyone know
>  how to silence Alt keys? I have tried
> returning IUP_IGNORE
>  from K_ANY, KEYPRESS_CB,
> GLOBALKEYPRESS_CB, and K_mC but it
>  still sounds the bell, unless there is
> a matching
>  accelerator key on a menu, mind you I
> also want to be able
>  to process keys such as Alt + ',' (and
> I have tried
>  K_mComma too).
>  
>  Pete
>  
> 
> --
>  Check out the vibrant tech community
> on one of
>  the world's most
>  engaging tech sites,
>  Slashdot.org! http://sdm.link/slashdot
> 
> ___
>  Iup-users mailing list
>  Iup-users@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/iup-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] Silence Alt keys

2017-12-21 Thread Pete Lomax via Iup-users
I have finally figured out a solution (this is written in Phix, btw):

In key_cb:
if alt and find(base,"BCDILUX") then
string Yelp = ""
Yelp[2] = base
IupSetStrAttribute(main_help_menu,"TITLE",Yelp)
reset_help = true
end if


In main_help_menu_open_cb:
if reset_help then
reset_help = false
IupSetAttribute(main_help_menu,"TITLE","")
IupSetInt(main_help_menu,"ACTIVE",false)
IupSetInt(reset_help_timer,"RUN",true)
end if

In reset_help_cb (via reset_help_timer):
IupSetInt(main_help_menu,"ACTIVE",true)
IupSetInt(reset_help_timer,"RUN",false)
--  IupSetFocus(canvas) -- does not work
--  IupSetGlobal("KEY",K_ESC)   -- does not work
if dumwin=NULL then dumwin=IupDialog(NULL) end if
IupShow(dumwin)
IupHide(dumwin)

The last two lines do produce a minor blip, but I can live with that.

My question is whether IupSetFocus and/or IupSetGlobal("KEY") should work 
in these circumstances (instead of dumwin)?

Pete

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] CID 210573 (#1 of 1): Dereference after null check (FORWARD_NULL)

2018-01-19 Thread Pete Lomax via Iup-users
On Fri, 19/1/18, Antonio Scuri  wrote:

>then they are equal and not NULL at:
>      
>     (afunc->call_global_default && 
> iupGlobalDefaultColorChanged(afunc->default_value)))

By that logic you could/should/may as well change it to:

     (afunc->default_value && 
iupGlobalDefaultColorChanged(afunc->default_value)))

Is that what you did?

Pete

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] CID 210519 (#1 of 1): Logically dead code (DEADCODE)

2018-01-19 Thread Pete Lomax via Iup-users
perhaps inNames should be made static?


On Fri, 19/1/18, Ranier VF  wrote:

 Subject: [Iup-users] CID 210519 (#1 of 1): Logically dead code (DEADCODE)
 To: "IUP discussion list." 
 Date: Friday, 19 January, 2018, 2:37
 
 Hi,
 Issue found by Coverity Scan.
 CID 210519 (#1 of 1): Logically dead
 code (DEADCODE)
 dead_error_line: Execution cannot reach
 this statement: iupArrayDestroy(inNames);
 
 ---
 a\srcmglplot\iup_mglplot.cpp    Mon Oct 17
 16:08:46 2016
 +++
 b\srcmglplot\iup_mglplot.cpp    Fri Jan 19
 00:36:40 2018
 @@ -4038,10 +4038,9 @@
  
    if (inName)
    {
 -    Iarray* inNames = NULL;
 +    Iarray* inNames;
      if (sample_index == 0)
      {
 -      if (inNames)
 iupArrayDestroy(inNames);
        inNames = 
 iupArrayCreate(10, sizeof(char*));
        iupAttribSet(ih,
 "_IUP_MGLPLOT_NAMES", (char*)inNames);
      }
 
 Best.
 
Ranier--
 Check out the vibrant tech community on one of the world's
 most
 engaging tech sites, Slashdot.org! 
http://sdm.link/slashdot___
 Iup-users mailing list
 Iup-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/iup-users
 
 -Inline Attachment Follows-
 
 
 -Inline Attachment Follows-
 
 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] About using IUP.Text:action in Lua

2018-01-16 Thread Pete Lomax via Iup-users
Hi there Hernan,
You might want to visit https://bitbucket.org/petelomax/phix/src and then click 
on demo, rosetta, 7guis

Although written in a different language, all 7 entries are completed.

The temperature converter is named Converter.exw, and I used the valuechanged 
callback to achieve the desired effect.

Regards,
Pete


On Wed, 17/1/18, Hernan Cano  wrote:

 Subject: [Iup-users] About using IUP.Text:action in Lua
 To: "IUP discussion list." 
 Date: Wednesday, 17 January, 2018, 5:06
 
 Hi,
 Antonio and friends.In
 the attached file, I show an example of a form in Lua
 language using the IUP gui.The
 needing is that with every key pressed in the first textbox
 some calculations be made and the result must be shown in
 the second textbox.The
 problem that I found is that it the answer is showed
 lately... this means...A
 digit is pressed... but the result is not shown.A
 second digit is pressed the result that is shown is as
 if in first textbox was only the first digit.A
 third digit is pressed the result that is shown is as if
 in first textbox were the first two digits.And
 so on.Can
 You say me where is my inconsistency with the code?My
 goal is to develop the seven GUIs proposed in 7GUIs: 
https://github.com/eugenkiss/7guisBut
 I need to resolve some points as this.Thanks..HERNAN.
 --
 Check out the vibrant tech community on one of the world's
 most
 engaging tech sites, Slashdot.org! 
http://sdm.link/slashdot___
 Iup-users mailing list
 Iup-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/iup-users
 
 -Inline Attachment Follows-
 
 
 -Inline Attachment Follows-
 
 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] IupSetAttributes FGCOLOR

2018-03-11 Thread Pete Lomax via Iup-users
Quick query: Is this supposed to work? Is it a bug in my wrapper? (I am still 
using 3.23)

Ihandle buy_label = IupLabel("BUY")
IupSetAttribute(buy_label,"FGCOLOR","#008000")  -- works
IupSetAttributes(buy_label,"FGCOLOR=#008000")  -- does not work

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] Formal proposal for a "postMessage" API to send messages to run on the UI thread

2018-04-19 Thread Pete Lomax via Iup-users
Hi there Eric,
Thank you for looking at this - I just wanted to add my approval.

I certainly get the point about battery life. The project I am currently 
working uses a background thread
to handle a websocket feed, which arrives every 10s or so. While an IupTimer 
works, I run it at 10 times a
second while my collaborator thinks it should be 100 times a second, so it 
consumes 100-1000 times as much
power as it needs to. All I need is a way for a background thread to say "oi" 
when it has finished some
calculation, downloaded a file, or received a websocket message - maybe I might 
want to be helpful and 
include an IupHandle in the message, often not - it is the responsibility of 
the main gui thread to map
any such events to specific gui elements, and quite often not a 1:1 
relationship anyway.

Please ignore anyone who says "I don't need it so you can't have it" -  but, 
obviously, it has to be a
solution that causes them no pain when/if it does go in, and your proposal 
sounds just like that to me.

Pete

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] Regression bug in iup_config.c? (Crash if there is no config file)

2018-03-31 Thread Pete Lomax via Iup-users
I reported this privately last week, and that call was promptly removed in SVN


On Sat, 31/3/18, Eric Wing  wrote:

 Subject: [Iup-users] Regression bug in iup_config.c? (Crash if there is no 
config file)
 To: "IUP discussion list." 
 Date: Saturday, 31 March, 2018, 0:04
 
 I just discovered a crash I didn't have
 before using IupConfigLoad()
 after recently resyncing to to SVN.
 
 If the config file is missing, my
 program crashes. Tracking it down,
 it appears to be caused by a change
 that introduced a call to:
    
 iupLineFileClose(line_file);
 
 as follows:
 
 
 int IupConfigLoad(Ihandle* ih)
 {
   char group[GROUPKEYSIZE] = "";
   char key[GROUPKEYSIZE];
   IlineFile* line_file;
 
   char* filename =
 iConfigSetFilename(ih);
   if (!filename)
     return -3;
 
   line_file =
 iupLineFileOpen(filename);
   if (!line_file)
   {
    
 iupLineFileClose(line_file);
     return -1;
   }
 
 
 
 
 If the config file is missing,
 line_file == NULL.
 Then iupLineFileClose(line_file); is
 called.
 
 
 That is defined as:
 
 void iupLineFileClose(IlineFile*
 line_file)
 {
   fclose(line_file->file);
  
 free(line_file->line_buffer);  /* use free because
 of realloc */
   free(line_file);
 }
 
 
 Which means, it is dereferencing a NULL
 pointer when doing line_file->file.
 
 
 As far as I can tell, the config file
 will still only be created
 calling IupConfigSave(), so there is no
 expectation that this file is
 guaranteed to exist.
 
 Can you confirm?
 
 Thanks,
 Eric
 
 --
 Check out the vibrant tech community on
 one of the world's most
 engaging tech sites, Slashdot.org! http://sdm.link/slashdot
 ___
 Iup-users mailing list
 Iup-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/iup-users
 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] Naming for proposed "Tecgraf Assistant"

2019-06-11 Thread Pete Lomax via Iup-users


On Sun, 9/6/19, Antonio Scuri  wrote:

 It could include something in the name that indicates what it actually does. 

Good point. "IUP build script for Mint" immediately springs to mind.


___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] Request

2019-11-30 Thread Pete Lomax via Iup-users
 On Saturday, 30 November 2019, 18:49:55 GMT, Antonio Scuri 
 wrote:

... need conversion functions to/from UTF-8 and the filesystem encoding. Would 
be nice to have a solution for that inside IUP, but for now we still don't have 
one.

My own routines in Phix are 360 lines, a quick search yielded this: 
https://www.montefusco.com/qs1rboostsrv/ConvertUTF.c which is 540 lines.
Not saying that's the very best, or the right licence, etc, but it should all 
be reasonably straightforward??

Regards, Pete  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] Request

2019-11-30 Thread Pete Lomax via Iup-users
 Might be worth checking out 
https://bitbucket.org/knight666/utf8rewind/src/default/ as well...
 On Sunday, 1 December 2019, 06:41:57 GMT, Pete Lomax via Iup-users 
 wrote:  
 
  On Saturday, 30 November 2019, 18:49:55 GMT, Antonio Scuri 
 wrote:

... need conversion functions to/from UTF-8 and the filesystem encoding. Would 
be nice to have a solution for that inside IUP, but for now we still don't have 
one.

My own routines in Phix are 360 lines, a quick search yielded this: 
https://www.montefusco.com/qs1rboostsrv/ConvertUTF.c which is 540 lines.
Not saying that's the very best, or the right licence, etc, but it should all 
be reasonably straightforward??

Regards, Pete  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users
  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] Using the iup.scrollbox

2020-03-11 Thread Pete Lomax via Iup-users
 Not an expert, but I clocked this bit in the middle with some suspicion:
 scrollbar = "VERTICAL",
 xmax = "0",
 dy = "334",
 ymax = "583",
I wondered about expand = "VERTICAL" and/or getting rid of that ymax setting. 
Have not tried either here, my apologies if neither helps. On Tuesday, 10 
March 2020, 20:50:07 GMT, Jane Taubman  wrote:  
 
 Thanks for your help

What I was hoping to get to was to dock the message and buttons to the base 
using the space for the fieldlist, but I can't seem to work out how.
On Tue, 10 Mar 2020, 19:42 Antonio Scuri,  wrote:

 ok Got it. I attached the full example so we can move on from there.
 Here is the result:


  I'm still trying to figure out the initial size, but when I resize the 
dialog, its children are resized accordingly. 
  What's not expected for you?
Best,Scuri

Em ter., 10 de mar. de 2020 às 15:32, Jane Taubman  
escreveu:

I used     iup.Popup(iup.LayoutDialog(dlg)) to dump out the dialog source at 
the end of the build
As follows
--   Generated by IupLayoutDialog export to Lua.

function create_dialog_dialogDump()
  iup.dialog{
    iup.vbox{
      iup.hbox{
        iup.label{
        title = "Enter name and other information as shown on Census",
        },
      margin = "4x2",
      },
      iup.scrollbox{
        iup.vbox{
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Name:",
            },
            iup.text{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            value = "Henry Mullins",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Relationship:",
            },
            iup.text{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Sex:",
            },
            iup.list{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            ["1"] = "Male",
            ["2"] = "Female",
            ["3"] = "Unknown",
            dropdown = "YES",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Age:",
            },
            iup.text{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            mask = "/d+[dwmy]",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Marriage Status:",
            },
            iup.list{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            ["1"] = "Single",
            ["2"] = "Married",
            ["3"] = "Widower",
            ["4"] = "Widow",
            dropdown = "YES",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Years Married:",
            },
            iup.text{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Children Born:",
            },
            iup.text{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            mask = "/d*",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Children Living:",
            },
            iup.text{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            mask = "/d*",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Children Died:",
            },
            iup.text{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            mask = "/d*",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Occupation:",
            },
            iup.text{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            },
          },
          iup.hbox{
            iup.label{
            size = "80",
            usersize = "140x0",
            title = "Industry:",
            },
            iup.text{
            expand = "HORIZONTAL",
            size = "200",
            usersize = "350x0",
            },
          },
          iup.hbox{
            iup.label{
            

Re: [Iup-users] Repeat of IM's "process/im_analyze.cpp allow free(NULL); " patch...

2020-05-17 Thread Pete Lomax via Iup-users
 On Sunday, 17 May 2020, 23:05:05 BST, Ranier Vilela  
wrote:

The big question is how to catch the double free that may exist.

Because this not to protect against double free.
if (ptr) {
  free(ptr);
}

One tactic I have just recently started adopting, entirely independent of this 
and in fact in a completely different language is:

ptr = ffree(ptr)

where ffree() always returns null.
  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] IupProgressDlg request

2020-08-29 Thread Pete Lomax via Iup-users
 On http://webserver2.tecgraf.puc-rio.br/iup/en/dlg/iupprogressdlg.html
could(/should) the invocation of update_progress() be triggered via say
IupSetCallback(dlg, "PROGRESS_CB", update_progress);

Thanks,
Pete
  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] Inline editing items in IupList

2020-09-14 Thread Pete Lomax via Iup-users
 Don't think you can do exactly that (in-place edit) with an IupList, but you 
certainly can with an IupMatrix, and probably with a single-level IupTree.
 On Monday, 14 September 2020, 22:20:37 BST, Cezary Drożak 
 wrote:  
 
 Hello,
I am considering switching from Qt to IUP and one thing I cannot find in IUP is 
the possibility to edit items in IUP inline like on this screenshot: 
https://doc-snapshots.qt.io/4.8/images/stringlistmodel.png.Is it possible to do 
it in IUP? It isn't a top priority, as I can always use a pop up, but an inline 
editor would look better in my opinion.
Thanks,Cezary Drożak___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users
  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] Layout suggestions

2020-06-23 Thread Pete Lomax via Iup-users
 Open this pen: https://codepen.io/chriscoyier/pen/zYvoQEQ and resize the 
result panel to see the effect. 
(I am assuming Editor View with the result full height and html/css/js stacked 
on the left or right.)
The four (blank/grey) aside/sidebar-module boxes should at some point jump to 
below the picture.

What might you suggest in terms of iupVbox/Hbox/Gridbox and/or iupReparent or 
whatever to best replicate that behaviour in IUP?
  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] IupDrawGetTextSize() docs missing len

2020-08-16 Thread Pete Lomax via Iup-users
 On http://webserver2.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

void IupDrawGetTextSize(Ihandle* ih, const char* str, int *w, int *h); [in C]

should be (I think)

void IupDrawGetTextSize(Ihandle* ih, const char* str, int len, int *w, int *h); 
[in C]

Pete  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] IupFileDlg(DIALOGTYPE=DIR) issues

2021-01-08 Thread Pete Lomax via Iup-users
When the IupFileDlg opens, it expands to the specified directory but then 
appears to perform an ensure_visible(node0) operation, making "C:" top line and 
said target directory off-screen (but still somehow with focus).

Clearly the keyboard handling of Alt-M for Make new folder, DEFAULTENTER and 
DEFAULTESC is fine/sufficient for the three buttons, but (as they do after a 
few tabs, or a mouse click) up/down/right/left should operate on the treeview 
and I can't think of any good reason for the buttons to ever get keyboard focus 
and the arrow keys switch between them.

Windows 10, IUP 3.29


___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] IupMultiLine: FORMATTING disables Unicode

2021-03-23 Thread Pete Lomax via Iup-users
If I comment-out the FORMATTING=YES line and re-run, I can paste unicode into 
it again.

Windows 10, IUP 3.29


___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] Canvas X/YHIDDEN glitch?

2021-12-12 Thread Pete Lomax via Iup-users
Hi there. I am emulating a 640x480 window onto a 1280x960 canvas, all working 
fine and 
perfectly happy to leave this as-is, however I just thought I should say 
something.

function resize_cb(Ihandle /*ih*/)
for twice=1 to 2 do
--
-- twice in case X/YHIDDEN change aka re-apply updated drawsize
--
integer {w, h} = IupGetIntInt(canvas, "DRAWSIZE")
IupSetInt(canvas,"DX",w)
IupSetInt(canvas,"DY",h)
end for
return IUP_DEFAULT
end function

Prior to the twice loop (which I am still going to need no matter what) I 
noticed that
when I had dragged the scrollbar(s) off the 0-position, then maximised and 
restored the 
window, XHIDDEN was working but YHIDDEN was not (as in the scrollbars actually 
being 
shown on-screen), which I assume is because XHIDDEN is updated by the set of 
DY, but 
the latter is not setting its own YHIDDEN properly. I managed to replicate the 
problem
on XHIDDEN instead by (removing the twice loop and) swapping the two set lines. 
Note
that everything works fine when the scrollbar thumbs are in the 0-position.

You can run an online version at http://phix.x10.mx/p2js/scroller.htm just so 
you can see 
roughly what my demo is trying to do, but note that is not actually using any 
of your code 
(whereas the desktop version of that same demo does), does not have any 
scrollbar handling 
at all yet (so no such glitch), plus it needs a manual max/restore when first 
run. Also it
is probably easier to translate that JavaScript code to C than the Phix code it 
came from,
and obviously you can ignore (or take a peek) at the other six files it 
includes.


___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] libftgl.so not installed

2022-02-01 Thread Pete Lomax via Iup-users
The iup install script (two lines below "# Do NOT overwrite for FreeType", 
3.29) contains

  #cp -fv $1libftgl.so $TEC_SYSTEM_LIB 

should that instead be 

  cp -nv $1libftgl.so $TEC_SYSTEM_LIB 

In fact I ended up having to do 'sudo cp iup/ftgl/lib/Linux54_64/libftgl.so 
/lib/x86_64-linux-gnu'
to get it to work. Note that last part c/should be /usr/lib64 and at one point 
actually was, and I 
am the exact opposite of experienced in these strange matters.


___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] libftgl.so not installed

2022-02-02 Thread Pete Lomax via Iup-users
 I was also thinking about adding a new /etc/ld.so.conf.d/iup.conf containing 
/usr/lib64 (ie a simple ten byte text file),
and running sudo ldconfig and rebooting immediately after running the install 
scripts, might be a good suggestion?
 On Wednesday, 2 February 2022, 02:57:59 GMT, Pete Lomax via Iup-users 
 wrote:  
 
 The iup install script (two lines below "# Do NOT overwrite for FreeType", 
3.29) contains

  #cp -fv $1libftgl.so $TEC_SYSTEM_LIB 

should that instead be 

  cp -nv $1libftgl.so $TEC_SYSTEM_LIB 

In fact I ended up having to do 'sudo cp iup/ftgl/lib/Linux54_64/libftgl.so 
/lib/x86_64-linux-gnu'
to get it to work. Note that last part c/should be /usr/lib64 and at one point 
actually was, and I 
am the exact opposite of experienced in these strange matters.


___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users
  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] New Go bindings

2022-05-31 Thread Pete Lomax via Iup-users
 I've been looking for something like this for years!
>I know there were previous attempts
aye, I'd found three of 'em, and couldn't get any of them to work

It only worked (on Windows, "go get github.com/gen2brain/iup-go/iup") after I 
upgraded Go from 1.16 to 1.18.2, the requirements should probably state that.
Excellent stuff!
 On Tuesday, 31 May 2022, 08:28:05 BST, Milan Nikolic  
wrote:  
 
 Hi,
I just released the bindings for Go at https://github.com/gen2brain/iup-go. I 
know there were previous attempts, my bindings include IUP C source code that 
is compiled together with bindings. 
That means it is enough to just `go build` your app, or add tags like `gtk` to 
force GTK+ on macOS and Windows, and even `motif` tag, to build for Motif.
I also rewrote many examples and added some new ones, like postmessage, which 
uses goroutine, and an image example that shows how to use Go standard 
libraries to load images.These are only bindings for core IUP, IM is not needed 
as Go has jpeg, png, gif, etc. in the standard library. CD I cannot include 
easily and it needs many dependencies, so no additional controls.I just added 
the support for GLCanvas, but I really miss Matrix and Cell controls.
I added the Cocoa code and sample screenshot on purpose, hope it can attract 
contributions. Native controls I believe are more relevant than ever.There was 
some attempt, libui/ui project in C, with Go bindings, some Googler started, 
but there is no progress for years, I guess it is not an easy task to do from 
scratch.
Btw. I noticed that postmessage crashes in Motif, there is an easy fix, 
user_data is just not passed:
        diff -ur iup.orig/src/mot/iupmot_loop.c iup/src/mot/iupmot_loop.c
        --- iup.orig/src/mot/iupmot_loop.c 2019-08-28 12:28:11.0 +0200
        +++ iup/src/mot/iupmot_loop.c 2022-05-31 09:14:45.632250635 +0200
        @@ -163,5 +163,5 @@
           user_data->i = i;
           user_data->d = d;
           user_data->p = p;
        -  XtAppAddWorkProc(iupmot_appcontext, motPostMessagebWorkProc, NULL);
        +  XtAppAddWorkProc(iupmot_appcontext, motPostMessagebWorkProc, 
user_data);
         }


I also have issues with the IupThread example I wrote, it seems to start/stop 
correctly, but it crashes on IupClose.It is a simple example, I will try to 
rewrite it in C to see if it happens there.
Thank you for the amazing UI toolkit.
Milan
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users
  ___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users