Ok. Got it.

Best,
Scuri


On Sun, Jan 15, 2017 at 1:11 PM, Andrew Robinson <arobinso...@cox.net>
wrote:

> int fnSrcFile(void) { return IUP_DEFAULT }
> int fnDstFile(void) { return IUP_DEFAULT }
> int fnBtnOk(void) { return IUP_DEFAULT }
> int fnBtnQuit(void) { return IUP_CLOSE }
> int main(int argc, char **argv) {
>  Ihandle *dlg, *hTxt, *guiPtr;
>  struct stGui {
>   Ihandle *lbl1;
>   Ihandle *lbl2;
>   Ihandle *txt1;
>   Ihandle *btn1;
>   Ihandle *lbl3;
>   Ihandle *lbl4;
>   Ihandle *txt2;
>   Ihandle *btn2;
>   Ihandle *lbl5;
>   Ihandle *lbl6;
>   Ihandle *btn3;
>   Ihandle *btn4;
>   Ihandle *end1 = 0; }
>
>  IupOpen(&argc, &argv);
>
>  lbl1 = IupLabel('SOURCE FILE')
>  lbl2 = IupLabel(':')
>  lbl3 = IupLabel('DST DIR')
>  lbl4 = IupLabel(':')
>  txt1 = IupText(NULL)
>  IupSetAttribute(txt1,'RASTERSIZE','125')
>  IupSetAttribute,(txt1,'MULTILINE','NO')
>  txt2 = IupText(NULL)
>  IupSetAttribute(txt2,'RASTERSIZE','125')
>  IupSetAttribute(txt2,'MULTILINE','NO')
>  btn1 = IupButton('SRC',NULL)
>  IupSetCallback(btn1,'ACTION',&fnSrcFile)
>  btn2 = IupButton('DST',NULL)
>  IupSetCallback(btn2,'ACTION',&fnDstFile)
>  lbl5 = IupLabel('')
>  lbl6 = IupLabel('')
>  btn3 = IupButton('OK',NULL)
>  IupSetCallback(btn3,'ACTION',&fnBtnOk)
>  btn4 = IupButton('QUIT',NULL)
>  IupSetCallback(btn4,'ACTION',&fnBtnQuit)
>
>  ptrGui = &stGui;
>  gbox = IupGridBoxv(guiPtr)
>  IupSetAttribute(gbox,'ORIENTATION','HORIZONTAL')
>  IupSetAttribute(gbox,'NUMDIV','4')
>  IupSetAttribute(gbox,'SIZELIN','0')
>  IupSetAttribute(gbox,'SIZECOL','2')
>  IupSetAttribute(gbox,'MARGIN','5x5')
>  IupSetAttribute(gbox,'GAPCOL','5')
>  IupSetAttribute(gbox,'GAPLIN','5')
>  IupSetAttribute(gbox,'ALIGNMENTLIN','ACENTER')
>  IupSetAttribute(gbox,'ALIGNMENTCOL','ARIGHT')
>
>  dlg = IupDialog(gbox)
>  IupSetAttribute(dlg,'TITLE','Hello World')
>  IupShowXY(dlg,IUP_CENTER,IUP_CENTER)
>
>  IupMainLoop
>  IupClose
>
> Forgive me if there are some typos in translating this.
>
> On 1/9/2017 at 10:54 AM, Antonio Scuri <antonio.sc...@gmail.com> wrote:
>
>   Hi,
>
>   Can you send me the code for that example. I may have an idea.
>
> Best,
> Scuri
>
> On Sun, Jan 8, 2017 at 3:16 PM, Andrew Robinson <arobinso...@cox.net>
> wrote:
>
>> Hello,
>>
>> This is just feedback of user satisfaction. It is not a complaint, it is
>> just an opinion and requires no response. I'm hoping someone will
>> understand what I am saying here and will think of a way to improve the
>> container functionality to bring it up to a more state-of-the-art level.
>>
>> With the following parameters:
>>
>>     MARGIN=5x5
>>     GAPCOL=5
>>     GAPLIN=5
>>
>> I get the following rendering:
>>
>> Note how GAPLIN has no effect. That's because IUP needs to be told which
>> component in the entire grid is the the tallest component in the entire
>> grid, so with that in mind, I used the following parameters,
>>
>>     SIZELIN=1
>>     SIZECOL=2
>>     MARGIN=5x5
>>     GAPCOL=5
>>     GAPLIN=5
>>
>> and I get the following rendering:
>>
>> So now GAPLIN is working, but I have a problem with the GAPCOL ignoring
>> the QUIT button's width because IUP hasn't been told that the QUIT button
>> is the widest button in that column, but I cannot convey that information
>> to IUP without screwing up the rest of the layout, since columns zero and
>> one of line 2 are zero width and zero height:
>>
>>
>> To get this to work, I tried inserting the GridBox inside of a Vbox or
>> Hbox, but they too have no effect on the QUIT button margin. I could make
>> this work by overriding the fault main window width by using USERSIZE, but
>> why have containers if I typically will have to override them like this?
>>
>> That was only for a simplified user interface. Just spelling out the
>> labels and flipping SRC with DST, I get this rendering,
>>
>>
>> which is awful and not very fixable.
>>
>> Therefore the problem is this: I cannot choose a container that will let
>> me align components both vertically and horizontally. It is either one or
>> the other, but not both. GridBox comes close but it isn't very powerful, as
>> you can see. There is no point in having any of these containers, if they
>> can only do very simple "Hello World" interfaces and nothing beyond that,
>> without having to compile a confusing slew of Vboxes, Hboxes, and GridBoxes
>> into your user interface. As much as I hate JAVA, their version of the
>> GridBox was very useful. As it stands, I need to resort to the cumbersome
>> CX and CY attributes of each component to make anything more complicated
>> than a "Hellow World" user interface work.
>>
>> What is really great about GridBox is that you only need to pass one
>> parameter to the function to load your entire interface.
>>
>> Best Regards,
>>
>> Andrew
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Iup-users mailing list
>> Iup-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>
>>
>
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to