On 7/27/15, Eric Wing <ewmail...@gmail.com> wrote: > On 7/26/15, Antonio Scuri <sc...@tecgraf.puc-rio.br> wrote: >> Take a look at the iupgtk_image.c. The necessary conversions can be >> copied >> from there. >> >> iupdrvImageCreateImageRaw() and iupdrvImageGetRawData() >> are opposite functions I doubt that you will be able to reuse >> code. iupdrvImageCreateImageRaw and iupdrvImageCreateImage also get the >> data from different sources, so the code will be similar but the data >> access will be different. >> >> Best, >> Scuri >> > > Okay, I have the 32, 24, and 8-bit images working for > iupdrvImageCreateImage(). > > I still don't know what calls iupdrvImageCreateImageRaw and > iupdrvImageGetRawData or how to test them, so I'm skipping them for > now. > > > > Attached is a picture of the label.c test program. I hacked the layout > positions for the images and horizontal/vertical separators so I can > see them, otherwise everything is on top of each other like the text. > > > I need guidance about what to do with things like UTF8MODE. > > if (IupGetInt(NULL, "UTF8MODE")) > { > IupSetAttribute(label, "TITLE", "Text Labels (√ß√£√µ√°√≥√©)"); > } > else > { > IupSetAttribute(label, "TITLE", "Text Labels (Á„ı·ÛÈ)"); > } > > Internally, in Cocoa I've been assuming UTF8. (But I have not set any > Iup flags like UTF8MODE). The string in the if-part of the above case > works. The string in the else-case actually triggers a Clang compiler > warning: "Illegal character encoding in string literal". I'm currently > avoiding this case to avoid problems. > > > Second, as you can see from the picture, I need to start looking at > layout and window sizing. Can you give me a walkthrough of how this > works in Iup and what I should be doing to get this window created at > the correct size and position, and with all those test elements laid > out correctly in the window? > > Thanks, > Eric >
Bump. I've made a tiny bit of progress with dialog positioning, but I am still having a hard time understanding how sizes and positioning are done. I see these two variables seem very important to the process, but I don't understand how they get set or how to fill them with the proper values. ih->currentwidth ih->currentheight I've found the function void iupdrvBaseLayoutUpdateMethod(Ihandle *ih) It looks like this is a good time to set the size and position of widgets. However, I don't think the ih->currentwidth and ih->currentheight values are valid. I don't think Iup yet has proper sizing information for my widgets, like the minimum fit size for a button or label is. And I don't understand how the dialog finally gets its total fit information. Thanks, Eric ------------------------------------------------------------------------------ _______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users