Re: [Iup-users] IupConfig

2022-11-29 Thread Andrew Robinson
PS -- I thought it may or may not be relevant but I am using a monitor with
2560x1600 resolution.


On 11/28/2022 at 5:54 AM, Andrew Robinson  wrote:


They are placed at the top manually. I also manually edited the config file
and set X=0, which causes the dialogs to appear 8 pixels from the left edge of
the screen (or 2 pixels when the dialog has no min/max buttons).


On 11/28/2022 at 4:48 AM, Antonio Scuri  wrote:


 Are those dialogs maximized or placed at the top manually?



Em dom., 27 de nov. de 2022 às 21:10, Andrew Robinson 
escreveu:




I measured the offset when all dialogs were set to X=0. The dialogs that have
RESIZE='NO', MAXBOX='NO', and MINBOX='NO' have an offset of +2 pixels whereas
the don't have those parameters set have an offset of 8 pixels, so apparently
whatever is rendered in the titlebar of the dialog can affect its X,Y offset.




Hope that helps.




Signed,

Andres


On 11/27/2022 at 8:19 AM, Andrew Robinson  wrote:


Ola again,




When I place a dialog at the leftmost topmost corner of the Windows OS and
close the dialog, upon reinitialization the dialog will not appear where I
placed it but displaced by about 7 pixels. When I look at the config file that
was created by Iup, I am seeing:




[PolymerDB]
Height=646
Maximized=0
Width=670
X=-7
Y=0




X should equal 0 but is unable to do that, therefore no Iup dialogs can be
placed on the leftside of the main Windows OS.




Signed,

Andres




╔═══╗
║  Environment  ║
╟───╢
║ IUP   v3.30   ║
║ IMv3.12   ║
║ CDv5.11.1 ║
║ Win10 v21H1   ║
╚═══╝



___
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] IupConfig

2022-11-28 Thread Andrew Robinson
They are placed at the top manually. I also manually edited the config file
and set X=0, which causes the dialogs to appear 8 pixels from the left edge of
the screen (or 2 pixels when the dialog has no min/max buttons).


On 11/28/2022 at 4:48 AM, Antonio Scuri  wrote:


 Are those dialogs maximized or placed at the top manually?



Em dom., 27 de nov. de 2022 às 21:10, Andrew Robinson 
escreveu:




I measured the offset when all dialogs were set to X=0. The dialogs that have
RESIZE='NO', MAXBOX='NO', and MINBOX='NO' have an offset of +2 pixels whereas
the don't have those parameters set have an offset of 8 pixels, so apparently
whatever is rendered in the titlebar of the dialog can affect its X,Y offset.




Hope that helps.




Signed,

Andres


On 11/27/2022 at 8:19 AM, Andrew Robinson  wrote:


Ola again,




When I place a dialog at the leftmost topmost corner of the Windows OS and
close the dialog, upon reinitialization the dialog will not appear where I
placed it but displaced by about 7 pixels. When I look at the config file that
was created by Iup, I am seeing:




[PolymerDB]
Height=646
Maximized=0
Width=670
X=-7
Y=0




X should equal 0 but is unable to do that, therefore no Iup dialogs can be
placed on the leftside of the main Windows OS.




Signed,

Andres




╔═══╗
║  Environment  ║
╟───╢
║ IUP   v3.30   ║
║ IMv3.12   ║
║ CDv5.11.1 ║
║ Win10 v21H1   ║
╚═══╝



___
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] IupConfig

2022-11-27 Thread Andrew Robinson
I measured the offset when all dialogs were set to X=0. The dialogs that have
RESIZE='NO', MAXBOX='NO', and MINBOX='NO' have an offset of +2 pixels whereas
the don't have those parameters set have an offset of 8 pixels, so apparently
whatever is rendered in the titlebar of the dialog can affect its X,Y offset.




Hope that helps.




Signed,

Andres


On 11/27/2022 at 8:19 AM, Andrew Robinson  wrote:


Ola again,




When I place a dialog at the leftmost topmost corner of the Windows OS and
close the dialog, upon reinitialization the dialog will not appear where I
placed it but displaced by about 7 pixels. When I look at the config file that
was created by Iup, I am seeing:




[PolymerDB]
Height=646
Maximized=0
Width=670
X=-7
Y=0




X should equal 0 but is unable to do that, therefore no Iup dialogs can be
placed on the leftside of the main Windows OS.




Signed,

Andres




╔═══╗
║  Environment  ║
╟───╢
║ IUP   v3.30   ║
║ IMv3.12   ║
║ CDv5.11.1 ║
║ Win10 v21H1   ║
╚═══╝
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] IupConfig

2022-11-27 Thread Andrew Robinson
Ola again,




When I place a dialog at the leftmost topmost corner of the Windows OS and
close the dialog, upon reinitialization the dialog will not appear where I
placed it but displaced by about 7 pixels. When I look at the config file that
was created by Iup, I am seeing:




[PolymerDB]
Height=646
Maximized=0
Width=670
X=-7
Y=0




X should equal 0 but is unable to do that, therefore no Iup dialogs can be
placed on the leftside of the main Windows OS.




Signed,

Andres




╔═══╗
║  Environment  ║
╟───╢
║ IUP   v3.30   ║
║ IMv3.12   ║
║ CDv5.11.1 ║
║ Win10 v21H1   ║
╚═══╝
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] More IUP Matrix stuff

2022-11-26 Thread Andrew Robinson
Ola all,




The following psuedo-code:

NUMLIN='39' NUMCOL='4' FONT0:*="Comic Sans MS, 10"
NUMLIN_VISIBLE='9' NUMCOL_VISIBLE='4' EXPAND="NO" FOCUS_CELL='1:1'
HLCOLORALPHA='255' HLCOLOR='0 0 255' FRAMETITLEHIGHLIGHT="YES"
BGCOLOR*:2='240 240 240' BGCOLOR*:4='240 240 240'
RASTERWIDTH0='30' RASTERWIDTH1='115' RASTERWIDTH2='45'
RASTERWIDTH3='45'
RASTERWIDTH4='35'
MARKMODE="LIN" FREEZE='YES'




Generates the following GUI:










But the following psuedo-code:


NUMLIN='39' NUMCOL='4' FONT0:*="Comic Sans MS, 10"
NUMLIN_VISIBLE='9' NUMCOL_VISIBLE='4' EXPAND="NO" FOCUS_CELL='1:1'
HLCOLORALPHA='255' HLCOLOR='0 0 255' FRAMETITLEHIGHLIGHT="YES"
BGCOLOR*:2='240 240 240' BGCOLOR*:4='240 240 240'
RASTERWIDTH0='30' RASTERWIDTH1='115' RASTERWIDTH2='45'
RASTERWIDTH3='45'
RASTERWIDTH4='35'
MARKMODE="LIN" FREEZE='YES' NOSCROLLASTITLE='YES'




Generates the following GUI:








Note how the col labeled "Bond" is converted into title cells? That's because
I can't set FOCUS_CELL='1;0'. If that is not a bug, it should be one.




Thanks,

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


Re: [Iup-users] IupAnimatedLabel

2022-11-16 Thread Andrew Robinson
Thank you Mr/Dr Scuri. Could you please put that comment into the
documentation for IUP please?


On 11/16/2022 at 4:19 AM, Antonio Scuri  wrote:


 Hi,



 Yes, that's correct. The user interface is not updated during a long
processing. What you can do is inside your processing call a callback, then
inside that callback call IupLoopStep. This will not only refresh the
IupAnimatedLabel, but also allow the user to click on a cancel button, for
instance.




Best,

Scuri






Em ter., 15 de nov. de 2022 às 15:16, Andrew Robinson 
escreveu:




Ola,




I'm using IupAnimatedLabel with IUP_CircleProgressAnimation. Everything works
fine except when the control is part of a background function.
IupAnimatedLabel apparently is not an independent process and therefore cannot
multitask, i.e. -- the first frame of the IUP_CircleProgressAnimation
displays, but no animation occurs when the control is called from a function
with lots of code being executed (more specifically, with code that is calling
external functions like reading/writing to files, calling external commands,
etc).




Signed,

Andres

___
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] IupAnimatedLabel

2022-11-15 Thread Andrew Robinson
Ola,




I'm using IupAnimatedLabel with IUP_CircleProgressAnimation. Everything works
fine except when the control is part of a background function.
IupAnimatedLabel apparently is not an independent process and therefore cannot
multitask, i.e. -- the first frame of the IUP_CircleProgressAnimation
displays, but no animation occurs when the control is called from a function
with lots of code being executed (more specifically, with code that is calling
external functions like reading/writing to files, calling external commands,
etc).




Signed,

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


Re: [Iup-users] IupMatrixEx -- Related issues

2022-10-29 Thread Andrew Robinson
Ola,




I hope I'm not overwhelming anyone with too many issues, but another issue
related to the IupMatrix is that when I minimize a window like the one shown
below, and then I restore it, the IupMatrix will no longer be the same size as
before, as if the old calculation for the matrix control was for all the lines
being the default size of 8 with 13 rows, but the new calculation will be
sized according to the new sizes and still with 13 rows, meaning that the
IupControl will sometimes now be larger than the window itself. My release
version of this program will not be resizeable, which means the other controls
could sometimes become inaccessible. This only happens when minimizing and
then restoring.




Signed,

Andres


On 10/28/2022 at 6:31 AM, Andrew Robinson  wrote:


Here are two files


On 10/28/2022 at 4:29 AM, Antonio Scuri  wrote:


  Hi,



  Thanks for the update. Can you send me that png file?




Best,

Scuri



Em qui., 27 de out. de 2022 às 14:19, Andrew Robinson 
escreveu:




Ola,




Update: The problem isn't with IUP, the problem is with iupview.exe. I'm using
iupview.exe to convert png to C, which causes the issue, but when I convert
png to raw binary and link to that instead, everything works as expected. Not
sure what the problem is with iupview.exe but I'm glad the problem isn't with
IUP.




Signed,

Andres




PS -- It would be nice if iupview.exe could save image data as raw binary.


On 10/25/2022 at 12:36 PM, Andrew Robinson  wrote:


Ola,




My App is "growing up" and one of the things I added was a way to view the
molecular structure of the polymer listed. The issue is that any graphic with
a width greater than some value between 313 and 343 pixels, will not display
properly (see PCTA.1 in attached screenshot). I confirmed this issue by
changing the graphic width from 343 to 313 pixels. The wider the graphic, the
worse the skew gets. I used iupView.exe to convert all RBG 24-bit color pngs
to C text, which I then load into the matrix using IupImageRGB and
IupSetAttributeHandle. Is there a limit to this that I didn't see or isn't
documented, and is there a workaround?









Also, I set RASTERWIDTH for that column to "625" (for an IUP matrix that is
"575" wide) and clicking on the white space next to the horizontal scrollbar
works until it reaches the middle of the molecular structure column, so that
it will butt-up against the right-arrow of the control. Clicking on the
right-arrow of the scrollbar restores the scrollbar to working condition so I
can continue scrolling to the end of the columns. It seems related to the
issue below, hence the reason I linked this issue to that thread.




Signed,

Andres




On 3/16/2022 at 5:56 AM, Andrew Robinson  wrote:


Ola Antonio,



This looks like it might be a layout bug in IupMatrixEx...










Everything lines up, right? But then I scroll left one unit and then this
happens...








___
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] IupMatrixEx -- Related issues

2022-10-28 Thread Andrew Robinson
Here are two files


On 10/28/2022 at 4:29 AM, Antonio Scuri  wrote:


  Hi,



  Thanks for the update. Can you send me that png file?




Best,

Scuri



Em qui., 27 de out. de 2022 às 14:19, Andrew Robinson 
escreveu:




Ola,




Update: The problem isn't with IUP, the problem is with iupview.exe. I'm using
iupview.exe to convert png to C, which causes the issue, but when I convert
png to raw binary and link to that instead, everything works as expected. Not
sure what the problem is with iupview.exe but I'm glad the problem isn't with
IUP.




Signed,

Andres




PS -- It would be nice if iupview.exe could save image data as raw binary.


On 10/25/2022 at 12:36 PM, Andrew Robinson  wrote:


Ola,




My App is "growing up" and one of the things I added was a way to view the
molecular structure of the polymer listed. The issue is that any graphic with
a width greater than some value between 313 and 343 pixels, will not display
properly (see PCTA.1 in attached screenshot). I confirmed this issue by
changing the graphic width from 343 to 313 pixels. The wider the graphic, the
worse the skew gets. I used iupView.exe to convert all RBG 24-bit color pngs
to C text, which I then load into the matrix using IupImageRGB and
IupSetAttributeHandle. Is there a limit to this that I didn't see or isn't
documented, and is there a workaround?









Also, I set RASTERWIDTH for that column to "625" (for an IUP matrix that is
"575" wide) and clicking on the white space next to the horizontal scrollbar
works until it reaches the middle of the molecular structure column, so that
it will butt-up against the right-arrow of the control. Clicking on the
right-arrow of the scrollbar restores the scrollbar to working condition so I
can continue scrolling to the end of the columns. It seems related to the
issue below, hence the reason I linked this issue to that thread.




Signed,

Andres




On 3/16/2022 at 5:56 AM, Andrew Robinson  wrote:


Ola Antonio,



This looks like it might be a layout bug in IupMatrixEx...










Everything lines up, right? But then I scroll left one unit and then this
happens...








___
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] IupMatrixEx -- Related issues

2022-10-27 Thread Andrew Robinson
Ola,




Update: The problem isn't with IUP, the problem is with iupview.exe. I'm using
iupview.exe to convert png to C, which causes the issue, but when I convert
png to raw binary and link to that instead, everything works as expected. Not
sure what the problem is with iupview.exe but I'm glad the problem isn't with
IUP.




Signed,

Andres




PS -- It would be nice if iupview.exe could save image data as raw binary.


On 10/25/2022 at 12:36 PM, Andrew Robinson  wrote:


Ola,




My App is "growing up" and one of the things I added was a way to view the
molecular structure of the polymer listed. The issue is that any graphic with
a width greater than some value between 313 and 343 pixels, will not display
properly (see PCTA.1 in attached screenshot). I confirmed this issue by
changing the graphic width from 343 to 313 pixels. The wider the graphic, the
worse the skew gets. I used iupView.exe to convert all RBG 24-bit color pngs
to C text, which I then load into the matrix using IupImageRGB and
IupSetAttributeHandle. Is there a limit to this that I didn't see or isn't
documented, and is there a workaround?









Also, I set RASTERWIDTH for that column to "625" (for an IUP matrix that is
"575" wide) and clicking on the white space next to the horizontal scrollbar
works until it reaches the middle of the molecular structure column, so that
it will butt-up against the right-arrow of the control. Clicking on the
right-arrow of the scrollbar restores the scrollbar to working condition so I
can continue scrolling to the end of the columns. It seems related to the
issue below, hence the reason I linked this issue to that thread.




Signed,

Andres




On 3/16/2022 at 5:56 AM, Andrew Robinson  wrote:


Ola Antonio,



This looks like it might be a layout bug in IupMatrixEx...










Everything lines up, right? But then I scroll left one unit and then this
happens...
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] IupMatrixEx -- Related issues

2022-10-25 Thread Andrew Robinson
Ola,




My App is "growing up" and one of the things I added was a way to view the
molecular structure of the polymer listed. The issue is that any graphic with
a width greater than some value between 313 and 343 pixels, will not display
properly (see PCTA.1 in attached screenshot). I confirmed this issue by
changing the graphic width from 343 to 313 pixels. The wider the graphic, the
worse the skew gets. I used iupView.exe to convert all RBG 24-bit color pngs
to C text, which I then load into the matrix using IupImageRGB and
IupSetAttributeHandle. Is there a limit to this that I didn't see or isn't
documented, and is there a workaround?









Also, I set RASTERWIDTH for that column to "625" (for an IUP matrix that is
"575" wide) and clicking on the white space next to the horizontal scrollbar
works until it reaches the middle of the molecular structure column, so that
it will butt-up against the right-arrow of the control. Clicking on the
right-arrow of the scrollbar restores the scrollbar to working condition so I
can continue scrolling to the end of the columns. It seems related to the
issue below, hence the reason I linked this issue to that thread.




Signed,

Andres




On 3/16/2022 at 5:56 AM, Andrew Robinson  wrote:


Ola Antonio,



This looks like it might be a layout bug in IupMatrixEx...









Everything lines up, right? But then I scroll left one unit and then this
happens...
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] SIGSEGV when resuming coroutine from iup callback

2022-05-27 Thread Andrew Robinson
Actually there isn't any nightly or experimental builds, I was just giving
Antonio a hint to follow because sometimes there are issues that people can't
wait for the next release in order for it to be fixed. A major planned
released should never be prematurely released until it's ready, so in between
releases there should at least be "emergency" releases (i.e. -- use at your
own risk) on an as-needed basis. Most open source projects have nightly builds
available so whatever plan works for everyone involved should be executed. All
the bugs I've found can wait but for major bugs, the few people that require
an emergency build can continue on with their project and confirm the fix for
IUP at the same time.

On 5/27/2022 at 9:07 AM, Ico  wrote:
>Quoting Andrew Robinson (2022-05-27 17:15:20)
>> Hopefully that will be in the nightly/experimental builds of IUP and not a
>> major release. I don't want a new version of IUP released until all current
>> issues are resolved and any new features are mature enough for a release.
>
>Fair enough; I was not aware there was are nightly builds available, where
>can I find these?
>
>Thank you,
>
>Ico



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


Re: [Iup-users] SIGSEGV when resuming coroutine from iup callback

2022-05-27 Thread Andrew Robinson
Hopefully that will be in the nightly/experimental builds of IUP and not a
major release. I don't want a new version of IUP released until all current
issues are resolved and any new features are mature enough for a release.


On 5/27/2022 at 5:02 AM, Antonio Scuri  wrote:


  Hi,



>  Would it be possible to release a new iup version from the latest svn
> master to have this fix available in the official build?




  That depends on the changes. Can you send me a diff?



Em qui., 26 de mai. de 2022 às 16:08, Ico  escreveu:


Hi Scuri,

I spent the afternoon digging myself through the code, learning the
internals of coroutines in the Lua interpreter and about how iuplua
handles the lua_State context; my conclusion is that iuplua seems to
pass around the wrong lua_State, using the thread `L` instead of the
main `L`, which causes a nasty mixup when resuming coroutines from
a iup callback.

I came up with a fix that makes sure the main lua_State is stored
and used in the iup callbacks, which seems to solve my problem.

As I prepared my patch to play nicely with the lastest iup version
I cloned the svn repo - only to find that exactly this change was
already part of the upstream code, commit r5923 with the log message
"Using the main thread for the IupLua callbacks"

So, the bad news is that I wasted a few hours, the good news is that I
learned a lot and got my problem fixed.

Would it be possible to release a new iup version from the latest svn
master to have this fix available in the official build?

Thanks!

Ico


Quoting Ico (2022-05-26 14:00:01)

> I'm still running into some issues when mixing iup and coroutines, the
> snippet below results in a reproducable crash on both linux and win32.

--
:wq
^X^Cy^K^X^C^C^C^C


___
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] VISIBLELIN

2022-04-26 Thread Andrew Robinson
Hello Antonio,




For IupMatrixEX, VISIBLELINid doesn't appear to work because it always returns
"YES" even with illegal (non-existent) line numbers. Is the proper syntax for
that IupGetAttribute,hMatrix,"VISIBLELIN1" for line one of hMatrix?




Thanks,

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


[Iup-users] Rosetta Stone - English/Portuguese Technical Terminology

2022-04-06 Thread Andrew Robinson
https://caiorss.github.io/C-Cpp-Notes/Roesetta_Stone_Translation.html
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] TITLE='UTF8'

2022-04-05 Thread Andrew Robinson
Ola Antonio,




I noticed a minor glitch in the graphics rendering when using UTF8 fonts




First I create a toggle with IupSetAttribute,"TITLE","=x" and attach a label
to it:









Clicking on the toggle calls IupSetAttribute with "TITLE","x¯¹" but nothing
happens:









Closing the dialog and reopening it again displays the proper text.









I'm wondering if there is some kind of redraw I have to do, but none of the
other myriad of toggles that I change the title for the label for requires a
refresh, only this one.




Thanks

Andrew




╔═══╗
║  Environment  ║
╟───╢
║ IUP   v3.30   ║
║ IMv3.12   ║
║ CDv5.11.1 ║
║ Win10 v21H1   ║
╚═══╝
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] SIMULATEMODAL

2022-04-04 Thread Andrew Robinson
I see the problem: I was using IupShow instead of
IupPopup(ih,IUP_CURRENT,IUP_CURRENT).


On 2/16/2022 at 4:49 PM, Andrew Robinson  wrote:


You know, you could give me some code that works like I asked for. Anyways,
will this work for you?:




int main() {
 iHandle hMat1=0,hMat2=0 ;
 void *pBox6,*pBox1,*pBtn1,*pMainDlg,*pMainCfg,*pDlg1 ;
 // Custom Dialog
 hMat2=IupMatrixEx(NULL);
 IupSetAttribute(hMat2,"NUMLIN","2");
 IupSetAttribute(hMat2,"NUMCOL","2");
 IupSetAttribute(hMat2,"NUMCOL_VISIBLE","2");
 IupSetAttribute(hMat2,"NUMLIN_VISIBLE","2");
 IupSetAttribute(hMat2,"EXPAND","NO");
 *pBox6=IupVbox(hMat2,NULL);
 IupSetAttribute(pBox6,"MARGIN","5x5");
 pDlg1=IupDialog(pBox6);
 IupSetAttribute(pDlg1,"TITLE","Test");
 IupSetAttribute(pDlg1,"RESIZE","NO");
 IupSetAttribute(pDlg1,"MAXBOX","NO");
 IupSetAttribute(pDlg1,"MINBOX","NO");
 IupSetCallback(pDlg1,"CLOSE_CB",addr cbDlg1Close);
 // Main Dialog
 hMat1=IupMatrixEx(NULL);
 IupSetAttribute(hMat1,"NUMLIN","2");
 IupSetAttribute(hMat1,"NUMCOL","2");
 IupSetAttribute(hMat1,"NUMCOL_VISIBLE","2");
 IupSetAttribute(hMat1,"NUMLIN_VISIBLE","2");
 IupSetAttribute(hMat1,"HLCOLOR","0 0 255"); // This doesn't work
 IupSetAttribute(hMat1,"HLCOLORALPHA","255"); // This doesn't work
 pBtn1=IupButton(NULL,NULL);
 IupSetAttribute(pBtn1,"SIZE","45x");
 IupSetAttribute(pBtn1,"TITLE","SHOW :");
 IupSetCallback(pBtn1,"ACTION",addr cbBtnShow);
 pBox1=IupVbox(hMat1,pBtn1,NULL);
 pMainDlg=IupDialog();
 pMainCfg=IupConfig();
 IupSetAttribute(pMainCfg,"APP_FILENAME","./PolymerDB.cfg");
 IupConfigLoad(pMainCfg);
 IupSetAttributeHandle(NULL,"PARENTDIALOG",pMainDlg);
 IupSetAttribute(pMainDlg,"CONFIG",pMainCfg);
 IupConfigDialogShow(pMainCfg,pMainDlg,"PolymerDB");
 IupSetAttribute(pMainDlg,"TITLE","Polymer Database");
 IupMainLoop();
 IupDestroy(pMainDlg);
 return(EXIT_SUCCESS); }
void cbBtnShow() {
 IupConfigDialogShow(pMainCfg,pDlg1,"DatList");
 IupShow(pDlg1);
 IupSetAttribute(pMainDlg,"ACTIVE","NO");
 return(); }
void cbDlg1Close() {
 IupConfigDialogClosed(pMainCfg,pDlg1,"DatList");
 return(); }




You can leave off all the config stuff and it will still perform the same, but
I left it in anyways in case of some other issue I'm not aware of exists when
doing these kind of things.




Thanks,
Andrew


















On 2/16/2022 at 3:12 PM, Antonio Scuri  wrote:


Almost all predefined dialogs are simply IupDialog, except the native ones,
like IupFileDlg. Three is no extra management when a predefined dialogs is
shown.



Maybe you can build a simple sample code to reproduce your problem? And we
start from that.



Em qua., 16 de fev. de 2022 18:52, Andrew Robinson 
escreveu:




"You replied only to me"




Sorry. Will try to not let that happen again.




"When a dialog is closed the system brings the parent or another child to
foreground and it sets the focus. IUP actually doesn't interfere in the system
behavior."




This isn't about system behavior, this is about following proper programming
procedures. The Win10 documentation says you must call EndDialog to end a
modal dialog and apparently IUP does not do that for Windows and that is a
problem for IUP using custom dialogs.




"I tested here using the tools executable, like IupView or IupVisualLED, when
a child dialog is closed the main dialog gets its focus back."




The predefined dialogs will do that but a custom dialog will not. What do the
predefined dialogs do that the custom dialog does not (or is not documented to
do)?




Thanks,

Andrew




On 2/16/2022 at 12:51 PM, Antonio Scuri  wrote:



 Obs: You replied only to me, so I'm including the list in the reply again.




>  You say "I guess" but is that how it is actually done in for all the
predefined dialogs in IUP?




> Why interrupt that default sequence of events just so you can add a very
necessary IupSetFocus that you can never leave out or it will never work? That
default behavior doesn't make sense, it is not documented to function like
that, and the default behavior actually doesn't work.



There is no default behavior set by IUP. When a dialog is closed the system
brings the parent or another child to foreground and it sets the focus. IUP
actually doesn't interfere in the system behavior.



I tested here using the tools executable, like IupView or IupVisualLED, when a
child dialog is closed the main dialog gets its focus back.




Best,

Scuri




Em qua., 16 de fev. de 2022 às

Re: [Iup-users] EXIT_CB and SINGLEINSTANCE

2022-04-04 Thread Andrew Robinson
Antonio,




PS -- I use the following code in my programs when I want to limit them to a
SINGLEINSTANCE:




invoke FindWindowA,NULL,"Title of Program"
or rax,rax
  jz >
  invoke BringWindowToTop,rax
  invoke ExitProcess,0

: etc




Where "Title of Program" was set by IupSetAttribute hDlg 'TITLE'




You actually don't even need the BringWindowToTop and in IUP you can use
return IUP_CLOSE in place of ExitProcess.




Thanks,

Andrew


On 3/28/2022 at 10:11 AM, Andrew Robinson  wrote:


Ola Antonio,




I have a function cbMnuExit(), that closes all open dialogs and saves the
layout using IupConfigDialogClosed(). When this function is called from a menu
item (appropriately named "Exit"), all open dialogs are closed and the layout
is saved. I also set EXIT_CB to cbMnuExit() using IupSetFunction() so that
clicking on the Win close button will also call cbMnuExit(),  and although it
will save the layout it will not close all open dialogs. If I don't used
EXIT_CB, the layout won't be saved, so I know that cbMnuExit() is being
called, so something is not happening here as expected.




In an unrelated issue, I use IupSetGlobal() to set SINGLEINSTANCE=YES but it
doesn't work.




These are simple functions so I don't see how they could go wrong so maybe
there is something else required that I'm not aware of to make these work or
isn't documented?




Thanks,

Andrew

╔═══╗
║  Environment  ║
╟───╢
║ IUP   v3.30   ║
║ IMv3.12   ║
║ CDv5.11.1 ║
║ Win10 v21H1   ║
╚═══╝
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] DEFAULTPRECISION

2022-03-29 Thread Andrew Robinson
Never mind. That isn't what DEFAULTPRECISION is supposed to be used for.


On 3/29/2022 at 9:55 AM, Andrew Robinson  wrote:


Ola Antonio,




I set DEFAULTPRECISION=8 but it doesn't work as expected. For example...









Just focusing on Compressive Strength in the 3rd column, I see 7.239494, which
is the result of converting 0.00105 psi to Pa, but the max value is 0.00124
psi and that doesn't work out so well for the conversion since it isn't
exactly representable in floating point...









So DEFAULTPRECISION fails to limit the numbers of digits displayed to 8
because apparently it is NOT counting zeroes as digits so instead of
displaying 8.618446 or even 8.6184460, it is displaying 8.6184461 (the
"exact" value for the conversion).




Is there some other workaround for that so it can work as expected?




Thanks,

Andrew



╔═══╗
║  Environment  ║
╟───╢
║ IUP   v3.30   ║
║ IMv3.12   ║
║ CDv5.11.1 ║
║ Win10 v21H1   ║
╚═══╝
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] DEFAULTPRECISION

2022-03-29 Thread Andrew Robinson
Ola Antonio,




I set DEFAULTPRECISION=8 but it doesn't work as expected. For example...









Just focusing on Compressive Strength in the 3rd column, I see 7.239494, which
is the result of converting 0.00105 psi to Pa, but the max value is 0.00124
psi and that doesn't work out so well for the conversion since it isn't
exactly representable in floating point...









So DEFAULTPRECISION fails to limit the numbers of digits displayed to 8
because apparently it is NOT counting zeroes as digits so instead of
displaying 8.618446 or even 8.6184460, it is displaying 8.6184461 (the
"exact" value for the conversion).




Is there some other workaround for that so it can work as expected?




Thanks,

Andrew



╔═══╗
║  Environment  ║
╟───╢
║ IUP   v3.30   ║
║ IMv3.12   ║
║ CDv5.11.1 ║
║ Win10 v21H1   ║
╚═══╝
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


[Iup-users] EXIT_CB and SINGLEINSTANCE

2022-03-28 Thread Andrew Robinson
Ola Antonio,




I have a function cbMnuExit(), that closes all open dialogs and saves the
layout using IupConfigDialogClosed(). When this function is called from a menu
item (appropriately named "Exit"), all open dialogs are closed and the layout
is saved. I also set EXIT_CB to cbMnuExit() using IupSetFunction() so that
clicking on the Win close button will also call cbMnuExit(),  and although it
will save the layout it will not close all open dialogs. If I don't used
EXIT_CB, the layout won't be saved, so I know that cbMnuExit() is being
called, so something is not happening here as expected.




In an unrelated issue, I use IupSetGlobal() to set SINGLEINSTANCE=YES but it
doesn't work.




These are simple functions so I don't see how they could go wrong so maybe
there is something else required that I'm not aware of to make these work or
isn't documented?




Thanks,

Andrew

╔═══╗
║  Environment  ║
╟───╢
║ IUP   v3.30   ║
║ IMv3.12   ║
║ CDv5.11.1 ║
║ Win10 v21H1   ║
╚═══╝
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] IupMatrixEx

2022-03-16 Thread Andrew Robinson
Ola Antonio,



This looks like it might be a layout bug in IupMatrixEx...









Everything lines up, right? But then I scroll left one unit and then this
happens...









It gets worse at the end columns...









Notice the black rectangle at the end of the title columns? None of my other
matrixes do this, only this one, and the most I could figure out that triggers
this is that the beginning and end of row0 begins with columns that are merged
and ends with columns that are merged (in the pic directly above, column 12 is
the first column and column 18 is the last column). In my code I have columns
10-12, 13-14, and 17-18 merged, with NUMCOL_VISIBLE=10 out of 18. The
RASTERSIZE for all the columns is RASTERWIDTH0='50' RASTERWIDTH1='0'
RASTERWIDTH2='65' RASTERWIDTH3='65' RASTERWIDTH4='55' RASTERWIDTH5='65'
RASTERWIDTH6='55' RASTERWIDTH7='60' RASTERWIDTH8='55' RASTERWIDTH9='55'
RASTERWIDTH10='55' RASTERWIDTH11='75' RASTERWIDTH12='55' RASTERWIDTH13='80'
RASTERWIDTH14='80' RASTERWIDTH15='65' RASTERWIDTH16='80' RASTERWIDTH17='80'
and RASTERWIDTH18='80'.




Gracias,

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


Re: [Iup-users] MASK (non inheritable) (since 3.0)

2022-02-28 Thread Andrew Robinson
Actually, let me say that I think IUP's flavor of RegEx is one of the best
implementations of RegEx I've ever seen.


On 2/28/2022 at 6:52 AM, Andrew Robinson  wrote:


Yeah, I saw that little graphic but I didn't pay much attention to it because
I thought it was an oversimplified UML diagram. The Text Mask API seems very
cool.


On 2/28/2022 at 6:05 AM, Antonio Scuri  wrote:


  For some reason it is not in the navigation tree, but if you click on
"Utilities" it is listed there.



Em dom., 27 de fev. de 2022 às 16:21, Andrew Robinson 
escreveu:




That sounds great but could you be more specific please? Where is that API for
that listed in the following screen capture for IUP - Version 3.30? ...









I couldn't find any text for "regex" or "mask" yet.




Thanks,

Andrew


On 2/27/2022 at 9:53 AM, Antonio Scuri  wrote:


  It is available with the internal SDK. Take a look at the iup/src/iup_mask.c
file for more details.



Best,

Scuri






Em dom., 27 de fev. de 2022 às 13:50, Andrew Robinson 
escreveu:




Ola Antonio,




RE: https://www.tecgraf.puc-rio.br/iup/en/attrib/iup_mask.html




Is that regEx engine available in the API somewhere, or is it for internal use
by IUP only?




Thanks,

Andrew
___
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] MASK (non inheritable) (since 3.0)

2022-02-28 Thread Andrew Robinson
Yeah, I saw that little graphic but I didn't pay much attention to it because
I thought it was an oversimplified UML diagram. The Text Mask API seems very
cool.


On 2/28/2022 at 6:05 AM, Antonio Scuri  wrote:


  For some reason it is not in the navigation tree, but if you click on
"Utilities" it is listed there.



Em dom., 27 de fev. de 2022 às 16:21, Andrew Robinson 
escreveu:




That sounds great but could you be more specific please? Where is that API for
that listed in the following screen capture for IUP - Version 3.30? ...









I couldn't find any text for "regex" or "mask" yet.




Thanks,

Andrew


On 2/27/2022 at 9:53 AM, Antonio Scuri  wrote:


  It is available with the internal SDK. Take a look at the iup/src/iup_mask.c
file for more details.



Best,

Scuri






Em dom., 27 de fev. de 2022 às 13:50, Andrew Robinson 
escreveu:




Ola Antonio,




RE: https://www.tecgraf.puc-rio.br/iup/en/attrib/iup_mask.html




Is that regEx engine available in the API somewhere, or is it for internal use
by IUP only?




Thanks,

Andrew
___
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] IupMatrixSetFomula

2022-02-28 Thread Andrew Robinson
I think I know what you are talking about, but that doesn't help because I
need an if statement in the formula to can test the current lin with IsNan()
so I can skip it with a nop (no operation).


On 2/28/2022 at 6:10 AM, Antonio Scuri  wrote:


 No, I mean in the Lua script. The formula receives the lin and col as
parameters. See the examples.



Em dom., 27 de fev. de 2022 às 16:17, Andrew Robinson 
escreveu:




I apologize, I didn't mean to say it wasn't useful, only that it wasn't useful
if you require more than one title line.




The prototype for IupMatrixSetFormula only has a parameter for col and nothing
for lin. Is the following a typo in the HTML documentation for IUP - Version
3.30?:

void IupMatrixSetFormula(Ihandle* ih, int
 col, const char* formula, const char*
 init); [in C]
iup.MatrixSetFormula(ih:
 ihandle, col: number, formula: string,
 [init: string]) [in Lua]
or
 ih:SetFormula(col: number,
 formula: string, [init: string]) [in
 Lua]








On 2/27/2022 at 10:13 AM, Antonio Scuri  wrote:


> "so it's not a useful function"



  I think if you read the documentation carefully you will see that it is a
very useful function...




  Also you will find out that the formula receives two parameters lin and col,
so you can test the col number and return the contents you actually want in
the UNITS cell. Then maybe you're not stuck after all...




Scuri






Em qui., 24 de fev. de 2022 às 20:20, Andrew Robinson 
escreveu:




Ola Antonio,




I have the following dialog:









I would like to use IupMatrixSetFormula to change values when I select between
S.I., CGS, and Imperial units but IupMatrixSetFormula cannot be restricted to
just the rows below the UNITS row so it's not a useful function. Is there a
way to restrict which rows IupMatrixSetFormula or am I stuck with doing it
manually, cell-by-cell?




Thanks,

Andrew
___
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 mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] MASK (non inheritable) (since 3.0)

2022-02-27 Thread Andrew Robinson
That sounds great but could you be more specific please? Where is that API for
that listed in the following screen capture for IUP - Version 3.30? ...









I couldn't find any text for "regex" or "mask" yet.




Thanks,

Andrew


On 2/27/2022 at 9:53 AM, Antonio Scuri  wrote:


  It is available with the internal SDK. Take a look at the iup/src/iup_mask.c
file for more details.



Best,

Scuri






Em dom., 27 de fev. de 2022 às 13:50, Andrew Robinson 
escreveu:




Ola Antonio,




RE: https://www.tecgraf.puc-rio.br/iup/en/attrib/iup_mask.html




Is that regEx engine available in the API somewhere, or is it for internal use
by IUP only?




Thanks,

Andrew
___
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] IupMatrixSetFomula

2022-02-27 Thread Andrew Robinson
I apologize, I didn't mean to say it wasn't useful, only that it wasn't useful
if you require more than one title line.




The prototype for IupMatrixSetFormula only has a parameter for col and nothing
for lin. Is the following a typo in the HTML documentation for IUP - Version
3.30?:

void IupMatrixSetFormula(Ihandle* ih, int col, const char* formula, const
char* init); [in C]
iup.MatrixSetFormula(ih: ihandle, col: number, formula: string, [init:
string]) [in Lua]
or ih:SetFormula(col: number, formula: string, [init: string]) [in Lua]








On 2/27/2022 at 10:13 AM, Antonio Scuri  wrote:


> "so it's not a useful function"



  I think if you read the documentation carefully you will see that it is a
very useful function...




  Also you will find out that the formula receives two parameters lin and col,
so you can test the col number and return the contents you actually want in
the UNITS cell. Then maybe you're not stuck after all...




Scuri






Em qui., 24 de fev. de 2022 às 20:20, Andrew Robinson 
escreveu:




Ola Antonio,




I have the following dialog:









I would like to use IupMatrixSetFormula to change values when I select between
S.I., CGS, and Imperial units but IupMatrixSetFormula cannot be restricted to
just the rows below the UNITS row so it's not a useful function. Is there a
way to restrict which rows IupMatrixSetFormula or am I stuck with doing it
manually, cell-by-cell?




Thanks,

Andrew
___
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] MASK (non inheritable) (since 3.0)

2022-02-27 Thread Andrew Robinson
Ola Antonio,




RE: https://www.tecgraf.puc-rio.br/iup/en/attrib/iup_mask.html




Is that regEx engine available in the API somewhere, or is it for internal use
by IUP only?




Thanks,

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


[Iup-users] IupMatrixSetFomula

2022-02-24 Thread Andrew Robinson
Ola Antonio,




I have the following dialog:









I would like to use IupMatrixSetFormula to change values when I select between
S.I., CGS, and Imperial units but IupMatrixSetFormula cannot be restricted to
just the rows below the UNITS row so it's not a useful function. Is there a
way to restrict which rows IupMatrixSetFormula or am I stuck with doing it
manually, cell-by-cell?




Thanks,

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


Re: [Iup-users] DoubleClick and IupMatrix

2022-02-21 Thread Andrew Robinson
Just to clarify this:

Putting IUP_IGNORE in ACTION_CB, prevents any clicks from reaching CLICK_CB.
Putting IUP_IGNORE in CLICK_CB does not prevent a double-click event from
being passed on to VALUE_EDIT_CB, which will then automatically put the cell
into the edit mode as a double-click should do. But if the event being passed
on to VALUE_EDIT_CB when the matrix has been disabled, makes it so the edit
mode is never entered, it will just process the event instead (otherwise I
wouldn't be able to re-enable the matrix).

On 2/21/2022 at 9:19 AM, "Andrew Robinson"  wrote:
>Using a filter for the col parameter with IUP_IGNORE in CLICK_CB,
>VALUE_EDIT_CB, and ACTION_CB does absolutely nothing to prevent the matrix
>from going into the edit mode when double-clicking on a cell. The only thing
>that works is to intercept the double-click (which only CLICK_CB can do after
>ACTION_CB is called), disable the matrix so that nothing works, and then
>re-enabling the matrix in VALUE_EDIT_CB (which is the last function to be
>called for a click or double-click). I don't think you ever tried doing what
>you suggest.
>
>On 2/21/2022 at 4:56 AM, Ranier Fonseca  wrote:
>>De: Andrew Robinson 
>>Enviado: domingo, 20 de fevereiro de 2022 17:33
>>Para: IUP discussion list.
>>Assunto: Re: [Iup-users] DoubleClick and IupMatrix
>>
>>>I can change text here if I don't use IUP_IGNORE as suggested, but the text
>is IUP text instead of image, so the result is undefined that I know of. I
>>have to press Escape to exit the edit mode which leads to this:
>>In ACTION_CB you have the key and the col to to determine what to do.
>>According to the documentation:
>>"Returns: IUP_DEFAULT validates the key, IUP_IGNORE ignores the key,
>IUP_CONTINUE forwards the key to IUPs conventional processing, or the
>identifier of the key to be treated by the matrix."
>>So if you have "col" you can ignore the key or process the key.
>>In other words, if you "col" is "Text Input" you return IUP_DEFAULT to
>process the key or edition.
>>If not, you return IUP_IGNORE to not process the key and do not enter
>edition.
>>
>>In CLICK_CB you have the "col" and the "status".
>>According to the documentation:
>>status: Status of the mouse buttons and some keyboard keys at the moment the
>event is generated.
>>
>>So if you "col" is the checkbox, process it and return IUP_IGNORE then do
not
>enter in edition.
>>Maybe you have the UPDATE manually the line of matrix.
>>
>>regards,
>>Ranier Vilela



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


Re: [Iup-users] DoubleClick and IupMatrix

2022-02-21 Thread Andrew Robinson
Using a filter for the col parameter with IUP_IGNORE in CLICK_CB,
VALUE_EDIT_CB, and ACTION_CB does absolutely nothing to prevent the matrix
from going into the edit mode when double-clicking on a cell. The only thing
that works is to intercept the double-click (which only CLICK_CB can do after
ACTION_CB is called), disable the matrix so that nothing works, and then
re-enabling the matrix in VALUE_EDIT_CB (which is the last function to be
called for a click or double-click). I don't think you ever tried doing what
you suggest.

On 2/21/2022 at 4:56 AM, Ranier Fonseca  wrote:
>De: Andrew Robinson 
>Enviado: domingo, 20 de fevereiro de 2022 17:33
>Para: IUP discussion list.
>Assunto: Re: [Iup-users] DoubleClick and IupMatrix
>
>>I can change text here if I don't use IUP_IGNORE as suggested, but the text
is IUP text instead of image, so the result is undefined that I know of. I
>have to press Escape to exit the edit mode which leads to this:
>In ACTION_CB you have the key and the col to to determine what to do.
>According to the documentation:
>"Returns: IUP_DEFAULT validates the key, IUP_IGNORE ignores the key,
IUP_CONTINUE forwards the key to IUPs conventional processing, or the
identifier of the key to be treated by the matrix."
>So if you have "col" you can ignore the key or process the key.
>In other words, if you "col" is "Text Input" you return IUP_DEFAULT to
process the key or edition.
>If not, you return IUP_IGNORE to not process the key and do not enter
edition.
>
>In CLICK_CB you have the "col" and the "status".
>According to the documentation:
>status: Status of the mouse buttons and some keyboard keys at the moment the
event is generated.
>
>So if you "col" is the checkbox, process it and return IUP_IGNORE then do not
enter in edition.
>Maybe you have the UPDATE manually the line of matrix.
>
>regards,
>Ranier Vilela



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


Re: [Iup-users] DoubleClick and IupMatrix

2022-02-20 Thread Andrew Robinson
Sorry again but I have a (temporary?) solution. If I set the entire matrix to
READONLY=YES in CLICK_CB and then put READONLY=NO in VALUE_EDIT_CB afterwards,
everything works as expected.


On 2/20/2022 at 11:29 AM, Andrew Robinson  wrote:


Sorry, but I think I should also describe what I'm doing in code:




I have two callbacks: CLICK_CB and VALUE_EDIT_CB. CLICK_DB allows me to select
which lines can be selected or highlighted (blank lines cannot be highlighted)
and VALUE_EDIT is for saving the textfields when they change. Everything works
so no problem there. Just the behavior for trying to bypass the edit control
actions on a doubleclick on certain cells is not performing as expected.


On 2/20/2022 at 10:33 AM, Andrew Robinson  wrote:


Ola, thank you for that idea Ranier. I tried your advice but all that does is
ignore any edit actions. It does not prevent the edit mode from executing it's
GUI actions. Let me try to explain this issue a little better:

Before I do anything, I have this:





I double-click and this happens:






I can change text here if I don't use IUP_IGNORE as suggested, but the text is
IUP text instead of image, so the result is undefined that I know of. I have
to press Escape to exit the edit mode which leads to this:






So what I did worked but going into edit mode is an unnecessary annoyance.




Thanks,

Andrew


On 2/20/2022 at 6:15 AM, Ranier Fonseca  wrote:
>De: Andrew Robinson 
>Enviado: sábado, 19 de fevereiro de 2022 17:48
>Para: IUP discussion list.
>Assunto: [Iup-users] DoubleClick and IupMatrix
>
>>See the checkmarks? What I want to do is allow the end user to simply
doubleclick on those cell and it will toggle from no checkmark, to single
>checkmark to double checkmark and back to no checkmark. The problem is that a
doubleclick also puts that cell into edit mode. Is there a way to >disable or
escape the edit mode so this doesn't happen, but only for those particular
cells (meaning Generic Name and Monomer can still be >editing by
doubleclicking on them)?
>I think yes.
>In the callback function that controls actions of matrix, do you need use the
col param,
>to check what column is and take the right action.
>
>int iup_matrix_action_cb(const Ihandle * const ih, const int key,
>const int lin, const int col, const int edition, const char * value)
>{
>switch(key) {
>case K_C:
>  return IUP_IGNORE;
> break;
>case K_Z:
>  return IUP_IGNORE;
> break;
>} /* switch*/
>if (col != 3 || col != 4) {
>return IUP_IGNORE;
>}
>   switch(col) {
>   case 3: // Generic Name
>   case 4: // Monomer
>  }
>  return IUP_DEFAULT;
>}
>
>regards,
>Ranier Vilela
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] DoubleClick and IupMatrix

2022-02-20 Thread Andrew Robinson
Sorry, but I think I should also describe what I'm doing in code:




I have two callbacks: CLICK_CB and VALUE_EDIT_CB. CLICK_DB allows me to select
which lines can be selected or highlighted (blank lines cannot be highlighted)
and VALUE_EDIT is for saving the textfields when they change. Everything works
so no problem there. Just the behavior for trying to bypass the edit control
actions on a doubleclick on certain cells is not performing as expected.


On 2/20/2022 at 10:33 AM, Andrew Robinson  wrote:


Ola, thank you for that idea Ranier. I tried your advice but all that does is
ignore any edit actions. It does not prevent the edit mode from executing it's
GUI actions. Let me try to explain this issue a little better:

Before I do anything, I have this:





I double-click and this happens:






I can change text here if I don't use IUP_IGNORE as suggested, but the text is
IUP text instead of image, so the result is undefined that I know of. I have
to press Escape to exit the edit mode which leads to this:






So what I did worked but going into edit mode is an unnecessary annoyance.




Thanks,

Andrew


On 2/20/2022 at 6:15 AM, Ranier Fonseca  wrote:
>De: Andrew Robinson 
>Enviado: sábado, 19 de fevereiro de 2022 17:48
>Para: IUP discussion list.
>Assunto: [Iup-users] DoubleClick and IupMatrix
>
>>See the checkmarks? What I want to do is allow the end user to simply
doubleclick on those cell and it will toggle from no checkmark, to single
>checkmark to double checkmark and back to no checkmark. The problem is that a
doubleclick also puts that cell into edit mode. Is there a way to >disable or
escape the edit mode so this doesn't happen, but only for those particular
cells (meaning Generic Name and Monomer can still be >editing by
doubleclicking on them)?
>I think yes.
>In the callback function that controls actions of matrix, do you need use the
col param,
>to check what column is and take the right action.
>
>int iup_matrix_action_cb(const Ihandle * const ih, const int key,
>const int lin, const int col, const int edition, const char * value)
>{
>switch(key) {
>case K_C:
>  return IUP_IGNORE;
> break;
>case K_Z:
>  return IUP_IGNORE;
> break;
>} /* switch*/
>if (col != 3 || col != 4) {
>return IUP_IGNORE;
>}
>   switch(col) {
>   case 3: // Generic Name
>   case 4: // Monomer
>  }
>  return IUP_DEFAULT;
>}
>
>regards,
>Ranier Vilela
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] DoubleClick and IupMatrix

2022-02-20 Thread Andrew Robinson
Ola, thank you for that idea Ranier. I tried your advice but all that does is
ignore any edit actions. It does not prevent the edit mode from executing it's
GUI actions. Let me try to explain this issue a little better:

Before I do anything, I have this:





I double-click and this happens:






I can change text here if I don't use IUP_IGNORE as suggested, but the text is
IUP text instead of image, so the result is undefined that I know of. I have
to press Escape to exit the edit mode which leads to this:






So what I did worked but going into edit mode is an unnecessary annoyance.




Thanks,

Andrew


On 2/20/2022 at 6:15 AM, Ranier Fonseca  wrote:
>De: Andrew Robinson 
>Enviado: sábado, 19 de fevereiro de 2022 17:48
>Para: IUP discussion list.
>Assunto: [Iup-users] DoubleClick and IupMatrix
>
>>See the checkmarks? What I want to do is allow the end user to simply
doubleclick on those cell and it will toggle from no checkmark, to single
>checkmark to double checkmark and back to no checkmark. The problem is that a
doubleclick also puts that cell into edit mode. Is there a way to >disable or
escape the edit mode so this doesn't happen, but only for those particular
cells (meaning Generic Name and Monomer can still be >editing by
doubleclicking on them)?
>I think yes.
>In the callback function that controls actions of matrix, do you need use the
col param,
>to check what column is and take the right action.
>
>int iup_matrix_action_cb(const Ihandle * const ih, const int key,
>const int lin, const int col, const int edition, const char * value)
>{
>switch(key) {
>case K_C:
>  return IUP_IGNORE;
> break;
>case K_Z:
>  return IUP_IGNORE;
> break;
>} /* switch*/
>if (col != 3 || col != 4) {
>return IUP_IGNORE;
>}
>   switch(col) {
>   case 3: // Generic Name
>   case 4: // Monomer
>  }
>  return IUP_DEFAULT;
>}
>
>regards,
>Ranier Vilela
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] SIMULATEMODAL

2022-02-16 Thread Andrew Robinson
You know, you could give me some code that works like I asked for. Anyways,
will this work for you?:




int main() {
 iHandle hMat1=0,hMat2=0 ;
 void *pBox6,*pBox1,*pBtn1,*pMainDlg,*pMainCfg,*pDlg1 ;
 // Custom Dialog
 hMat2=IupMatrixEx(NULL);
 IupSetAttribute(hMat2,"NUMLIN","2");
 IupSetAttribute(hMat2,"NUMCOL","2");
 IupSetAttribute(hMat2,"NUMCOL_VISIBLE","2");
 IupSetAttribute(hMat2,"NUMLIN_VISIBLE","2");
 IupSetAttribute(hMat2,"EXPAND","NO");
 *pBox6=IupVbox(hMat2,NULL);
 IupSetAttribute(pBox6,"MARGIN","5x5");
 pDlg1=IupDialog(pBox6);
 IupSetAttribute(pDlg1,"TITLE","Test");
 IupSetAttribute(pDlg1,"RESIZE","NO");
 IupSetAttribute(pDlg1,"MAXBOX","NO");
 IupSetAttribute(pDlg1,"MINBOX","NO");
 IupSetCallback(pDlg1,"CLOSE_CB",addr cbDlg1Close);
 // Main Dialog
 hMat1=IupMatrixEx(NULL);
 IupSetAttribute(hMat1,"NUMLIN","2");
 IupSetAttribute(hMat1,"NUMCOL","2");
 IupSetAttribute(hMat1,"NUMCOL_VISIBLE","2");
 IupSetAttribute(hMat1,"NUMLIN_VISIBLE","2");
 IupSetAttribute(hMat1,"HLCOLOR","0 0 255"); // This doesn't work
 IupSetAttribute(hMat1,"HLCOLORALPHA","255"); // This doesn't work
 pBtn1=IupButton(NULL,NULL);
 IupSetAttribute(pBtn1,"SIZE","45x");
 IupSetAttribute(pBtn1,"TITLE","SHOW :");
 IupSetCallback(pBtn1,"ACTION",addr cbBtnShow);
 pBox1=IupVbox(hMat1,pBtn1,NULL);
 pMainDlg=IupDialog();
 pMainCfg=IupConfig();
 IupSetAttribute(pMainCfg,"APP_FILENAME","./PolymerDB.cfg");
 IupConfigLoad(pMainCfg);
 IupSetAttributeHandle(NULL,"PARENTDIALOG",pMainDlg);
 IupSetAttribute(pMainDlg,"CONFIG",pMainCfg);
 IupConfigDialogShow(pMainCfg,pMainDlg,"PolymerDB");
 IupSetAttribute(pMainDlg,"TITLE","Polymer Database");
 IupMainLoop();
 IupDestroy(pMainDlg);
 return(EXIT_SUCCESS); }
void cbBtnShow() {
 IupConfigDialogShow(pMainCfg,pDlg1,"DatList");
 IupShow(pDlg1);
 IupSetAttribute(pMainDlg,"ACTIVE","NO");
 return(); }
void cbDlg1Close() {
 IupConfigDialogClosed(pMainCfg,pDlg1,"DatList");
 return(); }




You can leave off all the config stuff and it will still perform the same, but
I left it in anyways in case of some other issue I'm not aware of exists when
doing these kind of things.




Thanks,
Andrew


















On 2/16/2022 at 3:12 PM, Antonio Scuri  wrote:


Almost all predefined dialogs are simply IupDialog, except the native ones,
like IupFileDlg. Three is no extra management when a predefined dialogs is
shown.



Maybe you can build a simple sample code to reproduce your problem? And we
start from that.



Em qua., 16 de fev. de 2022 18:52, Andrew Robinson 
escreveu:




"You replied only to me"




Sorry. Will try to not let that happen again.




"When a dialog is closed the system brings the parent or another child to
foreground and it sets the focus. IUP actually doesn't interfere in the system
behavior."




This isn't about system behavior, this is about following proper programming
procedures. The Win10 documentation says you must call EndDialog to end a
modal dialog and apparently IUP does not do that for Windows and that is a
problem for IUP using custom dialogs.




"I tested here using the tools executable, like IupView or IupVisualLED, when
a child dialog is closed the main dialog gets its focus back."




The predefined dialogs will do that but a custom dialog will not. What do the
predefined dialogs do that the custom dialog does not (or is not documented to
do)?




Thanks,

Andrew




On 2/16/2022 at 12:51 PM, Antonio Scuri  wrote:



 Obs: You replied only to me, so I'm including the list in the reply again.




>  You say "I guess" but is that how it is actually done in for all the
predefined dialogs in IUP?




> Why interrupt that default sequence of events just so you can add a very
necessary IupSetFocus that you can never leave out or it will never work? That
default behavior doesn't make sense, it is not documented to function like
that, and the default behavior actually doesn't work.



There is no default behavior set by IUP. When a dialog is closed the system
brings the parent or another child to foreground and it sets the focus. IUP
actually doesn't interfere in the system behavior.



I tested here using the tools executable, like IupView or IupVisualLED, when a
child dialog is closed the main dialog gets its focus back.




Best,

Scuri




Em qua., 16 de fev. de 2022 às 16:15, Andrew Robinson 
escreveu:




To any other programmers out there that are experiencing this same issue, here
is my workaround (ps

Re: [Iup-users] SIMULATEMODAL

2022-02-16 Thread Andrew Robinson
"You replied only to me"




Sorry. Will try to not let that happen again.




"When a dialog is closed the system brings the parent or another child to
foreground and it sets the focus. IUP actually doesn't interfere in the system
behavior."




This isn't about system behavior, this is about following proper programming
procedures. The Win10 documentation says you must call EndDialog to end a
modal dialog and apparently IUP does not do that for Windows and that is a
problem for IUP using custom dialogs.




"I tested here using the tools executable, like IupView or IupVisualLED, when
a child dialog is closed the main dialog gets its focus back."




The predefined dialogs will do that but a custom dialog will not. What do the
predefined dialogs do that the custom dialog does not (or is not documented to
do)?




Thanks,

Andrew




On 2/16/2022 at 12:51 PM, Antonio Scuri  wrote:



 Obs: You replied only to me, so I'm including the list in the reply again.




>  You say "I guess" but is that how it is actually done in for all the
predefined dialogs in IUP?




> Why interrupt that default sequence of events just so you can add a very
necessary IupSetFocus that you can never leave out or it will never work? That
default behavior doesn't make sense, it is not documented to function like
that, and the default behavior actually doesn't work.



There is no default behavior set by IUP. When a dialog is closed the system
brings the parent or another child to foreground and it sets the focus. IUP
actually doesn't interfere in the system behavior.



I tested here using the tools executable, like IupView or IupVisualLED, when a
child dialog is closed the main dialog gets its focus back.




Best,

Scuri




Em qua., 16 de fev. de 2022 às 16:15, Andrew Robinson 
escreveu:




To any other programmers out there that are experiencing this same issue, here
is my workaround (psuedocode):




setAttribute pDlg1 "CLOSE_CB=Dlg1_Close_cb"

myButton_cb {

IupShow pDlg1
pMainDlg ACTIVE='NO' }

Dlg1_Close_cb {


pMainDlg ACTIVE='YES' }




Do not use SIMULATEMODAL='YES'. The advantage of this workaround is that you
can (I mean must) selectively make any other custom dialogs an exception to
the rule, if need be.




Thanks,

Andrew


On 2/16/2022 at 11:55 AM, Andrew Robinson  wrote:


Neither IupSetFocus not IupGetFocus works to resolve this issue. Do you have
any simple working code and app of how this is done?




NOTE: The examples IUP give are only examples of when the custom dialog is the
main dialog and not a child of the main dialog. Tecgraf/PUC-Rio really need to
rethink what they are doing here. Consider this scenario that I'm experiencing
where I do nothing but call IupShow:




1) Close the custom dialog

2) IUP hides the dialog with IupHide

3) The main parent never gets its focus back




Why interrupt that default sequence of events just so you can add a very
necessary IupSetFocus that you can never leave out or it will never work? That
default behavior doesn't make sense, it is not documented to function like
that, and the default behavior actually doesn't work. Why wouldn't the default
behavior have IupSetFocus a part of the default close routine?




Thanks,

Andrew





On 2/16/2022 at 7:44 AM, Andrew Robinson  wrote:


"IUP does not set focus after the dialog is closed"




I understand but you need to understand this needs to be documented behavior
since that is an expected behavior of custom modal dialogs in other IDEs.




"I guess you will have to set the focus yourself"




You say "I guess" but is that how it is actually done in for all the
predefined dialogs in IUP?




Thanks,

Andrew


On 2/16/2022 at 4:47 AM, Antonio Scuri  wrote:


  I guess you will have to set the focus yourself, calling IupFocus. You could
do that on CLOSE_CB.



  IUP does not set focus after the dialog is closed, this is highly dependent
on the system.



Em ter., 15 de fev. de 2022 às 20:59, Andrew Robinson 
escreveu:




Ola Antonio,




I have a custom dialog that I make visible with IupShow(). Then what? Clicking
the close_button closes the custom dialog but the focus never returns to the
parent dialog. I tried using CLOSE_CB to call IupHide and the return
IUP_IGNORE, but nothing seems to work as expected or as documented. How is
this supposed to be done?




Thanks,

Andrew
___
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] SIMULATEMODAL

2022-02-15 Thread Andrew Robinson
Ola Antonio,




I have a custom dialog that I make visible with IupShow(). Then what? Clicking
the close_button closes the custom dialog but the focus never returns to the
parent dialog. I tried using CLOSE_CB to call IupHide and the return
IUP_IGNORE, but nothing seems to work as expected or as documented. How is
this supposed to be done?




Thanks,

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


[Iup-users] Small nitpick

2022-02-09 Thread Andrew Robinson
Ola Antonio,




Online documentation for IUP - Version 3.30


GETFOCUS_CB

Action generated when an element is given keyboard focus. This callback is
called after the KILLFOCUS_CB of the element that loosed the focus. The
IupGetFocus function during the callback returns the element that loosed the
focus.

Lost is the opposite of found
Loosen is the opposite of tightened
Loosed is the opposite of fasten

It should read "the last element that lost focus" and not "the element that
loosed the focus"

I know: English sucks

Regards,

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


Re: [Iup-users] Cannot clearall

2022-01-21 Thread Andrew Robinson
MARKED=NULL works.


On 1/20/2022 at 5:15 PM, Andrew Robinson  wrote:


Hi Antonio,




After I have marked a line in a Matrix control using MARKL:C, I add another
line and mark that one, but the first does not unmark it like it does when I
do the same thing manually instead of programmatically. I tried
CLEARATTRIB="MARKED" and still no change in behavior. How do I make this work
as expected?




Thanks,

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


[Iup-users] Cannot clearall

2022-01-20 Thread Andrew Robinson
Hi Antonio,




After I have marked a line in a Matrix control using MARKL:C, I add another
line and mark that one, but the first does not unmark it like it does when I
do the same thing manually instead of programmatically. I tried
CLEARATTRIB="MARKED" and still no change in behavior. How do I make this work
as expected?




Thanks,

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


Re: [Iup-users] Problem Getting the Child Dialog to Minimize/Restore with Parent

2022-01-09 Thread Andrew Robinson
Isn't that what an IupSplit is?


On 1/8/2022 at 7:52 PM, Antonio Scuri  wrote:


>  What do non-Windows programmers do to achieve that?



  Simply use multiple windows. Or use tab based dialogs, where every profile
is displayed inside a Tab.




Best,

Scuri






Em sáb., 8 de jan. de 2022 às 16:38, Kaz Foxsen 
escreveu:


Do I even need MDI? I figured that the original programmer used it in
order to allow the user to open multiple profiles at the same time and
those different profiles could hold different information, but if I
can make it work with the normal parenting functions, then that would
be preferable. What do non-Windows programmers do to achieve that?

On Fri, Jan 7, 2022 at 7:31 AM Antonio Scuri  wrote:
>
> I don't know. MDI is very little used.
>
> PARENTDIALOG works very well for regular dialogs. I confirmed the minimize
behavior here, just in case.
>
> But when involves MDI everything changes. This behavior is controlled by the
system, IUP actually only configures parent and child settings.
>
> Best,
> Scuri
>
>
> Em sex., 7 de jan. de 2022 às 01:52, Kaz Foxsen 
escreveu:
>>
>> I've read that setting the PARENTDIALOG attribute is supposed to make
>> a child dialog minimize with the parent dialog, but can't get it to
>> work.
>>
>> The app I'm working on has a main window featuring a canvas as an MDI
>> Client. Whenever a user selects New File, a profile dialog is created.
>> Using that profile (which is set as an MDI child), the user can click
>> items to open various "module" dialogs to change settings. I set the
>> module dialogs to have the profile dialog as a parent, but when I
>> minimize the parent, the module doesn't minimize. If I don't set a
>> parent, the module will disappear under the main window if I click the
>> profile that spawned it.
>>
>> How can I fix this?
>>
>>
>> ___
>> 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 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] Flaw

2021-12-28 Thread Andrew Robinson
I'm using the C-calling convention so there is no constructor. Seeing as
CD_IUP is an alias for cdContextIup and CD_NATIVEWINDOW is an alias for
cdContextNativeWindow and they both have the same exact prototype, they should
work exactly alike -- except they don't. Maybe the documentation is missing
something or it is well hidden? It doesn't really matter since CD_IUP is
portable and CD_NATIVEWINDOW is not and at this point in history I'm more
interested in being portable, but issues are issues and they still need to be
reported for feedback.




I took your suggestion and changed the font from Courier to Comic Sans MS and
that seemed to work. I tried other fonts and the results varied. Arial was
corrupt but not as bad as Courier. It seems that monospaced fonts are affected
most (even Consolas) but proportional fonts are not. Microsoft doesn't appear
to have acknowledged the issue, even though I see hints of it on their
website, e.g. --
https://social.msdn.microsoft.com/Forums/vstudio/en-US/5ef2d2f7-5724-4abf-8252-54cec49eac88/quotcourier-newquot-font-visually-corrupted?forum=visualstudiogeneral.
I turned off ClearType and that cleared things up so this is definitely a
Microsoft feature ... uh, I mean bug.




This is an issue that needs to be documented in IUP since Microsoft doesn't
appear motivated to either acknowledge or repair the problem.




Thanks,

Andrew










On 12/28/2021 at 10:46 AM, Antonio Scuri  wrote:


NATIVEWINDOW is used by IUP, so you are actually using it. You may have some
issues using its constructor, but you are using it.



To replace the native Win32 driver by the OpenGL driver is not recommended,
unless you need OpenGL support.




You may try changing the font. Maybe Courier is not performing as expected at
that small size. Text rendering in native Windows is usually good and better
than the other drivers.Don't know exactly what's going on in that case.




Best,


Scuri






Em ter., 28 de dez. de 2021 às 14:14, Andrew Robinson 
escreveu:




I tried the other two drivers (NATIVEWINDOW and GL) and they don't work at all
on Windows, so do you have any recommendations for a workaround or alternate?




Thanks,
Andrew





On 2021-12-08 at 9:45 AM, Antonio Scuri  wrote:



  Ok So you are actually using the Win32 based driver.



  We use native functions to do the drawing. Text drawing is done by TextOut
Win32 api function. Whe text orientation is used we simply use CreateFont with
an angle parameter.




  So there isn't much I can do.




Best,

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


Re: [Iup-users] Flaw

2021-12-28 Thread Andrew Robinson
I tried the other two drivers (NATIVEWINDOW and GL) and they don't work at all
on Windows, so do you have any recommendations for a workaround or alternate?




Thanks,
Andrew





On 2021-12-08 at 9:45 AM, Antonio Scuri  wrote:



  Ok So you are actually using the Win32 based driver.



  We use native functions to do the drawing. Text drawing is done by TextOut
Win32 api function. Whe text orientation is used we simply use CreateFont with
an angle parameter.




  So there isn't much I can do.




Best,

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


Re: [Iup-users] Flaw

2021-12-08 Thread Andrew Robinson
Wow! That looks so unprofessional too! That's one more reason for me to
abandon Windows for good.




Speaking of abandoning the Microsoft Monopoly, IUP, CD, and IM all support
Linux/BSD so long as they also support GTK+, right? Also, I looked over the
IUP source code for HaikuOS and it appears to be just a C wrapper for the
HaikuOS C++ functions, is that correct? I'm not sure how to compile that
though. Are there step-by-step instructions for how to do that somewhere using
a generic C compiler?




Thanks,

Andrew


On 2021-12-08 at 10:33 AM, Antonio Scuri  wrote:


 And will never be resolved... For some time now we have created workarounds
in some controls for problems in Win32 API that are never changed because of
backward compatibility, I guess.



Em qua., 8 de dez. de 2021 às 14:30, Andrew Robinson 
escreveu:




Well that's cool. What you are implying is that Microsoft Windows has a
long-term flaw (or bug) that has never been resolved!


On 2021-12-08 at 9:45 AM, Antonio Scuri  wrote:



  Ok So you are actually using the Win32 based driver.



  We use native functions to do the drawing. Text drawing is done by TextOut
Win32 api function. Whe text orientation is used we simply use CreateFont with
an angle parameter.




  So there isn't much I can do.




Best,

Scuri






Em ter., 7 de dez. de 2021 11:43, Andrew Robinson 
escreveu:




Sorry about that. I told you I'm new to this ... anyways, it's CD_IUP.


On 2021-12-07 at 6:46 AM, Antonio Scuri  wrote:


You did when you call the cdCreateCanvas function, the parameter is the
driver. And if cdUseContextPlus is called.



Em ter., 7 de dez. de 2021 às 10:44, Andrew Robinson 
escreveu:




I presume it would have to be the default for Windows since I don't every
specify one.


On 2021-12-06 at 4:34 PM, Antonio Scuri  wrote:


  Which Driver?



Em seg., 6 de dez. de 2021 às 19:41, Andrew Robinson 
escreveu:




Ola Antonio,




I'm using cdCanvasTextOrientation and I see a flaw with the algorithm used.
When I rotate the text "Strength" by 45.0 degrees, I get the following result:









The characters are no longer aligned and the spacing between the characters
has changed. A 180 degree rotation has no issues, just all the ones inbetween
0 and 180.




Thanks,

Andrew




I'm using Win10, CD v5.11.1, and I'm using a cdCanvasFont of "Courier",
CD_BOLD, 10 pixels.
___
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] Flaw

2021-12-08 Thread Andrew Robinson
Well that's cool. What you are implying is that Microsoft Windows has a
long-term flaw (or bug) that has never been resolved!


On 2021-12-08 at 9:45 AM, Antonio Scuri  wrote:



  Ok So you are actually using the Win32 based driver.



  We use native functions to do the drawing. Text drawing is done by TextOut
Win32 api function. Whe text orientation is used we simply use CreateFont with
an angle parameter.




  So there isn't much I can do.




Best,

Scuri






Em ter., 7 de dez. de 2021 11:43, Andrew Robinson 
escreveu:




Sorry about that. I told you I'm new to this ... anyways, it's CD_IUP.


On 2021-12-07 at 6:46 AM, Antonio Scuri  wrote:


You did when you call the cdCreateCanvas function, the parameter is the
driver. And if cdUseContextPlus is called.



Em ter., 7 de dez. de 2021 às 10:44, Andrew Robinson 
escreveu:




I presume it would have to be the default for Windows since I don't every
specify one.


On 2021-12-06 at 4:34 PM, Antonio Scuri  wrote:


  Which Driver?



Em seg., 6 de dez. de 2021 às 19:41, Andrew Robinson 
escreveu:




Ola Antonio,




I'm using cdCanvasTextOrientation and I see a flaw with the algorithm used.
When I rotate the text "Strength" by 45.0 degrees, I get the following result:









The characters are no longer aligned and the spacing between the characters
has changed. A 180 degree rotation has no issues, just all the ones inbetween
0 and 180.




Thanks,

Andrew




I'm using Win10, CD v5.11.1, and I'm using a cdCanvasFont of "Courier",
CD_BOLD, 10 pixels.
___
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] Flaw

2021-12-07 Thread Andrew Robinson
Sorry about that. I told you I'm new to this ... anyways, it's CD_IUP.


On 2021-12-07 at 6:46 AM, Antonio Scuri  wrote:


You did when you call the cdCreateCanvas function, the parameter is the
driver. And if cdUseContextPlus is called.



Em ter., 7 de dez. de 2021 às 10:44, Andrew Robinson 
escreveu:




I presume it would have to be the default for Windows since I don't every
specify one.


On 2021-12-06 at 4:34 PM, Antonio Scuri  wrote:


  Which Driver?



Em seg., 6 de dez. de 2021 às 19:41, Andrew Robinson 
escreveu:




Ola Antonio,




I'm using cdCanvasTextOrientation and I see a flaw with the algorithm used.
When I rotate the text "Strength" by 45.0 degrees, I get the following result:









The characters are no longer aligned and the spacing between the characters
has changed. A 180 degree rotation has no issues, just all the ones inbetween
0 and 180.




Thanks,

Andrew




I'm using Win10, CD v5.11.1, and I'm using a cdCanvasFont of "Courier",
CD_BOLD, 10 pixels.
___
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] Flaw

2021-12-07 Thread Andrew Robinson
I presume it would have to be the default for Windows since I don't every
specify one.


On 2021-12-06 at 4:34 PM, Antonio Scuri  wrote:


  Which Driver?



Em seg., 6 de dez. de 2021 às 19:41, Andrew Robinson 
escreveu:




Ola Antonio,




I'm using cdCanvasTextOrientation and I see a flaw with the algorithm used.
When I rotate the text "Strength" by 45.0 degrees, I get the following result:









The characters are no longer aligned and the spacing between the characters
has changed. A 180 degree rotation has no issues, just all the ones inbetween
0 and 180.




Thanks,

Andrew




I'm using Win10, CD v5.11.1, and I'm using a cdCanvasFont of "Courier",
CD_BOLD, 10 pixels.
___
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] Flaw

2021-12-06 Thread Andrew Robinson
Ola Antonio,




I'm using cdCanvasTextOrientation and I see a flaw with the algorithm used.
When I rotate the text "Strength" by 45.0 degrees, I get the following result:









The characters are no longer aligned and the spacing between the characters
has changed. A 180 degree rotation has no issues, just all the ones inbetween
0 and 180.




Thanks,

Andrew




I'm using Win10, CD v5.11.1, and I'm using a cdCanvasFont of "Courier",
CD_BOLD, 10 pixels.
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] How do you get Flat controls to work in Lua?

2021-12-05 Thread Andrew Robinson
>  I'm not sure if when you are saying "nodes" that you really mean "leaves".

"Node” is the general term that includes both “branches” and “leaves”.
https://www.tecgraf.puc-rio.br/iup/en/elem/iuptree_attrib.html#nodes



But branches and leaves are not the same thing. "Node" should only be used
when generically referring to branches, leaves, and root. When referring to
just a branch or a leaf or root, "node" should not be used to reduce
confusion.



> I see TITLEFONTSTYLEid is used for nodes and titlefont for leaves





  They can be used with either kind of node.

TITLEFONTid is like what you did with TITLEFONT (but “id” is the number of the
node you want to change) where you specify font face, style, and size.

TITLEFONTSTYLEid lets you set the style (like “Bold” or “Italic”) without
changing other aspects of the font.


I can see that since TITLEFONTSTYLEid and titlefont are used for nodes (read:
branches and leaves and the root), they are universal functions. That should
mean whatever you can do with a branch and it's text, you can do the same
thing with a leaf or root using that same function and syntax.




Now with terminology out of the way, I looked at your code for flattree and I
don't see anywhere in the documentation where ADDBRANCH-1 is a valid term,
since the "id" in ADDBRANCHid is always a positive whole number. "If id is
empty or invalid, then the focus node is used as reference node" and I think
the focus node should be the root node, but that just means nothing should
happen. To address the root node it looks like ADDBRANCH with no id should be
used and not ADDBRANCH-1.




Hope this helps,

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


Re: [Iup-users] How do you get Flat controls to work in Lua?

2021-12-04 Thread Andrew Robinson
I monitor conversations here because I presume that if someone brings up an
issue, no matter how simple or complicated, that I will have the same issue
unless I pay attention to what it being said. I think one of my problems with
this particular conversation is the terminology. I'm not sure if when you are
saying "nodes" that you really mean "leaves". Looking at the documentation for
setting font style, I see TITLEFONTSTYLEid is used for nodes and titlefont for
leaves. I'm too busy to experiment with IupTree at this time, and I have no
experience (yet) with IupTree, so I want to understand this before I do.


On 2021-12-03 at 8:59 PM, Kaz F  wrote:



I don’t oppose more help! :)



Something like that, but that works better if you’re setting it up as a table
to begin with rather than adding nodes.

I was hoping there was a way to set it for this:



modtree["addbranch-1"] = "MODULES"




From: Andrew Robinson
Sent: Friday, December 3, 2021 8:15 PM
To: IUP discussion list.
Cc: IUP discussion list.
Subject: Re: [Iup-users] How do you get Flat controls to work in Lua?




I'm probably going to get in trouble for butting into someone else's
conversation, but do you mean something like this:





{

  "Red","Orange","Yellow","Green","Blue","Purple";

  branchname = "COLOR"

  leafname = "yellow", titlefont = "Courier, Bold, 14"

};





On 2021-12-03 at 4:38 PM, Kaz F  wrote:


What I meant was, is it possible to set the style during the same step as
creation, like how one can create a button that has bold text with this code:



iup.button{title = ”button”, fontstyle = "Bold"}



I’m guessing not, since the code format for creating a branch is different
from creating a button, but I figured I might as well ask.








From: Antonio Scuri
Sent: Friday, December 3, 2021 7:57 AM
To: IUP discussion list.
Subject: Re: [Iup-users] How do you get Flat controls to work in Lua?




  What do you mean? I run your code and this is the result:











  It is bold...





Best,


Scuri








Em qui., 25 de nov. de 2021 às 02:51, Kaz F  escreveu:




I was able to get the following code to work, but is there a way to set the
“ICONS” branch to display in bold text when the branch is created?



--CODE

require("iuplua")



local tree = iup.flattree{rastersize="400x500"}



tree["addbranch-1"] = "ICONS" -- add root node

tree:SetNodeAttributes(0,{titlefontstyle = "Bold"}) --make root node bold.



local tlist = {

{

  "Red","Orange","Yellow","Green","Blue","Purple";

  branchname = "COLOR"

};

{

  "Ranged","Melee","Summon","Heal";

  branchname = "POWERS"

};

}

iup.TreeAddNodes(tree, tlist)



local testdlg = iup.dialog{iup.vbox{tree;ncmargin = "25 x 25"}; title = "Test
Window"}

testdlg:showxy(iup.CENTER, iup.CENTER)



if (iup.MainLoopLevel()==0) then

iup.MainLoop()

end




From: Ola Zetterqvist
Sent: Saturday, November 20, 2021 9:58 AM
To: iup-users@lists.sourceforge.net
Subject: Re: [Iup-users] How do you get Flat controls to work in Lua?



Thanks for the clarification, I needed that. 



Best,

Ola Zetterqvist








Den 2021-11-20 kl. 14:40, skrev Antonio Scuri:



  One very important difference between IupTree andIpFlatTre is that the flat
version does not include a default root node. That's why the solution proposed
by Ola works.





  Regarding the error in Lua this can be done:





--tree.ADDBRANCH-1 = "NFL"; -- Error in lua


tree["ADDBRANCH-1"] = "NFL";





Best,


Scuri








Em sáb., 20 de nov. de 2021 às 08:33, Ola Zetterqvist 
escreveu:



Hello,

Have found a solution that works.
Used flattree in C and it has worked,  where "ADDBRANCH-1" is used for the
first node but lua does not understand the syntax, one must use

iup.SetAttribute(tree, "ADDBRANCH-1", "Lua tree");


require("iuplua")
tree = iup.flattree{}

local dlg = iup.dialog{tree; size = "200x150",title = "Test Window"}

iup.SetAttribute(tree, "ADDBRANCH-1", "Lua tree");

--tree.ADDBRANCH-1 = "NFL"; -- Error in lua

tree.TITLE ="Test tree" -- Change "Lua tree" title
tree.ADDBRANCH0 = "AFC";
tree.ADDBRANCH1 = "EAST";
tree.ADDLEAF2 = "Patriots";
tree.ADDLEAF3 = "Bills";
tree.ADDLEAF4 = "Jets";
tree.ADDLEAF5 = "Dolphins";
tree.INSERTBRANCH2 = "North";
tree.ADDLEAF7 = "Ravens";
tree.ADDLEAF8 = "Steelers";
tree.ADDLEAF9 = "Browns"

Re: [Iup-users] How do you get Flat controls to work in Lua?

2021-12-03 Thread Andrew Robinson
I'm probably going to get in trouble for butting into someone else's
conversation, but do you mean something like this:





{

  "Red","Orange","Yellow","Green","Blue","Purple";

  branchname = "COLOR"

  leafname = "yellow", titlefont = "Courier, Bold, 14"

};




On 2021-12-03 at 4:38 PM, Kaz F  wrote:



What I meant was, is it possible to set the style during the same step as
creation, like how one can create a button that has bold text with this code:



iup.button{title = ”button”, fontstyle = "Bold"}



I’m guessing not, since the code format for creating a branch is different
from creating a button, but I figured I might as well ask.








From: Antonio Scuri
Sent: Friday, December 3, 2021 7:57 AM
To: IUP discussion list.
Subject: Re: [Iup-users] How do you get Flat controls to work in Lua?




  What do you mean? I run your code and this is the result:











  It is bold...





Best,


Scuri








Em qui., 25 de nov. de 2021 às 02:51, Kaz F  escreveu:




I was able to get the following code to work, but is there a way to set the
“ICONS” branch to display in bold text when the branch is created?



--CODE

require("iuplua")



local tree = iup.flattree{rastersize="400x500"}



tree["addbranch-1"] = "ICONS" -- add root node

tree:SetNodeAttributes(0,{titlefontstyle = "Bold"}) --make root node bold.



local tlist = {

{

  "Red","Orange","Yellow","Green","Blue","Purple";

  branchname = "COLOR"

};

{

  "Ranged","Melee","Summon","Heal";

  branchname = "POWERS"

};

}

iup.TreeAddNodes(tree, tlist)



local testdlg = iup.dialog{iup.vbox{tree;ncmargin = "25 x 25"}; title = "Test
Window"}

testdlg:showxy(iup.CENTER, iup.CENTER)



if (iup.MainLoopLevel()==0) then

iup.MainLoop()

end




From: Ola Zetterqvist
Sent: Saturday, November 20, 2021 9:58 AM
To: iup-users@lists.sourceforge.net
Subject: Re: [Iup-users] How do you get Flat controls to work in Lua?



Thanks for the clarification, I needed that. 



Best,

Ola Zetterqvist








Den 2021-11-20 kl. 14:40, skrev Antonio Scuri:



  One very important difference between IupTree andIpFlatTre is that the flat
version does not include a default root node. That's why the solution proposed
by Ola works.





  Regarding the error in Lua this can be done:





--tree.ADDBRANCH-1 = "NFL"; -- Error in lua


tree["ADDBRANCH-1"] = "NFL";





Best,


Scuri








Em sáb., 20 de nov. de 2021 às 08:33, Ola Zetterqvist 
escreveu:



Hello,

Have found a solution that works.
Used flattree in C and it has worked,  where "ADDBRANCH-1" is used for the
first node but lua does not understand the syntax, one must use

iup.SetAttribute(tree, "ADDBRANCH-1", "Lua tree");


require("iuplua")
tree = iup.flattree{}

local dlg = iup.dialog{tree; size = "200x150",title = "Test Window"}

iup.SetAttribute(tree, "ADDBRANCH-1", "Lua tree");

--tree.ADDBRANCH-1 = "NFL"; -- Error in lua

tree.TITLE ="Test tree" -- Change "Lua tree" title
tree.ADDBRANCH0 = "AFC";
tree.ADDBRANCH1 = "EAST";
tree.ADDLEAF2 = "Patriots";
tree.ADDLEAF3 = "Bills";
tree.ADDLEAF4 = "Jets";
tree.ADDLEAF5 = "Dolphins";
tree.INSERTBRANCH2 = "North";
tree.ADDLEAF7 = "Ravens";
tree.ADDLEAF8 = "Steelers";
tree.ADDLEAF9 = "Browns";
tree.ADDLEAF10 = "Bengals";

dlg:map()
dlg:showxy(iup.CENTER, iup.CENTER)

if (iup.MainLoopLevel()==0) then
iup.MainLoop()
end








Best,

Ola Zetterqvist








Den 2021-11-20 kl. 08:24, skrev Kaz F:



Hello,
I can’t figure out how to get iup.flattree to work and couldn’t find any
examples in Lua.
I can get iup.tree to work just fine, but changing it to iup.flattree leaves
me with an empty square in my dialog.
Is there an additional “require” that I’m missing?
Thanks,
Kaz


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 mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] IupFrame

2021-08-24 Thread Andrew Robinson
Never mind. Hidden error prevented code from updating.


On 2021-08-24 at 5:43 PM, Andrew Robinson  wrote:


Hi,




Setting "VISIBLE=NO" has no effect on IupFrame




Bye,

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


[Iup-users] IupFrame

2021-08-24 Thread Andrew Robinson
Hi,




Setting "VISIBLE=NO" has no effect on IupFrame




Bye,

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


Re: [Iup-users] scintilla LOADLEXERLIBRARY

2021-08-07 Thread Andrew Robinson
Try using DisableThreadLibraryCalls() in the DLLmain function of your DLL to
disable thread attach/detach notifications that aren't present for normally
loaded DLLs.

On 2021-08-06 at 7:32 PM, breadstick  wrote:
>The Lua script stays open because I do the message loop with iup.MainLoop().
The scintilla object is still there.
>
>The dll is loaded when I set loadlexerlibrary="some.dll". I know because the
code in the dll reaches DLL_PROCESS_ATTACH in DllMain().
>What happens is that it gets immediately unloaded (so it reaches
DLL_PROCESS_DETACH).
>
>Some example code:
>
>edit.loadlexerlibrary = "lexluthor.dll"
>print("hi")
>edit.lexerlanguage = "luthor"
>print(edit.lexerlanguage)
>...
>iup.MainLoop()
>
>Here, Lua loads the dll, then unloads it, then prints "hi", then prints
"nil", and then does the main loop.
>I don't know what triggers the unload, because I'm using the very same dll in
the test C program and the lexer works.
>
>Thanks
>
>
>
>On Fri, 6 Aug 2021 13:59:20 -0300
>Antonio Scuri  wrote:
>
>>   When setting that IUP attribute what we do is exactly the same thing.
>> 
>>   It unloads after the script is ended? I mean It actually worked inside
>> the script then is unloaded somehow after that?
>> 
>>   Is the Scintilla object destroyed when the script ends?
>> 
>> Best,
>> Scuri
>> 
>> 
>
>
>___
>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] IupProgressBar

2020-07-16 Thread Andrew Robinson
On 2020-07-16 at 1:02 PM, supp...@scriptbasic.org wrote:
>The IupGauge control is great.
>
>Thanks for the suggestion.

Antonio,

Could you please explain the difference between IupGauge and IupProgressBar?
It seems as if there is none and therefore IupProgressBar should be
depreciated because it appears as if it doesn't always supports the DASHED
attribute like IupGauge always does.

Also, why is there an IupProgressDlg but no corresponding IupGaugeDlg?

Regards,
Andres



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


Re: [Iup-users] IUP assorted issues

2020-07-01 Thread Andrew Robinson
Do you want me to reply to this because I would gladly reply to it.
Em qua., 3 de jun. de 2020 às 21:36, Ranier Vilela 
escreveu:

De: Andrew Robinson 
Enviado: quarta-feira, 3 de junho de 2020 23:23
Para: IUP discussion list.
Assunto: Re: [Iup-users] IUP assorted issues

>so I'm ignoring you from now on.
Please, do me this favor.

___
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] Source code license comments; IUP/CD/IM notes

2020-06-08 Thread Andrew Robinson
The GPL license in no way, shape, or form says you can supersede or bypass GPL
with some other license. You are stating as fact something which you most
definitely did not read from the license itself and that meets the definition
for gaslighting, i.e. -- trying to make someone who has read the GPL into
believing the GPL says something other than what they read.


Case in point: the GPL specifically says, "to 'convey' a work means any kind
of propagation that enables other parties to make or receive copies" of a
program, and since IUP is "conveying" about 13 GPL programs by including
copies of those GPL programs and, even if it didn't include those copies, it
has source code within the IUP program to specifically call those 13 GPL
programs, they seem to be ignoring the GPL clause that "nothing other than
this [GPL] License grants you permission to propagate or modify any covered
work. These actions infringe copyright if you do not accept this License".


That seems to tell me that if your code contains any calls to any GPL
components, your entire code falls under the GPL license. In other words, by
linking to GPL code, it supersedes any license you may think you have. And to
prove to you I'm not BS'ing or gaslighting or making things up or switching
the argument from one thing to another (strawman), here is a link to the
license: https://www.gnu.org/licenses/gpl-3.0.en.html


Regards,
Andres


PS -- The etymology of the word gaslight, only describes how the word was
ORIGINALLY used and not how the word is CURRENTLY used (and dictionaries are
only supposed to define how words are currently defined, otherwise it is would
be a dictionary that serves no purpose for communication). The current usage
of the word is how the link I gave to you for the definition defined it. You
can verify this is correct by reading current American newspapers where this
word is currently often used. Therefore calling an argument a strawman
argument or gaslighting is not "dismissive", it is descriptive of the type of
argument. A dismissive argument would end the conversation but I'm keeping the
conversation going by bringing the conversation back on topic. 


Any negative/positive connotations of these words would be due to personal
interpretation and not objective fact. Since I don't know you intentions, I
will reserve judgment on that for now.


On 2020-06-08 at 12:02 PM, sur-behoffski 
wrote:
 [Reply is below original message -- not top-posted.]


- Original Message -

From:
arobinso...@cox.net

To:
"sur-behoffski" 

Cc:


Sent:
Mon, 8 Jun 2020 06:44:07 -0700

Subject:
Re[3]: [Iup-users] Source code license comments; IUP/CD/IM notes



I very carefully read the license and it makes it appear that the bottom line
is if you wrote code to specifically link to anything GNU/GPL, your entire
project automatically falls under the GNU/GPL license (and so does anything
that uses your project). It doesn't matter if the end users don't use those
specific GNU/GPL functions or even if you don't ship any GNU/GPL components
with your project, the fact that you wrote code to link to a specific GNU/GPL
component makes your entire project a GNU/GPL project. Richard Stallman even
suggested that IUP was in violation, and he is a subject matter expert on
these matters.


Anything else not from an official source or the result of a lawsuit or from a
subject matter expert, would be gaslighting ... er, a strawman argument or BS
or propaganda ... er, not at all reflective of the truth, and I am only
interested in the pursuit of the truth.


Regards,
Andres

[...]


 (Start sur-behoffski's reply -- NOT top-posted!) 

Bingo.  We're on the same page now.  I'm (very) happy.  The earlier Tecgraf
top-level copyright
*appeared* to blanket-relicense everything as MIT/Permissive, which (of
course) the various
licenses in lower-down did not permit.  Note, again, that the trigger is the
point at which the
combined sources are distributed/published:  While the code remains strictly
in-house, you can
mix and match freely.

One final comment:  The film "Gaslight" was about a manipulative, sinister and
powerful
perpetrator using techniques to disorient a vulnerable victim... and, as such,
the term
"gaslighting" is not neutral -- it tends to imply sinister intent and/or
motives being wielded by the
recipient of the term:  The term is fraught with danger, and should not be
used (gas??)lightly, as
it can be seen as inflammatory.  "Strawman" is also negative/dismissive,
although it does not
imply such sinister motive -- the target may be simply using a dubious
debating technique.

Summing up:  As my (deceased, dear) father said:  "Given a contradiction
between a person's
words and their actions, the actions are the more reliable guide as to their
state of mind."

cheers,

sur-behoffski (Brenton Hoff)
programmer, Grouse Software
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourc

Re: [Iup-users] Source code license comments; IUP/CD/IM notes

2020-06-07 Thread Andrew Robinson
We aren't talking about the API, but the code to which the API links to.

Don't try to gaslight me.

Regards,
Andres

On 2020-06-06 at 4:09 PM, Germán Arias  wrote:
>Hi
>
>The API of a GPL library is not protected by the GPL. In fact FSF claim
>that APIs should be public. So, other people can create alternative
>libraries using the "same" API. Even GNU do this. See for example the R
>language (reimplementation of S language), GNU Octave (a free software
>version of MathLab program and language) or GNUstep libraries (an
>alternative to MacOS Cocoa). All this with many functions and API in common.
>
>Also, see the FSF position at Oracle vrs Google:
>
>https://www.fsf.org/blogs/licensing/fsf-statement-on-court-of-appeals-ruling-in-oracle-v-google
>
>The API could be there, but if isn't a derivative work (a modified
>version of the original source code at the GPL package) and isn't linked
>with a GPL package, there isn't problem.
>
>Regards
>
>
>On 6/6/20 9:19 AM, Andrew Robinson wrote:
>> PS -- "The project itself does not violate the GPL in any way"
>>
>> Remember that GPL is a copyleft license, and that appears to mean that any
>> software that is written based on using or calling any GPL component,
>> automatically means that the entire project falls under the GPL license. I
am
>> looking at the source code for IUP right now and it has source code that
>> incorporates GPL components via hard-coded Application Programming
Interface
>> (API) calls, a fact that is also reflected in the documentation for the IUP
>> API. Therefore it is irrelevant if a user/programmer uses those APIs or
not.
>> What is relevant is that if IUP incorporates any GPL components, even in an
>> API call, would seem to imply that IUP by default must also fall under the
GPL
>> license. So is IUP really GPL in disguise or is it something else? I think
we
>> should let the lawyers decide this matter amongst themselves because I'm
not
>> sure anymore.
>>
>> Regards,
>> Andres
>>
>> On 2020-06-06 at 6:54 AM, "Andrew Robinson"  wrote:
>>> On 2020-06-05 at 5:39 PM, sur-behoffski 
wrote:
>>>> G'day all,
>>>>
>>>> [Sorry for breaking the thread -- digest strikes again...]
>>>>
>>>> Like RMS, I strongly dislike "Open Source" as an umbrella term, and
strongly
>>>> prefer "Free (as in Freedom)" or "Libre" (e.g. LibreOffice):  The
underlying
>>>> concepts are massively, massively different.
>>> Speaking of "underlying concepts", from the history and philosophy of GNU
on
>>> Wikipedia at https://en.wikipedia.org/wiki/GNU, we can read where it says
>> "The
>>> goal [of GNU] was to bring a completely free software operating system
into
>>> existence. Stallman wanted computer users to be free to study the source
code
>>> of the software they use, share software with other people, modify the
>>> behavior of software, and publish their modified versions of the software.
>>> This philosophy was later published as the GNU Manifesto in March 1985".
Has
>>> that philosophy massively, massively changed since then? Not that I can
see.
>>>
>>> Speaking of "massively, massively different", from the FREQUENTLY ASKED
>>> QUESTIONS ABOUT THE GNU LICENSES at
>>> https://www.gnu.org/licenses/gpl-faq.en.html#DoesTheGPLAllowMoney, we can
>> read
>>> where it says "Does the GPL allow me to sell copies of the program for
money?
>>> Yes, the GPL allows everyone to do this. The right to sell copies is part
of
>>> the definition of free software. Except in one special situation, there is
no
>>> limit on what price you can charge". Do you expect me to believe that
"free"
>>> software means "there is no limit on what price you can charge" for it?
>>>
>>> Okay, so enough of your word games (and theirs), let's get a third opinion
>> >from some subject matter experts, say like the OSI (Open Source
Initiative).
>>> The OSI specifically states on their website at
>>> https://opensource.org/faq#free-software, that "'Free software' and 'open
>>> source software' are two terms for the same thing". Wow! That makes it
sound
>>> like they aren't all that "massively, massively different" to me. All this
>>> word play alone is a very good reason to always be skeptical of
>>> open-source/free software licenses, especially US-centric ones basically
>>> claiming to be 

Re: [Iup-users] Source code license comments; IUP/CD/IM notes

2020-06-06 Thread Andrew Robinson
PS -- "The project itself does not violate the GPL in any way"

Remember that GPL is a copyleft license, and that appears to mean that any
software that is written based on using or calling any GPL component,
automatically means that the entire project falls under the GPL license. I am
looking at the source code for IUP right now and it has source code that
incorporates GPL components via hard-coded Application Programming Interface
(API) calls, a fact that is also reflected in the documentation for the IUP
API. Therefore it is irrelevant if a user/programmer uses those APIs or not.
What is relevant is that if IUP incorporates any GPL components, even in an
API call, would seem to imply that IUP by default must also fall under the GPL
license. So is IUP really GPL in disguise or is it something else? I think we
should let the lawyers decide this matter amongst themselves because I'm not
sure anymore.

Regards,
Andres

On 2020-06-06 at 6:54 AM, "Andrew Robinson"  wrote:
>On 2020-06-05 at 5:39 PM, sur-behoffski  wrote:
>>G'day all,
>>
>>[Sorry for breaking the thread -- digest strikes again...]
>>
>>Like RMS, I strongly dislike "Open Source" as an umbrella term, and strongly
>>prefer "Free (as in Freedom)" or "Libre" (e.g. LibreOffice):  The underlying
>>concepts are massively, massively different.
>
>Speaking of "underlying concepts", from the history and philosophy of GNU on
>Wikipedia at https://en.wikipedia.org/wiki/GNU, we can read where it says
"The
>goal [of GNU] was to bring a completely free software operating system into
>existence. Stallman wanted computer users to be free to study the source code
>of the software they use, share software with other people, modify the
>behavior of software, and publish their modified versions of the software.
>This philosophy was later published as the GNU Manifesto in March 1985". Has
>that philosophy massively, massively changed since then? Not that I can see.
>
>Speaking of "massively, massively different", from the FREQUENTLY ASKED
>QUESTIONS ABOUT THE GNU LICENSES at
>https://www.gnu.org/licenses/gpl-faq.en.html#DoesTheGPLAllowMoney, we can
read
>where it says "Does the GPL allow me to sell copies of the program for money?
>Yes, the GPL allows everyone to do this. The right to sell copies is part of
>the definition of free software. Except in one special situation, there is no
>limit on what price you can charge". Do you expect me to believe that "free"
>software means "there is no limit on what price you can charge" for it?
>
>Okay, so enough of your word games (and theirs), let's get a third opinion
>from some subject matter experts, say like the OSI (Open Source Initiative).
>The OSI specifically states on their website at
>https://opensource.org/faq#free-software, that "'Free software' and 'open
>source software' are two terms for the same thing". Wow! That makes it sound
>like they aren't all that "massively, massively different" to me. All this
>word play alone is a very good reason to always be skeptical of
>open-source/free software licenses, especially US-centric ones basically
>claiming to be your best friend.
>
>But to get back to the actual topic here, the issue isn't the difference in
>meaning between the word "free" and the term "open-source". That is merely a
>red herring. The issue here is what does the GNU license say you can or
cannot
>do with your product if you incorporate any of their products into your
>products API? It says your product will by default fall under the GNU
license,
>and (according to OPEN SOURCE LICENSES EXPLAINED at
>https://resources.whitesourcesoftware.com/blog-whitesource/open-source-licenses-explained),
>"GPL is a copyleft license. This means that any software that is written
based
>on any GPL component must be released as open source. The result is that any
>software that uses any GPL open source component (regardless of its
percentage
>in the entire code) is required to release its full source code and all of
the
>rights to modify and distribute the entire code".
>
>You can't gaslight me with your word games here, so don't even try.
>
>Regards,
>Andres



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


Re: [Iup-users] Source code license comments; IUP/CD/IM notes

2020-06-06 Thread Andrew Robinson
On 2020-06-05 at 5:39 PM, sur-behoffski  wrote:
>G'day all,
>
>[Sorry for breaking the thread -- digest strikes again...]
>
>Like RMS, I strongly dislike "Open Source" as an umbrella term, and strongly
>prefer "Free (as in Freedom)" or "Libre" (e.g. LibreOffice):  The underlying
>concepts are massively, massively different.

Speaking of "underlying concepts", from the history and philosophy of GNU on
Wikipedia at https://en.wikipedia.org/wiki/GNU, we can read where it says "The
goal [of GNU] was to bring a completely free software operating system into
existence. Stallman wanted computer users to be free to study the source code
of the software they use, share software with other people, modify the
behavior of software, and publish their modified versions of the software.
This philosophy was later published as the GNU Manifesto in March 1985". Has
that philosophy massively, massively changed since then? Not that I can see.

Speaking of "massively, massively different", from the FREQUENTLY ASKED
QUESTIONS ABOUT THE GNU LICENSES at
https://www.gnu.org/licenses/gpl-faq.en.html#DoesTheGPLAllowMoney, we can read
where it says "Does the GPL allow me to sell copies of the program for money?
Yes, the GPL allows everyone to do this. The right to sell copies is part of
the definition of free software. Except in one special situation, there is no
limit on what price you can charge". Do you expect me to believe that "free"
software means "there is no limit on what price you can charge" for it?

Okay, so enough of your word games (and theirs), let's get a third opinion
from some subject matter experts, say like the OSI (Open Source Initiative).
The OSI specifically states on their website at
https://opensource.org/faq#free-software, that "'Free software' and 'open
source software' are two terms for the same thing". Wow! That makes it sound
like they aren't all that "massively, massively different" to me. All this
word play alone is a very good reason to always be skeptical of
open-source/free software licenses, especially US-centric ones basically
claiming to be your best friend.

But to get back to the actual topic here, the issue isn't the difference in
meaning between the word "free" and the term "open-source". That is merely a
red herring. The issue here is what does the GNU license say you can or cannot
do with your product if you incorporate any of their products into your
products API? It says your product will by default fall under the GNU license,
and (according to OPEN SOURCE LICENSES EXPLAINED at
https://resources.whitesourcesoftware.com/blog-whitesource/open-source-licenses-explained),
"GPL is a copyleft license. This means that any software that is written based
on any GPL component must be released as open source. The result is that any
software that uses any GPL open source component (regardless of its percentage
in the entire code) is required to release its full source code and all of the
rights to modify and distribute the entire code".

You can't gaslight me with your word games here, so don't even try.

Regards,
Andres



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


Re: [Iup-users] Fw: IUP License Questions

2020-06-05 Thread Andrew Robinson
Tysen,

On 2020-06-05 at 9:10 AM, "Moore, Tysen"  wrote:
>Ranier,

>My reasoning for my initial email was not to cause a big fight in this list.

Everyone knows you didn't mean for that to happen. The "big fight" you are
seeing is just people who like to fight to have a reason to fight.

>I was bringing this to the attention of the list in case the maintainers or
users were unaware of these issues.

For that I thank you because I wasn't aware of those issues either. I wasn't
expecting that because ALL the advertisement for IUP only brags about how free
and unemcumbered they are in any way, shape, or form, but incorporating
functions calls for GPL source code into your --> API <-- and then claiming
they are "completely separate from your product" is not an accurate summary of
what IUP is actually doing then. IUP is completely free and unemcumbered but
you will find certain IUP API functions that are not. Which functions and
which sofware that goes with those functions? Go look it up yourself.

>I was also looking for some guidance for best practices to resolve these
issues.

Sometimes these things can only be settled by a disinterested third party with
no conflict of interest ... or really, really nice lawyers.

>My suggestion was for a benign change to the top level docs to clearly list
third party code that one should be aware of.  If the maintainers of IUP don't
want to do this, that is their decision.  Again, my thought was a suggestion
for [apparently debatable] improvement.  No harm.

No HONEST person can fault you for doing the right thing.

Like yourself, I too am waiting to see how IUP will respond to your innocent
and objective observation(s). So far IUP's first response basically appears to
be "Go look it up yourself", which isn't a good thing because that will only
lead to websites all around the world having to put warnings in their
advertisements about IUP having a few IUP API functions that are not a part of
the IUP license but are GPL instead, all you have to do is just search through
the source code and documentation for it and avoid it if you don't agree with
GPL.

At least now I am seeing them beginning to at least question the friendliness
of any third party products (FFTW and PdfLib) that are "completely separately"
but directly incorporated into the IUP API and zip file, so that is a good
sign. So maybe what you did will have a good effect.

Regards,
Andres

PS -- To make this picture complete to anyone on or off the IUP forums who may
be monitoring this conversation (FBI? CIA? NSA? Some American-based privacy
invading spy organization?), this is an important issue because some people
religiously believe that GPL is great because it means software that can be
freely accessed, used, changed, and shared, but other people believe that GPL
can't be trusted because it was written by lawyers that don't actually work
for them, number one, and two, because it appears to be a sneaky way for other
people to steal your ideas for free and then make money off of it, and you
will never get as much credit for it as they do, because you must release your
application as freely accessible, usable, changeable, and sharable for them to
peruse.



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


Re: [Iup-users] IUP assorted issues

2020-06-03 Thread Andrew Robinson
Ranier,

No one ever asked you for a link to all the various licenses of the
non-Tecgraf products in IUP. I already have a much better link for that here:
https://tldrlegal.com/license/gnu-general-public-license-v3-(gpl-3).
Furthermore, no one is asking you if IUP is compatiable with these other
licenses (so far it is). What the original topic was, and still is, is why
isn't there a list of alln on-Tecgraf licensed products in the IUP
documentation where it belongs? Can you explain that? No, because you wouldn't
know that.

Yes IUP is obviously compatible with GNU, but that doesn't mean GNU is
compatiable with IUP. Case in point: If you have an application that you don't
want to open source, you cannot use any of the GNU licensed components in IUP.
That is why is very important to have a list of anything in your product that
could cause legal problems, requirements like you must disclose your source
code (or pay a fee for) your formerly closed code product because you used a
GNU product. 

So that brings up the quesiton of what exactly is "IUP". Is it a product
linked to a bunch of GNU products or is it only bundled? Does that make a
difference? Can you explain that? No, because you wouldn't know that.

The GNU license says you must disclose your source code for your product if
you link their product with yours, but Antonio says IUP isn't linking to any
GNU products, they are only "bundling" it. I don't like to play word games
with lawyers and that is exactly what that appears to be. I would feel much
better, if like every other product in the world, IUP kept a list of all the
non-Tecgraf products in the copyright(s) or credits section, so we won't have
to worry if we missed something that isn't exactly clearly documented and we
could be sued for.

So your irrelevant and off-topic comments about URLS to explanations of
various licenses just needlessly clutters the conversation. You don't know
what everyone else is talking about yet you go on talking like you know
everything and that is exactly why I will never trust your opinion -- because
it is completely irrelevant.

Is there something wrong with asking about the legality of a product that
lawyers from another company are questioning? No, and that is why I have every
reason to ignore you from now on. I don't tolerate petty behavior like yours,
so I'm ignoring you from now on.

Regards,
Andres

On 2020-06-03 at 3:14 PM, Ranier Vilela  wrote:
>De: Antonio Scuri 
>Enviado: segunda-feira, 1 de junho de 2020 16:50
>Para: IUP discussion list.
>Assunto: Re: [Iup-users] IUP assorted issues
>
> > Ok. I'll take a look. Thanks.
>Scuri, can we move to for whatever matters that really matter to IUP,
>Did you get a look at the patch?
>
>regards,
>Ranier Vilela
>
>___
>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] Fw: IUP License Questions

2020-06-03 Thread Andrew Robinson
Stop publicly harassing me, Ranier. This is your final warning.

On 2020-06-03 at 12:55 PM, Ranier Vilela  wrote:
>De: Andrew Robinson 
>Enviado: quarta-feira, 3 de junho de 2020 19:36
>Para: Antonio Scuri
>Cc: IUP discussion list.; Richard Stallman
>Assunto: Re: [Iup-users] Fw: IUP License Questions
>
>Hello Antonio,
>
>On 2020-06-03 at 10:45 AM, Antonio Scuri
mailto:antonio.sc...@gmail.com>> wrote:
>>  I agree with mr Stallman, but I totally disagree with you when you say:
>>And I agree with Tysen Moore and his lawyers.
>
>>"That got my attention because I don't like surprises, so then
>>Tysen and I both asked Mr Scuri why no mention of this was made in either
the
>>licensing section or in the credit section, he basically said you had to go
>>find it yourself somewhere within the source code."
>
>  >I clearly said I clearly said that our secondary libraries are documented
in each respective page that states they are >NOT part of our main library.
Their licenses are described there. If our secondary library uses a third
party library that >is GPL code then this secondary library is also GPL.
That's exactly why we left it in a secondary library and NOT in the >main
library. Even though all our code is open source and available to everyone use
and modify.
>
>>"I clearly said...".
>
>>We asked for links and you clearly gave none. We asked for examples and you
clearly gave none. That's not being >"clear", that is being evasive. All I'm
asking for (and all I can see that Tysen Moore is asking for), is to pretty
please >include ALL the licenses that the IUP project bundles with IUP, and
put them in one easy-to-find place like the >copyright or credits section of
the IUP WebBook. I don't want to see any more emails about lawyers having an
excuse >to find questionable things in IUP anymore -- agreed?
>
>>FYI, I looked at IupTuioClient() and there is no mention of any 3rd party
license. Is that because there is none? Or >maybe the license is buried
somewhere in the source code (something that I am not directed or required to
read or >download in the IUP documentation/WebBook)? Linking to the license on
the Internet in an email or saying the >license is somewhere in the source
code, is not including the license in the documentation as the licenses appear
to  >say they must do. The WebBook is required documentation therefore that is
where ALL the licenses by default should >be mentioned, as other companies do.
>
>>  The secondary libraries are OPTIONAL. If you don't understand that, please
don't use it at all.
>>Where in the IUP WebBook are any libraries/functions literally documented as
being "OPTIONAL" to IUP? This is all >brand new to me.
>
>>"In other words, the WHOLE TRUTH is, only a part of the IUP
bundled-framework can be used for public
>>commercial applications, unless you want to open source your application,
but
>>they fail to tell you which parts are "completely free" and which are not."
>
> >  You are not obligated to use all libraries available in IUP. If you use,
the least you can do is to read the >documentation of the library.
>​
>>Then give a direct link to where IupTuioClient() in the IUP WebBook where it
clearly says it isn't a part of the IUP >licensing. I mean just as one example
of "the right thing to do".
>
>>   This is your misunderstanding. IUP exists for more than 20 years.
>>One mistake in 20 years isn't something to be ashamed of, is it?
>>Several times it has been analyzed for use in commercial applications that
are not free. Our documentation is actually >one thing that I'm proud of,
making clear and being updated in detail for everyone.
>
> >  Again if you do think this way, please simply don't use it.
>>I have a better idea: be more transparent about all the licensing
requirements of anything that is not actually a part >of the IUP licensing, as
every other company does. Don't make this more difficult than it has to be.
>
>I not agreed.
>First, No one is forced to do or fail to do something for you, is that CLEAR
for you!
>Second, Everything that the IUP team does for users is nothing more than
kindness.
>Third, if you don't agree with that, you're living in the world of the moon,
it's simple, stop using.
>
>Ranier Vilela



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


Re: [Iup-users] Fw: IUP License Questions

2020-06-03 Thread Andrew Robinson
Hello Antonio,


On 2020-06-03 at 10:45 AM, Antonio Scuri  wrote:
  I agree with mr Stallman, but I totally disagree with you when you say:
And I agree with Tysen Moore and his lawyers.


"That got my attention because I don't like surprises, so then
Tysen and I both asked Mr Scuri why no mention of this was made in either the
licensing section or in the credit section, he basically said you had to go
find it yourself somewhere within the source code."


  I clearly said I clearly said that our secondary libraries are documented in
each respective page that states they are NOT part of our main library. Their
licenses are described there. If our secondary library uses a third party
library that is GPL code then this secondary library is also GPL. That's
exactly why we left it in a secondary library and NOT in the main library.
Even though all our code is open source and available to everyone use and
modify.


"I clearly said...".


We asked for links and you clearly gave none. We asked for examples and you
clearly gave none. That's not being "clear", that is being evasive. All I'm
asking for (and all I can see that Tysen Moore is asking for), is to pretty
please include ALL the licenses that the IUP project bundles with IUP, and put
them in one easy-to-find place like the copyright or credits section of the
IUP WebBook. I don't want to see any more emails about lawyers having an
excuse to find questionable things in IUP anymore -- agreed?


FYI, I looked at IupTuioClient() and there is no mention of any 3rd party
license. Is that because there is none? Or maybe the license is buried
somewhere in the source code (something that I am not directed or required to
read or download in the IUP documentation/WebBook)? Linking to the license on
the Internet in an email or saying the license is somewhere in the source
code, is not including the license in the documentation as the licenses appear
to  say they must do. The WebBook is required documentation therefore that is
where ALL the licenses by default should be mentioned, as other companies do.


  The secondary libraries are OPTIONAL. If you don't understand that, please
don't use it at all. 
Where in the IUP WebBook are any libraries/functions literally documented as
being "OPTIONAL" to IUP? This is all brand new to me.


"In other words, the WHOLE TRUTH is, only a part of the IUP bundled-framework
can be used for public
commercial applications, unless you want to open source your application, but
they fail to tell you which parts are "completely free" and which are not."



   You are not obligated to use all libraries available in IUP. If you use,
the least you can do is to read the documentation of the library. 

Then give a direct link to where IupTuioClient() in the IUP WebBook where it
clearly says it isn't a part of the IUP licensing. I mean just as one example
of "the right thing to do".


   This is your misunderstanding. IUP exists for more than 20 years.
One mistake in 20 years isn't something to be ashamed of, is it?
Several times it has been analyzed for use in commercial applications that are
not free. Our documentation is actually one thing that I'm proud of, making
clear and being updated in detail for everyone. 


   Again if you do think this way, please simply don't use it.

I have a better idea: be more transparent about all the licensing requirements
of anything that is not actually a part of the IUP licensing, as every other
company does. Don't make this more difficult than it has to be.


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


Re: [Iup-users] Fw: IUP License Questions

2020-06-03 Thread Andrew Robinson
Hi RMS,

I wasn't a part of the conversation you are quoting here, but I will bite...

Under the heading "Product" from the IUP online documentation at
https://www.tecgraf.puc-rio.br/iup/en/prod.html, it says "IUP is free
software, [it] can be used for public and commercial applications".

Under the heading "Tecgraf Library License" from the IUP online documentation
at https://www.tecgraf.puc-rio.br/iup/en/copyright.html, it says "The Tecgraf
products under this license are: IUP, CD and IM. All the products under this
license are free software: they can be used for both academic and commercial
purposes at absolutely no cost. There are no paperwork, no royalties, no
GNU-like "copyleft" restrictions, either. Just download and use it. They are
licensed under the terms of the MIT license reproduced below, and so are
compatible with GPL and also qualifies as Open Source software. They are not
in the public domain, PUC-Rio keeps their copyright."

Under the heading or "Credits" from the IUP online documentation at
https://www.tecgraf.puc-rio.br/iup/en/prod.html#creditos, it makes no mention
of the great many GNU licensed products BUNDLED with the IUP product.

Then Tysen Moore at sent out an email at
https://sourceforge.net/p/iup/mailman/message/37024247/, that said his
company's lawyers found one PdfLib license and quite a few GPL-licensed
products bundled within the IUP product that could make his product
incompatible with his apparently commercial product that isn't going to be
opened source. That got my attention because I don't like surprises, so then
Tysen and I both asked Mr Scuri why no mention of this was made in either the
licensing section or in the credit section, he basically said you had to go
find it yourself somewhere within the source code. Somewhere. Trust me.

These GPL and PdfLib products are not separate products from IUP, they are
documented as being a part of the IUP framework. In other words, the WHOLE
TRUTH is, only a part of the IUP bundled-framework can be used for public
commercial applications, unless you want to open source your application, but
they fail to tell you which parts are "completely free" and which are not. You
are just supposed to figure that out on your own. That doesn't sound
suspicious at all, does it?

So the question (maybe) really is, shouldn't the copyright for all products
you bundle with your developer's application be mentioned in your copyright or
credit section of your public documentation? When a license says "you must
include the original copyright and license", where should that copyright be
prominently displayed? Every company I know of puts ALL the copyrights in one
place, not scattered throughout something you may or may not read, like source
code that isn't required reading or an obvious place to document your (many)
copyrights.

So far, this is how many products I had no idea from the IUP documentation
cannot be used for public or commercial applications (unless you open source
your public or commercial application):
FFTW
MiniLZO
Tuio
PdfLib
FGTL
Freetype
Zlib
Scintilla
WinDrawLib

Let me know if I should  escalate this issue to someone else if this is not
something you want to deal with because I don't want to waste your time or
mine.

Thank you in advance,
Andres


On 2020-06-02 at 9:32 PM, Richard Stallman  wrote:
>[[[ To any NSA and FBI agents reading my email: please consider]]]
>[[[ whether defending the US Constitution against all enemies, ]]]
>[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>  > We are using the IUP framework to create a commercial application.
>
>I don't know anything about IUP except what you've told me.  IUP is
>not the name of any GNU package; it must have been developed by
>others, not us.
>
>  > We are using the IUP framework to create a commercial application.  The
>  > decision to use this framework rested upon the statement; "IUP is free
>  > software, can be used for public and commercial applications". 
Unfortunately,
>  > our license compliance team has flagged some issues within IUP.  It would
>  > appear that the claim "free" for "commercial applications" may not be
entirely
>  > accurate.
>
>I suspect a misunderstanding here.  "Commercial" is not the same as
"nonfree".
>See https://gnu.org/philosophy/categories.html.
>
>Perhaps they should clarify their statement about the matter.  They
>should say "can be used for noncommercian or commercial applications
>provided their licenses are compatible with the licenses of the
>libraries used."
>
>
>You seem to understand the requirements of the two licenses you mentioned.
>
>  > The licenses that are incompatible with out application include:
>  > - GPLv2 code which should not be linked with proprietary code
>
>Correct.  However, it can be used in commercial programs
>provided those programs are free/libre.
>
>Apparently your program is not free/libre.  That is a s

Re: [Iup-users] IUP License Questions

2020-06-01 Thread Andrew Robinson
I see only one download for IUP, not many. The GPL license appears to say that
ALL code linked with GPL source (that would mean all the GPL static
libraries), must also be disclosed under a GPL license. By providing GPL
static libraries in a single IUP package instead of having the users download
it separately (which is what "split" would actually mean), it seems to me that
it might a violation of the GPL license.


But I'm not a lawyer or the author of GPL, so maybe someone else can tell us
if this is legit? Maybe someone like Richard Stallman, which Google lists as
the author of GPL?


Thanks,
Andres


On 2020-06-01 at 4:39 PM, Antonio Scuri  wrote:
  If we put everything together in a single library, then no, it is not legal.
But we don't.


  That's exactly why we split in several libraries. Each secondary library can
have its own license if necessary. The documentation of each library reflects
this.


  BTW the documentation cleary displays "Additional" for controls that are
available in secondary libraries. 



Best,
Scuri




Em seg., 1 de jun. de 2020 às 15:34, Andrew Robinson 
escreveu:

I'm still not seeing direct links to the great many copyright licenses that I
had no idea existed until a few days ago. It is not reasonable to expect users
of IUP to comb through each and every source file to search for any licensing
that was not mentioned at the outset in the documentation. At a minimum, I
would expect to see third party licensees given credit where credit is due
under Products➜Credits in the online WebBook, but there is none, as if they
didn't exist. 


>From what I've seen from Tysen Moore, IUP is not a standalone product but a
software framework that, depending on how you use it, requires more than one
Copyright/License to use, instead of just the one listed in the WebBook. It
makes the IUP Copyright/License look misleading because it isn't the whole
entire license for the entire framework, it is just part of one of many
licenses but they don't say which parts that license applies to.


Are you sure that what IUP is doing is legal?


Regards,
Andres


On 2020-06-01 at 9:48 AM, Antonio Scuri  wrote:
  Just added a few more references for the license of the third party
libraries. It is on SVN for now. 


  But no, they are documented only at their respective IUP library page.


  BTW if you red the COPYRIGHT files, then you actually red their licenses
too. Unfortunately legality text is confusing.



Best,
Scuri




Em seg., 1 de jun. de 2020 às 12:44, Moore, Tysen 
escreveu:

That was my difficulty as well.  I can't seem to find the third party licenses
in the documentation (https://www.tecgraf.puc-rio.br/iup/).  I have also
checked the various "COPYRIGHT" and "README" files and can't find anything
either.   It would be useful to have the "Overview" documentation that reads,
"IUP is free software, can be used for public and commercial applications."
also mention to go to the "Copyright/License" section for the some exceptions.
 Then within the "Copyright/License" section of the documentation it could
list the third party licenses.
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] IUP License Questions

2020-06-01 Thread Andrew Robinson
I'm still not seeing direct links to the great many copyright licenses that I
had no idea existed until a few days ago. It is not reasonable to expect users
of IUP to comb through each and every source file to search for any licensing
that was not mentioned at the outset in the documentation. At a minimum, I
would expect to see third party licensees given credit where credit is due
under Products➜Credits in the online WebBook, but there is none, as if they
didn't exist. 


>From what I've seen from Tysen Moore, IUP is not a standalone product but a
software framework that, depending on how you use it, requires more than one
Copyright/License to use, instead of just the one listed in the WebBook. It
makes the IUP Copyright/License look misleading because it isn't the whole
entire license for the entire framework, it is just part of one of many
licenses but they don't say which parts that license applies to.


Are you sure that what IUP is doing is legal?


Regards,
Andres


On 2020-06-01 at 9:48 AM, Antonio Scuri  wrote:
  Just added a few more references for the license of the third party
libraries. It is on SVN for now. 


  But no, they are documented only at their respective IUP library page.


  BTW if you red the COPYRIGHT files, then you actually red their licenses
too. Unfortunately legality text is confusing.



Best,
Scuri




Em seg., 1 de jun. de 2020 às 12:44, Moore, Tysen 
escreveu:

That was my difficulty as well.  I can't seem to find the third party licenses
in the documentation (https://www.tecgraf.puc-rio.br/iup/).  I have also
checked the various "COPYRIGHT" and "README" files and can't find anything
either.   It would be useful to have the "Overview" documentation that reads,
"IUP is free software, can be used for public and commercial applications."
also mention to go to the "Copyright/License" section for the some exceptions.
 Then within the "Copyright/License" section of the documentation it could
list the third party licenses.
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] IUP License Questions

2020-05-29 Thread Andrew Robinson
"Each of IM, CD or IUP libraries that use third party libraries that have a
license term different than IUP, has a separate page in the documentation"


Where in the documentation? I can easily find the IUP license in the
documentation, but not any third party licenses. All the licenses should be in
one place.


On 2020-05-29 at 11:38 AM, Antonio Scuri  wrote:
  Each of IM, CD or IUP libraries that use third party libraries that have a
license term different than IUP, has a separate page in the documentation. If
you use those libraries you should check their documentation. In their
documentation there should be a note about the license terms, and usually a
link to the term itself. The IM, CD and IUP source code package also include
those license terms. 


Best,
Scuri




Em sex., 29 de mai. de 2020 às 14:11, Andrew Robinson 
escreveu:

I can't seem to find it so can you give a link to the online IUP documentation
where it lists all the third party functions and their licenses?


Best Regards,
Andres


On 2020-05-29 at 8:36 AM, Antonio Scuri  wrote:
  Yes, in the IUP, CD and IM documentation we include the license terms of all
third party libraries.  


Best,
Scuri




Em sex, 29 de mai de 2020 12:33, Andrew Robinson 
escreveu:

Ola,


"When using LGPL you can if the library is in an external module, for instance
in a DLL. And you must include its license text in the distribution"


Does PUC-RIO have a copy of all the licenses required for their independently
licensed features in the distribution or IUP/IM/CD website, or do we have to
research that on our own?


Regards,
Andres


On 2020-05-29 at 8:02 AM, Antonio Scuri  wrote:
Hi,



1. Are there other IUP dependencies that require this library?


  No, all these libraries are independent features. You can simply ignore
them. You must link with the specific library to use it, and then be dependent
of its license requirements.

2. There is no way this code can be used with a commercial app, correct?


  When using LGPL you can if the library is in an external module, for
instance in a DLL. And you must include its license text in the distribution.

3. Any advice for removing this library and code cleanly?  



  As I said, you can simply ignore them by not using the features they provide
for IM, CD and IUP. In these cases you must explicitly use something not in
the regular IM, CD or IUP libraries. If you are linking with just the main
IUP, CD and IM libraries you don't have to worry about these libraries.


Best,
Scuri




Em sex., 29 de mai. de 2020 às 11:45, Moore, Tysen 
escreveu:

We are using the IUP framework to create a commercial application.  The
decision to use this framework rested upon the statement; "IUP is free
software, can be used for public and commercial applications".  Unfortunately,
our license compliance team has flagged some issues within IUP.  It would
appear that the claim "free" for "commercial applications" may not be entirely
accurate.  We are fortunate that we are currently not using these libraries,
however, we could use some advice/suggestions on the best ways to eliminate
this code.

The licenses that are incompatible with out application include:
- GPLv2 code which should not be linked with proprietary code
- LGPLv3 code can be linked dynamically with proprietary code. It should be
possible for the user to change the LGPLv3 library.
 
Thanks in advance for any advice/help.

Tysen Moore


The specific files/library at issue are:

1- /thirdparty/im/src/fftw
 
IMPORTANT: The FFTW lib has a GPL license. The license of the "im_fftw"
library is automatically GPL.
So you cannot use it for commercial applications without contacting the
authors.

PROBLEM:This makes this library unusable for our commercial
application.
RESOLUTION: Luckily we are not using this code.
QUESTIONS:  1. Are there other IUP dependencies that require this library?
2. There is no way this code can be used with a commercial
app, correct?
3. Any advice for removing this library and code cleanly?
  
2- /thirdparty/im/src/minilzo
  
"LZO compression support uses mini-libLZO version 2.07. \n
http://www.oberhumer.com/opensource/lzo/ \n
Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer \n
But its License is GPL, so we kept it in a separate library
called "im_lzo" that is also GPL."
  
PROBLEM:This makes this library unusable for our commercial
application.
RESOLUTION: Luckily we are not using this code.
QUESTIONS:  1. Are there other IUP dependencies that require this library?
2. There is no way this code can be used with a commercial
app, correct?
3. Any advice for removing this library and code cleanly?

3- thirdparty/iup/srcmglplot

"MathGL is a library for creating plots that is system independent. It
is
main

Re: [Iup-users] IUP License Questions

2020-05-29 Thread Andrew Robinson
I can't seem to find it so can you give a link to the online IUP documentation
where it lists all the third party functions and their licenses?


Best Regards,
Andres


On 2020-05-29 at 8:36 AM, Antonio Scuri  wrote:
  Yes, in the IUP, CD and IM documentation we include the license terms of all
third party libraries.  


Best,
Scuri




Em sex, 29 de mai de 2020 12:33, Andrew Robinson 
escreveu:

Ola,


"When using LGPL you can if the library is in an external module, for instance
in a DLL. And you must include its license text in the distribution"


Does PUC-RIO have a copy of all the licenses required for their independently
licensed features in the distribution or IUP/IM/CD website, or do we have to
research that on our own?


Regards,
Andres


On 2020-05-29 at 8:02 AM, Antonio Scuri  wrote:
Hi,



1. Are there other IUP dependencies that require this library?


  No, all these libraries are independent features. You can simply ignore
them. You must link with the specific library to use it, and then be dependent
of its license requirements.

2. There is no way this code can be used with a commercial app, correct?


  When using LGPL you can if the library is in an external module, for
instance in a DLL. And you must include its license text in the distribution.

3. Any advice for removing this library and code cleanly?  



  As I said, you can simply ignore them by not using the features they provide
for IM, CD and IUP. In these cases you must explicitly use something not in
the regular IM, CD or IUP libraries. If you are linking with just the main
IUP, CD and IM libraries you don't have to worry about these libraries.


Best,
Scuri




Em sex., 29 de mai. de 2020 às 11:45, Moore, Tysen 
escreveu:

We are using the IUP framework to create a commercial application.  The
decision to use this framework rested upon the statement; "IUP is free
software, can be used for public and commercial applications".  Unfortunately,
our license compliance team has flagged some issues within IUP.  It would
appear that the claim "free" for "commercial applications" may not be entirely
accurate.  We are fortunate that we are currently not using these libraries,
however, we could use some advice/suggestions on the best ways to eliminate
this code.

The licenses that are incompatible with out application include:
- GPLv2 code which should not be linked with proprietary code
- LGPLv3 code can be linked dynamically with proprietary code. It should be
possible for the user to change the LGPLv3 library.
 
Thanks in advance for any advice/help.

Tysen Moore


The specific files/library at issue are:

1- /thirdparty/im/src/fftw
 
IMPORTANT: The FFTW lib has a GPL license. The license of the "im_fftw"
library is automatically GPL.
So you cannot use it for commercial applications without contacting the
authors.

PROBLEM:This makes this library unusable for our commercial
application.
RESOLUTION: Luckily we are not using this code.
QUESTIONS:  1. Are there other IUP dependencies that require this library?
2. There is no way this code can be used with a commercial
app, correct?
3. Any advice for removing this library and code cleanly?
  
2- /thirdparty/im/src/minilzo
  
"LZO compression support uses mini-libLZO version 2.07. \n
http://www.oberhumer.com/opensource/lzo/ \n
Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer \n
But its License is GPL, so we kept it in a separate library
called "im_lzo" that is also GPL."
  
PROBLEM:This makes this library unusable for our commercial
application.
RESOLUTION: Luckily we are not using this code.
QUESTIONS:  1. Are there other IUP dependencies that require this library?
2. There is no way this code can be used with a commercial
app, correct?
3. Any advice for removing this library and code cleanly?

3- thirdparty/iup/srcmglplot

"MathGL is a library for creating plots that is system independent. It
is
maintained by Alexey Balakin and available at SourceForge
http://mathgl.sourceforge.net/";>http://mathgl.sourceforge.net/ with
GPL and
LGPL licenses."

PROBLEM:This is licensed with GPL and LGPL licenses.  MATGL appears to
mainly be LGPLv3; however, iup/srcmglplot/mgl2/mgl.h is GPLv2 which prevents
use in commercial apps. 
RESOLUTION: Luckily we are not using this code.
QUESTIONS:  1. Are there other IUP dependencies that require this library?
2. There is no way this code can be used with a commercial
app, correct?
3. Any advice for removing this library and code cleanly?
  
4- /thirdparty/iup/srctuio/tuio

"This program is free software; you can redistribute it and/or modify it 
under the terms of the GNU General Public License as published by the Free
Software Foundation; ei

Re: [Iup-users] IUP License Questions

2020-05-29 Thread Andrew Robinson
Ola,


"When using LGPL you can if the library is in an external module, for instance
in a DLL. And you must include its license text in the distribution"


Does PUC-RIO have a copy of all the licenses required for their independently
licensed features in the distribution or IUP/IM/CD website, or do we have to
research that on our own?


Regards,
Andres


On 2020-05-29 at 8:02 AM, Antonio Scuri  wrote:
Hi,



1. Are there other IUP dependencies that require this library?


  No, all these libraries are independent features. You can simply ignore
them. You must link with the specific library to use it, and then be dependent
of its license requirements.

2. There is no way this code can be used with a commercial app, correct?


  When using LGPL you can if the library is in an external module, for
instance in a DLL. And you must include its license text in the distribution.

3. Any advice for removing this library and code cleanly?  



  As I said, you can simply ignore them by not using the features they provide
for IM, CD and IUP. In these cases you must explicitly use something not in
the regular IM, CD or IUP libraries. If you are linking with just the main
IUP, CD and IM libraries you don't have to worry about these libraries.


Best,
Scuri




Em sex., 29 de mai. de 2020 às 11:45, Moore, Tysen 
escreveu:

We are using the IUP framework to create a commercial application.  The
decision to use this framework rested upon the statement; "IUP is free
software, can be used for public and commercial applications".  Unfortunately,
our license compliance team has flagged some issues within IUP.  It would
appear that the claim "free" for "commercial applications" may not be entirely
accurate.  We are fortunate that we are currently not using these libraries,
however, we could use some advice/suggestions on the best ways to eliminate
this code.

The licenses that are incompatible with out application include:
- GPLv2 code which should not be linked with proprietary code
- LGPLv3 code can be linked dynamically with proprietary code. It should be
possible for the user to change the LGPLv3 library.
 
Thanks in advance for any advice/help.

Tysen Moore


The specific files/library at issue are:

1- /thirdparty/im/src/fftw
 
IMPORTANT: The FFTW lib has a GPL license. The license of the "im_fftw"
library is automatically GPL.
So you cannot use it for commercial applications without contacting the
authors.

PROBLEM:This makes this library unusable for our commercial
application.
RESOLUTION: Luckily we are not using this code.
QUESTIONS:  1. Are there other IUP dependencies that require this library?
2. There is no way this code can be used with a commercial
app, correct?
3. Any advice for removing this library and code cleanly?
  
2- /thirdparty/im/src/minilzo
  
"LZO compression support uses mini-libLZO version 2.07. \n
http://www.oberhumer.com/opensource/lzo/ \n
Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer \n
But its License is GPL, so we kept it in a separate library
called "im_lzo" that is also GPL."
  
PROBLEM:This makes this library unusable for our commercial
application.
RESOLUTION: Luckily we are not using this code.
QUESTIONS:  1. Are there other IUP dependencies that require this library?
2. There is no way this code can be used with a commercial
app, correct?
3. Any advice for removing this library and code cleanly?

3- thirdparty/iup/srcmglplot

"MathGL is a library for creating plots that is system independent. It
is
maintained by Alexey Balakin and available at SourceForge
http://mathgl.sourceforge.net/";>http://mathgl.sourceforge.net/ with
GPL and
LGPL licenses."

PROBLEM:This is licensed with GPL and LGPL licenses.  MATGL appears to
mainly be LGPLv3; however, iup/srcmglplot/mgl2/mgl.h is GPLv2 which prevents
use in commercial apps. 
RESOLUTION: Luckily we are not using this code.
QUESTIONS:  1. Are there other IUP dependencies that require this library?
2. There is no way this code can be used with a commercial
app, correct?
3. Any advice for removing this library and code cleanly?
  
4- /thirdparty/iup/srctuio/tuio

"This program is free software; you can redistribute it and/or modify it 
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) 
any later version."

PROBLEM:This makes this library unusable for our commercial
application.
RESOLUTION: Luckily we are not using this code.
QUESTIONS:  1. Are there other IUP dependencies that require this library?
2. There is no way this code can be used with a commercial
app, correct?
3. Any advice for removing this library and code cleanly?
  
5- /thirdparty/cd/src/pdflib

"pdflib is not f

Re: [Iup-users] Auto-scroll on appending text in IupText

2020-05-29 Thread Andrew Robinson
rtnVal1 IupSetStrAttribute(handleTxtBox,'VALUE',ptrSomeTxt)
rtnVal2 IupGetAttribute(handleTxtBox,'COUNT',rtnVal1)
IupSetAttribute(handleTxtBox,'CARETPOS',rtnVal2)



What that does is:


1) Append text to your textbox
2) Get the count of bytes in your textbox
3) Set your textbox cursor to point to the byte at count


On 2020-05-28 at 2:36 AM, Damon H. (TheDcoder)  wrote:
Hello everyone! I hope you are all doing well during these unfortunate times.
I have a question regarding automatic scrolling in a (multi-line) IupText
control, I want to make the control scroll downwards (vertically) whenever I
append text to it so that the end of the text is always visible, I see that
there is no special attribute that I can set to enable this behaviour, so I
was wondering what was the best way to implement it?
Thank you for the help in advance!
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] IUP 3.29

2020-05-19 Thread Andrew Robinson
No, thank you for your intelligence, patience, and dedication to do something
very difficult and stressful. Not any one can do what you do.


On 2020-05-19 at 7:49 AM, Antonio Scuri  wrote:
  Thank you all for the support and contribution.



Best,
Scuri




Em ter., 19 de mai. de 2020 às 08:21, Ranier Vilela 
escreveu:

De: Antonio Scuri 
Enviado: terça-feira, 19 de maio de 2020 02:43
Para: IUP discussion list.
Assunto: [Iup-users] IUP 3.29

  Hi All,

   We just released IUP version 3.29
Thank you Scuri, great new.

regards,
Ranier VIlela

___
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] IupConfig

2020-05-15 Thread Andrew Robinson
PS -- I forgot to add: If you see anything you think I got wrong or isn't
clear, feel free to let me know so I can go back and correct any mistakes. I
won't take it personally because I love honest feedback.


On 2020-05-09 at 3:29 PM, Andrew Robinson  wrote:
My final answer (updated):



The only program that seemed to work on my system was setlocale_utf8_vc15.exe,
but it while it didn't fail, it also didn't exactly pass because it returns a
string for a locale that doesn't exist in any current Microsoft documentation:
English_United States.utf8. I think it might actually be documented in some
old MSDOS documentation, as it might be a poorly documented representation of
an en-US locale with the OEM console page set to UTF8 by chcp, hence the dot
UTF8 instead of a simple UTF8 for locale. Knowing UTF8, that doesn't really
mean anything anyways, since UTF8 is ASCII/ANSI/English backwards compatible
because UTF8 is byte oriented (as is GB18030, by the way).


en-USen_US   US  .UTF8   Version  Well
Documented?
POCRT  Fail Fail   Pass  Fail   8.0.2.0  N/A
MSVCRT Fail Fail   Pass  Fail   7.0.7601.17744   No
UCRTBASE   Pass Fail   Fail  Fail   10.0.14393.2247  Yes
SLLPassFail   Fail  Sorta   ??   No


NOTE 1: Microsoft never said they supported UTF-8 as a locale, in fact they
said they would for the first time ever start supporting it with the May of
2020 release of Win10.

NOTE 2: Could not confirm rumors that UTF-8 can be set as a locale.

NOTE 3: en_US is for Linux, not Windows.

NOTE 4: setlocale() is documented to only affect numeric, monetary, time, and
the Windows legacy collate functions. It does not affect translation or file
functions.

NOTE 5: Ucrtbase will consistently crash if either category or locale is
invalid. This is a minor issue, although none of the other versions of
setlocale() will crash, but instead will return NULL.


NOTE 6: chcp doesn't work with gui programs, so none of this is a valid test
for any IUP apps


NOTE 7: The comment about ".UTF8" being valid on the Microsoft website for
setlocale() does not appear valid, reproducible,  nor is it officially
recognized by Microsoft. It should be ignored as all fake news is.

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


Re: [Iup-users] IupConfig

2020-05-09 Thread Andrew Robinson
My final answer (updated):



The only program that seemed to work on my system was setlocale_utf8_vc15.exe,
but it while it didn't fail, it also didn't exactly pass because it returns a
string for a locale that doesn't exist in any current Microsoft documentation:
English_United States.utf8. I think it might actually be documented in some
old MSDOS documentation, as it might be a poorly documented representation of
an en-US locale with the OEM console page set to UTF8 by chcp, hence the dot
UTF8 instead of a simple UTF8 for locale. Knowing UTF8, that doesn't really
mean anything anyways, since UTF8 is ASCII/ANSI/English backwards compatible
because UTF8 is byte oriented (as is GB18030, by the way).


en-USen_US   US  .UTF8   Version  Well
Documented?
POCRT  FailFail   Pass  Fail   8.0.2.0  N/A
MSVCRT FailFail   Pass  Fail   7.0.7601.17744   No
UCRTBASE   PassFail   Fail  Fail   10.0.14393.2247  Yes
SLLPassFail   Fail  Sorta  ??   No


NOTE 1: Microsoft never said they supported UTF-8 as a locale, in fact they
said they would for the first time ever start supporting it with the May of
2020 release of Win10.

NOTE 2: Could not confirm rumors that UTF-8 can be set as a locale.

NOTE 3: en_US is for Linux, not Windows.

NOTE 4: setlocale() is documented to only affect numeric, monetary, time, and
the Windows legacy collate functions. It does not affect translation or file
functions.

NOTE 5: Ucrtbase will consistently crash if either category or locale is
invalid. This is a minor issue, although none of the other versions of
setlocale() will crash, but instead will return NULL.


NOTE 6: chcp doesn't work with gui programs, so none of this is a valid test
for any IUP apps


NOTE 7: The comment about ".UTF8" being valid on the Microsoft website for
setlocale() does not appear valid, reproducible,  nor is it officially
recognized by Microsoft. It should be ignored as all fake news is.

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


Re: [Iup-users] IupConfig

2020-05-08 Thread Andrew Robinson
Those are images from a console app, not a gui app. The output should be
to/from an IupText() box, and I'm not seeing an IupText() box in your screen
captures.


On 2020-05-08 at 10:56 AM, Antonio Scuri  wrote:
I tested in Win10 and Win7, and in both the results are the same.


Em qui, 7 de mai de 2020 23:04, Andrew Robinson 
escreveu:

Win10 or Win7?


On 2020-05-07 at 5:02 PM, Antonio Scuri  wrote:
  A few screenshots:


















Em qui., 7 de mai. de 2020 às 20:54, Andrew Robinson 
escreveu:

What was listed for "Current locale" when it worked?


On 2020-05-07 at 3:12 PM, Antonio Scuri  wrote:
  Ok


  My UCRTBASE version is 10.0.18362.387 


  The Visual Studio 2017 test I compiled and run using static and dynamic
libraries (ucrtbase.dll) worked, in the sense that after calling
setlocale(LC_ALL, ".UTF8") , the call to fopen using a UTF-8 filename with
special characters worked. 


Best,
Scuri








Em qui., 7 de mai. de 2020 às 15:53, Andrew Robinson 
escreveu:

My final answer:


   en-US   en_US   US .UTF8Version  Well Documented?
POCRT  FailFailPass   Fail8.0.2.0  N/A
MSVCRT FailFailPass   Fail7.0.7601.17744   No
UCRTBASE   PassFailFail   Fail10.0.14393.2247  Yes


NOTE 1: Microsoft never said they supported UTF-8 as a locale, in fact they
said they would for the first time ever start supporting it with the May of
2020 release of Win10.


NOTE 2: Could not confirm rumors that UTF-8 can be set as a locale.


NOTE 3: en_US is for Linux, not Windows.


NOTE 4: setlocale() is documented to only affect numeric, monetary, time, and
the Windows collate functions. It does not affect translation or file
functions.


NOTE 5: Ucrtbase will crash if category flag invalid, e.g. -- 31 decimal. This
is a minor issue.


Best Regards,
Andres


On 2020-05-06 at 7:17 PM, Andrew Robinson  wrote:
The files you sent are using ucrtbase.dll, which works no different than
msvcrt does. You do know that there are a great many other MS crt files, such
as msvcp100.dll and msvcp120.dll and so on? You want to try all those too? I'm
sure they won't work either.


I got kind of tired of playing this game so I looked up all the locales in the
ucrtbase.dll and I entered the list at the end of this email. I tried a few of
them (en-us, american-english, spanish-uruguay, england, etc) and most of them
worked (except for england). Some might not really be a locale but some other
string mixed in with the locale strings. I just did a cut-and-paste from the
dll.


The bottom-line is that there is absolutely no ".UTF8" string anywhere. It is
completely invalid.


So what about that comment on the MS website? It is fake news because it isn't
an official statement from MS and it isn't mentioned anywhere else on the MS
website. I could never get any of the MS dlls/libs to return anything other
than NULL for anything with "UTF" in it (I tried a few variations). That
matches what the documentation says and what is in the actual crt DLLs, but
maybe there is a version of the crts that mistakenly does return a NULL, even
though nothing has changed.


FYI: Further investigation of pocrt shows that while it returns a non-NULL
value for UTF-8, I followed the pointer and it was pointing to the letter "C",
which is the default locale for setlocale(). So it isn't working either.


I looked at setlocale_utf8+dll14.exe (for example) and it does return a NULL
for ".UTF8", but you say it works? If you can swear that your code works,
maybe you do need to send me a copy of your ucrtbase.dll (it's in the
Windows.System32 directory, just in case you don't know where it's at). That's
seems to be the only thing it could be because everything is doing exactly
what it should be doing. Your msvcrt.dll would work too but I'm more
interested in the universal crt.


Oh, and I'm using Win7 so if you do give me a dll, give me one that works with
Win7. Nothing from Win10 please.


Best Regards,
Andrew


american
american english
american-english
australian
belgian
canadian
chinese
chinese-hongkong
chinese-simplified
chinese-singapore
chinese-traditional
dutch-belgian
english-american
english-aus
english-belize
english-can
english-caribbean
english-ire
english-jamaica
english-nz
english-south africa
english-trinidad y tobago
english-uk
english-us
english-usa
french-belgian
french-canadian
french-luxembourg
french-swiss
german-austrian
german-lichtenstein
german-luxembourg
german-swiss
irish-english
italian-swiss
norwegian
norwegian-bokmal
norwegian-nynorsk
portuguese-brazilian
spanish-argentina
spanish-bolivia
spanish-chile
spanish-colombia
spanish-costa rica
spanish-dominican republic
spanish-ecuador
spanish-el salvador
spanish-guatemala
spanish-honduras
spanish-mexican
spanish-modern
spanish-nicaragua
spanish-panama
spanish-paraguay
spanish-peru
spanish-puerto rico
spa

Re: [Iup-users] Lua, UTF-16 and iup.clipboard

2020-05-08 Thread Andrew Robinson
Nice.


On 2020-05-08 at 6:42 AM, Antonio Scuri  wrote:
  Ok. 


  I had an idea. Just added a new attribute for IupClipboard:


FORMATDATASTRING [Windows and GTK Only]: sets/gets FORMATDATA and
FORMATDATASIZE considering data being a string in the system format. (since
3.29)



Best,
Scuri




Em qui, 7 de mai de 2020 06:32, Jane Taubman  escreveu:

I get the plain text,  excluding the html code.When you copy from a web
browser like Chrome you get several different formats.
So if I copy your post from gmail the TEXT is
-

What happen if you simply try using:



  script = clipboard.text
instead of
   script = clipboard.formatdata



  Leaving the rest as it is. 

-

but the text/html is 



What happen if you simply try using: 
script = clipboard.textinstead of   script =
clipboard.formatdata  Leaving the rest as it is.



On Mon, 4 May 2020 at 23:13, Antonio Scuri  wrote:

  What happen if you simply try using:



  script = clipboard.text
instead of
   script = clipboard.formatdata



  Leaving the rest as it is. 



Best,
Scuri




Em seg., 4 de mai. de 2020 às 13:41, Jane Taubman 
escreveu:

I'll try to explain in a clearer way.


If I open a file saved in UTF-16 in Lua using the IO library.   I can then
handle the content of that file to convert each pair of bytes as needed to end
up with UTF-8 or even Ascii.  All I want to do is to be able to read in the
text/html format from the clipboard and process it in lua.



However I can not do anything with the Light user Data returned from the
Clipboard using Lua,  that I can discover.






On Sun, 3 May 2020 at 21:56, Andrew Robinson  wrote:

I hate to state the obvious but in a string data type, an ASCII "character" is
one byte in size (char), and a UTF-16 "character" is two bytes in size
(short).


I apologize if this is out-of-place for your conversation, but I get a lot of
people who confuse a string character with a byte, instead of a variable
number of bytes, but ... you know, just in case that is the real issue here I
wanted to "fix it".


So I'm not sure whether to say de nada or lo siento,
Andrew


On 2020-05-03 at 12:02 PM, Antonio Scuri  wrote:
>  The UTF-16 function takes a "string"  


  That is weird. UTF-16 strings are unsigned short* arrays, strings in Lua are
char* arrays. Something is not right. 



  Is there a link for the documentation of that library?


Best,

Scuri




Em dom., 3 de mai. de 2020 às 09:02, Jane Taubman 
escreveu:

>"data" can not be converted to a string using "tostring". It must use
this function you mentioned. 



Sorry I did not make myself clear.The UTF-16 function takes a "string" and
will not work with a "light user data" so I need to know how to convert the
light user data from the iup.clipboard to a string using just lua.



-- 

Jane.

Jane Taubman | www.rjt.org.uk | www.taubman.org.uk | www.fhug.org.uk

___
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



-- 

Jane.

Jane Taubman | www.rjt.org.uk | www.taubman.org.uk | www.fhug.org.uk

___
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



-- 

Jane.

Jane Taubman | www.rjt.org.uk | www.taubman.org.uk | www.fhug.org.uk

___
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] IupConfig

2020-05-07 Thread Andrew Robinson
What was listed for "Current locale" when it worked?


On 2020-05-07 at 3:12 PM, Antonio Scuri  wrote:
  Ok


  My UCRTBASE version is 10.0.18362.387 


  The Visual Studio 2017 test I compiled and run using static and dynamic
libraries (ucrtbase.dll) worked, in the sense that after calling
setlocale(LC_ALL, ".UTF8") , the call to fopen using a UTF-8 filename with
special characters worked. 


Best,
Scuri








Em qui., 7 de mai. de 2020 às 15:53, Andrew Robinson 
escreveu:

My final answer:


   en-US   en_US   US .UTF8Version  Well Documented?
POCRT  FailFailPass   Fail8.0.2.0  N/A
MSVCRT FailFailPass   Fail7.0.7601.17744   No
UCRTBASE   PassFailFail   Fail10.0.14393.2247  Yes


NOTE 1: Microsoft never said they supported UTF-8 as a locale, in fact they
said they would for the first time ever start supporting it with the May of
2020 release of Win10.


NOTE 2: Could not confirm rumors that UTF-8 can be set as a locale.


NOTE 3: en_US is for Linux, not Windows.


NOTE 4: setlocale() is documented to only affect numeric, monetary, time, and
the Windows collate functions. It does not affect translation or file
functions.


NOTE 5: Ucrtbase will crash if category flag invalid, e.g. -- 31 decimal. This
is a minor issue.


Best Regards,
Andres


On 2020-05-06 at 7:17 PM, Andrew Robinson  wrote:
The files you sent are using ucrtbase.dll, which works no different than
msvcrt does. You do know that there are a great many other MS crt files, such
as msvcp100.dll and msvcp120.dll and so on? You want to try all those too? I'm
sure they won't work either.


I got kind of tired of playing this game so I looked up all the locales in the
ucrtbase.dll and I entered the list at the end of this email. I tried a few of
them (en-us, american-english, spanish-uruguay, england, etc) and most of them
worked (except for england). Some might not really be a locale but some other
string mixed in with the locale strings. I just did a cut-and-paste from the
dll.


The bottom-line is that there is absolutely no ".UTF8" string anywhere. It is
completely invalid.


So what about that comment on the MS website? It is fake news because it isn't
an official statement from MS and it isn't mentioned anywhere else on the MS
website. I could never get any of the MS dlls/libs to return anything other
than NULL for anything with "UTF" in it (I tried a few variations). That
matches what the documentation says and what is in the actual crt DLLs, but
maybe there is a version of the crts that mistakenly does return a NULL, even
though nothing has changed.


FYI: Further investigation of pocrt shows that while it returns a non-NULL
value for UTF-8, I followed the pointer and it was pointing to the letter "C",
which is the default locale for setlocale(). So it isn't working either.


I looked at setlocale_utf8+dll14.exe (for example) and it does return a NULL
for ".UTF8", but you say it works? If you can swear that your code works,
maybe you do need to send me a copy of your ucrtbase.dll (it's in the
Windows.System32 directory, just in case you don't know where it's at). That's
seems to be the only thing it could be because everything is doing exactly
what it should be doing. Your msvcrt.dll would work too but I'm more
interested in the universal crt.


Oh, and I'm using Win7 so if you do give me a dll, give me one that works with
Win7. Nothing from Win10 please.


Best Regards,
Andrew


american
american english
american-english
australian
belgian
canadian
chinese
chinese-hongkong
chinese-simplified
chinese-singapore
chinese-traditional
dutch-belgian
english-american
english-aus
english-belize
english-can
english-caribbean
english-ire
english-jamaica
english-nz
english-south africa
english-trinidad y tobago
english-uk
english-us
english-usa
french-belgian
french-canadian
french-luxembourg
french-swiss
german-austrian
german-lichtenstein
german-luxembourg
german-swiss
irish-english
italian-swiss
norwegian
norwegian-bokmal
norwegian-nynorsk
portuguese-brazilian
spanish-argentina
spanish-bolivia
spanish-chile
spanish-colombia
spanish-costa rica
spanish-dominican republic
spanish-ecuador
spanish-el salvador
spanish-guatemala
spanish-honduras
spanish-mexican
spanish-modern
spanish-nicaragua
spanish-panama
spanish-paraguay
spanish-peru
spanish-puerto rico
spanish-uruguay
spanish-venezuela
swedish-finland
swiss
america
britain
china
czech
england
great britain
holland
hong-kong
new-zealand
pr china
pr-china
puerto-rico
slovak
south africa
south korea
south-africa
south-korea
trinidad & tobago
united-kingdom
united-states
zh-CHS
ar-SA
bg-BG
ca-ES
zh-TW
cs-CZ
da-DK
de-DE
el-GR
fi-FI
fr-FR
he-IL
hu-HU
is-IS
it-IT
ja-JP
ko-KR
nl-NL
nb-NO
pl-PL
pt-BR
ro-RO
ru-RU
hr-HR
sk-SK
sq-AL
sv-SE
th-TH
tr-TR
ur-PK
id-ID
uk-UA
be-BY
sl-SI
et-EE
lv-LV
lt-LT
fa-IR
vi-VN
hy-AM
a

Re: [Iup-users] IupConfig

2020-05-07 Thread Andrew Robinson
My final answer:


   en-US   en_US   US .UTF8   Version  Well Documented?
POCRT  FailFailPass   Fail8.0.2.0  N/A
MSVCRT FailFailPass   Fail7.0.7601.17744   No
UCRTBASE   PassFailFail   Fail10.0.14393.2247  Yes


NOTE 1: Microsoft never said they supported UTF-8 as a locale, in fact they
said they would for the first time ever start supporting it with the May of
2020 release of Win10.


NOTE 2: Could not confirm rumors that UTF-8 can be set as a locale.


NOTE 3: en_US is for Linux, not Windows.


NOTE 4: setlocale() is documented to only affect numeric, monetary, time, and
the Windows collate functions. It does not affect translation or file
functions.


NOTE 5: Ucrtbase will crash if category flag invalid, e.g. -- 31 decimal. This
is a minor issue.


Best Regards,
Andres


On 2020-05-06 at 7:17 PM, Andrew Robinson  wrote:
The files you sent are using ucrtbase.dll, which works no different than
msvcrt does. You do know that there are a great many other MS crt files, such
as msvcp100.dll and msvcp120.dll and so on? You want to try all those too? I'm
sure they won't work either.


I got kind of tired of playing this game so I looked up all the locales in the
ucrtbase.dll and I entered the list at the end of this email. I tried a few of
them (en-us, american-english, spanish-uruguay, england, etc) and most of them
worked (except for england). Some might not really be a locale but some other
string mixed in with the locale strings. I just did a cut-and-paste from the
dll.


The bottom-line is that there is absolutely no ".UTF8" string anywhere. It is
completely invalid.


So what about that comment on the MS website? It is fake news because it isn't
an official statement from MS and it isn't mentioned anywhere else on the MS
website. I could never get any of the MS dlls/libs to return anything other
than NULL for anything with "UTF" in it (I tried a few variations). That
matches what the documentation says and what is in the actual crt DLLs, but
maybe there is a version of the crts that mistakenly does return a NULL, even
though nothing has changed.


FYI: Further investigation of pocrt shows that while it returns a non-NULL
value for UTF-8, I followed the pointer and it was pointing to the letter "C",
which is the default locale for setlocale(). So it isn't working either.


I looked at setlocale_utf8+dll14.exe (for example) and it does return a NULL
for ".UTF8", but you say it works? If you can swear that your code works,
maybe you do need to send me a copy of your ucrtbase.dll (it's in the
Windows.System32 directory, just in case you don't know where it's at). That's
seems to be the only thing it could be because everything is doing exactly
what it should be doing. Your msvcrt.dll would work too but I'm more
interested in the universal crt.


Oh, and I'm using Win7 so if you do give me a dll, give me one that works with
Win7. Nothing from Win10 please.


Best Regards,
Andrew


american
american english
american-english
australian
belgian
canadian
chinese
chinese-hongkong
chinese-simplified
chinese-singapore
chinese-traditional
dutch-belgian
english-american
english-aus
english-belize
english-can
english-caribbean
english-ire
english-jamaica
english-nz
english-south africa
english-trinidad y tobago
english-uk
english-us
english-usa
french-belgian
french-canadian
french-luxembourg
french-swiss
german-austrian
german-lichtenstein
german-luxembourg
german-swiss
irish-english
italian-swiss
norwegian
norwegian-bokmal
norwegian-nynorsk
portuguese-brazilian
spanish-argentina
spanish-bolivia
spanish-chile
spanish-colombia
spanish-costa rica
spanish-dominican republic
spanish-ecuador
spanish-el salvador
spanish-guatemala
spanish-honduras
spanish-mexican
spanish-modern
spanish-nicaragua
spanish-panama
spanish-paraguay
spanish-peru
spanish-puerto rico
spanish-uruguay
spanish-venezuela
swedish-finland
swiss
america
britain
china
czech
england
great britain
holland
hong-kong
new-zealand
pr china
pr-china
puerto-rico
slovak
south africa
south korea
south-africa
south-korea
trinidad & tobago
united-kingdom
united-states
zh-CHS
ar-SA
bg-BG
ca-ES
zh-TW
cs-CZ
da-DK
de-DE
el-GR
fi-FI
fr-FR
he-IL
hu-HU
is-IS
it-IT
ja-JP
ko-KR
nl-NL
nb-NO
pl-PL
pt-BR
ro-RO
ru-RU
hr-HR
sk-SK
sq-AL
sv-SE
th-TH
tr-TR
ur-PK
id-ID
uk-UA
be-BY
sl-SI
et-EE
lv-LV
lt-LT
fa-IR
vi-VN
hy-AM
az-AZ-Latn
eu-ES
mk-MK
tn-ZA
xh-ZA
zu-ZA
af-ZA
ka-GE
fo-FO
hi-IN
mt-MT
se-NO
ms-MY
kk-KZ
ky-KG
sw-KE
uz-UZ-Latn
tt-RU
bn-IN
pa-IN
gu-IN
ta-IN
te-IN
kn-IN
ml-IN
mr-IN
sa-IN
mn-MN
cy-GB
gl-ES
kok-IN
syr-SY
div-MV
quz-BO
ns-ZA
mi-NZ
ar-IQ
zh-CN
de-CH
en-GB
es-MX
fr-BE
it-CH
nl-BE
nn-NO
pt-PT
sr-SP-Latn
sv-FI
az-AZ-Cyrl
se-SE
ms-BN
uz-UZ-Cyrl
quz-EC
ar-EG
zh-HK
de-AT
en-AU
es-ES
fr-CA
sr-SP-Cyrl
se-FI
quz-PE
ar-LY
zh-SG
de-LU
en-CA
es-GT
fr-CH
hr-BA
smj-NO
ar-DZ
zh-MO
de-LI
en-NZ
es-CR
fr-LU
bs-BA-Latn

Re: [Iup-users] IupConfig

2020-05-06 Thread Andrew Robinson
The files you sent are using ucrtbase.dll, which works no different than
msvcrt does. You do know that there are a great many other MS crt files, such
as msvcp100.dll and msvcp120.dll and so on? You want to try all those too? I'm
sure they won't work either.


I got kind of tired of playing this game so I looked up all the locales in the
ucrtbase.dll and I entered the list at the end of this email. I tried a few of
them (en-us, american-english, spanish-uruguay, england, etc) and most of them
worked (except for england). Some might not really be a locale but some other
string mixed in with the locale strings. I just did a cut-and-paste from the
dll.


The bottom-line is that there is absolutely no ".UTF8" string anywhere. It is
completely invalid.


So what about that comment on the MS website? It is fake news because it isn't
an official statement from MS and it isn't mentioned anywhere else on the MS
website. I could never get any of the MS dlls/libs to return anything other
than NULL for anything with "UTF" in it (I tried a few variations). That
matches what the documentation says and what is in the actual crt DLLs, but
maybe there is a version of the crts that mistakenly does return a NULL, even
though nothing has changed.


FYI: Further investigation of pocrt shows that while it returns a non-NULL
value for UTF-8, I followed the pointer and it was pointing to the letter "C",
which is the default locale for setlocale(). So it isn't working either.


I looked at setlocale_utf8+dll14.exe (for example) and it does return a NULL
for ".UTF8", but you say it works? If you can swear that your code works,
maybe you do need to send me a copy of your ucrtbase.dll (it's in the
Windows.System32 directory, just in case you don't know where it's at). That's
seems to be the only thing it could be because everything is doing exactly
what it should be doing. Your msvcrt.dll would work too but I'm more
interested in the universal crt.


Oh, and I'm using Win7 so if you do give me a dll, give me one that works with
Win7. Nothing from Win10 please.


Best Regards,
Andrew


american
american english
american-english
australian
belgian
canadian
chinese
chinese-hongkong
chinese-simplified
chinese-singapore
chinese-traditional
dutch-belgian
english-american
english-aus
english-belize
english-can
english-caribbean
english-ire
english-jamaica
english-nz
english-south africa
english-trinidad y tobago
english-uk
english-us
english-usa
french-belgian
french-canadian
french-luxembourg
french-swiss
german-austrian
german-lichtenstein
german-luxembourg
german-swiss
irish-english
italian-swiss
norwegian
norwegian-bokmal
norwegian-nynorsk
portuguese-brazilian
spanish-argentina
spanish-bolivia
spanish-chile
spanish-colombia
spanish-costa rica
spanish-dominican republic
spanish-ecuador
spanish-el salvador
spanish-guatemala
spanish-honduras
spanish-mexican
spanish-modern
spanish-nicaragua
spanish-panama
spanish-paraguay
spanish-peru
spanish-puerto rico
spanish-uruguay
spanish-venezuela
swedish-finland
swiss
america
britain
china
czech
england
great britain
holland
hong-kong
new-zealand
pr china
pr-china
puerto-rico
slovak
south africa
south korea
south-africa
south-korea
trinidad & tobago
united-kingdom
united-states
zh-CHS
ar-SA
bg-BG
ca-ES
zh-TW
cs-CZ
da-DK
de-DE
el-GR
fi-FI
fr-FR
he-IL
hu-HU
is-IS
it-IT
ja-JP
ko-KR
nl-NL
nb-NO
pl-PL
pt-BR
ro-RO
ru-RU
hr-HR
sk-SK
sq-AL
sv-SE
th-TH
tr-TR
ur-PK
id-ID
uk-UA
be-BY
sl-SI
et-EE
lv-LV
lt-LT
fa-IR
vi-VN
hy-AM
az-AZ-Latn
eu-ES
mk-MK
tn-ZA
xh-ZA
zu-ZA
af-ZA
ka-GE
fo-FO
hi-IN
mt-MT
se-NO
ms-MY
kk-KZ
ky-KG
sw-KE
uz-UZ-Latn
tt-RU
bn-IN
pa-IN
gu-IN
ta-IN
te-IN
kn-IN
ml-IN
mr-IN
sa-IN
mn-MN
cy-GB
gl-ES
kok-IN
syr-SY
div-MV
quz-BO
ns-ZA
mi-NZ
ar-IQ
zh-CN
de-CH
en-GB
es-MX
fr-BE
it-CH
nl-BE
nn-NO
pt-PT
sr-SP-Latn
sv-FI
az-AZ-Cyrl
se-SE
ms-BN
uz-UZ-Cyrl
quz-EC
ar-EG
zh-HK
de-AT
en-AU
es-ES
fr-CA
sr-SP-Cyrl
se-FI
quz-PE
ar-LY
zh-SG
de-LU
en-CA
es-GT
fr-CH
hr-BA
smj-NO
ar-DZ
zh-MO
de-LI
en-NZ
es-CR
fr-LU
bs-BA-Latn
smj-SE
ar-MA
en-IE
es-PA
fr-MC
sr-BA-Latn
sma-NO
ar-TN
en-ZA
es-DO
sr-BA-Cyrl
sma-SE
ar-OM
en-JM
es-VE
sms-FI
ar-YE
en-CB
es-CO
smn-FI
ar-SY
en-BZ
es-PE
ar-JO
en-TT
es-AR
ar-LB
en-ZW
es-EC
ar-KW
en-PH
es-CL
ar-AE
es-UY
ar-BH
es-PY
ar-QA
es-BO
es-SV
es-HN
es-NI
es-PR
zh-CHT
af-za
ar-ae
ar-bh
ar-dz
ar-eg
ar-iq
ar-jo
ar-kw
ar-lb
ar-ly
ar-ma
ar-om
ar-qa
ar-sa
ar-sy
ar-tn
ar-ye
az-az-cyrl
az-az-latn
be-by
bg-bg
bn-in
bs-ba-latn
ca-es
cs-cz
cy-gb
da-dk
de-at
de-ch
de-de
de-li
de-lu
div-mv
el-gr
en-au
en-bz
en-ca
en-cb
en-gb
en-ie
en-jm
en-nz
en-ph
en-tt
en-us
en-za
en-zw
es-ar
es-bo
es-cl
es-co
es-cr
es-do
es-ec
es-es
es-gt
es-hn
es-mx
es-ni
es-pa
es-pe
es-pr
es-py
es-sv
es-uy
es-ve
et-ee
eu-es
fa-ir
fi-fi
fo-fo
fr-be
fr-ca
fr-ch
fr-fr
fr-lu
fr-mc
gl-es
gu-in
he-il
hi-in
hr-ba
hr-hr
hu-hu
hy-am
id-id
is-is
it-ch
it-it
ja-jp
ka-ge
kk-kz
kn-in
kok-in
ko-kr
ky-kg
lt-lt
lv-lv
mi-nz
mk-mk
ml-in
mn-mn
mr-in
ms-bn
ms-my
mt-mt
nb-no
nl-be
nl-nl
nn-no
ns-za
pa-in
pl-pl
pt-br
pt-pt
quz-bo
quz-ec
quz-pe
ro-ro
ru

Re: [Iup-users] IupConfig

2020-05-06 Thread Andrew Robinson
The DLL is already on my computer. It's on every computer with Windows. If you
were going to send anything, maybe you could send the .lib file that is being
statically linked, except I already know what is in it: undocumented garbage.
I'm not going to reverse engineer their code, I'm just going to isolate it to
the function in question, then debug it to the point where it stops
functioning as advertised, and Microsoft never officially advertised that
setlocale() would ever work with UTF-8. In fact, the most recent non-fake news
is that Microsoft will release a version of setlocale() that will work with
UTF-8, but only for Win10 ...


"As of Windows Version 1903 (May 2019 Update), you can use the ActiveCodePage
property in the appxmanifest for packaged apps, or the fusion manifest for
unpackaged apps, to force a process to use UTF-8 as the process code page"
(https://docs.microsoft.com/en-us/windows/uwp/design/globalizing/use-utf8-code-page)


The function of setlocale() is to set the code page for a local process, so if
setlocale() actually could already support UTF8, why the need for the "update"
as officially described above? The fact that you could get setlocale(), or
some version of it to work, doesn't mean it was supposed to work, it means it
was a mistake or a loophole that MS never intended you to use. Stick to the
documentation and not the anomalies.


Anyways, that is why I'm not really keen on the idea of using setlocale(),
even if I could get it to work, because "getting it to work" means it would
have to be a hack job.


Best Regards,
Andrew


PS -- By the way, Haiku is really good with international apps -- maybe you
should think of porting IUP to a really good and consistently documented OS
like Hailku (32- and 64-bit versions)?


On 2020-05-06 at 8:00 AM, Antonio Scuri  wrote:
  All the programs I sent you are intentionally statically linked with the run
time library, except the mingw version. To avoid I have to send you the
respective DLL.  


  No, each Visual Studio now uses a different msvcrt.dll. I uploaded the same
samples built to use the run time in a DLL:


http://webserver2.tecgraf.puc-rio.br/~scuri/tmp/setlocale_utf8_dll.zip



Best,
Scuri




Em qua., 6 de mai. de 2020 às 10:32, Andrew Robinson 
escreveu:

Hi,


VS2017 calls a static library while the rest of your programs make a dynamic
library call to msvcrt.dll. The code in the static library is much different
from the code for setlocale() in the msvcrt.dll.


Since I do not have VS2017 on my computer, can you change the default command
line parameter/compiler option of VS2017 to switch from making static calls to
making calls to a dynamic library? Every version of VS is different from the
last one, so I can't tell you how to do that, but I do know that somewhere in
VS2017 should be a setting for determining whether an external function should
come from a static library or should it be a call to a dynamic library.


If you force both programs to do the same thing, then they should act the same
way. That in a nutshell is what is going on with your programs.


 but ...


The *official* documentation for setlocale() on Microsoft's online help and
the help file in their compiler never says they directly support UTF8. What
you read online was an unofficial comment and not an official statement.


 but ...


You can directly call setlocale() in the msvcrt.dll with the VS2017 program
and get consistent results that way, and while that sounds nice, it is only
nice so long as MS doesn't suddenly do something in the future to make it so
even that doesn't work.


Regards,
Andrew


On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8, but this is a Microsoft only function and
most of fopen usage in these libraries are in portable modules. This is an IUP
limitation in Windows. 
The simple workaround is to not use special characters in folders or files
name in Windows... Legacy applications will also have the same problem.
Another option is to call:
 setlocale(LC_ALL, ".UTF8"); But it will work for fopen only in Visual Studio
2017 or newer Microsoft compilers (setlocale will return NULL on other
compilers). fopen will successfully open the file if filename is a

Re: [Iup-users] IupConfig

2020-05-06 Thread Andrew Robinson
Hi,


VS2017 calls a static library while the rest of your programs make a dynamic
library call to msvcrt.dll. The code in the static library is much different
from the code for setlocale() in the msvcrt.dll.


Since I do not have VS2017 on my computer, can you change the default command
line parameter/compiler option of VS2017 to switch from making static calls to
making calls to a dynamic library? Every version of VS is different from the
last one, so I can't tell you how to do that, but I do know that somewhere in
VS2017 should be a setting for determining whether an external function should
come from a static library or should it be a call to a dynamic library.


If you force both programs to do the same thing, then they should act the same
way. That in a nutshell is what is going on with your programs.


 but ...


The *official* documentation for setlocale() on Microsoft's online help and
the help file in their compiler never says they directly support UTF8. What
you read online was an unofficial comment and not an official statement.


 but ...


You can directly call setlocale() in the msvcrt.dll with the VS2017 program
and get consistent results that way, and while that sounds nice, it is only
nice so long as MS doesn't suddenly do something in the future to make it so
even that doesn't work.


Regards,
Andrew


On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8, but this is a Microsoft only function and
most of fopen usage in these libraries are in portable modules. This is an IUP
limitation in Windows. 
The simple workaround is to not use special characters in folders or files
name in Windows... Legacy applications will also have the same problem.
Another option is to call:
 setlocale(LC_ALL, ".UTF8"); But it will work for fopen only in Visual Studio
2017 or newer Microsoft compilers (setlocale will return NULL on other
compilers). fopen will successfully open the file if filename is an UTF-8
string, even with special characters. So you will be able to set both UTF8MODE
and UTF8MODE_FILE to YES.
If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing "chcp 65001" on the command line. This
will allow your printf output to be properly displayed when using UTF-8
strings. This feature actually works for all Microsoft compilers in Windows,
and for MingW, even when setlocale returns NULL. Notice that some font
packages must be installed for this to fully work for all characters (for
instance Chinese, Japanese and Korean, along with some symbols too).
 
-


  Yes, this is all an IUP limitation because its external API do not support
Unicode. 


  I also fixed a bug in IupConfig to handle the case where the system folder
has special characters, but they can be converted to ANSI. I was not doing
that conversion. Just committed to the SVN.


Best,
Scuri




Em ter., 11 de fev. de 2020 às 22:14, Andrew Robinson 
escreveu:

Hi Antonio,


The following code:


 config = IupConfig();
 IupSetAttribute(config, "APP_NAME", "xyz");
 IupConfigLoad(config);


only seems to work if the current directory has no atypical (non-English)
characters in it, e.g. -- "E:\My\Files" vs "E:\My…\Files". I am using the
English version of Windows with code page 1252. Iup crashes at IupConfigLoad
within the function IupLineFileClose. The character "…" is Unicode codepoint
2026 (which translates to UTF-8 as 0xE2 0x80 0xA6).


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


Re: [Iup-users] IupConfig

2020-05-05 Thread Andrew Robinson
I didn't test the compilers, I tested the functions. They don't always work as
advertised, and this may be one of those times for some strange reason that
only Microsoft can comprehend.


I used char* res = setlocale(LC_ALL, NULL);


On 2020-05-04 at 8:16 PM, Antonio Scuri  wrote:
-  Which compiler you tested? 


- What was exactly the code?


char* res = setlocale(LC_ALL, "");
char* res = setlocale(LC_ALL, ".UTF8");
char* res = setlocale(LC_ALL, ".0");
char* res = setlocale(LC_ALL, NULL);
char* res = setlocale(LC_ALL, ".NULL");
char* res = setlocale(LC_ALL, "NULL");



Best,
Scuri




Em seg., 4 de mai. de 2020 às 22:21, Andrew Robinson 
escreveu:

Preliminary Status:


The apps that work actually call setlocale() in msvcrt, but with MSVC2017 and
higher, the compiler substitutes calls to LocaleNameToLCID() and
LocaleLCIDToName(). The Microsoft website was totally useless and incorrect in
almost every regard for how this works, so with a little research I found
this: https://www.science.co.il/language/Locale-codes.php. So instead of using
".UTF8", I used NULL (the decimal LCID value for UTF8) and it appeared to
work. So I want you to try it too and if it works for you, I will test that
for functionality in my app(s).


Best Regards,
Andrew


On 2020-05-04 at 10:23 AM, Andrew Robinson  wrote:
Thanks, got it! Will report back to you with my analysis when I finish my
investigation.


On 2020-05-04 at 9:23 AM, Antonio Scuri  wrote:
 You can download it here: 


http://webserver2.tecgraf.puc-rio.br/~scuri/tmp/setlocale_utf8.zip



Best,
Scuri




Em seg., 4 de mai. de 2020 às 11:57, Antonio Scuri 
escreveu:

  Sure, I can't send it here. But I'll upload it and send you a link after
lunch. 


Best, 
Scuri


Em seg, 4 de mai de 2020 11:54, Andrew Robinson 
escreveu:

Actually I did read what you wrote, the thing is, it isn't documented to work
like that, so I'm curious what Microsoft is up to. I did "forget" that you
said it only works with VS2017 but I was distracted by the fact that it was
never documented to work like that, so it's a puzzle I want to solve.


On 2020-05-03 at 7:35 PM, Antonio Scuri  wrote:
  I think you didn't read what I wrote. Please take a look again... 


  It is supported starting in Visual Studio 2017.



Best,
Scuri




Em dom, 3 de mai de 2020 22:15, Andrew Robinson 
escreveu:

Now that I've tried it again, I vaguely remember what was wrong with
setlocale(): ".UTF8" is not supported by Windows. The only languages supported
by Windows are listed here:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings?view=vs-2019.


Just so other people know, do not confuse locale with code page identifiers.
The code page identifier can be used by 
MultiByteToWideChar(), WideCharToMultiByte(), and WideCharToMultiByte(), but
it cannot be used by setlocale().


At least not in Windows.


Regards,
Andrew


On 2020-05-02 at 2:11 PM, Antonio Scuri  wrote:
> could I recommend that you record this solution in your online help file
some place where it is easy to see and find, say like Product -->
International Considerations or something like that? I think it is that
important.  


  Yes. Good point. 



> That is not a simple thing to request customers

  Oh, no. That ideia was just for using printf, usually for debugging.

Best,
Scuri




Em sex., 1 de mai. de 2020 às 21:07, Andrew Robinson 
escreveu:

Ola,


Fixing IupConfig() will help a lot. I was doing my own custom ini files but it
is far easier and the code is far more readable when using IupConfig().


So thanks for that.


Microsoft has both a #pragma and a function() for setlocale. I vaguely recall
using setlocale() and either I missed something or there was a problem with it
because I abandoned that idea. Actually I think I missed something, so I think
I need to try this out in my code again. If it works, I think that would be
the best all around solution. I think even the clipboard should work with that
and I wouldn't even have to translate any documents as Windows would do it for
me. So that sounds like a good solution for internationally-compatible apps.


I will report back to you how well setlocale() works, and if works well, could
I recommend that you record this solution in your online help file some place
where it is easy to see and find, say like Product --> International
Considerations or something like that? I think it is that important.


"If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing 'chcp 65001' on the command line"


That is not a simple thing to request customers to do because Windows doesn't
properly support UTF-8 on the console unless you do this:
https://blogs.msmvps.com/gdicanio/2017/08/22/printing-utf-8-text-to-the-windows-console/


Thanks,
Andres



On 2020-05-01 at 3:11 P

Re: [Iup-users] [Nessun oggetto]

2020-05-05 Thread Andrew Robinson
I don't know.


On 2020-05-05 at 3:16 AM, haald--- via Iup-users
 wrote:
howto unsubscribe?
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] IupConfig

2020-05-04 Thread Andrew Robinson
Preliminary Status:


The apps that work actually call setlocale() in msvcrt, but with MSVC2017 and
higher, the compiler substitutes calls to LocaleNameToLCID() and
LocaleLCIDToName(). The Microsoft website was totally useless and incorrect in
almost every regard for how this works, so with a little research I found
this: https://www.science.co.il/language/Locale-codes.php. So instead of using
".UTF8", I used NULL (the decimal LCID value for UTF8) and it appeared to
work. So I want you to try it too and if it works for you, I will test that
for functionality in my app(s).


Best Regards,
Andrew


On 2020-05-04 at 10:23 AM, Andrew Robinson  wrote:
Thanks, got it! Will report back to you with my analysis when I finish my
investigation.


On 2020-05-04 at 9:23 AM, Antonio Scuri  wrote:
 You can download it here: 


http://webserver2.tecgraf.puc-rio.br/~scuri/tmp/setlocale_utf8.zip



Best,
Scuri




Em seg., 4 de mai. de 2020 às 11:57, Antonio Scuri 
escreveu:

  Sure, I can't send it here. But I'll upload it and send you a link after
lunch. 


Best, 
Scuri


Em seg, 4 de mai de 2020 11:54, Andrew Robinson 
escreveu:

Actually I did read what you wrote, the thing is, it isn't documented to work
like that, so I'm curious what Microsoft is up to. I did "forget" that you
said it only works with VS2017 but I was distracted by the fact that it was
never documented to work like that, so it's a puzzle I want to solve.


On 2020-05-03 at 7:35 PM, Antonio Scuri  wrote:
  I think you didn't read what I wrote. Please take a look again... 


  It is supported starting in Visual Studio 2017.



Best,
Scuri




Em dom, 3 de mai de 2020 22:15, Andrew Robinson 
escreveu:

Now that I've tried it again, I vaguely remember what was wrong with
setlocale(): ".UTF8" is not supported by Windows. The only languages supported
by Windows are listed here:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings?view=vs-2019.


Just so other people know, do not confuse locale with code page identifiers.
The code page identifier can be used by 
MultiByteToWideChar(), WideCharToMultiByte(), and WideCharToMultiByte(), but
it cannot be used by setlocale().


At least not in Windows.


Regards,
Andrew


On 2020-05-02 at 2:11 PM, Antonio Scuri  wrote:
> could I recommend that you record this solution in your online help file
some place where it is easy to see and find, say like Product -->
International Considerations or something like that? I think it is that
important.  


  Yes. Good point. 



> That is not a simple thing to request customers

  Oh, no. That ideia was just for using printf, usually for debugging.

Best,
Scuri




Em sex., 1 de mai. de 2020 às 21:07, Andrew Robinson 
escreveu:

Ola,


Fixing IupConfig() will help a lot. I was doing my own custom ini files but it
is far easier and the code is far more readable when using IupConfig().


So thanks for that.


Microsoft has both a #pragma and a function() for setlocale. I vaguely recall
using setlocale() and either I missed something or there was a problem with it
because I abandoned that idea. Actually I think I missed something, so I think
I need to try this out in my code again. If it works, I think that would be
the best all around solution. I think even the clipboard should work with that
and I wouldn't even have to translate any documents as Windows would do it for
me. So that sounds like a good solution for internationally-compatible apps.


I will report back to you how well setlocale() works, and if works well, could
I recommend that you record this solution in your online help file some place
where it is easy to see and find, say like Product --> International
Considerations or something like that? I think it is that important.


"If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing 'chcp 65001' on the command line"


That is not a simple thing to request customers to do because Windows doesn't
properly support UTF-8 on the console unless you do this:
https://blogs.msmvps.com/gdicanio/2017/08/22/printing-utf-8-text-to-the-windows-console/


Thanks,
Andres



On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8

Re: [Iup-users] IupConfig

2020-05-04 Thread Andrew Robinson
Thanks, got it! Will report back to you with my analysis when I finish my
investigation.


On 2020-05-04 at 9:23 AM, Antonio Scuri  wrote:
 You can download it here: 


http://webserver2.tecgraf.puc-rio.br/~scuri/tmp/setlocale_utf8.zip



Best,
Scuri




Em seg., 4 de mai. de 2020 às 11:57, Antonio Scuri 
escreveu:

  Sure, I can't send it here. But I'll upload it and send you a link after
lunch. 


Best, 
Scuri


Em seg, 4 de mai de 2020 11:54, Andrew Robinson 
escreveu:

Actually I did read what you wrote, the thing is, it isn't documented to work
like that, so I'm curious what Microsoft is up to. I did "forget" that you
said it only works with VS2017 but I was distracted by the fact that it was
never documented to work like that, so it's a puzzle I want to solve.


On 2020-05-03 at 7:35 PM, Antonio Scuri  wrote:
  I think you didn't read what I wrote. Please take a look again... 


  It is supported starting in Visual Studio 2017.



Best,
Scuri




Em dom, 3 de mai de 2020 22:15, Andrew Robinson 
escreveu:

Now that I've tried it again, I vaguely remember what was wrong with
setlocale(): ".UTF8" is not supported by Windows. The only languages supported
by Windows are listed here:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings?view=vs-2019.


Just so other people know, do not confuse locale with code page identifiers.
The code page identifier can be used by 
MultiByteToWideChar(), WideCharToMultiByte(), and WideCharToMultiByte(), but
it cannot be used by setlocale().


At least not in Windows.


Regards,
Andrew


On 2020-05-02 at 2:11 PM, Antonio Scuri  wrote:
> could I recommend that you record this solution in your online help file
some place where it is easy to see and find, say like Product -->
International Considerations or something like that? I think it is that
important.  


  Yes. Good point. 



> That is not a simple thing to request customers

  Oh, no. That ideia was just for using printf, usually for debugging.

Best,
Scuri




Em sex., 1 de mai. de 2020 às 21:07, Andrew Robinson 
escreveu:

Ola,


Fixing IupConfig() will help a lot. I was doing my own custom ini files but it
is far easier and the code is far more readable when using IupConfig().


So thanks for that.


Microsoft has both a #pragma and a function() for setlocale. I vaguely recall
using setlocale() and either I missed something or there was a problem with it
because I abandoned that idea. Actually I think I missed something, so I think
I need to try this out in my code again. If it works, I think that would be
the best all around solution. I think even the clipboard should work with that
and I wouldn't even have to translate any documents as Windows would do it for
me. So that sounds like a good solution for internationally-compatible apps.


I will report back to you how well setlocale() works, and if works well, could
I recommend that you record this solution in your online help file some place
where it is easy to see and find, say like Product --> International
Considerations or something like that? I think it is that important.


"If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing 'chcp 65001' on the command line"


That is not a simple thing to request customers to do because Windows doesn't
properly support UTF-8 on the console unless you do this:
https://blogs.msmvps.com/gdicanio/2017/08/22/printing-utf-8-text-to-the-windows-console/


Thanks,
Andres



On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8, but this is a Microsoft only function and
most of fopen usage in these libraries are in portable modules. This is an IUP
limitation in Windows. 
The simple workaround is to not use special characters in folders or files
name in Windows... Legacy applications will also have the same problem.
Another option is to call:
 setlocale(LC_ALL, ".UTF8"); But it will work for fopen only in Visual Studio
2017 or newer Microsoft compilers (setlocale will return NULL on other
compilers). fopen will successfully open the file if filename is an UTF-8
string, even with special characters. So you will be able to set both UTF8MODE
and UTF8MODE_FILE to YES.
If you

Re: [Iup-users] IupConfig

2020-05-04 Thread Andrew Robinson
Just a quick question: you said, "I found out that it worked using setlocale
only in Visual Studio 2017" but all you sent was VS2010-15 and not VS2017. I
need setlocale_utf8_vc17.exe.


On 2020-05-04 at 9:23 AM, Antonio Scuri  wrote:
 You can download it here: 


http://webserver2.tecgraf.puc-rio.br/~scuri/tmp/setlocale_utf8.zip



Best,
Scuri




Em seg., 4 de mai. de 2020 às 11:57, Antonio Scuri 
escreveu:

  Sure, I can't send it here. But I'll upload it and send you a link after
lunch. 


Best, 
Scuri


Em seg, 4 de mai de 2020 11:54, Andrew Robinson 
escreveu:

Actually I did read what you wrote, the thing is, it isn't documented to work
like that, so I'm curious what Microsoft is up to. I did "forget" that you
said it only works with VS2017 but I was distracted by the fact that it was
never documented to work like that, so it's a puzzle I want to solve.


On 2020-05-03 at 7:35 PM, Antonio Scuri  wrote:
  I think you didn't read what I wrote. Please take a look again... 


  It is supported starting in Visual Studio 2017.



Best,
Scuri




Em dom, 3 de mai de 2020 22:15, Andrew Robinson 
escreveu:

Now that I've tried it again, I vaguely remember what was wrong with
setlocale(): ".UTF8" is not supported by Windows. The only languages supported
by Windows are listed here:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings?view=vs-2019.


Just so other people know, do not confuse locale with code page identifiers.
The code page identifier can be used by 
MultiByteToWideChar(), WideCharToMultiByte(), and WideCharToMultiByte(), but
it cannot be used by setlocale().


At least not in Windows.


Regards,
Andrew


On 2020-05-02 at 2:11 PM, Antonio Scuri  wrote:
> could I recommend that you record this solution in your online help file
some place where it is easy to see and find, say like Product -->
International Considerations or something like that? I think it is that
important.  


  Yes. Good point. 



> That is not a simple thing to request customers

  Oh, no. That ideia was just for using printf, usually for debugging.

Best,
Scuri




Em sex., 1 de mai. de 2020 às 21:07, Andrew Robinson 
escreveu:

Ola,


Fixing IupConfig() will help a lot. I was doing my own custom ini files but it
is far easier and the code is far more readable when using IupConfig().


So thanks for that.


Microsoft has both a #pragma and a function() for setlocale. I vaguely recall
using setlocale() and either I missed something or there was a problem with it
because I abandoned that idea. Actually I think I missed something, so I think
I need to try this out in my code again. If it works, I think that would be
the best all around solution. I think even the clipboard should work with that
and I wouldn't even have to translate any documents as Windows would do it for
me. So that sounds like a good solution for internationally-compatible apps.


I will report back to you how well setlocale() works, and if works well, could
I recommend that you record this solution in your online help file some place
where it is easy to see and find, say like Product --> International
Considerations or something like that? I think it is that important.


"If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing 'chcp 65001' on the command line"


That is not a simple thing to request customers to do because Windows doesn't
properly support UTF-8 on the console unless you do this:
https://blogs.msmvps.com/gdicanio/2017/08/22/printing-utf-8-text-to-the-windows-console/


Thanks,
Andres



On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8, but this is a Microsoft only function and
most of fopen usage in these libraries are in portable modules. This is an IUP
limitation in Windows. 
The simple workaround is to not use special characters in folders or files
name in Windows... Legacy applications will also have the same problem.
Another option is to call:
 setlocale(LC_ALL, ".UTF8"); But it will work for fopen only in Visual Studio
2017 or newer Microsoft compilers (setlocale will return NULL on other
compilers). fopen will successfully open the file if filename is an UTF-8
str

Re: [Iup-users] IupConfig

2020-05-04 Thread Andrew Robinson
Actually I did read what you wrote, the thing is, it isn't documented to work
like that, so I'm curious what Microsoft is up to. I did "forget" that you
said it only works with VS2017 but I was distracted by the fact that it was
never documented to work like that, so it's a puzzle I want to solve.


On 2020-05-03 at 7:35 PM, Antonio Scuri  wrote:
  I think you didn't read what I wrote. Please take a look again... 


  It is supported starting in Visual Studio 2017.



Best,
Scuri




Em dom, 3 de mai de 2020 22:15, Andrew Robinson 
escreveu:

Now that I've tried it again, I vaguely remember what was wrong with
setlocale(): ".UTF8" is not supported by Windows. The only languages supported
by Windows are listed here:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings?view=vs-2019.


Just so other people know, do not confuse locale with code page identifiers.
The code page identifier can be used by 
MultiByteToWideChar(), WideCharToMultiByte(), and WideCharToMultiByte(), but
it cannot be used by setlocale().


At least not in Windows.


Regards,
Andrew


On 2020-05-02 at 2:11 PM, Antonio Scuri  wrote:
> could I recommend that you record this solution in your online help file
some place where it is easy to see and find, say like Product -->
International Considerations or something like that? I think it is that
important.  


  Yes. Good point. 



> That is not a simple thing to request customers

  Oh, no. That ideia was just for using printf, usually for debugging.

Best,
Scuri




Em sex., 1 de mai. de 2020 às 21:07, Andrew Robinson 
escreveu:

Ola,


Fixing IupConfig() will help a lot. I was doing my own custom ini files but it
is far easier and the code is far more readable when using IupConfig().


So thanks for that.


Microsoft has both a #pragma and a function() for setlocale. I vaguely recall
using setlocale() and either I missed something or there was a problem with it
because I abandoned that idea. Actually I think I missed something, so I think
I need to try this out in my code again. If it works, I think that would be
the best all around solution. I think even the clipboard should work with that
and I wouldn't even have to translate any documents as Windows would do it for
me. So that sounds like a good solution for internationally-compatible apps.


I will report back to you how well setlocale() works, and if works well, could
I recommend that you record this solution in your online help file some place
where it is easy to see and find, say like Product --> International
Considerations or something like that? I think it is that important.


"If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing 'chcp 65001' on the command line"


That is not a simple thing to request customers to do because Windows doesn't
properly support UTF-8 on the console unless you do this:
https://blogs.msmvps.com/gdicanio/2017/08/22/printing-utf-8-text-to-the-windows-console/


Thanks,
Andres



On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8, but this is a Microsoft only function and
most of fopen usage in these libraries are in portable modules. This is an IUP
limitation in Windows. 
The simple workaround is to not use special characters in folders or files
name in Windows... Legacy applications will also have the same problem.
Another option is to call:
 setlocale(LC_ALL, ".UTF8"); But it will work for fopen only in Visual Studio
2017 or newer Microsoft compilers (setlocale will return NULL on other
compilers). fopen will successfully open the file if filename is an UTF-8
string, even with special characters. So you will be able to set both UTF8MODE
and UTF8MODE_FILE to YES.
If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing "chcp 65001" on the command line. This
will allow your printf output to be properly displayed when using UTF-8
strings. This feature actually works for all Microsoft compilers in Windows,
and for MingW, even when setlocale returns NULL. Notice that some font
packages must be installed f

Re: [Iup-users] IupConfig

2020-05-04 Thread Andrew Robinson
Okay, got it then. I like certain kinds of puzzles, and that is a good one.
Unfortunately I can't install VS2017 on any of my computers (security
reasons), so could you please send me the compiled binary file for that sample
code? Please?


Regards
Andrew


On 2020-05-04 at 6:46 AM, Antonio Scuri  wrote:
  Nope. It is there, in the message from 3 days ago.  


Best,
Scuri




Em seg, 4 de mai de 2020 10:44, Andrew Robinson 
escreveu:

You forgot the attachment


On 2020-05-03 at 7:40 PM, Antonio Scuri  wrote:
  BTW I tested the sample code I sent attached. It worked only in VS 2017, but
it worked. So there is hope.  


   But no, it is not a good solution.


Best,
Scuri




Em dom, 3 de mai de 2020 23:35, Antonio Scuri 
escreveu:

  I think you didn't read what I wrote. Please take a look again... 


  It is supported starting in Visual Studio 2017.



Best,
Scuri




Em dom, 3 de mai de 2020 22:15, Andrew Robinson 
escreveu:

Now that I've tried it again, I vaguely remember what was wrong with
setlocale(): ".UTF8" is not supported by Windows. The only languages supported
by Windows are listed here:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings?view=vs-2019.


Just so other people know, do not confuse locale with code page identifiers.
The code page identifier can be used by 
MultiByteToWideChar(), WideCharToMultiByte(), and WideCharToMultiByte(), but
it cannot be used by setlocale().


At least not in Windows.


Regards,
Andrew


On 2020-05-02 at 2:11 PM, Antonio Scuri  wrote:
> could I recommend that you record this solution in your online help file
some place where it is easy to see and find, say like Product -->
International Considerations or something like that? I think it is that
important.  


  Yes. Good point. 



> That is not a simple thing to request customers

  Oh, no. That ideia was just for using printf, usually for debugging.

Best,
Scuri




Em sex., 1 de mai. de 2020 às 21:07, Andrew Robinson 
escreveu:

Ola,


Fixing IupConfig() will help a lot. I was doing my own custom ini files but it
is far easier and the code is far more readable when using IupConfig().


So thanks for that.


Microsoft has both a #pragma and a function() for setlocale. I vaguely recall
using setlocale() and either I missed something or there was a problem with it
because I abandoned that idea. Actually I think I missed something, so I think
I need to try this out in my code again. If it works, I think that would be
the best all around solution. I think even the clipboard should work with that
and I wouldn't even have to translate any documents as Windows would do it for
me. So that sounds like a good solution for internationally-compatible apps.


I will report back to you how well setlocale() works, and if works well, could
I recommend that you record this solution in your online help file some place
where it is easy to see and find, say like Product --> International
Considerations or something like that? I think it is that important.


"If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing 'chcp 65001' on the command line"


That is not a simple thing to request customers to do because Windows doesn't
properly support UTF-8 on the console unless you do this:
https://blogs.msmvps.com/gdicanio/2017/08/22/printing-utf-8-text-to-the-windows-console/


Thanks,
Andres



On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8, but this is a Microsoft only function and
most of fopen usage in these libraries are in portable modules. This is an IUP
limitation in Windows. 
The simple workaround is to not use special characters in folders or files
name in Windows... Legacy applications will also have the same problem.
Another option is to call:
 setlocale(LC_ALL, ".UTF8"); But it will work for fopen only in Visual Studio
2017 or newer Microsoft compilers (setlocale will return NULL on other
compilers). fopen will successfully open the file if filename is an UTF-8
string, even with special characters. So you will be able to set both UTF8MODE
and UTF8MODE_FILE to YES.
If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing &

Re: [Iup-users] IupConfig

2020-05-04 Thread Andrew Robinson
You forgot the attachment


On 2020-05-03 at 7:40 PM, Antonio Scuri  wrote:
  BTW I tested the sample code I sent attached. It worked only in VS 2017, but
it worked. So there is hope.  


   But no, it is not a good solution.


Best,
Scuri




Em dom, 3 de mai de 2020 23:35, Antonio Scuri 
escreveu:

  I think you didn't read what I wrote. Please take a look again... 


  It is supported starting in Visual Studio 2017.



Best,
Scuri




Em dom, 3 de mai de 2020 22:15, Andrew Robinson 
escreveu:

Now that I've tried it again, I vaguely remember what was wrong with
setlocale(): ".UTF8" is not supported by Windows. The only languages supported
by Windows are listed here:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings?view=vs-2019.


Just so other people know, do not confuse locale with code page identifiers.
The code page identifier can be used by 
MultiByteToWideChar(), WideCharToMultiByte(), and WideCharToMultiByte(), but
it cannot be used by setlocale().


At least not in Windows.


Regards,
Andrew


On 2020-05-02 at 2:11 PM, Antonio Scuri  wrote:
> could I recommend that you record this solution in your online help file
some place where it is easy to see and find, say like Product -->
International Considerations or something like that? I think it is that
important.  


  Yes. Good point. 



> That is not a simple thing to request customers

  Oh, no. That ideia was just for using printf, usually for debugging.

Best,
Scuri




Em sex., 1 de mai. de 2020 às 21:07, Andrew Robinson 
escreveu:

Ola,


Fixing IupConfig() will help a lot. I was doing my own custom ini files but it
is far easier and the code is far more readable when using IupConfig().


So thanks for that.


Microsoft has both a #pragma and a function() for setlocale. I vaguely recall
using setlocale() and either I missed something or there was a problem with it
because I abandoned that idea. Actually I think I missed something, so I think
I need to try this out in my code again. If it works, I think that would be
the best all around solution. I think even the clipboard should work with that
and I wouldn't even have to translate any documents as Windows would do it for
me. So that sounds like a good solution for internationally-compatible apps.


I will report back to you how well setlocale() works, and if works well, could
I recommend that you record this solution in your online help file some place
where it is easy to see and find, say like Product --> International
Considerations or something like that? I think it is that important.


"If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing 'chcp 65001' on the command line"


That is not a simple thing to request customers to do because Windows doesn't
properly support UTF-8 on the console unless you do this:
https://blogs.msmvps.com/gdicanio/2017/08/22/printing-utf-8-text-to-the-windows-console/


Thanks,
Andres



On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8, but this is a Microsoft only function and
most of fopen usage in these libraries are in portable modules. This is an IUP
limitation in Windows. 
The simple workaround is to not use special characters in folders or files
name in Windows... Legacy applications will also have the same problem.
Another option is to call:
 setlocale(LC_ALL, ".UTF8"); But it will work for fopen only in Visual Studio
2017 or newer Microsoft compilers (setlocale will return NULL on other
compilers). fopen will successfully open the file if filename is an UTF-8
string, even with special characters. So you will be able to set both UTF8MODE
and UTF8MODE_FILE to YES.
If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing "chcp 65001" on the command line. This
will allow your printf output to be properly displayed when using UTF-8
strings. This feature actually works for all Microsoft compilers in Windows,
and for MingW, even when setlocale returns NULL. Notice that some font
packages must be installed for this to fully work for all characters (for
instance Chinese, Japanese and Korean, along with some symbols too).
 
--

Re: [Iup-users] IupConfig

2020-05-03 Thread Andrew Robinson
Now that I've tried it again, I vaguely remember what was wrong with
setlocale(): ".UTF8" is not supported by Windows. The only languages supported
by Windows are listed here:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/language-strings?view=vs-2019.


Just so other people know, do not confuse locale with code page identifiers.
The code page identifier can be used by 
MultiByteToWideChar(), WideCharToMultiByte(), and WideCharToMultiByte(), but
it cannot be used by setlocale().


At least not in Windows.


Regards,
Andrew


On 2020-05-02 at 2:11 PM, Antonio Scuri  wrote:
> could I recommend that you record this solution in your online help file
some place where it is easy to see and find, say like Product -->
International Considerations or something like that? I think it is that
important.  


  Yes. Good point. 



> That is not a simple thing to request customers

  Oh, no. That ideia was just for using printf, usually for debugging.

Best,
Scuri




Em sex., 1 de mai. de 2020 às 21:07, Andrew Robinson 
escreveu:

Ola,


Fixing IupConfig() will help a lot. I was doing my own custom ini files but it
is far easier and the code is far more readable when using IupConfig().


So thanks for that.


Microsoft has both a #pragma and a function() for setlocale. I vaguely recall
using setlocale() and either I missed something or there was a problem with it
because I abandoned that idea. Actually I think I missed something, so I think
I need to try this out in my code again. If it works, I think that would be
the best all around solution. I think even the clipboard should work with that
and I wouldn't even have to translate any documents as Windows would do it for
me. So that sounds like a good solution for internationally-compatible apps.


I will report back to you how well setlocale() works, and if works well, could
I recommend that you record this solution in your online help file some place
where it is easy to see and find, say like Product --> International
Considerations or something like that? I think it is that important.


"If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing 'chcp 65001' on the command line"


That is not a simple thing to request customers to do because Windows doesn't
properly support UTF-8 on the console unless you do this:
https://blogs.msmvps.com/gdicanio/2017/08/22/printing-utf-8-text-to-the-windows-console/


Thanks,
Andres



On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8, but this is a Microsoft only function and
most of fopen usage in these libraries are in portable modules. This is an IUP
limitation in Windows. 
The simple workaround is to not use special characters in folders or files
name in Windows... Legacy applications will also have the same problem.
Another option is to call:
 setlocale(LC_ALL, ".UTF8"); But it will work for fopen only in Visual Studio
2017 or newer Microsoft compilers (setlocale will return NULL on other
compilers). fopen will successfully open the file if filename is an UTF-8
string, even with special characters. So you will be able to set both UTF8MODE
and UTF8MODE_FILE to YES.
If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing "chcp 65001" on the command line. This
will allow your printf output to be properly displayed when using UTF-8
strings. This feature actually works for all Microsoft compilers in Windows,
and for MingW, even when setlocale returns NULL. Notice that some font
packages must be installed for this to fully work for all characters (for
instance Chinese, Japanese and Korean, along with some symbols too).
 
-


  Yes, this is all an IUP limitation because its external API do not support
Unicode. 


  I also fixed a bug in IupConfig to handle the case where the system folder
has special characters, but they can be converted to ANSI. I was not doing
that conversion. Just committed to the SVN.


Best,
Scuri




Em ter., 11 de fev. de 2020 às 22:14, Andrew Robinson 
escreveu:

Hi Antonio,


The following code:


 config = IupConfig();
 IupSetAttribute(confi

Re: [Iup-users] Lua, UTF-16 and iup.clipboard

2020-05-03 Thread Andrew Robinson
I hate to state the obvious but in a string data type, an ASCII "character" is
one byte in size (char), and a UTF-16 "character" is two bytes in size
(short).


I apologize if this is out-of-place for your conversation, but I get a lot of
people who confuse a string character with a byte, instead of a variable
number of bytes, but ... you know, just in case that is the real issue here I
wanted to "fix it".


So I'm not sure whether to say de nada or lo siento,
Andrew


On 2020-05-03 at 12:02 PM, Antonio Scuri  wrote:
>  The UTF-16 function takes a "string"  


  That is weird. UTF-16 strings are unsigned short* arrays, strings in Lua are
char* arrays. Something is not right. 



  Is there a link for the documentation of that library?


Best,

Scuri




Em dom., 3 de mai. de 2020 às 09:02, Jane Taubman 
escreveu:

>"data" can not be converted to a string using "tostring". It must use
this function you mentioned. 



Sorry I did not make myself clear.The UTF-16 function takes a "string" and
will not work with a "light user data" so I need to know how to convert the
light user data from the iup.clipboard to a string using just lua.



-- 

Jane.

Jane Taubman | www.rjt.org.uk | www.taubman.org.uk | www.fhug.org.uk

___
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] IupConfig

2020-05-01 Thread Andrew Robinson
Ola,


Fixing IupConfig() will help a lot. I was doing my own custom ini files but it
is far easier and the code is far more readable when using IupConfig().


So thanks for that.


Microsoft has both a #pragma and a function() for setlocale. I vaguely recall
using setlocale() and either I missed something or there was a problem with it
because I abandoned that idea. Actually I think I missed something, so I think
I need to try this out in my code again. If it works, I think that would be
the best all around solution. I think even the clipboard should work with that
and I wouldn't even have to translate any documents as Windows would do it for
me. So that sounds like a good solution for internationally-compatible apps.


I will report back to you how well setlocale() works, and if works well, could
I recommend that you record this solution in your online help file some place
where it is easy to see and find, say like Product --> International
Considerations or something like that? I think it is that important.


"If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing 'chcp 65001' on the command line"


That is not a simple thing to request customers to do because Windows doesn't
properly support UTF-8 on the console unless you do this:
https://blogs.msmvps.com/gdicanio/2017/08/22/printing-utf-8-text-to-the-windows-console/


Thanks,
Andres



On 2020-05-01 at 3:11 PM, Antonio Scuri  wrote:
  Hi,


  I wrote a test that don't even use IUP, just to test fopen with UTF-8. It is
attached. I found out that it worked using setlocale only in Visual Studio
2017. It seems to be a new feature. I decide to describe this in the IUP
documentation:


-
Notice that IUP, CD and IM libraries use the fopen based functions to read and
write files. In Windows fopen expects the filename string in the ANSI encoding
by default. If your filename, including the path, has characters that can not
be converted to ANSI, fopen will fail to open the file. In Windows we could
use _wfopen combined with UTF-8, but this is a Microsoft only function and
most of fopen usage in these libraries are in portable modules. This is an IUP
limitation in Windows. 
The simple workaround is to not use special characters in folders or files
name in Windows... Legacy applications will also have the same problem.
Another option is to call:
 setlocale(LC_ALL, ".UTF8"); But it will work for fopen only in Visual Studio
2017 or newer Microsoft compilers (setlocale will return NULL on other
compilers). fopen will successfully open the file if filename is an UTF-8
string, even with special characters. So you will be able to set both UTF8MODE
and UTF8MODE_FILE to YES.
If you decide to use this feature, another interesting option is to set the
console code page to UTF-8 executing "chcp 65001" on the command line. This
will allow your printf output to be properly displayed when using UTF-8
strings. This feature actually works for all Microsoft compilers in Windows,
and for MingW, even when setlocale returns NULL. Notice that some font
packages must be installed for this to fully work for all characters (for
instance Chinese, Japanese and Korean, along with some symbols too).
 
-


  Yes, this is all an IUP limitation because its external API do not support
Unicode. 


  I also fixed a bug in IupConfig to handle the case where the system folder
has special characters, but they can be converted to ANSI. I was not doing
that conversion. Just committed to the SVN.


Best,
Scuri




Em ter., 11 de fev. de 2020 às 22:14, Andrew Robinson 
escreveu:

Hi Antonio,


The following code:


 config = IupConfig();
 IupSetAttribute(config, "APP_NAME", "xyz");
 IupConfigLoad(config);


only seems to work if the current directory has no atypical (non-English)
characters in it, e.g. -- "E:\My\Files" vs "E:\My…\Files". I am using the
English version of Windows with code page 1252. Iup crashes at IupConfigLoad
within the function IupLineFileClose. The character "…" is Unicode codepoint
2026 (which translates to UTF-8 as 0xE2 0x80 0xA6).


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


Re: [Iup-users] Request

2020-05-01 Thread Andrew Robinson
Ola Antonio,


Mucho gracias. I know what you mean by "taking so long". I do that all the
time too, so don't worry about it.


I almost forgot about this issue, but since then I've did some more research
and as a result, this has become my Windows programming philosophy:
Windows is native to UTF-16, not UTF-8 or UTF-GB (GB18035)
UTF-8 and UTF-GB are both ASCII/ANSI compatible, so they can be substituted in
most cases for ASCII functions
EVERYTHING that Unicode evangelists claim as a benefit for UTF-8, is also THE
SAME EXACT BENEFIT that UTF-GB offers, and because UTF-GB is legacy compatible
for Chinese, UTF-GB should always be promoted as the official Unicode encoding
of choice. To not do so can only be explained by a petty racist bias instead
of sound logic
Windows has a "multibyte" conversion function for UTF-8/UTF-GB, so while it
over-complicates things a little, it isn't hopelessly over-complicated,
probably adding about an extra eight lines of code whenever needed (like it is
for filenames).
Speaking of filenames, path lengths will be limited to 256 bytes unless you
use the "\\?\" prefix
The relevant Window API functions for those who are interested in having TRULY
international applications is:


MultiByteToWideChar()
WideCharToMultiByte()
WideCharToMultiByte()


I don't like it, but I most certainly can easily live with it.


Signed,
Andres


PS -- The problem with certain overlapping characters was due to the wrong DPI
being set for my monitor. As usual, it was a simple problem that was not at
all easy to find. The lesson learned is not all display monitors should
default to 96dpi, so all you people out there with 2560x1600 monitors out
there, be warned!




On 2020-05-01 at 7:27 AM, Antonio Scuri  wrote:
  Hi, 


  Sorry taking so long to get back to this.


  I run some tests here and it seems to be working now:






  This was in Windows 10 with visual styles enabled.


   Here is in Windows 7 with visual styles enabled:






  And Windows 7 using Classic Theme:






  All build from latest SVN. Maybe something changed that fixed this. But
anyway it seems to be something in the native system. We don't have much
control over that inside an IupText.


Best,
Scuri






Em qui., 6 de fev. de 2020 às 16:25, Antonio Scuri 
escreveu:

  Ok got it


Em qui, 6 de fev de 2020 11:54, Andrew Robinson 
escreveu:

See attached


On 2020-02-06 at 8:51 AM, Antonio Scuri  wrote:
  Please send me a small text file with the string. Next week I'll be back to
work and check this. 


Best,
Scuri




Em qui, 6 de fev de 2020 10:44, Andrew Robinson 
escreveu:

No problemo,


The context was: IupSetStrAttribute(txtAsmCode,'VALUE',pCodeArray) where
txtAsmCode is a pointer to the multiline textbox control.


Regards,
Andres





On 2020-02-06 at 7:37 AM, Antonio Scuri  wrote:
  Hi, 


  I need more information about the context when the problem occurs. 


  Were you typing, or setting the VALUE attribute? Or pasting from clipboard?


Best,
Scuri




Em qui, 6 de fev de 2020 09:09, Andrew Robinson 
escreveu:

Hello Antonio,


I just want to remind you that IUP still doesn't appear to support UTF-8
properly in textboxes, as evidenced by the screen capture below of the
right-pointer arrow (➔ U+279c) overlapping the characters u in "u8" and the
character $ in "$DstStr"


Regards,
Andrew



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


Re: [Iup-users] Documentation for IupClipboard

2020-02-26 Thread Andrew Robinson
Hi,


I guess I am a victim of fake news?


So are you saying that FORMAT is not actually a format, but BINARY? So if the
data type isn't TEXT, WMF, EMF, or IMAGE "format", but is BINARY "format", I
should set FORMAT=YES followed by FORMATDATA=&someBinaryData and
FORMATSIZE=sizeOf(someBinaryData) to make it work? And yes, CF_PALETTE is an
enumeration value in winbase.h to indicate the TYPE of data being copied
to/from the Windows clipboard, so using the term "FORMAT" as a data type
instead using it to refer to an actual data format is misleading, but I think
I understand what IUP means by "FORMAT" now. This needs to be clarified in the
documentation, that's all I'm saying.


Also, I can see in the Notes that the TEXT "format" (as opposed to the FORMAT
"format") is copied to the clipboard according to the previous contents of the
clipboard, so if the previous clipboard contents was OEM text, you can only
copy OEM text to/from the clipboard. I think I understand that too, but
programmers need to be aware that the only kind of Unicode text the WinXP
Windows clipboard supports is "text/plain;charset=ISO-10646-UCS-2", so
anything not in the BMP won't translate properly from UTF-8.


Regards,
Andrew


On 2020-02-26 at 3:16 PM, Antonio Scuri  wrote:
  Hi, 


  FORMAT is a string, as described. Can be any string.


  FORMATDATA is a raw data. Can be any raw data. 
  
 The application can use it to implement a custom clipboard data transfer.


  CF_PALETTE and others, are numbers. They are not related with FORMAT. 


Best,
Scuri




Em qua, 26 de fev de 2020 17:59, Andrew Robinson 
escreveu:

Hi Antonio,


So what is the syntax for FORMAT? Would it conform to Windows and accept
things like CF_PALETTE or CF_TIFF or CF_WAVE and so on, or is it something
else?


Regards,
Andrew


On 2020-02-26 at 11:10 AM, Antonio Scuri  wrote:
  Hi, 


  First, FORMAT in IupClipboard is NOT related to the FORMAT attribute in
IupText.


  This is a custom format string. The application copy and paste functions
must know what it is copying and pasting in FORMATDATA based on that string.
In other words you can copy&paste any data you want, considering you know what
is the data.


Best,
Scuri




Em ter., 11 de fev. de 2020 às 22:19, Andrew Robinson 
escreveu:

Thank you Ariset. That information should also be listed or linked under the
Resources>IupClipboard text where it would do the most good.

Regards
Andres

On 2020-02-11 at 2:24 PM, Ariset  wrote:
> in the oficial documentation http://webserver2.tecgraf.puc-rio.br/iup/
> follow links Controls>Standard>IupText>FORMATTING
> 
> 2020-02-05 16:05 GMT-03:00, Andrew Robinson :
>> Ola Antonio,
>> 
>> 
>> I was trying to determine what "FORMAT", "FORMATAVAILABLE" and "FORMATDATA"
>> were defined as, but I can't seem to find anything. I thought it would be
>> listed under Attributes --> Globals in the main documentation online, but I
>> don't see where it is mentioned. Then I noticed that these attributes are
>> listed as only being available "since 3.7", but since the latest version of
>> IUP is 3.28, we aren't quite there yet. So what year will version 3.7
>> finally
>> be released so these attributes will be documented and available?
>> 
>> 
>> Regards,
>> Andres
>> 



___
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] Documentation for IupClipboard

2020-02-26 Thread Andrew Robinson
Hi Antonio,


So what is the syntax for FORMAT? Would it conform to Windows and accept
things like CF_PALETTE or CF_TIFF or CF_WAVE and so on, or is it something
else?


Regards,
Andrew


On 2020-02-26 at 11:10 AM, Antonio Scuri  wrote:
  Hi, 


  First, FORMAT in IupClipboard is NOT related to the FORMAT attribute in
IupText.


  This is a custom format string. The application copy and paste functions
must know what it is copying and pasting in FORMATDATA based on that string.
In other words you can copy&paste any data you want, considering you know what
is the data.


Best,
Scuri




Em ter., 11 de fev. de 2020 às 22:19, Andrew Robinson 
escreveu:

Thank you Ariset. That information should also be listed or linked under the
Resources>IupClipboard text where it would do the most good.

Regards
Andres

On 2020-02-11 at 2:24 PM, Ariset  wrote:
> in the oficial documentation http://webserver2.tecgraf.puc-rio.br/iup/
> follow links Controls>Standard>IupText>FORMATTING
> 
> 2020-02-05 16:05 GMT-03:00, Andrew Robinson :
>> Ola Antonio,
>> 
>> 
>> I was trying to determine what "FORMAT", "FORMATAVAILABLE" and "FORMATDATA"
>> were defined as, but I can't seem to find anything. I thought it would be
>> listed under Attributes --> Globals in the main documentation online, but I
>> don't see where it is mentioned. Then I noticed that these attributes are
>> listed as only being available "since 3.7", but since the latest version of
>> IUP is 3.28, we aren't quite there yet. So what year will version 3.7
>> finally
>> be released so these attributes will be documented and available?
>> 
>> 
>> Regards,
>> Andres
>> 



___
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] Documentation for IupClipboard

2020-02-11 Thread Andrew Robinson
Thank you Ariset. That information should also be listed or linked under the
Resources>IupClipboard text where it would do the most good.

Regards
Andres

On 2020-02-11 at 2:24 PM, Ariset  wrote:
>in the oficial documentation http://webserver2.tecgraf.puc-rio.br/iup/
>follow links Controls>Standard>IupText>FORMATTING
>
>2020-02-05 16:05 GMT-03:00, Andrew Robinson :
>> Ola Antonio,
>>
>>
>> I was trying to determine what "FORMAT", "FORMATAVAILABLE" and "FORMATDATA"
>> were defined as, but I can't seem to find anything. I thought it would be
>> listed under Attributes --> Globals in the main documentation online, but I
>> don't see where it is mentioned. Then I noticed that these attributes are
>> listed as only being available "since 3.7", but since the latest version of
>> IUP is 3.28, we aren't quite there yet. So what year will version 3.7
>> finally
>> be released so these attributes will be documented and available?
>>
>>
>> Regards,
>> Andres
>>



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


[Iup-users] IupConfig

2020-02-11 Thread Andrew Robinson
Hi Antonio,


The following code:


 config = IupConfig();
 IupSetAttribute(config, "APP_NAME", "xyz");
 IupConfigLoad(config);


only seems to work if the current directory has no atypical (non-English)
characters in it, e.g. -- "E:\My\Files" vs "E:\My…\Files". I am using the
English version of Windows with code page 1252. Iup crashes at IupConfigLoad
within the function IupLineFileClose. The character "…" is Unicode codepoint
2026 (which translates to UTF-8 as 0xE2 0x80 0xA6).


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


Re: [Iup-users] Request

2020-02-06 Thread Andrew Robinson
See attached


On 2020-02-06 at 8:51 AM, Antonio Scuri  wrote:
  Please send me a small text file with the string. Next week I'll be back to
work and check this. 


Best,
Scuri




Em qui, 6 de fev de 2020 10:44, Andrew Robinson 
escreveu:

No problemo,


The context was: IupSetStrAttribute(txtAsmCode,'VALUE',pCodeArray) where
txtAsmCode is a pointer to the multiline textbox control.


Regards,
Andres





On 2020-02-06 at 7:37 AM, Antonio Scuri  wrote:
  Hi, 


  I need more information about the context when the problem occurs. 


  Were you typing, or setting the VALUE attribute? Or pasting from clipboard?


Best,
Scuri




Em qui, 6 de fev de 2020 09:09, Andrew Robinson 
escreveu:

Hello Antonio,


I just want to remind you that IUP still doesn't appear to support UTF-8
properly in textboxes, as evidenced by the screen capture below of the
right-pointer arrow (➔ U+279c) overlapping the characters u in "u8" and the
character $ in "$DstStr"


Regards,
Andrew





Sample.txt
Description: Binary data
___
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users


Re: [Iup-users] Request

2020-02-06 Thread Andrew Robinson
No problemo,


The context was: IupSetStrAttribute(txtAsmCode,'VALUE',pCodeArray) where
txtAsmCode is a pointer to the multiline textbox control.


Regards,
Andres





On 2020-02-06 at 7:37 AM, Antonio Scuri  wrote:
  Hi, 


  I need more information about the context when the problem occurs. 


  Were you typing, or setting the VALUE attribute? Or pasting from clipboard?


Best,
Scuri




Em qui, 6 de fev de 2020 09:09, Andrew Robinson 
escreveu:

Hello Antonio,


I just want to remind you that IUP still doesn't appear to support UTF-8
properly in textboxes, as evidenced by the screen capture below of the
right-pointer arrow (➔ U+279c) overlapping the characters u in "u8" and the
character $ in "$DstStr"


Regards,
Andrew



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


Re: [Iup-users] Request

2020-02-06 Thread Andrew Robinson
Hello Antonio,


I just want to remind you that IUP still doesn't appear to support UTF-8
properly in textboxes, as evidenced by the screen capture below of the
right-pointer arrow (➔ U+279c) overlapping the characters u in "u8" and the
character $ in "$DstStr"


Regards,
Andrew



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


  1   2   >